@arbidocs/react 0.5.74 → 0.5.76
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 +6 -0
- package/dist/artifacts/index.cjs +9 -9
- package/dist/artifacts/index.js +3 -3
- package/dist/calls/livekit/index.cjs +48 -48
- package/dist/calls/livekit/index.js +3 -3
- package/dist/{chunk-6PNLCGMJ.js → chunk-2MECTZLS.js} +9 -5
- package/dist/chunk-2MECTZLS.js.map +1 -0
- package/dist/{chunk-R7YNABZY.js → chunk-2Y6LJNWA.js} +2 -2
- package/dist/{chunk-R7YNABZY.js.map → chunk-2Y6LJNWA.js.map} +1 -1
- package/dist/{chunk-YWU7HEHL.js → chunk-33PVGKXT.js} +78 -4
- package/dist/chunk-33PVGKXT.js.map +1 -0
- package/dist/{chunk-Y7S2SQH3.cjs → chunk-5YGUBXXH.cjs} +2 -2
- package/dist/{chunk-Y7S2SQH3.cjs.map → chunk-5YGUBXXH.cjs.map} +1 -1
- package/dist/{chunk-BF7ABX3X.cjs → chunk-6RSVGLQY.cjs} +106 -31
- package/dist/chunk-6RSVGLQY.cjs.map +1 -0
- package/dist/{chunk-LMW46NBD.cjs → chunk-AXKHDLBB.cjs} +9 -7
- package/dist/chunk-AXKHDLBB.cjs.map +1 -0
- package/dist/{chunk-ZTPJNKF2.js → chunk-CSPAEVZS.js} +9 -7
- package/dist/chunk-CSPAEVZS.js.map +1 -0
- package/dist/{chunk-3BFSALPC.cjs → chunk-IHKQPOPK.cjs} +110 -122
- package/dist/chunk-IHKQPOPK.cjs.map +1 -0
- package/dist/{chunk-2LV53J46.js → chunk-JHN4PKWX.js} +3 -3
- package/dist/{chunk-2LV53J46.js.map → chunk-JHN4PKWX.js.map} +1 -1
- package/dist/{chunk-3NBPMR3X.js → chunk-LBAGMNGG.js} +109 -121
- package/dist/chunk-LBAGMNGG.js.map +1 -0
- package/dist/{chunk-GOJHU7RZ.cjs → chunk-MWW54PY6.cjs} +25 -25
- package/dist/{chunk-GOJHU7RZ.cjs.map → chunk-MWW54PY6.cjs.map} +1 -1
- package/dist/{chunk-4DTTEUVY.js → chunk-O2HDONQE.js} +4 -4
- package/dist/{chunk-4DTTEUVY.js.map → chunk-O2HDONQE.js.map} +1 -1
- package/dist/{chunk-SI7DJWBT.js → chunk-OR6B7IL2.js} +3 -3
- package/dist/{chunk-SI7DJWBT.js.map → chunk-OR6B7IL2.js.map} +1 -1
- package/dist/{chunk-C5SVEWPU.cjs → chunk-PMHFLOXY.cjs} +27 -22
- package/dist/chunk-PMHFLOXY.cjs.map +1 -0
- package/dist/{chunk-TGSEQGM3.cjs → chunk-QEVM3F5X.cjs} +4 -4
- package/dist/{chunk-TGSEQGM3.cjs.map → chunk-QEVM3F5X.cjs.map} +1 -1
- package/dist/{chunk-ZNQPUPX6.cjs → chunk-RDERZWMO.cjs} +16 -16
- package/dist/{chunk-ZNQPUPX6.cjs.map → chunk-RDERZWMO.cjs.map} +1 -1
- package/dist/document-tools/core.cjs +99 -99
- package/dist/document-tools/core.js +3 -3
- package/dist/document-tools/index.cjs +101 -101
- package/dist/document-tools/index.js +4 -4
- package/dist/index.cjs +1258 -1124
- package/dist/index.cjs.map +1 -1
- package/dist/{index.d-B0dosFZc.d.cts → index.d-BTbjugKS.d.cts} +9 -2
- package/dist/{index.d-B0dosFZc.d.ts → index.d-BTbjugKS.d.ts} +9 -2
- package/dist/{index.d-AT7wdTWC.d.cts → index.d-Deqz5-pF.d.cts} +2 -2
- package/dist/{index.d-AT7wdTWC.d.ts → index.d-Deqz5-pF.d.ts} +2 -2
- package/dist/index.d.cts +78 -15
- package/dist/index.d.ts +78 -15
- package/dist/index.js +169 -47
- package/dist/index.js.map +1 -1
- package/dist/shell/index.cjs +32 -32
- package/dist/shell/index.d.cts +1 -1
- package/dist/shell/index.d.ts +1 -1
- package/dist/shell/index.js +1 -1
- package/dist/ui/index.cjs +148 -148
- package/dist/ui/index.d.cts +1 -1
- package/dist/ui/index.d.ts +1 -1
- package/dist/ui/index.js +1 -1
- package/dist/viewers/index.cjs +2 -2
- package/dist/viewers/index.js +1 -1
- package/package.json +3 -3
- package/dist/chunk-3BFSALPC.cjs.map +0 -1
- package/dist/chunk-3NBPMR3X.js.map +0 -1
- package/dist/chunk-6PNLCGMJ.js.map +0 -1
- package/dist/chunk-BF7ABX3X.cjs.map +0 -1
- package/dist/chunk-C5SVEWPU.cjs.map +0 -1
- package/dist/chunk-LMW46NBD.cjs.map +0 -1
- package/dist/chunk-YWU7HEHL.js.map +0 -1
- package/dist/chunk-ZTPJNKF2.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/host/config.ts","../src/useArbi.ts"],"names":["useContext","ArbiHostContext"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"sources":["../src/host/config.ts","../src/useArbi.ts"],"names":["useContext","ArbiHostContext"],"mappings":";;;;;AAqIO,SAAS,WAAA,GAA8B;AAC5C,EAAA,OAAOA,iBAAWC,iCAAe,CAAA;AACnC;;;AChIO,SAAS,OAAA,GAAgB;AAC9B,EAAA,MAAM,EAAE,IAAA,EAAK,GAAI,WAAA,EAAY;AAC7B,EAAA,IAAI,CAAC,IAAA,EAAM;AACT,IAAA,MAAM,IAAI,MAAM,0DAA0D,CAAA;AAAA,EAC5E;AACA,EAAA,OAAO,IAAA;AACT;AAOO,SAAS,mBAAA,GAA0C;AACxD,EAAA,OAAO,WAAA,EAAY,CAAE,IAAA,EAAM,mBAAA,EAAoB;AACjD","file":"chunk-5YGUBXXH.cjs","sourcesContent":["/**\n * What a host hands the `@arbidocs/react` hooks, as one configuration (`<ArbiHost config>`). Every\n * field is optional: without one the hooks use their own default. `@arbidocs/blocks` extends it\n * with the blocks domains (environment, billing, viewer, …).\n *\n * A field whose value lives in the host's state is a hook (`use…`), called by the hooks and kits\n * that need it, so the configuration itself stays one stable object for the host's life.\n */\n\nimport { useContext } from 'react'\nimport type { Arbi } from '@arbidocs/sdk/browser'\nimport type { AccountClient } from '../account/client'\nimport type { CalendarSupport } from '../calendar/support'\nimport type { ComponentType } from 'react'\nimport type { MeetingChatRef } from '../calls/meeting-chat'\nimport type { ActiveCall } from '../calls/session'\nimport type { ArbiChatHost } from '../chat/host'\nimport type { DocumentsSupport } from '../documents/support'\nimport type { MailClient } from '../mail/client'\nimport type { ArbiSessionStore } from '../session/store'\nimport type { DictateContextValue } from '../ui/DictateContext'\nimport type { EntityVocabulary } from '../entities/vocabulary'\nimport type { ArbiHostConnection } from './ArbiHost'\nimport type { ArbiFeatures } from './features'\nimport { ArbiHostContext } from './context'\nimport type { DashboardsHost } from '../datasets/registry'\n\n/** The mail client, and whether mail is on for the signed-in user. */\nexport interface MailHost {\n client: MailClient\n /**\n * Whether mail reads run (signed in and entitled), and the server session the mailbox is\n * unlocked for: unlocking runs again when it changes (`null`: none yet, nothing is unlocked).\n * Absent: on, for one session.\n */\n useStatus?: () => { enabled: boolean; sessionKey: string | null }\n}\n\n/** The account client of the settings kits, and whether account reads run (signed in). */\nexport interface AccountHost {\n client: AccountClient\n /** Absent: always. */\n useEnabled?: () => boolean\n}\n\n/** A person in the call UI (a participant, a speaker, a host). */\nexport interface CallUserPillProps {\n /** Their LiveKit identity: the user ext id. */\n identity: string\n /** The call's name for them, for someone the host does not know. */\n name?: string | null\n size?: 'xs' | 'sm' | 'md' | 'lg'\n variant?: 'pill' | 'icon'\n /** Click opens a chat with them (off by default inside the call). */\n interactive?: boolean\n className?: string\n}\n\n/** Where the call panel goes in the host's layout. */\nexport type CallSlotMode = 'docked' | 'main'\n\n/** What the calls need from the host: navigation and layout are the host's. */\nexport interface CallsHost {\n /**\n * Show a call's meeting chat: an end-to-end chat, or a workspace meeting thread. Absent: the\n * in-call \"Open meeting chat\" does nothing.\n */\n openMeetingChat?: (ref: MeetingChatRef) => void\n /**\n * Once connected, show the call's conversation (its chat and live transcript) beside the call.\n * Absent: nothing is shown.\n */\n showConversation?: (call: ActiveCall) => void | Promise<void>\n /**\n * The element whose box the shown call fills: the right-hand dock, or (a webinar's audience) the\n * main area. The host claims its slot while `shown` and calls `onLost` when another panel takes\n * it (the call then minimises). Absent: the call floats at the right edge.\n */\n useSlot?: (mode: CallSlotMode, shown: boolean, onLost: () => void) => HTMLElement | null\n /** How a person shows in the call UI. Absent: the plain user pill with the call's name. */\n UserPill?: ComponentType<CallUserPillProps>\n}\n\nexport interface ArbiHostConfig {\n /**\n * The SDK on the signed-in session. A host with its own login passes one on its session\n * (`new Arbi({ url, session })`); a blocks-only site gets one from `defaultHost`. A new instance (a\n * new session, a newly opened workspace) re-renders every hook.\n */\n arbi?: Arbi\n /** The session state the kits share. Absent: an in-memory one per top-level host. */\n session?: ArbiSessionStore\n /** Live processing, uploads and the host's document actions. Absent: the package's own. */\n documents?: DocumentsSupport\n /** The calendar kept on this device and account OAuth. Absent: online only, the user's connectors. */\n calendar?: CalendarSupport\n /** Absent: mail on the `arbi` session. */\n mail?: MailHost\n /** Absent: the account on the `arbi` session. */\n account?: AccountHost\n /** Absent: calls open no meeting chat from the room. */\n calls?: CallsHost\n /**\n * The parts of the product the user switches on or off, and where each switch is kept (the user's\n * settings, or this device), read with `useFeature(name)`. The call UI also follows the `calls`\n * feature, on top of the server's calls config. Absent, or a feature not listed: on.\n */\n features?: ArbiFeatures\n /** Dictation for every `dictate` field. Absent: no mic button. */\n dictate?: DictateContextValue\n /** The sign-in layer of a blocks-only site (`defaultHost` in `@arbidocs/blocks/connect`). */\n connection?: ArbiHostConnection\n /** Where the chat engine's side effects go (documents shown, mail drafts, used-up quota). */\n chat?: ArbiChatHost\n /**\n * The site's words for the entities (`{ PROJECT: 'Matter' }`), read by every kit through\n * `getEntityLabel`. Absent: the registry's (\"Project\", \"Workspace\", \"Thread\", …).\n */\n vocabulary?: EntityVocabulary\n /**\n * What the site calls its assistant where people address it: the `@<name>` offered in a chat's\n * mention menu, the draft a shared thread starts with, and the name a message is routed to the\n * assistant on. Absent: \"ARBI\".\n */\n assistantName?: string\n /**\n * Charts and dashboards: more data sources (an external feed, a source relabelled in the site's\n * words) and where saved dashboards are kept. Absent: the built-in sources, saved in a database.\n */\n dashboards?: DashboardsHost\n}\n\n/** The host configuration in scope (`{}` outside an `<ArbiHost>`). */\nexport function useArbiHost(): ArbiHostConfig {\n return useContext(ArbiHostContext) as ArbiHostConfig\n}\n","/**\n * The `Arbi` of the host configuration (`<ArbiHost config={{ arbi }}>`).\n */\n\nimport type { Arbi } from '@arbidocs/sdk/browser'\nimport { useArbiHost } from './host/config'\n\nexport function useArbi(): Arbi {\n const { arbi } = useArbiHost()\n if (!arbi) {\n throw new Error('useArbi() needs an <ArbiHost> whose config has an `arbi`')\n }\n return arbi\n}\n\n/**\n * The deployment domain the user's keys are derived for, as the host's `Arbi` computes it\n * (`deploymentDomain`, else the API URL's hostname). `undefined` without one. The document tools\n * default their `deploymentDomain` (needed for e-signing) to it.\n */\nexport function useDeploymentDomain(): string | undefined {\n return useArbiHost().arbi?.getDeploymentDomain()\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunkGQAXAZN7_cjs = require('./chunk-GQAXAZN7.cjs');
|
|
4
|
-
var
|
|
4
|
+
var chunk5YGUBXXH_cjs = require('./chunk-5YGUBXXH.cjs');
|
|
5
5
|
var chunkN73IMVFF_cjs = require('./chunk-N73IMVFF.cjs');
|
|
6
6
|
var chunkZWFMFOGP_cjs = require('./chunk-ZWFMFOGP.cjs');
|
|
7
7
|
var client = require('@arbidocs/client');
|
|
@@ -1370,7 +1370,7 @@ var createOwnStore = (host) => createArbiSessionStore(
|
|
|
1370
1370
|
var moduleDefault = null;
|
|
1371
1371
|
var defaultStore = () => moduleDefault ??= createArbiSessionStore();
|
|
1372
1372
|
function useArbiSessionStore() {
|
|
1373
|
-
const host =
|
|
1373
|
+
const host = chunk5YGUBXXH_cjs.useArbiHost();
|
|
1374
1374
|
if (host.session) return host.session;
|
|
1375
1375
|
const own = host[chunkN73IMVFF_cjs.OWN_SESSION_SLOT];
|
|
1376
1376
|
if (own) return own.current ??= createOwnStore(host);
|
|
@@ -1409,7 +1409,7 @@ var SIGNED_OUT = {
|
|
|
1409
1409
|
var noSubscription = () => () => {
|
|
1410
1410
|
};
|
|
1411
1411
|
function useArbiSession() {
|
|
1412
|
-
return useSignedInSession(
|
|
1412
|
+
return useSignedInSession(chunk5YGUBXXH_cjs.useArbiHost().arbi?.session ?? null);
|
|
1413
1413
|
}
|
|
1414
1414
|
function useSignedInSession(session) {
|
|
1415
1415
|
const state = react.useSyncExternalStore(
|
|
@@ -1531,13 +1531,87 @@ function createStoragePersist({
|
|
|
1531
1531
|
};
|
|
1532
1532
|
}
|
|
1533
1533
|
|
|
1534
|
+
// src/session/ui-state-storage.ts
|
|
1535
|
+
function createUiStateStorage(options = {}) {
|
|
1536
|
+
const debounceMs = options.debounceMs ?? 250;
|
|
1537
|
+
const maxWaitMs = options.maxWaitMs ?? 1e3;
|
|
1538
|
+
const backing = options.backing ?? (() => {
|
|
1539
|
+
try {
|
|
1540
|
+
return typeof localStorage === "undefined" ? void 0 : localStorage;
|
|
1541
|
+
} catch {
|
|
1542
|
+
return void 0;
|
|
1543
|
+
}
|
|
1544
|
+
});
|
|
1545
|
+
const pending = /* @__PURE__ */ new Map();
|
|
1546
|
+
let timer = null;
|
|
1547
|
+
let firstQueuedAt = null;
|
|
1548
|
+
const write = (name, value) => {
|
|
1549
|
+
try {
|
|
1550
|
+
backing()?.setItem(name, JSON.stringify(value));
|
|
1551
|
+
} catch (error) {
|
|
1552
|
+
console.warn("[ui-state] Could not save UI state; keeping it in memory", error);
|
|
1553
|
+
}
|
|
1554
|
+
};
|
|
1555
|
+
const flush = () => {
|
|
1556
|
+
if (timer) clearTimeout(timer);
|
|
1557
|
+
timer = null;
|
|
1558
|
+
firstQueuedAt = null;
|
|
1559
|
+
const due = Array.from(pending.entries());
|
|
1560
|
+
pending.clear();
|
|
1561
|
+
for (const [name, value] of due) write(name, value);
|
|
1562
|
+
};
|
|
1563
|
+
return {
|
|
1564
|
+
getItem: (name) => {
|
|
1565
|
+
const unsaved = pending.get(name);
|
|
1566
|
+
if (unsaved) return unsaved;
|
|
1567
|
+
let raw;
|
|
1568
|
+
try {
|
|
1569
|
+
raw = backing()?.getItem(name);
|
|
1570
|
+
return raw ? JSON.parse(raw) : null;
|
|
1571
|
+
} catch (error) {
|
|
1572
|
+
console.warn("[ui-state] Saved UI state is unreadable; starting from defaults", error);
|
|
1573
|
+
if (raw !== void 0) {
|
|
1574
|
+
try {
|
|
1575
|
+
backing()?.removeItem(name);
|
|
1576
|
+
} catch {
|
|
1577
|
+
}
|
|
1578
|
+
}
|
|
1579
|
+
return null;
|
|
1580
|
+
}
|
|
1581
|
+
},
|
|
1582
|
+
setItem: (name, value) => {
|
|
1583
|
+
pending.set(name, value);
|
|
1584
|
+
if (timer) clearTimeout(timer);
|
|
1585
|
+
firstQueuedAt ??= Date.now();
|
|
1586
|
+
timer = setTimeout(
|
|
1587
|
+
flush,
|
|
1588
|
+
Math.max(0, Math.min(debounceMs, firstQueuedAt + maxWaitMs - Date.now()))
|
|
1589
|
+
);
|
|
1590
|
+
},
|
|
1591
|
+
removeItem: (name) => {
|
|
1592
|
+
pending.delete(name);
|
|
1593
|
+
if (pending.size === 0) {
|
|
1594
|
+
if (timer) clearTimeout(timer);
|
|
1595
|
+
timer = null;
|
|
1596
|
+
firstQueuedAt = null;
|
|
1597
|
+
}
|
|
1598
|
+
try {
|
|
1599
|
+
backing()?.removeItem(name);
|
|
1600
|
+
} catch (error) {
|
|
1601
|
+
console.warn("[ui-state] Could not remove saved UI state", error);
|
|
1602
|
+
}
|
|
1603
|
+
},
|
|
1604
|
+
flush
|
|
1605
|
+
};
|
|
1606
|
+
}
|
|
1607
|
+
|
|
1534
1608
|
// src/usage-metered.ts
|
|
1535
1609
|
function isUsageMetered(usage, subscription) {
|
|
1536
1610
|
const empty = usage.total_spend === 0 && usage.total_tokens === 0 && usage.total_requests === 0;
|
|
1537
1611
|
return !(empty && subscription === "dev");
|
|
1538
1612
|
}
|
|
1539
1613
|
function useWorkspaces(options) {
|
|
1540
|
-
const arbi =
|
|
1614
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1541
1615
|
return reactQuery.useQuery({
|
|
1542
1616
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.workspaces(),
|
|
1543
1617
|
queryFn: () => arbi.workspaces.list(),
|
|
@@ -1545,7 +1619,7 @@ function useWorkspaces(options) {
|
|
|
1545
1619
|
});
|
|
1546
1620
|
}
|
|
1547
1621
|
function useDocumentVersionList(docId, options) {
|
|
1548
|
-
const arbi =
|
|
1622
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1549
1623
|
return reactQuery.useQuery({
|
|
1550
1624
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.documentVersions(docId ?? ""),
|
|
1551
1625
|
queryFn: () => arbi.documents.versions(docId),
|
|
@@ -1553,7 +1627,7 @@ function useDocumentVersionList(docId, options) {
|
|
|
1553
1627
|
});
|
|
1554
1628
|
}
|
|
1555
1629
|
function useConversations(workspaceId, options) {
|
|
1556
|
-
const arbi =
|
|
1630
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1557
1631
|
const live = options?.live === true;
|
|
1558
1632
|
return reactQuery.useQuery({
|
|
1559
1633
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.conversations(workspaceId ?? ""),
|
|
@@ -1566,7 +1640,7 @@ function useConversations(workspaceId, options) {
|
|
|
1566
1640
|
});
|
|
1567
1641
|
}
|
|
1568
1642
|
function useBuiltinCommands() {
|
|
1569
|
-
const arbi =
|
|
1643
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1570
1644
|
const query = reactQuery.useQuery({
|
|
1571
1645
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.assistantCommands(),
|
|
1572
1646
|
queryFn: () => arbi.assistant.commands(),
|
|
@@ -1577,7 +1651,7 @@ function useBuiltinCommands() {
|
|
|
1577
1651
|
return { commands, isLoading: query.isLoading };
|
|
1578
1652
|
}
|
|
1579
1653
|
function useMessageDetails(messageId, options) {
|
|
1580
|
-
const arbi =
|
|
1654
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1581
1655
|
return reactQuery.useQuery({
|
|
1582
1656
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.messageDetails(messageId ?? ""),
|
|
1583
1657
|
queryFn: () => arbi.conversations.getMessage(messageId),
|
|
@@ -1585,7 +1659,7 @@ function useMessageDetails(messageId, options) {
|
|
|
1585
1659
|
});
|
|
1586
1660
|
}
|
|
1587
1661
|
function useConversationThreads(conversationId, options) {
|
|
1588
|
-
const arbi =
|
|
1662
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1589
1663
|
const session = useArbiSessionStore();
|
|
1590
1664
|
return reactQuery.useQuery({
|
|
1591
1665
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.conversationThreads(conversationId ?? ""),
|
|
@@ -1604,7 +1678,7 @@ var tagListKey = (query) => [
|
|
|
1604
1678
|
query.linksLimit !== void 0 ? `links:${query.linksLimit}` : ""
|
|
1605
1679
|
].filter(Boolean).join("|");
|
|
1606
1680
|
function useTags(workspaceId, options) {
|
|
1607
|
-
const arbi =
|
|
1681
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1608
1682
|
const { enabled, ...query } = options ?? {};
|
|
1609
1683
|
const workspace = workspaceId ?? (arbi.hasWorkspace ? arbi.getWorkspaceId() : "");
|
|
1610
1684
|
const key = tagListKey(query);
|
|
@@ -1622,7 +1696,7 @@ function useTags(workspaceId, options) {
|
|
|
1622
1696
|
});
|
|
1623
1697
|
}
|
|
1624
1698
|
function useThumbnails(docIds, options) {
|
|
1625
|
-
const arbi =
|
|
1699
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1626
1700
|
return reactQuery.useQuery({
|
|
1627
1701
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.thumbnails(docIds),
|
|
1628
1702
|
queryFn: () => arbi.documents.getThumbnails(docIds),
|
|
@@ -1631,7 +1705,7 @@ function useThumbnails(docIds, options) {
|
|
|
1631
1705
|
});
|
|
1632
1706
|
}
|
|
1633
1707
|
function useParsedDocument(docId, stage = "final", options) {
|
|
1634
|
-
const arbi =
|
|
1708
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1635
1709
|
return reactQuery.useQuery({
|
|
1636
1710
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.parsedDoc(docId ?? "", stage),
|
|
1637
1711
|
queryFn: () => {
|
|
@@ -1646,13 +1720,13 @@ function useParsedDocument(docId, stage = "final", options) {
|
|
|
1646
1720
|
});
|
|
1647
1721
|
}
|
|
1648
1722
|
function useAssistantQuery() {
|
|
1649
|
-
const arbi =
|
|
1723
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1650
1724
|
return reactQuery.useMutation({
|
|
1651
1725
|
mutationFn: ({ request, handlers }) => arbi.assistant.ask(request, handlers)
|
|
1652
1726
|
});
|
|
1653
1727
|
}
|
|
1654
1728
|
function useAgents(options) {
|
|
1655
|
-
const arbi =
|
|
1729
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1656
1730
|
return reactQuery.useQuery({
|
|
1657
1731
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.agents(),
|
|
1658
1732
|
queryFn: () => arbi.agents.list(),
|
|
@@ -1660,7 +1734,7 @@ function useAgents(options) {
|
|
|
1660
1734
|
});
|
|
1661
1735
|
}
|
|
1662
1736
|
function useDeleteAgents() {
|
|
1663
|
-
const arbi =
|
|
1737
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1664
1738
|
const qc = reactQuery.useQueryClient();
|
|
1665
1739
|
return reactQuery.useMutation({
|
|
1666
1740
|
mutationFn: ({ agentExtIds }) => arbi.agents.delete(agentExtIds),
|
|
@@ -1679,7 +1753,7 @@ function useDeleteAgents() {
|
|
|
1679
1753
|
});
|
|
1680
1754
|
}
|
|
1681
1755
|
function useHealth(options) {
|
|
1682
|
-
const arbi =
|
|
1756
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1683
1757
|
return reactQuery.useQuery({
|
|
1684
1758
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.health(),
|
|
1685
1759
|
queryFn: () => arbi.health.check(),
|
|
@@ -1687,7 +1761,7 @@ function useHealth(options) {
|
|
|
1687
1761
|
});
|
|
1688
1762
|
}
|
|
1689
1763
|
function useAvailableModels(options) {
|
|
1690
|
-
const arbi =
|
|
1764
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1691
1765
|
return reactQuery.useQuery({
|
|
1692
1766
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.availableModels(),
|
|
1693
1767
|
queryFn: () => arbi.health.models(),
|
|
@@ -1696,7 +1770,7 @@ function useAvailableModels(options) {
|
|
|
1696
1770
|
});
|
|
1697
1771
|
}
|
|
1698
1772
|
function useConfigs(options) {
|
|
1699
|
-
const arbi =
|
|
1773
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1700
1774
|
return reactQuery.useQuery({
|
|
1701
1775
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.configVersions(),
|
|
1702
1776
|
queryFn: () => arbi.agentConfig.list(),
|
|
@@ -1704,7 +1778,7 @@ function useConfigs(options) {
|
|
|
1704
1778
|
});
|
|
1705
1779
|
}
|
|
1706
1780
|
function useConfig(configId, options) {
|
|
1707
|
-
const arbi =
|
|
1781
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1708
1782
|
return reactQuery.useQuery({
|
|
1709
1783
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.config(configId ?? ""),
|
|
1710
1784
|
queryFn: () => arbi.agentConfig.get(configId),
|
|
@@ -1713,7 +1787,7 @@ function useConfig(configId, options) {
|
|
|
1713
1787
|
});
|
|
1714
1788
|
}
|
|
1715
1789
|
function useActivity(options) {
|
|
1716
|
-
const arbi =
|
|
1790
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1717
1791
|
return reactQuery.useQuery({
|
|
1718
1792
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.activity(),
|
|
1719
1793
|
queryFn: () => arbi.dm.listActivity({ limit: options?.limit, offset: options?.offset }),
|
|
@@ -1721,7 +1795,7 @@ function useActivity(options) {
|
|
|
1721
1795
|
});
|
|
1722
1796
|
}
|
|
1723
1797
|
function useWorkspaceActivity(workspaceId, options) {
|
|
1724
|
-
const arbi =
|
|
1798
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1725
1799
|
return reactQuery.useInfiniteQuery({
|
|
1726
1800
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.workspaceActivity(workspaceId ?? ""),
|
|
1727
1801
|
queryFn: async ({ pageParam }) => {
|
|
@@ -1737,7 +1811,7 @@ function useWorkspaceActivity(workspaceId, options) {
|
|
|
1737
1811
|
});
|
|
1738
1812
|
}
|
|
1739
1813
|
function useProjects(options) {
|
|
1740
|
-
const arbi =
|
|
1814
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1741
1815
|
return reactQuery.useQuery({
|
|
1742
1816
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.projects(),
|
|
1743
1817
|
queryFn: () => arbi.projects.list(),
|
|
@@ -1745,7 +1819,7 @@ function useProjects(options) {
|
|
|
1745
1819
|
});
|
|
1746
1820
|
}
|
|
1747
1821
|
function useProjectUsage(projectExtId, monthsBack = 0, options) {
|
|
1748
|
-
const arbi =
|
|
1822
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1749
1823
|
const usage = reactQuery.useQuery({
|
|
1750
1824
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.projectUsage(projectExtId ?? "", monthsBack),
|
|
1751
1825
|
queryFn: () => arbi.projects.usage(projectExtId, monthsBack),
|
|
@@ -1757,7 +1831,7 @@ function useProjectUsage(projectExtId, monthsBack = 0, options) {
|
|
|
1757
1831
|
return { ...usage, metered };
|
|
1758
1832
|
}
|
|
1759
1833
|
function useProjectsUsage(projectExtIds, monthsBack = 0, options) {
|
|
1760
|
-
const arbi =
|
|
1834
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1761
1835
|
const enabled = (options?.enabled ?? true) && arbi.isLoggedIn;
|
|
1762
1836
|
const projects = useProjects({ enabled: enabled && projectExtIds.length > 0 });
|
|
1763
1837
|
const results = reactQuery.useQueries({
|
|
@@ -1831,7 +1905,7 @@ function useProjectsUsage(projectExtIds, monthsBack = 0, options) {
|
|
|
1831
1905
|
}, [signature]);
|
|
1832
1906
|
}
|
|
1833
1907
|
function useProjectInvoices(projectExtId, options) {
|
|
1834
|
-
const arbi =
|
|
1908
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1835
1909
|
return reactQuery.useQuery({
|
|
1836
1910
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.projectInvoices(projectExtId ?? ""),
|
|
1837
1911
|
queryFn: () => arbi.projects.invoices(projectExtId),
|
|
@@ -1839,7 +1913,7 @@ function useProjectInvoices(projectExtId, options) {
|
|
|
1839
1913
|
});
|
|
1840
1914
|
}
|
|
1841
1915
|
function useCurrentUser(options) {
|
|
1842
|
-
const arbi =
|
|
1916
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1843
1917
|
return reactQuery.useQuery({
|
|
1844
1918
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.currentUser(),
|
|
1845
1919
|
queryFn: () => arbi.user.me(),
|
|
@@ -1849,7 +1923,7 @@ function useCurrentUser(options) {
|
|
|
1849
1923
|
});
|
|
1850
1924
|
}
|
|
1851
1925
|
function useFirmPool(options) {
|
|
1852
|
-
const arbi =
|
|
1926
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1853
1927
|
return reactQuery.useQuery({
|
|
1854
1928
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.firmPool(),
|
|
1855
1929
|
queryFn: () => arbi.firm.pool(),
|
|
@@ -1865,7 +1939,7 @@ function useBoxRole(options = {}) {
|
|
|
1865
1939
|
return { isBox, isBoxAdmin: isBox && !!data?.can_top_up };
|
|
1866
1940
|
}
|
|
1867
1941
|
function useTopUpFirmPool() {
|
|
1868
|
-
const arbi =
|
|
1942
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1869
1943
|
const queryClient = reactQuery.useQueryClient();
|
|
1870
1944
|
return reactQuery.useMutation({
|
|
1871
1945
|
mutationFn: (aiAddons) => arbi.firm.topUp(aiAddons),
|
|
@@ -1890,7 +1964,7 @@ function useCanCreateProjects() {
|
|
|
1890
1964
|
return user.data?.can_create_projects;
|
|
1891
1965
|
}
|
|
1892
1966
|
function useUserUsageToday(options) {
|
|
1893
|
-
const arbi =
|
|
1967
|
+
const arbi = chunk5YGUBXXH_cjs.useArbi();
|
|
1894
1968
|
return reactQuery.useQuery({
|
|
1895
1969
|
queryKey: chunkGQAXAZN7_cjs.arbiQueryKeys.userUsageToday(),
|
|
1896
1970
|
queryFn: () => arbi.user.usageToday(),
|
|
@@ -1923,6 +1997,7 @@ exports.createArbiWorkspaceStore = createArbiWorkspaceStore;
|
|
|
1923
1997
|
exports.createDebouncedWriter = createDebouncedWriter;
|
|
1924
1998
|
exports.createSealedDraftStorage = createSealedDraftStorage;
|
|
1925
1999
|
exports.createStoragePersist = createStoragePersist;
|
|
2000
|
+
exports.createUiStateStorage = createUiStateStorage;
|
|
1926
2001
|
exports.defaultLayoutState = defaultLayoutState;
|
|
1927
2002
|
exports.dmTabId = dmTabId;
|
|
1928
2003
|
exports.flushOnPageExit = flushOnPageExit;
|
|
@@ -1978,5 +2053,5 @@ exports.useTransientView = useTransientView;
|
|
|
1978
2053
|
exports.useUserUsageToday = useUserUsageToday;
|
|
1979
2054
|
exports.useWorkspaceActivity = useWorkspaceActivity;
|
|
1980
2055
|
exports.useWorkspaces = useWorkspaces;
|
|
1981
|
-
//# sourceMappingURL=chunk-
|
|
1982
|
-
//# sourceMappingURL=chunk-
|
|
2056
|
+
//# sourceMappingURL=chunk-6RSVGLQY.cjs.map
|
|
2057
|
+
//# sourceMappingURL=chunk-6RSVGLQY.cjs.map
|