@arbidocs/blocks 0.5.183 → 0.5.185
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ConnectedCallDock-CF7KF5KM.cjs → ConnectedCallDock-CKJUL7HZ.cjs} +5 -5
- package/dist/{ConnectedCallDock-CF7KF5KM.cjs.map → ConnectedCallDock-CKJUL7HZ.cjs.map} +1 -1
- package/dist/{ConnectedCallRoom-NQOE2RYD.cjs → ConnectedCallRoom-CDOGHVES.cjs} +5 -5
- package/dist/{ConnectedCallRoom-NQOE2RYD.cjs.map → ConnectedCallRoom-CDOGHVES.cjs.map} +1 -1
- package/dist/{ConnectedMailInviteCard-DDGB4LLC.cjs → ConnectedMailInviteCard-ZNBHPFKF.cjs} +8 -8
- package/dist/{ConnectedMailInviteCard-DDGB4LLC.cjs.map → ConnectedMailInviteCard-ZNBHPFKF.cjs.map} +1 -1
- package/dist/{ConnectedNativeDocxComparison-3KTHPCMT.cjs → ConnectedNativeDocxComparison-YP7SASIP.cjs} +8 -8
- package/dist/{ConnectedNativeDocxComparison-3KTHPCMT.cjs.map → ConnectedNativeDocxComparison-YP7SASIP.cjs.map} +1 -1
- package/dist/{ConnectedPresentation-LNDESKYE.cjs → ConnectedPresentation-RFUH3MXL.cjs} +10 -10
- package/dist/{ConnectedPresentation-LNDESKYE.cjs.map → ConnectedPresentation-RFUH3MXL.cjs.map} +1 -1
- package/dist/{ConnectedSlidesTab-SYDDGJWM.cjs → ConnectedSlidesTab-CCJWFSCX.cjs} +10 -10
- package/dist/{ConnectedSlidesTab-SYDDGJWM.cjs.map → ConnectedSlidesTab-CCJWFSCX.cjs.map} +1 -1
- package/dist/{ConnectedStreamedWordArtifact-LUM6WE7F.cjs → ConnectedStreamedWordArtifact-GVVIWKFH.cjs} +8 -8
- package/dist/{ConnectedStreamedWordArtifact-LUM6WE7F.cjs.map → ConnectedStreamedWordArtifact-GVVIWKFH.cjs.map} +1 -1
- package/dist/{DocumentReviewCard-NKCKBY3P.cjs → DocumentReviewCard-QD6VVDAE.cjs} +3 -3
- package/dist/{DocumentReviewCard-NKCKBY3P.cjs.map → DocumentReviewCard-QD6VVDAE.cjs.map} +1 -1
- package/dist/{FilesViewerDialog-T4SOKUKO.cjs → FilesViewerDialog-S5KRHOFU.cjs} +15 -15
- package/dist/{FilesViewerDialog-T4SOKUKO.cjs.map → FilesViewerDialog-S5KRHOFU.cjs.map} +1 -1
- package/dist/{WorkspaceTableView-QT63XYII.cjs → WorkspaceTableView-TPL6EWXL.cjs} +3 -3
- package/dist/{WorkspaceTableView-QT63XYII.cjs.map → WorkspaceTableView-TPL6EWXL.cjs.map} +1 -1
- package/dist/agents/index.cjs +175 -175
- package/dist/{ai-CTJWECJ5.cjs → ai-6K5DTBLO.cjs} +16 -16
- package/dist/ai-6K5DTBLO.cjs.map +1 -0
- package/dist/{avatar-renderer-OZKS2BSF.cjs → avatar-renderer-FTY24TKC.cjs} +97 -62
- package/dist/avatar-renderer-FTY24TKC.cjs.map +1 -0
- package/dist/calls/connected/CallAvatarMedia.d.ts +1 -1
- package/dist/calls/connected/CallAvatarMedia.js +9 -4
- package/dist/calls/connected/CallAvatarMedia.js.map +2 -2
- package/dist/calls/connected/CallPeoplePicker.js +5 -2
- package/dist/calls/connected/CallPeoplePicker.js.map +2 -2
- package/dist/calls/connected/ConnectedCallRoom.js +24 -0
- package/dist/calls/connected/ConnectedCallRoom.js.map +2 -2
- package/dist/calls/connected/DmCallButton.d.ts +2 -1
- package/dist/calls/connected/DmCallButton.js +10 -3
- package/dist/calls/connected/DmCallButton.js.map +2 -2
- package/dist/calls/connected/OwnedAgentCallButton.d.ts +2 -1
- package/dist/calls/connected/OwnedAgentCallButton.js +5 -2
- package/dist/calls/connected/OwnedAgentCallButton.js.map +2 -2
- package/dist/calls/connected/avatar-framing.d.ts +6 -1
- package/dist/calls/connected/avatar-framing.js +39 -11
- package/dist/calls/connected/avatar-framing.js.map +3 -3
- package/dist/calls/connected/avatar-renderer.js +21 -9
- package/dist/calls/connected/avatar-renderer.js.map +2 -2
- package/dist/calls/connected/call-media-state.js +1 -1
- package/dist/calls/connected/call-media-state.js.map +2 -2
- package/dist/calls/connected/call-people.d.ts +2 -1
- package/dist/calls/connected/call-people.js +11 -1
- package/dist/calls/connected/call-people.js.map +2 -2
- package/dist/calls/index.cjs +22 -22
- package/dist/{chunk-KHZEFLQC.cjs → chunk-26KJYXYH.cjs} +52 -5
- package/dist/chunk-26KJYXYH.cjs.map +1 -0
- package/dist/{chunk-HH5MKRBL.cjs → chunk-2EDVEP2X.cjs} +6 -6
- package/dist/{chunk-HH5MKRBL.cjs.map → chunk-2EDVEP2X.cjs.map} +1 -1
- package/dist/{chunk-W5UGKUV7.cjs → chunk-66IOCKWS.cjs} +124 -31
- package/dist/chunk-66IOCKWS.cjs.map +1 -0
- package/dist/{chunk-ZTLPUUZB.cjs → chunk-6IABKQKX.cjs} +6 -6
- package/dist/{chunk-ZTLPUUZB.cjs.map → chunk-6IABKQKX.cjs.map} +1 -1
- package/dist/{chunk-OHWYQI3B.cjs → chunk-7KUTY4N5.cjs} +9 -9
- package/dist/{chunk-OHWYQI3B.cjs.map → chunk-7KUTY4N5.cjs.map} +1 -1
- package/dist/{chunk-HHZDURXN.cjs → chunk-AS2FZ2T7.cjs} +3 -3
- package/dist/{chunk-HHZDURXN.cjs.map → chunk-AS2FZ2T7.cjs.map} +1 -1
- package/dist/{chunk-3YPVXIFF.cjs → chunk-CF3WPB7T.cjs} +4 -4
- package/dist/{chunk-3YPVXIFF.cjs.map → chunk-CF3WPB7T.cjs.map} +1 -1
- package/dist/{chunk-DWUWPF2A.cjs → chunk-EEB63QUE.cjs} +8 -8
- package/dist/{chunk-DWUWPF2A.cjs.map → chunk-EEB63QUE.cjs.map} +1 -1
- package/dist/{chunk-AZP4ABNL.cjs → chunk-EYOZNVQK.cjs} +4 -4
- package/dist/{chunk-AZP4ABNL.cjs.map → chunk-EYOZNVQK.cjs.map} +1 -1
- package/dist/{chunk-A4HOEGDI.cjs → chunk-FAFA56ZL.cjs} +4 -4
- package/dist/{chunk-A4HOEGDI.cjs.map → chunk-FAFA56ZL.cjs.map} +1 -1
- package/dist/{chunk-XKXKEVHH.cjs → chunk-HPIB5YRV.cjs} +5 -5
- package/dist/{chunk-XKXKEVHH.cjs.map → chunk-HPIB5YRV.cjs.map} +1 -1
- package/dist/{chunk-WIQDXRRB.cjs → chunk-HS626TSS.cjs} +5 -5
- package/dist/{chunk-WIQDXRRB.cjs.map → chunk-HS626TSS.cjs.map} +1 -1
- package/dist/{chunk-YYMCN76N.cjs → chunk-IM6R7DRQ.cjs} +5 -5
- package/dist/{chunk-YYMCN76N.cjs.map → chunk-IM6R7DRQ.cjs.map} +1 -1
- package/dist/{chunk-HYULUR6E.cjs → chunk-L6WEKQTV.cjs} +28 -28
- package/dist/{chunk-HYULUR6E.cjs.map → chunk-L6WEKQTV.cjs.map} +1 -1
- package/dist/{chunk-3EIO4ZH5.cjs → chunk-LUOL7TEY.cjs} +6 -6
- package/dist/{chunk-3EIO4ZH5.cjs.map → chunk-LUOL7TEY.cjs.map} +1 -1
- package/dist/{chunk-LRBX4VIG.cjs → chunk-PDKTW4L2.cjs} +5 -5
- package/dist/{chunk-LRBX4VIG.cjs.map → chunk-PDKTW4L2.cjs.map} +1 -1
- package/dist/{chunk-UFDUDQYT.cjs → chunk-QU3OCUVF.cjs} +1712 -71
- package/dist/chunk-QU3OCUVF.cjs.map +1 -0
- package/dist/{chunk-7GVKG3G4.cjs → chunk-R27P7TYW.cjs} +4 -4
- package/dist/{chunk-7GVKG3G4.cjs.map → chunk-R27P7TYW.cjs.map} +1 -1
- package/dist/{chunk-4H5DPHZ2.cjs → chunk-RDEUBZ3Z.cjs} +8 -8
- package/dist/{chunk-4H5DPHZ2.cjs.map → chunk-RDEUBZ3Z.cjs.map} +1 -1
- package/dist/{chunk-I5LXJLO5.cjs → chunk-TW5AGCHR.cjs} +31 -9
- package/dist/chunk-TW5AGCHR.cjs.map +1 -0
- package/dist/{chunk-5FSULBPE.cjs → chunk-U2T66I7C.cjs} +3 -3
- package/dist/{chunk-5FSULBPE.cjs.map → chunk-U2T66I7C.cjs.map} +1 -1
- package/dist/{chunk-NGT3P5ZG.cjs → chunk-VD3HI5RF.cjs} +6 -7
- package/dist/chunk-VD3HI5RF.cjs.map +1 -0
- package/dist/{chunk-4TCOUQMC.cjs → chunk-WQMIBHSQ.cjs} +6 -6
- package/dist/{chunk-4TCOUQMC.cjs.map → chunk-WQMIBHSQ.cjs.map} +1 -1
- package/dist/{chunk-TX7Y4A6T.cjs → chunk-X5PH6PM7.cjs} +38 -9
- package/dist/chunk-X5PH6PM7.cjs.map +1 -0
- package/dist/{chunk-7QZXHSQX.cjs → chunk-ZKXZKIPE.cjs} +27 -7
- package/dist/chunk-ZKXZKIPE.cjs.map +1 -0
- package/dist/connect/docx.cjs +11 -11
- package/dist/connect/index.cjs +767 -553
- package/dist/connect/index.cjs.map +1 -1
- package/dist/connect/viewer.cjs +6 -6
- package/dist/connection/ConnectedAgentChatPanel.js +1 -1
- package/dist/connection/ConnectedAgentChatPanel.js.map +2 -2
- package/dist/connection/ConnectedAgentCreator.js +12 -4
- package/dist/connection/ConnectedAgentCreator.js.map +2 -2
- package/dist/connection/databases/ConnectedSourcesEditor.d.ts +4 -0
- package/dist/connection/databases/ConnectedSourcesEditor.js +126 -0
- package/dist/connection/databases/ConnectedSourcesEditor.js.map +7 -0
- package/dist/connection/databases/sourceCells.d.ts +14 -0
- package/dist/connection/databases/sourceCells.js +40 -0
- package/dist/connection/databases/sourceCells.js.map +7 -0
- package/dist/connection/databases/useApiDatabaseSource.js +35 -11
- package/dist/connection/databases/useApiDatabaseSource.js.map +2 -2
- package/dist/connection/databases/useDatabaseCellSources.d.ts +8 -1
- package/dist/connection/databases/useDatabaseCellSources.js +40 -5
- package/dist/connection/databases/useDatabaseCellSources.js.map +2 -2
- package/dist/connection/databases/wireColumns.d.ts +17 -0
- package/dist/connection/databases/wireColumns.js +22 -0
- package/dist/connection/databases/wireColumns.js.map +7 -0
- package/dist/connection/facts/documentPickerGroups.d.ts +3 -0
- package/dist/connection/facts/documentPickerGroups.js +21 -0
- package/dist/connection/facts/documentPickerGroups.js.map +7 -0
- package/dist/connection/facts/factsSource.js +2 -17
- package/dist/connection/facts/factsSource.js.map +2 -2
- package/dist/connection/facts/useFactComposer.js +6 -60
- package/dist/connection/facts/useFactComposer.js.map +2 -2
- package/dist/connection/facts/usePassageCollection.d.ts +21 -0
- package/dist/connection/facts/usePassageCollection.js +72 -0
- package/dist/connection/facts/usePassageCollection.js.map +7 -0
- package/dist/connection/messenger/ConnectedChatThread.js +1 -1
- package/dist/connection/messenger/ConnectedChatThread.js.map +2 -2
- package/dist/connection/pages/TableViewBlock.js +2 -6
- package/dist/connection/pages/TableViewBlock.js.map +2 -2
- package/dist/connection/settings-page/featuresSection.js +1 -1
- package/dist/connection/settings-page/featuresSection.js.map +1 -1
- package/dist/connection/tags/ConnectedTagsPage.js +4 -1
- package/dist/connection/tags/ConnectedTagsPage.js.map +2 -2
- package/dist/databases/DatabaseFilterMenu.d.ts +1 -1
- package/dist/databases/DatabaseFilterMenu.js +4 -3
- package/dist/databases/DatabaseFilterMenu.js.map +2 -2
- package/dist/databases/DatabaseRowDetail.js +18 -2
- package/dist/databases/DatabaseRowDetail.js.map +2 -2
- package/dist/databases/databaseColumns.js +7 -2
- package/dist/databases/databaseColumns.js.map +2 -2
- package/dist/databases/index.cjs +129 -132
- package/dist/databases/index.d.ts +1 -1
- package/dist/databases/index.js.map +2 -2
- package/dist/databases/linkCells.d.ts +37 -1
- package/dist/databases/linkCells.js +17 -2
- package/dist/databases/linkCells.js.map +2 -2
- package/dist/embed/index.cjs +13 -13
- package/dist/facts/index.cjs +53 -55
- package/dist/facts/index.cjs.map +1 -1
- package/dist/index.cjs +240 -241
- package/dist/index.cjs.map +1 -1
- package/dist/pages/index.cjs +25 -26
- package/dist/pages/index.cjs.map +1 -1
- package/dist/settings/index.cjs +9 -9
- package/dist/site/index.cjs +10 -11
- package/dist/studio/index.cjs +10 -11
- package/dist/studio/index.cjs.map +1 -1
- package/dist/timeline/index.cjs +12 -13
- package/dist/workflow-canvas/index.cjs +19 -19
- package/node_modules/@arbidocs/coedit/package.json +1 -1
- package/package.json +5 -5
- package/record/render-take.py +5 -0
- package/dist/ai-CTJWECJ5.cjs.map +0 -1
- package/dist/avatar-renderer-OZKS2BSF.cjs.map +0 -1
- package/dist/chunk-7QZXHSQX.cjs.map +0 -1
- package/dist/chunk-GXJW5EK5.cjs +0 -102
- package/dist/chunk-GXJW5EK5.cjs.map +0 -1
- package/dist/chunk-I24N4OSB.cjs +0 -57
- package/dist/chunk-I24N4OSB.cjs.map +0 -1
- package/dist/chunk-I5LXJLO5.cjs.map +0 -1
- package/dist/chunk-KHZEFLQC.cjs.map +0 -1
- package/dist/chunk-NGT3P5ZG.cjs.map +0 -1
- package/dist/chunk-TX7Y4A6T.cjs.map +0 -1
- package/dist/chunk-UFDUDQYT.cjs.map +0 -1
- package/dist/chunk-VBD4RJOL.cjs +0 -1640
- package/dist/chunk-VBD4RJOL.cjs.map +0 -1
- package/dist/chunk-W5UGKUV7.cjs.map +0 -1
|
@@ -1,4 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Cells that refer to other things: a person (a workspace member), documents of the workspace, rows
|
|
3
|
+
* of a related database, and the computed lookup and rollup cells read through a relation.
|
|
4
|
+
*
|
|
5
|
+
* The row's `titles` names every id its cells hold, so a cell shows names without another call. A
|
|
6
|
+
* document chip opens the document (the host's `onOpenDocument`).
|
|
7
|
+
*/
|
|
8
|
+
import type { ReactNode } from 'react';
|
|
1
9
|
import type { FactLabelOption } from '../facts/FactLabelsCell';
|
|
10
|
+
import { type DatabaseCitation, type DatabaseColumnView } from './column-types';
|
|
2
11
|
/** Something a person, document or relation cell can hold, as a picker lists it. */
|
|
3
12
|
export interface DatabasePickOption {
|
|
4
13
|
id: string;
|
|
@@ -6,11 +15,33 @@ export interface DatabasePickOption {
|
|
|
6
15
|
/** A second, quieter line (an email, a file's folder). */
|
|
7
16
|
description?: string;
|
|
8
17
|
}
|
|
18
|
+
/** A label a cell can apply; `kind` (a tag's kind) lets a column that allows only some kinds filter them. */
|
|
19
|
+
export type DatabaseLabelOption = FactLabelOption & {
|
|
20
|
+
kind?: string;
|
|
21
|
+
};
|
|
9
22
|
/** The labels a label cell can apply, and how to make a new one. */
|
|
10
23
|
export interface DatabaseLabelSource {
|
|
11
|
-
options:
|
|
24
|
+
options: DatabaseLabelOption[];
|
|
12
25
|
onCreate(name: string): Promise<string | undefined>;
|
|
13
26
|
}
|
|
27
|
+
/**
|
|
28
|
+
* The labels one label column offers: an option with a `kind` only when the column allows that kind
|
|
29
|
+
* (its `options`; none listed means labels). Options with no kind are always offered. A column that
|
|
30
|
+
* does not allow plain labels cannot create one.
|
|
31
|
+
*/
|
|
32
|
+
export declare function labelSourceFor(labels: DatabaseLabelSource | undefined, column: Pick<DatabaseColumnView, 'options'>): DatabaseLabelSource | undefined;
|
|
33
|
+
/** What an editable Sources field is given. */
|
|
34
|
+
export interface DatabaseSourcesEditorProps {
|
|
35
|
+
/** The cited documents the cell holds (a document appears once; whole-document = no chunks). */
|
|
36
|
+
value: DatabaseCitation[];
|
|
37
|
+
/** Names of the cited documents, from the row. */
|
|
38
|
+
titles?: Record<string, string>;
|
|
39
|
+
/** Save the cell's full list of citations (an empty list empties the cell). */
|
|
40
|
+
onChange: (next: DatabaseCitation[]) => void;
|
|
41
|
+
testId: string;
|
|
42
|
+
/** The row page this field is on, for a host that opens a document beside it. */
|
|
43
|
+
rowId?: string;
|
|
44
|
+
}
|
|
14
45
|
/**
|
|
15
46
|
* Where the pickers of person, document and relation cells get their choices, and what a document
|
|
16
47
|
* chip does. The host owns the data; without a source the cell still shows, but does not edit.
|
|
@@ -24,6 +55,11 @@ export interface DatabaseCellSources {
|
|
|
24
55
|
searchRows?: (databaseId: string, q: string) => Promise<DatabasePickOption[]>;
|
|
25
56
|
/** The labels of label cells. */
|
|
26
57
|
labels?: DatabaseLabelSource;
|
|
58
|
+
/**
|
|
59
|
+
* The editable Sources field of a source column on a row page: pick documents, open one beside the
|
|
60
|
+
* database and pick the cited passages in it. Absent, the field lists the sources read-only.
|
|
61
|
+
*/
|
|
62
|
+
renderSourcesEditor?: (props: DatabaseSourcesEditorProps) => ReactNode;
|
|
27
63
|
/** Open a document (a click on a document chip). */
|
|
28
64
|
onOpenDocument?: (documentId: string) => void;
|
|
29
65
|
}
|
|
@@ -2,7 +2,21 @@
|
|
|
2
2
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { ArrowUpRight, FileText } from "lucide-react";
|
|
4
4
|
import { cn } from "@arbidocs/react/ui";
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
cellIds,
|
|
7
|
+
cellList,
|
|
8
|
+
formatLookupValue,
|
|
9
|
+
titleOf
|
|
10
|
+
} from "./column-types.js";
|
|
11
|
+
function labelSourceFor(labels, column) {
|
|
12
|
+
if (!labels) return void 0;
|
|
13
|
+
const kinds = column.options?.length ? column.options : ["label"];
|
|
14
|
+
if (!labels.options.some((o) => o.kind)) return labels;
|
|
15
|
+
return {
|
|
16
|
+
options: labels.options.filter((o) => !o.kind || kinds.includes(o.kind)),
|
|
17
|
+
onCreate: kinds.includes("label") ? labels.onCreate : async () => void 0
|
|
18
|
+
};
|
|
19
|
+
}
|
|
6
20
|
const CHIP = "inline-flex h-[22px] min-w-0 max-w-[14rem] shrink-0 items-center gap-1 rounded-md border border-border bg-muted/50 px-1.5 text-xs text-foreground";
|
|
7
21
|
function initials(name) {
|
|
8
22
|
const parts = name.trim().split(/\s+/).filter(Boolean);
|
|
@@ -127,6 +141,7 @@ export {
|
|
|
127
141
|
LinkChipsCell,
|
|
128
142
|
LookupCell,
|
|
129
143
|
PersonCell,
|
|
130
|
-
PersonChip
|
|
144
|
+
PersonChip,
|
|
145
|
+
labelSourceFor
|
|
131
146
|
};
|
|
132
147
|
//# sourceMappingURL=linkCells.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/databases/linkCells.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * Cells that refer to other things: a person (a workspace member), documents of the workspace, rows\n * of a related database, and the computed lookup and rollup cells read through a relation.\n *\n * The row's `titles` names every id its cells hold, so a cell shows names without another call. A\n * document chip opens the document (the host's `onOpenDocument`).\n */\nimport type { MouseEvent, ReactNode } from 'react'\nimport { ArrowUpRight, FileText } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport type { FactLabelOption } from '../facts/FactLabelsCell'\nimport {
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["/**\n * Cells that refer to other things: a person (a workspace member), documents of the workspace, rows\n * of a related database, and the computed lookup and rollup cells read through a relation.\n *\n * The row's `titles` names every id its cells hold, so a cell shows names without another call. A\n * document chip opens the document (the host's `onOpenDocument`).\n */\nimport type { MouseEvent, ReactNode } from 'react'\nimport { ArrowUpRight, FileText } from 'lucide-react'\nimport { cn } from '@arbidocs/react/ui'\nimport type { FactLabelOption } from '../facts/FactLabelsCell'\nimport {\n cellIds,\n cellList,\n formatLookupValue,\n titleOf,\n type DatabaseCitation,\n type DatabaseColumnView,\n} from './column-types'\n\n/** Something a person, document or relation cell can hold, as a picker lists it. */\nexport interface DatabasePickOption {\n id: string\n label: string\n /** A second, quieter line (an email, a file's folder). */\n description?: string\n}\n\n/** A label a cell can apply; `kind` (a tag's kind) lets a column that allows only some kinds filter them. */\nexport type DatabaseLabelOption = FactLabelOption & { kind?: string }\n\n/** The labels a label cell can apply, and how to make a new one. */\nexport interface DatabaseLabelSource {\n options: DatabaseLabelOption[]\n onCreate(name: string): Promise<string | undefined>\n}\n\n/**\n * The labels one label column offers: an option with a `kind` only when the column allows that kind\n * (its `options`; none listed means labels). Options with no kind are always offered. A column that\n * does not allow plain labels cannot create one.\n */\nexport function labelSourceFor(\n labels: DatabaseLabelSource | undefined,\n column: Pick<DatabaseColumnView, 'options'>\n): DatabaseLabelSource | undefined {\n if (!labels) return undefined\n const kinds = column.options?.length ? column.options : ['label']\n if (!labels.options.some((o) => o.kind)) return labels\n return {\n options: labels.options.filter((o) => !o.kind || kinds.includes(o.kind)),\n onCreate: kinds.includes('label') ? labels.onCreate : async () => undefined,\n }\n}\n\n/** What an editable Sources field is given. */\nexport interface DatabaseSourcesEditorProps {\n /** The cited documents the cell holds (a document appears once; whole-document = no chunks). */\n value: DatabaseCitation[]\n /** Names of the cited documents, from the row. */\n titles?: Record<string, string>\n /** Save the cell's full list of citations (an empty list empties the cell). */\n onChange: (next: DatabaseCitation[]) => void\n testId: string\n /** The row page this field is on, for a host that opens a document beside it. */\n rowId?: string\n}\n\n/**\n * Where the pickers of person, document and relation cells get their choices, and what a document\n * chip does. The host owns the data; without a source the cell still shows, but does not edit.\n */\nexport interface DatabaseCellSources {\n /** The workspace's members (person cells). */\n members?: DatabasePickOption[]\n /** The workspace's documents (document cells). */\n documents?: DatabasePickOption[]\n /** Rows of `databaseId` matching `q` (relation cells; an empty `q` lists the first rows). */\n searchRows?: (databaseId: string, q: string) => Promise<DatabasePickOption[]>\n /** The labels of label cells. */\n labels?: DatabaseLabelSource\n /**\n * The editable Sources field of a source column on a row page: pick documents, open one beside the\n * database and pick the cited passages in it. Absent, the field lists the sources read-only.\n */\n renderSourcesEditor?: (props: DatabaseSourcesEditorProps) => ReactNode\n /** Open a document (a click on a document chip). */\n onOpenDocument?: (documentId: string) => void\n}\n\nconst CHIP =\n 'inline-flex h-[22px] min-w-0 max-w-[14rem] shrink-0 items-center gap-1 rounded-md border border-border bg-muted/50 px-1.5 text-xs text-foreground'\n\nfunction initials(name: string): string {\n const parts = name.trim().split(/\\s+/).filter(Boolean)\n const letters = parts.length > 1 ? parts[0][0] + parts[parts.length - 1][0] : name.slice(0, 2)\n return letters.toUpperCase()\n}\n\n/** A member's avatar initials and name. */\nexport function PersonChip({ name }: { name: string }) {\n return (\n <span className=\"inline-flex min-w-0 items-center gap-1.5 text-sm\">\n <span\n aria-hidden\n className=\"flex size-5 shrink-0 items-center justify-center rounded-full bg-muted text-[10px] font-medium text-muted-foreground\"\n >\n {initials(name)}\n </span>\n <span className=\"truncate\">{name}</span>\n </span>\n )\n}\n\n/** A document or related row as a chip; a document chip opens the document when clicked. */\nexport function LinkChip({\n label,\n kind,\n onOpen,\n testId,\n openLabel,\n className,\n suffix,\n}: {\n label: string\n kind: 'document' | 'relation'\n onOpen?: () => void\n testId?: string\n /** The button's accessible name, when a click does something other than the label says. */\n openLabel?: string\n className?: string\n /** Shown after the label and never cut with it (a count). */\n suffix?: string\n}) {\n const Icon = kind === 'document' ? FileText : ArrowUpRight\n const full = suffix ? `${label} ${suffix}` : label\n const body = (\n <>\n <Icon className=\"size-3 shrink-0 text-muted-foreground\" aria-hidden />\n <span className=\"truncate\">{label}</span>\n {suffix && (\n <span className=\"shrink-0 tabular-nums text-muted-foreground\" data-slot=\"chip-suffix\">\n {` ${suffix}`}\n </span>\n )}\n </>\n )\n if (!onOpen) {\n return (\n <span className={cn(CHIP, className)} title={full} data-testid={testId}>\n {body}\n </span>\n )\n }\n // The grid edits on double-click: a click on the chip opens the document and nothing else.\n const stop = (e: MouseEvent) => e.stopPropagation()\n return (\n <button\n type=\"button\"\n title={full}\n aria-label={openLabel}\n data-testid={testId}\n onClick={(e) => {\n e.stopPropagation()\n onOpen()\n }}\n onDoubleClick={stop}\n onMouseDown={stop}\n className={cn(CHIP, 'hover:bg-muted hover:underline', className)}\n >\n {body}\n </button>\n )\n}\n\n/** Chips on one line (a grid cell), or wrapping onto more (`wrap`: a row's detail). */\nfunction ChipRow({ children, wrap }: { children: ReactNode; wrap?: boolean }) {\n return (\n <span\n className={cn(\n 'flex min-w-0 items-center gap-1',\n wrap ? 'flex-wrap py-0.5' : 'h-full overflow-hidden'\n )}\n >\n {children}\n </span>\n )\n}\n\nexport function PersonCell({ value, titles }: { value: unknown; titles?: Record<string, string> }) {\n const [id] = cellIds(value)\n return id ? <PersonChip name={titleOf(id, titles)} /> : null\n}\n\nexport function LinkChipsCell({\n value,\n titles,\n kind,\n onOpenDocument,\n wrap,\n}: {\n value: unknown\n titles?: Record<string, string>\n kind: 'document' | 'relation'\n onOpenDocument?: (id: string) => void\n wrap?: boolean\n}) {\n const ids = cellIds(value)\n if (ids.length === 0) return null\n return (\n <ChipRow wrap={wrap}>\n {ids.map((id) => (\n <LinkChip\n key={id}\n label={titleOf(id, titles)}\n kind={kind}\n testId={`database-chip-${id}`}\n onOpen={kind === 'document' && onOpenDocument ? () => onOpenDocument(id) : undefined}\n />\n ))}\n </ChipRow>\n )\n}\n\n/** A lookup's values: related rows and documents as chips, anything else as quiet tags. */\nexport function LookupCell({\n value,\n titles,\n locale,\n wrap,\n}: {\n value: unknown\n titles?: Record<string, string>\n locale?: string\n wrap?: boolean\n}) {\n const values = cellList(value)\n if (values.length === 0) return null\n return (\n <ChipRow wrap={wrap}>\n {values.map((v, i) => {\n const text = formatLookupValue(v, titles, locale)\n const key = `${i}-${text}`\n if (typeof v === 'string' && /^doc-/.test(v))\n return <LinkChip key={key} label={text} kind=\"document\" />\n if (typeof v === 'string' && /^dbr-/.test(v))\n return <LinkChip key={key} label={text} kind=\"relation\" />\n return (\n <span\n key={key}\n title={text}\n className=\"inline-flex h-[22px] min-w-0 max-w-[14rem] shrink-0 items-center truncate rounded-md bg-muted/60 px-1.5 text-xs text-foreground\"\n >\n {text}\n </span>\n )\n })}\n </ChipRow>\n )\n}\n"],
|
|
5
|
+
"mappings": ";AAsGI,SAmCA,UAlCE,KADF;AA9FJ,SAAS,cAAc,gBAAgB;AACvC,SAAS,UAAU;AAEnB;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AAwBA,SAAS,eACd,QACA,QACiC;AACjC,MAAI,CAAC,OAAQ,QAAO;AACpB,QAAM,QAAQ,OAAO,SAAS,SAAS,OAAO,UAAU,CAAC,OAAO;AAChE,MAAI,CAAC,OAAO,QAAQ,KAAK,CAAC,MAAM,EAAE,IAAI,EAAG,QAAO;AAChD,SAAO;AAAA,IACL,SAAS,OAAO,QAAQ,OAAO,CAAC,MAAM,CAAC,EAAE,QAAQ,MAAM,SAAS,EAAE,IAAI,CAAC;AAAA,IACvE,UAAU,MAAM,SAAS,OAAO,IAAI,OAAO,WAAW,YAAY;AAAA,EACpE;AACF;AAqCA,MAAM,OACJ;AAEF,SAAS,SAAS,MAAsB;AACtC,QAAM,QAAQ,KAAK,KAAK,EAAE,MAAM,KAAK,EAAE,OAAO,OAAO;AACrD,QAAM,UAAU,MAAM,SAAS,IAAI,MAAM,CAAC,EAAE,CAAC,IAAI,MAAM,MAAM,SAAS,CAAC,EAAE,CAAC,IAAI,KAAK,MAAM,GAAG,CAAC;AAC7F,SAAO,QAAQ,YAAY;AAC7B;AAGO,SAAS,WAAW,EAAE,KAAK,GAAqB;AACrD,SACE,qBAAC,UAAK,WAAU,oDACd;AAAA;AAAA,MAAC;AAAA;AAAA,QACC,eAAW;AAAA,QACX,WAAU;AAAA,QAET,mBAAS,IAAI;AAAA;AAAA,IAChB;AAAA,IACA,oBAAC,UAAK,WAAU,YAAY,gBAAK;AAAA,KACnC;AAEJ;AAGO,SAAS,SAAS;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAUG;AACD,QAAM,OAAO,SAAS,aAAa,WAAW;AAC9C,QAAM,OAAO,SAAS,GAAG,KAAK,IAAI,MAAM,KAAK;AAC7C,QAAM,OACJ,iCACE;AAAA,wBAAC,QAAK,WAAU,yCAAwC,eAAW,MAAC;AAAA,IACpE,oBAAC,UAAK,WAAU,YAAY,iBAAM;AAAA,IACjC,UACC,oBAAC,UAAK,WAAU,+CAA8C,aAAU,eACrE,cAAI,MAAM,IACb;AAAA,KAEJ;AAEF,MAAI,CAAC,QAAQ;AACX,WACE,oBAAC,UAAK,WAAW,GAAG,MAAM,SAAS,GAAG,OAAO,MAAM,eAAa,QAC7D,gBACH;AAAA,EAEJ;AAEA,QAAM,OAAO,CAAC,MAAkB,EAAE,gBAAgB;AAClD,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAK;AAAA,MACL,OAAO;AAAA,MACP,cAAY;AAAA,MACZ,eAAa;AAAA,MACb,SAAS,CAAC,MAAM;AACd,UAAE,gBAAgB;AAClB,eAAO;AAAA,MACT;AAAA,MACA,eAAe;AAAA,MACf,aAAa;AAAA,MACb,WAAW,GAAG,MAAM,kCAAkC,SAAS;AAAA,MAE9D;AAAA;AAAA,EACH;AAEJ;AAGA,SAAS,QAAQ,EAAE,UAAU,KAAK,GAA4C;AAC5E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW;AAAA,QACT;AAAA,QACA,OAAO,qBAAqB;AAAA,MAC9B;AAAA,MAEC;AAAA;AAAA,EACH;AAEJ;AAEO,SAAS,WAAW,EAAE,OAAO,OAAO,GAAwD;AACjG,QAAM,CAAC,EAAE,IAAI,QAAQ,KAAK;AAC1B,SAAO,KAAK,oBAAC,cAAW,MAAM,QAAQ,IAAI,MAAM,GAAG,IAAK;AAC1D;AAEO,SAAS,cAAc;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAMG;AACD,QAAM,MAAM,QAAQ,KAAK;AACzB,MAAI,IAAI,WAAW,EAAG,QAAO;AAC7B,SACE,oBAAC,WAAQ,MACN,cAAI,IAAI,CAAC,OACR;AAAA,IAAC;AAAA;AAAA,MAEC,OAAO,QAAQ,IAAI,MAAM;AAAA,MACzB;AAAA,MACA,QAAQ,iBAAiB,EAAE;AAAA,MAC3B,QAAQ,SAAS,cAAc,iBAAiB,MAAM,eAAe,EAAE,IAAI;AAAA;AAAA,IAJtE;AAAA,EAKP,CACD,GACH;AAEJ;AAGO,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAKG;AACD,QAAM,SAAS,SAAS,KAAK;AAC7B,MAAI,OAAO,WAAW,EAAG,QAAO;AAChC,SACE,oBAAC,WAAQ,MACN,iBAAO,IAAI,CAAC,GAAG,MAAM;AACpB,UAAM,OAAO,kBAAkB,GAAG,QAAQ,MAAM;AAChD,UAAM,MAAM,GAAG,CAAC,IAAI,IAAI;AACxB,QAAI,OAAO,MAAM,YAAY,QAAQ,KAAK,CAAC;AACzC,aAAO,oBAAC,YAAmB,OAAO,MAAM,MAAK,cAAvB,GAAkC;AAC1D,QAAI,OAAO,MAAM,YAAY,QAAQ,KAAK,CAAC;AACzC,aAAO,oBAAC,YAAmB,OAAO,MAAM,MAAK,cAAvB,GAAkC;AAC1D,WACE;AAAA,MAAC;AAAA;AAAA,QAEC,OAAO;AAAA,QACP,WAAU;AAAA,QAET;AAAA;AAAA,MAJI;AAAA,IAKP;AAAA,EAEJ,CAAC,GACH;AAEJ;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/embed/index.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
5
|
-
require('../chunk-
|
|
6
|
-
require('../chunk-
|
|
4
|
+
var chunkHS626TSS_cjs = require('../chunk-HS626TSS.cjs');
|
|
5
|
+
require('../chunk-R27P7TYW.cjs');
|
|
6
|
+
require('../chunk-7KUTY4N5.cjs');
|
|
7
7
|
require('../chunk-H3C5BY2H.cjs');
|
|
8
8
|
require('../chunk-LIAC6O7W.cjs');
|
|
9
9
|
require('../chunk-ER2MRSLT.cjs');
|
|
@@ -19,7 +19,7 @@ require('../chunk-SFAAOEQE.cjs');
|
|
|
19
19
|
require('../chunk-223D4727.cjs');
|
|
20
20
|
require('../chunk-DTMBAFIL.cjs');
|
|
21
21
|
require('../chunk-SOT7NPIB.cjs');
|
|
22
|
-
require('../chunk-
|
|
22
|
+
require('../chunk-LUOL7TEY.cjs');
|
|
23
23
|
require('../chunk-76S6WTEC.cjs');
|
|
24
24
|
require('../chunk-GISMY7J7.cjs');
|
|
25
25
|
require('../chunk-V5P5MRSR.cjs');
|
|
@@ -53,7 +53,7 @@ require('../chunk-S237ORM3.cjs');
|
|
|
53
53
|
require('../chunk-II2OEXHW.cjs');
|
|
54
54
|
require('../chunk-3YEXZX4H.cjs');
|
|
55
55
|
require('../chunk-4PA6VCCR.cjs');
|
|
56
|
-
require('../chunk-
|
|
56
|
+
require('../chunk-U2T66I7C.cjs');
|
|
57
57
|
require('../chunk-AHDJXIUB.cjs');
|
|
58
58
|
require('../chunk-S3GVFAFB.cjs');
|
|
59
59
|
require('../chunk-6UZC4XVV.cjs');
|
|
@@ -69,8 +69,6 @@ require('../chunk-V6C2MBFY.cjs');
|
|
|
69
69
|
require('../chunk-5OD6DRG7.cjs');
|
|
70
70
|
require('../chunk-M74FWYNL.cjs');
|
|
71
71
|
require('../chunk-PIKTGP55.cjs');
|
|
72
|
-
require('../chunk-QUMUAJ2P.cjs');
|
|
73
|
-
require('../chunk-VZOOGA47.cjs');
|
|
74
72
|
require('../chunk-7VUO4QZH.cjs');
|
|
75
73
|
require('../chunk-LYJFE37D.cjs');
|
|
76
74
|
require('../chunk-Z574BY3H.cjs');
|
|
@@ -88,32 +86,34 @@ require('../chunk-PPCATBOY.cjs');
|
|
|
88
86
|
require('../chunk-ZT5MIFLC.cjs');
|
|
89
87
|
require('../chunk-LJJJ6CYH.cjs');
|
|
90
88
|
require('../chunk-PLIF5CUV.cjs');
|
|
89
|
+
require('../chunk-QUMUAJ2P.cjs');
|
|
90
|
+
require('../chunk-VZOOGA47.cjs');
|
|
91
91
|
|
|
92
92
|
|
|
93
93
|
|
|
94
94
|
Object.defineProperty(exports, "ArbiChat", {
|
|
95
95
|
enumerable: true,
|
|
96
|
-
get: function () { return
|
|
96
|
+
get: function () { return chunkHS626TSS_cjs.ArbiChat; }
|
|
97
97
|
});
|
|
98
98
|
Object.defineProperty(exports, "ConnectedCompactLogin", {
|
|
99
99
|
enumerable: true,
|
|
100
|
-
get: function () { return
|
|
100
|
+
get: function () { return chunkHS626TSS_cjs.ConnectedCompactLogin; }
|
|
101
101
|
});
|
|
102
102
|
Object.defineProperty(exports, "ConnectedEmbeddedChat", {
|
|
103
103
|
enumerable: true,
|
|
104
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkHS626TSS_cjs.ConnectedEmbeddedChat; }
|
|
105
105
|
});
|
|
106
106
|
Object.defineProperty(exports, "ConnectedLoginPage", {
|
|
107
107
|
enumerable: true,
|
|
108
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkHS626TSS_cjs.ConnectedLoginPage; }
|
|
109
109
|
});
|
|
110
110
|
Object.defineProperty(exports, "EmbeddedChatPanel", {
|
|
111
111
|
enumerable: true,
|
|
112
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkHS626TSS_cjs.EmbeddedChatPanel; }
|
|
113
113
|
});
|
|
114
114
|
Object.defineProperty(exports, "defaultHost", {
|
|
115
115
|
enumerable: true,
|
|
116
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkHS626TSS_cjs.defaultHost; }
|
|
117
117
|
});
|
|
118
118
|
Object.defineProperty(exports, "useConnection", {
|
|
119
119
|
enumerable: true,
|
package/dist/facts/index.cjs
CHANGED
|
@@ -1,27 +1,25 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var chunkVD3HI5RF_cjs = require('../chunk-VD3HI5RF.cjs');
|
|
5
5
|
var chunkCWECDS4I_cjs = require('../chunk-CWECDS4I.cjs');
|
|
6
6
|
var chunk4XKROAMO_cjs = require('../chunk-4XKROAMO.cjs');
|
|
7
7
|
require('../chunk-76S6WTEC.cjs');
|
|
8
|
-
var
|
|
9
|
-
var chunkKHZEFLQC_cjs = require('../chunk-KHZEFLQC.cjs');
|
|
8
|
+
var chunk26KJYXYH_cjs = require('../chunk-26KJYXYH.cjs');
|
|
10
9
|
var chunkGISMY7J7_cjs = require('../chunk-GISMY7J7.cjs');
|
|
11
10
|
require('../chunk-SNUBQMIS.cjs');
|
|
12
11
|
require('../chunk-5K6XHSAM.cjs');
|
|
13
12
|
var chunkRC25WMVB_cjs = require('../chunk-RC25WMVB.cjs');
|
|
14
|
-
require('../chunk-
|
|
15
|
-
require('../chunk-GXJW5EK5.cjs');
|
|
13
|
+
require('../chunk-66IOCKWS.cjs');
|
|
16
14
|
require('../chunk-S3GVFAFB.cjs');
|
|
17
15
|
require('../chunk-6UZC4XVV.cjs');
|
|
18
|
-
require('../chunk-QUMUAJ2P.cjs');
|
|
19
16
|
require('../chunk-SJSGSHIT.cjs');
|
|
20
17
|
require('../chunk-HN56WWBR.cjs');
|
|
21
18
|
require('../chunk-K67VMSOX.cjs');
|
|
22
19
|
require('../chunk-CVPV4I7Z.cjs');
|
|
23
20
|
require('../chunk-PPCATBOY.cjs');
|
|
24
21
|
require('../chunk-PLIF5CUV.cjs');
|
|
22
|
+
require('../chunk-QUMUAJ2P.cjs');
|
|
25
23
|
|
|
26
24
|
// src/facts/fact-row.ts
|
|
27
25
|
function toFactRow(record) {
|
|
@@ -47,151 +45,151 @@ function toFactRows(records) {
|
|
|
47
45
|
|
|
48
46
|
Object.defineProperty(exports, "DEFAULT_FACTS_BULK_BAR_LABELS", {
|
|
49
47
|
enumerable: true,
|
|
50
|
-
get: function () { return
|
|
48
|
+
get: function () { return chunkVD3HI5RF_cjs.DEFAULT_FACTS_BULK_BAR_LABELS; }
|
|
51
49
|
});
|
|
52
50
|
Object.defineProperty(exports, "DEFAULT_FACTS_EMPTY_STATE_LABELS", {
|
|
53
51
|
enumerable: true,
|
|
54
|
-
get: function () { return
|
|
52
|
+
get: function () { return chunkVD3HI5RF_cjs.DEFAULT_FACTS_EMPTY_STATE_LABELS; }
|
|
55
53
|
});
|
|
56
54
|
Object.defineProperty(exports, "DEFAULT_FACTS_FIELDS_BUTTON_LABELS", {
|
|
57
55
|
enumerable: true,
|
|
58
|
-
get: function () { return
|
|
56
|
+
get: function () { return chunkVD3HI5RF_cjs.DEFAULT_FACTS_FIELDS_BUTTON_LABELS; }
|
|
59
57
|
});
|
|
60
58
|
Object.defineProperty(exports, "DEFAULT_FACTS_SCOPE_PICKER_LABELS", {
|
|
61
59
|
enumerable: true,
|
|
62
|
-
get: function () { return
|
|
60
|
+
get: function () { return chunkVD3HI5RF_cjs.DEFAULT_FACTS_SCOPE_PICKER_LABELS; }
|
|
63
61
|
});
|
|
64
62
|
Object.defineProperty(exports, "DEFAULT_FACTS_TOOLBAR_LABELS", {
|
|
65
63
|
enumerable: true,
|
|
66
|
-
get: function () { return
|
|
64
|
+
get: function () { return chunkVD3HI5RF_cjs.DEFAULT_FACTS_TOOLBAR_LABELS; }
|
|
67
65
|
});
|
|
68
66
|
Object.defineProperty(exports, "DEFAULT_FACTS_VIEW_TOGGLE_LABELS", {
|
|
69
67
|
enumerable: true,
|
|
70
|
-
get: function () { return
|
|
68
|
+
get: function () { return chunkVD3HI5RF_cjs.DEFAULT_FACTS_VIEW_TOGGLE_LABELS; }
|
|
71
69
|
});
|
|
72
70
|
Object.defineProperty(exports, "DEFAULT_FACT_COLUMN_LABELS", {
|
|
73
71
|
enumerable: true,
|
|
74
|
-
get: function () { return
|
|
72
|
+
get: function () { return chunkVD3HI5RF_cjs.DEFAULT_FACT_COLUMN_LABELS; }
|
|
75
73
|
});
|
|
76
74
|
Object.defineProperty(exports, "DEFAULT_FACT_COLUMN_ORDER", {
|
|
77
75
|
enumerable: true,
|
|
78
|
-
get: function () { return
|
|
76
|
+
get: function () { return chunkVD3HI5RF_cjs.DEFAULT_FACT_COLUMN_ORDER; }
|
|
79
77
|
});
|
|
80
78
|
Object.defineProperty(exports, "DEFAULT_FACT_COMPOSER_LABELS", {
|
|
81
79
|
enumerable: true,
|
|
82
|
-
get: function () { return
|
|
80
|
+
get: function () { return chunkVD3HI5RF_cjs.DEFAULT_FACT_COMPOSER_LABELS; }
|
|
83
81
|
});
|
|
84
82
|
Object.defineProperty(exports, "DEFAULT_FACT_ROW_ACTIONS_LABELS", {
|
|
85
83
|
enumerable: true,
|
|
86
|
-
get: function () { return
|
|
84
|
+
get: function () { return chunkVD3HI5RF_cjs.DEFAULT_FACT_ROW_ACTIONS_LABELS; }
|
|
87
85
|
});
|
|
88
86
|
Object.defineProperty(exports, "DEFAULT_FACT_SEARCH_BAR_LABELS", {
|
|
89
87
|
enumerable: true,
|
|
90
|
-
get: function () { return
|
|
88
|
+
get: function () { return chunkVD3HI5RF_cjs.DEFAULT_FACT_SEARCH_BAR_LABELS; }
|
|
91
89
|
});
|
|
92
90
|
Object.defineProperty(exports, "DEFAULT_FACT_SEARCH_RESULT_LABELS", {
|
|
93
91
|
enumerable: true,
|
|
94
|
-
get: function () { return
|
|
92
|
+
get: function () { return chunkVD3HI5RF_cjs.DEFAULT_FACT_SEARCH_RESULT_LABELS; }
|
|
95
93
|
});
|
|
96
94
|
Object.defineProperty(exports, "DEFAULT_FACT_SOURCES_ROW_LABELS", {
|
|
97
95
|
enumerable: true,
|
|
98
|
-
get: function () { return
|
|
96
|
+
get: function () { return chunkVD3HI5RF_cjs.DEFAULT_FACT_SOURCES_ROW_LABELS; }
|
|
99
97
|
});
|
|
100
98
|
Object.defineProperty(exports, "DEFAULT_FACT_TIMELINE_LABELS", {
|
|
101
99
|
enumerable: true,
|
|
102
|
-
get: function () { return
|
|
100
|
+
get: function () { return chunkVD3HI5RF_cjs.DEFAULT_FACT_TIMELINE_LABELS; }
|
|
103
101
|
});
|
|
104
102
|
Object.defineProperty(exports, "FactComposer", {
|
|
105
103
|
enumerable: true,
|
|
106
|
-
get: function () { return
|
|
104
|
+
get: function () { return chunkVD3HI5RF_cjs.FactComposer; }
|
|
107
105
|
});
|
|
108
106
|
Object.defineProperty(exports, "FactFieldRow", {
|
|
109
107
|
enumerable: true,
|
|
110
|
-
get: function () { return
|
|
108
|
+
get: function () { return chunkVD3HI5RF_cjs.FactFieldRow; }
|
|
111
109
|
});
|
|
112
110
|
Object.defineProperty(exports, "FactRowActions", {
|
|
113
111
|
enumerable: true,
|
|
114
|
-
get: function () { return
|
|
112
|
+
get: function () { return chunkVD3HI5RF_cjs.FactRowActions; }
|
|
115
113
|
});
|
|
116
114
|
Object.defineProperty(exports, "FactSearchBar", {
|
|
117
115
|
enumerable: true,
|
|
118
|
-
get: function () { return
|
|
116
|
+
get: function () { return chunkVD3HI5RF_cjs.FactSearchBar; }
|
|
119
117
|
});
|
|
120
118
|
Object.defineProperty(exports, "FactSearchNoMatches", {
|
|
121
119
|
enumerable: true,
|
|
122
|
-
get: function () { return
|
|
120
|
+
get: function () { return chunkVD3HI5RF_cjs.FactSearchNoMatches; }
|
|
123
121
|
});
|
|
124
122
|
Object.defineProperty(exports, "FactSearchPending", {
|
|
125
123
|
enumerable: true,
|
|
126
|
-
get: function () { return
|
|
124
|
+
get: function () { return chunkVD3HI5RF_cjs.FactSearchPending; }
|
|
127
125
|
});
|
|
128
126
|
Object.defineProperty(exports, "FactSearchResult", {
|
|
129
127
|
enumerable: true,
|
|
130
|
-
get: function () { return
|
|
128
|
+
get: function () { return chunkVD3HI5RF_cjs.FactSearchResult; }
|
|
131
129
|
});
|
|
132
130
|
Object.defineProperty(exports, "FactSearchTotals", {
|
|
133
131
|
enumerable: true,
|
|
134
|
-
get: function () { return
|
|
132
|
+
get: function () { return chunkVD3HI5RF_cjs.FactSearchTotals; }
|
|
135
133
|
});
|
|
136
134
|
Object.defineProperty(exports, "FactSourcesRow", {
|
|
137
135
|
enumerable: true,
|
|
138
|
-
get: function () { return
|
|
136
|
+
get: function () { return chunkVD3HI5RF_cjs.FactSourcesRow; }
|
|
139
137
|
});
|
|
140
138
|
Object.defineProperty(exports, "FactsBulkBar", {
|
|
141
139
|
enumerable: true,
|
|
142
|
-
get: function () { return
|
|
140
|
+
get: function () { return chunkVD3HI5RF_cjs.FactsBulkBar; }
|
|
143
141
|
});
|
|
144
142
|
Object.defineProperty(exports, "FactsCalendar", {
|
|
145
143
|
enumerable: true,
|
|
146
|
-
get: function () { return
|
|
144
|
+
get: function () { return chunkVD3HI5RF_cjs.FactsCalendar; }
|
|
147
145
|
});
|
|
148
146
|
Object.defineProperty(exports, "FactsEmptyState", {
|
|
149
147
|
enumerable: true,
|
|
150
|
-
get: function () { return
|
|
148
|
+
get: function () { return chunkVD3HI5RF_cjs.FactsEmptyState; }
|
|
151
149
|
});
|
|
152
150
|
Object.defineProperty(exports, "FactsFieldsButton", {
|
|
153
151
|
enumerable: true,
|
|
154
|
-
get: function () { return
|
|
152
|
+
get: function () { return chunkVD3HI5RF_cjs.FactsFieldsButton; }
|
|
155
153
|
});
|
|
156
154
|
Object.defineProperty(exports, "FactsGanttPane", {
|
|
157
155
|
enumerable: true,
|
|
158
|
-
get: function () { return
|
|
156
|
+
get: function () { return chunkVD3HI5RF_cjs.FactsGanttPane; }
|
|
159
157
|
});
|
|
160
158
|
Object.defineProperty(exports, "FactsLoadError", {
|
|
161
159
|
enumerable: true,
|
|
162
|
-
get: function () { return
|
|
160
|
+
get: function () { return chunkVD3HI5RF_cjs.FactsLoadError; }
|
|
163
161
|
});
|
|
164
162
|
Object.defineProperty(exports, "FactsLoading", {
|
|
165
163
|
enumerable: true,
|
|
166
|
-
get: function () { return
|
|
164
|
+
get: function () { return chunkVD3HI5RF_cjs.FactsLoading; }
|
|
167
165
|
});
|
|
168
166
|
Object.defineProperty(exports, "FactsScopePicker", {
|
|
169
167
|
enumerable: true,
|
|
170
|
-
get: function () { return
|
|
168
|
+
get: function () { return chunkVD3HI5RF_cjs.FactsScopePicker; }
|
|
171
169
|
});
|
|
172
170
|
Object.defineProperty(exports, "FactsToolbar", {
|
|
173
171
|
enumerable: true,
|
|
174
|
-
get: function () { return
|
|
172
|
+
get: function () { return chunkVD3HI5RF_cjs.FactsToolbar; }
|
|
175
173
|
});
|
|
176
174
|
Object.defineProperty(exports, "FactsViewToggle", {
|
|
177
175
|
enumerable: true,
|
|
178
|
-
get: function () { return
|
|
176
|
+
get: function () { return chunkVD3HI5RF_cjs.FactsViewToggle; }
|
|
179
177
|
});
|
|
180
178
|
Object.defineProperty(exports, "ISO_DATE_FILTER_PARAMS", {
|
|
181
179
|
enumerable: true,
|
|
182
|
-
get: function () { return
|
|
180
|
+
get: function () { return chunkVD3HI5RF_cjs.ISO_DATE_FILTER_PARAMS; }
|
|
183
181
|
});
|
|
184
182
|
Object.defineProperty(exports, "createFactColumns", {
|
|
185
183
|
enumerable: true,
|
|
186
|
-
get: function () { return
|
|
184
|
+
get: function () { return chunkVD3HI5RF_cjs.createFactColumns; }
|
|
187
185
|
});
|
|
188
186
|
Object.defineProperty(exports, "enableFactTableColumnResize", {
|
|
189
187
|
enumerable: true,
|
|
190
|
-
get: function () { return
|
|
188
|
+
get: function () { return chunkVD3HI5RF_cjs.enableFactTableColumnResize; }
|
|
191
189
|
});
|
|
192
190
|
Object.defineProperty(exports, "sourceDocCount", {
|
|
193
191
|
enumerable: true,
|
|
194
|
-
get: function () { return
|
|
192
|
+
get: function () { return chunkVD3HI5RF_cjs.sourceDocCount; }
|
|
195
193
|
});
|
|
196
194
|
Object.defineProperty(exports, "buildFactCitations", {
|
|
197
195
|
enumerable: true,
|
|
@@ -265,29 +263,29 @@ Object.defineProperty(exports, "toPreviewLine", {
|
|
|
265
263
|
enumerable: true,
|
|
266
264
|
get: function () { return chunk4XKROAMO_cjs.toPreviewLine; }
|
|
267
265
|
});
|
|
268
|
-
Object.defineProperty(exports, "DEFAULT_FACT_SOURCE_GROUP_LABELS", {
|
|
269
|
-
enumerable: true,
|
|
270
|
-
get: function () { return chunkI24N4OSB_cjs.DEFAULT_FACT_SOURCE_GROUP_LABELS; }
|
|
271
|
-
});
|
|
272
|
-
Object.defineProperty(exports, "FactSourceGroup", {
|
|
273
|
-
enumerable: true,
|
|
274
|
-
get: function () { return chunkI24N4OSB_cjs.FactSourceGroup; }
|
|
275
|
-
});
|
|
276
266
|
Object.defineProperty(exports, "DEFAULT_FACT_DATE_INPUT_LABELS", {
|
|
277
267
|
enumerable: true,
|
|
278
|
-
get: function () { return
|
|
268
|
+
get: function () { return chunk26KJYXYH_cjs.DEFAULT_FACT_DATE_INPUT_LABELS; }
|
|
279
269
|
});
|
|
280
270
|
Object.defineProperty(exports, "DEFAULT_FACT_LABELS_CELL_LABELS", {
|
|
281
271
|
enumerable: true,
|
|
282
|
-
get: function () { return
|
|
272
|
+
get: function () { return chunk26KJYXYH_cjs.DEFAULT_FACT_LABELS_CELL_LABELS; }
|
|
273
|
+
});
|
|
274
|
+
Object.defineProperty(exports, "DEFAULT_FACT_SOURCE_GROUP_LABELS", {
|
|
275
|
+
enumerable: true,
|
|
276
|
+
get: function () { return chunk26KJYXYH_cjs.DEFAULT_FACT_SOURCE_GROUP_LABELS; }
|
|
283
277
|
});
|
|
284
278
|
Object.defineProperty(exports, "FactDateInput", {
|
|
285
279
|
enumerable: true,
|
|
286
|
-
get: function () { return
|
|
280
|
+
get: function () { return chunk26KJYXYH_cjs.FactDateInput; }
|
|
287
281
|
});
|
|
288
282
|
Object.defineProperty(exports, "FactLabelsCell", {
|
|
289
283
|
enumerable: true,
|
|
290
|
-
get: function () { return
|
|
284
|
+
get: function () { return chunk26KJYXYH_cjs.FactLabelsCell; }
|
|
285
|
+
});
|
|
286
|
+
Object.defineProperty(exports, "FactSourceGroup", {
|
|
287
|
+
enumerable: true,
|
|
288
|
+
get: function () { return chunk26KJYXYH_cjs.FactSourceGroup; }
|
|
291
289
|
});
|
|
292
290
|
Object.defineProperty(exports, "EMPTY_FACT_DATE_FIELDS", {
|
|
293
291
|
enumerable: true,
|
package/dist/facts/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/facts/fact-row.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../../src/facts/fact-row.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA4BO,SAAS,UAAqC,MAAA,EAA4B;AAC/E,EAAA,OAAO;AAAA,IACL,aAAa,MAAA,CAAO,EAAA;AAAA,IACpB,MAAM,MAAA,CAAO,IAAA;AAAA,IACb,SAAA,EAAW,OAAO,SAAA,IAAa,KAAA;AAAA,IAC/B,MAAA,EAAQ,OAAO,MAAA,IAAU,KAAA;AAAA,IACzB,UAAA,EAAY,OAAO,SAAA,IAAa,IAAA;AAAA,IAChC,QAAA,EAAU,OAAO,OAAA,IAAW,IAAA;AAAA,IAC5B,QAAA,EAAU,OAAO,QAAA,IAAY,IAAA;AAAA,IAC7B,IAAA,EAAA,CAAO,MAAA,CAAO,IAAA,IAAQ,IAAI,GAAA,CAAI,CAAC,CAAA,KAAO,OAAO,MAAM,QAAA,GAAW,EAAE,IAAA,EAAM,CAAA,KAAM,CAAE,CAAA;AAAA,IAC9E,SAAA,EAAW,MAAA,CAAO,SAAA,IAAa,EAAC;AAAA,IAChC,iBAAA,EAAmB,OAAO,SAAA,IAAa,IAAA;AAAA,IACvC,UAAA,EAAY,OAAO,SAAA,IAAa,IAAA;AAAA,IAChC,UAAA,EAAY,OAAO,SAAA,IAAa,IAAA;AAAA,IAChC;AAAA,GACF;AACF;AAEO,SAAS,WAAsC,OAAA,EAAiC;AACrF,EAAA,OAAO,OAAA,CAAQ,IAAI,SAAS,CAAA;AAC9B","file":"index.cjs","sourcesContent":["import type { FactRowView } from './factColumns'\n\n/**\n * A fact as a host with plain records usually holds it: camelCase, optional flags, tags as\n * strings. `toFactRow` maps it to the `FactRowView` that `createFactColumns`\n * reads, so a host without the SDK type needs no adapter of its own.\n */\nexport interface PlainFactRecord {\n id: string\n text: string\n confirmed?: boolean\n shared?: boolean\n /** ISO date (or date-time) the fact starts. */\n dateStart?: string | null\n dateEnd?: string | null\n timezone?: string | null\n tags?: Array<string | { name: string }> | null\n /** Passages that support the fact; only their count is shown. */\n citations?: unknown[] | null\n createdBy?: string | null\n createdAt?: string | null\n updatedAt?: string | null\n}\n\n/** The row plus the record it came from, so callbacks can hand the host its own object back. */\nexport type PlainFactRow<T extends PlainFactRecord> = FactRowView & { record: T }\n\n/** Map one plain record to a grid row. Missing flags are `false`, missing lists are empty. */\nexport function toFactRow<T extends PlainFactRecord>(record: T): PlainFactRow<T> {\n return {\n external_id: record.id,\n text: record.text,\n confirmed: record.confirmed ?? false,\n shared: record.shared ?? false,\n date_start: record.dateStart ?? null,\n date_end: record.dateEnd ?? null,\n timezone: record.timezone ?? null,\n tags: (record.tags ?? []).map((t) => (typeof t === 'string' ? { name: t } : t)),\n citations: record.citations ?? [],\n created_by_ext_id: record.createdBy ?? null,\n created_at: record.createdAt ?? null,\n updated_at: record.updatedAt ?? null,\n record,\n }\n}\n\nexport function toFactRows<T extends PlainFactRecord>(records: T[]): PlainFactRow<T>[] {\n return records.map(toFactRow)\n}\n"]}
|