@jini-ai/ui 0.3.13 → 0.4.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 (334) hide show
  1. package/CHANGELOG.md +139 -0
  2. package/README.md +120 -26
  3. package/dist/browser/index.js +1 -1
  4. package/dist/browser/useDismissOnOutsideOrEscape.d.ts +10 -1
  5. package/dist/browser/useDismissOnOutsideOrEscape.js +7 -4
  6. package/dist/browser/useGlobalKeydown.d.ts +14 -2
  7. package/dist/browser/useGlobalKeydown.js +8 -17
  8. package/dist/features/a2ui/catalog-from-registry.d.ts +6 -3
  9. package/dist/features/a2ui/catalog-from-registry.js +1 -1
  10. package/dist/features/a2ui/index.d.ts +1 -1
  11. package/dist/features/a2ui/protocol.d.ts +1 -1
  12. package/dist/features/a2ui/renderer.js +23 -10
  13. package/dist/features/a2ui/use-a2ui-surface.d.ts +11 -6
  14. package/dist/features/a2ui/use-a2ui-surface.js +40 -10
  15. package/dist/features/admin-widgets/components/ComingSoonNotice.d.ts +11 -0
  16. package/dist/features/admin-widgets/components/ComingSoonNotice.js +7 -0
  17. package/dist/features/admin-widgets/components/ComingSoonPanel.d.ts +10 -0
  18. package/dist/features/admin-widgets/components/ComingSoonPanel.js +10 -0
  19. package/dist/features/admin-widgets/components/ImagePreviewModal.d.ts +16 -0
  20. package/dist/features/admin-widgets/components/ImagePreviewModal.hooks.d.ts +13 -0
  21. package/dist/features/admin-widgets/components/ImagePreviewModal.hooks.js +46 -0
  22. package/dist/features/admin-widgets/components/ImagePreviewModal.js +13 -0
  23. package/dist/features/admin-widgets/components/InfoTip.d.ts +18 -0
  24. package/dist/features/admin-widgets/components/InfoTip.hooks.d.ts +16 -0
  25. package/dist/features/admin-widgets/components/InfoTip.hooks.js +45 -0
  26. package/dist/features/admin-widgets/components/InfoTip.js +12 -0
  27. package/dist/features/admin-widgets/components/SeeMore/SeeMore.d.ts +41 -0
  28. package/dist/features/admin-widgets/components/SeeMore/SeeMore.hooks.d.ts +14 -0
  29. package/dist/features/admin-widgets/components/SeeMore/SeeMore.hooks.js +57 -0
  30. package/dist/features/admin-widgets/components/SeeMore/SeeMore.js +24 -0
  31. package/dist/features/admin-widgets/components/Select/Select.d.ts +39 -0
  32. package/dist/features/admin-widgets/components/Select/Select.hooks.d.ts +105 -0
  33. package/dist/features/admin-widgets/components/Select/Select.hooks.js +359 -0
  34. package/dist/features/admin-widgets/components/Select/Select.js +46 -0
  35. package/dist/features/admin-widgets/index.d.ts +20 -0
  36. package/dist/features/admin-widgets/index.js +11 -0
  37. package/dist/features/admin-widgets/styles/admin-widgets.css +2 -0
  38. package/dist/features/appearance/constants.d.ts +2 -2
  39. package/dist/features/appearance/constants.js +2 -1
  40. package/dist/features/appearance/react/components/AppearanceTab.js +5 -5
  41. package/dist/features/appearance/rules.d.ts +10 -4
  42. package/dist/features/appearance/rules.js +5 -5
  43. package/dist/features/appearance/types.d.ts +1 -1
  44. package/dist/features/appearance/types.js +1 -1
  45. package/dist/features/asset-grid/react/components/AssetGrid.js +1 -1
  46. package/dist/features/asset-grid/react/components/DeleteConfirmDialog.js +1 -1
  47. package/dist/features/asset-grid/react/hooks/useAssetGridKeyboardShortcuts.js +23 -21
  48. package/dist/features/asset-grid/react/hooks/useAssetGridLiveUpdates.d.ts +1 -1
  49. package/dist/features/asset-grid/react/hooks/useAssetGridLiveUpdates.js +1 -1
  50. package/dist/features/asset-tree-browser/ports.d.ts +3 -1
  51. package/dist/features/asset-tree-browser/react/hooks/useAssetTreeCopyLocalPath.js +1 -1
  52. package/dist/features/browser-chrome/react/components/BrowserViewportControls.js +1 -1
  53. package/dist/features/browser-chrome/types.js +1 -1
  54. package/dist/features/command-palette/ports.js +1 -1
  55. package/dist/features/connectors/ConnectorsBrowser.js +2 -2
  56. package/dist/features/connectors/components/ConnectorCard.js +3 -3
  57. package/dist/features/connectors/components/ConnectorDetailDrawer.js +1 -1
  58. package/dist/features/connectors/components/ConnectorGrid.js +2 -2
  59. package/dist/features/connectors/components/ConnectorSearchBar.js +2 -2
  60. package/dist/features/connectors/components/ProviderTabBar.js +2 -2
  61. package/dist/features/connectors/constants.d.ts +1 -1
  62. package/dist/features/connectors/constants.js +1 -1
  63. package/dist/features/connectors/hooks/useConnectorAuthorization.js +1 -1
  64. package/dist/features/connectors/rules.d.ts +2 -2
  65. package/dist/features/connectors/rules.js +1 -1
  66. package/dist/features/connectors/types.d.ts +2 -2
  67. package/dist/features/connectors/types.js +1 -1
  68. package/dist/features/execution/react/components/ByokProviderForm.js +3 -3
  69. package/dist/features/execution/react/components/ExecutionTab.js +2 -2
  70. package/dist/features/execution/react/components/LocalCliAgentCard.js +3 -3
  71. package/dist/features/execution/react/components/LocalCliAgentList.js +2 -2
  72. package/dist/features/execution/react/components/ProviderChipGroup.js +2 -2
  73. package/dist/features/execution/react/components/SearchableModelSelect.js +1 -1
  74. package/dist/features/execution/rules.js +1 -1
  75. package/dist/features/file-dropzone/react/components/FileDropzone.js +5 -3
  76. package/dist/features/file-dropzone/react/hooks/useFileDropzone.d.ts +1 -1
  77. package/dist/features/file-dropzone/react/hooks/useFileDropzone.js +1 -1
  78. package/dist/features/file-dropzone/types.d.ts +1 -1
  79. package/dist/features/file-dropzone/types.js +1 -1
  80. package/dist/features/folder-path-drop/react/hooks/useFolderPathDropCapture.js +6 -4
  81. package/dist/features/html-editor/canvas-content-wrapper.js +1 -1
  82. package/dist/features/html-editor/canvas-embed-placeholders.js +7 -7
  83. package/dist/features/html-editor/canvas-style.d.ts +4 -0
  84. package/dist/features/html-editor/canvas-style.js +6 -21
  85. package/dist/features/html-viewer/constants.d.ts +1 -1
  86. package/dist/features/html-viewer/constants.js +1 -1
  87. package/dist/features/html-viewer/react/components/PresentMenu.js +1 -1
  88. package/dist/features/html-viewer/react/components/ZoomMenu.js +1 -1
  89. package/dist/features/html-viewer/types.d.ts +1 -1
  90. package/dist/features/html-viewer/types.js +1 -1
  91. package/dist/features/i18n/dictionaries/index.d.ts +2 -3
  92. package/dist/features/i18n/dictionaries/settings-dialog.en.d.ts +1 -1
  93. package/dist/features/i18n/dictionary-translator.d.ts +16 -0
  94. package/dist/features/i18n/dictionary-translator.js +14 -0
  95. package/dist/features/i18n/index.d.ts +3 -0
  96. package/dist/features/i18n/index.js +2 -0
  97. package/dist/features/i18n/locale.d.ts +1 -1
  98. package/dist/features/i18n/template-i18n.d.ts +26 -0
  99. package/dist/features/i18n/template-i18n.js +36 -0
  100. package/dist/features/iframe-pool/react/components/IframeKeepAliveProvider.d.ts +1 -1
  101. package/dist/features/iframe-pool/react/components/IframeKeepAliveProvider.js +1 -1
  102. package/dist/features/instructions/react/components/InstructionsTab.js +1 -1
  103. package/dist/features/integrations/react/components/ClientPicker.js +4 -4
  104. package/dist/features/integrations/react/components/CodexInstallToggleButton.js +1 -1
  105. package/dist/features/integrations/react/components/IntegrationsTab.js +2 -2
  106. package/dist/features/integrations/react/components/SnippetBlock.js +1 -1
  107. package/dist/features/integrations/types.d.ts +1 -1
  108. package/dist/features/integrations/types.js +1 -1
  109. package/dist/features/interactive-ui/index.js +13 -13
  110. package/dist/features/interactive-ui/interactive-ui.css +1 -1
  111. package/dist/features/interactive-ui/providers/recharts/bar-chart.js +1 -1
  112. package/dist/features/interactive-ui/providers/recharts/line-chart.js +1 -1
  113. package/dist/features/interactive-ui/providers/recharts/pie-chart.js +2 -2
  114. package/dist/features/interactive-ui/providers/shadcn/lib/utils.d.ts +1 -1
  115. package/dist/features/interactive-ui/providers/shadcn/lib/utils.js +1 -1
  116. package/dist/features/interactive-ui/registry.d.ts +15 -4
  117. package/dist/features/interactive-ui/registry.js +5 -5
  118. package/dist/features/language/react/components/LanguageTab.js +2 -2
  119. package/dist/features/list-detail-panel/types.d.ts +1 -1
  120. package/dist/features/list-detail-panel/types.js +1 -1
  121. package/dist/features/mcp-ui/confirmation-store.js +2 -1
  122. package/dist/features/mcp-ui/surfaces/bridge.d.ts +2 -1
  123. package/dist/features/mcp-ui/surfaces/bridge.js +17 -7
  124. package/dist/features/mcp-ui/surfaces/confirmation.d.ts +20 -0
  125. package/dist/features/mcp-ui/surfaces/confirmation.js +38 -6
  126. package/dist/features/mcp-ui/surfaces/document.d.ts +7 -1
  127. package/dist/features/mcp-ui/surfaces/document.js +19 -1
  128. package/dist/features/mcp-ui/surfaces/text-input.js +4 -4
  129. package/dist/features/mcp-ui/surfaces/tokens.d.ts +17 -20
  130. package/dist/features/mcp-ui/surfaces/tokens.js +33 -35
  131. package/dist/features/media-providers/index.d.ts +1 -1
  132. package/dist/features/media-providers/index.js +1 -1
  133. package/dist/features/media-providers/react/components/MediaProvidersTab.js +4 -4
  134. package/dist/features/media-providers/rules.js +1 -1
  135. package/dist/features/memory/async-commit-guard.d.ts +1 -1
  136. package/dist/features/memory/constants.d.ts +1 -1
  137. package/dist/features/memory/constants.js +1 -1
  138. package/dist/features/memory/dependencies.d.ts +11 -23
  139. package/dist/features/memory/dependencies.js +116 -106
  140. package/dist/features/memory/index.d.ts +1 -1
  141. package/dist/features/memory/index.js +1 -1
  142. package/dist/features/memory/react/components/MemoryAdvancedModal.js +2 -2
  143. package/dist/features/memory/react/components/MemoryEntryCard.js +1 -1
  144. package/dist/features/memory/react/components/MemoryExtractionCard.js +1 -1
  145. package/dist/features/memory/react/components/MemoryHooksPanel.js +1 -1
  146. package/dist/features/memory/react/components/MemoryList.js +5 -5
  147. package/dist/features/memory/react/components/MemoryManualEditor.js +5 -5
  148. package/dist/features/memory/react/components/MemorySettingsPanel.js +1 -1
  149. package/dist/features/memory/react/hooks/useMemoryEntries.hooks.js +1 -1
  150. package/dist/features/memory/react/hooks/useMemoryNavigation.hooks.js +1 -1
  151. package/dist/features/memory/react/styles.js +1 -1
  152. package/dist/features/memory/rules.js +1 -1
  153. package/dist/features/memory/types.d.ts +1 -1
  154. package/dist/features/mention-autocomplete/react/hooks/useMentionAutocomplete.js +1 -1
  155. package/dist/features/notifications/react/components/NotificationsTab.js +7 -7
  156. package/dist/features/notifications/types.d.ts +1 -1
  157. package/dist/features/observability/boot-timing.js +2 -2
  158. package/dist/features/observability/stuck-run.js +1 -1
  159. package/dist/features/observability/white-screen.js +4 -4
  160. package/dist/features/panel-kit/fetch-query/adapter.react.d.ts +35 -0
  161. package/dist/features/panel-kit/fetch-query/adapter.react.js +122 -0
  162. package/dist/features/panel-kit/fetch-query/cache.d.ts +123 -0
  163. package/dist/features/panel-kit/fetch-query/cache.js +231 -0
  164. package/dist/features/panel-kit/fetch-query/environment.browser.d.ts +4 -0
  165. package/dist/features/panel-kit/fetch-query/environment.browser.js +25 -0
  166. package/dist/features/panel-kit/fetch-query/index.d.ts +4 -0
  167. package/dist/features/panel-kit/fetch-query/index.js +2 -0
  168. package/dist/features/panel-kit/fetch-query/types.d.ts +91 -0
  169. package/dist/features/panel-kit/fetch-query/types.js +2 -0
  170. package/dist/features/panel-kit/helpers/format-timestamp.d.ts +18 -0
  171. package/dist/features/panel-kit/helpers/format-timestamp.js +20 -0
  172. package/dist/features/panel-kit/helpers/permissions.d.ts +11 -0
  173. package/dist/features/panel-kit/helpers/permissions.js +10 -0
  174. package/dist/features/panel-kit/helpers/resolve-active-tab-id.d.ts +13 -0
  175. package/dist/features/panel-kit/helpers/resolve-active-tab-id.js +13 -0
  176. package/dist/features/panel-kit/helpers/retry-unreachable.d.ts +20 -0
  177. package/dist/features/panel-kit/helpers/retry-unreachable.js +39 -0
  178. package/dist/features/panel-kit/hooks/use-async-action.hooks.d.ts +13 -0
  179. package/dist/features/panel-kit/hooks/use-async-action.hooks.js +27 -0
  180. package/dist/features/panel-kit/hooks/use-dirty-guard.hooks.d.ts +18 -0
  181. package/dist/features/panel-kit/hooks/use-dirty-guard.hooks.js +33 -0
  182. package/dist/features/panel-kit/hooks/use-focus-trap.hooks.d.ts +8 -0
  183. package/dist/features/panel-kit/hooks/use-focus-trap.hooks.js +66 -0
  184. package/dist/features/panel-kit/hooks/use-serial-writes.hooks.d.ts +26 -0
  185. package/dist/features/panel-kit/hooks/use-serial-writes.hooks.js +41 -0
  186. package/dist/features/panel-kit/hooks/use-settlement-generation.hooks.d.ts +9 -0
  187. package/dist/features/panel-kit/hooks/use-settlement-generation.hooks.js +25 -0
  188. package/dist/features/panel-kit/index.d.ts +19 -0
  189. package/dist/features/panel-kit/index.js +13 -0
  190. package/dist/features/privacy/react/components/PrivacyTab.js +2 -2
  191. package/dist/features/privacy/types.d.ts +1 -1
  192. package/dist/features/privacy/types.js +1 -1
  193. package/dist/features/progress-card/reference-adapters.d.ts +1 -1
  194. package/dist/features/progress-card/rules.d.ts +1 -1
  195. package/dist/features/progress-card/rules.js +1 -1
  196. package/dist/features/progress-card/types.d.ts +1 -1
  197. package/dist/features/progress-card/types.js +1 -1
  198. package/dist/features/resource-dashboard/dependencies.d.ts +1 -1
  199. package/dist/features/resource-dashboard/ports.d.ts +1 -1
  200. package/dist/features/resource-dashboard/react/hooks/useResourceBoard.d.ts +1 -1
  201. package/dist/features/resource-dashboard/react/hooks/useResourceBoard.js +1 -1
  202. package/dist/features/resource-dashboard/rules.d.ts +1 -1
  203. package/dist/features/resource-dashboard/rules.js +2 -2
  204. package/dist/features/resource-dashboard/types.d.ts +4 -4
  205. package/dist/features/resource-dashboard/types.js +1 -1
  206. package/dist/features/schedule-picker/react/hooks/useRecurringSchedulePicker.js +1 -1
  207. package/dist/features/settings/dialog/styles/settings-dialog.css +62 -60
  208. package/dist/features/sketch-editor/constants.d.ts +1 -1
  209. package/dist/features/sketch-editor/constants.js +1 -1
  210. package/dist/features/sketch-editor/dom.d.ts +1 -1
  211. package/dist/features/sketch-editor/dom.js +1 -1
  212. package/dist/features/sketch-editor/react/hooks/useSketchDomEnhancements.d.ts +1 -1
  213. package/dist/features/sketch-editor/react/hooks/useSketchDomEnhancements.js +11 -9
  214. package/dist/features/sketch-editor/types.d.ts +1 -1
  215. package/dist/features/sketch-editor/types.js +1 -1
  216. package/dist/features/skills/react/components/SkillDraftForm.js +1 -1
  217. package/dist/features/skills/react/components/SkillRow.js +1 -1
  218. package/dist/features/skills/react/components/SkillsTab.js +2 -2
  219. package/dist/features/source-config-list/agent-handles.js +2 -2
  220. package/dist/features/source-config-list/react/hooks/useSourceConfigAddForm.d.ts +1 -1
  221. package/dist/features/source-config-list/react/hooks/useSourceConfigAddForm.js +1 -1
  222. package/dist/features/source-config-list/rules.d.ts +1 -1
  223. package/dist/features/source-config-list/rules.js +3 -3
  224. package/dist/features/source-config-list/types.d.ts +1 -1
  225. package/dist/features/source-config-list/types.js +1 -1
  226. package/dist/features/tab-launcher-menu/react/hooks/useTabLauncherMenu.js +1 -1
  227. package/dist/features/tab-strip/index.d.ts +4 -0
  228. package/dist/features/tab-strip/index.js +2 -0
  229. package/dist/features/tab-strip/react/components/TabBar.d.ts +23 -0
  230. package/dist/features/tab-strip/react/components/TabBar.hooks.d.ts +25 -0
  231. package/dist/features/tab-strip/react/components/TabBar.hooks.js +57 -0
  232. package/dist/features/tab-strip/react/components/TabBar.js +18 -0
  233. package/dist/features/tab-strip/react/components/TabStrip.js +2 -1
  234. package/dist/features/tab-strip/react/components/TabStripFrame.d.ts +3 -0
  235. package/dist/features/tab-strip/react/components/TabStripFrame.js +7 -0
  236. package/dist/features/tabbed-dialog/react/hooks/useTabbedDialog.js +1 -1
  237. package/dist/features/tabbed-dialog/styles/tabbed-dialog.css +8 -141
  238. package/dist/features/tabbed-dialog/types.d.ts +1 -1
  239. package/dist/features/tabbed-dialog/types.js +1 -1
  240. package/dist/features/version-manager/ports.d.ts +1 -1
  241. package/dist/features/version-manager/react/components/VersionPromptPopover.js +5 -3
  242. package/dist/features/version-manager/react/components/VersionRestoreControl.js +1 -1
  243. package/dist/features/version-manager/types.d.ts +1 -1
  244. package/dist/features/version-manager/types.js +1 -1
  245. package/dist/features/viewer-shell/dependencies.js +1 -1
  246. package/dist/features/viewer-shell/ports.d.ts +1 -1
  247. package/dist/features/viewer-shell/react/components/ViewportSwitcher.js +1 -1
  248. package/dist/features/viewer-shell/react/hooks/useMarkdownScrollSync.d.ts +1 -1
  249. package/dist/features/viewer-shell/react/hooks/useMarkdownScrollSync.js +1 -1
  250. package/dist/features/viewer-shell/types.d.ts +1 -1
  251. package/dist/features/viewer-shell/types.js +1 -1
  252. package/dist/index.d.ts +420 -0
  253. package/dist/index.js +421 -1
  254. package/dist/react/components/ComponentKitPreview.js +1 -1
  255. package/dist/react/components/EditorIcon.d.ts +1 -1
  256. package/dist/react/components/EditorIcon.js +22 -22
  257. package/dist/react/components/ExportDiagnosticsButton.d.ts +8 -1
  258. package/dist/react/components/ExportDiagnosticsButton.js +6 -6
  259. package/dist/react/components/PaletteTweaks.js +5 -5
  260. package/dist/react/hooks/useBrandFonts.d.ts +19 -4
  261. package/dist/react/hooks/useBrandFonts.js +11 -7
  262. package/dist/react/hooks/useDebouncedValue.d.ts +12 -1
  263. package/dist/react/hooks/useDebouncedValue.js +9 -4
  264. package/dist/react/hooks/useStableHandler.d.ts +3 -1
  265. package/dist/react/hooks/useStableHandler.js +1 -1
  266. package/dist/renderers/annotation-canvas/drawing.d.ts +4 -4
  267. package/dist/renderers/annotation-canvas/drawing.js +28 -15
  268. package/dist/renderers/annotation-canvas/react/components/AnnotationCanvas.js +2 -2
  269. package/dist/renderers/annotation-canvas/react/hooks/useAnnotationCanvas.js +4 -3
  270. package/dist/renderers/annotation-canvas/rules.d.ts +1 -1
  271. package/dist/renderers/annotation-canvas/theme.d.ts +13 -0
  272. package/dist/renderers/annotation-canvas/theme.js +16 -0
  273. package/dist/renderers/annotation-canvas/types.d.ts +1 -1
  274. package/dist/renderers/index.d.ts +1 -1
  275. package/dist/renderers/new-tab-preview.d.ts +3 -0
  276. package/dist/renderers/new-tab-preview.js +3 -1
  277. package/dist/renderers/preview-modal-shell/react/hooks/usePreviewModalShell.d.ts +1 -1
  278. package/dist/renderers/preview-modal-shell/react/hooks/usePreviewModalShell.js +1 -1
  279. package/dist/renderers/preview-modal-shell/rules.d.ts +1 -1
  280. package/dist/renderers/preview-modal-shell/types.d.ts +3 -3
  281. package/dist/renderers/preview-modal-shell/types.js +2 -2
  282. package/dist/renderers/react/components/ArtifactView.d.ts +1 -1
  283. package/dist/renderers/react/components/ArtifactView.js +1 -1
  284. package/dist/renderers/registry.d.ts +12 -6
  285. package/dist/renderers/registry.js +7 -9
  286. package/dist/renderers/renderers/html.js +2 -2
  287. package/dist/renderers/renderers/index.js +1 -1
  288. package/dist/renderers/renderers/markdown.js +2 -2
  289. package/dist/renderers/renderers/react-component.js +1 -1
  290. package/dist/renderers/renderers/svg.js +1 -1
  291. package/dist/renderers/shiki.js +1 -1
  292. package/dist/renderers/srcdoc/build.d.ts +1 -1
  293. package/dist/renderers/srcdoc/build.js +1 -1
  294. package/dist/renderers/url-load-decision.d.ts +1 -1
  295. package/dist/renderers/url-load-decision.js +1 -1
  296. package/dist/styles/admin.css +273 -0
  297. package/dist/styles/variables.css +117 -0
  298. package/dist/theme/apply.d.ts +9 -0
  299. package/dist/theme/apply.js +77 -0
  300. package/dist/theme/color-scheme.d.ts +8 -0
  301. package/dist/theme/color-scheme.js +9 -0
  302. package/dist/theme/default.d.ts +4 -0
  303. package/dist/theme/default.js +11 -0
  304. package/dist/theme/index.d.ts +6 -0
  305. package/dist/theme/index.js +5 -0
  306. package/dist/theme/stylesheet.d.ts +8 -0
  307. package/dist/theme/stylesheet.js +14 -0
  308. package/dist/theme/types.d.ts +39 -0
  309. package/dist/theme/types.js +2 -0
  310. package/dist/theme/validation.d.ts +15 -0
  311. package/dist/theme/validation.js +55 -0
  312. package/dist/utils/appearance.js +1 -1
  313. package/dist/utils/browser-request.d.ts +12 -0
  314. package/dist/utils/browser-request.js +10 -0
  315. package/dist/utils/color-math.d.ts +20 -6
  316. package/dist/utils/color-math.js +12 -12
  317. package/dist/utils/copy-to-clipboard.d.ts +19 -8
  318. package/dist/utils/copy-to-clipboard.js +15 -11
  319. package/dist/utils/dom-subscriptions.js +1 -1
  320. package/dist/utils/endpoint-policy.d.ts +9 -3
  321. package/dist/utils/endpoint-policy.js +5 -5
  322. package/dist/utils/markdown-scroll-sync.js +3 -3
  323. package/dist/utils/notifications.d.ts +1 -1
  324. package/dist/utils/notifications.js +1 -1
  325. package/dist/utils/polygon-selection.d.ts +1 -1
  326. package/dist/utils/polygon-selection.js +1 -1
  327. package/dist/utils/scroll-tabs-with-wheel.d.ts +4 -1
  328. package/dist/utils/scroll-tabs-with-wheel.js +1 -1
  329. package/dist/utils/smooth-scroll-to-top.js +1 -1
  330. package/dist/utils/sse.d.ts +3 -1
  331. package/dist/utils/sse.js +1 -1
  332. package/package.json +105 -16
  333. package/dist/features/lexical-rich-text-editor/react/test-support/lexical-harness.d.ts +0 -11
  334. package/dist/features/lexical-rich-text-editor/react/test-support/lexical-harness.js +0 -35
