@arbidocs/blocks 0.4.5 → 0.4.6

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.
Files changed (131) hide show
  1. package/README.md +46 -6
  2. package/dist/agents/index.cjs +163 -162
  3. package/dist/agents/index.js +6 -5
  4. package/dist/chat/ChatMessageContent.d.ts +16 -0
  5. package/dist/chat/ChatPage.d.ts +11 -8
  6. package/dist/chat/ChatThreads.d.ts +3 -1
  7. package/dist/chat/CitationMark.d.ts +18 -0
  8. package/dist/chat/chat-page-types.d.ts +75 -1
  9. package/dist/chat/index.cjs +126 -117
  10. package/dist/chat/index.d.ts +3 -1
  11. package/dist/chat/index.js +5 -4
  12. package/dist/{chunk-3MIQASHO.cjs → chunk-23XL6SVZ.cjs} +39 -19
  13. package/dist/chunk-23XL6SVZ.cjs.map +1 -0
  14. package/dist/{chunk-ULWRNGGE.cjs → chunk-2ZTONLT5.cjs} +4 -25
  15. package/dist/chunk-2ZTONLT5.cjs.map +1 -0
  16. package/dist/{chunk-O637DUKS.cjs → chunk-56BUD74K.cjs} +28 -28
  17. package/dist/{chunk-O637DUKS.cjs.map → chunk-56BUD74K.cjs.map} +1 -1
  18. package/dist/{chunk-YLOKCIQJ.cjs → chunk-5SLLMK5K.cjs} +421 -115
  19. package/dist/chunk-5SLLMK5K.cjs.map +1 -0
  20. package/dist/{chunk-SS23F63U.cjs → chunk-5ZBP7TCD.cjs} +55 -3
  21. package/dist/chunk-5ZBP7TCD.cjs.map +1 -0
  22. package/dist/{chunk-3PZPRAAR.cjs → chunk-67HGXV4I.cjs} +14 -14
  23. package/dist/{chunk-3PZPRAAR.cjs.map → chunk-67HGXV4I.cjs.map} +1 -1
  24. package/dist/{chunk-RCP6THBS.js → chunk-7OCFHEE6.js} +3 -3
  25. package/dist/{chunk-RCP6THBS.js.map → chunk-7OCFHEE6.js.map} +1 -1
  26. package/dist/{chunk-TX2ZICS7.js → chunk-CPMNAJLF.js} +4 -24
  27. package/dist/chunk-CPMNAJLF.js.map +1 -0
  28. package/dist/{chunk-5XTZFH65.js → chunk-CVFBSUXL.js} +5 -5
  29. package/dist/{chunk-5XTZFH65.js.map → chunk-CVFBSUXL.js.map} +1 -1
  30. package/dist/chunk-DCDVWPMB.cjs +29 -0
  31. package/dist/chunk-DCDVWPMB.cjs.map +1 -0
  32. package/dist/{chunk-TI4UTYRL.js → chunk-EY2RJW27.js} +258 -10
  33. package/dist/chunk-EY2RJW27.js.map +1 -0
  34. package/dist/{chunk-7YADKWZT.js → chunk-G2E3O3HI.js} +3 -3
  35. package/dist/{chunk-7YADKWZT.js.map → chunk-G2E3O3HI.js.map} +1 -1
  36. package/dist/{chunk-6YHWXMPQ.js → chunk-G2T3KTZ3.js} +419 -115
  37. package/dist/chunk-G2T3KTZ3.js.map +1 -0
  38. package/dist/{chunk-2NNTQLBY.js → chunk-IAKUTBPX.js} +4 -4
  39. package/dist/{chunk-2NNTQLBY.js.map → chunk-IAKUTBPX.js.map} +1 -1
  40. package/dist/{chunk-IZHWP6WQ.cjs → chunk-JG4TFS3Z.cjs} +6 -6
  41. package/dist/{chunk-IZHWP6WQ.cjs.map → chunk-JG4TFS3Z.cjs.map} +1 -1
  42. package/dist/chunk-JLOYWXRB.js +1156 -0
  43. package/dist/chunk-JLOYWXRB.js.map +1 -0
  44. package/dist/{chunk-WJZBJUPX.js → chunk-KXMDOTGW.js} +56 -4
  45. package/dist/chunk-KXMDOTGW.js.map +1 -0
  46. package/dist/{chunk-2VBJ763Y.js → chunk-KZJAG7T3.js} +37 -7
  47. package/dist/chunk-KZJAG7T3.js.map +1 -0
  48. package/dist/{chunk-RIL7G7AS.cjs → chunk-MGUHR3JI.cjs} +4 -4
  49. package/dist/{chunk-RIL7G7AS.cjs.map → chunk-MGUHR3JI.cjs.map} +1 -1
  50. package/dist/{chunk-NPKGUQU5.js → chunk-NJL4LIXX.js} +4 -4
  51. package/dist/{chunk-NPKGUQU5.js.map → chunk-NJL4LIXX.js.map} +1 -1
  52. package/dist/{chunk-DN3NFNIA.cjs → chunk-QMDLPO3M.cjs} +266 -10
  53. package/dist/chunk-QMDLPO3M.cjs.map +1 -0
  54. package/dist/chunk-TJMKFY5P.js +27 -0
  55. package/dist/chunk-TJMKFY5P.js.map +1 -0
  56. package/dist/{chunk-3PJCET7H.js → chunk-UHVNYKV2.js} +38 -18
  57. package/dist/chunk-UHVNYKV2.js.map +1 -0
  58. package/dist/{chunk-6CHMNKXC.cjs → chunk-UTYQPVIW.cjs} +11 -11
  59. package/dist/chunk-UTYQPVIW.cjs.map +1 -0
  60. package/dist/{chunk-KHX2BX3S.cjs → chunk-VGOFFCMT.cjs} +37 -5
  61. package/dist/chunk-VGOFFCMT.cjs.map +1 -0
  62. package/dist/{chunk-67MKU5U7.js → chunk-YMHGF6R5.js} +8 -8
  63. package/dist/chunk-YMHGF6R5.js.map +1 -0
  64. package/dist/chunk-YVIOCITQ.cjs +1186 -0
  65. package/dist/chunk-YVIOCITQ.cjs.map +1 -0
  66. package/dist/{chunk-MVNCQDDE.cjs → chunk-ZVPTFTGV.cjs} +4 -4
  67. package/dist/{chunk-MVNCQDDE.cjs.map → chunk-ZVPTFTGV.cjs.map} +1 -1
  68. package/dist/collaboration/index.cjs +38 -37
  69. package/dist/collaboration/index.js +3 -2
  70. package/dist/connect/index.cjs +358 -19
  71. package/dist/connect/index.cjs.map +1 -1
  72. package/dist/connect/index.d.ts +1 -0
  73. package/dist/connect/index.js +341 -9
  74. package/dist/connect/index.js.map +1 -1
  75. package/dist/connection/ConnectedSettings.d.ts +64 -0
  76. package/dist/facts/index.cjs +2 -2
  77. package/dist/facts/index.js +2 -2
  78. package/dist/files/index.cjs +15 -14
  79. package/dist/files/index.cjs.map +1 -1
  80. package/dist/files/index.js +5 -4
  81. package/dist/files/index.js.map +1 -1
  82. package/dist/home/index.cjs +19 -19
  83. package/dist/home/index.js +4 -4
  84. package/dist/index.cjs +526 -477
  85. package/dist/index.cjs.map +1 -1
  86. package/dist/index.js +17 -16
  87. package/dist/index.js.map +1 -1
  88. package/dist/lib/bottom-inset.d.ts +16 -0
  89. package/dist/lib/useElementSize.d.ts +13 -0
  90. package/dist/lib/useFillHeight.d.ts +10 -0
  91. package/dist/settings/account-views.d.ts +55 -0
  92. package/dist/settings/index.cjs +179 -1148
  93. package/dist/settings/index.cjs.map +1 -1
  94. package/dist/settings/index.d.ts +1 -0
  95. package/dist/settings/index.js +10 -1073
  96. package/dist/settings/index.js.map +1 -1
  97. package/dist/shell/InstallPrompt.d.ts +28 -0
  98. package/dist/shell/MobileBars.d.ts +1 -1
  99. package/dist/shell/index.cjs +85 -45
  100. package/dist/shell/index.d.ts +4 -0
  101. package/dist/shell/index.js +3 -3
  102. package/dist/shell/install-instructions.d.ts +19 -0
  103. package/dist/shell/types.d.ts +6 -0
  104. package/dist/shell/use-install-prompt.d.ts +49 -0
  105. package/dist/site/index.cjs +62 -62
  106. package/dist/site/index.js +2 -2
  107. package/dist/studio/index.cjs +78 -77
  108. package/dist/studio/index.cjs.map +1 -1
  109. package/dist/studio/index.js +8 -7
  110. package/dist/studio/index.js.map +1 -1
  111. package/dist/theme/ThemeEditor.d.ts +4 -2
  112. package/dist/workspaces/index.cjs +4 -3
  113. package/dist/workspaces/index.cjs.map +1 -1
  114. package/dist/workspaces/index.js +3 -2
  115. package/dist/workspaces/index.js.map +1 -1
  116. package/package.json +8 -4
  117. package/src/blocks.css +30 -0
  118. package/dist/chunk-2VBJ763Y.js.map +0 -1
  119. package/dist/chunk-3MIQASHO.cjs.map +0 -1
  120. package/dist/chunk-3PJCET7H.js.map +0 -1
  121. package/dist/chunk-67MKU5U7.js.map +0 -1
  122. package/dist/chunk-6CHMNKXC.cjs.map +0 -1
  123. package/dist/chunk-6YHWXMPQ.js.map +0 -1
  124. package/dist/chunk-DN3NFNIA.cjs.map +0 -1
  125. package/dist/chunk-KHX2BX3S.cjs.map +0 -1
  126. package/dist/chunk-SS23F63U.cjs.map +0 -1
  127. package/dist/chunk-TI4UTYRL.js.map +0 -1
  128. package/dist/chunk-TX2ZICS7.js.map +0 -1
  129. package/dist/chunk-ULWRNGGE.cjs.map +0 -1
  130. package/dist/chunk-WJZBJUPX.js.map +0 -1
  131. package/dist/chunk-YLOKCIQJ.cjs.map +0 -1
