@declarion/react 0.142.0 → 0.147.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,73 +1,72 @@
1
- import { coerceDisplayString as e } from "../lib/display-value.js";
2
- import { getPrimaryKeyFields as t, resolveRefRecordLabel as n } from "../types/schema.js";
3
- import { listEntities as r } from "../api/data.js";
1
+ import { listEntities as e } from "../api/data.js";
2
+ import { coerceDisplayString as t } from "../lib/display-value.js";
3
+ import { getPrimaryKeyFields as n, resolveRefRecordLabel as r } from "../types/schema.js";
4
4
  import { useQueries as i } from "@tanstack/react-query";
5
- //#region src/hooks/useRefRecords.ts
5
+ // src/hooks/useRefRecords.ts
6
6
  var a = 200;
7
- function o(e, n) {
8
- let r = n?.[e.entity];
9
- return e.field || (r ? t(r)[0] : "id") || "id";
7
+ function o(e, t) {
8
+ let r = t?.[e.entity];
9
+ return e.field || (r ? n(r)[0] : "id") || "id";
10
10
  }
11
- function s(t, r, i, a, o) {
12
- let s = e(a), c = r[i.entity]?.[s];
11
+ function s(e, n, i, a, o) {
12
+ let s = t(a), c = n[i.entity]?.[s];
13
13
  if (!c) return;
14
14
  let l = i.display?.field ?? o?.[i.entity]?.display?.display_field;
15
- return n(t, c, l, s);
15
+ return r(e, c, l, s);
16
16
  }
17
- function c(t, n, s) {
17
+ function c(n, r, s) {
18
18
  let c = /* @__PURE__ */ new Map();
19
- for (let { ref: r, value: i } of t) {
20
- let t = e(i);
21
- if (!t || n?.[r.entity]?.[t]) continue;
22
- let a = o(r, s), l = `${r.entity}::${a}`, u = c.get(l);
19
+ for (let { ref: e, value: i } of n) {
20
+ let n = t(i);
21
+ if (!n || r?.[e.entity]?.[n]) continue;
22
+ let a = o(e, s), l = `${e.entity}::${a}`, u = c.get(l);
23
23
  u || (u = {
24
24
  key: l,
25
- entity: r.entity,
25
+ entity: e.entity,
26
26
  lookupField: a,
27
27
  values: []
28
- }, c.set(l, u)), u.values.includes(t) || u.values.push(t);
28
+ }, c.set(l, u)), u.values.includes(n) || u.values.push(n);
29
29
  }
30
30
  let l = [...c.values()];
31
31
  for (let e of l) e.values.sort();
32
32
  l.sort((e, t) => e.key.localeCompare(t.key));
33
- let u = i({ queries: l.map((e) => {
34
- let t = {
33
+ let u = i({ queries: l.map((t) => {
34
+ let n = {
35
35
  per_page: a,
36
36
  filters: [{
37
- field: e.lookupField,
37
+ field: t.lookupField,
38
38
  op: "in",
39
- value: e.values
39
+ value: t.values
40
40
  }],
41
41
  count: "window"
42
42
  };
43
43
  return {
44
44
  queryKey: [
45
45
  "entity-data",
46
- e.entity,
47
- t
46
+ t.entity,
47
+ n
48
48
  ],
49
- queryFn: ({ signal: n }) => r(e.entity, t, { signal: n }),
49
+ queryFn: ({ signal: r }) => e(t.entity, n, { signal: r }),
50
50
  staleTime: 6e4
51
51
  };
52
52
  }) }), d = {};
53
- if (n) for (let [e, t] of Object.entries(n)) d[e] = { ...t };
53
+ if (r) for (let [e, t] of Object.entries(r)) d[e] = { ...t };
54
54
  let f = /* @__PURE__ */ new Set();
55
- return u.forEach((t, n) => {
55
+ return u.forEach((e, n) => {
56
56
  let r = l[n];
57
57
  if (!r) return;
58
- let i = t.data?.data;
58
+ let i = e.data?.data;
59
59
  if (i) {
60
- let t = d[r.entity] ??= {};
60
+ let e = d[r.entity] ??= {};
61
61
  for (let n of i) {
62
- let i = e(n[r.lookupField]);
63
- i && (t[i] = n);
62
+ let i = t(n[r.lookupField]);
63
+ i && (e[i] = n);
64
64
  }
65
65
  }
66
- if (t.isLoading) for (let e of r.values) d[r.entity]?.[e] || f.add(`${r.entity}::${e}`);
66
+ if (e.isLoading) for (let e of r.values) d[r.entity]?.[e] || f.add(`${r.entity}::${e}`);
67
67
  }), {
68
68
  refs: d,
69
69
  isLoading: (e, t) => f.has(`${e}::${t}`)
70
70
  };
71
71
  }
72
- //#endregion
73
72
  export { s as refLabel, c as useRefRecords };
@@ -1,28 +1,27 @@
1
- import { useEmbed as e } from "../embed/EmbedContext.js";
2
- import { useText as t } from "./useText.js";
3
- import { useTabStore as n } from "../stores/tabs.js";
1
+ import { useTabStore as e } from "../stores/tabs.js";
2
+ import { useEmbed as t } from "../embed/EmbedContext.js";
3
+ import { useText as n } from "./useText.js";
4
4
  import { useEffect as r } from "react";
5
- //#region src/hooks/useRegisterScreenTab.ts
6
- function i(t, i, a, o) {
7
- let s = e();
5
+ // src/hooks/useRegisterScreenTab.ts
6
+ function i(n, i, a, o) {
7
+ let s = t();
8
8
  r(() => {
9
- t && !s.enabled && n.getState().openTab({
10
- pathname: t,
9
+ n && !s.enabled && e.getState().openTab({
10
+ pathname: n,
11
11
  search: o,
12
12
  title: i,
13
13
  icon: a,
14
14
  closable: !0
15
15
  });
16
16
  }, [
17
- t,
17
+ n,
18
18
  i,
19
19
  a,
20
20
  s.enabled
21
21
  ]);
22
22
  }
23
- function a(e, n, r) {
24
- let a = t(), o = e?.route, s = n ? a(e?.display?.name) || a(n.display.name_plural) : "", c = e?.display?.icon || n?.display.icon;
25
- i(n ? o : void 0, s, c, r);
23
+ function a(e, t, r) {
24
+ let a = n(), o = e?.route, s = t ? a(e?.display?.name) || a(t.display.name_plural) : "", c = e?.display?.icon || t?.display.icon;
25
+ i(t ? o : void 0, s, c, r);
26
26
  }
27
- //#endregion
28
27
  export { a as useRegisterScreenTab, i as useScreenTabRegistration };
@@ -2,7 +2,7 @@ import { applyViewportAttribute as e } from "../lib/html-state.js";
2
2
  import { DEFAULT_RESPONSIVE_BREAKPOINTS as t, resolveViewportCategory as n } from "../lib/viewport-category.js";
3
3
  import { createContext as r, useContext as i, useEffect as a, useMemo as o, useState as s } from "react";
4
4
  import { jsx as c } from "react/jsx-runtime";
5
- //#region src/hooks/useResponsiveMode.tsx
5
+ // src/hooks/useResponsiveMode.tsx
6
6
  var l = {
7
7
  width: 1280,
8
8
  height: 720
@@ -80,5 +80,4 @@ function h({ children: r, breakpoints: i = t, viewportOverride: l, viewport: f =
80
80
  function g() {
81
81
  return i(u);
82
82
  }
83
- //#endregion
84
83
  export { t as DEFAULT_RESPONSIVE_BREAKPOINTS, h as ResponsiveModeProvider, n as resolveViewportCategory, g as useResponsiveMode };
@@ -1,6 +1,6 @@
1
1
  import { useAuthStore as e } from "../stores/auth.js";
2
2
  import { useMemo as t } from "react";
3
- //#region src/hooks/useRowTenant.ts
3
+ // src/hooks/useRowTenant.ts
4
4
  function n() {
5
5
  let n = e((e) => e.activeTenant?.id), r = e((e) => e.user?.id), i = e((e) => e.user?.email);
6
6
  return t(() => ({
@@ -20,5 +20,4 @@ function r(e) {
20
20
  ...r
21
21
  }), [e, r]);
22
22
  }
23
- //#endregion
24
23
  export { n as useConditionCaller, r as useRowTenant };
@@ -1,20 +1,20 @@
1
- import { awaitEmbedToken as e, clearEmbedToken as t, getEmbedToken as n, isEmbedTokenMode as r } from "../embed/token.js";
2
- import { RefreshDeadError as i, ensureRefresh as a, getPersistentAuthFailureHandler as o } from "../api/client.js";
3
- import { useAuthStore as s } from "../stores/auth.js";
4
- import { cachedSchema as c } from "./useSchema.js";
5
- import { SSEAuthError as l, streamEvents as u } from "../api/events.js";
1
+ import { useAuthStore as e } from "../stores/auth.js";
2
+ import { SSEAuthError as t, streamEvents as n } from "../api/events.js";
3
+ import { RefreshDeadError as r, ensureRefresh as i, getPersistentAuthFailureHandler as a } from "../api/client.js";
6
4
  import "./useChildrenData.js";
7
5
  import "./useActionData.js";
8
- import { isEntityLive as d, useRealtimeStore as f } from "../stores/realtime.js";
9
- import { useRealtimeThresholds as p } from "./useRealtimeThresholds.js";
10
- import { RECORD_DOCUMENTS_KEY as m } from "../lib/record-documents-key.js";
11
- import { ENTITY_AGGREGATE_KEY as h, entityOfRealtimeQueryKey as g, isEntityRowsKey as _, isRealtimeBackedQueryKey as v } from "../lib/realtime-query-keys.js";
12
- import { openResync as y, useResyncEngine as b } from "../lib/realtime-resync.js";
13
- import { refetchWhenIdle as x } from "../lib/refetch-when-idle.js";
14
- import { reconcileListCaches as S } from "../lib/realtime-reconcile.js";
6
+ import { useRealtimeThresholds as o } from "./useRealtimeThresholds.js";
7
+ import { RECORD_DOCUMENTS_KEY as s } from "../lib/record-documents-key.js";
8
+ import { reconcileListCaches as c } from "../lib/realtime-reconcile.js";
9
+ import { ENTITY_AGGREGATE_KEY as l, entityOfRealtimeQueryKey as u, isEntityRowsKey as d, isRealtimeBackedQueryKey as f } from "../lib/realtime-query-keys.js";
10
+ import { openResync as p, useResyncEngine as m } from "../lib/realtime-resync.js";
11
+ import { isEntityLive as h, useRealtimeStore as g } from "../stores/realtime.js";
12
+ import { cachedSchema as _ } from "./useSchema.js";
13
+ import { awaitEmbedToken as v, clearEmbedToken as y, getEmbedToken as b, isEmbedTokenMode as x } from "../embed/token.js";
14
+ import { refetchWhenIdle as S } from "../lib/refetch-when-idle.js";
15
15
  import { useEffect as C, useRef as w, useState as T } from "react";
16
16
  import { useQueryClient as E } from "@tanstack/react-query";
17
- //#region src/hooks/useSSE.ts
17
+ // src/hooks/useSSE.ts
18
18
  var D = 3e4, O = 1e3, k = 50, A = "replay_gap";
19
19
  function j() {
20
20
  return typeof document > "u" || document.visibilityState !== "hidden";
@@ -50,8 +50,8 @@ async function N(e, t, n) {
50
50
  for (let [t, a] of r) e.invalidateQueries({ predicate: (e) => {
51
51
  let n = e.queryKey;
52
52
  return n[0] === "entity-children" && n[3] === t;
53
- } }), t === "generated_document" && e.invalidateQueries({ predicate: (e) => e.queryKey[0] === m }), a.keyless ? F(e, t, a.keylessReason) : (U(e, t, [...a.rows.values()].map((e) => e.pk)), i.push(S(e, t, [...a.rows.values()], n).then((n) => {
54
- if (n) for (let n of ["entity-count", h]) for (let r of e.getQueryCache().findAll({ queryKey: [n, t] })) x(e, r);
53
+ } }), t === "generated_document" && e.invalidateQueries({ predicate: (e) => e.queryKey[0] === s }), a.keyless ? F(e, t, a.keylessReason) : (U(e, t, [...a.rows.values()].map((e) => e.pk)), i.push(c(e, t, [...a.rows.values()], n).then((n) => {
54
+ if (n) for (let n of ["entity-count", l]) for (let r of e.getQueryCache().findAll({ queryKey: [n, t] })) S(e, r);
55
55
  })));
56
56
  await Promise.all(i);
57
57
  }
@@ -84,7 +84,7 @@ function R(e, t) {
84
84
  return e === L || t === L ? L : e ?? t;
85
85
  }
86
86
  function z(e, t) {
87
- return e[1] === t && _(e);
87
+ return e[1] === t && d(e);
88
88
  }
89
89
  function B(e) {
90
90
  return JSON.stringify(Object.keys(e).sort().map((t) => [t, e[t]]));
@@ -112,21 +112,21 @@ function U(e, t, n) {
112
112
  } });
113
113
  }
114
114
  function W(e) {
115
- return v(e) || e[0] === "action-data" || e[0] === "action-data-cursor";
115
+ return f(e) || e[0] === "action-data" || e[0] === "action-data-cursor";
116
116
  }
117
117
  function G(e) {
118
118
  I(e, W);
119
119
  }
120
120
  function K(e, t) {
121
- let n = c(e), r = f.getState().degradedEntities;
122
- return t.filter((e) => d(n?.entities?.[e.entity]?.realtime, r, e.entity));
121
+ let n = _(e), r = g.getState().degradedEntities;
122
+ return t.filter((e) => h(n?.entities?.[e.entity]?.realtime, r, e.entity));
123
123
  }
124
124
  function q(e) {
125
- let t = c(e), n = f.getState().degradedEntities;
125
+ let t = _(e), n = g.getState().degradedEntities;
126
126
  e.invalidateQueries({
127
127
  predicate: (e) => {
128
- let r = g(e.queryKey);
129
- return r !== null && !d(t?.entities?.[r]?.realtime, n, r);
128
+ let r = u(e.queryKey);
129
+ return r !== null && !h(t?.entities?.[r]?.realtime, n, r);
130
130
  },
131
131
  refetchType: "active"
132
132
  });
@@ -135,33 +135,33 @@ function J(e, t) {
135
135
  return e.snapshotPoint !== null && t !== void 0 && Number(t) > e.snapshotPoint;
136
136
  }
137
137
  function Y() {
138
- let c = s((e) => e.isAuthenticated), d = s((e) => e.activeTenant?.id ?? ""), m = E(), h = w(null), g = w(""), _ = w(""), v = w(Promise.resolve()), x = w(0), S = M(), T = w(!S);
139
- b(m), p(), C(() => {
140
- let p = f.getState();
141
- if (!c) {
142
- g.current = "", _.current = "", T.current = !S, p.clearConnectionInterruption();
138
+ let s = e((e) => e.isAuthenticated), c = e((e) => e.activeTenant?.id ?? ""), l = E(), u = w(null), d = w(""), f = w(""), h = w(Promise.resolve()), _ = w(0), S = M(), T = w(!S);
139
+ m(l), o(), C(() => {
140
+ let o = g.getState();
141
+ if (!s) {
142
+ d.current = "", f.current = "", T.current = !S, o.clearConnectionInterruption();
143
143
  return;
144
144
  }
145
145
  if (!S) {
146
- T.current = !0, h.current?.abort(), h.current = null, p.clearConnectionInterruption();
146
+ T.current = !0, u.current?.abort(), u.current = null, o.clearConnectionInterruption();
147
147
  return;
148
148
  }
149
- p.holdConnectionInterruption(), T.current && (T.current = !1, g.current && q(m)), _.current !== d && (g.current = "", _.current = d);
150
- let b = !0, C = 0, w = null, E = [], j = null, M = null, P = (e) => {
151
- v.current = v.current.then(e).catch((e) => {
149
+ o.holdConnectionInterruption(), T.current && (T.current = !1, d.current && q(l)), f.current !== c && (d.current = "", f.current = c);
150
+ let m = !0, C = 0, w = null, E = [], j = null, M = null, P = (e) => {
151
+ h.current = h.current.then(e).catch((e) => {
152
152
  console.error("realtime: applying a change batch failed", e);
153
153
  });
154
154
  }, F = (e, t) => {
155
- _.current === t && (g.current = e);
155
+ f.current === t && (d.current = e);
156
156
  }, I = (e) => {
157
157
  if (!e) return;
158
158
  L();
159
- let t = _.current;
159
+ let t = f.current;
160
160
  P(() => F(e, t));
161
161
  }, L = () => {
162
162
  if (j !== null && (clearTimeout(j), j = null), E.length === 0) return;
163
- let e = E.splice(0, E.length), t = h.current?.signal, n = _.current;
164
- P(() => N(m, K(m, e), t).finally(() => {
163
+ let e = E.splice(0, E.length), t = u.current?.signal, n = f.current;
164
+ P(() => N(l, K(l, e), t).finally(() => {
165
165
  for (let t of e) t.eventID && F(t.eventID, n);
166
166
  }));
167
167
  }, R = () => {
@@ -170,138 +170,137 @@ function Y() {
170
170
  M !== null && (clearTimeout(M), M = null);
171
171
  }, B = (e) => {
172
172
  z();
173
- let t = f.getState().thresholds;
173
+ let t = g.getState().thresholds;
174
174
  t !== null && t !== "unreadable" && (M = setTimeout(() => {
175
- M = null, b && w === e && (e.silent = !0, f.getState().holdConnectionInterruption());
175
+ M = null, m && w === e && (e.silent = !0, g.getState().holdConnectionInterruption());
176
176
  }, t.silenceMs));
177
177
  }, V = (e) => {
178
- b && w === e && e.stated && (e.silent && (e.silent = !1, f.getState().clearConnectionInterruption()), B(e));
179
- }, H = f.subscribe((e, t) => {
178
+ m && w === e && e.stated && (e.silent && (e.silent = !1, g.getState().clearConnectionInterruption()), B(e));
179
+ }, H = g.subscribe((e, t) => {
180
180
  e.thresholds !== t.thresholds && w?.stated && !w.silent && B(w);
181
181
  }), U = (e) => {
182
- let t = f.getState(), n = new Set(e), r = /* @__PURE__ */ new Map();
182
+ let t = g.getState(), n = new Set(e), r = /* @__PURE__ */ new Map();
183
183
  for (let [e, { mark: i }] of t.degradedEntities) n.has(e) || r.set(e, i);
184
184
  let i = [...n].filter((e) => !t.degradedEntities.has(e));
185
185
  for (let e of n) t.markDegraded(e);
186
- r.size > 0 && y(m, {
186
+ r.size > 0 && p(l, {
187
187
  scope: {
188
188
  kind: "entities",
189
189
  entities: new Set(r.keys())
190
190
  },
191
191
  jitter: !0,
192
192
  carriedMarks: r
193
- }), i.length > 0 && N(m, i.map((e) => ({
193
+ }), i.length > 0 && N(l, i.map((e) => ({
194
194
  entity: e,
195
195
  action: "updated",
196
196
  ids: []
197
197
  })));
198
198
  };
199
199
  async function W() {
200
- for (; b;) {
201
- let c = new AbortController();
202
- h.current = c;
203
- let d = r(), p = d ? n() : null, _ = {
204
- seq: ++x.current,
205
- presented: g.current !== "",
200
+ for (; m;) {
201
+ let o = new AbortController();
202
+ u.current = o;
203
+ let s = x(), c = s ? b() : null, f = {
204
+ seq: ++_.current,
205
+ presented: d.current !== "",
206
206
  stated: !1,
207
207
  silent: !1,
208
208
  snapshotPoint: null
209
209
  };
210
- w = _;
211
- let v = f.getState();
212
- v.holdConnectionInterruption(), _.presented ? v.startReplay() : v.endReplay();
210
+ w = f;
211
+ let h = g.getState();
212
+ h.holdConnectionInterruption(), f.presented ? h.startReplay() : h.endReplay();
213
213
  let S = /* @__PURE__ */ new Set();
214
214
  try {
215
- for await (let n of u({
216
- signal: c.signal,
217
- lastEventID: g.current,
218
- bearerToken: p ?? void 0,
219
- credentials: d ? "omit" : void 0,
220
- onActivity: () => V(_)
215
+ for await (let t of n({
216
+ signal: o.signal,
217
+ lastEventID: d.current,
218
+ bearerToken: c ?? void 0,
219
+ credentials: s ? "omit" : void 0,
220
+ onActivity: () => V(f)
221
221
  })) {
222
- if (!b) break;
223
- let r = f.getState();
224
- if (n.type === "session_refresh") {
225
- G(m);
222
+ if (!m) break;
223
+ let n = g.getState();
224
+ if (t.type === "session_refresh") {
225
+ G(l);
226
226
  try {
227
- d ? (t(), await e()) : await a(), m.invalidateQueries({ queryKey: ["schema"] }), s.getState().refreshMe();
227
+ s ? (y(), await v()) : await i(), l.invalidateQueries({ queryKey: ["schema"] }), e.getState().refreshMe();
228
228
  } catch {}
229
229
  break;
230
230
  }
231
- if (n.type === "snapshot_complete") {
232
- C = 0, _.stated = !0, _.snapshotPoint = n.asOf ?? null, r.clearConnectionInterruption(), B(_);
233
- let e = n.known && n.asOf !== void 0;
234
- e ? r.clearRelayInterruption() : r.holdRelayInterruption(), _.presented || (n.asOf && I(String(n.asOf)), y(m, { scope: { kind: "all" } })), e && U(S ?? []), S = null;
235
- } else if (n.type === "replay_complete") {
231
+ if (t.type === "snapshot_complete") {
232
+ C = 0, f.stated = !0, f.snapshotPoint = t.asOf ?? null, n.clearConnectionInterruption(), B(f);
233
+ let e = t.known && t.asOf !== void 0;
234
+ e ? n.clearRelayInterruption() : n.holdRelayInterruption(), f.presented || (t.asOf && I(String(t.asOf)), p(l, { scope: { kind: "all" } })), e && U(S ?? []), S = null;
235
+ } else if (t.type === "replay_complete") {
236
236
  L();
237
- let e = _.seq;
237
+ let e = f.seq;
238
238
  P(() => {
239
- x.current === e && f.getState().endReplay();
239
+ _.current === e && g.getState().endReplay();
240
240
  });
241
- } else if (n.type === "checkpoint") I(n.eventID);
242
- else if (n.type === "cache_reset") I(n.eventID), n.reason !== A && J(_, n.eventID) && r.holdRelayInterruption(), y(m, {
241
+ } else if (t.type === "checkpoint") I(t.eventID);
242
+ else if (t.type === "cache_reset") I(t.eventID), t.reason !== A && J(f, t.eventID) && n.holdRelayInterruption(), p(l, {
243
243
  scope: { kind: "all" },
244
244
  jitter: !0
245
245
  });
246
- else if (n.type === "realtime_streaming") {
247
- if (I(n.eventID), !J(_, n.eventID)) continue;
248
- r.clearRelayInterruption(), U(n.degraded);
249
- } else if (n.type === "realtime_degraded") {
246
+ else if (t.type === "realtime_streaming") {
247
+ if (I(t.eventID), !J(f, t.eventID)) continue;
248
+ n.clearRelayInterruption(), U(t.degraded);
249
+ } else if (t.type === "realtime_degraded") {
250
250
  if (S !== null) {
251
- S.add(n.entity);
251
+ S.add(t.entity);
252
252
  continue;
253
253
  }
254
- if (I(n.eventID), !J(_, n.eventID)) continue;
255
- r.markDegraded(n.entity), N(m, [{
256
- entity: n.entity,
254
+ if (I(t.eventID), !J(f, t.eventID)) continue;
255
+ n.markDegraded(t.entity), N(l, [{
256
+ entity: t.entity,
257
257
  action: "updated",
258
258
  ids: []
259
259
  }]);
260
- } else n.type === "entity_changed" && (E.push({
261
- entity: n.entity,
262
- action: n.action,
263
- eventID: n.eventID,
264
- ids: n.ids,
265
- objects: n.objects,
266
- reason: n.reason
260
+ } else t.type === "entity_changed" && (E.push({
261
+ entity: t.entity,
262
+ action: t.action,
263
+ eventID: t.eventID,
264
+ ids: t.ids,
265
+ objects: t.objects,
266
+ reason: t.reason
267
267
  }), R());
268
268
  }
269
- } catch (n) {
270
- if (!b || n instanceof DOMException && n.name === "AbortError") break;
271
- if (n instanceof l) {
272
- if (f.getState().holdConnectionInterruption(), z(), d) try {
273
- t(), await e(), C = 0;
269
+ } catch (e) {
270
+ if (!m || e instanceof DOMException && e.name === "AbortError") break;
271
+ if (e instanceof t) {
272
+ if (g.getState().holdConnectionInterruption(), z(), s) try {
273
+ y(), await v(), C = 0;
274
274
  continue;
275
275
  } catch {
276
- o()();
276
+ a()();
277
277
  return;
278
278
  }
279
279
  try {
280
- await a(), C = 0;
280
+ await i(), C = 0;
281
281
  continue;
282
282
  } catch (e) {
283
- if (e instanceof i) {
284
- o()();
283
+ if (e instanceof r) {
284
+ a()();
285
285
  return;
286
286
  }
287
287
  }
288
288
  }
289
289
  }
290
- if (z(), !b) break;
291
- f.getState().holdConnectionInterruption();
290
+ if (z(), !m) break;
291
+ g.getState().holdConnectionInterruption();
292
292
  let T = Math.min(O * 2 ** C, D), k = T * .5 * Math.random();
293
293
  await new Promise((e) => setTimeout(e, T + k)), C++;
294
294
  }
295
295
  }
296
296
  return W(), () => {
297
- b = !1, w = null, h.current?.abort(), h.current = null, z(), H(), L();
297
+ m = !1, w = null, u.current?.abort(), u.current = null, z(), H(), L();
298
298
  };
299
299
  }, [
300
+ s,
300
301
  c,
301
- d,
302
- m,
302
+ l,
303
303
  S
304
304
  ]);
305
305
  }
306
- //#endregion
307
306
  export { N as applyEntityChanges, G as evictEntityBackedQueries, K as liveEntityChanges, q as refetchQueriesReplayDoesNotCover, P as settleOwnWrite, Y as useSSE };
@@ -1,16 +1,16 @@
1
- import { sameAudience as e, sessionCaller as t } from "../api/audience.js";
2
- import { fetchSchema as n } from "../api/schema.js";
3
- import { useEmbed as r } from "../embed/EmbedContext.js";
4
- import { useAuthStore as i } from "../stores/auth.js";
1
+ import { fetchSchema as e } from "../api/schema.js";
2
+ import { useEmbed as t } from "../embed/EmbedContext.js";
3
+ import { useAuthStore as n } from "../stores/auth.js";
4
+ import { sameAudience as r, sessionCaller as i } from "../api/audience.js";
5
5
  import { useEffect as a } from "react";
6
6
  import { useQuery as o, useQueryClient as s } from "@tanstack/react-query";
7
- //#region src/hooks/useSchema.ts
7
+ // src/hooks/useSchema.ts
8
8
  var c = ["schema"];
9
- function l(t, n) {
10
- if (t && n !== void 0 && e(t.audience, n)) return t.schema;
9
+ function l(e, t) {
10
+ if (e && t !== void 0 && r(e.audience, t)) return e.schema;
11
11
  }
12
12
  function u(e) {
13
- return l(e.getQueryData(c), t(i.getState()));
13
+ return l(e.getQueryData(c), i(n.getState()));
14
14
  }
15
15
  function d(e, t) {
16
16
  return {
@@ -27,22 +27,22 @@ function p(e) {
27
27
  function m(e) {
28
28
  if (e.rereading) return;
29
29
  e.rereading = !0;
30
- let t = i.getState();
30
+ let t = n.getState();
31
31
  (t.isAuthenticated ? t.reloadSession : t.recheckSession)().finally(() => {
32
- e.rereadFor = i.getState().identitySince, e.rereading = !1;
32
+ e.rereadFor = n.getState().identitySince, e.rereading = !1;
33
33
  });
34
34
  }
35
35
  function h() {
36
- let e = i((e) => e.isLoading), u = i((e) => e.isAuthenticated), d = i((e) => e.user), f = i((e) => e.activeTenant), h = i((e) => e.identitySince), g = t({
37
- isLoading: e,
36
+ let r = n((e) => e.isLoading), u = n((e) => e.isAuthenticated), d = n((e) => e.user), f = n((e) => e.activeTenant), h = n((e) => e.identitySince), g = i({
37
+ isLoading: r,
38
38
  isAuthenticated: u,
39
39
  user: d,
40
40
  activeTenant: f
41
- }), _ = i((e) => e.sessionPresumed), v = r().enabled, y = p(s()), b = o({
41
+ }), _ = n((e) => e.sessionPresumed), v = t().enabled, y = p(s()), b = o({
42
42
  queryKey: c,
43
- queryFn: n,
43
+ queryFn: e,
44
44
  staleTime: Infinity,
45
- enabled: v ? u : _ || !e
45
+ enabled: v ? u : _ || !r
46
46
  }), x = b.data, S = l(x, g), C = x !== void 0 && g !== void 0 && S === void 0, w = C && x.requestedAt <= h, { refetch: T, isFetching: E } = b, D = C && !w, O = y.rereadFor === h;
47
47
  return a(() => {
48
48
  w && !E && y.refetchedFor !== h && (y.refetchedFor = h, T({ cancelRefetch: !1 }));
@@ -64,5 +64,4 @@ function h() {
64
64
  refetch: T
65
65
  };
66
66
  }
67
- //#endregion
68
- export { c as SCHEMA_QUERY_KEY, u as cachedSchema, d as schemaAnswerFor, l as schemaFor, t as sessionCaller, h as useSchema };
67
+ export { c as SCHEMA_QUERY_KEY, u as cachedSchema, d as schemaAnswerFor, l as schemaFor, i as sessionCaller, h as useSchema };
@@ -1,8 +1,7 @@
1
1
  import { useSchema as e } from "./useSchema.js";
2
- //#region src/hooks/useScreen.ts
2
+ // src/hooks/useScreen.ts
3
3
  function t(t) {
4
4
  let { data: n } = e();
5
5
  if (n && t) return n.screens[t];
6
6
  }
7
- //#endregion
8
7
  export { t as useScreen };