package/CHANGELOG.md ADDED
@@ -0,0 +1,139 @@
1
+ # @jini-ai/ui
2
+
3
+ ## 0.4.0 — 2026-10-02
4
+
5
+ ### BREAKING
6
+
7
+ - Query cache clocks use core and browser fetch is injected. Product theme/process documents are archived; stylesheet exports remain explicit side effects.
8
+ - Distribution includes runtime output, release documentation and required assets only. Process records and per-job neutrality checks are no longer part of the package surface.
9
+
10
+ ## Unreleased
11
+
12
+ - Publish the browser entry `@jini-ai/ui/tab-strip` with types and ESM output from
13
+ the existing feature barrel, including `TabBar` and `TabBarTab`.
14
+
15
+ - Align A2UI catalog/clock fixtures and MCP-UI RPC calls with the current agentic API; omit absent optional fetch properties to preserve strict optional-property typing and browser defaults.
16
+ - BREAKING: remove the obsolete `A2uiClockPort` type re-export from `/a2ui`; consumers use `Clock` from `@jini-ai/core/primitives`.
17
+
18
+ - BREAKING: `exportViaHttp` takes `{ exportPath, filenamePrefix }` and optional `{ fetch }`. Browser transports accept native fetch ports and no longer depend on platform; timeout errors now retain native reasons. Add `createMemoryHttpPorts`; neutralize obsolete connector-vendor references.
19
+
20
+ - Adopt shared kernel contracts and preserve the module rationale in neutral documentation.
21
+ - BREAKING: replace package-local clock contracts with core Clock.nowMs().
22
+
23
+
24
+ ### UI parity fixes
25
+
26
+ - Keep replacement writes successful when an older read rejects, including their freshness timestamp.
27
+ - Wire A2UI actions to each interactive provider's documented callback; custom registry entries may
28
+ declare an optional `actionProp`. Existing unannotated custom table callbacks remain compatible.
29
+ - Re-render A2UI descendants and bound data when the root identity is unchanged; cache stable surface
30
+ snapshots so unrelated notifications do not re-render unchanged surfaces.
31
+ - Clarify that parked iframes stay in a mounted container and missing crypto fails on token mint.
32
+ - Pass notice handles through the current named agent API and use the declared tab-count font token.
33
+ - Restart cached background reads on explicit refresh/invalidation; ignore superseded responses,
34
+ invalidate failed reads, reset initial retry errors, and reject undefined query data.
35
+ - Pause offline reads and writes, resume them once online, and refresh stale enabled reads on reconnect.
36
+ Connectivity and opt-in focus events are injectable through `FetchQueryEnvironmentPort` on the provider.
37
+ The ten-second freshness, no automatic failure retries, and focus-disabled defaults are unchanged.
38
+
39
+ ### Integrated entry points
40
+
41
+ - Publish and declare browser runtimes for `/admin-widgets`, `/panel-kit`, `/fetch-query`,
42
+ and `/admin-widgets.css`; `/core`, `/interactive-ui/manifests` and `/mcp-ui/surfaces` are universal. No new dependencies or version bump.
43
+ - Align internal agent handle and A2UI interpreter calls with the current agentic ports.
44
+ - Use neutral `data-jini-*` canvas markers for transient editor chrome.
45
+
46
+ ### BREAKING — public ui argument convention
47
+
48
+ - Shared clipboard, endpoint, SSE, color/accent and wheel helpers now take named required objects.
49
+ - Shared font, debounce, stable-handler, dismissal and global-keydown hooks split required and
50
+ optional objects; effect dependencies can be injected as ports. The font asset URL resolver
51
+ now takes `{ projectId, path }`.
52
+ - `InteractiveUiRegistry` constructor and lookup/registration methods,
53
+ `buildA2uiCatalogFromRegistry`, and `AssetTreeClipboardPort.copyToClipboard` take object arguments.
54
+ - Admin widget helpers, tab keyboard helpers, dictionary/template helpers and panel hooks take
55
+ required objects and separate optional configuration. The dictionary translator returned by
56
+ `createDictionaryTranslator` takes `{ locale, key }`. Panel controllers take `{ action, describeError }`,
57
+ `{ task }`, or `{ generation }`; dirty confirmation accepts `({}, { unsavedBeyondTracked })`.
58
+ - Fetch-query hooks split required key/fetch/run dependencies from optional cache configuration.
59
+ Mutation, invalidation and loader replacement take `{ input }`, `{ key }`, and `{ value }`.
60
+ - `RendererRegistry` creation/registration and manifest resolution use named objects; optional
61
+ resolution hints move to the second object, including the renderer matching port.
62
+ - Canvas chrome attributes change to `data-jini-*`; hosts selecting the old attributes must update.
63
+
64
+
65
+ - Add generic admin widgets with opt-in `@jini-ai/ui/admin-widgets.css`, using the existing
66
+ `--jini-*` tokens with standalone fallbacks. `TabBar` joins the existing `tab-strip` feature
67
+ and shares its tablist shell; existing `TabStrip` exports and behavior remain available.
68
+ - Add a panel kit with focus trapping, unsaved-change protection, async actions, serial writes,
69
+ settlement generations, display helpers, and injected dictionary translators. Translation
70
+ and retry classification are supplied by the host; no product dictionaries or API client move.
71
+ - Add a React-only fetch-query adapter behind `@jini-ai/ui/fetch-query` and `/panel-kit`,
72
+ preserving the keyed query contract without a new runtime dependency or optional peer.
73
+ All existing exports remain available; the version is reserved for the wave coordinator.
74
+
75
+ ## 0.1.2
76
+
77
+ ### Patch Changes
78
+
79
+ - Add top-level `main`/`types` fields alongside the existing `exports` map. A consumer on
80
+ TypeScript's classic `moduleResolution: "node"` (node10) — which ignores `package.json#exports`
81
+ entirely — could not resolve this package's types at all (`TS2307: Cannot find module`) even
82
+ after the previous exports-map fix restored `require()` at runtime; type resolution and runtime
83
+ resolution are separate algorithms. Verified against a real external consumer (whose
84
+ tsconfig uses this legacy resolution mode): adding these two fields, with its tsconfig completely
85
+ unchanged, made the error disappear. Also fixes absolute-path `require()` (distinct from a bare
86
+ specifier, which already worked) for the same reason — `main` was previously absent.
87
+
88
+ Purely additive: every modern resolver (Node's own runtime `exports` resolution, TypeScript's
89
+ `bundler`/`node16`/`nodenext`) prefers `exports` over `main`/`types` when both are present, so
90
+ this changes nothing for a consumer already on a modern resolver.
91
+
92
+ - Updated dependencies
93
+ - @jini-ai/renderers-react@0.1.2
94
+ - @jini-ai/agentic@0.1.2
95
+
96
+ ## 0.1.1
97
+
98
+ ### Patch Changes
99
+
100
+ - Add a `"default"` export condition to every published package's `exports` map — every one of
101
+ them lacked it, which meant `require()` failed with `ERR_PACKAGE_PATH_NOT_EXPORTED` for any
102
+ CommonJS consumer (found via a real external integration attempt; Node needs `require(esm)`
103
+ support, i.e. Node >=22.12, for this to resolve).
104
+
105
+ `@jini-ai/agent-runtime`:
106
+
107
+ - **New**: `RuntimeBuildOptions.permissionMode` (`'bypass' | 'restricted'`) lets a caller opt a
108
+ run OUT of the auto-approve-every-permission-prompt flag every def with one
109
+ (`bypassPermissions` / `--yolo` / `--dangerously-skip-permissions`) previously pushed
110
+ unconditionally, with no way to turn it off. Omitting it keeps today's default (bypass)
111
+ behavior unchanged.
112
+ - **New**: `ClaudeStreamEvent`, `CopilotStreamEvent`, and `QoderEvent` are now real exported
113
+ discriminated unions instead of `Record<string, unknown>` — a real external consumer guessed a
114
+ nonexistent field name (`event.text` instead of the actual `event.delta`) against the old
115
+ untyped sink and silently lost every streamed token with no compile or runtime error.
116
+ - Fixed a doc/implementation mismatch in `claude-stream.ts`: the module doc claimed `tool_result`
117
+ events carry `{ tool_use_id, content, is_error }`; the actual emitted shape is
118
+ `{ toolUseId, content, isError }`.
119
+
120
+ `@jini-ai/daemon`: `AgentExecutorRunInput.permissionMode` forwards the new
121
+ `RuntimeBuildOptions.permissionMode` through to `buildArgs`, so a host can actually reach the new
122
+ opt-out from the daemon's real run-input surface, not just from `@jini-ai/agent-runtime` in
123
+ isolation.
124
+
125
+ `@jini-ai/agentic`: `setAtPointer` no longer throws on a malformed (e.g. missing leading `/`)
126
+ `updateDataModel` path — degrades to a no-op like its sibling `getAtPointer`, matching this
127
+ package's own "a bad binding must not crash the renderer" contract. That path is agent-authored
128
+ wire data with no error boundary above it in any host, so the uncaught throw could unmount an
129
+ entire chat UI from ~40 bytes of malformed input.
130
+
131
+ `@jini-ai/chat-react`: a local (client-resolved) A2UI button action is no longer a silent no-op —
132
+ `A2uiSurfaceCard` now surfaces the resolved value. New `ExtEventErrorBoundary` confines a
133
+ `kind: 'ext'` event group's renderer to its own card instead of letting a render/effect-phase
134
+ throw from agent-controlled content unmount the whole chat root (there was no error boundary
135
+ anywhere in this package or its hosts before this).
136
+
137
+ - Updated dependencies
138
+ - @jini-ai/renderers-react@0.1.1
139
+ - @jini-ai/agentic@0.1.1
package/README.md CHANGED
@@ -18,12 +18,12 @@ vocabulary.
18
18
  brand/plugin/figma-specific components. Those stay in
