@declarion/react 0.142.0 → 0.146.0

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 (459) hide show
  1. package/dist-lib/{Icons-Dzl-AkD_.d.ts → Icons-BdXCxyw3.d.ts} +0 -4
  2. package/dist-lib/api/access-expiry.js +1 -2
  3. package/dist-lib/api/agents.js +1 -2
  4. package/dist-lib/api/audience.js +1 -2
  5. package/dist-lib/api/auth-redirect.js +1 -2
  6. package/dist-lib/api/auth.js +1 -2
  7. package/dist-lib/api/batch.js +1 -2
  8. package/dist-lib/api/client.js +27 -28
  9. package/dist-lib/api/data.js +23 -24
  10. package/dist-lib/api/entities.js +36 -37
  11. package/dist-lib/api/events.js +6 -7
  12. package/dist-lib/api/fileReferences.js +1 -2
  13. package/dist-lib/api/params.js +1 -2
  14. package/dist-lib/api/properties.js +1 -2
  15. package/dist-lib/api/request-bounds.js +1 -2
  16. package/dist-lib/api/schema.js +5 -6
  17. package/dist-lib/api/session-renewal.js +6 -7
  18. package/dist-lib/api/status.js +1 -2
  19. package/dist-lib/app.js +154 -155
  20. package/dist-lib/components/actions/ActionButton.js +32 -33
  21. package/dist-lib/components/actions/ActionDialog.js +85 -86
  22. package/dist-lib/components/actions/ActionResultDialog.impl.js +48 -49
  23. package/dist-lib/components/actions/ActionResultDialog.js +1 -2
  24. package/dist-lib/components/actions/ActionRunner.js +96 -97
  25. package/dist-lib/components/actions/ObjectActionBar.js +49 -50
  26. package/dist-lib/components/actions/PropertyGridEditor.js +50 -51
  27. package/dist-lib/components/actions/ResponsiveActionBar.js +127 -128
  28. package/dist-lib/components/actions/RowActionsKebab.js +27 -28
  29. package/dist-lib/components/agents/AgentChatPanel.impl.js +317 -318
  30. package/dist-lib/components/agents/AgentChatPanel.js +1 -2
  31. package/dist-lib/components/agents/AgentConversationDrawer.js +6 -7
  32. package/dist-lib/components/agents/AgentElicitForm.js +13 -14
  33. package/dist-lib/components/agents/AgentOpenFollower.impl.js +1 -2
  34. package/dist-lib/components/agents/AgentOpenFollower.js +1 -2
  35. package/dist-lib/components/agents/AgentPicker.js +1 -2
  36. package/dist-lib/components/agents/ChatAttachments.js +22 -23
  37. package/dist-lib/components/agents/transcript-runs.js +1 -2
  38. package/dist-lib/components/chrome/AssociationTabs.js +44 -45
  39. package/dist-lib/components/chrome/AuditMetaStrip.js +1 -2
  40. package/dist-lib/components/chrome/Breadcrumbs.js +1 -2
  41. package/dist-lib/components/chrome/HighlightsStrip.js +1 -2
  42. package/dist-lib/components/chrome/PageHeader.js +12 -13
  43. package/dist-lib/components/chrome/PageShell.js +1 -2
  44. package/dist-lib/components/chrome/RecordHeader.js +1 -2
  45. package/dist-lib/components/chrome/headerActionZone.js +0 -1
  46. package/dist-lib/components/detail-layout/AssociatedBlock.js +463 -464
  47. package/dist-lib/components/detail-layout/AssociatedToolbar.js +43 -44
  48. package/dist-lib/components/detail-layout/ChildrenBlock.js +24 -25
  49. package/dist-lib/components/detail-layout/ChildrenCards.js +29 -30
  50. package/dist-lib/components/detail-layout/ChildrenList.js +23 -24
  51. package/dist-lib/components/detail-layout/ChildrenTable.js +50 -51
  52. package/dist-lib/components/detail-layout/ChildrenTimeline.js +164 -165
  53. package/dist-lib/components/detail-layout/DetailAuditStrip.js +14 -15
  54. package/dist-lib/components/detail-layout/DetailHighlights.js +23 -24
  55. package/dist-lib/components/detail-layout/DraggableChildrenTable.js +76 -77
  56. package/dist-lib/components/detail-layout/EditableChildrenTable.js +90 -91
  57. package/dist-lib/components/detail-layout/ErrorSummary.js +7 -8
  58. package/dist-lib/components/detail-layout/EvidenceBlock.js +15 -16
  59. package/dist-lib/components/detail-layout/FieldRow.js +11 -12
  60. package/dist-lib/components/detail-layout/FieldsBlock.js +31 -32
  61. package/dist-lib/components/detail-layout/LayoutColumn.js +1 -2
  62. package/dist-lib/components/detail-layout/LayoutRenderer.js +11 -12
  63. package/dist-lib/components/detail-layout/LayoutRow.js +1 -2
  64. package/dist-lib/components/detail-layout/LayoutTabs.js +23 -24
  65. package/dist-lib/components/detail-layout/PropertiesBlock.js +38 -39
  66. package/dist-lib/components/detail-layout/QuickAddForm.js +28 -29
  67. package/dist-lib/components/detail-layout/SectionBlock.js +9 -10
  68. package/dist-lib/components/detail-layout/StatusesBlock.js +1 -2
  69. package/dist-lib/components/detail-layout/TimelineComposer.js +19 -20
  70. package/dist-lib/components/detail-layout/blockMeta.js +1 -2
  71. package/dist-lib/components/detail-layout/useManualColumnResize.js +1 -2
  72. package/dist-lib/components/detail-layout/useQuickAdd.js +21 -22
  73. package/dist-lib/components/detail-layout/visibility.js +1 -2
  74. package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +25 -26
  75. package/dist-lib/components/detail-layout/widgets/JsonDiffWidget.js +18 -19
  76. package/dist-lib/components/detail-layout/widgets/MonacoJson.js +1 -2
  77. package/dist-lib/components/detail-layout/widgets/WidgetHost.js +10 -11
  78. package/dist-lib/components/detail-layout/widgets/builtins.js +1 -2
  79. package/dist-lib/components/detail-layout/widgets/canonicalizeJson.js +1 -2
  80. package/dist-lib/components/detail-layout/widgets/monacoBootstrap.js +1 -2
  81. package/dist-lib/components/detail-layout/widgets/registry.js +1 -2
  82. package/dist-lib/components/fields/BoolField.js +1 -2
  83. package/dist-lib/components/fields/EmailField.js +5 -6
  84. package/dist-lib/components/fields/EnumField.js +7 -8
  85. package/dist-lib/components/fields/FileReferenceField.js +18 -19
  86. package/dist-lib/components/fields/IntArrayField.js +11 -12
  87. package/dist-lib/components/fields/JsonEditor.js +1 -2
  88. package/dist-lib/components/fields/JsonField.js +1 -2
  89. package/dist-lib/components/fields/MultilangArrayField.js +22 -23
  90. package/dist-lib/components/fields/MultilangField.js +13 -14
  91. package/dist-lib/components/fields/MultilangTextField.js +13 -14
  92. package/dist-lib/components/fields/NumberField.js +5 -6
  93. package/dist-lib/components/fields/PasswordField.js +1 -2
  94. package/dist-lib/components/fields/PhoneField.js +24 -25
  95. package/dist-lib/components/fields/RefCombobox.js +42 -43
  96. package/dist-lib/components/fields/RefField.js +14 -15
  97. package/dist-lib/components/fields/RichTextField.js +29 -30
  98. package/dist-lib/components/fields/SecretField.js +1 -2
  99. package/dist-lib/components/fields/StringArrayField.js +29 -30
  100. package/dist-lib/components/fields/StringField.js +12 -13
  101. package/dist-lib/components/fields/StructureField.js +60 -61
  102. package/dist-lib/components/fields/TextField.js +18 -19
  103. package/dist-lib/components/fields/TimestampField.js +17 -18
  104. package/dist-lib/components/fields/UrlField.js +5 -6
  105. package/dist-lib/components/fields/cells/factories/badge.js +5 -6
  106. package/dist-lib/components/fields/cells/factories/boolPill.js +1 -2
  107. package/dist-lib/components/fields/cells/factories/code.js +1 -2
  108. package/dist-lib/components/fields/cells/factories/date.js +1 -2
  109. package/dist-lib/components/fields/cells/factories/email.js +1 -2
  110. package/dist-lib/components/fields/cells/factories/emptyCell.js +0 -1
  111. package/dist-lib/components/fields/cells/factories/fileReference.js +1 -2
  112. package/dist-lib/components/fields/cells/factories/host-icons.js +1 -2
  113. package/dist-lib/components/fields/cells/factories/json.js +1 -2
  114. package/dist-lib/components/fields/cells/factories/link.js +10 -11
  115. package/dist-lib/components/fields/cells/factories/markdown.js +14 -15
  116. package/dist-lib/components/fields/cells/factories/markdownPreview.js +1 -2
  117. package/dist-lib/components/fields/cells/factories/money.js +1 -2
  118. package/dist-lib/components/fields/cells/factories/multilangInline.js +1 -2
  119. package/dist-lib/components/fields/cells/factories/nextRun.js +8 -9
  120. package/dist-lib/components/fields/cells/factories/number.js +1 -2
  121. package/dist-lib/components/fields/cells/factories/passwordMask.js +1 -2
  122. package/dist-lib/components/fields/cells/factories/phone.js +1 -2
  123. package/dist-lib/components/fields/cells/factories/refLink.js +13 -14
  124. package/dist-lib/components/fields/cells/factories/richTextPreview.js +16 -17
  125. package/dist-lib/components/fields/cells/factories/statusPill.js +5 -6
  126. package/dist-lib/components/fields/cells/factories/tagList.js +6 -7
  127. package/dist-lib/components/fields/cells/factories/text.js +1 -2
  128. package/dist-lib/components/fields/cells/factories/timestamp.js +1 -2
  129. package/dist-lib/components/fields/cells/factories/url-helpers.js +1 -2
  130. package/dist-lib/components/fields/cells/factories/url.js +13 -14
  131. package/dist-lib/components/fields/cells/registry.js +1 -2
  132. package/dist-lib/components/fields/index.js +19 -20
  133. package/dist-lib/components/fields/langMap.js +1 -2
  134. package/dist-lib/components/fields/secretValue.js +1 -2
  135. package/dist-lib/components/file-widgets/CircleImage.js +1 -2
  136. package/dist-lib/components/file-widgets/DocumentCard.js +101 -102
  137. package/dist-lib/components/file-widgets/FileList.js +35 -36
  138. package/dist-lib/components/file-widgets/Grid.js +119 -120
  139. package/dist-lib/components/file-widgets/GridLazy.js +1 -2
  140. package/dist-lib/components/file-widgets/ImageWidget.js +189 -190
  141. package/dist-lib/components/file-widgets/LabeledSlots.js +14 -15
  142. package/dist-lib/components/file-widgets/SquareImage.js +1 -2
  143. package/dist-lib/components/file-widgets/UnknownFileWidget.js +1 -2
  144. package/dist-lib/components/file-widgets/UploadFailureText.js +1 -2
  145. package/dist-lib/components/file-widgets/WideBanner.js +1 -2
  146. package/dist-lib/components/file-widgets/builtins.js +1 -2
  147. package/dist-lib/components/file-widgets/cropper.js +1 -2
  148. package/dist-lib/components/file-widgets/draft-scope.js +1 -2
  149. package/dist-lib/components/file-widgets/helpers.js +1 -2
  150. package/dist-lib/components/file-widgets/host.js +33 -34
  151. package/dist-lib/components/file-widgets/payload.js +1 -2
  152. package/dist-lib/components/file-widgets/registry.js +1 -2
  153. package/dist-lib/components/file-widgets/upload.js +41 -42
  154. package/dist-lib/components/file-widgets/useEmbedFileSrc.js +12 -13
  155. package/dist-lib/components/file-widgets/useFileSelection.js +1 -2
  156. package/dist-lib/components/file-widgets/value.js +1 -2
  157. package/dist-lib/components/filters/FilterChips.js +15 -16
  158. package/dist-lib/components/filters/FilterConditionValue.js +15 -16
  159. package/dist-lib/components/filters/FilterDrawer.js +141 -142
  160. package/dist-lib/components/filters/FilterOmittedNotice.js +1 -2
  161. package/dist-lib/components/filters/filter-op-label.js +1 -2
  162. package/dist-lib/components/layout/CommandPalette.impl.js +24 -25
  163. package/dist-lib/components/layout/CommandPalette.js +1 -2
  164. package/dist-lib/components/layout/DirtyTabsCloseDialog.impl.js +15 -16
  165. package/dist-lib/components/layout/DirtyTabsCloseDialog.js +1 -2
  166. package/dist-lib/components/layout/ImpersonationBanner.impl.js +6 -7
  167. package/dist-lib/components/layout/ImpersonationBanner.js +1 -2
  168. package/dist-lib/components/layout/ImpersonationFrame.js +4 -5
  169. package/dist-lib/components/layout/ImpersonationStartModal.impl.js +4 -5
  170. package/dist-lib/components/layout/ImpersonationStartModal.js +1 -2
  171. package/dist-lib/components/layout/Layout.js +132 -140
  172. package/dist-lib/components/layout/Rail.js +11 -12
  173. package/dist-lib/components/layout/Sidebar.js +60 -61
  174. package/dist-lib/components/layout/TabStrip.js +66 -67
  175. package/dist-lib/components/layout/TenantChip.js +21 -22
  176. package/dist-lib/components/layout/TopBar.js +89 -90
  177. package/dist-lib/components/layout/tab-close.js +1 -2
  178. package/dist-lib/components/list/ColumnPicker.js +35 -36
  179. package/dist-lib/components/list/InlineEditCell.js +22 -23
  180. package/dist-lib/components/list/PeekFieldCell.js +7 -8
  181. package/dist-lib/components/list/QuickPeek.js +29 -30
  182. package/dist-lib/components/list/ViewSwitcher.js +44 -45
  183. package/dist-lib/components/list/peekDraftStore.js +1 -2
  184. package/dist-lib/components/pages/AdminCatalogPage.impl.js +59 -60
  185. package/dist-lib/components/pages/AdminCatalogPage.js +1 -2
  186. package/dist-lib/components/pages/DocumentsMenu.js +53 -54
  187. package/dist-lib/components/pages/ExportMenu.js +37 -38
  188. package/dist-lib/components/pages/NoScreensPage.impl.js +5 -6
  189. package/dist-lib/components/pages/NoScreensPage.js +1 -2
  190. package/dist-lib/components/pages/NotFoundPage.impl.js +7 -8
  191. package/dist-lib/components/pages/NotFoundPage.js +1 -2
  192. package/dist-lib/components/pages/RecordDocumentsPanel.js +40 -41
  193. package/dist-lib/components/pages/RecordNotesPanel.js +43 -44
  194. package/dist-lib/components/pages/RecordPanels.js +1 -2
  195. package/dist-lib/components/pages/SSOCallbackPage.impl.js +6 -7
  196. package/dist-lib/components/pages/SSOCallbackPage.js +1 -2
  197. package/dist-lib/components/pages/SmartDetailPage.impl.js +501 -502
  198. package/dist-lib/components/pages/SmartDetailPage.js +1 -2
  199. package/dist-lib/components/pages/SmartListPage.impl.js +316 -317
  200. package/dist-lib/components/pages/SmartListPage.js +1 -2
  201. package/dist-lib/components/pages/SmartRecordListPage.impl.js +316 -317
  202. package/dist-lib/components/pages/SmartRecordListPage.js +1 -2
  203. package/dist-lib/components/pages/auth/AuthShell.js +14 -15
  204. package/dist-lib/components/pages/auth/CodeInput.js +0 -1
  205. package/dist-lib/components/pages/auth/Forgot.impl.js +12 -13
  206. package/dist-lib/components/pages/auth/Forgot.js +1 -2
  207. package/dist-lib/components/pages/auth/Reset.impl.js +20 -21
  208. package/dist-lib/components/pages/auth/Reset.js +1 -2
  209. package/dist-lib/components/pages/auth/SignIn.js +44 -45
  210. package/dist-lib/components/pages/auth/SignUp.impl.js +35 -36
  211. package/dist-lib/components/pages/auth/SignUp.js +1 -2
  212. package/dist-lib/components/pages/auth/SignUpCode.js +17 -18
  213. package/dist-lib/components/pages/auth/TwoFA.impl.js +9 -10
  214. package/dist-lib/components/pages/auth/TwoFA.js +1 -2
  215. package/dist-lib/components/pages/auth/icons.js +1 -2
  216. package/dist-lib/components/pages/exportRequest.js +1 -2
  217. package/dist-lib/components/pages/list/DataCell.js +1 -2
  218. package/dist-lib/components/pages/list/DeleteViewDialog.js +5 -6
  219. package/dist-lib/components/pages/list/ListCardRow.js +53 -54
  220. package/dist-lib/components/pages/list/ListCardsBody.js +1 -2
  221. package/dist-lib/components/pages/list/ListFloatbar.js +25 -26
  222. package/dist-lib/components/pages/list/ListFooter.js +17 -18
  223. package/dist-lib/components/pages/list/ListHeader.js +31 -32
  224. package/dist-lib/components/pages/list/ListNoRows.js +32 -33
  225. package/dist-lib/components/pages/list/ListTable.js +29 -30
  226. package/dist-lib/components/pages/list/ListTableRow.js +1 -2
  227. package/dist-lib/components/pages/list/ListToolbar.js +58 -59
  228. package/dist-lib/components/pages/list/ListUrlBanner.js +1 -2
  229. package/dist-lib/components/pages/list/RowActionsCell.js +6 -7
  230. package/dist-lib/components/pages/list/RowContextMenu.js +1 -2
  231. package/dist-lib/components/pages/list/SaveViewDialog.js +5 -6
  232. package/dist-lib/components/pages/list/SortHeaderMenu.js +25 -26
  233. package/dist-lib/components/pages/list/cardProjection.js +16 -17
  234. package/dist-lib/components/pages/list/column-sizing.js +1 -2
  235. package/dist-lib/components/pages/list/columns.js +74 -75
  236. package/dist-lib/components/pages/list/filter-meta.js +1 -2
  237. package/dist-lib/components/pages/list/page-size.js +1 -2
  238. package/dist-lib/components/pages/list/sortable-header.js +1 -2
  239. package/dist-lib/components/pages/list/table-features.js +1 -2
  240. package/dist-lib/components/pages/list/use-filter-value-labels.js +15 -16
  241. package/dist-lib/components/pages/list/useActiveView.js +1 -2
  242. package/dist-lib/components/pages/list/useHeaderReorder.js +1 -2
  243. package/dist-lib/components/pages/list/useListColumnLayout.js +6 -7
  244. package/dist-lib/components/pages/list/useListFilterPresentation.js +1 -2
  245. package/dist-lib/components/pages/list/useListQuery.js +1 -2
  246. package/dist-lib/components/pages/list/useListRowInteraction.js +37 -38
  247. package/dist-lib/components/pages/list/useListSelection.js +16 -17
  248. package/dist-lib/components/pages/list/useListSort.js +1 -2
  249. package/dist-lib/components/pages/list/useListViews.js +31 -32
  250. package/dist-lib/components/pages/list/useRowMenu.js +20 -21
  251. package/dist-lib/components/pages/list/visible-filters.js +1 -2
  252. package/dist-lib/components/pages/profile/Preferences.impl.js +44 -45
  253. package/dist-lib/components/pages/profile/Preferences.js +1 -2
  254. package/dist-lib/components/pages/profile/Profile.impl.js +223 -224
  255. package/dist-lib/components/pages/profile/Profile.js +1 -2
  256. package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +133 -134
  257. package/dist-lib/components/pages/tenant-params/TenantParamsPage.js +1 -2
  258. package/dist-lib/components/params/ParamsBlock.js +30 -31
  259. package/dist-lib/components/params/param-editors.js +58 -59
  260. package/dist-lib/components/primitives/Avatar.js +1 -2
  261. package/dist-lib/components/primitives/BoolToggle.js +1 -2
  262. package/dist-lib/components/primitives/BrandGlyph.js +1 -2
  263. package/dist-lib/components/primitives/BrandLogo.js +1 -2
  264. package/dist-lib/components/primitives/Btn.js +1 -2
  265. package/dist-lib/components/primitives/Check.js +1 -2
  266. package/dist-lib/components/primitives/Chip.js +1 -2
  267. package/dist-lib/components/primitives/ClassifiedFieldLocked.js +1 -2
  268. package/dist-lib/components/primitives/Dropdown.js +2 -3
  269. package/dist-lib/components/primitives/Fields.js +128 -129
  270. package/dist-lib/components/primitives/HoverCard.js +2 -3
  271. package/dist-lib/components/primitives/IconBtn.js +1 -2
  272. package/dist-lib/components/primitives/Icons.js +1 -2
  273. package/dist-lib/components/primitives/Kbd.js +1 -2
  274. package/dist-lib/components/primitives/MenuItem.js +1 -2
  275. package/dist-lib/components/primitives/Pill.js +1 -2
  276. package/dist-lib/components/primitives/RecordIdBadge.js +1 -2
  277. package/dist-lib/components/primitives/RetryButton.js +5 -6
  278. package/dist-lib/components/primitives/RowField.js +1 -2
  279. package/dist-lib/components/primitives/SectionCard.js +1 -2
  280. package/dist-lib/components/primitives/Spinner.js +1 -2
  281. package/dist-lib/components/primitives/StatTile.js +1 -2
  282. package/dist-lib/components/primitives/Tooltip.js +1 -2
  283. package/dist-lib/components/primitives/dataTableStyles.js +1 -2
  284. package/dist-lib/components/shared/BlankScreen.js +1 -2
  285. package/dist-lib/components/shared/ChangePasswordDialog.impl.js +20 -21
  286. package/dist-lib/components/shared/ChangePasswordDialog.js +1 -2
  287. package/dist-lib/components/shared/ConfirmDialog.js +7 -8
  288. package/dist-lib/components/shared/ConnectionNotice.js +1 -2
  289. package/dist-lib/components/shared/CopyButton.js +1 -2
  290. package/dist-lib/components/shared/DynamicIcon.js +1 -2
  291. package/dist-lib/components/shared/EmptyState.js +1 -2
  292. package/dist-lib/components/shared/ErrorBoundary.js +10 -11
  293. package/dist-lib/components/shared/LoadingSkeleton.js +1 -2
  294. package/dist-lib/components/shared/LucideIcon.js +1 -2
  295. package/dist-lib/components/shared/Markdown.js +1 -2
  296. package/dist-lib/components/shared/MarkdownRenderer.js +22 -23
  297. package/dist-lib/components/shared/ModalFrame.js +1 -2
  298. package/dist-lib/components/shared/RefreshControl.js +6 -7
  299. package/dist-lib/components/shared/StatusGroupsDisplay.js +16 -17
  300. package/dist-lib/components/shared/StatusStepper.js +1 -2
  301. package/dist-lib/components/shared/toast/DeclarionToast.js +1 -2
  302. package/dist-lib/components/shared/useOwnRefresh.js +1 -2
  303. package/dist-lib/embed/EmbedAuthBootstrap.js +30 -31
  304. package/dist-lib/embed/EmbedContext.js +1 -2
  305. package/dist-lib/embed/EmbedDirtyReporter.js +6 -7
  306. package/dist-lib/embed/EmbedHistoryTracker.js +1 -2
  307. package/dist-lib/embed/EmbedLocationReporter.js +11 -12
  308. package/dist-lib/embed/EmbedResizeReporter.js +9 -10
  309. package/dist-lib/embed/EmbedUnsavedGuard.js +5 -6
  310. package/dist-lib/embed/embed-dirty.js +1 -2
  311. package/dist-lib/embed/embed-history.js +1 -2
  312. package/dist-lib/embed/embed-nav-guard.js +1 -2
  313. package/dist-lib/embed/file-src.js +12 -13
  314. package/dist-lib/embed/handshake.js +1 -2
  315. package/dist-lib/embed/params.js +1 -2
  316. package/dist-lib/embed/protocol.js +1 -2
  317. package/dist-lib/embed/screen-location.js +1 -2
  318. package/dist-lib/embed/theme.js +1 -2
  319. package/dist-lib/embed/token.js +1 -2
  320. package/dist-lib/embed/useEmbedNavigate.js +25 -26
  321. package/dist-lib/embed/useGlobalLinkInterceptor.js +9 -10
  322. package/dist-lib/hooks/useActionData.js +1 -2
  323. package/dist-lib/hooks/useActiveTabFollowsRoute.js +7 -8
  324. package/dist-lib/hooks/useAgentConversation.js +122 -123
  325. package/dist-lib/hooks/useAggregate.js +1 -2
  326. package/dist-lib/hooks/useAllEntityData.js +9 -10
  327. package/dist-lib/hooks/useAssociatedData.js +1 -2
  328. package/dist-lib/hooks/useAuth.js +26 -27
  329. package/dist-lib/hooks/useBranding.js +1 -2
  330. package/dist-lib/hooks/useBrandingChrome.js +16 -17
  331. package/dist-lib/hooks/useChildrenData.js +4 -5
  332. package/dist-lib/hooks/useColumns.js +1 -2
  333. package/dist-lib/hooks/useConnectionNotice.js +16 -17
  334. package/dist-lib/hooks/useCurrentLocation.js +1 -2
  335. package/dist-lib/hooks/useCurrentScreen.js +1 -2
  336. package/dist-lib/hooks/useCursorEntityData.js +1 -2
  337. package/dist-lib/hooks/useDebounce.js +1 -2
  338. package/dist-lib/hooks/useDisplayTimeZone.js +4 -5
  339. package/dist-lib/hooks/useDocumentTitle.js +5 -6
  340. package/dist-lib/hooks/useEntity.js +1 -2
  341. package/dist-lib/hooks/useEntityData.js +1 -2
  342. package/dist-lib/hooks/useFileReferenceJSON.js +9 -10
  343. package/dist-lib/hooks/useFilters.js +5 -6
  344. package/dist-lib/hooks/useFollowAgentOpen.js +40 -41
  345. package/dist-lib/hooks/useImpersonation.js +15 -16
  346. package/dist-lib/hooks/useIntentPrefetch.js +6 -7
  347. package/dist-lib/hooks/useJsonSnapshot.js +1 -2
  348. package/dist-lib/hooks/useLanguage.js +11 -12
  349. package/dist-lib/hooks/useLiveObject.js +6 -7
  350. package/dist-lib/hooks/useLongPress.js +1 -2
  351. package/dist-lib/hooks/useMutations.js +31 -32
  352. package/dist-lib/hooks/useObject.js +1 -2
  353. package/dist-lib/hooks/useObjectStatus.js +4 -5
  354. package/dist-lib/hooks/usePageState.js +9 -10
  355. package/dist-lib/hooks/usePageStateRuntime.js +16 -17
  356. package/dist-lib/hooks/usePageStateTtl.js +1 -2
  357. package/dist-lib/hooks/useParams.js +58 -59
  358. package/dist-lib/hooks/useProperties.js +5 -6
  359. package/dist-lib/hooks/useRealtimeThresholds.js +4 -5
  360. package/dist-lib/hooks/useRefRecords.js +31 -32
  361. package/dist-lib/hooks/useRegisterScreenTab.js +12 -13
  362. package/dist-lib/hooks/useResponsiveMode.js +1 -2
  363. package/dist-lib/hooks/useRowTenant.js +1 -2
  364. package/dist-lib/hooks/useSSE.js +100 -101
  365. package/dist-lib/hooks/useSchema.js +16 -17
  366. package/dist-lib/hooks/useScreen.js +1 -2
  367. package/dist-lib/hooks/useScreenBack.js +17 -18
  368. package/dist-lib/hooks/useScreenTab.js +1 -2
  369. package/dist-lib/hooks/useTabNavigate.js +25 -26
  370. package/dist-lib/hooks/useTabSearchMirror.js +6 -7
  371. package/dist-lib/hooks/useTabTitle.js +10 -11
  372. package/dist-lib/hooks/useText.js +6 -7
  373. package/dist-lib/hooks/useTimelineData.js +5 -6
  374. package/dist-lib/hooks/useUiPreferences.js +31 -32
  375. package/dist-lib/hooks/useUnsavedInput.js +1 -2
  376. package/dist-lib/hooks/useVersionWatcher.js +16 -17
  377. package/dist-lib/hooks/useViews.js +16 -17
  378. package/dist-lib/hooks/useWindowConversation.js +1 -2
  379. package/dist-lib/{icon-registry-CUT4eF63.d.ts → icon-registry-BY2tt-GF.d.ts} +0 -2
  380. package/dist-lib/icons.d.ts +2 -4
  381. package/dist-lib/icons.js +5 -5
  382. package/dist-lib/index.d.ts +4 -272
  383. package/dist-lib/index.js +129 -129
  384. package/dist-lib/lib/action-dispatch.js +1 -2
  385. package/dist-lib/lib/actions.js +26 -27
  386. package/dist-lib/lib/anchor.js +1 -2
  387. package/dist-lib/lib/brand-tokens.js +1 -2
  388. package/dist-lib/lib/branding.js +1 -2
  389. package/dist-lib/lib/canonical-url.js +1 -2
  390. package/dist-lib/lib/capabilityPrefetch.js +1 -2
  391. package/dist-lib/lib/child-config.js +1 -2
  392. package/dist-lib/lib/children-validation.js +2 -3
  393. package/dist-lib/lib/date-text.js +1 -2
  394. package/dist-lib/lib/decimal-text.js +1 -2
  395. package/dist-lib/lib/display-value.js +1 -2
  396. package/dist-lib/lib/document-templates.js +1 -2
  397. package/dist-lib/lib/download.js +13 -14
  398. package/dist-lib/lib/evidence-verdict.js +1 -2
  399. package/dist-lib/lib/failure.js +4 -5
  400. package/dist-lib/lib/field-classification.js +1 -2
  401. package/dist-lib/lib/field-regions.js +1 -2
  402. package/dist-lib/lib/filter-evaluator.js +1 -2
  403. package/dist-lib/lib/filters.js +1 -2
  404. package/dist-lib/lib/format-count.js +1 -2
  405. package/dist-lib/lib/html-state.js +1 -2
  406. package/dist-lib/lib/language.js +1 -2
  407. package/dist-lib/lib/longPressGesture.js +0 -1
  408. package/dist-lib/lib/mass-edit.js +1 -2
  409. package/dist-lib/lib/money-text.js +1 -2
  410. package/dist-lib/lib/number-text.js +1 -2
  411. package/dist-lib/lib/page-inset.js +1 -2
  412. package/dist-lib/lib/phone.js +1 -2
  413. package/dist-lib/lib/profile.js +1 -2
  414. package/dist-lib/lib/query-retry.js +1 -2
  415. package/dist-lib/lib/quick-add.js +1 -2
  416. package/dist-lib/lib/read-display-state.js +1 -2
  417. package/dist-lib/lib/realtime-query-keys.js +2 -3
  418. package/dist-lib/lib/realtime-reconcile.js +32 -33
  419. package/dist-lib/lib/realtime-resync.js +40 -41
  420. package/dist-lib/lib/record-documents-key.js +1 -2
  421. package/dist-lib/lib/ref-choices.js +1 -2
  422. package/dist-lib/lib/refetch-when-idle.js +1 -2
  423. package/dist-lib/lib/rich-text.js +1 -2
  424. package/dist-lib/lib/role-label.js +1 -2
  425. package/dist-lib/lib/rowClickGesture.js +1 -2
  426. package/dist-lib/lib/safe-url.js +1 -2
  427. package/dist-lib/lib/schema-routing.js +1 -2
  428. package/dist-lib/lib/screen-back.js +1 -2
  429. package/dist-lib/lib/scroll-restoration.js +21 -22
  430. package/dist-lib/lib/shortcut.js +1 -2
  431. package/dist-lib/lib/size-value.js +1 -2
  432. package/dist-lib/lib/sort.js +1 -2
  433. package/dist-lib/lib/timestamp.js +1 -2
  434. package/dist-lib/lib/toast.js +1 -2
  435. package/dist-lib/lib/ui-actions.js +43 -44
  436. package/dist-lib/lib/utils.js +1 -2
  437. package/dist-lib/lib/variants.js +1 -2
  438. package/dist-lib/lib/versionTracker.js +26 -27
  439. package/dist-lib/lib/viewport-category.js +1 -2
  440. package/dist-lib/lib/window-election.js +1 -2
  441. package/dist-lib/stores/auth.js +32 -33
  442. package/dist-lib/stores/icon-registry.js +1 -2
  443. package/dist-lib/stores/list-layout.js +0 -1
  444. package/dist-lib/stores/page-state.js +1 -2
  445. package/dist-lib/stores/preferences.js +1 -2
  446. package/dist-lib/stores/realtime.js +1 -2
  447. package/dist-lib/stores/screen-registry.js +1 -2
  448. package/dist-lib/stores/tabs.js +1 -2
  449. package/dist-lib/test/seed-schema.js +4 -5
  450. package/dist-lib/testing.d.ts +2 -4
  451. package/dist-lib/testing.js +49 -50
  452. package/dist-lib/types/api.js +1 -2
  453. package/dist-lib/types/fieldType.js +1 -2
  454. package/dist-lib/types/ordmap.js +1 -2
  455. package/dist-lib/types/schema.js +1 -2
  456. package/dist-lib/{useResponsiveMode-C4MeAgoS.d.ts → useResponsiveMode-BElw02Gh.d.ts} +1 -19
  457. package/dist-lib/vite/index.d.ts +0 -2
  458. package/dist-lib/vite/index.js +1 -2
  459. package/package.json +11 -11
