@jini-ai/ui 0.3.14 → 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 (327) 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/tokens.d.ts +17 -20
  123. package/dist/features/mcp-ui/surfaces/tokens.js +33 -35
  124. package/dist/features/media-providers/index.d.ts +1 -1
  125. package/dist/features/media-providers/index.js +1 -1
  126. package/dist/features/media-providers/react/components/MediaProvidersTab.js +4 -4
  127. package/dist/features/media-providers/rules.js +1 -1
  128. package/dist/features/memory/async-commit-guard.d.ts +1 -1
  129. package/dist/features/memory/constants.d.ts +1 -1
  130. package/dist/features/memory/constants.js +1 -1
  131. package/dist/features/memory/dependencies.d.ts +11 -23
  132. package/dist/features/memory/dependencies.js +116 -106
  133. package/dist/features/memory/index.d.ts +1 -1
  134. package/dist/features/memory/index.js +1 -1
  135. package/dist/features/memory/react/components/MemoryAdvancedModal.js +2 -2
  136. package/dist/features/memory/react/components/MemoryEntryCard.js +1 -1
  137. package/dist/features/memory/react/components/MemoryExtractionCard.js +1 -1
  138. package/dist/features/memory/react/components/MemoryHooksPanel.js +1 -1
  139. package/dist/features/memory/react/components/MemoryList.js +5 -5
  140. package/dist/features/memory/react/components/MemoryManualEditor.js +5 -5
  141. package/dist/features/memory/react/components/MemorySettingsPanel.js +1 -1
  142. package/dist/features/memory/react/hooks/useMemoryEntries.hooks.js +1 -1
  143. package/dist/features/memory/react/hooks/useMemoryNavigation.hooks.js +1 -1
  144. package/dist/features/memory/react/styles.js +1 -1
  145. package/dist/features/memory/rules.js +1 -1
  146. package/dist/features/memory/types.d.ts +1 -1
  147. package/dist/features/mention-autocomplete/react/hooks/useMentionAutocomplete.js +1 -1
  148. package/dist/features/notifications/react/components/NotificationsTab.js +7 -7
  149. package/dist/features/notifications/types.d.ts +1 -1
  150. package/dist/features/observability/boot-timing.js +2 -2
  151. package/dist/features/observability/stuck-run.js +1 -1
  152. package/dist/features/observability/white-screen.js +4 -4
  153. package/dist/features/panel-kit/fetch-query/adapter.react.d.ts +35 -0
  154. package/dist/features/panel-kit/fetch-query/adapter.react.js +122 -0
  155. package/dist/features/panel-kit/fetch-query/cache.d.ts +123 -0
  156. package/dist/features/panel-kit/fetch-query/cache.js +231 -0
  157. package/dist/features/panel-kit/fetch-query/environment.browser.d.ts +4 -0
  158. package/dist/features/panel-kit/fetch-query/environment.browser.js +25 -0
  159. package/dist/features/panel-kit/fetch-query/index.d.ts +4 -0
  160. package/dist/features/panel-kit/fetch-query/index.js +2 -0
  161. package/dist/features/panel-kit/fetch-query/types.d.ts +91 -0
  162. package/dist/features/panel-kit/fetch-query/types.js +2 -0
  163. package/dist/features/panel-kit/helpers/format-timestamp.d.ts +18 -0
  164. package/dist/features/panel-kit/helpers/format-timestamp.js +20 -0
  165. package/dist/features/panel-kit/helpers/permissions.d.ts +11 -0
  166. package/dist/features/panel-kit/helpers/permissions.js +10 -0
  167. package/dist/features/panel-kit/helpers/resolve-active-tab-id.d.ts +13 -0
  168. package/dist/features/panel-kit/helpers/resolve-active-tab-id.js +13 -0
  169. package/dist/features/panel-kit/helpers/retry-unreachable.d.ts +20 -0
  170. package/dist/features/panel-kit/helpers/retry-unreachable.js +39 -0
  171. package/dist/features/panel-kit/hooks/use-async-action.hooks.d.ts +13 -0
  172. package/dist/features/panel-kit/hooks/use-async-action.hooks.js +27 -0
  173. package/dist/features/panel-kit/hooks/use-dirty-guard.hooks.d.ts +18 -0
  174. package/dist/features/panel-kit/hooks/use-dirty-guard.hooks.js +33 -0
  175. package/dist/features/panel-kit/hooks/use-focus-trap.hooks.d.ts +8 -0
  176. package/dist/features/panel-kit/hooks/use-focus-trap.hooks.js +66 -0
  177. package/dist/features/panel-kit/hooks/use-serial-writes.hooks.d.ts +26 -0
  178. package/dist/features/panel-kit/hooks/use-serial-writes.hooks.js +41 -0
  179. package/dist/features/panel-kit/hooks/use-settlement-generation.hooks.d.ts +9 -0
  180. package/dist/features/panel-kit/hooks/use-settlement-generation.hooks.js +25 -0
  181. package/dist/features/panel-kit/index.d.ts +19 -0
  182. package/dist/features/panel-kit/index.js +13 -0
  183. package/dist/features/privacy/react/components/PrivacyTab.js +2 -2
  184. package/dist/features/privacy/types.d.ts +1 -1
  185. package/dist/features/privacy/types.js +1 -1
  186. package/dist/features/progress-card/reference-adapters.d.ts +1 -1
  187. package/dist/features/progress-card/rules.d.ts +1 -1
  188. package/dist/features/progress-card/rules.js +1 -1
  189. package/dist/features/progress-card/types.d.ts +1 -1
  190. package/dist/features/progress-card/types.js +1 -1
  191. package/dist/features/resource-dashboard/dependencies.d.ts +1 -1
  192. package/dist/features/resource-dashboard/ports.d.ts +1 -1
  193. package/dist/features/resource-dashboard/react/hooks/useResourceBoard.d.ts +1 -1
  194. package/dist/features/resource-dashboard/react/hooks/useResourceBoard.js +1 -1
  195. package/dist/features/resource-dashboard/rules.d.ts +1 -1
  196. package/dist/features/resource-dashboard/rules.js +2 -2
  197. package/dist/features/resource-dashboard/types.d.ts +4 -4
  198. package/dist/features/resource-dashboard/types.js +1 -1
  199. package/dist/features/schedule-picker/react/hooks/useRecurringSchedulePicker.js +1 -1
  200. package/dist/features/settings/dialog/styles/settings-dialog.css +62 -60
  201. package/dist/features/sketch-editor/constants.d.ts +1 -1
  202. package/dist/features/sketch-editor/constants.js +1 -1
  203. package/dist/features/sketch-editor/dom.d.ts +1 -1
  204. package/dist/features/sketch-editor/dom.js +1 -1
  205. package/dist/features/sketch-editor/react/hooks/useSketchDomEnhancements.d.ts +1 -1
  206. package/dist/features/sketch-editor/react/hooks/useSketchDomEnhancements.js +11 -9
  207. package/dist/features/sketch-editor/types.d.ts +1 -1
  208. package/dist/features/sketch-editor/types.js +1 -1
  209. package/dist/features/skills/react/components/SkillDraftForm.js +1 -1
  210. package/dist/features/skills/react/components/SkillRow.js +1 -1
  211. package/dist/features/skills/react/components/SkillsTab.js +2 -2
  212. package/dist/features/source-config-list/agent-handles.js +2 -2
  213. package/dist/features/source-config-list/react/hooks/useSourceConfigAddForm.d.ts +1 -1
  214. package/dist/features/source-config-list/react/hooks/useSourceConfigAddForm.js +1 -1
  215. package/dist/features/source-config-list/rules.d.ts +1 -1
  216. package/dist/features/source-config-list/rules.js +3 -3
  217. package/dist/features/source-config-list/types.d.ts +1 -1
  218. package/dist/features/source-config-list/types.js +1 -1
  219. package/dist/features/tab-launcher-menu/react/hooks/useTabLauncherMenu.js +1 -1
  220. package/dist/features/tab-strip/index.d.ts +4 -0
  221. package/dist/features/tab-strip/index.js +2 -0
  222. package/dist/features/tab-strip/react/components/TabBar.d.ts +23 -0
  223. package/dist/features/tab-strip/react/components/TabBar.hooks.d.ts +25 -0
  224. package/dist/features/tab-strip/react/components/TabBar.hooks.js +57 -0
  225. package/dist/features/tab-strip/react/components/TabBar.js +18 -0
  226. package/dist/features/tab-strip/react/components/TabStrip.js +2 -1
  227. package/dist/features/tab-strip/react/components/TabStripFrame.d.ts +3 -0
  228. package/dist/features/tab-strip/react/components/TabStripFrame.js +7 -0
  229. package/dist/features/tabbed-dialog/react/hooks/useTabbedDialog.js +1 -1
  230. package/dist/features/tabbed-dialog/styles/tabbed-dialog.css +8 -141
  231. package/dist/features/tabbed-dialog/types.d.ts +1 -1
  232. package/dist/features/tabbed-dialog/types.js +1 -1
  233. package/dist/features/version-manager/ports.d.ts +1 -1
  234. package/dist/features/version-manager/react/components/VersionPromptPopover.js +5 -3
  235. package/dist/features/version-manager/react/components/VersionRestoreControl.js +1 -1
  236. package/dist/features/version-manager/types.d.ts +1 -1
  237. package/dist/features/version-manager/types.js +1 -1
  238. package/dist/features/viewer-shell/dependencies.js +1 -1
  239. package/dist/features/viewer-shell/ports.d.ts +1 -1
  240. package/dist/features/viewer-shell/react/components/ViewportSwitcher.js +1 -1
  241. package/dist/features/viewer-shell/react/hooks/useMarkdownScrollSync.d.ts +1 -1
  242. package/dist/features/viewer-shell/react/hooks/useMarkdownScrollSync.js +1 -1
  243. package/dist/features/viewer-shell/types.d.ts +1 -1
  244. package/dist/features/viewer-shell/types.js +1 -1
  245. package/dist/index.d.ts +420 -0
  246. package/dist/index.js +421 -1
  247. package/dist/react/components/ComponentKitPreview.js +1 -1
  248. package/dist/react/components/EditorIcon.d.ts +1 -1
  249. package/dist/react/components/EditorIcon.js +22 -22
  250. package/dist/react/components/ExportDiagnosticsButton.d.ts +8 -1
  251. package/dist/react/components/ExportDiagnosticsButton.js +6 -6
  252. package/dist/react/components/PaletteTweaks.js +5 -5
  253. package/dist/react/hooks/useBrandFonts.d.ts +19 -4
  254. package/dist/react/hooks/useBrandFonts.js +11 -7
  255. package/dist/react/hooks/useDebouncedValue.d.ts +12 -1
  256. package/dist/react/hooks/useDebouncedValue.js +9 -4
  257. package/dist/react/hooks/useStableHandler.d.ts +3 -1
  258. package/dist/react/hooks/useStableHandler.js +1 -1
  259. package/dist/renderers/annotation-canvas/drawing.d.ts +4 -4
  260. package/dist/renderers/annotation-canvas/drawing.js +28 -15
  261. package/dist/renderers/annotation-canvas/react/components/AnnotationCanvas.js +2 -2
  262. package/dist/renderers/annotation-canvas/react/hooks/useAnnotationCanvas.js +4 -3
  263. package/dist/renderers/annotation-canvas/rules.d.ts +1 -1
  264. package/dist/renderers/annotation-canvas/theme.d.ts +13 -0
  265. package/dist/renderers/annotation-canvas/theme.js +16 -0
  266. package/dist/renderers/annotation-canvas/types.d.ts +1 -1
  267. package/dist/renderers/index.d.ts +1 -1
  268. package/dist/renderers/new-tab-preview.d.ts +3 -0
  269. package/dist/renderers/new-tab-preview.js +3 -1
  270. package/dist/renderers/preview-modal-shell/react/hooks/usePreviewModalShell.d.ts +1 -1
  271. package/dist/renderers/preview-modal-shell/react/hooks/usePreviewModalShell.js +1 -1
  272. package/dist/renderers/preview-modal-shell/rules.d.ts +1 -1
  273. package/dist/renderers/preview-modal-shell/types.d.ts +3 -3
  274. package/dist/renderers/preview-modal-shell/types.js +2 -2
  275. package/dist/renderers/react/components/ArtifactView.d.ts +1 -1
  276. package/dist/renderers/react/components/ArtifactView.js +1 -1
  277. package/dist/renderers/registry.d.ts +12 -6
  278. package/dist/renderers/registry.js +7 -9
  279. package/dist/renderers/renderers/html.js +2 -2
  280. package/dist/renderers/renderers/index.js +1 -1
  281. package/dist/renderers/renderers/markdown.js +2 -2
  282. package/dist/renderers/renderers/react-component.js +1 -1
  283. package/dist/renderers/renderers/svg.js +1 -1
  284. package/dist/renderers/shiki.js +1 -1
  285. package/dist/renderers/srcdoc/build.d.ts +1 -1
  286. package/dist/renderers/srcdoc/build.js +1 -1
  287. package/dist/renderers/url-load-decision.d.ts +1 -1
  288. package/dist/renderers/url-load-decision.js +1 -1
  289. package/dist/styles/admin.css +273 -0
  290. package/dist/styles/variables.css +117 -0
  291. package/dist/theme/apply.d.ts +9 -0
  292. package/dist/theme/apply.js +77 -0
  293. package/dist/theme/color-scheme.d.ts +8 -0
  294. package/dist/theme/color-scheme.js +9 -0
  295. package/dist/theme/default.d.ts +4 -0
  296. package/dist/theme/default.js +11 -0
  297. package/dist/theme/index.d.ts +6 -0
  298. package/dist/theme/index.js +5 -0
  299. package/dist/theme/stylesheet.d.ts +8 -0
  300. package/dist/theme/stylesheet.js +14 -0
  301. package/dist/theme/types.d.ts +39 -0
  302. package/dist/theme/types.js +2 -0
  303. package/dist/theme/validation.d.ts +15 -0
  304. package/dist/theme/validation.js +55 -0
  305. package/dist/utils/appearance.js +1 -1
  306. package/dist/utils/browser-request.d.ts +12 -0
  307. package/dist/utils/browser-request.js +10 -0
  308. package/dist/utils/color-math.d.ts +20 -6
  309. package/dist/utils/color-math.js +12 -12
  310. package/dist/utils/copy-to-clipboard.d.ts +19 -8
  311. package/dist/utils/copy-to-clipboard.js +15 -11
  312. package/dist/utils/dom-subscriptions.js +1 -1
  313. package/dist/utils/endpoint-policy.d.ts +9 -3
  314. package/dist/utils/endpoint-policy.js +5 -5
  315. package/dist/utils/markdown-scroll-sync.js +3 -3
  316. package/dist/utils/notifications.d.ts +1 -1
  317. package/dist/utils/notifications.js +1 -1
  318. package/dist/utils/polygon-selection.d.ts +1 -1
  319. package/dist/utils/polygon-selection.js +1 -1
  320. package/dist/utils/scroll-tabs-with-wheel.d.ts +4 -1
  321. package/dist/utils/scroll-tabs-with-wheel.js +1 -1
  322. package/dist/utils/smooth-scroll-to-top.js +1 -1
  323. package/dist/utils/sse.d.ts +3 -1
  324. package/dist/utils/sse.js +1 -1
  325. package/package.json +105 -16
  326. package/dist/features/lexical-rich-text-editor/react/test-support/lexical-harness.d.ts +0 -11
  327. package/dist/features/lexical-rich-text-editor/react/test-support/lexical-harness.js +0 -35