19
19
  `foundry/integrations/open-design/` as OD's own UI if/when that adapter needs them.
20
20
  `SettingsDialog` itself is one of these (its `execution`/`orbit`/`media`/
21
- `composio`/`critiqueTheater`/`pet`/`designSystems`/`projectLocations`/
21
+ `connector-provider`/`critiqueTheater`/`pet`/`designSystems`/`projectLocations`/
22
22
  `routines`/`about` tabs and its AMR/autosave shell state stay OD-specific) —
23
23
  but its reusable tabbed-dialog *shell* and 6 of its small, clean, generic
24
24
  tabs (`appearance`, `notifications`, `language`, `instructions`,
25
25
  `integrations`, `privacy`) shipped as `src/features/settings-dialog/`; see
26
- `packages/ui/source-map.md`.
26
+ the archived provenance ledger.
27
27
  Also not here: chat/artifact UI — that's `@jini-ai/chat`'s `./core` and `./react` subpaths (the
28
28
  former standalone `@jini-ai/chat-core` package was retired into `./core` on 2026-08-03), and this
29
29
  package's own `./renderers` subpath (the artifact-renderer registry, once planned as a separate
@@ -52,7 +52,7 @@ package's own React layer. See the chat-core/chat-react split discussion in
52
52
  split: not "prepare for a Vue consumer" (no such consumer exists or is
53
53
  planned), just keeping the pure layer visibly and mechanically separate
