@nadicodeai/ui 12.1.165 → 12.1.166

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 (363) hide show
  1. package/AGENTS.md +8 -9
  2. package/README.md +2 -17
  3. package/dist/components/accordion.d.ts.map +1 -1
  4. package/dist/components/accordion.js +2 -1
  5. package/dist/components/account-menu.d.ts.map +1 -1
  6. package/dist/components/account-menu.js +5 -3
  7. package/dist/components/activity-calendar.d.ts.map +1 -1
  8. package/dist/components/activity-calendar.js +3 -2
  9. package/dist/components/agent-card.js +1 -1
  10. package/dist/components/agent-orb.d.ts.map +1 -1
  11. package/dist/components/agent-orb.js +1 -0
  12. package/dist/components/agent-profile.d.ts.map +1 -1
  13. package/dist/components/agent-profile.js +7 -4
  14. package/dist/components/alert-dialog.d.ts +1 -1
  15. package/dist/components/alert-dialog.d.ts.map +1 -1
  16. package/dist/components/alert-dialog.js +3 -3
  17. package/dist/components/app-mark.js +1 -1
  18. package/dist/components/avatar.js +8 -8
  19. package/dist/components/badge.d.ts +11 -16
  20. package/dist/components/badge.d.ts.map +1 -1
  21. package/dist/components/badge.js +7 -43
  22. package/dist/components/breadcrumb.d.ts.map +1 -1
  23. package/dist/components/breadcrumb.js +3 -2
  24. package/dist/components/button.d.ts +5 -21
  25. package/dist/components/button.d.ts.map +1 -1
  26. package/dist/components/button.js +6 -76
  27. package/dist/components/calendar.d.ts +1 -1
  28. package/dist/components/calendar.d.ts.map +1 -1
  29. package/dist/components/calendar.js +3 -3
  30. package/dist/components/card-row.js +1 -1
  31. package/dist/components/card.d.ts +4 -1
  32. package/dist/components/card.d.ts.map +1 -1
  33. package/dist/components/card.js +3 -2
  34. package/dist/components/catalog-drawer.d.ts.map +1 -1
  35. package/dist/components/catalog-drawer.js +3 -2
  36. package/dist/components/chart-axis.d.ts.map +1 -1
  37. package/dist/components/chart-axis.js +0 -2
  38. package/dist/components/chart-bar-horizontal.d.ts.map +1 -1
  39. package/dist/components/chart-bar-horizontal.js +16 -14
  40. package/dist/components/chart-card.d.ts.map +1 -1
  41. package/dist/components/chart-card.js +0 -1
  42. package/dist/components/chart.d.ts.map +1 -1
  43. package/dist/components/chart.js +18 -32
  44. package/dist/components/checkbox.d.ts +3 -2
  45. package/dist/components/checkbox.d.ts.map +1 -1
  46. package/dist/components/checkbox.js +4 -3
  47. package/dist/components/choicebox.d.ts +5 -5
  48. package/dist/components/choicebox.d.ts.map +1 -1
  49. package/dist/components/choicebox.js +6 -5
  50. package/dist/components/clearable-input.d.ts.map +1 -1
  51. package/dist/components/clearable-input.js +2 -2
  52. package/dist/components/code-block.d.ts.map +1 -1
  53. package/dist/components/code-block.js +4 -2
  54. package/dist/components/collapsible.js +1 -1
  55. package/dist/components/collection-filters.d.ts.map +1 -1
  56. package/dist/components/collection-filters.js +1 -0
  57. package/dist/components/collection-page.js +1 -1
  58. package/dist/components/collection-sort.d.ts.map +1 -1
  59. package/dist/components/collection-sort.js +1 -4
  60. package/dist/components/collection-toolbar.js +1 -1
  61. package/dist/components/combobox.js +4 -4
  62. package/dist/components/command.d.ts.map +1 -1
  63. package/dist/components/command.js +1 -1
  64. package/dist/components/confirm-dialog.js +2 -2
  65. package/dist/components/context-menu.d.ts +1 -1
  66. package/dist/components/context-menu.d.ts.map +1 -1
  67. package/dist/components/copy-button.js +1 -1
  68. package/dist/components/data-table.d.ts +11 -3
  69. package/dist/components/data-table.d.ts.map +1 -1
  70. package/dist/components/data-table.js +12 -4
  71. package/dist/components/dialog.d.ts +1 -1
  72. package/dist/components/dialog.d.ts.map +1 -1
  73. package/dist/components/dialog.js +2 -2
  74. package/dist/components/drawer.d.ts +4 -4
  75. package/dist/components/drawer.d.ts.map +1 -1
  76. package/dist/components/drawer.js +14 -15
  77. package/dist/components/dropdown-menu.d.ts +1 -1
  78. package/dist/components/dropdown-menu.d.ts.map +1 -1
  79. package/dist/components/dropdown-menu.js +9 -5
  80. package/dist/components/empty-art.js +1 -1
  81. package/dist/components/empty-state.js +2 -2
  82. package/dist/components/entry-scene.d.ts.map +1 -1
  83. package/dist/components/entry-scene.js +2 -3
  84. package/dist/components/field.js +3 -3
  85. package/dist/components/file-diff.d.ts.map +1 -1
  86. package/dist/components/file-diff.js +5 -2
  87. package/dist/components/footer.d.ts +1 -1
  88. package/dist/components/footer.d.ts.map +1 -1
  89. package/dist/components/footer.js +3 -3
  90. package/dist/components/form-dialog.d.ts.map +1 -1
  91. package/dist/components/form-dialog.js +2 -1
  92. package/dist/components/form-drawer.d.ts +7 -9
  93. package/dist/components/form-drawer.d.ts.map +1 -1
  94. package/dist/components/form-drawer.js +5 -5
  95. package/dist/components/form.d.ts +26 -0
  96. package/dist/components/form.d.ts.map +1 -0
  97. package/dist/components/form.js +29 -0
  98. package/dist/components/gauge.js +2 -2
  99. package/dist/components/heatmap/calendar-heatmap.d.ts.map +1 -1
  100. package/dist/components/heatmap/calendar-heatmap.js +15 -13
  101. package/dist/components/hive-scene.d.ts.map +1 -1
  102. package/dist/components/hive-scene.js +3 -1
  103. package/dist/components/hover-card.d.ts +1 -1
  104. package/dist/components/hover-card.d.ts.map +1 -1
  105. package/dist/components/hover-card.js +1 -1
  106. package/dist/components/input-group.d.ts +5 -6
  107. package/dist/components/input-group.d.ts.map +1 -1
  108. package/dist/components/input-group.js +8 -11
  109. package/dist/components/input-otp.d.ts.map +1 -1
  110. package/dist/components/input-otp.js +2 -2
  111. package/dist/components/item.d.ts +1 -1
  112. package/dist/components/item.js +2 -2
  113. package/dist/components/kbd.d.ts +6 -9
  114. package/dist/components/kbd.d.ts.map +1 -1
  115. package/dist/components/kbd.js +7 -3
  116. package/dist/components/message-notice.js +1 -1
  117. package/dist/components/middle-truncate.d.ts.map +1 -1
  118. package/dist/components/middle-truncate.js +1 -0
  119. package/dist/components/model-identity.d.ts +4 -4
  120. package/dist/components/model-identity.d.ts.map +1 -1
  121. package/dist/components/model-identity.js +2 -2
  122. package/dist/components/model-mark.d.ts.map +1 -1
  123. package/dist/components/model-mark.js +4 -2
  124. package/dist/components/multi-select.js +2 -2
  125. package/dist/components/native-select.d.ts.map +1 -1
  126. package/dist/components/native-select.js +2 -6
  127. package/dist/components/notice-banner.js +1 -1
  128. package/dist/components/object-page.js +2 -2
  129. package/dist/components/object-workspace.d.ts.map +1 -1
  130. package/dist/components/object-workspace.js +1 -3
  131. package/dist/components/overview-page.d.ts +1 -1
  132. package/dist/components/overview-page.d.ts.map +1 -1
  133. package/dist/components/overview-page.js +2 -1
  134. package/dist/components/page-actions.d.ts.map +1 -1
  135. package/dist/components/page-actions.js +9 -4
  136. package/dist/components/pairing-code.js +1 -1
  137. package/dist/components/pending-label.d.ts.map +1 -1
  138. package/dist/components/pending-label.js +0 -1
  139. package/dist/components/popover.d.ts +1 -1
  140. package/dist/components/popover.d.ts.map +1 -1
  141. package/dist/components/portal-sidebar-frame.d.ts.map +1 -1
  142. package/dist/components/portal-sidebar-frame.js +1 -1
  143. package/dist/components/product-message.d.ts.map +1 -1
  144. package/dist/components/product-message.js +1 -0
  145. package/dist/components/progress-checklist.d.ts.map +1 -1
  146. package/dist/components/progress-checklist.js +2 -2
  147. package/dist/components/progress.d.ts.map +1 -1
  148. package/dist/components/progress.js +5 -4
  149. package/dist/components/radio-group.js +2 -2
  150. package/dist/components/reading-column.js +1 -1
  151. package/dist/components/record-identity.d.ts.map +1 -1
  152. package/dist/components/record-identity.js +2 -5
  153. package/dist/components/record-list.d.ts.map +1 -1
  154. package/dist/components/record-list.js +4 -3
  155. package/dist/components/record-sheet.js +1 -1
  156. package/dist/components/record-time.d.ts.map +1 -1
  157. package/dist/components/record-time.js +2 -1
  158. package/dist/components/resizable.d.ts.map +1 -1
  159. package/dist/components/resizable.js +1 -1
  160. package/dist/components/row-edit-form.d.ts +2 -1
  161. package/dist/components/row-edit-form.d.ts.map +1 -1
  162. package/dist/components/row-edit-form.js +2 -1
  163. package/dist/components/run-timeline.js +1 -1
  164. package/dist/components/scope-switcher.js +1 -1
  165. package/dist/components/segmented-control.js +1 -1
  166. package/dist/components/select.js +1 -1
  167. package/dist/components/settings-facts.js +1 -1
  168. package/dist/components/settings-section.js +1 -1
  169. package/dist/components/sheet.d.ts +1 -1
  170. package/dist/components/sheet.d.ts.map +1 -1
  171. package/dist/components/sheet.js +1 -1
  172. package/dist/components/sidebar.d.ts +2 -2
  173. package/dist/components/sidebar.d.ts.map +1 -1
  174. package/dist/components/sidebar.js +16 -18
  175. package/dist/components/site-menu.d.ts +28 -0
  176. package/dist/components/site-menu.d.ts.map +1 -0
  177. package/dist/components/site-menu.js +23 -0
  178. package/dist/components/slider.d.ts.map +1 -1
  179. package/dist/components/slider.js +2 -1
  180. package/dist/components/snippet.d.ts +2 -0
  181. package/dist/components/snippet.d.ts.map +1 -1
  182. package/dist/components/snippet.js +13 -6
  183. package/dist/components/sonner.d.ts.map +1 -1
  184. package/dist/components/sonner.js +3 -4
  185. package/dist/components/status-badge.d.ts +1 -1
  186. package/dist/components/status-badge.d.ts.map +1 -1
  187. package/dist/components/switch.js +1 -1
  188. package/dist/components/table-card.js +1 -1
  189. package/dist/components/table.js +4 -4
  190. package/dist/components/tabs-nav.d.ts +52 -0
  191. package/dist/components/tabs-nav.d.ts.map +1 -0
  192. package/dist/components/tabs-nav.js +95 -0
  193. package/dist/components/tabs.d.ts +2 -56
  194. package/dist/components/tabs.d.ts.map +1 -1
  195. package/dist/components/tabs.js +2 -91
  196. package/dist/components/text-link.d.ts +1 -2
  197. package/dist/components/text-link.d.ts.map +1 -1
  198. package/dist/components/text-link.js +1 -2
  199. package/dist/components/textarea.d.ts +5 -2
  200. package/dist/components/textarea.d.ts.map +1 -1
  201. package/dist/components/textarea.js +12 -4
  202. package/dist/components/toast.d.ts +2 -0
  203. package/dist/components/toast.d.ts.map +1 -1
  204. package/dist/components/toast.js +4 -0
  205. package/dist/components/toggle-group.d.ts +3 -1
  206. package/dist/components/toggle-group.d.ts.map +1 -1
  207. package/dist/components/toggle-group.js +3 -6
  208. package/dist/components/toggle.js +1 -1
  209. package/dist/components/tooltip.d.ts +12 -12
  210. package/dist/components/tooltip.d.ts.map +1 -1
  211. package/dist/components/tooltip.js +9 -9
  212. package/dist/components/trend-badge.js +2 -2
  213. package/dist/components/update-card.js +1 -1
  214. package/dist/components/usage-meter.d.ts +1 -1
  215. package/dist/components/usage-meter.d.ts.map +1 -1
  216. package/dist/components/usage-meter.js +9 -7
  217. package/dist/components/waiting-line.js +1 -1
  218. package/dist/index.d.ts +3 -7
  219. package/dist/index.d.ts.map +1 -1
  220. package/dist/index.js +3 -7
  221. package/dist/internal/agent-orb-motion.d.ts +4 -1
  222. package/dist/internal/agent-orb-motion.d.ts.map +1 -1
  223. package/dist/internal/agent-orb-motion.js +9 -7
  224. package/dist/internal/agent-orb.d.ts +4 -1
  225. package/dist/internal/agent-orb.d.ts.map +1 -1
  226. package/dist/internal/agent-orb.js +7 -1
  227. package/dist/internal/assistant-ui/attachment.d.ts.map +1 -1
  228. package/dist/internal/assistant-ui/attachment.js +15 -15
  229. package/dist/internal/assistant-ui/follow-up-suggestions.js +1 -1
  230. package/dist/internal/assistant-ui/markdown-text.js +26 -25
  231. package/dist/internal/assistant-ui/reasoning.d.ts.map +1 -1
  232. package/dist/internal/assistant-ui/reasoning.js +13 -16
  233. package/dist/internal/assistant-ui/thread.d.ts.map +1 -1
  234. package/dist/internal/assistant-ui/thread.js +22 -16
  235. package/dist/internal/assistant-ui/tool-fallback.d.ts.map +1 -1
  236. package/dist/internal/assistant-ui/tool-fallback.js +29 -21
  237. package/dist/internal/assistant-ui/tool-group.d.ts.map +1 -1
  238. package/dist/internal/assistant-ui/tool-group.js +6 -7
  239. package/dist/internal/assistant-ui/tooltip-icon-button.js +1 -1
  240. package/dist/internal/badge-frame.d.ts +15 -0
  241. package/dist/internal/badge-frame.d.ts.map +1 -0
  242. package/dist/internal/badge-frame.js +44 -0
  243. package/dist/internal/button-classes.d.ts +20 -0
  244. package/dist/internal/button-classes.d.ts.map +1 -0
  245. package/dist/internal/button-classes.js +74 -0
  246. package/dist/internal/catalog-list.d.ts.map +1 -1
  247. package/dist/internal/catalog-list.js +8 -4
  248. package/dist/internal/collection-rail.js +3 -3
  249. package/dist/internal/form-drawer-frame.d.ts +10 -0
  250. package/dist/internal/form-drawer-frame.d.ts.map +1 -0
  251. package/dist/internal/form-drawer-frame.js +9 -0
  252. package/dist/internal/form-submit.d.ts +2 -1
  253. package/dist/internal/form-submit.d.ts.map +1 -1
  254. package/dist/internal/settings-save.d.ts.map +1 -1
  255. package/dist/internal/settings-save.js +4 -2
  256. package/dist/internal/status-mark.d.ts.map +1 -1
  257. package/dist/internal/status-mark.js +4 -1
  258. package/dist/internal/tab-row.d.ts +10 -0
  259. package/dist/internal/tab-row.d.ts.map +1 -0
  260. package/dist/internal/tab-row.js +2 -0
  261. package/dist/internal/table-compact-line.d.ts +1 -1
  262. package/dist/internal/table-compact-line.d.ts.map +1 -1
  263. package/dist/internal/table-compact-line.js +1 -1
  264. package/dist/internal/tooltip-content-frame.d.ts +14 -0
  265. package/dist/internal/tooltip-content-frame.d.ts.map +1 -0
  266. package/dist/internal/tooltip-content-frame.js +11 -0
  267. package/dist/lib/css-variables.d.ts +8 -0
  268. package/dist/lib/css-variables.d.ts.map +1 -0
  269. package/dist/lib/css-variables.js +4 -0
  270. package/dist/lib/merge-tokens.generated.js +1 -1
  271. package/dist/lib/use-copy-to-clipboard.d.ts.map +1 -1
  272. package/dist/lib/use-copy-to-clipboard.js +1 -2
  273. package/dist/showcase/samples.js +1 -1
  274. package/dist/showcase/specimens/choices.d.ts.map +1 -1
  275. package/dist/showcase/specimens/choices.js +3 -2
  276. package/dist/showcase/specimens/compositions.d.ts.map +1 -1
  277. package/dist/showcase/specimens/compositions.js +7 -5
  278. package/dist/showcase/specimens/data.d.ts.map +1 -1
  279. package/dist/showcase/specimens/data.js +1 -1
  280. package/dist/showcase/specimens/feedback.d.ts.map +1 -1
  281. package/dist/showcase/specimens/feedback.js +1 -2
  282. package/dist/showcase/specimens/index.d.ts +2 -0
  283. package/dist/showcase/specimens/index.d.ts.map +1 -1
  284. package/dist/showcase/specimens/inputs.d.ts +1 -0
  285. package/dist/showcase/specimens/inputs.d.ts.map +1 -1
  286. package/dist/showcase/specimens/inputs.js +5 -2
  287. package/dist/showcase/specimens/menus.d.ts +1 -0
  288. package/dist/showcase/specimens/menus.d.ts.map +1 -1
  289. package/dist/showcase/specimens/menus.js +7 -2
  290. package/dist/showcase/specimens/navigation.d.ts.map +1 -1
  291. package/dist/showcase/specimens/navigation.js +6 -5
  292. package/dist/showcase/specimens/status.d.ts.map +1 -1
  293. package/dist/showcase/specimens/status.js +4 -4
  294. package/dist/showcase/usage.generated.d.ts +1 -1
  295. package/dist/showcase/usage.generated.d.ts.map +1 -1
  296. package/dist/showcase/usage.generated.js +38 -16
  297. package/dist/standalone/index.js +1 -1
  298. package/dist/standalone/orb-page.js +10 -8
  299. package/dist/styles/components.css +1 -1
  300. package/package.json +32 -33
  301. package/dist/eslint/index.js +0 -224
  302. package/dist/eslint/rules/badge-is-static-label.js +0 -93
  303. package/dist/eslint/rules/button-icon-slot.js +0 -102
  304. package/dist/eslint/rules/button-link-for-navigation.js +0 -146
  305. package/dist/eslint/rules/button-no-aria-label-with-text.js +0 -75
  306. package/dist/eslint/rules/button-type-roles-only-in-buttons.js +0 -83
  307. package/dist/eslint/rules/choice-control-has-a-name.js +0 -98
  308. package/dist/eslint/rules/choice-group-in-fieldset.js +0 -86
  309. package/dist/eslint/rules/command-shortcut-single-owner.js +0 -118
  310. package/dist/eslint/rules/confirm-dialog-words.js +0 -63
  311. package/dist/eslint/rules/data-table-one-unsized-column.js +0 -96
  312. package/dist/eslint/rules/destructive-action-placement.js +0 -69
  313. package/dist/eslint/rules/disabled-choice-says-why.js +0 -71
  314. package/dist/eslint/rules/disabled-control-appearance.js +0 -75
  315. package/dist/eslint/rules/ellipsis-opens-a-dialog.js +0 -110
  316. package/dist/eslint/rules/empty-state-owner.js +0 -145
  317. package/dist/eslint/rules/input-group-owners.js +0 -155
  318. package/dist/eslint/rules/jsx-class-utility.js +0 -200
  319. package/dist/eslint/rules/kbd-children-no-modifier-text.js +0 -128
  320. package/dist/eslint/rules/literal-text.js +0 -41
  321. package/dist/eslint/rules/menu-owner.js +0 -75
  322. package/dist/eslint/rules/middle-truncate-placement.js +0 -69
  323. package/dist/eslint/rules/no-app-feature-component.js +0 -100
  324. package/dist/eslint/rules/no-bare-button-label.js +0 -55
  325. package/dist/eslint/rules/no-choice-control-wrapper.js +0 -97
  326. package/dist/eslint/rules/no-comment.js +0 -77
  327. package/dist/eslint/rules/no-control-in-read-only-surface.js +0 -106
  328. package/dist/eslint/rules/no-decorative-icon.js +0 -164
  329. package/dist/eslint/rules/no-deprecated-zod-api.js +0 -215
  330. package/dist/eslint/rules/no-global-patch.js +0 -115
  331. package/dist/eslint/rules/no-hand-built-busy.js +0 -104
  332. package/dist/eslint/rules/no-hand-built-theme-picker.js +0 -144
  333. package/dist/eslint/rules/no-hand-built-tile.js +0 -41
  334. package/dist/eslint/rules/no-hand-formatted-date.js +0 -87
  335. package/dist/eslint/rules/no-hand-stacked-avatars.js +0 -67
  336. package/dist/eslint/rules/no-nested-collapse.js +0 -60
  337. package/dist/eslint/rules/no-package-component-redefinition.js +0 -175
  338. package/dist/eslint/rules/no-search-in-form.js +0 -47
  339. package/dist/eslint/rules/no-shadcn-appearance-override.js +0 -305
  340. package/dist/eslint/rules/no-shell-prompt-in-snippet.js +0 -74
  341. package/dist/eslint/rules/no-stock-error-words.js +0 -56
  342. package/dist/eslint/rules/no-subject-derived-expectation.js +0 -183
  343. package/dist/eslint/rules/no-tooltip-around-labelled-field.js +0 -72
  344. package/dist/eslint/rules/no-weight-class-on-strong-in-type-role.js +0 -57
  345. package/dist/eslint/rules/no-write-in-subscription.js +0 -140
  346. package/dist/eslint/rules/one-submenu-level.js +0 -43
  347. package/dist/eslint/rules/one-toast-per-flow.js +0 -91
  348. package/dist/eslint/rules/option-count.js +0 -167
  349. package/dist/eslint/rules/page-command-link-not-render.js +0 -43
  350. package/dist/eslint/rules/page-composition.js +0 -232
  351. package/dist/eslint/rules/progress-needs-name.js +0 -57
  352. package/dist/eslint/rules/rendered-import.js +0 -121
  353. package/dist/eslint/rules/server-action-discipline.js +0 -233
  354. package/dist/eslint/rules/settings-limit-in-footer.js +0 -94
  355. package/dist/eslint/rules/skeleton-in-region.js +0 -80
  356. package/dist/eslint/rules/sortable-heading-uses-sort.js +0 -79
  357. package/dist/eslint/rules/table-cell-inset-owner.js +0 -107
  358. package/dist/eslint/rules/tabs-selection-is-controlled.js +0 -47
  359. package/dist/eslint/rules/test-files-from-one-definition.js +0 -67
  360. package/dist/eslint/rules/tooltip-only-arrow.js +0 -38
  361. package/dist/eslint/rules/tooltip-trigger-accessible-name.js +0 -114
  362. package/dist/eslint/rules/workspace-declares-imports.js +0 -163
  363. package/dist/eslint/strict-design-system.js +0 -250