@@ -1,15 +1,16 @@
1
1
  "use client";
2
- export { ACTION_LABELS, AgentAvatarField, AgentBar, AgentBarIconButton, AgentBarMenu, AgentBarNotes, AgentBarProbeAnswer, AgentBarQueuedNote, AgentBarStatus, AgentCard, AgentCreateView, AgentCreatedView, AgentCreator, AgentEditView, AgentGallery, AgentMainView, AgentSelect, AgentTypeSelector, CapabilityGrid, CapabilityTile, ConfigField, ConfigForm, ConsentActions, ConsentBulletList, ConsentCard, ConsentFootnote, ConsentHeader, ConsentMessage, ConsentNotice, ConsentPage, ConsentPermissionList, ConsentSection, ConsentStrong, ConsentText, CopyableUrl, DEFAULT_AGENT_AVATAR_FIELD_LABELS, DEFAULT_AGENT_BAR_LABELS, DEFAULT_AGENT_CARD_LABELS, DEFAULT_AGENT_CREATOR_LABELS, DEFAULT_AGENT_GALLERY_LABELS, DEFAULT_AGENT_SELECT_LABELS, DEFAULT_AGENT_STEPS_LABELS, DEFAULT_AGENT_TYPE_SELECTOR_LABELS, DEFAULT_AUTHORIZE_AGENT_LABELS, DEFAULT_CONFIG_FIELD_LABELS, DEFAULT_CONFIG_FORM_LABELS, DEFAULT_CONSENT_ACTIONS_LABELS, DEFAULT_COPYABLE_URL_LABELS, DEFAULT_LIVE_RUNS_BANNER_LABELS, DEFAULT_RECURRENCE, DEFAULT_RECURRENCE_BUILDER_LABELS, DEFAULT_SCHEMA_FORM_LABELS, DEFAULT_SKILL_CARD_LABELS, DEFAULT_SKILL_EDIT_FORM_LABELS, DEFAULT_SKILL_GENERATE_FORM_LABELS, DEFAULT_SKILL_GLOBAL_BADGE_LABELS, DEFAULT_SKILL_ROW_LABELS, DEFAULT_SKILL_VIEW_TOGGLE_LABELS, DEFAULT_SUBAGENT_ROSTER_LABELS, DEFAULT_TASKS_CHROME_LABELS, DEFAULT_TASK_COLUMN_LABELS, DEFAULT_TASK_COMPOSER_LABELS, DEFAULT_TASK_PLAN_LABELS, DEFAULT_TASK_ROW_ACTIONS_LABELS, DEFAULT_TASK_RUNS_DIALOG_LABELS, DEFAULT_TUPLE_ARRAY_FIELD_LABELS, DEFAULT_UPLOAD_TASK_ITEM_LABELS, DEFAULT_UPLOAD_TASK_LIST_LABELS, DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, EMPTY_WORKFLOW_SCOPE, GoalCriteria, LiveRunsBanner, NewTaskEmptyAction, RecurrenceBuilder, SKILL_PROMPT_FALLBACK_PLACEHOLDER, SKILL_PROMPT_LABEL, STATUS_LABELS, SchemaForm, SkillActionButton, SkillCard, SkillDetail, SkillDetailSection, SkillEditForm, SkillFilterChips, SkillGenerateForm, SkillGlobalBadge, SkillRow, SkillTile, SkillTypeBadge, SkillViewToggle, StepDetail, StepNarration, StepOutcome, StepParams, StepRow, StepSummary, StepTrace, StepTraceSummary, SubAgentLane, SubStepGroup, SubagentRoster, TRIGGER_LABELS, TaskComposer, TaskPlan, TaskRowActions, TaskRunsDialog, TasksBulkBar, TasksToolbar, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WorkflowConfigDialog, WorkflowLauncher, agentConfigSectionToValues, agentCreatorToConfigSection, authModeFor, buildLaunch, buildRRule, composePersona, composeWorkflowPrompt, createTaskColumns, defaultInputs, defaultTaskComposerValues, deriveAgentName, describeRRule, formatElapsed, goalProgress, humanizeSection, inferType, inputsFromContext, isAgenticWorkflow, isEmptyWorkflowScope, isOutOfBounds, isValidAgentName, isWorkflowScope, isoToLocalInput, localInputToIso, nextCriterionId, parseRRule, prettifyKey, promptFieldName, skillToWorkflow, statusBadgeVariant, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, validateInputs, workflowAccepts, workflowFromFrontmatter, workflowTaskFields, workflowsAccepting, workflowsForHost } from '../chunk-5XTZFH65.js';
2
+ export { ACTION_LABELS, AgentAvatarField, AgentBar, AgentBarIconButton, AgentBarMenu, AgentBarNotes, AgentBarProbeAnswer, AgentBarQueuedNote, AgentBarStatus, AgentCard, AgentCreateView, AgentCreatedView, AgentCreator, AgentEditView, AgentGallery, AgentMainView, AgentSelect, AgentTypeSelector, CapabilityGrid, CapabilityTile, ConfigField, ConfigForm, ConsentActions, ConsentBulletList, ConsentCard, ConsentFootnote, ConsentHeader, ConsentMessage, ConsentNotice, ConsentPage, ConsentPermissionList, ConsentSection, ConsentStrong, ConsentText, CopyableUrl, DEFAULT_AGENT_AVATAR_FIELD_LABELS, DEFAULT_AGENT_BAR_LABELS, DEFAULT_AGENT_CARD_LABELS, DEFAULT_AGENT_CREATOR_LABELS, DEFAULT_AGENT_GALLERY_LABELS, DEFAULT_AGENT_SELECT_LABELS, DEFAULT_AGENT_STEPS_LABELS, DEFAULT_AGENT_TYPE_SELECTOR_LABELS, DEFAULT_AUTHORIZE_AGENT_LABELS, DEFAULT_CONFIG_FIELD_LABELS, DEFAULT_CONFIG_FORM_LABELS, DEFAULT_CONSENT_ACTIONS_LABELS, DEFAULT_COPYABLE_URL_LABELS, DEFAULT_LIVE_RUNS_BANNER_LABELS, DEFAULT_RECURRENCE, DEFAULT_RECURRENCE_BUILDER_LABELS, DEFAULT_SCHEMA_FORM_LABELS, DEFAULT_SKILL_CARD_LABELS, DEFAULT_SKILL_EDIT_FORM_LABELS, DEFAULT_SKILL_GENERATE_FORM_LABELS, DEFAULT_SKILL_GLOBAL_BADGE_LABELS, DEFAULT_SKILL_ROW_LABELS, DEFAULT_SKILL_VIEW_TOGGLE_LABELS, DEFAULT_SUBAGENT_ROSTER_LABELS, DEFAULT_TASKS_CHROME_LABELS, DEFAULT_TASK_COLUMN_LABELS, DEFAULT_TASK_COMPOSER_LABELS, DEFAULT_TASK_PLAN_LABELS, DEFAULT_TASK_ROW_ACTIONS_LABELS, DEFAULT_TASK_RUNS_DIALOG_LABELS, DEFAULT_TUPLE_ARRAY_FIELD_LABELS, DEFAULT_UPLOAD_TASK_ITEM_LABELS, DEFAULT_UPLOAD_TASK_LIST_LABELS, DEFAULT_WORKFLOW_CONFIG_DIALOG_LABELS, EMPTY_WORKFLOW_SCOPE, GoalCriteria, LiveRunsBanner, NewTaskEmptyAction, RecurrenceBuilder, SKILL_PROMPT_FALLBACK_PLACEHOLDER, SKILL_PROMPT_LABEL, STATUS_LABELS, SchemaForm, SkillActionButton, SkillCard, SkillDetail, SkillDetailSection, SkillEditForm, SkillFilterChips, SkillGenerateForm, SkillGlobalBadge, SkillRow, SkillTile, SkillTypeBadge, SkillViewToggle, StepDetail, StepNarration, StepOutcome, StepParams, StepRow, StepSummary, StepTrace, StepTraceSummary, SubAgentLane, SubStepGroup, SubagentRoster, TRIGGER_LABELS, TaskComposer, TaskPlan, TaskRowActions, TaskRunsDialog, TasksBulkBar, TasksToolbar, TupleArrayField, UploadTaskItem, UploadTaskList, WEEKDAYS, WorkflowConfigDialog, WorkflowLauncher, agentConfigSectionToValues, agentCreatorToConfigSection, authModeFor, buildLaunch, buildRRule, composePersona, composeWorkflowPrompt, createTaskColumns, defaultInputs, defaultTaskComposerValues, deriveAgentName, describeRRule, formatElapsed, goalProgress, humanizeSection, inferType, inputsFromContext, isAgenticWorkflow, isEmptyWorkflowScope, isOutOfBounds, isValidAgentName, isWorkflowScope, isoToLocalInput, localInputToIso, nextCriterionId, parseRRule, prettifyKey, promptFieldName, skillToWorkflow, statusBadgeVariant, stripPersonaPreamble, summarizeAgent, summarizeCapabilities, taskComposerToCreateRequest, taskComposerToUpdateRequest, taskNeedsAccess, taskToComposerValues, validateInputs, workflowAccepts, workflowFromFrontmatter, workflowTaskFields, workflowsAccepting, workflowsForHost } from '../chunk-CVFBSUXL.js';
3
3
  import '../chunk-NUNKSZKU.js';