54
54
  from the React layer within one package, at effectively zero cost. See
55
- `packages/ui/source-map.md`'s `features/connectors/` section for the
55
+ the archived provenance ledger's `features/connectors/` section for the
56
56
  worked example. **Retrofitted onto the flat `src/components/` bucket
57
57
  (2026-07-18, now `src/react/components/`)**; `src/hooks/` below is not —
58
58
  it still sits at the top level; revisit if this pattern proves worth
@@ -67,7 +67,7 @@ package's own React layer. See the chat-core/chat-react split discussion in
67
67
  - `src/utils/` — non-component pure helpers and small stateful browser-API
68
68
  wrappers that don't need the full ports+dependencies ceremony. Added in the
69
69
  i18n/observability/utils porting task (2026-07-16); see
70
- `packages/ui/source-map.md`.
70
+ the archived provenance ledger.
71
71
 
72
72
  ## `./core` — the framework-free half, importable without React
73
73
 
@@ -82,7 +82,7 @@ This used to be a genuinely separate package, `@jini-ai/ui-core`, until it becam
82
82
  earned that: it was always the framework-free half of *this* package's features, and its own name
83
83
  — "core of the UI package" — gave no hint that it was one half of a per-feature split. Folded back
84
84
  in here 2026-08-01, once that confusion cost real time (including for the person who built it).