@@ -9,7 +9,7 @@ import { getYear } from "date-fns/getYear";
9
9
  import { nextDay } from "date-fns/nextDay";
10
10
  import { parseISO } from "date-fns/parseISO";
11
11
  import { subWeeks } from "date-fns/subWeeks";
12
- import { createContext, Fragment, use, useMemo } from "react";
12
+ import { createContext, Fragment, use, useMemo, useState } from "react";
13
13
  import { cn } from "../../lib/utils.js";
14
14
  // Non-normalized: 1 empty + (levels-1) colored steps. Normalized: levels colored steps, no empty.
15
15
  const colorStepCount = (levels, isNormalized) => Math.max(1, isNormalized ? levels : levels - 1);
@@ -131,14 +131,14 @@ const groupByYearAndMonth = (activities, weekStart = 0, hasEmptyColumn = false)
131
131
  const yearOffset = Math.floor((currentMonth + monthOffset) / 12);
132
132
  const year = currentYear + yearOffset;
133
133
  const key = `${year}-${String(monthIndex).padStart(2, "0")}`;
134
- const monthActivities = activitiesByYearMonth.get(key) || [];
134
+ const monthActivities = activitiesByYearMonth.get(key) ?? [];
135
135
  const firstActivity = monthActivities[0];
136
136
  if (firstActivity) {
137
137
  hasData = true;
138
138
  const firstDate = parseISO(firstActivity.date);
139
139
  const firstCalendarDate = getDay(firstDate) === weekStart ? firstDate : subWeeks(nextDay(firstDate, weekStart), 1);
140
140
  const paddedActivities = [
141
- ...new Array(differenceInCalendarDays(firstDate, firstCalendarDate)).fill(undefined),
141
+ ...Array.from({ length: differenceInCalendarDays(firstDate, firstCalendarDate) }, () => undefined),
142
142
  ...monthActivities,
143
143
  ];
144
144
  const numberOfWeeks = Math.ceil(paddedActivities.length / 7);
@@ -178,7 +178,7 @@ const groupContinuous = (activities, weekStart = 0, singleRow = false) => {
178
178
  const firstCalendarDate = getDay(firstDate) === weekStart ? firstDate : subWeeks(nextDay(firstDate, weekStart), 1);
179
179
  const leadingPad = differenceInCalendarDays(firstDate, firstCalendarDate);
180
180
  const padded = [
181
- ...new Array(leadingPad).fill(undefined),
181
+ ...Array.from({ length: leadingPad }, () => undefined),
182
182
  ...normalizedActivities,
183
183
  ];
184
184
  const numberOfWeeks = Math.ceil(padded.length / 7);
@@ -313,10 +313,9 @@ export const CalendarHeatmap = ({ data, weekStart = 0, continuousMonths = true,
313
313
  }), [locale, labelsProp]);
314
314
  const labelHeight = fontSize + LABEL_MARGIN;
315
315
  const firstDatum = data[0];
316
- const year = firstDatum ? getYear(parseISO(firstDatum.date)) : new Date().getFullYear();
317
- const totalCount = totalCountProp !== undefined
318
- ? totalCountProp
319
- : dataWithLevels.reduce((sum, activity) => sum + (activity.value ?? 0), 0);
316
+ const [thisYear] = useState(() => new Date().getFullYear());
317
+ const year = firstDatum ? getYear(parseISO(firstDatum.date)) : thisYear;
318
+ const totalCount = totalCountProp ?? dataWithLevels.reduce((sum, activity) => sum + (activity.value ?? 0), 0);
320
319
  const blockWidth = blockSize * blockAspectRatio;
321
320
  const width = weeks.length * (blockWidth + blockMargin) - blockMargin;
322
321
  const height = labelHeight + (blockSize + blockMargin) * 7 - blockMargin;
@@ -368,7 +367,9 @@ export const CalendarHeatmap = ({ data, weekStart = 0, continuousMonths = true,
368
367
  colors,
369
368
  ]);
370
369
  if (data.length === 0) {
371
- return emptyState ? emptyState : null;
370
+ if (!emptyState)
371
+ return null;
372
+ return emptyState;
372
373
  }
373
374
  return (_jsx(CalendarHeatmapContext, { value: contextValue, children: _jsx("div", { "data-slot": "calendar-heatmap", className: cn("flex w-max max-w-full flex-col gap-2 p-4", className), style: { fontSize, ...style }, ...props, children: children }) }));
374
375
  };