4
- import '../chunk-NPKGUQU5.js';
4
+ import '../chunk-NJL4LIXX.js';
5
5
  import '../chunk-CQCC7LE7.js';
6
6
  import '../chunk-UBNVIIBT.js';
7
- import '../chunk-NPLYHR2E.js';
8
7
  import '../chunk-P6GHJSLR.js';
9
8
  import '../chunk-S7PSMMRG.js';
10
- import '../chunk-TX2ZICS7.js';
11
9
  import '../chunk-76JDDMSP.js';
12
- import '../chunk-7F6CBP3Z.js';
10
+ import '../chunk-CPMNAJLF.js';
11
+ import '../chunk-NPLYHR2E.js';
13
12
  import '../chunk-OXF2IFXG.js';
13
+ import '../chunk-TJMKFY5P.js';
14
+ import '../chunk-7F6CBP3Z.js';
14
15
  //# sourceMappingURL=index.js.map
15
16
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,16 @@
1
+ import { type ChatCitationTarget, type ChatPageLabels, type ChatPageMessage } from './chat-page-types';
2
+ export interface ChatMessageContentProps {
3
+ message: ChatPageMessage;
4
+ labels?: Partial<ChatPageLabels>;
5
+ /** Opens the cited document in the host's viewer. */
6
+ onOpenCitation?: (target: ChatCitationTarget) => void;
7
+ className?: string;
8
+ }
9
+ /**
10
+ * The one renderer of an assistant answer, used by `ChatPage` and `AssistantDock` (the dock is the
11
+ * same page). Markdown (lists, tables, code) where each `[statement](#cite-N)` shows the statement
12
+ * as plain text followed by a quiet numbered mark; the mark opens the source popover when the
13
+ * message carries `citations`. Literal `(*Source: ...*)` notes are tidied by the markdown
14
+ * normaliser; a stopped answer says so.
15
+ */
16
+ export declare function ChatMessageContent({ message, labels, onOpenCitation, className, }: ChatMessageContentProps): import("react").JSX.Element;
@@ -1,16 +1,19 @@
1
1
  import { type ChatPageProps } from './chat-page-types';