@@ -1,8 +1,8 @@
1
- import { useEmbed as e } from "./EmbedContext.js";
2
- import { isModifiedClick as t } from "../lib/utils.js";
3
- import { useTabNavigate as n } from "../hooks/useTabNavigate.js";
1
+ import { isModifiedClick as e } from "../lib/utils.js";
2
+ import { useTabNavigate as t } from "../hooks/useTabNavigate.js";
3
+ import { useEmbed as n } from "./EmbedContext.js";
4
4
  import { useEffect as r, useRef as i } from "react";
5
- //#region src/embed/useGlobalLinkInterceptor.ts
5
+ // src/embed/useGlobalLinkInterceptor.ts
6
6
  var a = "data-declarion-native-link";
7
7
  function o(e) {
8
8
  return e instanceof HTMLAnchorElement || typeof SVGAElement < "u" && e instanceof SVGAElement;
@@ -14,9 +14,9 @@ function s(e) {
14
14
  function c(e) {
15
15
  return e instanceof HTMLAnchorElement ? e.getAttribute("href") : e.href?.baseVal ?? e.getAttribute("href") ?? e.getAttribute("xlink:href");
16
16
  }
17
- function l(e, n = window.location) {
18
- if (e.defaultPrevented || t(e)) return null;
19
- let r = s(e);
17
+ function l(t, n = window.location) {
18
+ if (t.defaultPrevented || e(t)) return null;
19
+ let r = s(t);
20
20
  if (!r || r.hasAttribute("data-declarion-native-link")) return null;
21
21
  let i = c(r);
22
22
  if (!i) return null;
@@ -43,8 +43,8 @@ function u(e, t = window.location) {
43
43
  return n.protocol !== "http:" && n.protocol !== "https:" || n.origin !== t.origin ? null : n.pathname + n.search + n.hash;
44
44
  }
45
45
  function d() {
46
- let t = n(), a = e().enabled, o = i(t);
47
- o.current = t, r(() => {
46
+ let e = t(), a = n().enabled, o = i(e);
47
+ o.current = e, r(() => {
48
48
  let e = (e) => {
49
49
  let t = l(e);
50
50
  t != null && (e.preventDefault(), o.current(t));
@@ -59,5 +59,4 @@ function d() {
59
59
  };
60
60
  }, [a]);
61
61
  }
62
- //#endregion
63
62
  export { a as NATIVE_LINK_ATTR, l as interceptedNavigationTarget, u as interceptedProgrammaticTarget, d as useGlobalLinkInterceptor };
@@ -1,7 +1,7 @@
1
1
  import { executeAction as e } from "../api/data.js";
2
2
  import { useMemo as t } from "react";
3
3
  import { useInfiniteQuery as n, useQuery as r } from "@tanstack/react-query";
4
- //#region src/hooks/useActionData.ts
4
+ // src/hooks/useActionData.ts
5
5
  var i = "action-data", a = "action-data-cursor";
6
6
  function o(e, t) {
7
7
  return [
@@ -54,5 +54,4 @@ function l(r, i, a = !0) {
54
54
  queryKey: o
55
55
  };
56
56
  }
57
- //#endregion
58
57
  export { a as ACTION_DATA_CURSOR_KEY, i as ACTION_DATA_KEY, o as actionDataQueryKey, c as cursorActionDataQueryKey, s as useActionData, l as useCursorActionData };
@@ -1,24 +1,24 @@
1
- import { screenTitleForPath as e } from "../types/schema.js";
1
+ import { useTabStore as e } from "../stores/tabs.js";
2
2
  import { useEmbed as t } from "../embed/EmbedContext.js";
3
3
  import { useSchema as n } from "./useSchema.js";
4
4
  import { useText as r } from "./useText.js";
5
- import { useTabStore as i } from "../stores/tabs.js";
5
+ import { builtInPageTitle as i } from "./useTabTitle.js";
6
6
  import { stripLeadingQuestion as a } from "../lib/screen-back.js";
7
- import { builtInPageTitle as o } from "./useTabTitle.js";
7
+ import { screenTitleForPath as o } from "../types/schema.js";
8
8
  import { useEffect as s, useRef as c } from "react";
9
9
  import { NavigationType as l, useLocation as u, useNavigationType as d } from "react-router";
10
- //#region src/hooks/useActiveTabFollowsRoute.ts
10
+ // src/hooks/useActiveTabFollowsRoute.ts
11
11
  function f() {
12
- let f = t(), p = r(), { data: m } = n(), { pathname: h, search: g } = u(), _ = d(), v = i((e) => e.restored), y = c(h);
12
+ let f = t(), p = r(), { data: m } = n(), { pathname: h, search: g } = u(), _ = d(), v = e((e) => e.restored), y = c(h);
13
13
  s(() => {
14
14
  let t = y.current;
15
15
  if (y.current = h, !v || f.enabled || !m) return;
16
- let n = i.getState(), r = n.tabs.find((e) => e.id === n.activeTabId), s = _ === l.Replace && r && r.pathname === t && t !== h ? r : void 0, c = n.findTabByPathname(h);
16
+ let n = e.getState(), r = n.tabs.find((e) => e.id === n.activeTabId), s = _ === l.Replace && r && r.pathname === t && t !== h ? r : void 0, c = n.findTabByPathname(h);
17
17
  if (c) {
18
18
  n.activeTabId !== c.id && n.switchTab(c.id), s && n.closeTabs([s.id]);
19
19
  return;
20
20
  }
21
- let u = o(p, h), d = u ? void 0 : e(p, h, m.screens, m.entities), b = u ?? d?.title, x = {
21
+ let u = i(p, h), d = u ? void 0 : o(p, h, m.screens, m.entities), b = u ?? d?.title, x = {
22
22
  pathname: h,
23
23
  search: a(g),
24
24
  derivedTitle: !0,
@@ -45,5 +45,4 @@ function f() {
45
45
  p
46
46
  ]);
47
47
  }
48
- //#endregion
49
48
  export { f as useActiveTabFollowsRoute };
@@ -1,34 +1,34 @@
1
- import { ApiError as e } from "../types/api.js";
2
- import { coerceDisplayString as t } from "../lib/display-value.js";
3
- import { useAuthStore as n } from "../stores/auth.js";
4
- import { AGENT_FRAME_EVENT as r, AGENT_MESSAGE_CHANGED_EVENT as i, agentBus as a } from "../api/events.js";
5
- import { approveInvocation as o, cancelConversation as s, cancelInvocation as ee, createConversation as c, listAvailableAgents as te, listConversations as ne, loadConversationInvocations as l, loadConversationTurns as u, loadHistory as d, rejectInvocation as re, sendElicitResponse as f, sendMessage as p } from "../api/agents.js";
6
- import { useCallback as m, useEffect as h, useMemo as ie, useRef as g, useState as _ } from "react";
7
- //#region src/hooks/useAgentConversation.ts
8
- var v = { streaming: !1 }, y = "declarion.agents.conversation_id";
9
- function b(e) {
10
- if (e) return `${y}:${e}`;
11
- }
1
+ import { approveInvocation as e, cancelConversation as t, cancelInvocation as n, createConversation as r, listAvailableAgents as i, listConversations as a, loadConversationInvocations as o, loadConversationTurns as s, loadHistory as c, rejectInvocation as ee, sendElicitResponse as l, sendMessage as te } from "../api/agents.js";
2
+ import { AGENT_FRAME_EVENT as u, AGENT_MESSAGE_CHANGED_EVENT as d, agentBus as f } from "../api/events.js";
3
+ import { useAuthStore as ne } from "../stores/auth.js";
4
+ import { ApiError as p } from "../types/api.js";
5
+ import { coerceDisplayString as re } from "../lib/display-value.js";
6
+ import { useCallback as m, useEffect as h, useMemo as g, useRef as _, useState as v } from "react";
7
+ // src/hooks/useAgentConversation.ts
8
+ var y = { streaming: !1 }, b = "declarion.agents.conversation_id";
12
9
  function x(e) {
10
+ if (e) return `${b}:${e}`;
11
+ }
12
+ function ie(e) {
13
13
  if (typeof window > "u") return;
14
- let t = b(e);
14
+ let t = x(e);
15
15
  if (t) try {
16
16
  return window.localStorage.getItem(t) || void 0;
17
17
  } catch {
18
18
  return;
19
19
  }
20
20
  }
21
- function S(e, t) {
21
+ function ae(e, t) {
22
22
  if (typeof window > "u") return;
23
- let n = b(e);
23
+ let n = x(e);
24
24
  if (n) try {
25
25
  t ? window.localStorage.setItem(n, t) : window.localStorage.removeItem(n);
26
26
  } catch {}
27
27
  }
28
- function C(t) {
29
- return !(t instanceof e) || t.code !== "entity.foreign_key_violation" ? !1 : t.ext("constraint") === "agent_messages_tenant_conv_fk";
28
+ function S(e) {
29
+ return !(e instanceof p) || e.code !== "entity.foreign_key_violation" ? !1 : e.ext("constraint") === "agent_messages_tenant_conv_fk";
30
30
  }
31
- function w(e, t) {
31
+ function C(e, t) {
32
32
  return {
33
33
  id: e,
34
34
  conversation_id: t,
@@ -39,14 +39,14 @@ function w(e, t) {
39
39
  streaming: !0
40
40
  };
41
41
  }
42
- function T(e, t) {
42
+ function w(e, t) {
43
43
  let n = !1, r = e.map((e) => e.role !== "assistant" || !e.streaming || e.id === t ? e : (n = !0, {
44
44
  ...e,
45
45
  streaming: !1
46
46
  }));
47
47
  return n ? r : e;
48
48
  }
49
- function E(e, t) {
49
+ function T(e, t) {
50
50
  let n = !1, r = [];
51
51
  for (let i of e) i.id !== t || i.role !== "assistant" ? r.push(i) : (n = !0, i.content.length !== 0 && (i.streaming ? r.push({
52
52
  ...i,
@@ -54,19 +54,19 @@ function E(e, t) {
54
54
  }) : r.push(i)));
55
55
  return n ? r : e;
56
56
  }
57
- function ae(e) {
57
+ function E(e) {
58
58
  let t = e;
59
- for (let n of e) n.role === "assistant" && n.streaming && (t = E(t, n.id));
59
+ for (let n of e) n.role === "assistant" && n.streaming && (t = T(t, n.id));
60
60
  return t;
61
61
  }
62
62
  function D(e, t, n, r) {
63
63
  let i = !1, a = e.map((e) => e.id === n ? (i = !0, r(e)) : e);
64
- return i ? a : [...e, r(w(n, t))];
64
+ return i ? a : [...e, r(C(n, t))];
65
65
  }
66
66
  function oe(e, t, n, r) {
67
67
  if (!r) return e;
68
68
  let i = e.find((e) => e.id === n);
69
- return i && !i.streaming ? e : D(T(e, n), t, n, (e) => {
69
+ return i && !i.streaming ? e : D(w(e, n), t, n, (e) => {
70
70
  let t = [...e.content], n = t[t.length - 1];
71
71
  return n?.type === "text" ? t[t.length - 1] = {
72
72
  ...n,
@@ -83,7 +83,7 @@ function oe(e, t, n, r) {
83
83
  }
84
84
  function O(e, t, n, r, i, a) {
85
85
  let o = e.find((e) => e.id === n);
86
- return o && !o.streaming ? e : D(T(e, n), t, n, (e) => r && e.content.some((e) => e.type === "tool_use" && e.id === r) ? e.streaming ? e : {
86
+ return o && !o.streaming ? e : D(w(e, n), t, n, (e) => r && e.content.some((e) => e.type === "tool_use" && e.id === r) ? e.streaming ? e : {
87
87
  ...e,
88
88
  streaming: !0
89
89
  } : {
@@ -141,195 +141,195 @@ function j(e) {
141
141
  let t = e.payload?.message_id;
142
142
  return typeof t == "string" && t ? t : void 0;
143
143
  }
144
- function M(e) {
145
- let y = n.getState().activeTenant?.id, [b, w] = _(e ?? x(y)), M = m((e) => {
146
- S(y, e), w(e);
147
- }, [y]), [N, P] = _([]), [F, I] = _(v), [L, R] = _([]), [z, B] = _([]), [V, H] = _([]), [U, W] = _([]), [G, K] = _(), q = g(/* @__PURE__ */ new Set()), J = g(0), Y = g(null), se = (e) => (Y.current?.fingerprint !== e && (Y.current = {
144
+ function M(p) {
145
+ let b = ne.getState().activeTenant?.id, [x, C] = v(p ?? ie(b)), M = m((e) => {
146
+ ae(b, e), C(e);
147
+ }, [b]), [N, P] = v([]), [se, F] = v(y), [I, L] = v([]), [R, z] = v([]), [B, V] = v([]), [H, U] = v([]), [W, G] = v(), K = _(/* @__PURE__ */ new Set()), q = _(0), J = _(null), ce = (e) => (J.current?.fingerprint !== e && (J.current = {
148
148
  key: crypto.randomUUID(),
149
149
  fingerprint: e
150
- }), Y.current.key);
150
+ }), J.current.key);
151
151
  h(() => {
152
- if (!b) {
153
- P([]), I(v), R([]), B([]);
152
+ if (!x) {
153
+ P([]), F(y), L([]), z([]);
154
154
  return;
155
155
  }
156
- if (q.current.has(b)) {
157
- q.current.delete(b);
156
+ if (K.current.has(x)) {
157
+ K.current.delete(x);
158
158
  return;
159
159
  }
160
- let e = !1, t = ++J.current;
160
+ let e = !1, t = ++q.current;
161
161
  return Promise.all([
162
- d(b),
163
- u(b),
164
- l(b)
162
+ c(x),
163
+ s(x),
164
+ o(x)
165
165
  ]).then(([n, r, i]) => {
166
- if (e || t !== J.current) return;
166
+ if (e || t !== q.current) return;
167
167
  let a = n.map((e) => e.streaming ? {
168
168
  ...e,
169
169
  streaming: !1
170
170
  } : e);
171
- P(a), R(r), B(i);
171
+ P(a), L(r), z(i);
172
172
  }, (t) => {
173
173
  e || t?.status === 404 && (M(void 0), P([]));
174
174
  }), () => {
175
175
  e = !0;
176
176
  };
177
- }, [b, M]);
178
- let X = g(b);
177
+ }, [x, M]);
178
+ let Y = _(x);
179
179
  h(() => {
180
- X.current = b;
181
- }, [b]);
182
- let Z = g(!1), Q = g(null), $ = m((e) => {
183
- if (Z.current) {
184
- Q.current = e;
180
+ Y.current = x;
181
+ }, [x]);
182
+ let X = _(!1), Z = _(null), Q = m((e) => {
183
+ if (X.current) {
184
+ Z.current = e;
185
185
  return;
186
186
  }
187
- Z.current = !0;
188
- let t = ++J.current;
187
+ X.current = !0;
188
+ let t = ++q.current;
189
189
  Promise.all([
190
- d(e),
191
- u(e),
192
- l(e)
190
+ c(e),
191
+ s(e),
192
+ o(e)
193
193
  ]).then(([n, r, i]) => {
194
- e === X.current && t === J.current && (P((e) => A(n, e)), R(r), B(i));
194
+ e === Y.current && t === q.current && (P((e) => A(n, e)), L(r), z(i));
195
195
  }, () => {}).finally(() => {
196
- Z.current = !1;
197
- let e = Q.current;
198
- Q.current = null, e && $(e);
196
+ X.current = !1;
197
+ let e = Z.current;
198
+ Z.current = null, e && Q(e);
199
199
  });
200
200
  }, []);
201
201
  h(() => {
202
202
  let e = (e) => {
203
- let { convId: t, kind: r, turnId: i, payload: a } = e.detail;
204
- t === X.current && n(t, {
203
+ let { convId: n, kind: r, turnId: i, payload: a } = e.detail;
204
+ n === Y.current && t(n, {
205
205
  kind: r,
206
206
  turnId: i,
207
207
  payload: a
208
208
  });
209
209
  };
210
- a.addEventListener(r, e);
211
- let n = (e, n) => {
212
- switch (n.kind) {
210
+ f.addEventListener(u, e);
211
+ let t = (e, t) => {
212
+ switch (t.kind) {
213
213
  case "turn.started":
214
- I((e) => ({
214
+ F((e) => ({
215
215
  ...e,
216
216
  streaming: !0
217
- })), P((e) => T(e));
217
+ })), P((e) => w(e));
218
218
  break;
219
219
  case "assistant.message.created": {
220
- let t = typeof n.payload?.message_id == "string" ? n.payload.message_id : "";
221
- if (!t) break;
222
- P((n) => D(T(n, t), e, t, (e) => ({
220
+ let n = typeof t.payload?.message_id == "string" ? t.payload.message_id : "";
221
+ if (!n) break;
222
+ P((t) => D(w(t, n), e, n, (e) => ({
223
223
  ...e,
224
224
  streaming: !0
225
225
  })));
226
226
  break;
227
227
  }
228
228
  case "text.delta": {
229
- let r = t(n.payload?.text), i = j(n);
230
- if (!i || !r) break;
231
- P((t) => oe(t, e, i, r));
229
+ let n = re(t.payload?.text), r = j(t);
230
+ if (!r || !n) break;
231
+ P((t) => oe(t, e, r, n));
232
232
  break;
233
233
  }
234
234
  case "elicit.pending":
235
- $(e);
235
+ Q(e);
236
236
  break;
237
237
  case "tool.pending":
238
- $(e);
238
+ Q(e);
239
239
  break;
240
240
  case "tool.proposed": {
241
- let t = j(n), r = typeof n.payload?.tool == "string" ? n.payload.tool : "", i = n.payload?.params ?? {}, a = typeof n.payload?.tool_use_id == "string" ? n.payload.tool_use_id : "";
242
- if (!t || !r) break;
243
- P((n) => O(n, e, t, a, r, i));
241
+ let n = j(t), r = typeof t.payload?.tool == "string" ? t.payload.tool : "", i = t.payload?.params ?? {}, a = typeof t.payload?.tool_use_id == "string" ? t.payload.tool_use_id : "";
242
+ if (!n || !r) break;
243
+ P((t) => O(t, e, n, a, r, i));
244
244
  break;
245
245
  }
246
246
  case "tool.result":
247
247
  case "tool.failed":
248
248
  case "tool.canceled":
249
- $(e);
249
+ Q(e);
250
250
  break;
251
251
  case "turn.finished": {
252
- I(v);
253
- let e = j(n);
254
- e && P((t) => E(t, e));
252
+ F(y);
253
+ let e = j(t);
254
+ e && P((t) => T(t, e));
255
255
  break;
256
256
  }
257
- case "error": P((e) => ae(e)), I((e) => ({
257
+ case "error": P((e) => E(e)), F((e) => ({
258
258
  ...e,
259
259
  streaming: !1
260
260
  }));
261
261
  }
262
- }, o = () => {
263
- let e = X.current;
264
- e && $(e);
262
+ }, n = () => {
263
+ let e = Y.current;
264
+ e && Q(e);
265
265
  };
266
- return a.addEventListener(i, o), () => {
267
- a.removeEventListener(r, e), a.removeEventListener(i, o);
266
+ return f.addEventListener(d, n), () => {
267
+ f.removeEventListener(u, e), f.removeEventListener(d, n);
268
268
  };
269
- }, [$]);
270
- let ce = m(async (e, t, n = []) => {
271
- let r = n.map((e) => e.id), i = b;
272
- i || (i = (await c({ agent_id: G })).id, q.current.add(i), X.current = i, M(i));
273
- let a, o = (n) => p(e, n, t, r, se(JSON.stringify([
269
+ }, [Q]);
270
+ let $ = m(async (e, t, n = []) => {
271
+ let i = n.map((e) => e.id), a = x;
272
+ a || (a = (await r({ agent_id: W })).id, K.current.add(a), Y.current = a, M(a));
273
+ let o, s = (n) => te(e, n, t, i, ce(JSON.stringify([
274
274
  n,
275
275
  e,
276
276
  t ?? null,
277
- r
277
+ i
278
278
  ])));
279
279
  try {
280
- a = await o(i);
280
+ o = await s(a);
281
281
  } catch (e) {
282
- if (!C(e)) throw e;
283
- i = (await c({ agent_id: G })).id, q.current.add(i), X.current = i, M(i), a = await o(i);
282
+ if (!S(e)) throw e;
283
+ a = (await r({ agent_id: W })).id, K.current.add(a), Y.current = a, M(a), o = await s(a);
284
284
  }
285
- Y.current = null, P((t) => {
286
- if (t.some((e) => e.id === a.id)) return t;
285
+ J.current = null, P((t) => {
286
+ if (t.some((e) => e.id === o.id)) return t;
287
287
  let r = e ? [{
288
288
  type: "text",
289
289
  text: e
290
290
  }] : [];
291
291
  return [...t, {
292
- ...a,
292
+ ...o,
293
293
  content: r,
294
294
  attachments: n
295
295
  }];
296
296
  });
297
297
  }, [
298
- b,
298
+ x,
299
299
  M,
300
- G
301
- ]), le = m(async (e, t) => {
302
- await o(e, t), b && $(b);
303
- }, [b, $]), ue = m(async (e, t) => {
304
- await re(e, t), b && $(b);
305
- }, [b, $]), de = m(async (e, t) => {
306
- b && (await f(b, e, t), $(b));
307
- }, [b, $]), fe = m(async (e) => {
308
- b && (await ee(e), $(b));
309
- }, [b, $]), pe = m(async () => {
310
- b && await s(b);
311
- }, [b]), me = m(async () => {
312
- H(await ne());
300
+ W
301
+ ]), le = m(async (t, n) => {
302
+ await e(t, n), x && Q(x);
303
+ }, [x, Q]), ue = m(async (e, t) => {
304
+ await ee(e, t), x && Q(x);
305
+ }, [x, Q]), de = m(async (e, t) => {
306
+ x && (await l(x, e, t), Q(x));
307
+ }, [x, Q]), fe = m(async (e) => {
308
+ x && (await n(e), Q(x));
309
+ }, [x, Q]), pe = m(async () => {
310
+ x && await t(x);
311
+ }, [x]), me = m(async () => {
312
+ V(await a());
313
313
  }, []), he = m(() => {
314
- M(void 0), P([]), I(v);
314
+ M(void 0), P([]), F(y);
315
315
  }, [M]);
316
316
  return h(() => {
317
317
  let e = !0;
318
- return te().then((t) => {
319
- e && (W(t), K((e) => e ?? t.find((e) => e.is_default)?.id));
318
+ return i().then((t) => {
319
+ e && (U(t), G((e) => e ?? t.find((e) => e.is_default)?.id));
320
320
  }).catch((e) => {
321
321
  console.warn("agents.list_available failed; the agent picker is unavailable", e);
322
322
  }), () => {
323
323
  e = !1;
324
324
  };
325
325
  }, []), {
326
- conversationId: b,
327
- messages: ie(() => k(N, z), [N, z]),
328
- turn: F,
329
- turns: L,
330
- invocations: z,
331
- conversations: V,
332
- send: ce,
326
+ conversationId: x,
327
+ messages: g(() => k(N, R), [N, R]),
328
+ turn: se,
329
+ turns: I,
330
+ invocations: R,
331
+ conversations: B,
332
+ send: $,
333
333
  approve: le,
334
334
  reject: ue,
335
335
  submitInput: de,
@@ -337,11 +337,10 @@ function M(e) {
337
337
  cancel: pe,
338
338
  refreshConversations: me,
339
339
  startNew: he,
340
- agents: U,
341
- selectedAgentId: G,
342
- selectAgent: K,
340
+ agents: H,
341
+ selectedAgentId: W,
342
+ selectAgent: G,
343
343
  setConversationId: M
344
344
  };
345
345
  }
346
- //#endregion
347
346
  export { M as useAgentConversation };
@@ -1,7 +1,7 @@
1
1
  import { aggregateEntities as e } from "../api/data.js";
2
2
  import { ENTITY_AGGREGATE_KEY as t } from "../lib/realtime-query-keys.js";
3
3
  import { useQuery as n } from "@tanstack/react-query";
4
- //#region src/hooks/useAggregate.ts
4
+ // src/hooks/useAggregate.ts
5
5
  function r(r, i, a = !0) {
6
6
  return n({
7
7
  queryKey: [
@@ -14,5 +14,4 @@ function r(r, i, a = !0) {
14
14
  staleTime: 3e4
15
15
  });
16
16
  }
17
- //#endregion
18
17
  export { r as useAggregate };
@@ -1,8 +1,8 @@
1
- import { ApiError as e } from "../types/api.js";
2
- import { listEntities as t } from "../api/data.js";
3
- import { RefCache as n } from "../api/entities.js";
1
+ import { listEntities as e } from "../api/data.js";
2
+ import { RefCache as t } from "../api/entities.js";
3
+ import { ApiError as n } from "../types/api.js";
4
4
  import { useQuery as r } from "@tanstack/react-query";
5
- //#region src/hooks/useAllEntityData.ts
5
+ // src/hooks/useAllEntityData.ts
6
6
  var i = 1e3, a = 20;
7
7
  function o(o, s = {}) {
8
8
  return r({
@@ -19,20 +19,20 @@ function o(o, s = {}) {
19
19
  count: "with"
20
20
  }, l;
21
21
  try {
22
- l = await t(o, {
22
+ l = await e(o, {
23
23
  ...c,
24
24
  page: 1
25
25
  }, { signal: r });
26
- } catch (t) {
27
- throw t instanceof e && t.code === "cursor.cross_tier_offset_unsupported" ? Error(`useAllEntityData: entity "${o}" is cursor-paginated (cross-store archive); it cannot be eagerly fetched into memory. Use a paginated cursor list (useCursorEntityData) instead.`) : t;
26
+ } catch (e) {
27
+ throw e instanceof n && e.code === "cursor.cross_tier_offset_unsupported" ? Error(`useAllEntityData: entity "${o}" is cursor-paginated (cross-store archive); it cannot be eagerly fetched into memory. Use a paginated cursor list (useCursorEntityData) instead.`) : e;
28
28
  }
29
29
  let u = l.meta.total_pages ?? 1;
30
30
  if (u <= 1) return l;
31
31
  if (u > a) throw Error(`useAllEntityData: entity "${o}" spans ${u} pages (limit ${a}); it is not a bounded entity. Use useEntityData with server-side pagination instead.`);
32
- let d = await Promise.all(Array.from({ length: u - 1 }, (e, n) => t(o, {
32
+ let d = await Promise.all(Array.from({ length: u - 1 }, (t, n) => e(o, {
33
33
  ...c,
34
34
  page: n + 2
35
- }, { signal: r }))), f = new n();
35
+ }, { signal: r }))), f = new t();
36
36
  f.merge(l.$refs);
37
37
  let p = [...l.data];
38
38
  for (let e of d) p.push(...e.data), f.merge(e.$refs);
@@ -49,5 +49,4 @@ function o(o, s = {}) {
49
49
  }
50
50
  });
51
51
  }
52
- //#endregion
53
52
  export { o as useAllEntityData };
@@ -1,7 +1,7 @@
1
1
  import { apiFetch as e } from "../api/client.js";
2
2
  import { ENTITY_CHILDREN_KEY as t } from "./useChildrenData.js";
3
3
  import { useInfiniteQuery as n } from "@tanstack/react-query";
4
- //#region src/hooks/useAssociatedData.ts
4
+ // src/hooks/useAssociatedData.ts
5
5
  function r(r, i, a, o, s, c, l, u) {
6
6
  let d = u ? JSON.stringify(Object.entries(u).sort()) : void 0;
7
7
  return n({
@@ -33,5 +33,4 @@ function r(r, i, a, o, s, c, l, u) {
33
33
  enabled: !!r && !!i && !!a && !!o
34
34
  });
35
35
  }
36
- //#endregion
37
36
  export { r as useAssociatedData };