@@ -376,9 +377,7 @@ export const CalendarHeatmapBlock = ({ ref, activity, dayIndex, weekIndex, highl
376
377
  const { blockSize, blockWidth, blockMargin, blockRadius, labelHeight, labels, levels, isNormalized, colors, } = useCalendarHeatmap();
377
378
  const level = Math.max(0, Math.min(colorStepCount(levels, isNormalized), activity.level));
378
379
  const cellLabel = labels.cellLabel ?? "{{date}}: {{value}} contributions";
379
- const ariaLabel =
380
- // oxlint-disable-next-line anti-slop/no-runtime-typeof -- cellLabel is our own string | (activity => string) union, told apart only by typeof.
381
- typeof cellLabel === "function"
380
+ const ariaLabel = typeof cellLabel === "function"
382
381
  ? cellLabel(activity)
383
382
  : cellLabel
384
383
  .replace("{{date}}", activity.date)
@@ -429,7 +428,10 @@ export const CalendarHeatmapBody = ({ hideMonthLabels = false, hideWeekdayLabels
429
428
  const totalWidth = weekdayLabelWidth + maxWidth + strokePadding * 2;
430
429
  return (_jsx("div", { "data-slot": "calendar-heatmap-body", className: cn("flex max-w-full flex-col gap-6 overflow-x-auto overflow-y-hidden py-4", className), ...props, children: rowData.map(({ yearRow, height, monthLabels, yearTotalCount }) => (_jsxs("div", { children: [!hideYearLabels && (_jsx("div", { className: cn("mb-2 text-muted-foreground", yearClassName), children: yearRow.year })), _jsx("svg", { role: "img", "aria-label": (labels.heatmapLabel ?? "Contribution heatmap for {{year}}").replace("{{year}}", String(yearRow.year)), className: "block overflow-visible rounded-sm focus-visible:nc-focus-outline focus-visible:outline-ring", height: height + strokePadding * 2, viewBox: `0 0 ${totalWidth} ${height + strokePadding * 2}`, width: totalWidth, children: _jsxs("g", { transform: `translate(0, ${strokePadding})`, children: [!hideMonthLabels && (_jsx("g", { className: cn("fill-current font-mono", labelClassName), children: monthLabels.map(({ label, weekIndex }) => (_jsx("text", { dominantBaseline: "hanging", x: weekdayLabelWidth + strokePadding + (blockWidth + blockMargin) * weekIndex, style: { fontSize: `${fontSize * 0.75}px` }, children: label }, `${yearRow.year}-${weekIndex}`))) })), !hideWeekdayLabels && (_jsx("g", { className: cn("fill-current font-mono text-xs", labelClassName), children: labels.weekdays?.map((label, dayIndex) => {
431
430
  const adjustedIndex = (dayIndex + weekStart) % 7;
432
- const adjustedLabel = labels.weekdays?.[adjustedIndex] || label;
431
+ const configuredLabel = labels.weekdays?.[adjustedIndex];
432
+ const adjustedLabel = configuredLabel === undefined || configuredLabel === ""
433
+ ? label
434
+ : configuredLabel;
433
435
  return (_jsx("text", { x: 0, y: labelHeight + (blockSize + blockMargin) * dayIndex + blockSize / 2, dominantBaseline: "middle", textAnchor: "start", style: { fontSize: `${fontSize * 0.75}px` }, children: adjustedLabel }, `weekday-${yearRow.year}-${label}`));
434
436
  }) })), _jsx("g", { transform: `translate(${weekdayLabelWidth + strokePadding}, 0)`, children: yearRow.weeks.map((week, weekIndex) => week.map((activity, dayIndex) => {
435
437
  if (!activity) {
@@ -1 +1 @@
1
- {"version":3,"file":"hive-scene.d.ts","sourceRoot":"","sources":["../../src/components/hive-scene.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,MAAM,MAAM,SAAS,GAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AAEjD,6DAA6D;AAC7D,MAAM,MAAM,OAAO,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnF,mFAAmF;AACnF,MAAM,MAAM,QAAQ,GAAG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AK,EAAE,MAAM,CAAA;KAAE,CAAC;IACrC;;;OAGG;IACH,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;OAGG;IACH,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,OAAO,EAAE,KAAK,QAAQ,CAAC;IAClD,iEAAiE;IACjE,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,mEAAmE;IACnE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B,CAAC;AA4LF;;;;;;;;;;;;;;GAcG;AACH,iBAAS,SAAS,CAAC,EACjB,IAAI,EACJ,MAAkB,EAClB,IAAI,EACJ,OAAO,EACP,IAAI,EACJ,MAAM,EACN,KAAK,EACL,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,cAAc,qBA8QhB;AAED,2DAA2D;AAC3D,iBAAS,SAAS,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE;IAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,CAAA;CAAE,qBAM9E;AAED,iEAAiE;AACjE,iBAAS,QAAQ,CAAC,EAChB,QAAQ,EACR,EAAE,EACF,IAAa,GACd,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACzB,qBAMA;AAED,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC"}
@@ -183,7 +183,9 @@ function HiveScene({ mode, column = "default", logo, picture, work, chrome, labe
183
183
  // The words' box, kept as state so the scene places the orbs again when it appears.
184
184
  const [wordsColumn, setWordsColumn] = React.useState(null);
185
185
  const workRef = React.useRef(work);
186
- workRef.current = work;
186
+ React.useLayoutEffect(() => {
187
+ workRef.current = work;
188
+ });
187
189
  const still = mode === "still";
188
190
  React.useEffect(() => {
189
191
  if (still)
@@ -42,7 +42,7 @@ import type { PresentContent } from "../internal/present-content.js";
42
42
  * Ours: the trigger is a real element (a `time` with its `datetime` for a moment), so the facts
43
43
  * never depend on hover. Keyboard opening is tested, not assumed.
44
44
  */
45
- declare function HoverCard({ ...props }: PreviewCardPrimitive.Root.Props): import("react").JSX.Element;
45
+ declare function HoverCard({ ...props }: Omit<PreviewCardPrimitive.Root.Props, "defaultOpen">): import("react").JSX.Element;
46
46
  declare function HoverCardTrigger({ delay, ...props }: PreviewCardPrimitive.Trigger.Props): import("react").JSX.Element;
47
47
  declare function HoverCardContent({ className, side, sideOffset, align, alignOffset, children, ...props }: PreviewCardPrimitive.Popup.Props & Pick<PreviewCardPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset"> & {
48
48
  /** The facts of the card; a card without any does not compile. */
@@ -1 +1 @@
1
- {"version":3,"file":"hover-card.d.ts","sourceRoot":"","sources":["../../src/components/hover-card.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,IAAI,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAGlF,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAMjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwCG;AACH,iBAAS,SAAS,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,CAAC,IAAI,CAAC,KAAK,+BAE/D;AAED,iBAAS,gBAAgB,CAAC,EACxB,KAAwB,EACxB,GAAG,KAAK,EACT,EAAE,oBAAoB,CAAC,OAAO,CAAC,KAAK,+BAEpC;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,IAAY,EACZ,UAAe,EACf,KAAgB,EAChB,WAAe,EACf,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,oBAAo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,cAAc,CAAC,KAAK,CAAC,EAAE,UAAU,CAAC,GAAG;IAClF,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,MAAM,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,KAAK,EAAE,cAAc,CAAC;IACtB,4FAA4F;IAC5F,YAAY,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,eAAe,CAAC,QAAQ,CAAC,CAAA;KAAE,CAAC;CAC9E,CAAC;AAEF;;;GAGG;AACH,iBAAS,gBAAgB,CAAC,EACxB,IAAI,EACJ,MAAM,EACN,KAAK,EACL,YAAY,EACZ,MAAM,EACN,SAAS,EACT,GAAG,KAAK,EACT,EAAE,qBAAqB,+BA8BvB;AAED,OAAO,EAAE,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,CAAC"}
@@ -62,6 +62,6 @@ function HoverCardContent({ className, side = "top", sideOffset = 14, align = "c
62
62
  * it, two to four facts and at most one link.
63
63
  */
64
64
  function HoverCardSummary({ name, detail, facts, missingLabel, action, className, ...props }) {
65
- return (_jsxs("div", { "data-slot": "hover-card-summary", className: cn("grid gap-3", className), ...props, children: [_jsxs("div", { className: "grid gap-0.5", children: [_jsx("p", { className: "text-heading-compact", children: name }), _jsx("p", { className: "text-body-sm text-muted-foreground", children: detail })] }), _jsx("dl", { className: "grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-body-sm", children: facts.map((fact) => (_jsxs(Fragment, { children: [_jsx("dt", { className: "text-muted-foreground", children: fact.label }), _jsx("dd", { className: "min-w-0 break-words", children: _jsx(TableValue, { missingLabel: missingLabel, value: fact.value }) })] }, fact.label))) }), action ? (_jsx(ButtonLink, { href: action.href, render: action.render, size: "sm", variant: "outline", className: "justify-self-start", children: action.label })) : null] }));
65
+ return (_jsxs("div", { "data-slot": "hover-card-summary", className: cn("grid gap-3", className), ...props, children: [_jsxs("div", { className: "grid gap-0.5", children: [_jsx("p", { className: "text-heading-compact", children: name }), _jsx("p", { className: "text-body-sm text-muted-foreground", children: detail })] }), _jsx("dl", { className: "grid grid-cols-[auto_1fr] gap-x-4 gap-y-1 text-body-sm", children: facts.map((fact) => (_jsxs(Fragment, { children: [_jsx("dt", { className: "text-muted-foreground", children: fact.label }), _jsx("dd", { className: "min-w-0 wrap-break-word", children: _jsx(TableValue, { missingLabel: missingLabel, value: fact.value }) })] }, fact.label))) }), action ? (_jsx(ButtonLink, { href: action.href, render: action.render, size: "sm", variant: "outline", className: "justify-self-start", children: action.label })) : null] }));
66
66
  }
67
67
  export { HoverCard, HoverCardTrigger, HoverCardContent, HoverCardSummary };
@@ -6,13 +6,13 @@ import { InputBox, type FieldSize } from "../internal/input-box.js";
6
6
  * One input box with something fixed inside it: a mark, a prefix, a button.
7
7
  *
8
8
  * @family Inputs
9
- * @when A single-line value with a button inside the box: a copy button, a block addon, a textarea
10
- * with a toolbar, a server-given value (a project ID) shown read-only in mono beside its copy
11
- * button, with no Save.
9
+ * @when Inside `@nadicodeai/ui` only, which does not export it: the box of `Input`, `ClearableInput`,
10
+ * `Combobox`, `Command` and `Textarea`'s `action`, and a single-line value with a button inside the
11
+ * box, such as a server-given value (a project ID) shown read-only in mono beside its copy button.
12
12
  * @instead A prefix or suffix of text or an icon (*https://*, *.com*), in a cell or plain, is the
13
13
  * `prefix`, `suffix` and `look` props of `Input`. A value that clears itself is `ClearableInput`; a
14
14
  * collection's search is `CollectionSearch`, never a hand-built group. Many known values to filter
15
- * is `Combobox`.
15
+ * is `Combobox`. A textarea with a control in its corner is `Textarea`'s `action`.
16
16
  * @behaviour The group draws the edge and the focus halo for the input inside it, so the ring
17
17
  * wraps the addons too, and takes the sizes of `Input`: the input follows the group's. An addon is
18
18
  * a `segment` (a filled cell with a divider, the look of `Input`'s prefix and suffix) or `plain`
@@ -54,6 +54,5 @@ declare function InputGroupButton({ className, type, variant, size, ...props }:
54
54
  declare function InputGroupText({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
55
55
  declare function InputGroupControl({ className, ...props }: Omit<React.ComponentProps<typeof InputBox>, "size">): React.JSX.Element;
56
56
  declare function InputGroupInput(props: React.ComponentProps<typeof InputGroupControl> & AccessibleName): React.JSX.Element;
57
- declare function InputGroupTextarea({ className, ...props }: React.ComponentProps<"textarea"> & AccessibleName): React.JSX.Element;
58
- export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupControl, InputGroupInput, InputGroupTextarea, };
57
+ export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupControl, InputGroupInput, };
59
58
  //# sourceMappingURL=input-group.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"input-group.d.ts","sourceRoot":"","sources":["../../src/components/input-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAU,KAAK,cAAc,EAAE,KAAK,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAExF,OAAO,EAA+B,QAAQ,EAAE,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AA2B7F;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,IAAgB,EAChB,OAAe,EACf,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,0DAA0D;IAC1D,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,qBAcA;AAED,QAAA,MAAM,uBAAuB;;;8EA6B5B,CAAC;AAEF,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,KAAsB,EACtB,IAAc,EACd,GAAG,KAAK,EACT,EAAE,KA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AAS,gBAAgB,CAAC,EACxB,SAAS,EACT,IAAe,EACf,OAAiB,EACjB,IAAW,EACX,GAAG,KAAK,EACT,EAAE,qBAAqB,qBAUvB;AAED,iBAAS,cAAc,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,qBAU5E;AAED,iBAAS,iBAAiB,CAAC,EACzB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EAAE,MAAM,CAAC,qBAarD;AAED,iBAAS,eAAe,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,iBAAiB,CAAC,GAAG,cAAc,qBAE9F;AAED,OAAO,EACL,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,iBAAiB,EACjB,eAAe,GAChB,CAAC"}
@@ -4,7 +4,6 @@ import * as React from "react";
4
4
  import { cva } from "class-variance-authority";
5
5
  import { cn } from "../lib/utils.js";
6
6
  import { Button } from "./button.js";
7
- import { Textarea } from "./textarea.js";
8
7
  import { fieldGroupStates, fieldRing, InputBox } from "../internal/input-box.js";
9
8
  const InputGroupSizeContext = React.createContext("default");
10
9
  const inputGroupVariants = cva([
@@ -30,13 +29,13 @@ const inputGroupVariants = cva([
30
29
  * One input box with something fixed inside it: a mark, a prefix, a button.
31
30
  *
32
31
  * @family Inputs
33
- * @when A single-line value with a button inside the box: a copy button, a block addon, a textarea
34
- * with a toolbar, a server-given value (a project ID) shown read-only in mono beside its copy
35
- * button, with no Save.
32
+ * @when Inside `@nadicodeai/ui` only, which does not export it: the box of `Input`, `ClearableInput`,
33
+ * `Combobox`, `Command` and `Textarea`'s `action`, and a single-line value with a button inside the
34
+ * box, such as a server-given value (a project ID) shown read-only in mono beside its copy button.
36
35
  * @instead A prefix or suffix of text or an icon (*https://*, *.com*), in a cell or plain, is the
37
36
  * `prefix`, `suffix` and `look` props of `Input`. A value that clears itself is `ClearableInput`; a
38
37
  * collection's search is `CollectionSearch`, never a hand-built group. Many known values to filter
39
- * is `Combobox`.
38
+ * is `Combobox`. A textarea with a control in its corner is `Textarea`'s `action`.
40
39
  * @behaviour The group draws the edge and the focus halo for the input inside it, so the ring
41
40
  * wraps the addons too, and takes the sizes of `Input`: the input follows the group's. An addon is
42
41
  * a `segment` (a filled cell with a divider, the look of `Input`'s prefix and suffix) or `plain`
@@ -84,8 +83,9 @@ const inputGroupAddonVariants = cva("flex cursor-text items-center justify-cente
84
83
  });
85
84
  function InputGroupAddon({ className, align = "inline-start", look = "plain", ...props }) {
86
85
  return (_jsx("div", { role: "group", "data-slot": "input-group-addon", "data-align": align, "data-look": look, className: cn(inputGroupAddonVariants({ align, look }), className), onClick: (e) => {
87
- // SAFETY: a click reaches this handler only from the addon or a node inside it, and React reports a text node's parent element as the target (react-dom's getEventTarget), so the target is an Element in whichever document the addon renders.
88
- if (e.target.closest("button")) {
86
+ // The addon's own window's Element, so the check holds in whichever document it renders.
87
+ const view = e.currentTarget.ownerDocument.defaultView;
88
+ if (view && e.target instanceof view.Element && e.target.closest("button")) {
89
89
  return;
90
90
  }
91
91
  e.currentTarget.parentElement?.querySelector("input")?.focus();
@@ -116,7 +116,4 @@ function InputGroupControl({ className, ...props }) {
116
116
  function InputGroupInput(props) {
117
117
  return _jsx(InputGroupControl, { ...props });
118
118
  }
119
- function InputGroupTextarea({ className, ...props }) {
120
- return (_jsx(Textarea, { "data-slot": "input-group-control", className: cn("flex-1 resize-none rounded-none bg-transparent shadow-none focus-visible:outline-none disabled:bg-transparent aria-invalid:outline-none", className), ...props }));
121
- }
122
- export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupControl, InputGroupInput, InputGroupTextarea, };
119
+ export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InputGroupControl, InputGroupInput, };
@@ -1 +1 @@
1
- {"version":3,"file":"input-otp.d.ts","sourceRoot":"","sources":["../../src/components/input-otp.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AAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAW1E;AAED,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf,qBAsBA;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,qBAWnE;AAED,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
@@ -22,7 +22,7 @@ import { MinusIcon } from "lucide-react";
22
22
  * separator has `role="separator"`.
23
23
  */
24
24
  function InputOTP({ className, containerClassName, ...props }) {
25
- return (_jsx(OTPInput, { "data-slot": "input-otp", containerClassName: cn("cn-input-otp flex items-center has-disabled:opacity-50", containerClassName), spellCheck: false,
25
+ return (_jsx(OTPInput, { "data-slot": "input-otp", containerClassName: cn("flex items-center has-disabled:opacity-50", containerClassName), spellCheck: false,
26
26
  // The hidden native input spans the whole container; the active slot is
27
27
  // the visible focus indicator, so the base-layer outline is suppressed.
28
28
  className: cn("focus-visible:outline-none disabled:cursor-not-allowed", className), ...props,
@@ -38,7 +38,7 @@ function InputOTPGroup({ className, ...props }) {
38
38
  function InputOTPSlot({ index, className, ...props }) {
39
39
  const inputOTPContext = React.useContext(OTPInputContext);
40
40
  const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
41
- return (_jsxs("div", { "data-slot": "input-otp-slot", "data-active": isActive, className: cn("relative flex size-control-height min-h-touch-target min-w-touch-target items-center justify-center border-y border-r border-input bg-background text-sm transition-[border-color,color,opacity] duration-[var(--nc-duration-confirm)] ease-[var(--nc-ease-out-strong)] outline-none first:rounded-l-sm first:border-l last:rounded-r-sm aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:nc-focus-outline data-[active=true]:outline-ring data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:outline-destructive [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [@media(hover:hover)_and_(pointer:fine)]:min-w-0", className), ...props, children: [char, hasFakeCaret && (_jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: _jsx("div", { className: "h-4 w-px bg-foreground" }) }))] }));
41
+ return (_jsxs("div", { "data-slot": "input-otp-slot", "data-active": isActive, className: cn("relative flex size-control-height min-h-touch-target min-w-touch-target items-center justify-center border-y border-r border-input bg-background text-sm transition-[border-color,color,opacity] duration-(--nc-duration-confirm) ease-(--nc-ease-out-strong) outline-none first:rounded-l-sm first:border-l last:rounded-r-sm aria-invalid:border-destructive data-[active=true]:z-10 data-[active=true]:nc-focus-outline data-[active=true]:outline-ring data-[active=true]:aria-invalid:border-destructive data-[active=true]:aria-invalid:outline-destructive [@media(hover:hover)_and_(pointer:fine)]:min-h-0 [@media(hover:hover)_and_(pointer:fine)]:min-w-0", className), ...props, children: [char, hasFakeCaret && (_jsx("div", { className: "pointer-events-none absolute inset-0 flex items-center justify-center", children: _jsx("div", { className: "h-4 w-px bg-foreground" }) }))] }));
42
42
  }
43
43
  function InputOTPSeparator({ ...props }) {
44
44
  return (_jsx("div", { "data-slot": "input-otp-separator", className: "flex items-center [&_svg:not([class*='size-'])]:size-4", role: "separator", ...props, children: _jsx(MinusIcon, {}) }));
@@ -27,7 +27,7 @@ declare const itemVariants: (props?: ({
27
27
  * @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
28
28
  * “For a static key/value metadata block on a detail page, use `Description`.” (https://vercel.com/geist/entity)
29
29
  * Ours: Geist's `Table` is a `DataTable` and its `Description` is `ObjectFacts`. An object a person opens, with a mark, facts and a status, is a `RecordList` row; the same row edited in place is a `RecordList` with an `editor`. A page whose job is one collection is `CollectionPage`. Agents in a gallery are `AgentListRow`; Library entries `CatalogEntry`.
30
- * @behaviour A list of descriptive rows is an `ItemGroup` of `Item`s, never table semantics. Every row has a title over its one muted description line; only a message row read whole, or a second content beside the first, may be description only. Media, content and actions stand 16 px apart, centred on one another, in a 72 px row of 16 px padding; a 600 title stands over one 20 px description with no gap, and each holds one line and ends in an ellipsis (`whole` lets a message wrap). Inside a card the group is `divided`: no gaps, one hairline between items. An item that is an `a`, a `button` or a `label` takes the `accent` hover and is one hit target; a plain item never reacts to hover; nested controls stay independent. A button in the row is `size="sm"` (32 px). A row a person picks starts with `ItemSelect` and is drawn `render={<label />}`, so the whole row ticks its box and has no other control. A second content beside the first takes only the room its words need. Colour is neutral: the title in ink, the description and any trailing words muted, no hue.
30
+ * @behaviour A list of descriptive rows is an `ItemGroup` of `Item`s, never table semantics. Every row has a title over its one muted description line; only a message row read whole, or a second content beside the first, may be description only. Media, content and actions stand 16 px apart, centred on one another, in a 72 px row of 16 px padding; a 600 title stands over one 20 px description with no gap, and each holds one line and ends in an ellipsis (`whole` lets a message wrap). Inside a card the group is `divided`: no gaps, one hairline between items. An item that is an `a`, a `button` or a `label` takes the `accent` hover and is one hit target; a plain item never reacts to hover; nested controls stay independent. An `xs` item inside a menu or a combobox option takes the option's padding and adds none. A button in the row is `size="sm"` (32 px). A row a person picks starts with `ItemSelect` and is drawn `render={<label />}`, so the whole row ticks its box and has no other control. A second content beside the first takes only the room its words need. Colour is neutral: the title in ink, the description and any trailing words muted, no hue.
31
31
  * “The right column holds at most one or two controls. If the row needs more, move secondary actions into a `Dots Menu`.” (https://vercel.com/geist/entity)
32
32
  * Ours: the third control goes in the row's three dots.
33
33
  * “Render the Skeleton variant (`entity-with-skeleton`) during load instead of an empty row, and swap to real content once data resolves.” (https://vercel.com/geist/entity)
@@ -31,7 +31,7 @@ const itemVariants = cva("nc-transition-paint group/item flex w-full flex-wrap i
31
31
  },
32
32
  size: {
33
33
  default: "gap-4 p-4",
34
- xs: "gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0",
34
+ xs: "gap-2 px-2.5 py-2 in-data-[slot=combobox-item]:p-0 in-data-[slot=dropdown-menu-content]:p-0",
35
35
  },
36
36
  },
37
37
  defaultVariants: {
@@ -48,7 +48,7 @@ const itemVariants = cva("nc-transition-paint group/item flex w-full flex-wrap i
48
48
  * @instead “For tabular data with sortable columns and shared row shape, use `Table` instead.” (https://vercel.com/geist/entity)
49
49
  * “For a static key/value metadata block on a detail page, use `Description`.” (https://vercel.com/geist/entity)
50
50
  * Ours: Geist's `Table` is a `DataTable` and its `Description` is `ObjectFacts`. An object a person opens, with a mark, facts and a status, is a `RecordList` row; the same row edited in place is a `RecordList` with an `editor`. A page whose job is one collection is `CollectionPage`. Agents in a gallery are `AgentListRow`; Library entries `CatalogEntry`.
51
- * @behaviour A list of descriptive rows is an `ItemGroup` of `Item`s, never table semantics. Every row has a title over its one muted description line; only a message row read whole, or a second content beside the first, may be description only. Media, content and actions stand 16 px apart, centred on one another, in a 72 px row of 16 px padding; a 600 title stands over one 20 px description with no gap, and each holds one line and ends in an ellipsis (`whole` lets a message wrap). Inside a card the group is `divided`: no gaps, one hairline between items. An item that is an `a`, a `button` or a `label` takes the `accent` hover and is one hit target; a plain item never reacts to hover; nested controls stay independent. A button in the row is `size="sm"` (32 px). A row a person picks starts with `ItemSelect` and is drawn `render={<label />}`, so the whole row ticks its box and has no other control. A second content beside the first takes only the room its words need. Colour is neutral: the title in ink, the description and any trailing words muted, no hue.
51
+ * @behaviour A list of descriptive rows is an `ItemGroup` of `Item`s, never table semantics. Every row has a title over its one muted description line; only a message row read whole, or a second content beside the first, may be description only. Media, content and actions stand 16 px apart, centred on one another, in a 72 px row of 16 px padding; a 600 title stands over one 20 px description with no gap, and each holds one line and ends in an ellipsis (`whole` lets a message wrap). Inside a card the group is `divided`: no gaps, one hairline between items. An item that is an `a`, a `button` or a `label` takes the `accent` hover and is one hit target; a plain item never reacts to hover; nested controls stay independent. An `xs` item inside a menu or a combobox option takes the option's padding and adds none. A button in the row is `size="sm"` (32 px). A row a person picks starts with `ItemSelect` and is drawn `render={<label />}`, so the whole row ticks its box and has no other control. A second content beside the first takes only the room its words need. Colour is neutral: the title in ink, the description and any trailing words muted, no hue.
52
52
  * “The right column holds at most one or two controls. If the row needs more, move secondary actions into a `Dots Menu`.” (https://vercel.com/geist/entity)
53
53
  * Ours: the third control goes in the row's three dots.
54
54
  * “Render the Skeleton variant (`entity-with-skeleton`) during load instead of an empty row, and swap to real content once data resolves.” (https://vercel.com/geist/entity)
@@ -1,4 +1,4 @@
1
- export declare const KBD_KEYS: readonly ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "/", ",", ".", "?", "[", "]", "-", "=", "Enter", "Esc", "Tab", "Space", "Backspace", "Delete", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
1
+ export declare const KBD_KEYS: readonly ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "/", ",", ".", "?", "[", "]", "-", "=", "`", "\\", ";", "'", "Enter", "Esc", "Tab", "Space", "Backspace", "Delete", "ArrowUp", "ArrowDown", "ArrowLeft", "ArrowRight"];
2
2
  /** One key: a capital letter, a digit, a punctuation mark or a named key. */
3
3
  export type KbdKey = (typeof KBD_KEYS)[number];
4
4
  type Modifier = "meta" | "shift" | "alt" | "ctrl";
@@ -12,13 +12,10 @@ export type KbdProps = Omit<React.ComponentProps<"kbd">, "children"> & {
12
12
  /** `sm` is for a menu row, a command item or a table cell. */
13
13
  size?: "default" | "sm";
14
14
  } & ((Modifiers & {
15
- /**
16
- * The key, which a modifier flag may precede. JSX text types as `string`, so the lint rule
17
- * `kbd-children-no-modifier-text` holds it to `KBD_KEYS`.
18
- */
19
- children: string;
15
+ /** The key, which a modifier flag may precede. */
16
+ keyName: KbdKey;
20
17
  }) | (SomeModifier & {
21
- children?: undefined;
18
+ keyName?: undefined;
22
19
  }));
23
20
  /**
24
21
  * One key, or a modifier with its key, of a shortcut beside the command it triggers.
@@ -48,9 +45,9 @@ export type KbdProps = Omit<React.ComponentProps<"kbd">, "children"> & {
48
45
  * lives outside the element: `Press <Kbd meta>K</Kbd> to open the command menu.`" "Period, comma,
49
46
  * and `or` separators stay in surrounding prose so screen readers don’t announce them as keys."
50
47
  * (https://vercel.com/geist/keyboard-input)
51
- * Ours: children is a capital letter, a digit, a mark or a named key from `KBD_KEYS`.
48
+ * Ours: `keyName` is a capital letter, a digit, a mark or a named key from `KBD_KEYS`.
52
49
  * @access Ours: a `kbd` element, read in order; the command's own name carries the meaning.
53
50
  */
54
- declare function Kbd({ className, size, meta, shift, alt, ctrl, children, ...props }: KbdProps): import("react").JSX.Element;
51
+ declare function Kbd({ className, size, meta, shift, alt, ctrl, keyName, ...props }: KbdProps): import("react").JSX.Element;
55
52
  export { Kbd };
56
53
  //# sourceMappingURL=kbd.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"kbd.d.ts","sourceRoot":"","sources":["../../src/components/kbd.tsx"],"names":[],"mappings":"AAMA,eAAO,MAAM,QAAQ,iVAuDX,CAAC;AAEX,6EAA6E;AAC7E,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/C,KAAK,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AAClD,KAAK,SAAS,GAAG;KAAG,CAAC,IAAI,QAAQ,CAAC,CAAC,EAAE,OAAO;CAAE,CAAC;AAC/C,KAAK,YAAY,GAAG;KAAG,CAAC,IAAI,QAAQ,GAAG,MAAM,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,SAAS;CAAE,CAAC,QAAQ,CAAC,CAAC;AAE/E,MAAM,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC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AO,EAAE,MAAM,CAAC;CACjB,CAAC,GACF,CAAC,YAAY,GAAG;IAAE,OAAO,CAAC,EAAE,SAAS,CAAA;CAAE,CAAC,CAC3C,CAAC;AA6BJ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,iBAAS,GAAG,CAAC,EAAE,SAAS,EAAE,IAAgB,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,KAAK,EAAE,EAAE,QAAQ,+BA+BhG;AAED,OAAO,EAAE,GAAG,EAAE,CAAC"}
@@ -47,6 +47,10 @@ export const KBD_KEYS = [
47
47
  "]",
48
48
  "-",
49
49
  "=",
50
+ "`",
51
+ "\\",
52
+ ";",
53
+ "'",
50
54
  "Enter",
51
55
  "Esc",
52
56
  "Tab",
@@ -108,15 +112,15 @@ const beforeThePlatformIsKnown = () => true;
108
112
  * lives outside the element: `Press <Kbd meta>K</Kbd> to open the command menu.`" "Period, comma,
109
113
  * and `or` separators stay in surrounding prose so screen readers don’t announce them as keys."
110
114
  * (https://vercel.com/geist/keyboard-input)
111
- * Ours: children is a capital letter, a digit, a mark or a named key from `KBD_KEYS`.
115
+ * Ours: `keyName` is a capital letter, a digit, a mark or a named key from `KBD_KEYS`.
112
116
  * @access Ours: a `kbd` element, read in order; the command's own name carries the meaning.
113
117
  */
114
- function Kbd({ className, size = "default", meta, shift, alt, ctrl, children, ...props }) {
118
+ function Kbd({ className, size = "default", meta, shift, alt, ctrl, keyName, ...props }) {
115
119
  const onApple = useSyncExternalStore(subscribeToNothing, onAnApplePlatform, beforeThePlatformIsKnown);
116
120
  const glyphs = onApple ? APPLE_GLYPHS : OTHER_GLYPHS;
117
121
  const flags = { meta, shift, alt, ctrl };
118
122
  const held = new Set(MODIFIERS.flatMap((modifier) => (flags[modifier] ? [glyphs[modifier]] : [])));
119
- const parts = children === undefined ? [...held] : [...held, KEY_GLYPHS.get(children) ?? children];
123
+ const parts = keyName === undefined ? [...held] : [...held, KEY_GLYPHS.get(keyName) ?? keyName];
120
124
  return (_jsx("kbd", { "data-slot": "kbd", "data-nc-ui": "", className: cn("pointer-events-none inline-flex w-fit items-center justify-center rounded-xs-plus bg-background font-sans font-normal text-foreground ring-1 ring-border select-none in-data-[slot=tooltip-content]:bg-background/20 in-data-[slot=tooltip-content]:text-background in-data-[slot=tooltip-content]:ring-0", onApple ? "gap-0" : "gap-1", size === "sm"
121
125
  ? "h-5 min-w-5 px-1 text-caption leading-5"
122
126
  : "h-6 min-w-6 px-1.5 text-label leading-6", className), ...props, children: parts.map((part) => (_jsx("span", { children: part }, part))) }));
@@ -27,7 +27,7 @@ export function MessageNotice({ message, placement, tone = "destructive", classN
27
27
  const body = bodyBeyondTitle(message);
28
28
  const [action, secondAction] = message.actions;
29
29
  const mark = _jsx(NoticeMark, { icon: tone === "destructive" ? OctagonAlert : undefined, tone: tone });
30
- const sentence = (_jsxs("p", { className: "m-0 min-w-0 break-words", children: [_jsx("span", { className: body ? LEAD[placement] : undefined, children: body ? closedSentence(message.title) : message.title }), body ? ` ${body}` : null, placement === "action"
30
+ const sentence = (_jsxs("p", { className: "m-0 min-w-0 wrap-break-word", children: [_jsx("span", { className: body ? LEAD[placement] : undefined, children: body ? closedSentence(message.title) : message.title }), body ? ` ${body}` : null, placement === "action"
31
31
  ? [action, secondAction].map((command) => command ? (_jsxs("span", { children: [" ", _jsx(NoticeLink, { command: command, place: "inline" })] }, command.label)) : null)
32
32
  : null] }));
33
33
  if (placement === "section") {
@@ -1 +1 @@
1
- {"version":3,"file":"middle-truncate.d.ts","sourceRoot":"","sources":["../../src/components/middle-truncate.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAmC/B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,MAAM,EACN,KAAK,EACL,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,qBA0BpE;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"middle-truncate.d.ts","sourceRoot":"","sources":["../../src/components/middle-truncate.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAoC/B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,MAAM,EACN,KAAK,EACL,GAAG,KAAK,EACT,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,qBA0BpE;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -26,6 +26,7 @@ function useIsCut(root, value) {
26
26
  const observer = new ResizeObserver(measure);
27
27
  observer.observe(element);
28
28
  return () => observer.disconnect();
29
+ // oxlint-disable-next-line react/exhaustive-effect-dependencies -- `value` re-measures when the text changes inside a root whose size stays the same, which the ResizeObserver does not report
29
30
  }, [root, value]);
30
31
  return cut;
31
32
  }
@@ -1,4 +1,4 @@
1
- import type { ComponentPropsWithoutRef } from "react";
1
+ import { type ModelMarkProps } from "./model-mark.js";
2
2
  /**
3
3
  * The maker prefix an OpenRouter-style id carries, e.g. `"x-ai"` in
4
4
  * `"x-ai/grok-4.5"`. An id with no prefix reports no maker, and the mark falls
@@ -11,10 +11,10 @@ export declare function modelAuthor(model: string): string;
11
11
  * beside it already says who made it and the muted maker repeats it in words.
12
12
  */
13
13
  export declare function modelDisplayName(model: string): string;
14
- export type ModelIdentityProps = Omit<ComponentPropsWithoutRef<"span">, "children"> & {
14
+ /** ModelMark's props, the mark's `size` among them, with the model's id in place of its author. */
15
+ export type ModelIdentityProps = Omit<ModelMarkProps, "author" | "name"> & {
15
16
  model: string;
16
17
  name?: string | undefined;
17
- markSize?: number;
18
18
  };
19
19
  /**
20
20
  * A model as every surface reads it: the maker's mark, one name, the muted
@@ -37,5 +37,5 @@ export type ModelIdentityProps = Omit<ComponentPropsWithoutRef<"span">, "childre
37
37
  * maker prefix; a product whose runtime names models passes that `name`.
38
38
  * @access The name is text; the mark beside it is decorative.
39
39
  */
40
- export declare function ModelIdentity({ model, name, markSize, ...props }: ModelIdentityProps): import("react").JSX.Element;
40
+ export declare function ModelIdentity({ model, name, ...props }: ModelIdentityProps): import("react").JSX.Element;
41
41
  //# sourceMappingURL=model-identity.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-identity.d.ts","sourceRoot":"","sources":["../../src/components/model-identity.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGjD;AAsBD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKtD;AAED,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,wBAAwB,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACpF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,+BASpF"}
1
+ {"version":3,"file":"model-identity.d.ts","sourceRoot":"","sources":["../../src/components/model-identity.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzE;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGjD;AAsBD;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKtD;AAED,mGAAmG;AACnG,MAAM,MAAM,kBAAkB,GAAG,IAAI,CAAC,cAAc,EAAE,QAAQ,GAAG,MAAM,CAAC,GAAG;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,kBAAkB,+BAI1E"}
@@ -61,6 +61,6 @@ export function modelDisplayName(model) {
61
61
  * maker prefix; a product whose runtime names models passes that `name`.
62
62
  * @access The name is text; the mark beside it is decorative.
63
63
  */
64
- export function ModelIdentity({ model, name, markSize, ...props }) {
65
- return (_jsx(ModelMark, { author: modelAuthor(model), name: name ?? modelDisplayName(model), ...(markSize === undefined ? {} : { size: markSize }), ...props }));
64
+ export function ModelIdentity({ model, name, ...props }) {
65
+ return (_jsx(ModelMark, { author: modelAuthor(model), name: name ?? modelDisplayName(model), ...props }));
66
66
  }
@@ -1 +1 @@
1
- {"version":3,"file":"model-mark.d.ts","sourceRoot":"","sources":["../../src/components/model-mark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0E/B,gHAAgH;AAChH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAShD;AA8DD,KAAK,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACrE,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4FAA4F;IAC5F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAyDF;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,SAAS,CAAC,EACjB,MAAM,EACN,IAAI,EACJ,IAAsB,EACtB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,qBAsChB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"model-mark.d.ts","sourceRoot":"","sources":["../../src/components/model-mark.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0E/B,gHAAgH;AAChH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAShD;AA8DD,KAAK,cAAc,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,EAAE,UAAU,CAAC,GAAG;IACrE,6EAA6E;IAC7E,MAAM,EAAE,MAAM,CAAC;IACf,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,4FAA4F;IAC5F,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AA0DF;;;;;;;;;;;;;;;;;;GAkBG;AACH,iBAAS,SAAS,CAAC,EACjB,MAAM,EACN,IAAI,EACJ,IAAsB,EACtB,KAAK,EACL,SAAS,EACT,GAAG,KAAK,EACT,EAAE,cAAc,qBAsChB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,CAAC"}
@@ -130,7 +130,9 @@ function scopedIds(svg, scope) {
130
130
  function MarkReading({ slug, name, size, svg }) {
131
131
  const scope = React.useId().replace(/[^\w]/g, "");
132
132
  const glyph = Math.round(size * MODEL_MARK_GLYPH_RATIO);
133
- return (_jsxs(_Fragment, { children: [_jsx("span", { "data-slot": "model-mark-tile", "aria-hidden": "true", className: "inline-flex shrink-0 items-center justify-center rounded-md border border-border bg-background text-foreground", style: { width: size, height: size }, children: svg ? (_jsx("span", { className: "inline-flex", dangerouslySetInnerHTML: { __html: sizedToGlyph(scopedIds(svg, scope)) }, "data-slot": "model-mark-glyph", style: { width: glyph, height: glyph } })) : svg === null ? (_jsx("span", { className: "font-semibold leading-none text-muted-foreground", "data-slot": "model-author-monogram", style: { fontSize: Math.max(8, Math.round(size * 0.32)) }, children: authorInitials(slug) })) : null }), name ? (_jsxs("span", { className: "min-w-0 truncate", children: [_jsx("span", { className: "font-medium", children: name }), svg === null ? (_jsxs(_Fragment, { children: [" ", _jsx("span", { className: "text-xs text-muted-foreground", children: makerName(slug) })] })) : null] })) : null] }));
133
+ return (_jsxs(_Fragment, { children: [_jsx("span", { "data-slot": "model-mark-tile", "aria-hidden": "true", className: "inline-flex shrink-0 items-center justify-center rounded-md border border-border bg-background text-foreground", style: { width: size, height: size }, children: svg ? (_jsx("span", { className: "inline-flex",
134
+ // oxlint-disable-next-line react/no-danger -- the SVG is a module this package's build wrote from LobeHub's icon set into `dist/model-marks/`, never input from a person or a server response
135
+ dangerouslySetInnerHTML: { __html: sizedToGlyph(scopedIds(svg, scope)) }, "data-slot": "model-mark-glyph", style: { width: glyph, height: glyph } })) : svg === null ? (_jsx("span", { className: "font-semibold leading-none text-muted-foreground", "data-slot": "model-author-monogram", style: { fontSize: Math.max(8, Math.round(size * 0.32)) }, children: authorInitials(slug) })) : null }), name ? (_jsxs("span", { className: "min-w-0 truncate", children: [_jsx("span", { className: "font-medium", children: name }), svg === null ? (_jsxs(_Fragment, { children: [" ", _jsx("span", { className: "text-xs text-muted-foreground", children: makerName(slug) })] })) : null] })) : null] }));
134
136
  }
135
137
  function LoadedReading({ mark, ...reading }) {
136
138
  return _jsx(MarkReading, { ...reading, svg: React.use(makerMark(mark)) });
@@ -162,7 +164,7 @@ function ModelMark({ author, name, size = MODEL_MARK_SIZE, label, className, ...
162
164
  // alone on a generic element is not an accessible name. A mark with no name
163
165
  // of its own and nothing to sit beside stays hidden, so a bare `role="img"`
164
166
  // cannot expose an unnamed image.
165
- const named = Boolean(label?.trim() || props["aria-label"]?.trim() || props["aria-labelledby"]?.trim());
167
+ const named = [label, props["aria-label"], props["aria-labelledby"]].some((value) => Boolean(value?.trim()));
166
168
  const labelling = !named && !name
167
169
  ? { "aria-hidden": true }
168
170
  : label?.trim()
@@ -117,7 +117,7 @@ function moveFocus(event) {
117
117
  focusIn(row, "check");
118
118
  }
119
119
  function MultiSelectContent({ className, align = "start", sideOffset = 8, onKeyDown, ...props }) {
120
- return (_jsx(PopoverContent, { "data-slot": "multi-select-content", align: align, sideOffset: sideOffset, className: cn("max-h-[min(calc(var(--available-height)---spacing(4)),24rem)] w-auto min-w-(--anchor-width) gap-0 overflow-y-auto p-2", className), onKeyDown: (event) => {
120
+ return (_jsx(PopoverContent, { "data-slot": "multi-select-content", align: align, sideOffset: sideOffset, className: cn("max-h-[min(calc(var(--available-height)-(--spacing(4))),24rem)] w-auto min-w-(--anchor-width) gap-0 overflow-y-auto p-2", className), onKeyDown: (event) => {
121
121
  onKeyDown?.(event);
122
122
  if (!event.defaultPrevented)
123
123
  moveFocus(event);
@@ -129,6 +129,6 @@ function MultiSelectRow({ name, checked, onCheckedChange, onSelectOnly, disabled
129
129
  const actionId = `${id}-action`;
130
130
  const nameId = `${id}-name`;
131
131
  const selectsAll = checked && selectedCount < totalCount;
132
- return (_jsxs("div", { "data-slot": "multi-select-row", className: cn("group/multi-select-row flex min-h-touch-target items-center text-sm [@media(hover:hover)_and_(pointer:fine)]:min-h-7", className), children: [_jsx(Label, { className: "size-7 shrink-0 justify-center gap-0 rounded-xs-plus hover:bg-accent active:bg-border has-data-disabled:pointer-events-none", htmlFor: id, children: _jsx(Checkbox, { id: id, "aria-labelledby": nameId, checked: checked, "data-multi-select": "check", disabled: disabled, onCheckedChange: onCheckedChange }) }), totalCount > 1 ? (_jsxs(Button, { "aria-labelledby": `${actionId} ${nameId}`, className: "h-7 flex-1 justify-between gap-0 rounded-xs-plus p-1 text-sm font-normal hover:bg-accent focus-visible:bg-accent active:bg-border disabled:text-placeholder disabled:opacity-100", "data-multi-select": "action", disabled: disabled, onClick: selectsAll ? onSelectAll : onSelectOnly, size: "xs", variant: "ghost", children: [_jsx("span", { className: "min-w-0 truncate text-left", id: nameId, children: name }), _jsx("span", { className: "min-w-16 rounded-xs-plus px-1 py-0.5 text-right text-xs font-normal text-muted-foreground opacity-0 group-focus-within/multi-select-row:opacity-100 group-hover/multi-select-row:opacity-100 [@media(hover:none)]:opacity-100", id: actionId, children: selectsAll ? selectAllLabel : selectOnlyLabel })] })) : (_jsx(Label, { className: "flex-1 truncate px-1 text-sm leading-5", htmlFor: id, id: nameId, children: name }))] }));
132
+ return (_jsxs("div", { "data-slot": "multi-select-row", className: cn("group/multi-select-row flex min-h-touch-target items-center text-sm [@media(hover:hover)_and_(pointer:fine)]:min-h-7", className), children: [_jsx(Label, { className: "size-7 shrink-0 justify-center gap-0 rounded-xs-plus hover:bg-accent active:bg-border has-data-disabled:pointer-events-none", htmlFor: id, children: _jsx(Checkbox, { id: id, "aria-labelledby": nameId, checked: checked, "data-multi-select": "check", disabled: disabled, onCheckedChange: onCheckedChange }) }), totalCount > 1 ? (_jsxs(Button, { "aria-labelledby": `${actionId} ${nameId}`, className: "h-7 flex-1 justify-between gap-0 rounded-xs-plus p-1 text-sm font-normal hover:bg-accent focus-visible:bg-accent active:bg-border disabled:text-placeholder disabled:opacity-100", "data-multi-select": "action", disabled: disabled, onClick: selectsAll ? onSelectAll : onSelectOnly, size: "xs", variant: "ghost", children: [_jsx("span", { className: "min-w-0 truncate text-left", id: nameId, children: name }), _jsx("span", { className: "min-w-16 rounded-xs-plus px-1 py-0.5 text-right text-xs font-normal text-muted-foreground opacity-0 group-focus-within/multi-select-row:opacity-100 group-hover/multi-select-row:opacity-100 [@media(hover:none)]:opacity-100", id: actionId, children: selectsAll ? selectAllLabel : selectOnlyLabel })] })) : (_jsx(Label, { className: "flex-1 truncate px-1 text-sm/5 ", htmlFor: id, id: nameId, children: name }))] }));
133
133
  }
134
134
  export { MultiSelect, MultiSelectContent, MultiSelectRow, MultiSelectTrigger };
@@ -1 +1 @@
1
- {"version":3,"file":"native-select.d.ts","sourceRoot":"","sources":["../../src/components/native-select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAG7F,KAAK,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC,GAAG;IACjF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,gDAAgD;IAChD,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,kDAAkD;IAClD,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wFAAwF;IACxF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,SAAS,CAAC;AAEd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,IAAgB,EAChB,MAAM,EACN,MAAM,EACN,KAAK,EACL,WAAW,EACX,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,iBAAiB,qBA6FnB;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,qBAQlF;AAED,iBAAS,oBAAoB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,qBAQtF;AAED,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,CAAC"}
1
+ {"version":3,"file":"native-select.d.ts","sourceRoot":"","sources":["../../src/components/native-select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAc,KAAK,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAyC,KAAK,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAG7F,KAAK,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,QAAQ,GAAG,MAAM,CAAC,GAAG;IACjF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,gDAAgD;IAChD,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,kDAAkD;IAClD,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,mFAAmF;IACnF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wFAAwF;IACxF,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,GAAG,SAAS,CAAC;AAEd;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,iBAAS,YAAY,CAAC,EACpB,SAAS,EACT,IAAgB,EAChB,MAAM,EACN,MAAM,EACN,KAAK,EACL,WAAW,EACX,KAAK,EACL,GAAG,EACH,GAAG,KAAK,EACT,EAAE,iBAAiB,qBAyFnB;AAED,iBAAS,kBAAkB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,QAAQ,CAAC,qBAQlF;AAED,iBAAS,oBAAoB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,UAAU,CAAC,qBAQtF;AAED,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,CAAC"}
@@ -39,17 +39,13 @@ function NativeSelect({ className, size = "default", prefix, suffix, label, desc
39
39
  const select = React.useRef(null);
40
40
  const setRef = React.useCallback((node) => {
41
41
  select.current = node;
42
- // oxlint-disable-next-line anti-slop/no-runtime-typeof -- React.Ref is a callback | RefObject | null union and a callback ref may return a cleanup; only typeof tells them apart.
43
42
  const cleanup = typeof ref === "function" ? ref(node) : undefined;
44
- // oxlint-disable-next-line anti-slop/no-runtime-typeof -- React.Ref is a callback | RefObject | null union and a callback ref may return a cleanup; only typeof tells them apart.
45
43
  if (ref && typeof ref !== "function")
46
44
  ref.current = node;
47
45
  return () => {
48
46
  select.current = null;
49
- // oxlint-disable-next-line anti-slop/no-runtime-typeof -- React.Ref is a callback | RefObject | null union and a callback ref may return a cleanup; only typeof tells them apart.
50
47
  if (typeof cleanup === "function")
51
48
  cleanup();
52
- // oxlint-disable-next-line anti-slop/no-runtime-typeof -- React.Ref is a callback | RefObject | null union and a callback ref may return a cleanup; only typeof tells them apart.
53
49
  else if (typeof ref === "function")
54
50
  ref(null);
55
51
  else if (ref)
@@ -70,8 +66,8 @@ function NativeSelect({ className, size = "default", prefix, suffix, label, desc
70
66
  const options = [...node.options];
71
67
  const shown = options.flatMap((option) => (option.selected ? [option.value] : []));
72
68
  const stillShowsOldDefault = JSON.stringify(shown) === appliedDefault.current;
73
- // SAFETY: defaultKey is JSON.stringify of an array of String() values, built above, so it parses back to a string[].
74
- const wanted = new Set(JSON.parse(defaultKey));
69
+ const parsed = JSON.parse(defaultKey);
70
+ const wanted = new Set(Array.isArray(parsed) ? parsed.map(String) : []);
75
71
  for (const option of options)
76
72
  option.defaultSelected = wanted.has(option.value);
77
73
  if (!stillShowsOldDefault)
@@ -4,7 +4,7 @@ import { closedSentence, NOTICE_EDGE, NoticeLink, NoticeMark, } from "../interna
4
4
  import { cn } from "../lib/utils.js";
5
5
  import { bodyBeyondTitle } from "./product-message.js";
6
6
  const LIVE_REGION_ROLE = { assertive: "alert", polite: "status", off: "note" };
7
- // eslint-disable-next-line no-warning-comments -- the block quotes Geist's banner rule word for word (https://vercel.com/geist/banner); "temporary" there is prose, not a marker
7
+ // oxlint-disable-next-line no-warning-comments -- the block quotes Geist's banner rule word for word (https://vercel.com/geist/banner); "temporary" there is prose, not a marker
8
8
  /**
9
9
  * A condition of the page's own object, with the fix the page offers.
10
10
  *
@@ -19,7 +19,7 @@ import { PageActionsRow, PageCommandButton } from "./page-actions.js";
19
19
  export function ObjectPage({ mark, name, headingProps, description, facts, actions, entries, footer, children, }) {
20
20
  const company = mark.kind === "company";
21
21
  const title = headingProps ? (_jsx("h1", { ...headingProps, className: cn("outline-none", headingProps.className), children: name })) : (name);
22
- return (_jsxs("div", { className: "grid min-w-0 gap-6", "data-slot": "object-page", children: [_jsxs("div", { className: "grid min-w-0 gap-3", children: [_jsxs(Card, { className: "min-w-0", render: _jsx("div", { "data-slot": "object-card" }), size: "sm", children: [_jsxs(CardHeader, { className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-3 border-b", children: [company ? (_jsxs("div", { className: cn("flex min-w-0 flex-1 items-center gap-4", actions?.menu && !actions.secondary && !actions.primary ? "basis-0" : "basis-64"), children: [_jsx(IdentityMark, { ...mark, size: 64 }), _jsxs("div", { className: "grid min-w-0 gap-1", children: [_jsx(CardTitle, { className: "min-w-0 break-words group-data-[size=sm]/card:text-heading-sm", children: title }), description ? _jsx(CardDescription, { children: description }) : null] })] })) : (_jsx(CardTitle, { className: "min-w-0 flex-1 basis-32 break-words", children: title })), actions ? _jsx(PageActionsRow, { ...actions }) : null] }), _jsxs(CardContent, { className: cn("grid min-w-0 gap-x-6 gap-y-5", !company && "md:grid-cols-[minmax(0,18.75rem)_minmax(0,1fr)]"), children: [!company ? (_jsx("div", { className: "flex h-32 min-w-0 items-center md:h-auto md:aspect-[16/10] justify-center rounded-sm border border-border bg-muted", "data-slot": "object-page-tile", children: _jsx(IdentityMark, { ...mark, size: 64 }) })) : null, _jsxs("div", { className: "@container/object-page-facts grid min-w-0 content-start gap-4", children: [!company && description ? (_jsx("div", { className: "min-w-0 text-body-sm text-muted-foreground", children: description })) : null, _jsx("dl", { className: "grid min-w-0 grid-cols-2 gap-x-6 gap-y-4 @xl/object-page-facts:grid-cols-4", "data-slot": "object-page-facts", children: facts.map((fact) => (_jsxs("div", { className: "grid min-w-0 content-start gap-1", children: [_jsx("dt", { className: "text-label-sm text-muted-foreground", children: fact.label }), _jsx("dd", { className: "min-w-0 text-body-sm break-words text-foreground", children: fact.value })] }, fact.label))) })] })] }), footer ? (_jsx(FooterStrip, { hint: footer.hint, hintSlot: "object-page-hint", children: _jsx(PageCommandButton, { command: footer.link, variant: "outline" }) })) : null] }), entries && entries.length > 0 ? (_jsx(Card, { className: "min-w-0 py-0", render: _jsx("div", { "data-slot": "object-page-entries" }), size: "sm", children: _jsx(Accordion, { className: "[&>:last-child]:border-b-0", defaultValue: entries
22
+ return (_jsxs("div", { className: "grid min-w-0 gap-6", "data-slot": "object-page", children: [_jsxs("div", { className: "grid min-w-0 gap-3", children: [_jsxs(Card, { className: "min-w-0", render: _jsx("div", { "data-slot": "object-card" }), size: "sm", children: [_jsxs(CardHeader, { className: "flex flex-wrap items-center justify-between gap-x-4 gap-y-3 border-b", children: [company ? (_jsxs("div", { className: cn("flex min-w-0 flex-1 items-center gap-4", actions?.menu && !actions.secondary && !actions.primary ? "basis-0" : "basis-64"), children: [_jsx(IdentityMark, { ...mark, size: 64 }), _jsxs("div", { className: "grid min-w-0 gap-1", children: [_jsx(CardTitle, { className: "min-w-0 wrap-break-word group-data-[size=sm]/card:text-heading-sm", children: title }), description ? _jsx(CardDescription, { children: description }) : null] })] })) : (_jsx(CardTitle, { className: "min-w-0 flex-1 basis-32 wrap-break-word", children: title })), actions ? _jsx(PageActionsRow, { ...actions }) : null] }), _jsxs(CardContent, { className: cn("grid min-w-0 gap-x-6 gap-y-5", !company && "md:grid-cols-[minmax(0,18.75rem)_minmax(0,1fr)]"), children: [!company ? (_jsx("div", { className: "flex h-32 min-w-0 items-center md:h-auto md:aspect-16/10 justify-center rounded-sm border border-border bg-muted", "data-slot": "object-page-tile", children: _jsx(IdentityMark, { ...mark, size: 64 }) })) : null, _jsxs("div", { className: "@container/object-page-facts grid min-w-0 content-start gap-4", children: [!company && description ? (_jsx("div", { className: "min-w-0 text-body-sm text-muted-foreground", children: description })) : null, _jsx("dl", { className: "grid min-w-0 grid-cols-2 gap-x-6 gap-y-4 @xl/object-page-facts:grid-cols-4", "data-slot": "object-page-facts", children: facts.map((fact) => (_jsxs("div", { className: "grid min-w-0 content-start gap-1", children: [_jsx("dt", { className: "text-label-sm text-muted-foreground", children: fact.label }), _jsx("dd", { className: "min-w-0 text-body-sm wrap-break-word text-foreground", children: fact.value })] }, fact.label))) })] })] }), footer ? (_jsx(FooterStrip, { hint: footer.hint, hintSlot: "object-page-hint", children: _jsx(PageCommandButton, { command: footer.link, variant: "outline" }) })) : null] }), entries && entries.length > 0 ? (_jsx(Card, { className: "min-w-0 py-0", render: _jsx("div", { "data-slot": "object-page-entries" }), size: "sm", children: _jsx(Accordion, { className: "*:last:border-b-0", defaultValue: entries
23
23
  .filter((entry) => entry.defaultOpen)
24
- .map((entry) => entry.title), multiple: true, size: "small", children: entries.map((entry) => (_jsxs(AccordionItem, { value: entry.title, children: [_jsxs(AccordionTrigger, { className: "justify-start gap-3 px-(--card-spacing) group-data-[size=small]/accordion:text-body-sm focus-visible:-outline-offset-2 [&>[data-slot=accordion-trigger-icon]]:order-first [&>[data-slot=accordion-trigger-icon]]:text-muted-foreground", level: 2, children: [_jsx("span", { className: "min-w-0 flex-1", children: entry.title }), entry.summary] }), _jsx(AccordionContent, { className: "ps-[calc(var(--card-spacing)+1.75rem)] pe-(--card-spacing)", children: entry.children })] }, entry.title))) }) })) : null] }), children] }));
24
+ .map((entry) => entry.title), multiple: true, size: "small", children: entries.map((entry) => (_jsxs(AccordionItem, { value: entry.title, children: [_jsxs(AccordionTrigger, { className: "justify-start gap-3 px-(--card-spacing) group-data-[size=small]/accordion:text-body-sm focus-visible:-outline-offset-2 *:data-[slot=accordion-trigger-icon]:order-first *:data-[slot=accordion-trigger-icon]:text-muted-foreground", level: 2, children: [_jsx("span", { className: "min-w-0 flex-1", children: entry.title }), entry.summary] }), _jsx(AccordionContent, { className: "ps-[calc(var(--card-spacing)+1.75rem)] pe-(--card-spacing)", children: entry.children })] }, entry.title))) }) })) : null] }), children] }));
25
25
  }