85
- `packages/ui/source-map.md` has the dated entry.
85
+ the archived provenance ledger has the dated entry.
86
86
 
87
87
  ### Feature map
88
88
 
@@ -162,7 +162,7 @@ package.
162
162
  ## Status
163
163
 
164
164
  Real content has landed in several parallel passes — see
165
- `packages/ui/source-map.md` for full per-section provenance:
165
+ the archived provenance ledger for full per-section provenance:
166
166
 
167
167
  - `src/utils/` — a framework-free DOM/pure-function layer (2026-07-16), plus
168
168
  a second batch (i18n/observability-adjacent utils: notifications, uuid,
@@ -185,7 +185,7 @@ Real content has landed in several parallel passes — see
185
185
  viewport-preset switcher, and ports for `onNavigate`/history storage/
186
186
  brand-bridge registration) — not the full file. The first feature to use
187
187
  the new `react/{hooks,components}/` layout described above. See
188
- `packages/ui/source-map.md` for the full breakdown, including a confirmed
188
+ the archived provenance ledger for the full breakdown, including a confirmed
189
189
  duplicate with `FileViewer.tsx`'s (not-yet-ported) viewport controls.
190
190
  - `src/features/sketch-editor/` — `SketchEditor.tsx`'s Excalidraw-integration
191
191
  shim (2026-07-17), per the god-components-extraction-plan.md Consolidation
@@ -214,9 +214,11 @@ Real content has landed in several parallel passes — see
214
214
  — extracted from `SettingsDialog.tsx` (2026-07-17), per
215
215
  `ADS-memory/reports/jini-port/god-components-extraction-plan.md` item 5. Uses the NEW
216
216
  `react/{hooks,components}` layout (this is the first feature built with it
217
- from scratch). See `packages/ui/source-map.md`.
217
+ from scratch). See the archived provenance ledger.
218
218
  - `src/features/tab-strip/` — a consolidated draggable/reorderable tab-strip
219
- primitive (2026-07-18), per `ADS-memory/reports/jini-port/god-components-extraction-plan.md`'s
219
+ primitive, published through the browser entry `@jini-ai/ui/tab-strip`, including
220
+ `TabBar`, `TabBarProps`, `TabBarTab`, `TabStrip`, `TabStripItem`, and their hooks.
221
+ The feature was consolidated (2026-07-18), per `ADS-memory/reports/jini-port/god-components-extraction-plan.md`'s
220
222
  Consolidation map §A `features/tab-strip/` row: `WorkspaceTabsBar.tsx`'s
221
223
  workspace-tab strip and `FileWorkspace.tsx`'s independently-reimplemented
222
224
  inline `Tab` component (r6 confirms these are two divergent
@@ -227,7 +229,7 @@ Real content has landed in several parallel passes — see
227
229
  option and pinned-tab drop-edge coercion), active/close-button
228
230
  affordances, host-injected tab content. A dual-shape test proves both
229
231
  source interaction shapes work correctly through the same code paths, not
230
- just that they compile. See `packages/ui/source-map.md`.
232
+ just that they compile. See the archived provenance ledger.
231
233
  - `src/features/list-detail-panel/` — a generic `ListDetailPanel<TItem>`
232
234
  master-detail (list+preview) navigator shell, ported from
233
235
  `DesignSystemsTab.tsx` (2026-07-18), per
@@ -236,12 +238,12 @@ Real content has landed in several parallel passes — see
236
238
  read and confirmed NOT to share this shape (a portal overlay and a
237
239
  resizable 2-pane split, respectively) — scoped to `DesignSystemsTab.tsx`
238
240
  alone rather than forcing a broader generalization. See
239
- `packages/ui/source-map.md`.
241
+ the archived provenance ledger.
240
242
  - 10 more `src/components/` flat atoms (2026-07-18) — the Section C
241
243
  bucket-A batch from `NewProjectPanel.tsx` (`OptionCards`, `CompactToggle`,
242
244
  `ToggleRow`), `PluginsView.tsx` (`StatCard`, `Notice`, `ImportChoice`,
243
245
  `FileImportPanel`), and `EntryShell.tsx` (`OnboardingPanelHeader`,
244
- `OnboardingChipField`, `OnboardingDropdown`). See `packages/ui/source-map.md`.
246
+ `OnboardingChipField`, `OnboardingDropdown`). See the archived provenance ledger.
245
247
  - `src/features/memory/` — ported from OD's never-merged PR #5228 (a
246
248
  vertical-slice decomposition of `MemorySection.tsx`, 2026-07-18): the
247
249
  saved-memory list/editor, the extraction-history stream, and the
@@ -250,7 +252,7 @@ Real content has landed in several parallel passes — see
250
252
  independently confirmed pre-existing in OD's original monolith, not
251
253
  introduced by the decomposition), plus one additional fix