2
2
  /**
3
3
  * A complete assistant chat, composed from the same parts as the dock: conversation list with
4
- * auto-titles, message list, composer with the document chip and upload, empty state, error and
5
- * retry. Drive it with `useArbiChat()` from `@arbidocs/react` (or fill `ChatPageController`).
4
+ * titles (stored conversations included), message list with source popovers on citations,
5
+ * composer with the document chip, upload and stop, empty state, error and retry. Drive it with
6
+ * `useArbiChat()` from `@arbidocs/react` (or fill `ChatPageController`).
6
7
  *
7
- * It sizes to its container, not the viewport (container queries on the root), so it holds up in
8
- * a card, beside an open dock or on a phone: the conversation list is a column from 48rem and a
9
- * select below; the `aside` slot (workflow launcher) is a column from 72rem and a collapsible
10
- * panel below. Give it a height (`h-full` of a sized parent, or a `className`). Colours come from
11
- * the tokens only; the user bubble has two optional ones (see `USER_BUBBLE`).
8
+ * It lays itself out by its own width, not the viewport's, so it holds up in a card, beside an
9
+ * open dock or on a phone: the conversation list is a column from 48rem and a select below; the
10
+ * `aside` slot (workflow launcher) is a column from `asideBreakpoint` (60rem) and below that one
11
+ * button-toggled panel over the transcript, so it never pushes the conversation down. Every part
12
+ * renders once. Give it a height (`h-full` of a sized parent, a `className`) or `fillHeight`
13
+ * under a page header. Colours come from the tokens only; the user bubble has two optional ones
14
+ * (see `USER_BUBBLE`).
12
15
  *
13
16
  * With `surface="page"` it claims the page-chat slot, so `useChatSurface()` tells the host's dock
14
17
  * to yield: one chat on screen, never two.
15
18
  */