@@ -14,7 +14,7 @@ export function LocalCliAgentList({ agents, config, scan, onSelect, onModelChang
14
14
  const t = useT();
15
15
  const installed = agents.filter((agent) => agent.installed);
16
16
  const scope = scopeLabel ?? t('Runs a code-agent CLI detected by the host.');
17
- const cardHandles = agentHandle ? buildAgentListHandles(agentHandle, agents.map((agent) => agent.id)) : undefined;
18
- return (_jsxs("section", { className: "jini-settings-section jini-local-cli", children: [_jsxs("div", { className: "jini-section-head", children: [_jsxs("div", { className: "jini-section-head-text", children: [_jsxs("h4", { className: "jini-agent-group-head", children: [t('Your CLIs'), " (", installed.length, ")"] }), _jsx("p", { className: "jini-field-hint", children: t('Pick the CLI that runs your prompts.') })] }), onRescan ? (_jsx("button", { type: "button", className: "jini-btn jini-local-cli-rescan", disabled: scan.status === 'scanning', onClick: onRescan, ...agentHandleProps(agentHandle, { action: 'rescan', role: 'button', label: t('Rescan') }), children: scan.status === 'scanning' ? t('Scanning…') : t('↻ Rescan') })) : null] }), _jsx("p", { className: "jini-field-hint jini-local-cli-scope", children: scope }), scan.status === 'error' ? (_jsx("p", { className: "jini-field-hint is-error", role: "alert", children: scan.message })) : null, scan.status === 'scanning' ? (_jsxs("div", { className: "jini-agent-scan-card", role: "status", "aria-live": "polite", children: [_jsx("span", { className: "jini-agent-scan-ring", "aria-hidden": "true" }), _jsx("strong", { children: t('Scanning for installed agents…') })] })) : agents.length === 0 ? (scan.status === 'error' ? null : (_jsx("div", { className: "jini-empty-card", children: t('No agent CLIs detected.') }))) : (_jsx("div", { className: "jini-agent-grid", children: agents.map((agent, index) => (_jsx(LocalCliAgentCard, { agent: agent, config: config, selected: config.agentId === agent.id, onSelect: onSelect, onModelChange: onModelChange, onReasoningChange: onReasoningChange, onEnvChange: onEnvChange, cliEnvFields: cliEnvFields, renderIcon: renderAgentIcon, onTest: onTest, agentTest: agentTest, onRescan: onRescan, ...(cardHandles?.[index] ? { agentHandle: cardHandles[index] } : {}) }, agent.id))) }))] }));
17
+ const cardHandles = agentHandle ? buildAgentListHandles({ prefix: agentHandle, ids: agents.map((agent) => agent.id) }) : undefined;
18
+ return (_jsxs("section", { className: "jini-settings-section jini-local-cli", children: [_jsxs("div", { className: "jini-section-head", children: [_jsxs("div", { className: "jini-section-head-text", children: [_jsxs("h4", { className: "jini-agent-group-head", children: [t('Your CLIs'), " (", installed.length, ")"] }), _jsx("p", { className: "jini-field-hint", children: t('Pick the CLI that runs your prompts.') })] }), onRescan ? (_jsx("button", { type: "button", className: "jini-btn jini-local-cli-rescan", disabled: scan.status === 'scanning', onClick: onRescan, ...agentHandleProps({}, { base: agentHandle, ...({ action: 'rescan', role: 'button', label: t('Rescan') }) }), children: scan.status === 'scanning' ? t('Scanning…') : t('↻ Rescan') })) : null] }), _jsx("p", { className: "jini-field-hint jini-local-cli-scope", children: scope }), scan.status === 'error' ? (_jsx("p", { className: "jini-field-hint is-error", role: "alert", children: scan.message })) : null, scan.status === 'scanning' ? (_jsxs("div", { className: "jini-agent-scan-card", role: "status", "aria-live": "polite", children: [_jsx("span", { className: "jini-agent-scan-ring", "aria-hidden": "true" }), _jsx("strong", { children: t('Scanning for installed agents…') })] })) : agents.length === 0 ? (scan.status === 'error' ? null : (_jsx("div", { className: "jini-empty-card", children: t('No agent CLIs detected.') }))) : (_jsx("div", { className: "jini-agent-grid", children: agents.map((agent, index) => (_jsx(LocalCliAgentCard, { agent: agent, config: config, selected: config.agentId === agent.id, onSelect: onSelect, onModelChange: onModelChange, onReasoningChange: onReasoningChange, onEnvChange: onEnvChange, cliEnvFields: cliEnvFields, renderIcon: renderAgentIcon, onTest: onTest, agentTest: agentTest, onRescan: onRescan, ...(cardHandles?.[index] ? { agentHandle: cardHandles[index] } : {}) }, agent.id))) }))] }));
19
19
  }
20
20
  //# sourceMappingURL=LocalCliAgentList.js.map
@@ -12,7 +12,7 @@ export function ProviderChipGroup({ label, presets, selectedPresetId, configured
12
12
  if (presets.length === 0)
13
13
  return null;
14
14
  const chipHandles = agentHandle
15
- ? buildAgentListHandles(agentHandle, presets.map((preset) => preset.id))
15
+ ? buildAgentListHandles({ prefix: agentHandle, ids: presets.map((preset) => preset.id) })
16
16
  : undefined;
17
17
  return (_jsxs("div", { className: "jini-provider-chip-row", role: "tablist", "aria-label": label, children: [_jsx("span", { className: "jini-provider-chip-row-label", children: label }), _jsx("div", { className: "jini-provider-chip-options", children: presets.map((preset, index) => {
18
18
  const active = selectedPresetId === preset.id;
@@ -20,7 +20,7 @@ export function ProviderChipGroup({ label, presets, selectedPresetId, configured
20
20
  return (_jsxs("button", { type: "button", role: "tab", "aria-selected": active, className: 'jini-provider-chip' + (active ? ' active' : ''), title: `${preset.title} — ${configured ? configuredLabel : unsetLabel}`, onClick: () => {
21
21
  if (!active)
22
22
  onSelect(preset);
23
- }, ...agentHandleProps(chipHandles?.[index], { role: 'button', label: preset.title }), children: [_jsx("span", { className: `jini-provider-chip-status${configured ? ' is-configured' : ' is-unset'}`, "aria-hidden": "true" }), _jsx("span", { children: preset.title })] }, preset.id));
23
+ }, ...agentHandleProps({}, { base: chipHandles?.[index], ...({ role: 'button', label: preset.title }) }), children: [_jsx("span", { className: `jini-provider-chip-status${configured ? ' is-configured' : ' is-unset'}`, "aria-hidden": "true" }), _jsx("span", { children: preset.title })] }, preset.id));
24
24
  }) })] }));
25
25
  }