252
254
  (`fetchMemoryList()`'s under-validated response) made during this port. See
253
- `packages/ui/source-map.md` for the full provenance note, including why its
255
+ the archived provenance ledger for the full provenance note, including why its
254
256
  connector-reconciliation reducers reuse `features/connectors/rules.ts`
255
257
  instead of re-deriving a third copy.
256
258
 
@@ -260,14 +262,14 @@ Real content has landed in several parallel passes — see
260
262
  `ADS-memory/reports/jini-port/god-components-extraction-plan.md`'s Consolidation map.
261
263
  Also added flat `src/components/{PillButton,PopoverMenu,PopoverItem}.tsx`
262
264
  and `src/utils/timezone.ts`, both from the same source file. See
263
- `packages/ui/source-map.md`.
265
+ the archived provenance ledger.
264
266
  - `src/features/mention-autocomplete/` — `MentionAutocomplete`, a generic
265
267
  "type a trigger character, get a filtered picker" mention/capability
266
268
  autocomplete (2026-07-18), also ported from `NewAutomationModal.tsx`, per
267
269
  the same Consolidation map row. Checked against `QuickSwitcher.tsx` and
268
270
  the `composer/*` Lexical `@mention` system for a possible 3-way overlap —
269
271
  concluded they're three distinct shapes, not one primitive done three
270
- times; see `packages/ui/source-map.md` for the full comparison (read that
272
+ times; see the archived provenance ledger for the full comparison (read that
271
273
  section before extracting either of those two).
272
274
 
273
275
  - `src/react/components/EditorIcon.tsx` (2026-07-18) — a flat icon-by-key
@@ -276,7 +278,7 @@ Real content has landed in several parallel passes — see
276
278
  `src/react/components/` path (the `refactor/ui-flat-components-under-react`
277
279
  rename hadn't landed on this branch's base yet, so this is a new folder
278
280
  alongside the still-present flat `src/components/`). See
279
- `packages/ui/source-map.md`.
281
+ the archived provenance ledger.
280
282
  - `src/features/iframe-pool/` — a generic, host-configurable "cap N mounted
281
283
  iframes, LRU-evict inactive ones, park the rest off-DOM" pool (2026-07-18),
282
284
  ported from `IframeKeepAlivePool.tsx` per
@@ -287,7 +289,7 @@ Real content has landed in several parallel passes — see
287
289
  `OD_PREVIEW_KEEP_ALIVE` env-var toggle. Fixed two real bugs found while
288
290
  porting (a missing `px`-unit append on numeric style values, and a reused
289
291
  parked iframe never having its hidden/inert markers undone) — see
290
- `packages/ui/source-map.md`.
292
+ the archived provenance ledger.
291
293
  - `src/features/command-palette/` — `CommandPalette`, a generic Cmd/Ctrl+P
292
294
  fuzzy file-and-item palette (2026-07-18), ported from `QuickSwitcher.tsx`.
293
295
  Collapses the origin's file/tab discriminated union into one
@@ -295,7 +297,7 @@ Real content has landed in several parallel passes — see
295
297
  `localStorage`-backed `CommandPaletteRecentsPort`. Confirmed distinct from
296
298
  `features/mention-autocomplete/` (already checked in that feature's
297
299
  source-map section) rather than re-litigated. See
298
- `packages/ui/source-map.md`.
300
+ the archived provenance ledger.
299
301
  - `src/features/tab-launcher-menu/` — `TabLauncherMenu`, an anchored,
300
302
  portal-rendered "+"-button command-palette dropdown (2026-07-18), ported
301
303
  from `TabLauncherMenu.tsx`. Generic `TabLauncherResultItem` shared by both
@@ -304,21 +306,21 @@ Real content has landed in several parallel passes — see
304
306
  OD-specific `LauncherContext`. `features/tab-strip/` does not exist on
305
307
  this branch despite the extraction plan describing it as already shipped
306
308
  — documented as a discrepancy, matching the same pattern already recorded
307
- for `features/progress-card/`. See `packages/ui/source-map.md`.
309
+ for `features/progress-card/`. See the archived provenance ledger.
308
310
  - `src/features/revision-review/` — `RevisionDiffCard`/`RevisionHistoryList`,
309
311
  a generic "proposed change review" widget (2026-07-18), ported from
310
312
  `DesignSystemFlow.tsx`'s remaining pieces. Genericizes `DesignSystemRevision`
311
313
  to `RevisionReviewItem<TMeta>`; unifies the origin's two duplicate diff
312
314
  functions into one `diffAddedLines`. Confirmed distinct from
313
315
  `features/progress-card/` rather than folded in. See
314
- `packages/ui/source-map.md`.
316
+ the archived provenance ledger.
315
317
  - `src/react/components/{TokenChip,ValueChip,ComponentKitPreview}.tsx`
316
318
  (2026-07-18) — the rest of `DesignSystemFlow.tsx`'s remaining pieces: a
317
319
  color-swatch chip, a plain-value chip, and the theme-toggle-driven
318
320
  style-guide preview panel that renders both, with the token source
319
321
  genericized to host-injected data (the origin's markdown-parsing pipeline
320
322
  is not ported). Reuses the already-shipped `utils/color-math.ts` rather
321
- than re-deriving its math a second time. See `packages/ui/source-map.md`.
323
+ than re-deriving its math a second time. See the archived provenance ledger.
322
324
  - `src/features/file-dropzone/` — `FileDropzone`, a consolidated file-staging
323
325
  primitive (2026-07-18) ported from **two** independent OD file-staging
324
326
  zones — `DesignSystemAssetDropzone.tsx` (a kind-aware thumbnail grid +
@@ -329,7 +331,7 @@ Real content has landed in several parallel passes — see
329
331
  utilities the two features already duplicated a third time (from
330
332
  `features/asset-tree-browser/rules.ts`) up to `utils/file-transfer.ts` and
331
333
  `browser/useFileDropTarget.ts`, so this package now has exactly one copy.
332
- See `packages/ui/source-map.md` for the consolidation evidence, a real
334
+ See the archived provenance ledger for the consolidation evidence, a real
333
335
  infinite-render-loop bug found and fixed during this port, and full
334
336
  test/coverage numbers.
335
337
  - `src/features/folder-path-drop/` (2026-09-14) — dropping a folder onto a
@@ -337,20 +339,20 @@ Real content has landed in several parallel passes — see
337
339
  `webUtils.getPathForFile` as a `FolderPathDropPort`) inserts the folder's
338
340
  absolute path as text instead of uploading its contents. The
339
341
  framework-free rules are also on `./core`; `useFolderPathDropCapture`
340
- returns a stable `onDropCapture` handler. See `packages/ui/source-map.md`.
342
+ returns a stable `onDropCapture` handler. See the archived provenance ledger.
341
343
  - `src/utils/scroll-tabs-with-wheel.ts` and `src/utils/color-math.ts`
342
344
  (2026-07-18) — two flat bucket-A atoms from
343
345
  `ADS-memory/reports/jini-port/god-components-extraction-plan.md`'s Consolidation map §C:
344
346
  a generic wheel-to-horizontal-scroll handler for an overflowing tab strip
345
347
  (from `FileWorkspace.tsx`'s `scrollWorkspaceTabsWithWheel`) and hex/RGB/
346
348
  luminance/mix color-math primitives (from `DesignSystemFlow.tsx`). See
347
- `packages/ui/source-map.md` for the full writeup, including what was
349
+ the archived provenance ledger for the full writeup, including what was
348
350
  deliberately left behind (the OD-specific color-selection heuristic that
349
351
  consumes the math, not the math itself).
350
352
  - `src/features/lexical-rich-text-editor/` (renamed from `rich-text-input/`,
351
353
  2026-07-26 — the feature is Lexical specifically, not a general rich-text
352
354
  input, so the old name promised an engine-neutrality its Lexical-shaped API
353
- never had; see `packages/ui/source-map.md`'s dated rename entry) — a real Lexical (Meta's
355
+ never had; see the archived provenance ledger's dated rename entry) — a real Lexical (Meta's
354
356
  rich-text framework) editor integration ported from OD's chat composer
355
357
  (2026-07-18): editor setup/config, an atomic `@mention`/`/command`
356
358
  token node type (generic, host-injected `resolveMentionColor` instead of
@@ -358,7 +360,7 @@ Real content has landed in several parallel passes — see
358
360
  positioning hook/component, and serialize/deserialize between the
359
361
  editor's document model and a plain `@token` string. Named by three
360
362
  prior tasks (`mention-autocomplete`'s own "3-way overlap" note among
361
- them) as this exact destination. See `packages/ui/source-map.md`,
363
+ them) as this exact destination. See the archived provenance ledger,
362
364
  including four dead branches found and refactored away during the
363
365
  coverage-driven-refactor loop (a `mention-parser.ts` merge pass, a
364
366
  `rules.ts` selection catch-all, a `useSeededValue` StrictMode guard, and
@@ -373,3 +375,95 @@ Consolidation map's naming-reconciliation note) and `rich-text-input`
373
375
  (renamed `lexical-rich-text-editor`, 2026-07-26) are now landed, per above —
374
376
  no longer in this "not started" list. The god-components-extraction-plan.md
375
377
  list beyond the features enumerated above is also not started.
378
+
379
+ ## Integrated widgets and panel APIs
380
+
381
+ See [API-CONVENTION.md](./API-CONVENTION.md) for the widget, panel-kit, fetch-query, port and
382
+ object-argument API shapes, including the breaking changes collected in [CHANGELOG.md](./CHANGELOG.md).
383
+
384
+
385
+ ## Theming the admin
386
+
387
+ Import `@jini-ai/ui/styles/admin.css` for the variable contract, admin aliases and widgets.
388
+ For a custom layout that needs only the contract, import `@jini-ai/ui/styles/variables.css`.
389
+ The existing `admin-widgets.css`, `tabbed-dialog.css` and `settings-dialog.css` subpaths remain.
390
+ `@jini-ai/tokens` has been removed; no alias package is provided.
391
+
392
+ `@jini-ai/ui/theme` exports `AdminTheme`, `defaultAdminTheme`, `validateAdminTheme`,
393
+ `applyAdminTheme` and `resolveColorScheme`. A theme supplies `name`, body/heading fonts, an
394
+ optional mono font and font stylesheet URLs, complete light/dark palettes, and optional base
395
+ radius/density. The ten palette fields are `primary`, `primaryInk`, `bg`, `surface`, `text`,
396
+ `muted`, `border`, `danger`, `success` and `warning`. Existing variable names derive from this
397
+ compact contract. Palettes accept concrete hex, RGB/HSL/OKLCH/OKLab/Lab/LCH values or basic
398
+ color keywords; URLs, dependent variables, injected declarations and incomplete palettes fail
399
+ validation. Radius is a nonnegative px/rem/em length; density is a multiplier from 0.5 to 2.
400
+ The validator reports `{ valid, theme }` or `{ valid, errors }`; applying an invalid theme throws
401
+ before any DOM mutation. Neutral defaults hold no product brand.
402
+
403
+ ```tsx
404
+ import '@jini-ai/ui/styles/admin.css';
405
+ import { defaultAdminTheme } from '@jini-ai/ui/theme';
406
+ import { AdminShell } from '@jini-ai/admin/react/shell';
407
+
408
+ // The host supplies its document and storage adapters, along with the existing shell props.
409
+ const themeEnvironment = {
410
+ target: document.documentElement,
411
+ document,
412
+ matchMedia: window.matchMedia.bind(window),
413
+ };
414
+
415
+ <AdminShell {...hostShellProps}
416
+ theme={defaultAdminTheme}
417
+ themeEnvironment={themeEnvironment}
418
+ themePreferenceStore={hostUserPreferenceStore}
419
+ />;
420
+ ```
421
+
422
+ The preference store implements `read({ userId, workspace })` and
423
+ `write({ userId, workspace, preference })`; reads return `light`, `dark`, `system` or `null`.
424
+ The host owns persistent storage and keys. No user preference is written during mounting.
425
+ Authenticated slots receive `appearance`, including `setPreference({ preference })`, so the
426
+ host provides its own picker and labels. `colorScheme` makes the setting controlled when supplied;
427
+ `onColorSchemeChange({ preference })` tells that host to update it. Without a controlled prop,
428
+ the shell restores the user's stored choice or follows the system. User/workspace changes discard
429
+ the previous user's selection.
430
+
431
+ For other layouts call `applyAdminTheme({ theme }, { target, document })`; its cleanup restores
432
+ the scope and releases owned font links, with deduplication across active themes. Then call
433
+ `resolveColorScheme({ preference }, { matchMedia })` and set the target's `data-color-scheme`
434
+ attribute to the returned `light` or `dark`. A `system` preference requires the injected media
435
+ port. `AdminShell` subscribes to system changes and cleans up on unmount. Inject the document
436
+ root when components portal so dialogs share the palette. Former `data-theme` attributes must be
437
+ migrated to this resolved attribute. Independent theme scopes can use different target elements.
438
+
439
+ The `ZANA-THEME.md` and `the host-THEME.md` files preserve product data for later host adoption;
440
+ they are documentation, not runtime themes. Derived ramps/radius scales and the neutral defaults
441
+ change the previous look, so review both schemes during adoption. Verification was not run in the
442
+ extraction job at the owner's direction.
443
+
444
+ ## Design decisions
445
+
446
+ - [Reusable navigation hooks own state while the host owns effects](docs/decisions/DR-001-state-hooks-effect-ownership.md).
447
+
448
+ ## Kernel contracts
449
+
450
+ Fetch-query caches accept the shared `Clock` from `@jini-ai/core/primitives` through
451
+ `new FetchQueryCache({}, { clock })`; clocks implement `nowMs()`. Freshness remains ten seconds
452
+ by default and idle retention five minutes. Browser HTTP defaults now use injected
453
+ native fetch ports and have no platform imports.
454
+
455
+ The A2UI interpreter uses that same core `Clock` with `nowMs()`; import the clock type
456
+ directly from `@jini-ai/core/primitives`. The obsolete `A2uiClockPort` re-export is removed.
457
+ Create the basic catalog with `createLabCatalog({})` and inject it through
458
+ `createA2uiInterpreter({ catalog, clock, ids })`.
459
+
460
+ ## Browser transport ports
461
+
462
+ `useBrandFonts({ fonts }, { fetch?, manifest?, ... })` and
463
+ `ExportDiagnosticsButton`'s `fetch` prop accept native fetch implementations.
464
+ Memory's `createMemoryHttpPorts({}, { fetch? })` returns `{ config, entries, extractions }`;
465
+ pass these ports to the existing feature hooks. Omitted fetch uses `globalThis.fetch`.
466
+ Quick requests abort after 15 seconds and archive downloads after 120 seconds;
467
+ a caller signal is combined with the timeout. Browser failures retain native abort
468
+ reasons, including `TimeoutError`, rather than platform's `FetchTimeoutError`.
469
+ The package no longer depends on platform. Connector examples are vendor-neutral.
@@ -1,7 +1,7 @@
1
1
  // @jini-ai/ui/browser — small, generic browser-interaction hooks shared across
2
2
  // feature extractions (popovers/dialogs dismissing on outside-click/Escape,
3
3
  // global keydown shortcuts scoped to a component's active lifetime). See
4
- // packages/ui/source-map.md for the extractions that motivated this and
4
+ // packages/ui/archived provenance ledger for the extractions that motivated this and
5
5
  // AGENTS.md's `packages/ui` entry for how this directory relates to
6
6
  // `utils/`, `hooks/`, and `components/`.
7
7
  export * from './useDismissOnOutsideOrEscape.js';
@@ -1,5 +1,6 @@
1
1
  import type { RefObject } from 'react';
2
2
  export interface UseDismissOnOutsideOrEscapeOptions {
3
+ subscription?: DismissSubscriptionPort;
3
4
  /** Skip attaching any listeners while `false` (e.g. only while a menu is open). Defaults to `true`. */
4
5
  enabled?: boolean;
5
6
  /**
@@ -10,9 +11,17 @@ export interface UseDismissOnOutsideOrEscapeOptions {
10
11
  */
11
12
  containerRef?: RefObject<HTMLElement | null>;
12
13
  }
14
+ export interface DismissSubscriptionPort {
15
+ subscribe(requiredArgs: {
16
+ containerRef: RefObject<HTMLElement | null> | undefined;
17
+ onDismiss: () => void;
18
+ }): () => void;
19
+ }
13
20
  /**
14
21
  * Calls `onDismiss` on a `pointerdown` outside `options.containerRef` (when
15
22
  * supplied) or on the Escape key anywhere. A no-op outside the browser (SSR).
16
23
  */
17
- export declare function useDismissOnOutsideOrEscape(onDismiss: () => void, options?: UseDismissOnOutsideOrEscapeOptions): void;
24
+ export declare function useDismissOnOutsideOrEscape({ onDismiss }: {
25
+ onDismiss: () => void;
26
+ }, options?: UseDismissOnOutsideOrEscapeOptions): void;
18
27
  //# sourceMappingURL=useDismissOnOutsideOrEscape.d.ts.map
@@ -22,12 +22,15 @@
22
22
  // indirection so callers don't have to memoize `onDismiss`.
23
23
  import { useEffect, useRef } from 'react';
24
24
  import { subscribeOutsideClickOrEscape } from '../utils/dom-subscriptions.js';
25
+ const browserSubscription = {
26
+ subscribe: ({ containerRef, onDismiss }) => subscribeOutsideClickOrEscape(containerRef, onDismiss),
27
+ };
25
28
  /**
26
29
  * Calls `onDismiss` on a `pointerdown` outside `options.containerRef` (when
27
30
  * supplied) or on the Escape key anywhere. A no-op outside the browser (SSR).
28
31
  */
29
- export function useDismissOnOutsideOrEscape(onDismiss, options = {}) {
30
- const { enabled = true, containerRef } = options;
32
+ export function useDismissOnOutsideOrEscape({ onDismiss }, options = {}) {
33
+ const { enabled = true, containerRef, subscription = browserSubscription } = options;
31
34
  // Latest-ref indirection so callers don't need to memoize `onDismiss` for
32
35
  // the subscription effect below to stay attached with fresh behavior.
33
36
  const onDismissRef = useRef(onDismiss);
@@ -37,7 +40,7 @@ export function useDismissOnOutsideOrEscape(onDismiss, options = {}) {
37
40
  useEffect(() => {
38
41
  if (!enabled)
39
42
  return;
40
- return subscribeOutsideClickOrEscape(containerRef, () => onDismissRef.current());
41
- }, [enabled, containerRef]);
43
+ return subscription.subscribe({ containerRef, onDismiss: () => onDismissRef.current() });
44
+ }, [enabled, containerRef, subscription]);
42
45
  }
43
46
  //# sourceMappingURL=useDismissOnOutsideOrEscape.js.map
@@ -1,5 +1,15 @@
1
- export declare function resolveGlobalKeydownTarget(target: 'window' | 'document'): EventTarget | undefined;
1
+ export declare function resolveGlobalKeydownTarget({ target }: {
2
+ target: 'window' | 'document';
3
+ }, { globals }?: {
4
+ globals?: {
5
+ window?: EventTarget;
6
+ document?: EventTarget;
7
+ };
8
+ }): EventTarget | undefined;
2
9
  export interface UseGlobalKeydownOptions {
10
+ resolveTarget?: (requiredArgs: {
11
+ target: 'window' | 'document';
12
+ }) => EventTarget | undefined;
3
13
  /** Skip attaching the listener while `false` (e.g. only while a surface is active/mounted-and-open). Defaults to `true`. */
4
14
  enabled?: boolean;
5
15
  /** Listener target. Defaults to `'window'`. */
@@ -12,5 +22,7 @@ export interface UseGlobalKeydownOptions {
12
22
  * `true`, removing it on cleanup or when `enabled` flips to `false`. A no-op
13
23
  * outside the browser (SSR).
14
24
  */
15
- export declare function useGlobalKeydown(handler: (event: KeyboardEvent) => void, options?: UseGlobalKeydownOptions): void;
25
+ export declare function useGlobalKeydown({ handler }: {
26
+ handler: (event: KeyboardEvent) => void;
27
+ }, options?: UseGlobalKeydownOptions): void;
16
28
  //# sourceMappingURL=useGlobalKeydown.d.ts.map
@@ -15,19 +15,19 @@ import { useEffect, useRef } from 'react';
15
15
  // a direct unit test — driving it through a real `renderHook` mount hits
16
16
  // React DOM internals that themselves dereference `window` well before this
17
17
  // hook's own effect ever runs, making that branch unreachable via a
18
- // rendered test (see packages/ui/source-map.md's 2026-07-22 dated entry;
18
+ // rendered test (see packages/ui/archived provenance ledger's 2026-07-22 dated entry;
19
19
  // same "extract into a directly-testable pure function" precedent as
20
20
  // `@jini-ai/mcp`'s `oauth.ts` readCappedText).
21
- export function resolveGlobalKeydownTarget(target) {
22
- return target === 'document' ? globalThis.document : globalThis.window;
21
+ export function resolveGlobalKeydownTarget({ target }, { globals = globalThis } = {}) {
22
+ return target === 'document' ? globals.document : globals.window;
23
23
  }
24
24
  /**
25
25
  * Attaches `handler` as a `keydown` listener for as long as `enabled` stays
26
26
  * `true`, removing it on cleanup or when `enabled` flips to `false`. A no-op
27
27
  * outside the browser (SSR).
28
28
  */
29
- export function useGlobalKeydown(handler, options = {}) {
30
- const { enabled = true, target = 'window', capture = false } = options;
29
+ export function useGlobalKeydown({ handler }, options = {}) {
30
+ const { enabled = true, target = 'window', capture = false, resolveTarget = resolveGlobalKeydownTarget } = options;
31
31
  // Latest-ref indirection so callers don't need to memoize `handler` for
32
32
  // the listener effect below to stay attached with fresh behavior.
33
33
  const handlerRef = useRef(handler);
@@ -37,17 +37,8 @@ export function useGlobalKeydown(handler, options = {}) {
37
37
  useEffect(() => {
38
38
  if (!enabled)
39
39
  return;
40
- const eventTarget = resolveGlobalKeydownTarget(target);
41
- // `resolveGlobalKeydownTarget` itself has a direct, real test proving
42
- // it CAN return `undefined` (see this file's own test). This call
43
- // site's guard against that, though, is empirically and structurally
44
- // unreachable through any real mount: `useEffect` bodies only ever run
45
- // client-side, after React has already committed real DOM nodes via
46
- // `ReactDOM` — which itself requires `window` (and, for a 'document'
47
- // target, `document`) to already exist. There is no real browser
48
- // session in which this hook's effect runs at all while its own
49
- // resolved target has vanished. See packages/ui/source-map.md's
50
- // 2026-07-22 dated entry.
40
+ const eventTarget = resolveTarget({ target });
41
+ // A host may intentionally provide no target while its surface is detached.
51
42
  if (typeof eventTarget === 'undefined')
52
43
  return;
53
44
  function onKeyDown(event) {
@@ -55,6 +46,6 @@ export function useGlobalKeydown(handler, options = {}) {
55
46
  }
56
47
  eventTarget.addEventListener('keydown', onKeyDown, capture);
57
48
  return () => eventTarget.removeEventListener('keydown', onKeyDown, capture);
58
- }, [enabled, target, capture]);
49
+ }, [enabled, target, capture, resolveTarget]);
59
50
  }
60
51
  //# sourceMappingURL=useGlobalKeydown.js.map
@@ -2,12 +2,12 @@ import type { Catalog } from './protocol.js';
2
2
  import type { InteractiveUiRegistry } from '../interactive-ui/registry.js';
3
3
  export interface BuildA2uiCatalogFromRegistryOptions {
4
4
  /**
5
- * A catalog to merge registry components into — typically `createLabCatalog()`, so the result
5
+ * A catalog to merge registry components into — typically `createLabCatalog({})`, so the result
6
6
  * has both the 18 basic layout/text primitives (`Row`/`Column`/`Card`/`Text`/`Button`/etc.) AND
7
7
  * registry-sourced components (`native.data-table`, `shadcn.data-table`). Without a `base`, the
8
8
  * result has only registry components, which is enough to validate/resolve one in isolation but
9
9
  * cannot compose a tree — a table alone isn't a page, it needs a container to sit in. Omitted
10
- * entirely (not defaulted to `createLabCatalog()` here) so a caller that only ever wants
10
+ * entirely (not defaulted to `createLabCatalog({})` here) so a caller that only ever wants
11
11
  * registry components — the manifests-only MCP search path, for one — doesn't pull in basic-type
12
12
  * schemas it will never use. `functions` come from `base` unchanged; registry components don't
13
13
  * define any of their own.
@@ -26,5 +26,8 @@ export interface BuildA2uiCatalogFromRegistryOptions {
26
26
  * `kind` for these entries anyway — it resolves by matching `component.component` directly
27
27
  * against the registry, so this is a documented simplification, not a load-bearing choice.
28
28
  */
29
- export declare function buildA2uiCatalogFromRegistry(registry: InteractiveUiRegistry, catalogId: string, options?: BuildA2uiCatalogFromRegistryOptions): Catalog;
29
+ export declare function buildA2uiCatalogFromRegistry({ registry, catalogId }: {
30
+ registry: Pick<InteractiveUiRegistry, 'list'>;
31
+ catalogId: string;
32
+ }, options?: BuildA2uiCatalogFromRegistryOptions): Catalog;
30
33
  //# sourceMappingURL=catalog-from-registry.d.ts.map
@@ -10,7 +10,7 @@
10
10
  * `kind` for these entries anyway — it resolves by matching `component.component` directly
11
11
  * against the registry, so this is a documented simplification, not a load-bearing choice.
12
12
  */
13
- export function buildA2uiCatalogFromRegistry(registry, catalogId, options = {}) {
13
+ export function buildA2uiCatalogFromRegistry({ registry, catalogId }, options = {}) {
14
14
  const registryComponents = registry.list().map((entry) => [
15
15
  entry.id,
16
16
  { kind: 'container', propsSchema: entry.propsSchema },
@@ -1,4 +1,4 @@
1
- export { createA2uiInterpreter, createLabCatalog, type A2uiInterpreter, type ApplyMessageResult, type BuildActionResult, type ComponentInstance, type SurfaceSnapshot, type Catalog, type ComponentSpec, type ComponentKind, } from './protocol.js';
1
+ export { createA2uiInterpreter, createLabCatalog, type A2uiInterpreter, type A2uiIdsPort, type ApplyMessageResult, type BuildActionResult, type ComponentInstance, type SurfaceSnapshot, type Catalog, type ComponentSpec, type ComponentKind, } from './protocol.js';
2
2
  export { buildA2uiCatalogFromRegistry, type BuildA2uiCatalogFromRegistryOptions, } from './catalog-from-registry.js';
3
3
  export { useA2uiSurfaceRoot } from './use-a2ui-surface.js';
4
4
  export { A2uiSurfaceRenderer, type A2uiSurfaceRendererProps } from './renderer.js';