@arbidocs/blocks 0.4.27 → 0.4.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/dist/agents/index.cjs +224 -212
- package/dist/agents/index.js +6 -6
- package/dist/agents/tasks/TaskRowMenu.d.ts +4 -1
- package/dist/agents/tasks/TaskRunsDialog.d.ts +3 -1
- package/dist/agents/tasks/taskRows.d.ts +2 -0
- package/dist/agents/workflows/WorkflowDocumentsField.d.ts +12 -0
- package/dist/agents/workflows/index.d.ts +2 -0
- package/dist/agents/workflows/workspaceScope.d.ts +18 -0
- package/dist/chat/ChatPage.d.ts +1 -1
- package/dist/chat/chat-page-types.d.ts +12 -1
- package/dist/chat/index.cjs +129 -129
- package/dist/chat/index.js +2 -2
- package/dist/chunk-4XJZ6AAY.js +407 -0
- package/dist/chunk-4XJZ6AAY.js.map +1 -0
- package/dist/{chunk-UOLMFC5K.js → chunk-6YVI74BC.js} +498 -108
- package/dist/chunk-6YVI74BC.js.map +1 -0
- package/dist/{chunk-CQ6CYPV4.js → chunk-7FF473XB.js} +7 -119
- package/dist/chunk-7FF473XB.js.map +1 -0
- package/dist/{chunk-ZEIOREJY.js → chunk-EHXSBH6U.js} +37 -6
- package/dist/chunk-EHXSBH6U.js.map +1 -0
- package/dist/chunk-EYPPB5CY.cjs +85 -0
- package/dist/chunk-EYPPB5CY.cjs.map +1 -0
- package/dist/{chunk-ENY6XXKR.js → chunk-I7FJS7WG.js} +155 -39
- package/dist/chunk-I7FJS7WG.js.map +1 -0
- package/dist/{chunk-557EU3G4.js → chunk-JLOYWXRB.js} +3 -3
- package/dist/{chunk-557EU3G4.js.map → chunk-JLOYWXRB.js.map} +1 -1
- package/dist/chunk-KF4EC5XU.js +68 -0
- package/dist/chunk-KF4EC5XU.js.map +1 -0
- package/dist/{chunk-3ZXXHROK.cjs → chunk-L6YRTT5M.cjs} +158 -39
- package/dist/chunk-L6YRTT5M.cjs.map +1 -0
- package/dist/chunk-S5HZBXZA.cjs +430 -0
- package/dist/chunk-S5HZBXZA.cjs.map +1 -0
- package/dist/{chunk-JCVZKCXC.cjs → chunk-TLQQV7WW.cjs} +37 -6
- package/dist/chunk-TLQQV7WW.cjs.map +1 -0
- package/dist/{chunk-NNH7N62N.cjs → chunk-VMCOH3AY.cjs} +497 -105
- package/dist/chunk-VMCOH3AY.cjs.map +1 -0
- package/dist/{chunk-JLPYOPCX.js → chunk-WSJVHSGN.js} +225 -36
- package/dist/chunk-WSJVHSGN.js.map +1 -0
- package/dist/{chunk-DCEI37AX.cjs → chunk-YVIOCITQ.cjs} +3 -3
- package/dist/{chunk-DCEI37AX.cjs.map → chunk-YVIOCITQ.cjs.map} +1 -1
- package/dist/{chunk-J22DXUJY.cjs → chunk-ZHLMDJCO.cjs} +226 -34
- package/dist/chunk-ZHLMDJCO.cjs.map +1 -0
- package/dist/{chunk-TL2DHSC5.cjs → chunk-ZXGBUHES.cjs} +5 -120
- package/dist/chunk-ZXGBUHES.cjs.map +1 -0
- package/dist/connect/docx.cjs +26 -8
- package/dist/connect/docx.cjs.map +1 -1
- package/dist/connect/docx.d.ts +1 -0
- package/dist/connect/docx.js +24 -7
- package/dist/connect/docx.js.map +1 -1
- package/dist/connect/index.cjs +303 -61
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/index.d.ts +4 -0
- package/dist/connect/index.js +263 -25
- package/dist/connect/index.js.map +1 -1
- package/dist/connection/ConnectedAgentChatPanel.d.ts +7 -0
- package/dist/connection/ConnectedNativeDocxEditor.d.ts +2 -1
- package/dist/connection/ConnectedSkillUpload.d.ts +2 -0
- package/dist/connection/ConnectedStreamedWordArtifact.d.ts +4 -0
- package/dist/connection/ConnectedTaskAccessRequest.d.ts +4 -0
- package/dist/connection/ai.d.ts +4 -1
- package/dist/connection/useConnectedWorkNotifications.d.ts +21 -0
- package/dist/docx/DocxMentions.d.ts +9 -2
- package/dist/docx/NativeDocxEditor.d.ts +11 -3
- package/dist/docx/StreamedWordArtifact.d.ts +15 -0
- package/dist/docx/index.cjs +16 -8
- package/dist/docx/index.d.ts +3 -2
- package/dist/docx/index.js +2 -2
- package/dist/docx/streamWordDocument.d.ts +12 -0
- package/dist/facts/index.cjs +1 -1
- package/dist/facts/index.js +1 -1
- package/dist/files/index.cjs +3 -3
- package/dist/files/index.js +3 -3
- package/dist/index.cjs +778 -766
- package/dist/index.js +15 -15
- package/dist/settings/index.cjs +42 -232
- package/dist/settings/index.cjs.map +1 -1
- package/dist/settings/index.js +7 -203
- package/dist/settings/index.js.map +1 -1
- package/dist/site/index.cjs +5 -5
- package/dist/site/index.js +1 -1
- package/dist/studio/index.cjs +7 -6
- package/dist/studio/index.cjs.map +1 -1
- package/dist/studio/index.js +5 -4
- package/dist/studio/index.js.map +1 -1
- package/dist/workspaces/index.cjs +2 -2
- package/dist/workspaces/index.js +2 -2
- package/package.json +3 -3
- package/src/docx/styles.css +13 -0
- package/dist/chunk-3ZXXHROK.cjs.map +0 -1
- package/dist/chunk-5TRALRWN.js +0 -42
- package/dist/chunk-5TRALRWN.js.map +0 -1
- package/dist/chunk-CQ6CYPV4.js.map +0 -1
- package/dist/chunk-CQCC7LE7.js +0 -210
- package/dist/chunk-CQCC7LE7.js.map +0 -1
- package/dist/chunk-ENY6XXKR.js.map +0 -1
- package/dist/chunk-EUOGPUMJ.cjs +0 -59
- package/dist/chunk-EUOGPUMJ.cjs.map +0 -1
- package/dist/chunk-J22DXUJY.cjs.map +0 -1
- package/dist/chunk-JCVZKCXC.cjs.map +0 -1
- package/dist/chunk-JLPYOPCX.js.map +0 -1
- package/dist/chunk-NNH7N62N.cjs.map +0 -1
- package/dist/chunk-RFIBUWLF.cjs +0 -232
- package/dist/chunk-RFIBUWLF.cjs.map +0 -1
- package/dist/chunk-TL2DHSC5.cjs.map +0 -1
- package/dist/chunk-UOLMFC5K.js.map +0 -1
- package/dist/chunk-ZEIOREJY.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/connection/ArbiAppProvider.tsx","../../src/connection/StreamedArtifact.tsx","../../src/connection/useConnectedShellWorkspaces.ts","../../src/connection/ConnectedSettings.tsx","../../src/connection/useConnectedDocxNotifications.ts"],"names":["jsx","notify","useState","useWorkspaces"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,SAAS,wBAAA,CAAyB,EAAE,QAAA,EAAS,EAA4B;AACvE,EAAA,MAAM,EAAE,MAAA,EAAO,GAAI,aAAA,EAAc;AACjC,EAAA,uBACE,GAAA,CAAC,qBAAA,EAAA,EAAsB,OAAA,EAAS,MAAA,KAAW,iBAAkB,QAAA,EAAS,CAAA;AAE1E;AAEO,SAAS,eAAA,CAAgB;AAAA,EAC9B,MAAA;AAAA,EACA;AACF,CAAA,EAGG;AACD,EAAA,MAAM,CAAC,WAAW,CAAA,GAAI,QAAA;AAAA,IACpB,MACE,IAAI,WAAA,CAAY;AAAA,MACd,cAAA,EAAgB,EAAE,OAAA,EAAS,EAAE,SAAA,EAAW,KAAQ,KAAA,EAAO,CAAA,EAAG,oBAAA,EAAsB,KAAA,EAAM;AAAE,KACzF;AAAA,GACL;AAEA,EAAA,MAAM,WAAA,GAAc,MAAA,CAAO,MAAA,IAAU,MAAA,CAAO,UAAA,IAAc,yBAAA;AAE1D,EAAA,2BACG,mBAAA,EAAA,EAAoB,MAAA,EAAQ,WAAA,EAC3B,QAAA,kBAAA,GAAA,CAAC,gBAAa,GAAA,EAAK,WAAA,EACjB,QAAA,kBAAA,GAAA,CAAC,kBAAA,EAAA,EAAmB,QAClB,QAAA,kBAAA,GAAA,CAAC,wBAAA,EAAA,EAA0B,QAAA,EAAS,CAAA,EACtC,GACF,CAAA,EACF,CAAA;AAEJ;ACzCA,IAAM,sBAAA,GAAyB,IAAA,CAAK,MAAM,OAAO,uCAA0B,CAAC,CAAA;AA+CrE,SAAS,gBAAA,CAAiB;AAAA,EAC/B,SAAA;AAAA,EACA,WAAA;AAAA,EACA,IAAA;AAAA,E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AAA,QACH,KACG,MAAA,CAAO,CAAC,IAAA,KAAS,CAAC,KAAK,IAAA,IAAQ,IAAA,CAAK,SAAA,CAAU,WAAA,KAAgB,MAAM,UAAU,CAAA,CAC9E,IAAI,CAAC,IAAA,KAAS,KAAK,WAAW;AAAA,OACnC;AAAA,IACF;AAAA,GACF;AACF","file":"index.js","sourcesContent":["/**\n * Composition root for a host app on the ARBI React SDK.\n *\n * QueryClientProvider → react-query cache shared with the SDK\n * ArbiProvider → the SDK's Arbi instance (no network until login)\n * ConnectionProvider → demo/live auth + workspace layer\n *\n * With no live `apiUrl`, ArbiProvider is still mounted (cheap, inert) against\n * `demoApiUrl` and the app runs entirely in seeded demo mode.\n */\nimport { useState, type ReactNode } from 'react'\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query'\nimport { ArbiProvider, ArbiWebSocketProvider } from '@arbidocs/react'\nimport { ConnectionProvider, useConnection } from './ConnectionProvider'\nimport type { ArbiConnectionConfig } from './types'\n\n/**\n * Opens the shared SDK WebSocket once the app is live-authenticated (demo /\n * logged-out sessions have no backend, so they stay disconnected). Lives inside\n * ConnectionProvider so it can read the live status.\n */\nfunction ConnectionBoundWebSocket({ children }: { children: ReactNode }) {\n const { status } = useConnection()\n return (\n <ArbiWebSocketProvider enabled={status === 'authenticated'}>{children}</ArbiWebSocketProvider>\n )\n}\n\nexport function ArbiAppProvider({\n config,\n children,\n}: {\n config: ArbiConnectionConfig\n children: ReactNode\n}) {\n const [queryClient] = useState(\n () =>\n new QueryClient({\n defaultOptions: { queries: { staleTime: 30_000, retry: 1, refetchOnWindowFocus: false } },\n })\n )\n\n const providerUrl = config.apiUrl || config.demoApiUrl || 'https://demo.arbi.local'\n\n return (\n <QueryClientProvider client={queryClient}>\n <ArbiProvider url={providerUrl}>\n <ConnectionProvider config={config}>\n <ConnectionBoundWebSocket>{children}</ConnectionBoundWebSocket>\n </ConnectionProvider>\n </ArbiProvider>\n </QueryClientProvider>\n )\n}\n","import { lazy, Suspense } from 'react'\nimport { ArtifactCanvas } from '@arbidocs/react'\nimport { useStreamedArtifact, type UseStreamedArtifactOptions } from '@arbidocs/react/artifacts'\nimport {\n StreamedArtifactFrame,\n type StreamedArtifactFrameLabels,\n type StreamedArtifactFrameTestIds,\n} from '../artifacts/StreamedArtifactFrame'\nimport type { ArtifactEvent } from './ai'\nimport type { StreamedArtifactEditorProps } from './StreamedArtifactEditor'\n\n// The editor (MDXEditor, Lexical) stays out of the bundle until a draft is ready to edit.\nconst StreamedArtifactEditor = lazy(() => import('./StreamedArtifactEditor'))\n\nexport interface StreamedArtifactProps\n extends\n Pick<UseStreamedArtifactOptions, 'configId' | 'parseRetry' | 'clean'>,\n Pick<\n StreamedArtifactEditorProps,\n 'editorProps' | 'onSaved' | 'onSaveError' | 'actions' | 'hideDefaultActions'\n > {\n /** The artifacts of the agent run (`useConnectedAiTask().artifacts`). */\n artifacts: ArtifactEvent[]\n workspaceId: string | undefined\n /** The agent is still working: show the live canvas. */\n busy: boolean\n /** The run failed; with no draft the canvas shows it. */\n error?: string | null\n stepCount?: number\n busyHint?: string\n emptyHint?: string\n className?: string\n /** Root test id of the editor; the preparing state is `${testId}-preparing`. */\n testId?: string\n labels?: Partial<StreamedArtifactFrameLabels>\n testIds?: Partial<StreamedArtifactFrameTestIds>\n}\n\n/**\n * An agent-drafted artifact from stream to editor, in one part. Pass the run's `artifacts` and\n * whether it is `busy`; it shows\n *\n * 1. the live `ArtifactCanvas` while the agent streams;\n * 2. \"Preparing editor...\" (the canvas stays readable underneath) while the finished draft is\n * cleaned (`cleanDraftMarkdown`), stored as version 1 of the artifact (`wpType: 'artifact'`)\n * and parsed by the backend, which can take up to about a minute;\n * 3. `ArtifactEditor` on the stored version (edit, save a new version, version list, compare\n * with track changes) when its text is ready;\n * 4. an error with Retry when storing or parsing fails.\n *\n * Needs `<ArbiProvider>` + React Query. The host imports the editor stylesheet\n * (`@mdxeditor/editor/style.css`) and defines the global `Prism` in a module it imports at app\n * start (see the Artifacts section of docs/design/blocks-package.md).\n *\n * ```tsx\n * const task = useConnectedAiTask()\n * <StreamedArtifact artifacts={task.artifacts} workspaceId={workspaceId} busy={task.status === 'running'} error={task.error} />\n * ```\n */\nexport function StreamedArtifact({\n artifacts,\n workspaceId,\n busy,\n error = null,\n stepCount,\n busyHint,\n emptyHint,\n className,\n testId = 'streamed-artifact',\n configId,\n parseRetry,\n clean,\n editorProps,\n onSaved,\n onSaveError,\n actions,\n hideDefaultActions,\n labels,\n testIds,\n}: StreamedArtifactProps) {\n const streamed = useStreamedArtifact({\n artifacts,\n workspaceId,\n settled: !busy && !error,\n configId,\n parseRetry,\n clean,\n })\n const canvas = (\n <ArtifactCanvas\n artifacts={artifacts}\n className={streamed.phase === 'streaming' ? className : undefined}\n busy={busy}\n busyHint={busyHint}\n stepCount={stepCount}\n error={error}\n emptyHint={emptyHint}\n />\n )\n return (\n <StreamedArtifactFrame\n phase={streamed.phase}\n canvas={canvas}\n className={className}\n error={streamed.error?.message}\n onRetry={streamed.retry}\n labels={labels}\n testIds={{ preparing: `${testId}-preparing`, error: `${testId}-error`, ...testIds }}\n >\n <Suspense fallback={canvas}>\n {streamed.docId && (\n <StreamedArtifactEditor\n key={streamed.docId}\n workspaceId={workspaceId}\n docId={streamed.docId}\n title={streamed.artifact?.title ?? 'Draft'}\n testId={testId}\n className={className}\n editorProps={editorProps}\n onSaved={onSaved}\n onSaveError={onSaveError}\n actions={actions}\n hideDefaultActions={hideDefaultActions}\n />\n )}\n </Suspense>\n </StreamedArtifactFrame>\n )\n}\n","import {\n useShellWorkspaces,\n useWorkspaces,\n type ShellWorkspaceSource,\n type UseShellWorkspacesOptions,\n type UseShellWorkspacesResult,\n} from '@arbidocs/react'\nimport { useConnection } from './ConnectionProvider'\n\nexport type UseConnectedShellWorkspacesOptions = Omit<\n UseShellWorkspacesOptions,\n 'workspaces' | 'isLoading' | 'loadError' | 'selectedId' | 'select'\n>\n\n/**\n * `useShellWorkspaces` wired to the connection layer: the account's live workspaces, the\n * connection's single selection as the active workspace, and `open` = `setWorkspace` (opens it on\n * the server, remembers it for the next login) then `onOpened`.\n *\n * ```tsx\n * const { active, recent, open } = useConnectedShellWorkspaces({\n * seed: { workspaces: demoWorkspaces, activeId: 'demo-1' },\n * onOpened: () => navigate('/app/documents'),\n * })\n * ```\n */\nexport function useConnectedShellWorkspaces(\n options: UseConnectedShellWorkspacesOptions = {}\n): UseShellWorkspacesResult {\n const { workspaceId, setWorkspace } = useConnection()\n const query = useWorkspaces()\n return useShellWorkspaces({\n ...options,\n workspaces: Array.isArray(query.data) ? (query.data as ShellWorkspaceSource[]) : undefined,\n isLoading: query.isLoading,\n loadError: query.error,\n selectedId: workspaceId,\n select: (workspace) => setWorkspace(workspace.id),\n })\n}\n","/**\n * The account area of a settings page, bound to the ARBI SDK: each section is a blocks part wired\n * to its `@arbidocs/react` hook, so a host drops them in a `SettingsPanel` and owns only the\n * layout (see the \"Settings page recipe\" in docs/design/blocks-package.md).\n *\n * Every section takes an optional `notify` for toasts and renders the default test ids of its\n * part. Anything the hooks cannot know (the recovery-key download, the billing link of a blocked\n * deletion, the password policy) is a prop.\n */\nimport { useMemo, useState, type ReactNode } from 'react'\nimport { KeyRound, Radio, UserCircle } from 'lucide-react'\nimport {\n ImageCropModal,\n useAvatarCrop,\n useConfirmEmailChange,\n useCurrentSessionId,\n useDeleteAccount,\n useDeleteAccountFlow,\n useEmailChange,\n useLogoutAllSessions,\n useNameEditor,\n useNotificationPreferences,\n usePasswordChange,\n usePasswordChangeForm,\n useProfile,\n useRequestEmailChange,\n useSessions,\n useTerminateSession,\n useUpdateProfile,\n useWorkspaces,\n type AvatarFileProblem,\n type PasswordChangeResult,\n} from '@arbidocs/react'\nimport { Button } from '@arbidocs/react/ui'\nimport { initials } from '../lib/format'\nimport { AvatarPicker } from '../settings/AvatarPicker'\nimport { ProfileCard } from '../settings/ProfileCard'\nimport {\n SettingsActionRow,\n SettingsCard,\n SettingsDangerZone,\n SettingsRow,\n SettingsSection,\n} from '../settings/SettingsPanel'\nimport { PasswordChangeDialog } from '../settings/PasswordChangeDialog'\nimport { ActiveSessionsDialog, DeleteAccountDialog } from '../settings/AccountDialogs'\nimport { LogoutDialog } from '../settings/LogoutDialog'\nimport { NotificationCategoryList } from '../settings/NotificationCategoryList'\nimport {\n EMAIL_NOTIFICATION_CATEGORIES,\n EMAIL_NOTIFICATION_KEYS,\n toActiveSessionViews,\n toDeleteBlockerViews,\n toLogoutSessionViews,\n toNotificationCategories,\n type EmailNotificationCategoryDef,\n} from '../settings/account-views'\nimport { useConnection } from './ConnectionProvider'\n\nexport type SettingsNotify = (message: string, kind: 'success' | 'error') => void\n\n/** The error text of a failed call: the backend `detail` when it sent one. */\nfunction errorText(error: unknown, fallback: string): string {\n const body = (error as { apiError?: { detail?: unknown } } | null)?.apiError\n return typeof body?.detail === 'string' ? body.detail : fallback\n}\n\nconst AVATAR_PROBLEMS: Record<AvatarFileProblem, string> = {\n 'not-image': 'Please choose an image file',\n 'too-large': 'Image must be 5 MB or smaller',\n unreadable: \"Couldn't read that image — try a different file\",\n}\n\n// ── Profile ─────────────────────────────────────────────────────────────────\n\nexport interface ConnectedProfileCardProps {\n notify?: SettingsNotify\n /** Section heading; default `Profile`. */\n title?: ReactNode\n}\n\n/** Avatar, editable name and email change of the signed-in user (`ProfileCard`). */\nexport function ConnectedProfileCard({ notify, title = 'Profile' }: ConnectedProfileCardProps) {\n const { data: profile } = useProfile()\n const updateProfile = useUpdateProfile()\n const requestEmailChange = useRequestEmailChange()\n const confirmEmailChange = useConfirmEmailChange()\n const { user } = useConnection()\n\n const name = useNameEditor({\n givenName: profile?.givenName,\n familyName: profile?.familyName,\n save: async (next) => {\n try {\n await updateProfile.mutateAsync(next)\n notify?.('Name updated', 'success')\n } catch (e) {\n notify?.('Failed to update name', 'error')\n throw e\n }\n },\n })\n const avatar = useAvatarCrop({\n upload: async (picture) => {\n try {\n await updateProfile.mutateAsync({ picture })\n notify?.('Profile picture updated', 'success')\n } catch (e) {\n notify?.('Failed to update picture', 'error')\n throw e\n }\n },\n onProblem: (problem) => notify?.(AVATAR_PROBLEMS[problem], 'error'),\n })\n const email = useEmailChange({\n requestCode: async (address) => {\n try {\n await requestEmailChange.mutateAsync(address)\n notify?.('Verification code sent to your new email', 'success')\n } catch (e) {\n notify?.(errorText(e, 'Failed to send verification code'), 'error')\n throw e\n }\n },\n confirm: async (args) => {\n try {\n await confirmEmailChange.mutateAsync(args)\n notify?.('Email address updated', 'success')\n } catch (e) {\n notify?.(errorText(e, 'Invalid or expired verification code'), 'error')\n throw e\n }\n },\n })\n\n const display = profile?.fullName || user?.name || 'Unnamed'\n return (\n <SettingsSection icon={<UserCircle />} title={title}>\n <ProfileCard\n avatar={\n <>\n <AvatarPicker\n pictureUrl={profile?.picture ?? user?.picture}\n initials={initials(display)}\n fallbackClassName=\"bg-primary text-primary-foreground\"\n isUploading={avatar.isUploading}\n onFileChosen={avatar.onFileChosen}\n />\n <ImageCropModal\n open={avatar.pendingImage !== null}\n image={avatar.pendingImage}\n title=\"Crop your photo\"\n aspect={1}\n cropShape=\"round\"\n output={{ maxSize: 128, mimeType: 'image/jpeg', quality: 0.85 }}\n onComplete={avatar.onCropComplete}\n onCancel={avatar.onCropCancel}\n />\n </>\n }\n name={{ ...name, display, isSaving: name.isSaving }}\n email={profile?.email ?? user?.email ?? ''}\n isSso={profile?.isSso ?? false}\n onStartEmailChange={email.onStart}\n emailChange={email.isOpen ? email : undefined}\n />\n </SettingsSection>\n )\n}\n\n// ── Security: password ──────────────────────────────────────────────────────\n\n/** The default password policy: 8 characters, an uppercase letter or symbol, a digit. */\nexport function defaultUnmetPasswordRequirement(password: string): string | null {\n if (password.length < 8) return 'Minimum 8 characters'\n if (!/[A-Z!@#$%^&*()_+\\-=[\\]{};':\"\\\\|,.<>/?]/.test(password)) {\n return 'At least one uppercase letter or special character'\n }\n if (!/[0-9]/.test(password)) return 'At least one number'\n return null\n}\n\nexport interface ConnectedSecuritySectionProps {\n notify?: SettingsNotify\n /** The host's password policy; default is {@link defaultUnmetPasswordRequirement}. */\n getUnmetRequirement?: (password: string) => string | null\n /** The recovery-key download for the key the new password produced (shown on success). */\n renderRecoveryKey?: (result: PasswordChangeResult) => ReactNode\n /** Extra rows under \"Change password\" (e.g. \"Save recovery key\"). */\n children?: ReactNode\n}\n\n/** The Security card: \"Change password\" and the dialog behind it (`PasswordChangeDialog`). */\nexport function ConnectedSecuritySection({\n notify,\n getUnmetRequirement = defaultUnmetPasswordRequirement,\n renderRecoveryKey,\n children,\n}: ConnectedSecuritySectionProps) {\n const [open, setOpen] = useState(false)\n const change = usePasswordChange()\n // Only workspaces the user belongs to are re-keyed.\n const { data: workspaces } = useWorkspaces({ enabled: open })\n const workspaceCount = (workspaces ?? []).filter((w) => w.is_member).length\n const form = usePasswordChangeForm<PasswordChangeResult>({\n getUnmetRequirement,\n submit: async (vars) => {\n const result = await change.mutateAsync(vars)\n notify?.('Password changed successfully', 'success')\n return result\n },\n onClose: () => setOpen(false),\n })\n\n return (\n <SettingsSection icon={<KeyRound />} title=\"Security\">\n <SettingsCard padding=\"sm\">\n <SettingsActionRow\n title=\"Change password\"\n description=\"Used to sign in and to encrypt your data. Changing it re-encrypts everything in your account.\"\n onClick={() => setOpen(true)}\n testId=\"change-password-button\"\n />\n {children}\n </SettingsCard>\n <PasswordChangeDialog\n open={open}\n onClose={form.onCancel}\n recoveryMode={false}\n currentPassword={form.currentPassword}\n onCurrentPasswordChange={form.onCurrentPasswordChange}\n newPassword={form.newPassword}\n onNewPasswordChange={form.onNewPasswordChange}\n confirmPassword={form.confirmPassword}\n onConfirmPasswordChange={form.onConfirmPasswordChange}\n getUnmetRequirement={getUnmetRequirement}\n workspaceCount={workspaceCount}\n error={form.error}\n isProcessing={form.isProcessing}\n isSubmitDisabled={form.isSubmitDisabled}\n onSubmit={form.onSubmit}\n success={form.result ? (renderRecoveryKey?.(form.result) ?? <></>) : null}\n onDone={form.onDone}\n />\n </SettingsSection>\n )\n}\n\n// ── Notifications ───────────────────────────────────────────────────────────\n\nexport interface ConnectedNotificationPreferencesProps {\n /** Categories to offer; default {@link EMAIL_NOTIFICATION_CATEGORIES}. */\n categories?: readonly EmailNotificationCategoryDef[]\n title?: ReactNode\n}\n\n/** The email-notification switches (`NotificationCategoryList`) over the user settings. */\nexport function ConnectedNotificationPreferences({\n categories = EMAIL_NOTIFICATION_CATEGORIES,\n title = 'Notifications',\n}: ConnectedNotificationPreferencesProps) {\n const keys = useMemo(\n () =>\n categories === EMAIL_NOTIFICATION_CATEGORIES\n ? EMAIL_NOTIFICATION_KEYS\n : categories.map((c) => c.key),\n [categories]\n )\n const prefs = useNotificationPreferences(keys)\n return (\n <SettingsSection title={title}>\n <SettingsCard className=\"space-y-0\">\n <NotificationCategoryList\n masterId=\"emailNotifications\"\n masterTitle=\"Email Notifications\"\n masterDescription=\"Email me about activity when I’m away\"\n masterChecked={prefs.masterChecked}\n onMasterChange={prefs.setAll}\n categories={toNotificationCategories(prefs.checked, categories)}\n onCategoryChange={prefs.setCategory}\n />\n </SettingsCard>\n </SettingsSection>\n )\n}\n\n// ── Sessions ────────────────────────────────────────────────────────────────\n\nexport interface ConnectedSessionsRowProps {\n notify?: SettingsNotify\n /** Ask before ending a session; resolve `false` to cancel. Default: end at once. */\n confirm?: (message: string) => Promise<boolean> | boolean\n /** Glyph per session status. */\n renderSessionIcon?: (status: string) => ReactNode\n}\n\n/** \"Active sessions\" row with the manage dialog (`ActiveSessionsDialog`); end any but this device. */\nexport function ConnectedSessionsRow({\n notify,\n confirm,\n renderSessionIcon,\n}: ConnectedSessionsRowProps) {\n const [open, setOpen] = useState(false)\n const sessions = useSessions({ enabled: open })\n const currentSessionId = useCurrentSessionId()\n const terminate = useTerminateSession()\n const views = toActiveSessionViews(sessions.data ?? [], {\n currentSessionId,\n terminatingId: terminate.isPending ? terminate.variables : null,\n renderIcon: renderSessionIcon,\n })\n return (\n <>\n <SettingsRow\n label=\"Active sessions\"\n description=\"Devices and agents currently signed in to your account.\"\n >\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => setOpen(true)}\n className=\"flex items-center gap-2\"\n data-testid=\"active-sessions-button\"\n >\n <Radio className=\"h-4 w-4\" />\n Manage\n </Button>\n </SettingsRow>\n <ActiveSessionsDialog\n open={open}\n onOpenChange={setOpen}\n isLoading={sessions.isLoading}\n sessions={views}\n onTerminate={(id) => {\n void (async () => {\n const view = views.find((v) => v.id === id)\n const label = view?.detail.split(' · ')[0]\n const ok =\n (await confirm?.(\n `End the session on ${label}? It will be signed out immediately.`\n )) ?? true\n if (!ok) return\n try {\n await terminate.mutateAsync(id)\n } catch {\n notify?.('Failed to end session. Please try again.', 'error')\n }\n })()\n }}\n />\n </>\n )\n}\n\nexport interface ConnectedLogoutDialogProps {\n open: boolean\n onClose: () => void\n isOnline?: boolean\n renderSessionIcon?: (status: string) => ReactNode\n}\n\n/** Sign out of this device or all devices (`LogoutDialog`), listing the active sessions. */\nexport function ConnectedLogoutDialog({\n open,\n onClose,\n isOnline = true,\n renderSessionIcon,\n}: ConnectedLogoutDialogProps) {\n const { logout } = useConnection()\n const sessions = useSessions({ enabled: open })\n const logoutAll = useLogoutAllSessions()\n return (\n <LogoutDialog\n open={open}\n onClose={onClose}\n onLogoutThis={() => {\n onClose()\n logout()\n }}\n onLogoutAll={() => {\n onClose()\n // The server drops every session first; the connection then forgets this one.\n void logoutAll.mutateAsync().finally(logout)\n }}\n canLogoutAll\n isOnline={isOnline}\n sessions={toLogoutSessionViews(sessions.data ?? [])}\n renderSessionIcon={renderSessionIcon}\n />\n )\n}\n\n// ── Danger zone ─────────────────────────────────────────────────────────────\n\nexport interface ConnectedDangerZoneProps {\n notify?: SettingsNotify\n /** Link to the billing page for a deletion blocked by an active subscription. */\n renderSubscriptionLink?: () => ReactNode\n}\n\n/** \"Delete your account\": the collapsed danger zone and the two-step dialog (`DeleteAccountDialog`). */\nexport function ConnectedDangerZone({ notify, renderSubscriptionLink }: ConnectedDangerZoneProps) {\n const [zoneOpen, setZoneOpen] = useState(false)\n const [dialogOpen, setDialogOpen] = useState(false)\n const { user, logout } = useConnection()\n const remove = useDeleteAccount()\n const flow = useDeleteAccountFlow({\n userEmail: user?.email ?? '',\n remove: () => remove.mutateAsync(),\n onClose: () => setDialogOpen(false),\n onDeleted: logout,\n onError: () => notify?.('Failed to delete account. Please try again.', 'error'),\n })\n return (\n <>\n <SettingsDangerZone\n isOpen={zoneOpen}\n onToggle={() => setZoneOpen((o) => !o)}\n title=\"Delete your account\"\n description=\"Once deleted, your account will be immediately closed and you will be logged out. This action cannot be undone.\"\n action={\n <Button\n variant=\"destructive\"\n size=\"sm\"\n disabled={!user?.email}\n onClick={() => setDialogOpen(true)}\n data-testid=\"delete-account-button\"\n >\n Delete Account\n </Button>\n }\n />\n <DeleteAccountDialog\n open={dialogOpen}\n onClose={flow.onClose}\n step={flow.step}\n blockers={toDeleteBlockerViews(flow.blockers, renderSubscriptionLink)}\n onContinue={flow.onContinue}\n onBack={flow.onBack}\n userEmail={user?.email ?? ''}\n confirmEmail={flow.confirmEmail}\n onConfirmEmailChange={flow.onConfirmEmailChange}\n isDeleting={flow.isDeleting}\n onSubmit={flow.onSubmit}\n />\n </>\n )\n}\n","import { useEffect } from 'react'\nimport { useQuery, useQueryClient } from '@tanstack/react-query'\nimport { useArbi, useArbiWebSocket, notify, type AppNotification } from '@arbidocs/react'\nimport { useNotify } from '@arbidocs/react/shell'\nimport { useConnection } from './ConnectionProvider'\n\n/** Bridge persisted document mentions to the shared bell; hosts own routing. */\nexport function useConnectedDocxNotifications(\n onOpen: (target: {\n workspaceId: string\n documentId: string\n commentId: string\n }) => void | Promise<void>\n) {\n const arbi = useArbi()\n const { status, user, apiUrl } = useConnection()\n const queries = useQueryClient()\n const source = `docx-mentions:${apiUrl}:${user?.externalId || ''}`\n const queryKey = ['docx-mentions', apiUrl, user?.externalId]\n const { data = [] } = useQuery({\n queryKey,\n queryFn: () => arbi.notifications.list('docx_mention'),\n enabled: status === 'authenticated',\n refetchInterval: 30_000,\n })\n useArbiWebSocket((message) => {\n if (message.type === 'docx_mention') void queries.invalidateQueries({ queryKey })\n })\n useEffect(() => {\n const items: AppNotification[] = []\n if (status === 'authenticated')\n for (const note of data) {\n if (note.recipient.external_id !== user?.externalId || !note.workspace_ext_id) continue\n try {\n const target = JSON.parse(note.content || '{}') as {\n document_id?: string\n comment_id?: string\n }\n if (!target.document_id?.startsWith('doc-') || !target.comment_id) continue\n const documentId = target.document_id,\n commentId = target.comment_id,\n workspaceId = note.workspace_ext_id\n items.push({\n id: `docx:${note.external_id}`,\n title: 'Mentioned you in a document comment',\n description: [note.sender.given_name, note.sender.family_name]\n .filter(Boolean)\n .join(' '),\n variant: 'info',\n ts: Date.parse(note.created_at),\n read: note.read,\n source,\n onSelect: () => {\n void Promise.resolve(onOpen({ documentId, commentId, workspaceId })).catch((error) =>\n notify.error(\n error instanceof Error ? error.message : 'Could not open the document.'\n )\n )\n },\n })\n } catch {\n /* Ignore invalid legacy payloads. */\n }\n }\n useNotify.getState().syncSource(source, items)\n return () => useNotify.getState().syncSource(source, [])\n }, [data, status, user?.externalId, source, onOpen])\n const markRead = async (ids: string[]) => {\n try {\n await arbi.notifications.markRead(ids)\n await queries.invalidateQueries({ queryKey })\n } catch {\n notify.error('Could not mark document mentions read.')\n }\n }\n return {\n onMarkRead: (id: string) => {\n if (id.startsWith('docx:')) void markRead([id.slice(5)])\n },\n onMarkAllRead: () => {\n void markRead(\n data\n .filter((note) => !note.read && note.recipient.external_id === user?.externalId)\n .map((note) => note.external_id)\n )\n },\n }\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../../src/connection/ArbiAppProvider.tsx","../../src/connection/ConnectedTaskAccessRequest.tsx","../../src/connection/ConnectedSkillUpload.tsx","../../src/connection/StreamedArtifact.tsx","../../src/connection/useConnectedShellWorkspaces.ts","../../src/connection/ConnectedSettings.tsx","../../src/connection/useConnectedDocxNotifications.ts","../../src/connection/useConnectedWorkNotifications.ts","../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AAA,YACV,OAAA,EAAS,MAAM,KAAA,CAAM,MAAA,CAAO,OAAO,CAAA;AAAA,YACnC,aAAA,EAAY,mBAAA;AAAA,YAEX,QAAA,EAAA,KAAA,CAAM,YAAY,mBAAA,GAAiB;AAAA;AAAA;AACtC,OAAA,EAEJ;AAAA,KAAA,EACF,CAAA;AAAA,IACC,KAAA,oBACCH,GAAAA,CAAC,GAAA,EAAA,EAAE,MAAK,OAAA,EAAQ,SAAA,EAAU,0BAAA,EACvB,QAAA,EAAA,KAAA,CAAM,OAAA,EACT,CAAA;AAAA,IAED,KAAA,oBACCA,GAAAA,CAAC,UAAA,EAAA,EAA6C,OAAA,EAAkB,eAA/C,CAAA,EAAG,OAAO,CAAA,CAAA,EAAI,WAAW,CAAA,CAAgD;AAAA,GAAA,EAE9F,CAAA;AAEJ","file":"index.js","sourcesContent":["/**\n * Composition root for a host app on the ARBI React SDK.\n *\n * QueryClientProvider → react-query cache shared with the SDK\n * ArbiProvider → the SDK's Arbi instance (no network until login)\n * ConnectionProvider → demo/live auth + workspace layer\n *\n * With no live `apiUrl`, ArbiProvider is still mounted (cheap, inert) against\n * `demoApiUrl` and the app runs entirely in seeded demo mode.\n */\nimport { useState, type ReactNode } from 'react'\nimport { QueryClient, QueryClientProvider } from '@tanstack/react-query'\nimport { ArbiProvider, ArbiWebSocketProvider } from '@arbidocs/react'\nimport { ConnectionProvider, useConnection } from './ConnectionProvider'\nimport type { ArbiConnectionConfig } from './types'\n\n/**\n * Opens the shared SDK WebSocket once the app is live-authenticated (demo /\n * logged-out sessions have no backend, so they stay disconnected). Lives inside\n * ConnectionProvider so it can read the live status.\n */\nfunction ConnectionBoundWebSocket({ children }: { children: ReactNode }) {\n const { status } = useConnection()\n return (\n <ArbiWebSocketProvider enabled={status === 'authenticated'}>{children}</ArbiWebSocketProvider>\n )\n}\n\nexport function ArbiAppProvider({\n config,\n children,\n}: {\n config: ArbiConnectionConfig\n children: ReactNode\n}) {\n const [queryClient] = useState(\n () =>\n new QueryClient({\n defaultOptions: { queries: { staleTime: 30_000, retry: 1, refetchOnWindowFocus: false } },\n })\n )\n\n const providerUrl = config.apiUrl || config.demoApiUrl || 'https://demo.arbi.local'\n\n return (\n <QueryClientProvider client={queryClient}>\n <ArbiProvider url={providerUrl}>\n <ConnectionProvider config={config}>\n <ConnectionBoundWebSocket>{children}</ConnectionBoundWebSocket>\n </ConnectionProvider>\n </ArbiProvider>\n </QueryClientProvider>\n )\n}\n","import { useConversations, useRunConversation } from '@arbidocs/react'\nimport { Button } from '@arbidocs/react/ui'\nimport { useConnection } from './ConnectionProvider'\n\n/** Approval for a parked agent run, scoped to the currently selected task. */\nexport function ConnectedTaskAccessRequest({ conversationId }: { conversationId?: string }) {\n const { workspaceId } = useConnection()\n const tasks = useConversations(workspaceId ?? undefined, { live: true })\n const run = useRunConversation()\n const task = tasks.data?.find((item) => item.external_id === conversationId)\n if (!task?.pending_auth_request_id || !task.is_owner) return null\n return (\n <section\n className=\"flex flex-wrap items-center gap-3 rounded-lg border bg-card p-3\"\n data-testid=\"task-chat-access-request\"\n >\n <p className=\"flex-1 text-sm\">This task is waiting for temporary workspace access.</p>\n <Button\n disabled={run.isPending}\n onClick={() => run.mutate(task.external_id)}\n data-testid=\"task-chat-allow-access\"\n >\n {run.isPending ? 'Allowing access…' : 'Allow access and run'}\n </Button>\n {run.error && (\n <p role=\"alert\" className=\"w-full text-sm text-destructive\">\n {run.error.message}\n </p>\n )}\n </section>\n )\n}\n","import { useState } from 'react'\nimport { useUploadSkillFiles } from '@arbidocs/react'\nimport { Button, Input, Label } from '@arbidocs/react/ui'\n\n/** Import a main skill file; uploaded skills appear in the shared skill launcher. */\nexport function ConnectedSkillUpload() {\n const [name, setName] = useState('')\n const [file, setFile] = useState<File | null>(null)\n const upload = useUploadSkillFiles()\n const slug = name\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9_-]+/g, '-')\n .replace(/^-+|-+$/g, '')\n return (\n <section className=\"space-y-3 rounded-lg border p-4\" data-testid=\"skill-upload\">\n <h2 className=\"text-sm font-semibold\">Add a skill</h2>\n <p className=\"text-xs text-muted-foreground\">\n Upload a SKILL.md file containing the instructions your assistant should follow.\n </p>\n <Label htmlFor=\"skill-upload-name\">Skill name</Label>\n <Input\n id=\"skill-upload-name\"\n value={name}\n onChange={(event) => setName(event.target.value)}\n placeholder=\"disclosure-review\"\n data-testid=\"skill-upload-name\"\n />\n <Input\n type=\"file\"\n accept=\".md\"\n aria-label=\"Skill instructions file\"\n onChange={(event) => setFile(event.target.files?.[0] ?? null)}\n data-testid=\"skill-upload-file\"\n />\n <Button\n disabled={!slug || !file || upload.isPending}\n onClick={() =>\n file && upload.mutate([{ folder: `skills/${slug}`, fileName: 'SKILL.md', content: file }])\n }\n data-testid=\"skill-upload-submit\"\n >\n {upload.isPending ? 'Uploading…' : 'Upload skill'}\n </Button>\n {upload.isSuccess && (\n <p role=\"status\" className=\"text-sm\">\n Uploaded. The skill will appear once processing finishes.\n </p>\n )}\n {upload.error && (\n <p role=\"alert\" className=\"text-sm text-destructive\">\n {upload.error.message}\n </p>\n )}\n </section>\n )\n}\n","import { lazy, Suspense } from 'react'\nimport { ArtifactCanvas } from '@arbidocs/react'\nimport { useStreamedArtifact, type UseStreamedArtifactOptions } from '@arbidocs/react/artifacts'\nimport {\n StreamedArtifactFrame,\n type StreamedArtifactFrameLabels,\n type StreamedArtifactFrameTestIds,\n} from '../artifacts/StreamedArtifactFrame'\nimport type { ArtifactEvent } from './ai'\nimport type { StreamedArtifactEditorProps } from './StreamedArtifactEditor'\n\n// The editor (MDXEditor, Lexical) stays out of the bundle until a draft is ready to edit.\nconst StreamedArtifactEditor = lazy(() => import('./StreamedArtifactEditor'))\n\nexport interface StreamedArtifactProps\n extends\n Pick<UseStreamedArtifactOptions, 'configId' | 'parseRetry' | 'clean'>,\n Pick<\n StreamedArtifactEditorProps,\n 'editorProps' | 'onSaved' | 'onSaveError' | 'actions' | 'hideDefaultActions'\n > {\n /** The artifacts of the agent run (`useConnectedAiTask().artifacts`). */\n artifacts: ArtifactEvent[]\n workspaceId: string | undefined\n /** The agent is still working: show the live canvas. */\n busy: boolean\n /** The run failed; with no draft the canvas shows it. */\n error?: string | null\n stepCount?: number\n busyHint?: string\n emptyHint?: string\n className?: string\n /** Root test id of the editor; the preparing state is `${testId}-preparing`. */\n testId?: string\n labels?: Partial<StreamedArtifactFrameLabels>\n testIds?: Partial<StreamedArtifactFrameTestIds>\n}\n\n/**\n * An agent-drafted artifact from stream to editor, in one part. Pass the run's `artifacts` and\n * whether it is `busy`; it shows\n *\n * 1. the live `ArtifactCanvas` while the agent streams;\n * 2. \"Preparing editor...\" (the canvas stays readable underneath) while the finished draft is\n * cleaned (`cleanDraftMarkdown`), stored as version 1 of the artifact (`wpType: 'artifact'`)\n * and parsed by the backend, which can take up to about a minute;\n * 3. `ArtifactEditor` on the stored version (edit, save a new version, version list, compare\n * with track changes) when its text is ready;\n * 4. an error with Retry when storing or parsing fails.\n *\n * Needs `<ArbiProvider>` + React Query. The host imports the editor stylesheet\n * (`@mdxeditor/editor/style.css`) and defines the global `Prism` in a module it imports at app\n * start (see the Artifacts section of docs/design/blocks-package.md).\n *\n * ```tsx\n * const task = useConnectedAiTask()\n * <StreamedArtifact artifacts={task.artifacts} workspaceId={workspaceId} busy={task.status === 'running'} error={task.error} />\n * ```\n */\nexport function StreamedArtifact({\n artifacts,\n workspaceId,\n busy,\n error = null,\n stepCount,\n busyHint,\n emptyHint,\n className,\n testId = 'streamed-artifact',\n configId,\n parseRetry,\n clean,\n editorProps,\n onSaved,\n onSaveError,\n actions,\n hideDefaultActions,\n labels,\n testIds,\n}: StreamedArtifactProps) {\n const streamed = useStreamedArtifact({\n artifacts,\n workspaceId,\n settled: !busy && !error,\n configId,\n parseRetry,\n clean,\n })\n const canvas = (\n <ArtifactCanvas\n artifacts={artifacts}\n className={streamed.phase === 'streaming' ? className : undefined}\n busy={busy}\n busyHint={busyHint}\n stepCount={stepCount}\n error={error}\n emptyHint={emptyHint}\n />\n )\n return (\n <StreamedArtifactFrame\n phase={streamed.phase}\n canvas={canvas}\n className={className}\n error={streamed.error?.message}\n onRetry={streamed.retry}\n labels={labels}\n testIds={{ preparing: `${testId}-preparing`, error: `${testId}-error`, ...testIds }}\n >\n <Suspense fallback={canvas}>\n {streamed.docId && (\n <StreamedArtifactEditor\n key={streamed.docId}\n workspaceId={workspaceId}\n docId={streamed.docId}\n title={streamed.artifact?.title ?? 'Draft'}\n testId={testId}\n className={className}\n editorProps={editorProps}\n onSaved={onSaved}\n onSaveError={onSaveError}\n actions={actions}\n hideDefaultActions={hideDefaultActions}\n />\n )}\n </Suspense>\n </StreamedArtifactFrame>\n )\n}\n","import {\n useShellWorkspaces,\n useWorkspaces,\n type ShellWorkspaceSource,\n type UseShellWorkspacesOptions,\n type UseShellWorkspacesResult,\n} from '@arbidocs/react'\nimport { useConnection } from './ConnectionProvider'\n\nexport type UseConnectedShellWorkspacesOptions = Omit<\n UseShellWorkspacesOptions,\n 'workspaces' | 'isLoading' | 'loadError' | 'selectedId' | 'select'\n>\n\n/**\n * `useShellWorkspaces` wired to the connection layer: the account's live workspaces, the\n * connection's single selection as the active workspace, and `open` = `setWorkspace` (opens it on\n * the server, remembers it for the next login) then `onOpened`.\n *\n * ```tsx\n * const { active, recent, open } = useConnectedShellWorkspaces({\n * seed: { workspaces: demoWorkspaces, activeId: 'demo-1' },\n * onOpened: () => navigate('/app/documents'),\n * })\n * ```\n */\nexport function useConnectedShellWorkspaces(\n options: UseConnectedShellWorkspacesOptions = {}\n): UseShellWorkspacesResult {\n const { workspaceId, setWorkspace } = useConnection()\n const query = useWorkspaces()\n return useShellWorkspaces({\n ...options,\n workspaces: Array.isArray(query.data) ? (query.data as ShellWorkspaceSource[]) : undefined,\n isLoading: query.isLoading,\n loadError: query.error,\n selectedId: workspaceId,\n select: (workspace) => setWorkspace(workspace.id),\n })\n}\n","/**\n * The account area of a settings page, bound to the ARBI SDK: each section is a blocks part wired\n * to its `@arbidocs/react` hook, so a host drops them in a `SettingsPanel` and owns only the\n * layout (see the \"Settings page recipe\" in docs/design/blocks-package.md).\n *\n * Every section takes an optional `notify` for toasts and renders the default test ids of its\n * part. Anything the hooks cannot know (the recovery-key download, the billing link of a blocked\n * deletion, the password policy) is a prop.\n */\nimport { useMemo, useState, type ReactNode } from 'react'\nimport { KeyRound, Radio, UserCircle } from 'lucide-react'\nimport {\n ImageCropModal,\n useAvatarCrop,\n useConfirmEmailChange,\n useCurrentSessionId,\n useDeleteAccount,\n useDeleteAccountFlow,\n useEmailChange,\n useLogoutAllSessions,\n useNameEditor,\n useNotificationPreferences,\n usePasswordChange,\n usePasswordChangeForm,\n useProfile,\n useRequestEmailChange,\n useSessions,\n useTerminateSession,\n useUpdateProfile,\n useWorkspaces,\n type AvatarFileProblem,\n type PasswordChangeResult,\n} from '@arbidocs/react'\nimport { Button } from '@arbidocs/react/ui'\nimport { initials } from '../lib/format'\nimport { AvatarPicker } from '../settings/AvatarPicker'\nimport { ProfileCard } from '../settings/ProfileCard'\nimport {\n SettingsActionRow,\n SettingsCard,\n SettingsDangerZone,\n SettingsRow,\n SettingsSection,\n} from '../settings/SettingsPanel'\nimport { PasswordChangeDialog } from '../settings/PasswordChangeDialog'\nimport { ActiveSessionsDialog, DeleteAccountDialog } from '../settings/AccountDialogs'\nimport { LogoutDialog } from '../settings/LogoutDialog'\nimport { NotificationCategoryList } from '../settings/NotificationCategoryList'\nimport {\n EMAIL_NOTIFICATION_CATEGORIES,\n EMAIL_NOTIFICATION_KEYS,\n toActiveSessionViews,\n toDeleteBlockerViews,\n toLogoutSessionViews,\n toNotificationCategories,\n type EmailNotificationCategoryDef,\n} from '../settings/account-views'\nimport { useConnection } from './ConnectionProvider'\n\nexport type SettingsNotify = (message: string, kind: 'success' | 'error') => void\n\n/** The error text of a failed call: the backend `detail` when it sent one. */\nfunction errorText(error: unknown, fallback: string): string {\n const body = (error as { apiError?: { detail?: unknown } } | null)?.apiError\n return typeof body?.detail === 'string' ? body.detail : fallback\n}\n\nconst AVATAR_PROBLEMS: Record<AvatarFileProblem, string> = {\n 'not-image': 'Please choose an image file',\n 'too-large': 'Image must be 5 MB or smaller',\n unreadable: \"Couldn't read that image — try a different file\",\n}\n\n// ── Profile ─────────────────────────────────────────────────────────────────\n\nexport interface ConnectedProfileCardProps {\n notify?: SettingsNotify\n /** Section heading; default `Profile`. */\n title?: ReactNode\n}\n\n/** Avatar, editable name and email change of the signed-in user (`ProfileCard`). */\nexport function ConnectedProfileCard({ notify, title = 'Profile' }: ConnectedProfileCardProps) {\n const { data: profile } = useProfile()\n const updateProfile = useUpdateProfile()\n const requestEmailChange = useRequestEmailChange()\n const confirmEmailChange = useConfirmEmailChange()\n const { user } = useConnection()\n\n const name = useNameEditor({\n givenName: profile?.givenName,\n familyName: profile?.familyName,\n save: async (next) => {\n try {\n await updateProfile.mutateAsync(next)\n notify?.('Name updated', 'success')\n } catch (e) {\n notify?.('Failed to update name', 'error')\n throw e\n }\n },\n })\n const avatar = useAvatarCrop({\n upload: async (picture) => {\n try {\n await updateProfile.mutateAsync({ picture })\n notify?.('Profile picture updated', 'success')\n } catch (e) {\n notify?.('Failed to update picture', 'error')\n throw e\n }\n },\n onProblem: (problem) => notify?.(AVATAR_PROBLEMS[problem], 'error'),\n })\n const email = useEmailChange({\n requestCode: async (address) => {\n try {\n await requestEmailChange.mutateAsync(address)\n notify?.('Verification code sent to your new email', 'success')\n } catch (e) {\n notify?.(errorText(e, 'Failed to send verification code'), 'error')\n throw e\n }\n },\n confirm: async (args) => {\n try {\n await confirmEmailChange.mutateAsync(args)\n notify?.('Email address updated', 'success')\n } catch (e) {\n notify?.(errorText(e, 'Invalid or expired verification code'), 'error')\n throw e\n }\n },\n })\n\n const display = profile?.fullName || user?.name || 'Unnamed'\n return (\n <SettingsSection icon={<UserCircle />} title={title}>\n <ProfileCard\n avatar={\n <>\n <AvatarPicker\n pictureUrl={profile?.picture ?? user?.picture}\n initials={initials(display)}\n fallbackClassName=\"bg-primary text-primary-foreground\"\n isUploading={avatar.isUploading}\n onFileChosen={avatar.onFileChosen}\n />\n <ImageCropModal\n open={avatar.pendingImage !== null}\n image={avatar.pendingImage}\n title=\"Crop your photo\"\n aspect={1}\n cropShape=\"round\"\n output={{ maxSize: 128, mimeType: 'image/jpeg', quality: 0.85 }}\n onComplete={avatar.onCropComplete}\n onCancel={avatar.onCropCancel}\n />\n </>\n }\n name={{ ...name, display, isSaving: name.isSaving }}\n email={profile?.email ?? user?.email ?? ''}\n isSso={profile?.isSso ?? false}\n onStartEmailChange={email.onStart}\n emailChange={email.isOpen ? email : undefined}\n />\n </SettingsSection>\n )\n}\n\n// ── Security: password ──────────────────────────────────────────────────────\n\n/** The default password policy: 8 characters, an uppercase letter or symbol, a digit. */\nexport function defaultUnmetPasswordRequirement(password: string): string | null {\n if (password.length < 8) return 'Minimum 8 characters'\n if (!/[A-Z!@#$%^&*()_+\\-=[\\]{};':\"\\\\|,.<>/?]/.test(password)) {\n return 'At least one uppercase letter or special character'\n }\n if (!/[0-9]/.test(password)) return 'At least one number'\n return null\n}\n\nexport interface ConnectedSecuritySectionProps {\n notify?: SettingsNotify\n /** The host's password policy; default is {@link defaultUnmetPasswordRequirement}. */\n getUnmetRequirement?: (password: string) => string | null\n /** The recovery-key download for the key the new password produced (shown on success). */\n renderRecoveryKey?: (result: PasswordChangeResult) => ReactNode\n /** Extra rows under \"Change password\" (e.g. \"Save recovery key\"). */\n children?: ReactNode\n}\n\n/** The Security card: \"Change password\" and the dialog behind it (`PasswordChangeDialog`). */\nexport function ConnectedSecuritySection({\n notify,\n getUnmetRequirement = defaultUnmetPasswordRequirement,\n renderRecoveryKey,\n children,\n}: ConnectedSecuritySectionProps) {\n const [open, setOpen] = useState(false)\n const change = usePasswordChange()\n // Only workspaces the user belongs to are re-keyed.\n const { data: workspaces } = useWorkspaces({ enabled: open })\n const workspaceCount = (workspaces ?? []).filter((w) => w.is_member).length\n const form = usePasswordChangeForm<PasswordChangeResult>({\n getUnmetRequirement,\n submit: async (vars) => {\n const result = await change.mutateAsync(vars)\n notify?.('Password changed successfully', 'success')\n return result\n },\n onClose: () => setOpen(false),\n })\n\n return (\n <SettingsSection icon={<KeyRound />} title=\"Security\">\n <SettingsCard padding=\"sm\">\n <SettingsActionRow\n title=\"Change password\"\n description=\"Used to sign in and to encrypt your data. Changing it re-encrypts everything in your account.\"\n onClick={() => setOpen(true)}\n testId=\"change-password-button\"\n />\n {children}\n </SettingsCard>\n <PasswordChangeDialog\n open={open}\n onClose={form.onCancel}\n recoveryMode={false}\n currentPassword={form.currentPassword}\n onCurrentPasswordChange={form.onCurrentPasswordChange}\n newPassword={form.newPassword}\n onNewPasswordChange={form.onNewPasswordChange}\n confirmPassword={form.confirmPassword}\n onConfirmPasswordChange={form.onConfirmPasswordChange}\n getUnmetRequirement={getUnmetRequirement}\n workspaceCount={workspaceCount}\n error={form.error}\n isProcessing={form.isProcessing}\n isSubmitDisabled={form.isSubmitDisabled}\n onSubmit={form.onSubmit}\n success={form.result ? (renderRecoveryKey?.(form.result) ?? <></>) : null}\n onDone={form.onDone}\n />\n </SettingsSection>\n )\n}\n\n// ── Notifications ───────────────────────────────────────────────────────────\n\nexport interface ConnectedNotificationPreferencesProps {\n /** Categories to offer; default {@link EMAIL_NOTIFICATION_CATEGORIES}. */\n categories?: readonly EmailNotificationCategoryDef[]\n title?: ReactNode\n}\n\n/** The email-notification switches (`NotificationCategoryList`) over the user settings. */\nexport function ConnectedNotificationPreferences({\n categories = EMAIL_NOTIFICATION_CATEGORIES,\n title = 'Notifications',\n}: ConnectedNotificationPreferencesProps) {\n const keys = useMemo(\n () =>\n categories === EMAIL_NOTIFICATION_CATEGORIES\n ? EMAIL_NOTIFICATION_KEYS\n : categories.map((c) => c.key),\n [categories]\n )\n const prefs = useNotificationPreferences(keys)\n return (\n <SettingsSection title={title}>\n <SettingsCard className=\"space-y-0\">\n <NotificationCategoryList\n masterId=\"emailNotifications\"\n masterTitle=\"Email Notifications\"\n masterDescription=\"Email me about activity when I’m away\"\n masterChecked={prefs.masterChecked}\n onMasterChange={prefs.setAll}\n categories={toNotificationCategories(prefs.checked, categories)}\n onCategoryChange={prefs.setCategory}\n />\n </SettingsCard>\n </SettingsSection>\n )\n}\n\n// ── Sessions ────────────────────────────────────────────────────────────────\n\nexport interface ConnectedSessionsRowProps {\n notify?: SettingsNotify\n /** Ask before ending a session; resolve `false` to cancel. Default: end at once. */\n confirm?: (message: string) => Promise<boolean> | boolean\n /** Glyph per session status. */\n renderSessionIcon?: (status: string) => ReactNode\n}\n\n/** \"Active sessions\" row with the manage dialog (`ActiveSessionsDialog`); end any but this device. */\nexport function ConnectedSessionsRow({\n notify,\n confirm,\n renderSessionIcon,\n}: ConnectedSessionsRowProps) {\n const [open, setOpen] = useState(false)\n const sessions = useSessions({ enabled: open })\n const currentSessionId = useCurrentSessionId()\n const terminate = useTerminateSession()\n const views = toActiveSessionViews(sessions.data ?? [], {\n currentSessionId,\n terminatingId: terminate.isPending ? terminate.variables : null,\n renderIcon: renderSessionIcon,\n })\n return (\n <>\n <SettingsRow\n label=\"Active sessions\"\n description=\"Devices and agents currently signed in to your account.\"\n >\n <Button\n type=\"button\"\n variant=\"outline\"\n size=\"sm\"\n onClick={() => setOpen(true)}\n className=\"flex items-center gap-2\"\n data-testid=\"active-sessions-button\"\n >\n <Radio className=\"h-4 w-4\" />\n Manage\n </Button>\n </SettingsRow>\n <ActiveSessionsDialog\n open={open}\n onOpenChange={setOpen}\n isLoading={sessions.isLoading}\n sessions={views}\n onTerminate={(id) => {\n void (async () => {\n const view = views.find((v) => v.id === id)\n const label = view?.detail.split(' · ')[0]\n const ok =\n (await confirm?.(\n `End the session on ${label}? It will be signed out immediately.`\n )) ?? true\n if (!ok) return\n try {\n await terminate.mutateAsync(id)\n } catch {\n notify?.('Failed to end session. Please try again.', 'error')\n }\n })()\n }}\n />\n </>\n )\n}\n\nexport interface ConnectedLogoutDialogProps {\n open: boolean\n onClose: () => void\n isOnline?: boolean\n renderSessionIcon?: (status: string) => ReactNode\n}\n\n/** Sign out of this device or all devices (`LogoutDialog`), listing the active sessions. */\nexport function ConnectedLogoutDialog({\n open,\n onClose,\n isOnline = true,\n renderSessionIcon,\n}: ConnectedLogoutDialogProps) {\n const { logout } = useConnection()\n const sessions = useSessions({ enabled: open })\n const logoutAll = useLogoutAllSessions()\n return (\n <LogoutDialog\n open={open}\n onClose={onClose}\n onLogoutThis={() => {\n onClose()\n logout()\n }}\n onLogoutAll={() => {\n onClose()\n // The server drops every session first; the connection then forgets this one.\n void logoutAll.mutateAsync().finally(logout)\n }}\n canLogoutAll\n isOnline={isOnline}\n sessions={toLogoutSessionViews(sessions.data ?? [])}\n renderSessionIcon={renderSessionIcon}\n />\n )\n}\n\n// ── Danger zone ─────────────────────────────────────────────────────────────\n\nexport interface ConnectedDangerZoneProps {\n notify?: SettingsNotify\n /** Link to the billing page for a deletion blocked by an active subscription. */\n renderSubscriptionLink?: () => ReactNode\n}\n\n/** \"Delete your account\": the collapsed danger zone and the two-step dialog (`DeleteAccountDialog`). */\nexport function ConnectedDangerZone({ notify, renderSubscriptionLink }: ConnectedDangerZoneProps) {\n const [zoneOpen, setZoneOpen] = useState(false)\n const [dialogOpen, setDialogOpen] = useState(false)\n const { user, logout } = useConnection()\n const remove = useDeleteAccount()\n const flow = useDeleteAccountFlow({\n userEmail: user?.email ?? '',\n remove: () => remove.mutateAsync(),\n onClose: () => setDialogOpen(false),\n onDeleted: logout,\n onError: () => notify?.('Failed to delete account. Please try again.', 'error'),\n })\n return (\n <>\n <SettingsDangerZone\n isOpen={zoneOpen}\n onToggle={() => setZoneOpen((o) => !o)}\n title=\"Delete your account\"\n description=\"Once deleted, your account will be immediately closed and you will be logged out. This action cannot be undone.\"\n action={\n <Button\n variant=\"destructive\"\n size=\"sm\"\n disabled={!user?.email}\n onClick={() => setDialogOpen(true)}\n data-testid=\"delete-account-button\"\n >\n Delete Account\n </Button>\n }\n />\n <DeleteAccountDialog\n open={dialogOpen}\n onClose={flow.onClose}\n step={flow.step}\n blockers={toDeleteBlockerViews(flow.blockers, renderSubscriptionLink)}\n onContinue={flow.onContinue}\n onBack={flow.onBack}\n userEmail={user?.email ?? ''}\n confirmEmail={flow.confirmEmail}\n onConfirmEmailChange={flow.onConfirmEmailChange}\n isDeleting={flow.isDeleting}\n onSubmit={flow.onSubmit}\n />\n </>\n )\n}\n","import { useEffect } from 'react'\nimport { useQuery, useQueryClient } from '@tanstack/react-query'\nimport { useArbi, useArbiWebSocket, notify, type AppNotification } from '@arbidocs/react'\nimport { useNotify } from '@arbidocs/react/shell'\nimport { useConnection } from './ConnectionProvider'\n\n/** Bridge persisted document mentions to the shared bell; hosts own routing. */\nexport function useConnectedDocxNotifications(\n onOpen: (target: {\n workspaceId: string\n documentId: string\n commentId: string\n }) => void | Promise<void>\n) {\n const arbi = useArbi()\n const { status, user, apiUrl } = useConnection()\n const queries = useQueryClient()\n const source = `docx-mentions:${apiUrl}:${user?.externalId || ''}`\n const queryKey = ['docx-mentions', apiUrl, user?.externalId]\n const { data = [] } = useQuery({\n queryKey,\n queryFn: () => arbi.notifications.list('docx_mention'),\n enabled: status === 'authenticated',\n refetchInterval: 30_000,\n })\n useArbiWebSocket((message) => {\n if (message.type === 'docx_mention') void queries.invalidateQueries({ queryKey })\n })\n useEffect(() => {\n const items: AppNotification[] = []\n if (status === 'authenticated')\n for (const note of data) {\n if (note.recipient.external_id !== user?.externalId || !note.workspace_ext_id) continue\n try {\n const target = JSON.parse(note.content || '{}') as {\n document_id?: string\n comment_id?: string\n }\n if (!target.document_id?.startsWith('doc-') || !target.comment_id) continue\n const documentId = target.document_id,\n commentId = target.comment_id,\n workspaceId = note.workspace_ext_id\n items.push({\n id: `docx:${note.external_id}`,\n title: 'Mentioned you in a document comment',\n description: [note.sender.given_name, note.sender.family_name]\n .filter(Boolean)\n .join(' '),\n variant: 'info',\n ts: Date.parse(note.created_at),\n read: note.read,\n source,\n onSelect: () => {\n void Promise.resolve(onOpen({ documentId, commentId, workspaceId })).catch((error) =>\n notify.error(\n error instanceof Error ? error.message : 'Could not open the document.'\n )\n )\n },\n })\n } catch {\n /* Ignore invalid legacy payloads. */\n }\n }\n useNotify.getState().syncSource(source, items)\n return () => useNotify.getState().syncSource(source, [])\n }, [data, status, user?.externalId, source, onOpen])\n const markRead = async (ids: string[]) => {\n try {\n await arbi.notifications.markRead(ids)\n await queries.invalidateQueries({ queryKey })\n } catch {\n notify.error('Could not mark document mentions read.')\n }\n }\n return {\n onMarkRead: (id: string) => {\n if (id.startsWith('docx:')) void markRead([id.slice(5)])\n },\n onMarkAllRead: () => {\n void markRead(\n data\n .filter((note) => !note.read && note.recipient.external_id === user?.externalId)\n .map((note) => note.external_id)\n )\n },\n }\n}\n","import { useEffect } from 'react'\nimport { useWorkNotifications, notify, type AppNotification } from '@arbidocs/react'\nimport { useNotify } from '@arbidocs/react/shell'\nimport type { components } from '@arbidocs/client'\nimport { useConnection } from './ConnectionProvider'\n\nexport type WorkNotificationTarget =\n | { kind: 'conversation'; workspaceId: string; conversationId: string; messageId?: string }\n | { kind: 'workflow'; workspaceId?: string; workflowId: string }\n\n/** Persisted work notifications in the shared bell; the consumer owns navigation. */\nexport function useConnectedWorkNotifications(\n onOpen: (target: WorkNotificationTarget) => void | Promise<void>\n) {\n const { status, user, apiUrl } = useConnection()\n const source = `work-notifications:${apiUrl}:${user?.externalId || ''}`\n const { data = [], markRead: persistRead } = useWorkNotifications({\n apiUrl,\n userId: user?.externalId,\n enabled: status === 'authenticated',\n })\n useEffect(() => {\n const items: AppNotification[] = []\n if (status === 'authenticated')\n for (const note of data) {\n if (note.recipient.external_id !== user?.externalId) continue\n const mapped = mapWorkNotification(note)\n if (!mapped) continue\n items.push({\n id: `work:${note.external_id}`,\n title: mapped.title,\n variant:\n note.type === 'workflow_failed'\n ? 'error'\n : note.type === 'conversation_done'\n ? 'success'\n : 'info',\n ts: Date.parse(note.created_at),\n read: note.read,\n source,\n onSelect: () => {\n void Promise.resolve()\n .then(() => onOpen(mapped.target))\n .catch((error) =>\n notify.error(\n error instanceof Error ? error.message : 'Could not open this notification.'\n )\n )\n },\n })\n }\n useNotify.getState().syncSource(source, items)\n return () => useNotify.getState().syncSource(source, [])\n }, [data, status, user?.externalId, source, onOpen])\n const markRead = async (ids: string[]) => {\n if (!ids.length) return\n try {\n await persistRead(ids)\n } catch {\n notify.error('Could not mark work notifications read.')\n }\n }\n return {\n onMarkRead: (id: string) => {\n // Only received, currently loaded work rows belong to this source.\n if (\n data.some(\n (note) =>\n `work:${note.external_id}` === id &&\n note.recipient.external_id === user?.externalId &&\n mapWorkNotification(note)\n )\n )\n void markRead([id.slice(5)])\n },\n onMarkAllRead: () => {\n void markRead(\n data\n .filter(\n (note) =>\n !note.read &&\n note.recipient.external_id === user?.externalId &&\n mapWorkNotification(note)\n )\n .map((note) => note.external_id)\n )\n },\n }\n}\n\n/** Route from explicit IDs; encrypted task text is never needed for a link. */\nexport function mapWorkNotification(note: components['schemas']['NotificationResponse']): {\n title: string\n target: WorkNotificationTarget\n} | null {\n const sender =\n [note.sender.given_name, note.sender.family_name].filter(Boolean).join(' ') || note.sender.email\n if (note.type === 'workflow_failed') {\n try {\n const payload = JSON.parse(note.content || '{}') as { workflow_ext_id?: string }\n if (!payload.workflow_ext_id?.match(/^wfl-[a-zA-Z0-9]+$/)) return null\n if (\n note.workspace_ext_id?.match(/^wrk-[a-zA-Z0-9]+$/) &&\n note.conversation_ext_id?.match(/^con-[a-zA-Z0-9]+$/)\n ) {\n return {\n title: 'A workflow failed to run',\n target: {\n kind: 'conversation',\n workspaceId: note.workspace_ext_id,\n conversationId: note.conversation_ext_id,\n },\n }\n }\n return {\n title: 'A workflow failed to run',\n target: {\n kind: 'workflow',\n workflowId: payload.workflow_ext_id,\n workspaceId: note.workspace_ext_id || undefined,\n },\n }\n } catch {\n return null\n }\n }\n const titles: Partial<Record<components['schemas']['NotificationType'], string>> = {\n mention: `${sender} mentioned you in a conversation`,\n workspace_access_request: `${sender} needs workspace access to run a task`,\n conversation_ready_for_review: `${sender} has a task ready for your review`,\n conversation_approval_request: `${sender} asked you to approve a task`,\n conversation_done: `${sender} marked a task done`,\n }\n const title = titles[note.type]\n if (!title || !note.workspace_ext_id || !note.conversation_ext_id?.match(/^con-[a-zA-Z0-9]+$/))\n return null\n return {\n title,\n target: {\n kind: 'conversation',\n workspaceId: note.workspace_ext_id,\n conversationId: note.conversation_ext_id,\n ...(note.message_ext_id ? { messageId: note.message_ext_id } : {}),\n },\n }\n}\n","import {\n useAgentSession,\n useStartAgentSession,\n useCloseAgentSession,\n useArbiChat,\n} from '@arbidocs/react'\nimport { Button } from '@arbidocs/react/ui'\nimport { ChatPage } from '../chat/ChatPage'\n\nexport interface ConnectedAgentChatPanelProps {\n agentId: string\n workspaceId: string\n agentName?: string\n}\n\nfunction ActiveChat({ agentId, workspaceId }: ConnectedAgentChatPanelProps) {\n const chat = useArbiChat({ agentId, workspaceId })\n return (\n <ChatPage\n chat={{ ...chat, assistantMode: undefined, setAssistantMode: undefined }}\n documentsRequired={false}\n compactHeader\n surface=\"dock\"\n emptyTitle=\"What would you like me to do?\"\n emptyDescription=\"This agent works through its own login. Upload files here to stage them in its sandbox.\"\n className=\"h-[min(65vh,650px)] min-h-[380px]\"\n />\n )\n}\n\n/** An owned agent's independent login and chat, using the shared controller and chat surface. */\nexport function ConnectedAgentChatPanel({\n agentId,\n workspaceId,\n agentName = 'Agent',\n}: ConnectedAgentChatPanelProps) {\n const session = useAgentSession(agentId)\n const start = useStartAgentSession()\n const close = useCloseAgentSession()\n const ready = session.data?.active && session.data.workspace_ext_id === workspaceId\n const busy = start.isPending || close.isPending\n const error = start.error ?? close.error ?? session.error\n return (\n <section className=\"space-y-3\" data-testid=\"agent-chat-panel\">\n <div className=\"flex flex-wrap items-center justify-between gap-2\">\n <p className=\"text-sm\" data-testid=\"agent-chat-session-status\">\n {agentName} ·{' '}\n {ready\n ? 'Signed in to this workspace'\n : session.data?.active\n ? `Signed in to ${session.data.workspace_name ?? 'another workspace'}`\n : 'Signed out'}\n </p>\n <div className=\"flex gap-2\">\n {!ready && (\n <Button\n type=\"button\"\n disabled={busy || session.isLoading}\n onClick={() => start.mutate({ agentId, workspaceId })}\n data-testid=\"agent-chat-login\"\n >\n {start.isPending ? 'Signing in…' : 'Sign in here'}\n </Button>\n )}\n {session.data?.active && (\n <Button\n type=\"button\"\n variant=\"outline\"\n disabled={busy}\n onClick={() => close.mutate(agentId)}\n data-testid=\"agent-chat-logout\"\n >\n {close.isPending ? 'Signing out…' : 'Sign out agent'}\n </Button>\n )}\n </div>\n </div>\n {error && (\n <p role=\"alert\" className=\"text-sm text-destructive\">\n {error.message}\n </p>\n )}\n {ready && (\n <ActiveChat key={`${agentId}:${workspaceId}`} agentId={agentId} workspaceId={workspaceId} />\n )}\n </section>\n )\n}\n"]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export interface ConnectedAgentChatPanelProps {
|
|
2
|
+
agentId: string;
|
|
3
|
+
workspaceId: string;
|
|
4
|
+
agentName?: string;
|
|
5
|
+
}
|
|
6
|
+
/** An owned agent's independent login and chat, using the shared controller and chat surface. */
|
|
7
|
+
export declare function ConnectedAgentChatPanel({ agentId, workspaceId, agentName, }: ConnectedAgentChatPanelProps): import("react").JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { type NativeDocxEditorProps } from '../docx/NativeDocxEditor';
|
|
1
|
+
import { type NativeDocxAdapter, type NativeDocxEditorProps } from '../docx/NativeDocxEditor';
|
|
2
2
|
/** Native Word widget bound to the standard blocks connection and SDK session. */
|
|
3
3
|
export declare function ConnectedNativeDocxEditor({ fontBaseUrl, ...props }: Omit<NativeDocxEditorProps, 'adapter'> & {
|
|
4
4
|
fontBaseUrl?: string;
|
|
5
5
|
}): import("react").JSX.Element;
|
|
6
|
+
export declare function useConnectedNativeDocxAdapter(fontBaseUrl?: string): NativeDocxAdapter;
|
package/dist/connection/ai.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ArbiChat, type UseArbiChatOptions, type AiRunOptions } from '@arbidocs/react';
|
|
2
2
|
import { type AssistantDockProps } from '../chat/AssistantDock';
|
|
3
|
+
import type { MentionCandidate } from '../chat/mentions';
|
|
3
4
|
export type { AiTaskStatus, AiRunOptions, SearchChunk, ArtifactEvent } from '@arbidocs/react';
|
|
4
5
|
/** Client-side redlining, re-exported so a host app has one import surface. */
|
|
5
6
|
export { toRedlineMarkdown, redlineStats, textToArtifact } from '@arbidocs/react';
|
|
@@ -106,7 +107,9 @@ export declare function useSemanticSearch(): {
|
|
|
106
107
|
* default assistant configuration are injected, so a host writes
|
|
107
108
|
* `<ChatPage chat={useConnectedChat()} />`.
|
|
108
109
|
*/
|
|
109
|
-
export declare function useConnectedChat(options?: Omit<UseArbiChatOptions, 'workspaceId'>): ArbiChat
|
|
110
|
+
export declare function useConnectedChat(options?: Omit<UseArbiChatOptions, 'workspaceId'>): ArbiChat & {
|
|
111
|
+
mentionCandidates: MentionCandidate[];
|
|
112
|
+
};
|
|
110
113
|
/**
|
|
111
114
|
* The assistant dock bound to the connection: mount it once in the layout (`Shell.Root`'s `aside`)
|
|
112
115
|
* and put `AssistantDockToggle` in the topbar. Chat state lives here, so it survives closing the dock.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { components } from '@arbidocs/client';
|
|
2
|
+
export type WorkNotificationTarget = {
|
|
3
|
+
kind: 'conversation';
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
conversationId: string;
|
|
6
|
+
messageId?: string;
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'workflow';
|
|
9
|
+
workspaceId?: string;
|
|
10
|
+
workflowId: string;
|
|
11
|
+
};
|
|
12
|
+
/** Persisted work notifications in the shared bell; the consumer owns navigation. */
|
|
13
|
+
export declare function useConnectedWorkNotifications(onOpen: (target: WorkNotificationTarget) => void | Promise<void>): {
|
|
14
|
+
onMarkRead: (id: string) => void;
|
|
15
|
+
onMarkAllRead: () => void;
|
|
16
|
+
};
|
|
17
|
+
/** Route from explicit IDs; encrypted task text is never needed for a link. */
|
|
18
|
+
export declare function mapWorkNotification(note: components['schemas']['NotificationResponse']): {
|
|
19
|
+
title: string;
|
|
20
|
+
target: WorkNotificationTarget;
|
|
21
|
+
} | null;
|
|
@@ -7,11 +7,18 @@ export interface DocxAgentCommentRequest {
|
|
|
7
7
|
requestId: string;
|
|
8
8
|
recipientIds: string[];
|
|
9
9
|
}
|
|
10
|
+
export type DocxAgentRunStatus = 'queued' | 'in_progress' | 'completed' | 'failed' | 'cancelled' | 'incomplete';
|
|
11
|
+
export interface DocxMentionDelivery {
|
|
12
|
+
responseIds: string[];
|
|
13
|
+
}
|
|
14
|
+
/** Extra card content using the upstream review context, including a full-thread reader. */
|
|
15
|
+
export declare function DocxCommentActivity(): React.JSX.Element | null;
|
|
10
16
|
/** Adds mentions to the upstream comment inputs without replacing its review layout. */
|
|
11
|
-
export declare function DocxMentions({ children, mentions, initialCommentId, requestAgent, notify, }: {
|
|
17
|
+
export declare function DocxMentions({ children, mentions, initialCommentId, requestAgent, getAgentStatus, notify, }: {
|
|
12
18
|
children: React.ReactNode;
|
|
13
19
|
mentions?: readonly DocxMention[];
|
|
14
20
|
initialCommentId?: string;
|
|
15
|
-
requestAgent?: (request: DocxAgentCommentRequest) => Promise<void>;
|
|
21
|
+
requestAgent?: (request: DocxAgentCommentRequest) => Promise<DocxMentionDelivery | void>;
|
|
22
|
+
getAgentStatus?: (responseId: string) => Promise<DocxAgentRunStatus>;
|
|
16
23
|
notify?: (message: string, kind: 'success' | 'error') => void;
|
|
17
24
|
}): React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type DocxMention, type DocxAgentCommentRequest } from './DocxMentions';
|
|
1
|
+
import { type DocxMention, type DocxAgentCommentRequest, type DocxMentionDelivery, type DocxAgentRunStatus } from './DocxMentions';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import { type FontConfiguration } from '@docx-editor.dev/react';
|
|
4
4
|
import { type DocumentCollaborationSession } from '@docx-editor.dev/pro/collaboration';
|
|
@@ -29,7 +29,8 @@ export interface NativeDocxAdapter {
|
|
|
29
29
|
onVersionSaved?: (documentId: string) => void | Promise<void>;
|
|
30
30
|
notify?: (message: string, kind: 'success' | 'error') => void;
|
|
31
31
|
mentions?: readonly DocxMention[];
|
|
32
|
-
requestAgent?: (documentId: string, request: DocxAgentCommentRequest) => Promise<void>;
|
|
32
|
+
requestAgent?: (documentId: string, request: DocxAgentCommentRequest) => Promise<DocxMentionDelivery | void>;
|
|
33
|
+
getAgentStatus?: (responseId: string) => Promise<DocxAgentRunStatus>;
|
|
33
34
|
}
|
|
34
35
|
export interface NativeDocxEditorProps {
|
|
35
36
|
adapter: NativeDocxAdapter;
|
|
@@ -40,6 +41,13 @@ export interface NativeDocxEditorProps {
|
|
|
40
41
|
/** Immutable history/compare snapshots must not join the live editing room. */
|
|
41
42
|
snapshot?: boolean;
|
|
42
43
|
onSaved?: (id: string) => void;
|
|
44
|
+
/** Generated Markdown stays read-only until its first native DOCX is stored. */
|
|
45
|
+
stream?: {
|
|
46
|
+
content: string;
|
|
47
|
+
busy: boolean;
|
|
48
|
+
error?: string | null;
|
|
49
|
+
onGenerated: (bytes: ArrayBuffer) => Promise<void>;
|
|
50
|
+
};
|
|
43
51
|
}
|
|
44
52
|
export declare function DocxParticipants({ session }: {
|
|
45
53
|
session?: DocumentCollaborationSession;
|
|
@@ -47,4 +55,4 @@ export declare function DocxParticipants({ session }: {
|
|
|
47
55
|
export declare function DocxRibbon({ onSave }: {
|
|
48
56
|
onSave: () => void;
|
|
49
57
|
}): React.JSX.Element;
|
|
50
|
-
export declare function NativeDocxEditor({ documentId, title, draftContent, initialCommentId, snapshot, onSaved, adapter, }: NativeDocxEditorProps): React.JSX.Element;
|
|
58
|
+
export declare function NativeDocxEditor({ documentId, title, draftContent, initialCommentId, snapshot, onSaved, stream, adapter, }: NativeDocxEditorProps): React.JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type NativeDocxAdapter } from './NativeDocxEditor';
|
|
2
|
+
export interface StreamedWordArtifactProps {
|
|
3
|
+
adapter: NativeDocxAdapter;
|
|
4
|
+
content: string;
|
|
5
|
+
title: string;
|
|
6
|
+
busy: boolean;
|
|
7
|
+
error?: string | null;
|
|
8
|
+
/** Stable identity for this generation, not the ID of a persisted Markdown preview. */
|
|
9
|
+
draftId: string;
|
|
10
|
+
/** Preserve version lineage when the stream already has a stored source artifact. */
|
|
11
|
+
sourceDocumentId?: string;
|
|
12
|
+
onSaved?: (documentId: string) => void;
|
|
13
|
+
}
|
|
14
|
+
/** One shared native drafting surface, from Markdown stream to saved collaborative DOCX. */
|
|
15
|
+
export declare function StreamedWordArtifact({ adapter, content, title, busy, error, draftId, sourceDocumentId, onSaved, }: StreamedWordArtifactProps): import("react").JSX.Element;
|
package/dist/docx/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkVMCOH3AY_cjs = require('../chunk-VMCOH3AY.cjs');
|
|
5
5
|
require('../chunk-7UTB4PHM.cjs');
|
|
6
6
|
require('../chunk-MHVNT4J3.cjs');
|
|
7
7
|
var react = require('@docx-editor.dev/react');
|
|
@@ -49,7 +49,7 @@ function NativeDocxComparison({
|
|
|
49
49
|
if (!documentId)
|
|
50
50
|
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "native-docx-error", role: "status", children: "Comparing Word documents\u2026" });
|
|
51
51
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
52
|
-
|
|
52
|
+
chunkVMCOH3AY_cjs.NativeDocxEditor,
|
|
53
53
|
{
|
|
54
54
|
adapter,
|
|
55
55
|
documentId,
|
|
@@ -59,29 +59,37 @@ function NativeDocxComparison({
|
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
Object.defineProperty(exports, "DocxCommentActivity", {
|
|
63
|
+
enumerable: true,
|
|
64
|
+
get: function () { return chunkVMCOH3AY_cjs.DocxCommentActivity; }
|
|
65
|
+
});
|
|
62
66
|
Object.defineProperty(exports, "DocxMentions", {
|
|
63
67
|
enumerable: true,
|
|
64
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkVMCOH3AY_cjs.DocxMentions; }
|
|
65
69
|
});
|
|
66
70
|
Object.defineProperty(exports, "DocxParticipants", {
|
|
67
71
|
enumerable: true,
|
|
68
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkVMCOH3AY_cjs.DocxParticipants; }
|
|
69
73
|
});
|
|
70
74
|
Object.defineProperty(exports, "DocxRibbon", {
|
|
71
75
|
enumerable: true,
|
|
72
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkVMCOH3AY_cjs.DocxRibbon; }
|
|
73
77
|
});
|
|
74
78
|
Object.defineProperty(exports, "NativeDocxEditor", {
|
|
75
79
|
enumerable: true,
|
|
76
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkVMCOH3AY_cjs.NativeDocxEditor; }
|
|
81
|
+
});
|
|
82
|
+
Object.defineProperty(exports, "StreamedWordArtifact", {
|
|
83
|
+
enumerable: true,
|
|
84
|
+
get: function () { return chunkVMCOH3AY_cjs.StreamedWordArtifact; }
|
|
77
85
|
});
|
|
78
86
|
Object.defineProperty(exports, "loadDocxFonts", {
|
|
79
87
|
enumerable: true,
|
|
80
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkVMCOH3AY_cjs.loadDocxFonts; }
|
|
81
89
|
});
|
|
82
90
|
Object.defineProperty(exports, "normalizeDocxExport", {
|
|
83
91
|
enumerable: true,
|
|
84
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkVMCOH3AY_cjs.normalizeDocxExport; }
|
|
85
93
|
});
|
|
86
94
|
Object.defineProperty(exports, "DocxEditor", {
|
|
87
95
|
enumerable: true,
|
package/dist/docx/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
export { NativeDocxEditor, DocxRibbon, DocxParticipants } from './NativeDocxEditor';
|
|
2
|
-
export { DocxMentions } from './DocxMentions';
|
|
3
|
-
export type { DocxMention, DocxAgentCommentRequest } from './DocxMentions';
|
|
2
|
+
export { DocxMentions, DocxCommentActivity } from './DocxMentions';
|
|
3
|
+
export type { DocxMention, DocxAgentCommentRequest, DocxMentionDelivery, DocxAgentRunStatus, } from './DocxMentions';
|
|
4
4
|
export type { NativeDocxAdapter, NativeDocxEditorProps } from './NativeDocxEditor';
|
|
5
5
|
export { DocxEditor, useDocxEditor, useEditorState } from '@docx-editor.dev/react';
|
|
6
6
|
export { DocxEditorReview, useReview, useReviewItem } from '@docx-editor.dev/pro/react';
|
|
7
7
|
export { createHocuspocusCollaboration } from '@docx-editor.dev/pro/collaboration/hocuspocus';
|
|
8
8
|
export { loadDocxFonts } from './fonts';
|
|
9
9
|
export { normalizeDocxExport } from './export';
|
|
10
|
+
export { StreamedWordArtifact, type StreamedWordArtifactProps } from './StreamedWordArtifact';
|
|
10
11
|
export { NativeDocxComparison, type NativeDocxComparisonProps } from './NativeDocxComparison';
|
package/dist/docx/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { NativeDocxEditor } from '../chunk-
|
|
3
|
-
export { DocxMentions, DocxParticipants, DocxRibbon, NativeDocxEditor, loadDocxFonts, normalizeDocxExport } from '../chunk-
|
|
2
|
+
import { NativeDocxEditor } from '../chunk-6YVI74BC.js';
|
|
3
|
+
export { DocxCommentActivity, DocxMentions, DocxParticipants, DocxRibbon, NativeDocxEditor, StreamedWordArtifact, loadDocxFonts, normalizeDocxExport } from '../chunk-6YVI74BC.js';
|
|
4
4
|
import '../chunk-AA3PT6KR.js';
|
|
5
5
|
import '../chunk-7F6CBP3Z.js';
|
|
6
6
|
export { DocxEditor, useDocxEditor, useEditorState } from '@docx-editor.dev/react';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Editor } from '@docx-editor.dev/core';
|
|
2
|
+
/** Use the existing renderer; remove presentation controls, not Markdown syntax. */
|
|
3
|
+
export declare function wordDraftHtml(markdown: string): string;
|
|
4
|
+
/** Completed blocks are immutable; only the unfinished block is replaced. */
|
|
5
|
+
export declare class WordDraftStream {
|
|
6
|
+
private readonly editor;
|
|
7
|
+
private committed;
|
|
8
|
+
private pending?;
|
|
9
|
+
private resetAfterFailure;
|
|
10
|
+
constructor(editor: Editor);
|
|
11
|
+
update(content: string, complete: boolean): void;
|
|
12
|
+
}
|
package/dist/facts/index.cjs
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var chunkZPERNIMP_cjs = require('../chunk-ZPERNIMP.cjs');
|
|
5
|
-
var chunkVPPX5XUF_cjs = require('../chunk-VPPX5XUF.cjs');
|
|
6
5
|
var chunkOUW6G4O2_cjs = require('../chunk-OUW6G4O2.cjs');
|
|
6
|
+
var chunkVPPX5XUF_cjs = require('../chunk-VPPX5XUF.cjs');
|
|
7
7
|
var chunkJGZTRLKL_cjs = require('../chunk-JGZTRLKL.cjs');
|
|
8
8
|
var chunk5B4PXAKI_cjs = require('../chunk-5B4PXAKI.cjs');
|
|
9
9
|
require('../chunk-FX3K6LNZ.cjs');
|
package/dist/facts/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { ViewToggle } from '../chunk-IC2VHFWR.js';
|
|
3
|
-
import { formatSpan, TimelineCalendar, TimelineGantt } from '../chunk-4EZVCGRL.js';
|
|
4
3
|
import { SearchHit } from '../chunk-A2YAC22G.js';
|
|
4
|
+
import { formatSpan, TimelineCalendar, TimelineGantt } from '../chunk-4EZVCGRL.js';
|
|
5
5
|
import { GridView, SelectionBar, SelectionBarAction } from '../chunk-NUPVHEJW.js';
|
|
6
6
|
import { TabHeader } from '../chunk-UBNVIIBT.js';
|
|
7
7
|
import '../chunk-SLSBJRWW.js';
|
package/dist/files/index.cjs
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
|
|
4
4
|
var chunkZPERNIMP_cjs = require('../chunk-ZPERNIMP.cjs');
|
|
5
5
|
var chunk223D4727_cjs = require('../chunk-223D4727.cjs');
|
|
6
|
+
var chunkOB5F4577_cjs = require('../chunk-OB5F4577.cjs');
|
|
6
7
|
var chunkJGZTRLKL_cjs = require('../chunk-JGZTRLKL.cjs');
|
|
7
8
|
var chunkVFUWWH52_cjs = require('../chunk-VFUWWH52.cjs');
|
|
8
|
-
var chunkOB5F4577_cjs = require('../chunk-OB5F4577.cjs');
|
|
9
9
|
require('../chunk-FX3K6LNZ.cjs');
|
|
10
10
|
require('../chunk-PPCATBOY.cjs');
|
|
11
|
+
require('../chunk-C54XEN5T.cjs');
|
|
12
|
+
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
11
13
|
var chunkVLCY46K6_cjs = require('../chunk-VLCY46K6.cjs');
|
|
12
14
|
var chunk2ZTONLT5_cjs = require('../chunk-2ZTONLT5.cjs');
|
|
13
15
|
require('../chunk-DCDVWPMB.cjs');
|
|
14
|
-
require('../chunk-C54XEN5T.cjs');
|
|
15
|
-
var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
|
|
16
16
|
var chunkMHVNT4J3_cjs = require('../chunk-MHVNT4J3.cjs');
|
|
17
17
|
var react = require('react');
|
|
18
18
|
var lucideReact = require('lucide-react');
|
package/dist/files/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
export { DEFAULT_DOCUMENT_VIEW_TOGGLE_LABELS, DocumentViewToggle, ViewToggle } from '../chunk-IC2VHFWR.js';
|
|
3
3
|
import { ModalBreadcrumbHeader } from '../chunk-RC6VTY2H.js';
|
|
4
|
+
import { ActionLink } from '../chunk-S7PSMMRG.js';
|
|
4
5
|
import { GridView, SelectionBar, SelectionBarAction } from '../chunk-NUPVHEJW.js';
|
|
5
6
|
export { DEFAULT_SELECTION_BAR_LABELS, GridView, SelectionBar, SelectionBarAction } from '../chunk-NUPVHEJW.js';
|
|
6
7
|
import { TONE_SURFACE, ToneBadge } from '../chunk-DPLRHEJZ.js';
|
|
7
|
-
import { ActionLink } from '../chunk-S7PSMMRG.js';
|
|
8
8
|
import '../chunk-SLSBJRWW.js';
|
|
9
9
|
import '../chunk-NPLYHR2E.js';
|
|
10
|
+
import '../chunk-76JDDMSP.js';
|
|
11
|
+
import { formatCount } from '../chunk-OXF2IFXG.js';
|
|
10
12
|
import { ShareControl } from '../chunk-K4BGOPGG.js';
|
|
11
13
|
import { ModalSection, ModalSectionTitle, ModalHeader } from '../chunk-CPMNAJLF.js';
|
|
12
14
|
import '../chunk-TJMKFY5P.js';
|
|
13
|
-
import '../chunk-76JDDMSP.js';
|
|
14
|
-
import { formatCount } from '../chunk-OXF2IFXG.js';
|
|
15
15
|
import { testIdOr } from '../chunk-7F6CBP3Z.js';
|
|
16
16
|
import { memo, useState, useRef, useEffect, forwardRef, useMemo, useCallback } from 'react';
|
|
17
17
|
import { Check, Ban, Plus, Pencil, PencilLine, Loader2, UploadCloud, X, SlidersHorizontal, Folder, LoaderCircle, Sparkles, AlertCircle, FolderOpen, Upload, FileText, FolderPlus, Globe, Download, FolderUp, Users, XCircle, AlertTriangle, CheckCircle2, Share2, ImagePlus, Crop, ChevronLeft, ChevronRight, ZoomIn, CopyX, Minus, Tags, StickyNote, Columns2, Copy, ChevronDown, BookMarked, ExternalLink, Square, RefreshCw, Settings, Unplug, CalendarDays, CheckCircle, CircleSlash, Hourglass, Mail, CornerDownRight, CornerRightDown, Blend, MoreVertical, SquarePen, BookOpen, MessagesSquare, FolderInput, Trash2, NotebookPen, MoreHorizontal, ArrowRightFromLine, ArrowDownToLine, Tag, Bot, Calendar, Search, Hash, List, SquareCheckBig, Columns3, Save, Undo2, CheckIcon, ArrowUpDown, FileX, ChevronsUpDown, Table2, ArrowRightLeft } from 'lucide-react';
|