26
26
  //# sourceMappingURL=ProviderChipGroup.js.map
@@ -46,7 +46,7 @@ export function SearchableModelSelect({ models, value, onChange, ariaLabel, sear
46
46
  setQuery('');
47
47
  }
48
48
  };
49
- return (_jsx("div", { className: "jini-searchable-select", "data-testid": testId, ...agentHandleProps(agentHandle, { role: 'field', label: ariaLabel }), children: _jsx(CustomSelect, { value: value, options: visibleOptions, onChange: onChange, ariaLabel: ariaLabel, className: className, ...(menuClassName === undefined ? {} : { menuClassName }), onOpenChange: handleOpenChange, menuHeader: shouldShowSearch ? (_jsx("div", { className: "jini-searchable-select-search-row", children: _jsx("input", { ref: searchRef, type: "search", className: "jini-input jini-searchable-select-search", value: query, placeholder: searchPlaceholder, "aria-label": searchPlaceholder, "data-testid": searchInputTestId,
49
+ return (_jsx("div", { className: "jini-searchable-select", "data-testid": testId, ...agentHandleProps({}, { base: agentHandle, ...({ role: 'field', label: ariaLabel }) }), children: _jsx(CustomSelect, { value: value, options: visibleOptions, onChange: onChange, ariaLabel: ariaLabel, className: className, ...(menuClassName === undefined ? {} : { menuClassName }), onOpenChange: handleOpenChange, menuHeader: shouldShowSearch ? (_jsx("div", { className: "jini-searchable-select-search-row", children: _jsx("input", { ref: searchRef, type: "search", className: "jini-input jini-searchable-select-search", value: query, placeholder: searchPlaceholder, "aria-label": searchPlaceholder, "data-testid": searchInputTestId,
50
50
  // The popover's own outside-pointerdown/keydown listeners are
51
51
  // scoped to the menu element, so typing here never closes it
52
52
  // — but stopping propagation keeps that explicit rather than
@@ -20,7 +20,7 @@ import { API_KEY_CROSS_VENDOR_WARNING, API_KEY_TOO_SHORT_WARNING, CUSTOM_PRESET_
20
20
  * connection time.
21
21
  */
22
22
  export function isValidApiBaseUrl(raw) {
23
- return isAllowedEndpointUrl(raw);
23
+ return isAllowedEndpointUrl({ raw });
24
24
  }
25
25
  /** The synthetic "Custom" preset, so the picker always has a manual escape
26
26
  * hatch even when a host supplies zero presets. */
@@ -30,9 +30,11 @@ export function FileDropzone({ label, prompt, helper, accept, directory = false,
30
30
  const [lightboxFile, setLightboxFile] = useState(null);
31
31
  const dropzone = useFileDropzoneHook({ onFiles, onZoneClick, onError, onProcessingStart, enablePaste });
32
32
  const previews = useFileDropzonePreviewsHook(files ?? NO_FILES);
33
- useGlobalKeydown((event) => {
34
- if (event.key === 'Escape')
35
- setLightboxFile(null);
33
+ useGlobalKeydown({
34
+ handler: (event) => {
35
+ if (event.key === 'Escape')
36
+ setLightboxFile(null);
37
+ },
36
38
  }, { enabled: lightboxFile !== null });
37
39
  function onZoneKeyDown(event) {
38
40
  if (event.key === 'Enter' || event.key === ' ') {
@@ -37,7 +37,7 @@ export interface UseFileDropzoneResult {
37
37
  * cancel-vs-still-loading detection heuristic, via `useFileDialogTracking`),
38
38
  * an optional page-wide clipboard-paste listener, and the shared
39
39
  * large-selection loading-affordance heuristic that gates all of the above
40
- * except paste. See `packages/ui/source-map.md` for the full consolidation
40
+ * except paste. See `packages/ui/archived provenance ledger` for the full consolidation
41
41
  * writeup and which origin file contributed which piece.
42
42
  */
43
43
  export declare function useFileDropzone({ onFiles, onZoneClick, onError, onProcessingStart, enablePaste, }: UseFileDropzoneParams): UseFileDropzoneResult;
@@ -18,7 +18,7 @@ function runAfterNextPaint(callback) {
18
18
  * cancel-vs-still-loading detection heuristic, via `useFileDialogTracking`),
19
19
  * an optional page-wide clipboard-paste listener, and the shared
20
20
  * large-selection loading-affordance heuristic that gates all of the above
21
- * except paste. See `packages/ui/source-map.md` for the full consolidation
21
+ * except paste. See `packages/ui/archived provenance ledger` for the full consolidation
22
22
  * writeup and which origin file contributed which piece.
23
23
  */
24
24
  export function useFileDropzone({ onFiles, onZoneClick, onError, onProcessingStart, enablePaste = false, }) {
@@ -2,7 +2,7 @@
2
2
  * Pure types for the file-dropzone feature. No React.
3
3
  *
4
4
  * Consolidates two independent OD file-staging zones into one
5
- * primitive (see `packages/ui/source-map.md` for the full consolidation
5
+ * primitive (see `packages/ui/archived provenance ledger` for the full consolidation
6
6
  * writeup): `DesignSystemAssetDropzone.tsx` (a rich, kind-aware thumbnail
7
7
  * grid over staged `File[]`) and `DesignSystemFlow.tsx`'s `DropZone` (a
8
8
  * labeled, prompt-driven zone with a file-dialog cancel-vs-still-loading
@@ -2,7 +2,7 @@
2
2
  * Pure types for the file-dropzone feature. No React.
3
3
  *
4
4
  * Consolidates two independent OD file-staging zones into one
5
- * primitive (see `packages/ui/source-map.md` for the full consolidation
5
+ * primitive (see `packages/ui/archived provenance ledger` for the full consolidation
6
6
  * writeup): `DesignSystemAssetDropzone.tsx` (a rich, kind-aware thumbnail
7
7
  * grid over staged `File[]`) and `DesignSystemFlow.tsx`'s `DropZone` (a
8
8
  * labeled, prompt-driven zone with a file-dialog cancel-vs-still-loading
@@ -9,10 +9,12 @@ import { captureFolderPathDrop } from '../../rules.js';
9
9
  * @complexity Time: O(n) in the number of dragged items per drop; space: O(n).
10
10
  */
11
11
  export function useFolderPathDropCapture({ port, composer, onFolderPaths, }) {
12
- return useStableHandler((event) => {
13
- const paths = captureFolderPathDrop({ event, port, composer });
14
- if (paths.length > 0)
15
- onFolderPaths?.(paths);
12
+ return useStableHandler({
13
+ handler: (event) => {
14
+ const paths = captureFolderPathDrop({ event, port, composer });
15
+ if (paths.length > 0)
16
+ onFolderPaths?.(paths);
17
+ },
16
18
  });
17
19
  }
18
20
  //# sourceMappingURL=useFolderPathDropCapture.js.map
@@ -26,7 +26,7 @@
26
26
  /** Marks the outermost wrapper element this module inserts, so a second call (defensive — the
27
27
  * caller's `load` handler should fire once per mount, but re-entrancy here would otherwise nest a
28
28
  * second copy around the first) detects the existing wrapper and no-ops instead of double-wrapping. */
29
- const WRAPPER_ROOT_MARKER = 'data-tovu-canvas-wrapper-root';
29
+ const WRAPPER_ROOT_MARKER = 'data-jini-canvas-wrapper-root';
30
30
  /**
31
31
  * Builds one chain level's element and applies its attributes verbatim via `setAttribute` — plain
32
32
  * HTML attribute names/values from the host's own template markup (`class`, `data-reveal`, …), not
@@ -41,12 +41,12 @@
41
41
  /** Marks a placeholder card's own root, so a later pass (this function called again, or a re-entrant
42
42
  * `load`) can recognize an already-decorated marker via `el.closest` and skip it — see this file's
43
43
  * header. */
44
- const CARD_ROOT_MARKER = 'data-tovu-embed-placeholder-root';
44
+ const CARD_ROOT_MARKER = 'data-jini-embed-placeholder-root';
45
45
  /** Flags every child the card itself builds (icon, text), so the one unflagged child is always the
46
46
  * marker. {@link OVERLAY_RULE} and the stale-card check in `removeStaleCards` both rely on it. */
47
- const CARD_CHROME_MARKER = 'data-tovu-embed-placeholder-chrome';
47
+ const CARD_CHROME_MARKER = 'data-jini-embed-placeholder-chrome';
48
48
  /** Identifies the one `<style>` this module adds to the canvas document's `<head>`. */
49
- const OVERLAY_STYLE_MARKER = 'data-tovu-embed-placeholder-style';
49
+ const OVERLAY_STYLE_MARKER = 'data-jini-embed-placeholder-style';
50
50
  /**
51
51
  * Stretches the (empty) marker over its card as a transparent overlay, so a click anywhere on the card
52
52
  * lands on the marker element itself. GrapesJS resolves a click by walking up from the event target to
@@ -71,10 +71,10 @@ const CARD_STYLE = [
71
71
  'align-items:flex-start',
72
72
  'gap:8px',
73
73
  'box-sizing:border-box',
74
- 'border:2px dashed #f59e0b',
74
+ 'border:2px dashed var(--jini-warning)',
75
75
  'border-radius:8px',
76
- 'background:#1f2937',
77
- 'color:#f9fafb',
76
+ 'background:var(--jini-surface)',
77
+ 'color:var(--jini-text)',
78
78
  'padding:10px 12px',
79
79
  "font:13px/1.4 -apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif",
80
80
  ].join(';');
@@ -89,7 +89,7 @@ function buildPlaceholderIcon(doc) {
89
89
  icon.setAttribute('height', '18');
90
90
  icon.setAttribute('viewBox', '0 0 24 24');
91
91
  icon.setAttribute('fill', 'none');
92
- icon.setAttribute('stroke', '#f59e0b');
92
+ icon.setAttribute('stroke', 'var(--jini-warning)');
93
93
  icon.setAttribute('stroke-width', '2');
94
94
  icon.setAttribute('style', 'flex-shrink:0;margin-top:1px;');
95
95
  const rect = doc.createElementNS(SVG_NS, 'rect');
@@ -1,3 +1,4 @@
1
+ import type { AdminTheme, ColorScheme } from '../../theme/types.js';
1
2
  /**
2
3
  * @file Builds the `canvas.frameStyle` GrapesJS injects into its editing canvas, so a host that
3
4
  * supplies its own canvas styling is not silently overruled by GrapesJS's own defaults.
@@ -30,6 +31,9 @@ export interface CanvasContentWrapperNode {
30
31
  /** What a host wants the canvas document styled with. All fields optional; supplying none is the
31
32
  * "GrapesJS defaults" case. */
32
33
  export interface CanvasStyling {
34
+ /** Explicit theme data for isolated editor chrome; edited page styles remain host-owned. */
35
+ adminTheme?: AdminTheme;
36
+ colorScheme?: ColorScheme;
33
37
  /** Stylesheet URLs, appended to the canvas document's `<head>` as `<link>` elements by GrapesJS
34
38
  * (`canvas.styles`). Not included in the editor's exported HTML. */
35
39
  stylesheets?: readonly string[];
@@ -1,30 +1,15 @@
1
- /**
2
- * @file Builds the `canvas.frameStyle` GrapesJS injects into its editing canvas, so a host that
3
- * supplies its own canvas styling is not silently overruled by GrapesJS's own defaults.
4
- *
5
- * GrapesJS injects `canvas.frameStyle` as a `<style>` element in the canvas document's **`<body>`**,
6
- * after everything `canvas.styles` puts in `<head>` — confirmed live in Chrome by reading
7
- * `iframe.contentDocument`: the head held only the host's `<link>`, and the `body { background-color:
8
- * #fff }` rule that beat it sat in a body-level `<style>`. Its default value therefore wins the
9
- * cascade against any host stylesheet that sets a body background, at equal specificity, purely on
10
- * document order. Left alone, a host loading a dark theme's stylesheet into the canvas gets that
11
- * theme's near-white `color` on GrapesJS's hardcoded white background — white-on-white text, which is
12
- * strictly worse than the unstyled canvas it replaced.
13
- *
14
- * So the white body background is emitted only when the host supplies no canvas styling of its own.
15
- * The scrollbar rules are kept either way: they are chrome for GrapesJS's own scrolling canvas, not a
16
- * statement about the edited document.
17
- */
1
+ import { defaultAdminTheme } from '../../theme/default.js';
2
+ import { renderAdminThemeVariables } from '../../theme/stylesheet.js';
18
3
  /** GrapesJS's own default scrollbar chrome for the canvas, restated verbatim from its
19
4
  * `canvas.frameStyle` default so overriding that option does not silently drop it. */
20
5
  const CANVAS_SCROLLBAR_STYLE = [
21
- "* ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.1) }",
22
- "* ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2) }",
6
+ "* ::-webkit-scrollbar-track { background: color-mix(in srgb, var(--jini-text) 10%, transparent) }",
7
+ "* ::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--jini-bg) 20%, transparent) }",
23
8
  "* ::-webkit-scrollbar { width: 10px }",
24
9
  ].join("\n");
25
10
  /** The half of GrapesJS's default `canvas.frameStyle` this module conditionally drops — see the file
26
11
  * header for why it cannot simply be left in place. */
27
- const CANVAS_DEFAULT_BODY_BACKGROUND = "body { background-color: #fff }";
12
+ const CANVAS_DEFAULT_BODY_BACKGROUND = 'body { background-color: var(--jini-bg) }';
28
13
  /**
29
14
  * CSS class the canvas body carries while `react/hooks/useInteractiveHtmlEditor.ts`'s
30
15
  * `revealCanvasWhenStylesheetsSettle` is still waiting on `canvas.styles`' `<link>` elements to settle
@@ -54,7 +39,7 @@ function hostStylesTheCanvas(styling) {
54
39
  * and followed by the host's raw `css` when supplied.
55
40
  */
56
41
  function buildCanvasFrameStyle(styling) {
57
- const rules = [CANVAS_SCROLLBAR_STYLE, CANVAS_STYLES_PENDING_RULE];
42
+ const rules = [renderAdminThemeVariables({ theme: styling.adminTheme ?? defaultAdminTheme }, { ...(styling.colorScheme ? { colorScheme: styling.colorScheme } : {}) }), CANVAS_SCROLLBAR_STYLE, CANVAS_STYLES_PENDING_RULE];
58
43
  if (!hostStylesTheCanvas(styling))
59
44
  rules.unshift(CANVAS_DEFAULT_BODY_BACKGROUND);
60
45
  if (styling.css)
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * A fresh, neutral `postMessage` protocol for deck navigation — deliberately
3
- * NOT OD's `od:slide`/`od:slide-state` (see `packages/ui/source-map.md`'s
3
+ * NOT OD's `od:slide`/`od:slide-state` (see `packages/ui/archived provenance ledger`'s
4
4
  * `html-viewer` classification: the real bridge's 31 message types across 3
5
5
  * naming conventions need a redesign, not a rename). Any sandboxed deck
6
6
  * content this feature drives must speak this protocol:
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * A fresh, neutral `postMessage` protocol for deck navigation — deliberately
3
- * NOT OD's `od:slide`/`od:slide-state` (see `packages/ui/source-map.md`'s
3
+ * NOT OD's `od:slide`/`od:slide-state` (see `packages/ui/archived provenance ledger`'s
4
4
  * `html-viewer` classification: the real bridge's 31 message types across 3
5
5
  * naming conventions need a redesign, not a rename). Any sandboxed deck
6
6
  * content this feature drives must speak this protocol:
@@ -7,7 +7,7 @@ export function PresentMenu({ disabled, onPresentInline, onPresentFullscreen, on
7
7
  const t = useT();
8
8
  const [open, setOpen] = useState(false);
9
9
  const wrapRef = useRef(null);
10
- useDismissOnOutsideOrEscape(() => setOpen(false), { enabled: open, containerRef: wrapRef });
10
+ useDismissOnOutsideOrEscape({ onDismiss: () => setOpen(false) }, { enabled: open, containerRef: wrapRef });
11
11
  function select(action) {
12
12
  setOpen(false);
13
13
  action();
@@ -6,7 +6,7 @@ import { useT } from '../../../i18n/index.js';
6
6
  export function ZoomMenu({ zoom, levels, isOpen, onToggle, onClose, onSelect }) {
7
7
  const t = useT();
8
8
  const wrapRef = useRef(null);
9
- useDismissOnOutsideOrEscape(onClose, { enabled: isOpen, containerRef: wrapRef });
9
+ useDismissOnOutsideOrEscape({ onDismiss: onClose }, { enabled: isOpen, containerRef: wrapRef });
10
10
  return (_jsxs("div", { className: "jini-zoom-menu", ref: wrapRef, children: [_jsx("button", { type: "button", className: "jini-zoom-trigger", "aria-haspopup": "menu", "aria-expanded": isOpen, title: t('Reset zoom'), onClick: onToggle, children: _jsxs("span", { style: { fontVariantNumeric: 'tabular-nums' }, children: [zoom, "%"] }) }), isOpen ? (_jsx("div", { className: "jini-zoom-menu-popover", role: "menu", children: levels.map((level) => (_jsx("button", { type: "button", className: `jini-zoom-menu-item${zoom === level ? ' active' : ''}`, role: "menuitem", onClick: () => onSelect(level), children: _jsxs("span", { style: { fontVariantNumeric: 'tabular-nums' }, children: [level, "%"] }) }, level))) })) : null] }));
11
11
  }
12
12
  //# sourceMappingURL=ZoomMenu.js.map
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Deck/slide-navigation + zoom + present slice of the classified `HtmlViewer`
3
- * god-component — see `packages/ui/source-map.md`'s `html-viewer`
3
+ * god-component — see `packages/ui/archived provenance ledger`'s `html-viewer`
4
4
  * classification section for the full disposition. This slice ships only
5
5
  * the pieces that classification found GENERIC with low coupling to the
6
6
  * rest of `HtmlViewer` (deck navigation, the zoom-percentage control, and
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Deck/slide-navigation + zoom + present slice of the classified `HtmlViewer`
3
- * god-component — see `packages/ui/source-map.md`'s `html-viewer`
3
+ * god-component — see `packages/ui/archived provenance ledger`'s `html-viewer`
4
4
  * classification section for the full disposition. This slice ships only
5
5
  * the pieces that classification found GENERIC with low coupling to the
6
6
  * rest of `HtmlViewer` (deck navigation, the zoom-percentage control, and
@@ -4,11 +4,10 @@
4
4
  * translation.
5
5
  *
6
6
  * This is a SEPARATE i18n system from any Jini-consuming host's own
7
- * dictionaries (e.g. a host product's `apps/admin/src/lib/i18n-common.ts` +
8
- * `apps/admin/src/lib/dictionary-translator.ts` + one `*-i18n.ts` file per
7
+ * dictionaries (shared host translations, the host's translator and one dictionary per
9
8
  * admin feature) -- deliberately so, since this package is meant to be
10
9
  * reusable across hosts and a host's own product copy has no reason to ship
11
- * inside it (see that repo's i18n-common.ts for the fuller reasoning). They
10
+ * inside it (host copy belongs to the host). They
12
11
  * share the same underlying shape/convention (`Record<locale, Record<key,
13
12
  * string>>`, translated-value-else-raw-key fallback) by design, so adding a
14
13
  * language to one is a close parallel to adding it to the other, but they are
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Covers every literal `t()` key actually called by the 13 tabs the reference
5
5
  * implementation (the first host to adopt this) mounts in its admin settings panel, plus every
6
- * component those tabs compose (see `packages/ui/source-map.md` companion
6
+ * component those tabs compose (see `packages/ui/archived provenance ledger` companion
7
7
  * note in `dictionaries/README` for the enumeration method: a full read of
8
8
  * each mounted component's source, cross-checked with a regex extraction
9
9
  * pass over every `t('...')`/`t("...")` call site, plus manual tracing of
@@ -0,0 +1,16 @@
1
+ /** A dictionary indexed by caller-defined locale and English source key. */
2
+ export type LocaleDictionary = Readonly<Record<string, Readonly<Record<string, string>>>>;
3
+ /** Locale-bound translation injected into a widget or panel hook. */
4
+ export type Translate = (key: string) => string;
5
+ export type DictionaryTranslator = (required: {
6
+ locale: string;
7
+ key: string;
8
+ }) => string;
9
+ /** Feature copy wins over the host's common copy, then falls back to the source key.
10
+ * No locale context or product dictionary is installed by this helper. */
11
+ export declare function createDictionaryTranslator({ featureDictionary }: {
12
+ featureDictionary: LocaleDictionary;
13
+ }, { commonDictionary }?: {
14
+ commonDictionary?: LocaleDictionary | undefined;
15
+ }): DictionaryTranslator;
16
+ //# sourceMappingURL=dictionary-translator.d.ts.map
@@ -0,0 +1,14 @@
1
+ function lookup(dictionary, locale, key) {
2
+ if (!Object.hasOwn(dictionary, locale))
3
+ return undefined;
4
+ const block = dictionary[locale];
5
+ return block && Object.hasOwn(block, key) ? block[key] : undefined;
6
+ }
7
+ // Centralize fallback once: small feature dictionaries inherit shared Save/Cancel/Delete copy,
8
+ // and misses remain readable English source keys rather than raw dictionary-miss placeholders.
9
+ /** Feature copy wins over the host's common copy, then falls back to the source key.
10
+ * No locale context or product dictionary is installed by this helper. */
11
+ export function createDictionaryTranslator({ featureDictionary }, { commonDictionary = {} } = {}) {
12
+ return ({ locale, key }) => lookup(featureDictionary, locale, key) ?? lookup(commonDictionary, locale, key) ?? key;
13
+ }
14
+ //# sourceMappingURL=dictionary-translator.js.map
@@ -5,4 +5,7 @@ export { I18nProvider, useI18n, useT } from './context.js';
5
5
  export type { I18nProviderProps, I18nContextValue } from './context.js';
6
6
  export { SETTINGS_DIALOG_EN, SETTINGS_DIALOG_ES, SETTINGS_DIALOG_DICTIONARIES, } from './dictionaries/index.js';
7
7
  export type { SettingsDialogDict } from './dictionaries/index.js';
8
+ export { createDictionaryTranslator } from './dictionary-translator.js';
9
+ export type { Translate, DictionaryTranslator, LocaleDictionary } from './dictionary-translator.js';
10
+ export { interpolate, splitOnPlaceholders, pickPlural } from './template-i18n.js';
8
11
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,6 @@
1
1
  export { detectInitialLocale, resolveSystemLocale, defaultDetectSystemLocale, } from './locale.js';
2
2
  export { I18nProvider, useI18n, useT } from './context.js';
3
3
  export { SETTINGS_DIALOG_EN, SETTINGS_DIALOG_ES, SETTINGS_DIALOG_DICTIONARIES, } from './dictionaries/index.js';
4
+ export { createDictionaryTranslator } from './dictionary-translator.js';
5
+ export { interpolate, splitOnPlaceholders, pickPlural } from './template-i18n.js';
4
6
  //# sourceMappingURL=index.js.map
@@ -5,7 +5,7 @@
5
5
  * a React tree.
6
6
  *
7
7
  * Origin: `i18n/index.tsx`'s `resolveSystemLocale`/`detectInitialLocale` in
8
- * the vendored OD web tree. Genericized — see `packages/ui/source-map.md`
8
+ * the vendored OD web tree. Genericized — see `packages/ui/archived provenance ledger`
9
9
  * for the full accounting of what was dropped (OD's hard-coded 19-locale
10
10
  * list, the desktop-host OS-locale bridge, the manual-vs-auto-detected
11
11
  * localStorage tagging).
@@ -0,0 +1,26 @@
1
+ /** Parameterized messages belong in locale data too: branching on locale in every interpolation
2
+ * helper would require editing every caller to add a language, instead of adding templates. */
3
+ export declare function interpolate({ template, vars }: {
4
+ template: string;
5
+ vars: Record<string, string | number>;
6
+ }): string;
7
+ /**
8
+ * Split around placeholders when values must be rendered as nodes, such as inline code naming
9
+ * a destructive action's target; plain string interpolation cannot insert those nodes.
10
+ * Missing/mistyped locale tokens collapse the remaining text into one segment, followed by
11
+ * empty segments, so a translation defect does not crash its dialog.
12
+ */
13
+ export declare function splitOnPlaceholders({ template, tokens }: {
14
+ template: string;
15
+ tokens: readonly string[];
16
+ }): string[];
17
+ /** Only singular versus other; this is not full CLDR pluralization. Languages needing more than
18
+ * two forms require a richer mechanism rather than being forced into these two templates. */
19
+ export declare function pickPlural({ count, forms }: {
20
+ count: number;
21
+ forms: {
22
+ one: string;
23
+ other: string;
24
+ };
25
+ }): string;
26
+ //# sourceMappingURL=template-i18n.d.ts.map
@@ -0,0 +1,36 @@
1
+ /** Parameterized messages belong in locale data too: branching on locale in every interpolation
2
+ * helper would require editing every caller to add a language, instead of adding templates. */
3
+ export function interpolate({ template, vars }) {
4
+ return template.replace(/\{(\w+)\}/g, (match, key) => {
5
+ return key in vars ? String(vars[key]) : match;
6
+ });
7
+ }
8
+ /**
9
+ * Split around placeholders when values must be rendered as nodes, such as inline code naming
10
+ * a destructive action's target; plain string interpolation cannot insert those nodes.
11
+ * Missing/mistyped locale tokens collapse the remaining text into one segment, followed by
12
+ * empty segments, so a translation defect does not crash its dialog.
13
+ */
14
+ export function splitOnPlaceholders({ template, tokens }) {
15
+ const segments = [];
16
+ let rest = template;
17
+ for (const token of tokens) {
18
+ const index = rest.indexOf(token);
19
+ if (index === -1) {
20
+ segments.push(rest);
21
+ rest = "";
22
+ }
23
+ else {
24
+ segments.push(rest.slice(0, index));
25
+ rest = rest.slice(index + token.length);
26
+ }
27
+ }
28
+ segments.push(rest);
29
+ return segments;
30
+ }
31
+ /** Only singular versus other; this is not full CLDR pluralization. Languages needing more than
32
+ * two forms require a richer mechanism rather than being forced into these two templates. */
33
+ export function pickPlural({ count, forms }) {
34
+ return count === 1 ? forms.one : forms.other;
35
+ }
36
+ //# sourceMappingURL=template-i18n.js.map
@@ -6,7 +6,7 @@ interface IframeKeepAliveProviderProps {
6
6
  }
7
7
  /**
8
8
  * Caps how many iframes stay mounted at once: attached iframes go live under
9
- * their host element; released ones are parked off-DOM (hidden, inert)
9
+ * their host element; released ones are parked in a mounted pool container (hidden, inert)
10
10
  * instead of destroyed, so revisiting the same key skips a reload; least-
11
11
  * recently-used parked entries are evicted once the pool exceeds
12
12
  * `maxMounted`. Active entries are never evicted.
@@ -6,7 +6,7 @@ import { parkIframeElement, unparkIframeElement } from '../dom-sync.js';
6
6
  import { IframeKeepAliveContext } from '../pool-context.js';
7
7
  /**
8
8
  * Caps how many iframes stay mounted at once: attached iframes go live under
9
- * their host element; released ones are parked off-DOM (hidden, inert)
9
+ * their host element; released ones are parked in a mounted pool container (hidden, inert)
10
10
  * instead of destroyed, so revisiting the same key skips a reload; least-
11
11
  * recently-used parked entries are evicted once the pool exceeds
12
12
  * `maxMounted`. Active entries are never evicted.
@@ -12,6 +12,6 @@ export function InstructionsTab({ value, onChange, title, description, placehold
12
12
  const resolvedTitle = title ?? t('Custom instructions');
13
13
  const resolvedDescription = description ?? t('Extra instructions applied to every conversation, in addition to any per-project instructions.');
14
14
  const resolvedPlaceholder = placeholder ?? t('e.g. Always respond concisely and avoid unnecessary caveats.');
15
- return (_jsx("section", { className: "jini-settings-section jini-settings-section-card jini-instructions-section", children: _jsxs("div", { className: "jini-field-block jini-instructions-card", children: [_jsx("div", { className: "jini-block-head", children: _jsxs("div", { children: [_jsx("h4", { children: resolvedTitle }), _jsx("p", { className: "jini-hint", children: resolvedDescription })] }) }), _jsx("textarea", { className: "jini-custom-instructions-input jini-instructions-input", rows: rows, maxLength: maxLength, placeholder: resolvedPlaceholder, "aria-label": resolvedTitle, value: value, onChange: (event) => onChange(event.target.value || undefined), ...agentHandleProps(agentHandle, { role: 'field', label: resolvedTitle }) })] }) }));
15
+ return (_jsx("section", { className: "jini-settings-section jini-settings-section-card jini-instructions-section", children: _jsxs("div", { className: "jini-field-block jini-instructions-card", children: [_jsx("div", { className: "jini-block-head", children: _jsxs("div", { children: [_jsx("h4", { children: resolvedTitle }), _jsx("p", { className: "jini-hint", children: resolvedDescription })] }) }), _jsx("textarea", { className: "jini-custom-instructions-input jini-instructions-input", rows: rows, maxLength: maxLength, placeholder: resolvedPlaceholder, "aria-label": resolvedTitle, value: value, onChange: (event) => onChange(event.target.value || undefined), ...agentHandleProps({}, { base: agentHandle, ...({ role: 'field', label: resolvedTitle }) }) })] }) }));
16
16
  }
17
17
  //# sourceMappingURL=InstructionsTab.js.map
@@ -14,7 +14,7 @@ export function ClientPicker({ clients, selectedClientId, onSelect, methodLabel,
14
14
  const rootRef = useRef(null);
15
15
  const selected = clients.find((c) => c.id === selectedClientId) ?? clients[0];
16
16
  const optionHandles = agentHandle
17
- ? buildAgentListHandles(agentSubHandle(agentHandle, 'option'), clients.map((c) => c.id))
17
+ ? buildAgentListHandles({ prefix: agentSubHandle({ base: agentHandle, action: 'option' }), ids: clients.map((c) => c.id) })
18
18
  : undefined;
19
19
  // Close on outside click or Escape — routed through the shared
20
20
  // `useDismissOnOutsideOrEscape` toolbox hook (packages/ui/src/browser/)
@@ -23,13 +23,13 @@ export function ClientPicker({ clients, selectedClientId, onSelect, methodLabel,
23
23
  // popover/dropdown call site — see that hook's own doc comment), a
24
24
  // behaviorally-equivalent upgrade for this same dismiss-on-outside-click
25
25
  // pattern.
26
- useDismissOnOutsideOrEscape(() => setOpen(false), { enabled: open, containerRef: rootRef });
27
- return (_jsxs("div", { className: "jini-picker", ref: rootRef, children: [_jsxs("button", { type: "button", className: `jini-picker-trigger${open ? ' open' : ''}`, onClick: () => setOpen((v) => !v), "aria-haspopup": "listbox", "aria-expanded": open, ...agentHandleProps(agentHandle, { action: 'trigger', role: 'button', label: selected ? t(selected.label) : t('Client') }), children: [_jsxs("span", { className: "jini-picker-meta", children: [_jsx("span", { className: "jini-picker-title", children: selected ? t(selected.label) : '' }), methodLabel ? _jsx("span", { className: "jini-picker-sub", children: methodLabel }) : null] }), _jsx(Icon, { name: "chevron-down", size: 14, className: "jini-picker-chevron", style: { transform: open ? 'rotate(180deg)' : undefined } })] }), open ? (_jsx("div", { className: "jini-picker-popover", role: "listbox", children: _jsx("div", { className: "jini-picker-list", children: clients.map((client, index) => {
26
+ useDismissOnOutsideOrEscape({ onDismiss: () => setOpen(false) }, { enabled: open, containerRef: rootRef });
27
+ return (_jsxs("div", { className: "jini-picker", ref: rootRef, children: [_jsxs("button", { type: "button", className: `jini-picker-trigger${open ? ' open' : ''}`, onClick: () => setOpen((v) => !v), "aria-haspopup": "listbox", "aria-expanded": open, ...agentHandleProps({}, { base: agentHandle, ...({ action: 'trigger', role: 'button', label: selected ? t(selected.label) : t('Client') }) }), children: [_jsxs("span", { className: "jini-picker-meta", children: [_jsx("span", { className: "jini-picker-title", children: selected ? t(selected.label) : '' }), methodLabel ? _jsx("span", { className: "jini-picker-sub", children: methodLabel }) : null] }), _jsx(Icon, { name: "chevron-down", size: 14, className: "jini-picker-chevron", style: { transform: open ? 'rotate(180deg)' : undefined } })] }), open ? (_jsx("div", { className: "jini-picker-popover", role: "listbox", children: _jsx("div", { className: "jini-picker-list", children: clients.map((client, index) => {
28
28
  const active = client.id === selectedClientId;
29
29
  return (_jsxs("button", { type: "button", role: "option", "aria-selected": active, className: `jini-picker-item${active ? ' active' : ''}`, onClick: () => {
30
30
  onSelect(client.id);
31
31
  setOpen(false);
32
- }, ...agentHandleProps(optionHandles?.[index], { role: 'button', label: t(client.label) }), children: [_jsx("span", { className: "jini-picker-item-title", children: t(client.label) }), methodLabels?.[client.id] ? (_jsx("span", { className: "jini-picker-item-sub", children: methodLabels[client.id] })) : null] }, client.id));
32
+ }, ...agentHandleProps({}, { base: optionHandles?.[index], ...({ role: 'button', label: t(client.label) }) }), children: [_jsx("span", { className: "jini-picker-item-title", children: t(client.label) }), methodLabels?.[client.id] ? (_jsx("span", { className: "jini-picker-item-sub", children: methodLabels[client.id] })) : null] }, client.id));
33
33
  }) }) })) : null] }));
34
34
  }
35
35
  //# sourceMappingURL=ClientPicker.js.map
@@ -17,6 +17,6 @@ export function CodexInstallToggleButton({ port, agentHandle }) {
17
17
  return (_jsxs("div", { className: "jini-codex-install-row", children: [_jsx("button", { type: "button", className: "jini-button", disabled: true, children: t('One-click install') }), _jsx("span", { className: "jini-hint", children: t('Not available for this daemon.') })] }));
18
18
  }
19
19
  const label = installed ? t('Uninstall') : t('One-click install');
20
- return (_jsxs("div", { className: "jini-codex-install-row", children: [_jsx("button", { type: "button", className: installed ? 'jini-button' : 'jini-button jini-button-primary', disabled: busy, onClick: toggle, ...agentHandleProps(agentHandle, { role: 'button', label }), children: busy ? t('Working…') : label }), error ? _jsx("span", { className: "jini-hint jini-hint-error", children: t('Install failed: {error}', { error }) }) : null, !error && successKind === 'installed' ? _jsx("span", { className: "jini-hint", children: t('MCP server installed.') }) : null, !error && successKind === 'uninstalled' ? _jsx("span", { className: "jini-hint", children: t('MCP server uninstalled.') }) : null] }));
20
+ return (_jsxs("div", { className: "jini-codex-install-row", children: [_jsx("button", { type: "button", className: installed ? 'jini-button' : 'jini-button jini-button-primary', disabled: busy, onClick: toggle, ...agentHandleProps({}, { base: agentHandle, ...({ role: 'button', label }) }), children: busy ? t('Working…') : label }), error ? _jsx("span", { className: "jini-hint jini-hint-error", children: t('Install failed: {error}', { error }) }) : null, !error && successKind === 'installed' ? _jsx("span", { className: "jini-hint", children: t('MCP server installed.') }) : null, !error && successKind === 'uninstalled' ? _jsx("span", { className: "jini-hint", children: t('MCP server uninstalled.') }) : null] }));
21
21
  }
22
22
  //# sourceMappingURL=CodexInstallToggleButton.js.map
@@ -46,7 +46,7 @@ export function IntegrationsTab({ serverName = DEFAULT_MCP_SERVER_NAME, clients
46
46
  t('Pull context into the conversation'),
47
47
  t('Use default, safe tool permissions'),
48
48
  ];
49
- return (_jsxs("section", { className: "jini-settings-section jini-settings-integrations", children: [error ? _jsx("div", { className: "jini-empty-card jini-empty-card-error", children: t('Could not reach the daemon: {error}', { error }) }) : null, _jsxs("div", { className: "jini-mcp-capabilities-card", children: [_jsx("p", { className: "jini-mcp-capabilities-label", children: resolvedCapabilitiesTitle }), _jsx("ul", { className: "jini-mcp-capabilities-list", children: resolvedCapabilities.map((line) => (_jsx("li", { children: line }, line))) })] }), _jsxs("div", { className: "jini-mcp-setup-card", children: [_jsx(ClientPicker, { clients: clients, selectedClientId: clientId, onSelect: setClientId, methodLabel: methodLabel, methodLabels: methodLabels, ...(agentHandle ? { agentHandle: agentSubHandle(agentHandle, 'client') } : {}) }), resolved ? _jsx("p", { className: "jini-mcp-instruction", children: t(resolved.instructionTemplate, resolved.instructionVars) }) : null, client?.id === 'codex' ? (_jsx(CodexInstallToggleButton, { port: resolvedPort, ...(agentHandle ? { agentHandle: agentSubHandle(agentHandle, 'codex-toggle') } : {}) })) : null, resolved?.deeplink && info ? (_jsxs("div", { className: "jini-mcp-deeplink-row", children: [_jsx("a", { className: `jini-button jini-button-primary${isMcpInstallPrerequisiteMissing(info) ? ' jini-button-disabled' : ''}`,
49
+ return (_jsxs("section", { className: "jini-settings-section jini-settings-integrations", children: [error ? _jsx("div", { className: "jini-empty-card jini-empty-card-error", children: t('Could not reach the daemon: {error}', { error }) }) : null, _jsxs("div", { className: "jini-mcp-capabilities-card", children: [_jsx("p", { className: "jini-mcp-capabilities-label", children: resolvedCapabilitiesTitle }), _jsx("ul", { className: "jini-mcp-capabilities-list", children: resolvedCapabilities.map((line) => (_jsx("li", { children: line }, line))) })] }), _jsxs("div", { className: "jini-mcp-setup-card", children: [_jsx(ClientPicker, { clients: clients, selectedClientId: clientId, onSelect: setClientId, methodLabel: methodLabel, methodLabels: methodLabels, ...(agentHandle ? { agentHandle: agentSubHandle({ base: agentHandle, action: 'client' }) } : {}) }), resolved ? _jsx("p", { className: "jini-mcp-instruction", children: t(resolved.instructionTemplate, resolved.instructionVars) }) : null, client?.id === 'codex' ? (_jsx(CodexInstallToggleButton, { port: resolvedPort, ...(agentHandle ? { agentHandle: agentSubHandle({ base: agentHandle, action: 'codex-toggle' }) } : {}) })) : null, resolved?.deeplink && info ? (_jsxs("div", { className: "jini-mcp-deeplink-row", children: [_jsx("a", { className: `jini-button jini-button-primary${isMcpInstallPrerequisiteMissing(info) ? ' jini-button-disabled' : ''}`,
50
50
  // Origin disables this button via `disabled={!info.cliExists ||
51
51
  // !info.nodeExists}` — one-click install can't work until the
52
52
  // daemon/CLI prerequisite is actually built. An `<a>` has no
@@ -57,6 +57,6 @@ export function IntegrationsTab({ serverName = DEFAULT_MCP_SERVER_NAME, clients
57
57
  href: isMcpInstallPrerequisiteMissing(info) ? undefined : resolved.deeplink, "aria-disabled": isMcpInstallPrerequisiteMissing(info) || undefined, onClick: (event) => {
58
58
  if (isMcpInstallPrerequisiteMissing(info))
59
59
  event.preventDefault();
60
- }, rel: "noopener noreferrer", ...agentHandleProps(agentHandle, { action: 'one-click-install', role: 'link', label: t('One-click install') }), children: t('One-click install') }), _jsx("span", { className: "jini-hint", children: t('Your editor will ask you to approve the install.') })] })) : null, _jsx(SnippetBlock, { snippet: resolved?.snippet ?? '', language: resolved?.language ?? 'json', placeholder: loading ? t('Loading install paths…') : error ? t('Could not resolve install paths.') : '' }), info && isMcpInstallPrerequisiteMissing(info) ? (_jsxs("div", { className: "jini-empty-card jini-empty-card-warning", children: [_jsx("strong", { children: !info.cliExists ? t('Build the server first.') : t('Node.js was not found.') }), ' ', info.buildHint ?? t('See your host application for build instructions.')] })) : null, _jsxs("div", { className: "jini-mcp-restart-note", children: [_jsx("strong", { children: t('Restart your client after installing.') }), ' ', _jsx("span", { children: t('Most MCP clients only pick up new servers on restart.') })] })] })] }));
60
+ }, rel: "noopener noreferrer", ...agentHandleProps({}, { base: agentHandle, ...({ action: 'one-click-install', role: 'link', label: t('One-click install') }) }), children: t('One-click install') }), _jsx("span", { className: "jini-hint", children: t('Your editor will ask you to approve the install.') })] })) : null, _jsx(SnippetBlock, { snippet: resolved?.snippet ?? '', language: resolved?.language ?? 'json', placeholder: loading ? t('Loading install paths…') : error ? t('Could not resolve install paths.') : '' }), info && isMcpInstallPrerequisiteMissing(info) ? (_jsxs("div", { className: "jini-empty-card jini-empty-card-warning", children: [_jsx("strong", { children: !info.cliExists ? t('Build the server first.') : t('Node.js was not found.') }), ' ', info.buildHint ?? t('See your host application for build instructions.')] })) : null, _jsxs("div", { className: "jini-mcp-restart-note", children: [_jsx("strong", { children: t('Restart your client after installing.') }), ' ', _jsx("span", { children: t('Most MCP clients only pick up new servers on restart.') })] })] })] }));
61
61
  }
62
62
  //# sourceMappingURL=IntegrationsTab.js.map
@@ -38,7 +38,7 @@ export function SnippetBlock({ snippet, language, placeholder, copyAriaLabel, co
38
38
  // dead duplicate of that same disablement; removed rather than carried
39
39
  // forward or tested around.
40
40
  async function onCopy() {
41
- const ok = await copyToClipboard(snippet);
41
+ const ok = await copyToClipboard({ text: snippet });
42
42
  if (!ok)
43
43
  return;
44
44
  setCopied(true);
@@ -7,7 +7,7 @@
7
7
  * product's own MCP server name as a literal. Parameterized here as
8
8
  * `serverName` (a `McpIntegrationsPort`-agnostic caller argument, not a
9
9
  * config value) —
10
- * see `packages/ui/source-map.md` for the full provenance note and the
10
+ * see `packages/ui/archived provenance ledger` for the full provenance note and the
11
11
  * purity-grep result confirming zero hardcoded product-identity strings
12
12
  * remain.
13
13
  */
@@ -7,7 +7,7 @@
7
7
  * product's own MCP server name as a literal. Parameterized here as
8
8
  * `serverName` (a `McpIntegrationsPort`-agnostic caller argument, not a
9
9
  * config value) —
10
- * see `packages/ui/source-map.md` for the full provenance note and the
10
+ * see `packages/ui/archived provenance ledger` for the full provenance note and the
11
11
  * purity-grep result confirming zero hardcoded product-identity strings
12
12
  * remain.
13
13
  */