16
- export declare function ChatPage({ chat, surface, header, headerActions, aside, prompts, emptyTitle, emptyDescription, identity, renderContent, accept, labels, className, testIds, }: ChatPageProps): import("react").JSX.Element;
19
+ export declare function ChatPage({ chat, surface, header, headerActions, aside, prompts, emptyTitle, emptyDescription, identity, renderContent, onOpenCitation, asideBreakpoint, fillHeight, minHeight, compactHeader, accept, labels, className, testIds, }: ChatPageProps): import("react").JSX.Element;
@@ -6,6 +6,8 @@ interface ThreadProps {
6
6
  onSelect: (id: string) => void;
7
7
  onNew: () => void;
8
8
  onDelete?: (id: string) => void;
9
+ /** The stored conversations are still loading. */
10
+ isLoading?: boolean;
9
11
  testIds?: Partial<{
10
12
  list: string;
11
13
  row: string;
@@ -19,7 +21,7 @@ interface ThreadProps {
19
21
  * delete action. The active row is `aria-current`. Rows are real buttons, so keyboard and touch
20
22
  * work; delete is always visible on touch and appears on hover/focus elsewhere.
21
23
  */
22
- export declare function ChatThreadList({ threads, activeId, labels, onSelect, onNew, onDelete, testIds, }: ThreadProps): import("react").JSX.Element;
24
+ export declare function ChatThreadList({ threads, activeId, labels, onSelect, onNew, onDelete, isLoading, testIds, }: ThreadProps): import("react").JSX.Element;
23
25
  /**
24
26
  * The conversation list as one native select (narrow containers, the dock). Native on purpose:
25
27
  * the platform picker on a phone, a label for screen readers, text at least 16px on touch.
@@ -0,0 +1,18 @@
1
+ import type { ChatCitationTarget, ChatPageCitation, ChatPageLabels } from './chat-page-types';
2
+ export type CitationLabels = Pick<ChatPageLabels, 'citation' | 'citationHeading' | 'citationNoSource' | 'openDocument' | 'page'>;
3
+ export interface CitationMarkProps {
4
+ num: string;
5
+ /** The source behind the mark. Without it the mark is a quiet, non-interactive number. */
6
+ citation?: ChatPageCitation;
7
+ labels: CitationLabels;
8
+ /** Opens the cited document in the host's viewer; without it the popover has no open action. */
9
+ onOpen?: (target: ChatCitationTarget) => void;
10
+ className?: string;
11
+ }
12
+ /**
13
+ * The mark after a cited statement: a small superscript number, not an underline over the whole
14
+ * sentence. With citation data it is a button that opens a popover with the source document, the
15
+ * page and the cited passage(s), and (when the host passes `onOpen`) an "Open document" action;
16
+ * without data (still streaming, an old message with no stored sources) it is the number alone.
17
+ */
18
+ export declare function CitationMark({ num, citation, labels, onOpen, className }: CitationMarkProps): import("react").JSX.Element;
@@ -4,6 +4,33 @@ import type { ReactNode } from 'react';
4
4
  * so `<ChatPage chat={useArbiChat(...)} />` works without an adapter; any other source (a demo,
5
5
  * another backend) can fill it in. Plain data and callbacks: no SDK, store or router.
6
6
  */
7
+ /** One passage of a source document behind a citation. */
8
+ export interface ChatPagePassage {
9
+ id: string;
10
+ /** The source document's id, when known (what an "open document" action needs). */
11
+ documentId: string | null;
12
+ documentTitle: string;
13
+ page: number | null;
14
+ text: string;
15
+ }
16
+ /** The source behind `[statement](#cite-N)` marks of an answer. */
17
+ export interface ChatPageCitation {
18
+ /** The number in `(#cite-N)`. */
19
+ num: string;
20
+ statement: string;
21
+ documentTitle: string;
22
+ page: number | null;
23
+ passages: ReadonlyArray<ChatPagePassage>;
24
+ }
25
+ /** What the host gets when the reader opens a cited document. */
26
+ export interface ChatCitationTarget {
27
+ documentId: string | null;
28
+ documentTitle: string;
29
+ page: number | null;
30
+ /** The cited passage (the one opened from, or the first). */
31
+ passage: ChatPagePassage | null;
32
+ citation: ChatPageCitation;
33
+ }
7
34
  export interface ChatPageMessage {
8
35
  id: string;
9
36
  role: 'user' | 'assistant';
@@ -14,6 +41,10 @@ export interface ChatPageMessage {
14
41
  error?: string;
15
42
  /** Agent steps the answer took so far. */
16
43
  stepCount?: number;
44
+ /** Sources of the `[..](#cite-N)` marks in `content`. Without them the marks are quiet numbers. */
45
+ citations?: ReadonlyArray<ChatPageCitation>;
46
+ /** The reader stopped the answer; `content` is what had streamed. */
47
+ stopped?: boolean;
17
48
  }
18
49
  export interface ChatPageThread {
19
50
  id: string;
@@ -32,12 +63,20 @@ export interface ChatPageController {
32
63
  isRunning: boolean;
33
64
  /** The last turn failed. */
34
65
  error: string | null;
66
+ /** A stored conversation's messages are loading. */
67
+ isLoadingThread?: boolean;
68
+ /** The conversation list is loading. */
69
+ isLoadingThreads?: boolean;
70
+ /** Loading or deleting a stored conversation failed. */
71
+ historyError?: string | null;
35
72
  documents: ReadonlyArray<ChatPageDocument>;
36
73
  isLoadingDocuments: boolean;
37
74
  isUploading: boolean;
38
75
  uploadError: string | null;
39
76
  send: (text: string) => void | Promise<void>;
40
77
  retry: () => void | Promise<void>;
78
+ /** Stops the running answer. Omit when the source cannot be aborted: no stop button then. */
79
+ stop?: () => void;
41
80
  selectThread: (id: string) => void;
42
81
  newThread: () => void;
43
82
  /** Omit to hide the delete action. */
@@ -75,6 +114,18 @@ export interface ChatPageLabels {
75
114
  emptyUploadDescription: string;
76
115
  workflows: string;
77
116
  loadingDocuments: string;
117
+ stop: string;
118
+ stopped: string;
119
+ loadingConversation: string;
120
+ historyFailedTitle: string;
121
+ /** Accessible name of a citation mark. */
122
+ citation: (num: string, source: string) => string;
123
+ /** Heading of the citation popover. */
124
+ citationHeading: (num: string) => string;
125
+ citationNoSource: string;
126
+ openDocument: string;
127
+ page: (page: number) => string;
128
+ morePassages: (count: number) => string;
78
129
  }
79
130
  export declare const DEFAULT_CHAT_PAGE_LABELS: ChatPageLabels;
80
131
  export interface ChatPageProps {
@@ -101,8 +152,31 @@ export interface ChatPageProps {
101
152
  emptyDescription?: string;
102
153
  /** Identity chip on the answer's byline (default: the assistant label). */
103
154
  identity?: ReactNode;
104
- /** Renders an answer. Default: the shared markdown renderer (lists, tables, cited words). */
155
+ /**
156
+ * Renders an answer. Default: `ChatMessageContent` (markdown: lists, tables, a quiet numbered
157
+ * mark with a source popover for each citation).
158
+ */
105
159
  renderContent?: (message: ChatPageMessage) => ReactNode;
160
+ /**
161
+ * Opens the cited document (and page) in the host's viewer. Without it the citation popover
162
+ * shows the source and passage and offers no open action.
163
+ */
164
+ onOpenCitation?: (target: ChatCitationTarget) => void;
165
+ /**
166
+ * Container width, in rem, from which `aside` is a column beside the chat; narrower, it is a
167
+ * button-toggled panel over the transcript. Default 60.
168
+ */
169
+ asideBreakpoint?: number;
170
+ /**
171
+ * Fill the height left in the nearest scrolling ancestor below the chat's own top (the page
172
+ * header above it, the shell bars around it), measured in dynamic viewport units so a phone's
173
+ * collapsing URL bar cannot cut it. Use it for a chat card placed under a page header.
174
+ */
175
+ fillHeight?: boolean;
176
+ /** Smallest height `fillHeight` gives, in px. Default 360. */
177
+ minHeight?: number;
178
+ /** Drop the heading from the header bar (the host's page header already names the chat). */
179
+ compactHeader?: boolean;
106
180
  /** Accepted upload types for the file picker. */
107
181
  accept?: string;
108
182
  labels?: Partial<ChatPageLabels>;