@stll/ui 0.65.1 → 0.67.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 (397) hide show
  1. package/dist/calendar/day-calendar.d.ts +8 -3
  2. package/dist/calendar/day-calendar.js +8 -11
  3. package/dist/calendar/day-calendar.logic.d.ts +0 -2
  4. package/dist/calendar/day-calendar.logic.js +1 -2
  5. package/dist/calendar/primitives.d.ts +1 -3
  6. package/dist/calendar/primitives.js +1 -2
  7. package/dist/calendar/resource-calendar.d.ts +0 -2
  8. package/dist/calendar/resource-calendar.js +1 -2
  9. package/dist/calendar/resource-calendar.logic.d.ts +1 -3
  10. package/dist/calendar/resource-calendar.logic.js +1 -2
  11. package/dist/components/accordion.d.ts +0 -2
  12. package/dist/components/accordion.js +1 -2
  13. package/dist/components/ai-label.d.ts +0 -2
  14. package/dist/components/ai-label.js +1 -2
  15. package/dist/components/alert-dialog.d.ts +0 -2
  16. package/dist/components/alert-dialog.js +2 -3
  17. package/dist/components/animated-count.d.ts +0 -2
  18. package/dist/components/animated-count.js +1 -2
  19. package/dist/components/animated-preview.css +152 -0
  20. package/dist/components/animated-preview.d.ts +75 -0
  21. package/dist/components/animated-preview.js +105 -0
  22. package/dist/components/application-rail.d.ts +1 -3
  23. package/dist/components/application-rail.js +2 -3
  24. package/dist/components/avatar.d.ts +0 -2
  25. package/dist/components/avatar.js +1 -2
  26. package/dist/components/badge.d.ts +0 -2
  27. package/dist/components/badge.js +1 -2
  28. package/dist/components/bidi-text.d.ts +0 -2
  29. package/dist/components/bidi-text.js +1 -2
  30. package/dist/components/brand-icons.d.ts +0 -2
  31. package/dist/components/brand-icons.js +1 -2
  32. package/dist/components/breadcrumb.d.ts +0 -2
  33. package/dist/components/breadcrumb.js +1 -2
  34. package/dist/components/button.d.ts +0 -2
  35. package/dist/components/button.js +37 -15
  36. package/dist/components/button.native-classes.d.ts +0 -2
  37. package/dist/components/button.native-classes.js +1 -2
  38. package/dist/components/button.native.d.ts +0 -2
  39. package/dist/components/button.native.js +1 -2
  40. package/dist/components/button.shared.d.ts +1 -3
  41. package/dist/components/button.shared.js +1 -2
  42. package/dist/components/checkbox.d.ts +0 -2
  43. package/dist/components/checkbox.js +3 -4
  44. package/dist/components/collapsible.d.ts +0 -2
  45. package/dist/components/collapsible.js +1 -2
  46. package/dist/components/color-picker.d.ts +12 -5
  47. package/dist/components/color-picker.js +8 -10
  48. package/dist/components/combobox.d.ts +0 -2
  49. package/dist/components/combobox.js +5 -6
  50. package/dist/components/command.d.ts +0 -2
  51. package/dist/components/command.js +4 -5
  52. package/dist/components/composer-tokens.d.ts +1 -3
  53. package/dist/components/composer-tokens.js +1 -2
  54. package/dist/components/composer.d.ts +0 -2
  55. package/dist/components/composer.js +2 -3
  56. package/dist/components/context-menu.d.ts +9 -2
  57. package/dist/components/context-menu.js +10 -4
  58. package/dist/components/copy-button.d.ts +0 -2
  59. package/dist/components/copy-button.js +1 -2
  60. package/dist/components/court-badge.d.ts +0 -2
  61. package/dist/components/court-badge.js +1 -2
  62. package/dist/components/court-filter.d.ts +0 -2
  63. package/dist/components/court-filter.js +3 -4
  64. package/dist/components/date-picker-popover.d.ts +0 -2
  65. package/dist/components/date-picker-popover.js +6 -70
  66. package/dist/components/date-picker-popover.logic.d.ts +1 -3
  67. package/dist/components/date-picker-popover.logic.js +1 -2
  68. package/dist/components/date-range-filter.d.ts +0 -2
  69. package/dist/components/date-range-filter.js +1 -2
  70. package/dist/components/destructive-action-confirmation.d.ts +0 -2
  71. package/dist/components/destructive-action-confirmation.js +2 -3
  72. package/dist/components/destructive-confirm-dialog.d.ts +0 -2
  73. package/dist/components/destructive-confirm-dialog.js +1 -2
  74. package/dist/components/details-grid.d.ts +13 -5
  75. package/dist/components/details-grid.js +69 -14
  76. package/dist/components/dialog-form-state.d.ts +1 -3
  77. package/dist/components/dialog-form-state.js +1 -2
  78. package/dist/components/dialog.d.ts +0 -2
  79. package/dist/components/dialog.js +4 -5
  80. package/dist/components/directional-icon.d.ts +0 -2
  81. package/dist/components/directional-icon.js +1 -2
  82. package/dist/components/document-identity-badge.d.ts +0 -2
  83. package/dist/components/document-identity-badge.js +2 -3
  84. package/dist/components/document-identity-badge.logic.d.ts +1 -3
  85. package/dist/components/document-identity-badge.logic.js +1 -2
  86. package/dist/components/document-mark.d.ts +9 -0
  87. package/dist/components/document-mark.js +29 -0
  88. package/dist/components/document-mark.native.d.ts +11 -0
  89. package/dist/components/document-mark.native.js +36 -0
  90. package/dist/components/document-mark.shared.d.ts +378 -0
  91. package/dist/components/document-mark.shared.js +756 -0
  92. package/dist/components/entity-actions.d.ts +34 -0
  93. package/dist/components/entity-actions.js +132 -0
  94. package/dist/components/field.d.ts +0 -2
  95. package/dist/components/field.js +1 -2
  96. package/dist/components/file-input.d.ts +0 -2
  97. package/dist/components/file-input.js +2 -3
  98. package/dist/components/form.d.ts +0 -2
  99. package/dist/components/form.js +1 -2
  100. package/dist/components/frame.d.ts +0 -2
  101. package/dist/components/frame.js +1 -2
  102. package/dist/components/hex-color-picker.d.ts +0 -2
  103. package/dist/components/hex-color-picker.js +2 -3
  104. package/dist/components/horizontal-scroller.d.ts +0 -2
  105. package/dist/components/horizontal-scroller.js +3 -4
  106. package/dist/components/identity-text.d.ts +0 -2
  107. package/dist/components/identity-text.js +2 -3
  108. package/dist/components/inline-drop-indicator.d.ts +1 -3
  109. package/dist/components/inline-drop-indicator.js +1 -2
  110. package/dist/components/inline-rename.d.ts +0 -2
  111. package/dist/components/inline-rename.js +2 -3
  112. package/dist/components/input-control.d.ts +1 -3
  113. package/dist/components/input-control.js +1 -2
  114. package/dist/components/input-group.d.ts +0 -2
  115. package/dist/components/input-group.js +4 -5
  116. package/dist/components/input-otp.d.ts +0 -2
  117. package/dist/components/input-otp.js +1 -2
  118. package/dist/components/input.d.ts +0 -2
  119. package/dist/components/input.js +3 -4
  120. package/dist/components/input.native.d.ts +0 -2
  121. package/dist/components/input.native.js +1 -2
  122. package/dist/components/input.shared.d.ts +1 -3
  123. package/dist/components/kbd.d.ts +58 -0
  124. package/dist/components/kbd.js +90 -0
  125. package/dist/components/label.d.ts +0 -2
  126. package/dist/components/label.js +1 -2
  127. package/dist/components/landing.d.ts +0 -2
  128. package/dist/components/landing.js +1 -2
  129. package/dist/components/list.d.ts +0 -2
  130. package/dist/components/list.js +1 -2
  131. package/dist/components/loader.d.ts +0 -2
  132. package/dist/components/loader.js +1 -2
  133. package/dist/components/loader.native.d.ts +0 -2
  134. package/dist/components/loader.native.js +1 -2
  135. package/dist/components/loader.shared.d.ts +1 -3
  136. package/dist/components/loader.shared.js +1 -2
  137. package/dist/components/matter-icon.d.ts +0 -2
  138. package/dist/components/matter-icon.js +2 -3
  139. package/dist/components/matter-icon.native.d.ts +0 -2
  140. package/dist/components/matter-icon.native.js +2 -3
  141. package/dist/components/matter-icon.shared.d.ts +1 -3
  142. package/dist/components/matter-icon.shared.js +1 -2
  143. package/dist/components/menu-section.d.ts +0 -2
  144. package/dist/components/menu-section.js +1 -2
  145. package/dist/components/menu.d.ts +18 -4
  146. package/dist/components/menu.js +29 -9
  147. package/dist/components/middle-truncate.d.ts +0 -2
  148. package/dist/components/middle-truncate.js +1 -2
  149. package/dist/components/middle-truncate.logic.d.ts +0 -2
  150. package/dist/components/middle-truncate.logic.js +1 -2
  151. package/dist/components/number-input.d.ts +0 -2
  152. package/dist/components/number-input.js +2 -3
  153. package/dist/components/outline-rail.d.ts +12 -3
  154. package/dist/components/outline-rail.js +64 -12
  155. package/dist/components/outline-rail.logic.d.ts +0 -2
  156. package/dist/components/outline-rail.logic.js +7 -3
  157. package/dist/components/pagination.d.ts +0 -2
  158. package/dist/components/pagination.js +1 -2
  159. package/dist/components/popover.d.ts +0 -2
  160. package/dist/components/popover.js +2 -3
  161. package/dist/components/preview-card.d.ts +0 -2
  162. package/dist/components/preview-card.js +1 -2
  163. package/dist/components/preview-pane.d.ts +0 -2
  164. package/dist/components/preview-pane.js +1 -2
  165. package/dist/components/prose.d.ts +0 -2
  166. package/dist/components/prose.js +1 -2
  167. package/dist/components/scroll-area.d.ts +0 -2
  168. package/dist/components/scroll-area.js +1 -2
  169. package/dist/components/scroll-to-top.d.ts +1 -3
  170. package/dist/components/scroll-to-top.js +1 -2
  171. package/dist/components/search-field.d.ts +0 -2
  172. package/dist/components/search-field.js +1 -2
  173. package/dist/components/secret-input.d.ts +0 -2
  174. package/dist/components/secret-input.js +1 -2
  175. package/dist/components/segmented-icon-toggle.d.ts +0 -2
  176. package/dist/components/segmented-icon-toggle.js +2 -3
  177. package/dist/components/select.d.ts +0 -2
  178. package/dist/components/select.js +4 -5
  179. package/dist/components/separator.d.ts +0 -2
  180. package/dist/components/separator.js +1 -2
  181. package/dist/components/separator.native.d.ts +1 -3
  182. package/dist/components/separator.native.js +1 -2
  183. package/dist/components/separator.shared.d.ts +1 -3
  184. package/dist/components/sheet.d.ts +0 -2
  185. package/dist/components/sheet.js +3 -4
  186. package/dist/components/sheet.native.d.ts +1 -3
  187. package/dist/components/sheet.native.js +2 -3
  188. package/dist/components/sheet.shared.d.ts +1 -3
  189. package/dist/components/sidebar.d.ts +0 -2
  190. package/dist/components/sidebar.js +5 -6
  191. package/dist/components/sidebar.logic.d.ts +1 -3
  192. package/dist/components/sidebar.logic.js +1 -2
  193. package/dist/components/skeleton.d.ts +0 -2
  194. package/dist/components/skeleton.js +1 -2
  195. package/dist/components/split-button.d.ts +0 -2
  196. package/dist/components/split-button.js +2 -3
  197. package/dist/components/status-mark.d.ts +0 -2
  198. package/dist/components/status-mark.js +1 -2
  199. package/dist/components/stella-mark.d.ts +1 -3
  200. package/dist/components/stella-mark.js +1 -2
  201. package/dist/components/stella-mark.native.d.ts +1 -3
  202. package/dist/components/stella-mark.native.js +1 -2
  203. package/dist/components/stella-mark.shared.d.ts +1 -3
  204. package/dist/components/stella-mark.shared.js +1 -2
  205. package/dist/components/stella-wordmark.d.ts +1 -3
  206. package/dist/components/stella-wordmark.js +1 -2
  207. package/dist/components/stella-wordmark.native.d.ts +1 -3
  208. package/dist/components/stella-wordmark.native.js +1 -2
  209. package/dist/components/stella-wordmark.shared.d.ts +1 -3
  210. package/dist/components/stella-wordmark.shared.js +1 -2
  211. package/dist/components/steps.d.ts +0 -2
  212. package/dist/components/steps.js +1 -2
  213. package/dist/components/swap-text.d.ts +0 -2
  214. package/dist/components/swap-text.js +1 -2
  215. package/dist/components/switch.d.ts +0 -2
  216. package/dist/components/switch.js +1 -2
  217. package/dist/components/switch.native.d.ts +0 -2
  218. package/dist/components/switch.native.js +1 -2
  219. package/dist/components/switch.shared.d.ts +1 -3
  220. package/dist/components/table-chart.d.ts +1 -3
  221. package/dist/components/table-chart.js +1 -2
  222. package/dist/components/table.d.ts +0 -2
  223. package/dist/components/table.js +1 -2
  224. package/dist/components/tabs.d.ts +0 -2
  225. package/dist/components/tabs.js +2 -3
  226. package/dist/components/text.d.ts +0 -2
  227. package/dist/components/text.js +1 -2
  228. package/dist/components/text.native.d.ts +0 -2
  229. package/dist/components/text.native.js +1 -2
  230. package/dist/components/text.shared.d.ts +1 -3
  231. package/dist/components/text.shared.js +1 -2
  232. package/dist/components/textarea.d.ts +11 -3
  233. package/dist/components/textarea.js +53 -15
  234. package/dist/components/textarea.native.d.ts +1 -3
  235. package/dist/components/textarea.native.js +1 -2
  236. package/dist/components/textarea.shared.d.ts +1 -3
  237. package/dist/components/time-field.d.ts +25 -0
  238. package/dist/components/time-field.js +108 -0
  239. package/dist/components/toast.d.ts +0 -2
  240. package/dist/components/toast.js +4 -5
  241. package/dist/components/toggle-group.d.ts +0 -2
  242. package/dist/components/toggle-group.js +1 -2
  243. package/dist/components/toggle.d.ts +0 -2
  244. package/dist/components/toggle.js +1 -2
  245. package/dist/components/toolbar-icon-action.d.ts +0 -2
  246. package/dist/components/toolbar-icon-action.js +1 -2
  247. package/dist/components/tooltip-trigger-helper.d.ts +0 -2
  248. package/dist/components/tooltip-trigger-helper.js +1 -2
  249. package/dist/components/tooltip.d.ts +7 -3
  250. package/dist/components/tooltip.js +10 -6
  251. package/dist/components/truncated-text.d.ts +0 -2
  252. package/dist/components/truncated-text.js +3 -4
  253. package/dist/components/view-toolbar.d.ts +0 -2
  254. package/dist/components/view-toolbar.js +1 -2
  255. package/dist/components/workspace-shell.d.ts +0 -2
  256. package/dist/components/workspace-shell.js +4 -5
  257. package/dist/css.d.ts +0 -1
  258. package/dist/data-table/schema.d.ts +1 -3
  259. package/dist/data-table/schema.js +1 -2
  260. package/dist/data-table/table.d.ts +0 -2
  261. package/dist/data-table/table.js +2 -3
  262. package/dist/hooks/use-contained-handler.d.ts +0 -2
  263. package/dist/hooks/use-contained-handler.js +1 -2
  264. package/dist/hooks/use-content-dir.d.ts +0 -2
  265. package/dist/hooks/use-content-dir.js +1 -2
  266. package/dist/hooks/use-latest.d.ts +1 -3
  267. package/dist/hooks/use-latest.js +1 -2
  268. package/dist/hooks/use-mobile.d.ts +1 -3
  269. package/dist/hooks/use-mobile.js +1 -2
  270. package/dist/hooks/use-prefers-reduced-motion.d.ts +6 -0
  271. package/dist/hooks/use-prefers-reduced-motion.js +17 -0
  272. package/dist/hooks/use-viewport-width.d.ts +1 -3
  273. package/dist/hooks/use-viewport-width.js +1 -2
  274. package/dist/index.d.ts +5 -4
  275. package/dist/index.js +35 -34
  276. package/dist/inspector/chrome.d.ts +1 -3
  277. package/dist/inspector/chrome.js +2 -3
  278. package/dist/inspector/dock.d.ts +0 -2
  279. package/dist/inspector/dock.js +2 -3
  280. package/dist/inspector/entity-tab.d.ts +0 -2
  281. package/dist/inspector/entity-tab.js +3 -4
  282. package/dist/inspector/entity-tab.logic.d.ts +1 -3
  283. package/dist/inspector/entity-tab.logic.js +1 -2
  284. package/dist/inspector/facet-bar.d.ts +1 -3
  285. package/dist/inspector/facet-bar.js +5 -6
  286. package/dist/inspector/facet-bar.logic.d.ts +1 -3
  287. package/dist/inspector/facet-bar.logic.js +1 -2
  288. package/dist/inspector/index.js +2 -2
  289. package/dist/inspector/layout-tokens.d.ts +1 -3
  290. package/dist/inspector/layout-tokens.js +1 -2
  291. package/dist/inspector/pane-width.d.ts +0 -2
  292. package/dist/inspector/pane-width.js +1 -2
  293. package/dist/inspector/use-pane-width.d.ts +0 -2
  294. package/dist/inspector/use-pane-width.js +1 -2
  295. package/dist/kanban/band-peek.d.ts +1 -3
  296. package/dist/kanban/band-peek.js +1 -2
  297. package/dist/kanban/card-properties.d.ts +1 -3
  298. package/dist/kanban/card-properties.js +1 -2
  299. package/dist/kanban/card-shell.d.ts +1 -3
  300. package/dist/kanban/card-shell.js +2 -3
  301. package/dist/kanban/cell-action.d.ts +1 -3
  302. package/dist/kanban/cell-action.js +2 -3
  303. package/dist/kanban/column-band-header.d.ts +1 -3
  304. package/dist/kanban/column-band-header.js +2 -3
  305. package/dist/kanban/column-bands.d.ts +1 -3
  306. package/dist/kanban/column-bands.js +1 -2
  307. package/dist/kanban/column-header.d.ts +1 -3
  308. package/dist/kanban/column-header.js +1 -2
  309. package/dist/kanban/drag-interactions.d.ts +0 -2
  310. package/dist/kanban/drag-interactions.js +1 -2
  311. package/dist/kanban/grouping.d.ts +1 -3
  312. package/dist/kanban/grouping.js +1 -2
  313. package/dist/kanban/index.js +5 -5
  314. package/dist/kanban/layout-tokens.d.ts +1 -3
  315. package/dist/kanban/layout-tokens.js +1 -2
  316. package/dist/kanban/matrix.d.ts +1 -3
  317. package/dist/kanban/matrix.js +1 -2
  318. package/dist/kanban/sortable-edge.d.ts +0 -2
  319. package/dist/kanban/sortable-edge.js +1 -2
  320. package/dist/kanban/sortable-interactions.d.ts +0 -2
  321. package/dist/kanban/sortable-interactions.js +3 -4
  322. package/dist/kanban/sortable-interactions.logic.d.ts +0 -2
  323. package/dist/kanban/sortable-interactions.logic.js +1 -2
  324. package/dist/kanban/sticky-lane.d.ts +0 -2
  325. package/dist/kanban/sticky-lane.js +1 -2
  326. package/dist/kanban/subgroup-board.d.ts +0 -2
  327. package/dist/kanban/subgroup-board.js +5 -6
  328. package/dist/kanban/touch-identity.d.ts +0 -2
  329. package/dist/kanban/touch-identity.js +1 -2
  330. package/dist/kanban/virtual-cell.d.ts +1 -3
  331. package/dist/kanban/virtual-cell.js +3 -4
  332. package/dist/lib/button-disposition.d.ts +0 -2
  333. package/dist/lib/button-disposition.js +1 -2
  334. package/dist/lib/control-size.d.ts +0 -2
  335. package/dist/lib/control-size.js +1 -2
  336. package/dist/lib/field-trigger.d.ts +1 -3
  337. package/dist/lib/field-trigger.js +1 -2
  338. package/dist/lib/file-picker.d.ts +0 -2
  339. package/dist/lib/file-picker.js +1 -2
  340. package/dist/lib/initials.d.ts +1 -3
  341. package/dist/lib/initials.js +1 -2
  342. package/dist/lib/inline-reorder.d.ts +0 -2
  343. package/dist/lib/inline-reorder.js +1 -2
  344. package/dist/lib/matter-colors.d.ts +0 -2
  345. package/dist/lib/matter-colors.js +1 -2
  346. package/dist/lib/menu-row.d.ts +1 -3
  347. package/dist/lib/menu-row.js +1 -2
  348. package/dist/lib/native-context-menu.d.ts +24 -0
  349. package/dist/lib/native-context-menu.js +85 -0
  350. package/dist/lib/option-color.d.ts +1 -3
  351. package/dist/lib/option-color.js +1 -2
  352. package/dist/lib/overlay-layer.d.ts +1 -3
  353. package/dist/lib/overlay-layer.js +1 -2
  354. package/dist/lib/panel-inset.d.ts +1 -3
  355. package/dist/lib/panel-inset.js +1 -2
  356. package/dist/lib/positioner-sizing.d.ts +1 -3
  357. package/dist/lib/positioner-sizing.js +1 -2
  358. package/dist/lib/renders-nothing.d.ts +8 -0
  359. package/dist/lib/renders-nothing.js +14 -0
  360. package/dist/lib/safe-area.d.ts +1 -3
  361. package/dist/lib/safe-area.js +1 -2
  362. package/dist/lib/scroll-edge-fade.d.ts +1 -3
  363. package/dist/lib/scroll-edge-fade.js +1 -2
  364. package/dist/lib/slot.d.ts +0 -2
  365. package/dist/lib/slot.js +1 -2
  366. package/dist/lib/tab-order.d.ts +0 -2
  367. package/dist/lib/tab-order.js +1 -2
  368. package/dist/lib/tooltip-content.d.ts +1 -3
  369. package/dist/lib/tooltip-content.js +1 -2
  370. package/dist/lib/typed-character.d.ts +1 -3
  371. package/dist/lib/typed-character.js +1 -2
  372. package/dist/lib/utils.d.ts +1 -3
  373. package/dist/lib/utils.js +1 -2
  374. package/dist/lib/week.d.ts +1 -3
  375. package/dist/lib/week.js +1 -2
  376. package/dist/review/review-author-avatar.d.ts +0 -2
  377. package/dist/review/review-author-avatar.js +2 -3
  378. package/dist/review/review-comment-card.d.ts +0 -2
  379. package/dist/review/review-comment-card.js +3 -4
  380. package/dist/review/review-decision-actions.d.ts +0 -2
  381. package/dist/review/review-decision-actions.js +2 -3
  382. package/dist/review/review-diff-text.d.ts +0 -2
  383. package/dist/review/review-diff-text.js +1 -2
  384. package/dist/review/review-out-of-date-notice.d.ts +0 -2
  385. package/dist/review/review-out-of-date-notice.js +2 -3
  386. package/dist/review/review-severity-dot.d.ts +0 -2
  387. package/dist/review/review-severity-dot.js +1 -2
  388. package/dist/review/review-status-badge.d.ts +0 -2
  389. package/dist/review/review-status-badge.js +1 -2
  390. package/dist/review/review-word-diff.d.ts +1 -3
  391. package/dist/review/review-word-diff.js +1 -2
  392. package/dist/review/text-mark.d.ts +0 -2
  393. package/dist/review/text-mark.js +1 -2
  394. package/dist/styles/theme.css +50 -23
  395. package/dist/testing/browser-clock.d.ts +1 -3
  396. package/dist/testing/browser-clock.js +1 -2
  397. package/package.json +50 -10
@@ -1,11 +1,17 @@
1
1
  import { DayCalendarGranularity, DayCalendarRange } from "./day-calendar.logic.js";
2
2
  import { ReactElement, ReactNode } from "react";
3
- //#region src/calendar/day-calendar.d.ts
4
- /** A block paints in its matter's colour, or in the neutral surface tone. */
3
+ /**
4
+ * A block paints in its matter's colour; in a topic's colour, a lighter tint
5
+ * from the same palette keyed by a stable topic key and without the matter's
6
+ * edge; or in the neutral surface tone.
7
+ */
5
8
  export type DayCalendarTone = {
6
9
  color: string | null;
7
10
  matterId: string;
8
11
  type: "matter";
12
+ } | {
13
+ key: string;
14
+ type: "topic";
9
15
  } | {
10
16
  type: "neutral";
11
17
  };
@@ -91,5 +97,4 @@ type DayCalendarProps = {
91
97
  timeZone: string;
92
98
  };
93
99
  export declare const DayCalendar: ({ ariaLabel, columns, date, granularity, hours, locale, nowMs, onSelectRange, selection, timeZone }: DayCalendarProps) => ReactElement;
94
- //#endregion
95
100
  export {};
@@ -1,12 +1,12 @@
1
- import { cn } from "../lib/utils.js";
2
1
  import { Tooltip, TooltipContent as TooltipPopup, TooltipTrigger } from "../components/tooltip.js";
2
+ import { getMatterColor, resolveMatterColor } from "../lib/matter-colors.js";
3
+ import { cn } from "../lib/utils.js";
3
4
  import { DAY_CALENDAR_SLOT_HEIGHT_PX, boundsHeight, extendRange, getDayBounds, getHourTicks, isRepeatedWallTime, layoutOverlaps, moveRange, offsetToTime, rangeFromDrag, slotAt, timeToOffset } from "./day-calendar.logic.js";
4
- import { resolveMatterColor } from "../lib/matter-colors.js";
5
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { useState } from "react";
7
7
  import { panic } from "better-result";
8
8
  import { Temporal } from "temporal-polyfill/full";
9
- //#region src/calendar/day-calendar.tsx
9
+ // src/calendar/day-calendar.tsx
10
10
  const isSameDraftView = (left, right) => left.date === right.date && left.endHour === right.endHour && left.granularity === right.granularity && left.startHour === right.startHour && left.timeZone === right.timeZone;
11
11
  /**
12
12
  * A draft's range belongs to the day and grid it was made on; once they
@@ -367,27 +367,25 @@ const DayCalendarBlockView = ({ block, grid, lane, range }) => {
367
367
  })] })
368
368
  });
369
369
  };
370
- const MIXED_STRIPES = "repeating-linear-gradient(135deg, var(--muted) 0 6px, transparent 6px 12px)";
371
370
  /** A suggestion's tint is half an entry's, so proposed time reads lighter. */
372
371
  const TONE_TINT_PERCENT = {
373
372
  entry: 16,
374
373
  suggestion: 8
375
374
  };
375
+ /** A topic is not a matter yet: its tint sits between a suggestion's and an
376
+ * entry's. */
377
+ const TOPIC_TINT_PERCENT = 12;
376
378
  function blockSurfaceStyle(block) {
377
379
  const tone = block.tone;
378
- const stripes = block.kind === "mixed" ? MIXED_STRIPES : void 0;
379
380
  const suggestion = block.kind === "entry" && block.state === "suggestion";
380
381
  switch (tone.type) {
381
- case "neutral": return {
382
- backgroundColor: suggestion ? "transparent" : void 0,
383
- backgroundImage: stripes
384
- };
382
+ case "neutral": return { backgroundColor: suggestion ? "transparent" : void 0 };
383
+ case "topic": return { backgroundColor: `color-mix(in srgb, ${getMatterColor(tone.key)} ${String(TOPIC_TINT_PERCENT)}%, var(--card))` };
385
384
  case "matter": {
386
385
  const color = resolveMatterColor(tone.matterId, tone.color);
387
386
  const tint = suggestion ? TONE_TINT_PERCENT.suggestion : TONE_TINT_PERCENT.entry;
388
387
  return {
389
388
  backgroundColor: `color-mix(in srgb, ${color} ${String(tint)}%, var(--card))`,
390
- backgroundImage: stripes,
391
389
  borderColor: suggestion ? color : void 0,
392
390
  borderInlineStartColor: color
393
391
  };
@@ -493,5 +491,4 @@ const LockedColumnBody = ({ action }) => /* @__PURE__ */ jsxs("div", {
493
491
  function assertDayCalendarContract(columns) {
494
492
  if (new Set(columns.map(({ id }) => id)).size !== columns.length) panic("Day calendar column ids must be unique");
495
493
  }
496
- //#endregion
497
494
  export { DayCalendar };
@@ -1,4 +1,3 @@
1
- //#region src/calendar/day-calendar.logic.d.ts
2
1
  export declare const DAY_CALENDAR_GRANULARITIES: readonly [15, 30, 60];
3
2
  export type DayCalendarGranularity = (typeof DAY_CALENDAR_GRANULARITIES)[number];
4
3
  /** Below this height a block cannot hold one line of its label, so it draws
@@ -112,5 +111,4 @@ export declare const mergeShortSegments: <Segment extends DayCalendarRange & {
112
111
  }>(segments: readonly Segment[], { thresholdMs }: {
113
112
  thresholdMs: number;
114
113
  }) => MergedSegment<Segment>[];
115
- //#endregion
116
114
  export {};
@@ -1,6 +1,6 @@
1
1
  import { Result, panic } from "better-result";
2
2
  import { Temporal } from "temporal-polyfill/full";
3
- //#region src/calendar/day-calendar.logic.ts
3
+ // src/calendar/day-calendar.logic.ts
4
4
  const DAY_CALENDAR_GRANULARITIES = [
5
5
  15,
6
6
  30,
@@ -234,5 +234,4 @@ function compareIds(left, right) {
234
234
  if (left < right) return -1;
235
235
  return left > right ? 1 : 0;
236
236
  }
237
- //#endregion
238
237
  export { DAY_CALENDAR_GRANULARITIES, DAY_CALENDAR_ONE_LINE_BLOCK_MIN_PX, DAY_CALENDAR_SLOT_HEIGHT_PX, boundsHeight, clampToBounds, extendRange, getDayBounds, getHourTicks, granularityMs, isRepeatedWallTime, layoutOverlaps, mergeShortSegments, moveRange, offsetToTime, rangeFromDrag, slotAt, snapToGrid, timeToOffset };
@@ -1,9 +1,7 @@
1
1
  import * as React$1 from "react";
2
- //#region src/calendar/primitives.d.ts
3
2
  export declare const CalendarGrid: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
4
3
  export declare const CalendarHeaderRow: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
5
4
  export declare const CalendarHeaderCell: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
6
5
  export declare const CalendarCell: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
7
6
  export declare const CalendarEntryButton: ({ className, ...props }: React$1.ComponentProps<"button">) => React$1.JSX.Element;
8
- export declare const CalendarEntrySurface: ({ className, ...props }: React$1.ComponentProps<"article">) => React$1.JSX.Element;
9
- //#endregion
7
+ export declare const CalendarEntrySurface: ({ className, ...props }: React$1.ComponentProps<"article">) => React$1.JSX.Element;
@@ -1,6 +1,6 @@
1
1
  import { cn } from "../lib/utils.js";
2
2
  import { jsx } from "react/jsx-runtime";
3
- //#region src/calendar/primitives.tsx
3
+ // src/calendar/primitives.tsx
4
4
  const CalendarGrid = ({ className, ...props }) => /* @__PURE__ */ jsx("div", {
5
5
  className: cn("grid", className),
6
6
  "data-slot": "calendar-grid",
@@ -32,5 +32,4 @@ const CalendarEntrySurface = ({ className, ...props }) => /* @__PURE__ */ jsx("a
32
32
  "data-slot": "calendar-entry",
33
33
  ...props
34
34
  });
35
- //#endregion
36
35
  export { CalendarCell, CalendarEntryButton, CalendarEntrySurface, CalendarGrid, CalendarHeaderCell, CalendarHeaderRow };
@@ -1,5 +1,4 @@
1
1
  import { ReactElement, ReactNode } from "react";
2
- //#region src/calendar/resource-calendar.d.ts
3
2
  export type ResourceCalendarColumn = {
4
3
  date: string;
5
4
  label: ReactNode;
@@ -31,5 +30,4 @@ type ResourceCalendarProps = {
31
30
  resources: readonly ResourceCalendarResource[];
32
31
  };
33
32
  export declare const ResourceCalendar: ({ ariaLabel, columns, empty, entries, onSelectEntry, resourceHeader, resources }: ResourceCalendarProps) => ReactElement;
34
- //#endregion
35
33
  export {};
@@ -4,7 +4,7 @@ import { assertConsecutiveCalendarDates, layoutResourceCalendarEntries, nextCale
4
4
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
5
  import { useId } from "react";
6
6
  import { panic } from "better-result";
7
- //#region src/calendar/resource-calendar.tsx
7
+ // src/calendar/resource-calendar.tsx
8
8
  const ResourceCalendar = ({ ariaLabel, columns, empty, entries, onSelectEntry, resourceHeader, resources }) => {
9
9
  assertResourceCalendarContract({
10
10
  columns,
@@ -181,5 +181,4 @@ const assertResourceCalendarContract = ({ columns, entries, resources }) => {
181
181
  const orphan = entries.find(({ resourceId }) => !resourceIds.has(resourceId));
182
182
  if (orphan !== void 0) panic(`Resource calendar entry ${orphan.id} references an unknown resource`);
183
183
  };
184
- //#endregion
185
184
  export { ResourceCalendar };
@@ -1,4 +1,3 @@
1
- //#region src/calendar/resource-calendar.logic.d.ts
2
1
  export type CalendarDateRange = {
3
2
  endDateExclusive: string;
4
3
  startDate: string;
@@ -23,5 +22,4 @@ export declare const assertConsecutiveCalendarDates: (dates: readonly string[])
23
22
  export declare const nextCalendarDate: (value: string) => string;
24
23
  export declare const layoutResourceCalendarEntries: (entries: readonly (CalendarDateRange & {
25
24
  id: string;
26
- })[], visibleRange: CalendarDateRange) => ResourceCalendarLaneLayout;
27
- //#endregion
25
+ })[], visibleRange: CalendarDateRange) => ResourceCalendarLaneLayout;
@@ -1,6 +1,6 @@
1
1
  import { Result, panic } from "better-result";
2
2
  import { Temporal } from "temporal-polyfill/full";
3
- //#region src/calendar/resource-calendar.logic.ts
3
+ // src/calendar/resource-calendar.logic.ts
4
4
  const ISO_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}$/u;
5
5
  const toPlainDate = (value) => {
6
6
  if (!ISO_DATE_PATTERN.test(value)) return null;
@@ -83,5 +83,4 @@ const layoutResourceCalendarEntries = (entries, visibleRange) => {
83
83
  rowCount: Math.max(1, laneEnds.length)
84
84
  };
85
85
  };
86
- //#endregion
87
86
  export { assertConsecutiveCalendarDates, getResourceCalendarPlacement, layoutResourceCalendarEntries, nextCalendarDate };
@@ -1,5 +1,4 @@
1
1
  import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
2
- //#region src/components/accordion.d.ts
3
2
  /**
4
3
  * Closed panels stay in the document. Once mounted they are
5
4
  * `hidden="until-found"`, so find-in-page reaches their content and opens
@@ -38,5 +37,4 @@ declare const AccordionTrigger: ({ className, children, size, variant, trailing,
38
37
  declare const AccordionPanel: ({ className, children, size, ...props }: Accordion$1.Panel.Props & {
39
38
  size?: AccordionSize;
40
39
  }) => import("react").JSX.Element;
41
- //#endregion
42
40
  export { Accordion, AccordionPanel as AccordionContent, AccordionPanel, AccordionItem, AccordionTrigger };
@@ -3,7 +3,7 @@ import { ChevronDownIcon } from "../icons.js";
3
3
  import { cn } from "../lib/utils.js";
4
4
  import { Accordion as Accordion$1 } from "@base-ui/react/accordion";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
- //#region src/components/accordion.tsx
6
+ // src/components/accordion.tsx
7
7
  /**
8
8
  * Closed panels stay in the document. Once mounted they are
9
9
  * `hidden="until-found"`, so find-in-page reaches their content and opens
@@ -65,5 +65,4 @@ const AccordionPanel = ({ className, children, size = "default", ...props }) =>
65
65
  children
66
66
  })
67
67
  });
68
- //#endregion
69
68
  export { Accordion, AccordionPanel as AccordionContent, AccordionPanel, AccordionItem, AccordionTrigger };
@@ -1,4 +1,3 @@
1
- //#region src/components/ai-label.d.ts
2
1
  type AiLabelProps = {
3
2
  /**
4
3
  * The words the mark shows ("AI", "AI topics"), already translated. They
@@ -30,5 +29,4 @@ type AiLabelProps = {
30
29
  * technology.
31
30
  */
32
31
  export declare const AiLabel: ({ label, disclosure, className }: AiLabelProps) => import("react").JSX.Element;
33
- //#endregion
34
32
  export {};
@@ -3,7 +3,7 @@ import { SparklesIcon } from "../icons.js";
3
3
  import { cn } from "../lib/utils.js";
4
4
  import { Popover, PopoverContent as PopoverPopup, PopoverDescription, PopoverTrigger } from "./popover.js";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
- //#region src/components/ai-label.tsx
6
+ // src/components/ai-label.tsx
7
7
  /**
8
8
  * The mark on content a model wrote, and the one place a reader learns what
9
9
  * that means.
@@ -38,5 +38,4 @@ const AiLabel = ({ label, disclosure, className }) => /* @__PURE__ */ jsxs(Popov
38
38
  children: disclosure
39
39
  })
40
40
  })] });
41
- //#endregion
42
41
  export { AiLabel };
@@ -1,7 +1,6 @@
1
1
  import * as React$1 from "react";
2
2
  import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
3
3
  import { OverlayLayer } from "../lib/overlay-layer.js";
4
- //#region src/components/alert-dialog.d.ts
5
4
  declare const AlertDialogCreateHandle: typeof AlertDialog$1.createHandle;
6
5
  declare const AlertDialog: typeof AlertDialog$1.Root;
7
6
  declare const AlertDialogPortal: React$1.ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogPortalProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
@@ -28,5 +27,4 @@ declare const AlertDialogDescription: ({ className, ...props }: AlertDialog$1.De
28
27
  declare function AlertDialogClose({ tooltip, ...props }: AlertDialog$1.Close.Props & {
29
28
  tooltip?: React$1.ReactNode;
30
29
  }): React$1.JSX.Element;
31
- //#endregion
32
30
  export { AlertDialog, AlertDialogBackdrop, AlertDialogBackdrop as AlertDialogOverlay, AlertDialogClose, AlertDialogPopup as AlertDialogContent, AlertDialogPopup, AlertDialogCreateHandle, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPanel, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertDialogViewport };
@@ -1,11 +1,11 @@
1
1
  "use client";
2
- import { cn } from "../lib/utils.js";
3
2
  import { OVERLAY_LAYER_CLASS_NAMES } from "../lib/overlay-layer.js";
4
3
  import { SAFE_AREA_OVERLAY_GUTTER_CLASS_NAME } from "../lib/safe-area.js";
4
+ import { cn } from "../lib/utils.js";
5
5
  import { renderTooltipTrigger } from "./tooltip-trigger-helper.js";
6
6
  import { jsx, jsxs } from "react/jsx-runtime";
7
7
  import { AlertDialog as AlertDialog$1 } from "@base-ui/react/alert-dialog";
8
- //#region src/components/alert-dialog.tsx
8
+ // src/components/alert-dialog.tsx
9
9
  const AlertDialogCreateHandle = AlertDialog$1.createHandle;
10
10
  const AlertDialog = AlertDialog$1.Root;
11
11
  const AlertDialogPortal = AlertDialog$1.Portal;
@@ -72,5 +72,4 @@ function AlertDialogClose({ tooltip, ...props }) {
72
72
  })
73
73
  });
74
74
  }
75
- //#endregion
76
75
  export { AlertDialog, AlertDialogBackdrop, AlertDialogBackdrop as AlertDialogOverlay, AlertDialogClose, AlertDialogPopup as AlertDialogContent, AlertDialogPopup, AlertDialogCreateHandle, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogPanel, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertDialogViewport };
@@ -1,4 +1,3 @@
1
- //#region src/components/animated-count.d.ts
2
1
  /**
3
2
  * A formatted number whose changed characters fade in. The caller formats
4
3
  * (locale digits, units); the glyphs stay plain inline text so bidirectional
@@ -9,5 +8,4 @@ declare const AnimatedCount: ({ className, value }: {
9
8
  className?: string;
10
9
  value: string;
11
10
  }) => import("react").JSX.Element;
12
- //#endregion
13
11
  export { AnimatedCount };
@@ -2,7 +2,7 @@
2
2
  import { cn } from "../lib/utils.js";
3
3
  import { jsx, jsxs } from "react/jsx-runtime";
4
4
  import { useState } from "react";
5
- //#region src/components/animated-count.tsx
5
+ // src/components/animated-count.tsx
6
6
  /**
7
7
  * Aligns characters from the end, where digits keep their place value, so
8
8
  * 99 → 100 changes every glyph but 120 → 121 only the last one. An unchanged
@@ -59,5 +59,4 @@ const AnimatedCount = ({ className, value }) => {
59
59
  })]
60
60
  });
61
61
  };
62
- //#endregion
63
62
  export { AnimatedCount };
@@ -0,0 +1,152 @@
1
+ /*
2
+ * AnimatedPreview (animated-preview.tsx): the one animation system for
3
+ * previews that explain a feature by playing it.
4
+ *
5
+ * A frame stacks its stages in one grid cell. Stage `i` comes in at
6
+ * `i * hold` after the frame starts and goes out one hold later, cross-fading
7
+ * with its neighbour. A frame starts with the stage that holds it (plus its
8
+ * own stagger), so nested frames play inside their stage. Everything runs on
9
+ * CSS time; only a looping frame restarts itself, from JavaScript, once its
10
+ * last stage has gone out. With reduced motion nothing animates and the
11
+ * component renders only the final stage.
12
+ */
13
+
14
+ [data-slot="animated-preview"] {
15
+ --animated-preview-crossfade: 208ms;
16
+ --animated-preview-frame-start: calc(
17
+ var(--animated-preview-stage-start, 0ms) +
18
+ var(--animated-preview-stagger, 0) * 160ms
19
+ );
20
+
21
+ display: grid;
22
+ }
23
+
24
+ span[data-slot="animated-preview"] {
25
+ display: inline-grid;
26
+ justify-items: start;
27
+ }
28
+
29
+ [data-slot="animated-preview-stage"] {
30
+ --animated-preview-stage-start: calc(
31
+ var(--animated-preview-frame-start) + var(--animated-preview-stage-index) *
32
+ var(--animated-preview-hold)
33
+ );
34
+
35
+ grid-area: 1 / 1;
36
+ }
37
+
38
+ [data-pace="glance"] {
39
+ --animated-preview-hold: 1664ms;
40
+ }
41
+
42
+ [data-pace="read"] {
43
+ --animated-preview-hold: 2600ms;
44
+ }
45
+
46
+ [data-pace="beat"] {
47
+ --animated-preview-hold: 640ms;
48
+ }
49
+
50
+ @media (prefers-reduced-motion: no-preference) {
51
+ [data-slot="animated-preview-stage"][data-incoming] {
52
+ animation: animated-preview-fade-in var(--animated-preview-crossfade) linear
53
+ var(--animated-preview-stage-start) both;
54
+ }
55
+
56
+ /* `forwards` only: a backwards fill would hold the stage visible before
57
+ it has come in. */
58
+ [data-slot="animated-preview-stage"][data-outgoing] {
59
+ animation: animated-preview-fade-out var(--animated-preview-crossfade)
60
+ linear
61
+ calc(var(--animated-preview-stage-start) + var(--animated-preview-hold))
62
+ forwards;
63
+ }
64
+
65
+ [data-slot="animated-preview-stage"][data-incoming][data-outgoing] {
66
+ animation:
67
+ animated-preview-fade-in var(--animated-preview-crossfade) linear
68
+ var(--animated-preview-stage-start) both,
69
+ animated-preview-fade-out var(--animated-preview-crossfade) linear
70
+ calc(var(--animated-preview-stage-start) + var(--animated-preview-hold))
71
+ forwards;
72
+ }
73
+
74
+ /* The carry lands as the frame inside crosses from its first stage to its
75
+ second: that crossover sits at 64% of the gesture. */
76
+ [data-slot="animated-preview-motion"][data-motion="full"] {
77
+ animation: animated-preview-carry calc(var(--animated-preview-hold) / 0.64)
78
+ ease-in-out var(--animated-preview-stage-start, 0ms) forwards;
79
+ }
80
+ }
81
+
82
+ [data-slot="animated-preview-motion"][data-motion="reduced"] {
83
+ transform: translate(
84
+ var(--animated-preview-carry-x),
85
+ var(--animated-preview-carry-y)
86
+ );
87
+ }
88
+
89
+ @keyframes animated-preview-fade-in {
90
+ from {
91
+ opacity: 0;
92
+ }
93
+
94
+ to {
95
+ opacity: 1;
96
+ }
97
+ }
98
+
99
+ @keyframes animated-preview-fade-out {
100
+ from {
101
+ opacity: 1;
102
+ }
103
+
104
+ to {
105
+ opacity: 0;
106
+ }
107
+ }
108
+
109
+ /*
110
+ * Picked up (a small nudge, a 0.375rem lift, tilt and shadow), carried to the
111
+ * caller's target, and put down there. The caller sets
112
+ * `--animated-preview-carry-x` and `--animated-preview-carry-y`.
113
+ */
114
+ @keyframes animated-preview-carry {
115
+ 0%,
116
+ 28% {
117
+ transform: none;
118
+ filter: none;
119
+ }
120
+
121
+ 38% {
122
+ transform: translate(
123
+ 0.25rem,
124
+ calc(var(--animated-preview-carry-y) - 0.375rem)
125
+ )
126
+ rotate(2.5deg) scale(1.05);
127
+ filter: drop-shadow(
128
+ 0 8px 10px color-mix(in srgb, var(--color-black) 28%, transparent)
129
+ );
130
+ }
131
+
132
+ 64% {
133
+ transform: translate(
134
+ var(--animated-preview-carry-x),
135
+ calc(var(--animated-preview-carry-y) - 0.375rem)
136
+ )
137
+ rotate(2.5deg) scale(1.05);
138
+ filter: drop-shadow(
139
+ 0 8px 10px color-mix(in srgb, var(--color-black) 28%, transparent)
140
+ );
141
+ }
142
+
143
+ 74%,
144
+ 100% {
145
+ transform: translate(
146
+ var(--animated-preview-carry-x),
147
+ var(--animated-preview-carry-y)
148
+ )
149
+ rotate(0deg) scale(1);
150
+ filter: none;
151
+ }
152
+ }
@@ -0,0 +1,75 @@
1
+ import * as React$1 from "react";
2
+ /**
3
+ * The one animation system for previews that explain a feature by playing it:
4
+ * a frame of ordered stages that cross-fade into each other, an optional
5
+ * carry gesture around a frame, and a hover card that hosts a preview beside
6
+ * the control it explains.
7
+ *
8
+ * The styles live in `animated-preview.css`, shipped through
9
+ * `@stll/ui/theme.css`. A stage's clock is CSS only: stage `i` comes in at
10
+ * `i` holds after its frame starts and goes out one hold later, so a frame
11
+ * nested inside a stage starts when that stage does. With reduced motion a
12
+ * frame renders only its final stage, statically.
13
+ */
14
+ /**
15
+ * `once` plays the stages through and rests on the last one. `loop` lets the
16
+ * last stage go out and starts again from the first.
17
+ */
18
+ export type AnimatedPreviewPlayback = "once" | "loop";
19
+ /**
20
+ * How long each stage holds before the next one crosses over: `glance` for a
21
+ * gesture read at a glance, `read` for a stage carrying a sentence, `beat` for
22
+ * a step inside a stage.
23
+ */
24
+ export type AnimatedPreviewPace = "glance" | "read" | "beat";
25
+ export type AnimatedPreviewStage = {
26
+ id: string;
27
+ content: React$1.ReactNode;
28
+ };
29
+ type AnimatedPreviewProps = {
30
+ stages: readonly [AnimatedPreviewStage, ...AnimatedPreviewStage[]];
31
+ playback?: AnimatedPreviewPlayback;
32
+ pace?: AnimatedPreviewPace;
33
+ /**
34
+ * Steps this frame waits after the stage holding it comes in, so frames
35
+ * nested in one stage can follow each other.
36
+ */
37
+ stagger?: number;
38
+ /** Lays the frame out inline, to sit inside a sentence. */
39
+ inline?: boolean;
40
+ className?: string;
41
+ };
42
+ export declare const AnimatedPreview: ({ stages, playback, pace, stagger, inline, className }: AnimatedPreviewProps) => React$1.JSX.Element;
43
+ type AnimatedPreviewMotionProps = React$1.ComponentProps<"div"> & {
44
+ pace?: AnimatedPreviewPace;
45
+ };
46
+ /**
47
+ * Carries its content along: picked up (lift, tilt, shadow), moved, and put
48
+ * down as the frame inside it crosses from its first stage to its second.
49
+ * The caller places the drop with `--animated-preview-carry-x` and
50
+ * `--animated-preview-carry-y`; with reduced motion the content rests there.
51
+ */
52
+ export declare const AnimatedPreviewMotion: ({ className, pace, ...props }: AnimatedPreviewMotionProps) => React$1.JSX.Element;
53
+ /** How long a pointer or keyboard focus rests on the trigger before the card opens. */
54
+ export declare const ANIMATED_PREVIEW_CARD_DELAY_MS = 400;
55
+ type AnimatedPreviewCardProps = React$1.PropsWithChildren<{
56
+ /**
57
+ * The control the card explains. It must take the props it is handed, as a
58
+ * `Button` does: the card opens from its hover and focus events.
59
+ */
60
+ trigger: React$1.ReactElement;
61
+ /**
62
+ * One line on what the control does. Shown under the preview and read as
63
+ * the control's description, so the moving preview itself stays out of the
64
+ * accessibility tree.
65
+ */
66
+ description: React$1.ReactNode;
67
+ className?: string;
68
+ }>;
69
+ /**
70
+ * A preview card opened by hovering or focusing a control. It takes no focus
71
+ * and traps none: the card describes the control, and the control stays the
72
+ * thing that is used.
73
+ */
74
+ export declare const AnimatedPreviewCard: ({ trigger, description, className, children }: AnimatedPreviewCardProps) => React$1.JSX.Element;
75
+ export {};
@@ -0,0 +1,105 @@
1
+ "use client";
2
+ import { usePrefersReducedMotion } from "../hooks/use-prefers-reduced-motion.js";
3
+ import { cn } from "../lib/utils.js";
4
+ import { HoverCard as PreviewCard, HoverCardContent as PreviewCardPopup, HoverCardTrigger as PreviewCardTrigger } from "./preview-card.js";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import * as React$1 from "react";
7
+ // src/components/animated-preview.tsx
8
+ /** Must match the keyframes name in `animated-preview.css`. */
9
+ const STAGE_OUT_KEYFRAMES = "animated-preview-fade-out";
10
+ const AnimatedPreview = ({ stages, playback = "once", pace = "glance", stagger = 0, inline = false, className }) => {
11
+ const reducedMotion = usePrefersReducedMotion();
12
+ const [cycle, setCycle] = React$1.useState(0);
13
+ const Frame = inline ? "span" : "div";
14
+ const lastIndex = stages.length - 1;
15
+ const finalStage = stages[lastIndex] ?? stages[0];
16
+ const frameStyle = { "--animated-preview-stagger": stagger };
17
+ const restartLoop = (event) => {
18
+ const stage = event.target;
19
+ if (playback === "loop" && event.animationName === STAGE_OUT_KEYFRAMES && stage instanceof HTMLElement && stage.parentElement === event.currentTarget && stage.dataset["stageIndex"] === String(lastIndex)) setCycle((current) => current + 1);
20
+ };
21
+ return /* @__PURE__ */ jsx(Frame, {
22
+ className,
23
+ "data-motion": reducedMotion ? "reduced" : "full",
24
+ "data-pace": pace,
25
+ "data-playback": playback,
26
+ "data-slot": "animated-preview",
27
+ onAnimationEnd: reducedMotion ? void 0 : restartLoop,
28
+ style: frameStyle,
29
+ children: reducedMotion ? /* @__PURE__ */ jsx(StageFrame, {
30
+ incoming: false,
31
+ index: lastIndex,
32
+ inline,
33
+ outgoing: false,
34
+ children: finalStage.content
35
+ }) : stages.map((stage, index) => /* @__PURE__ */ jsx(StageFrame, {
36
+ incoming: index > 0 || playback === "loop",
37
+ index,
38
+ inline,
39
+ outgoing: index < lastIndex || playback === "loop",
40
+ children: stage.content
41
+ }, `${cycle}:${stage.id}`))
42
+ });
43
+ };
44
+ const StageFrame = ({ index, incoming, outgoing, inline, children }) => {
45
+ return /* @__PURE__ */ jsx(inline ? "span" : "div", {
46
+ "data-incoming": incoming ? "" : void 0,
47
+ "data-outgoing": outgoing ? "" : void 0,
48
+ "data-slot": "animated-preview-stage",
49
+ "data-stage-index": index,
50
+ style: { "--animated-preview-stage-index": index },
51
+ children
52
+ });
53
+ };
54
+ /**
55
+ * Carries its content along: picked up (lift, tilt, shadow), moved, and put
56
+ * down as the frame inside it crosses from its first stage to its second.
57
+ * The caller places the drop with `--animated-preview-carry-x` and
58
+ * `--animated-preview-carry-y`; with reduced motion the content rests there.
59
+ */
60
+ const AnimatedPreviewMotion = ({ className, pace = "glance", ...props }) => {
61
+ const reducedMotion = usePrefersReducedMotion();
62
+ return /* @__PURE__ */ jsx("div", {
63
+ className,
64
+ "data-motion": reducedMotion ? "reduced" : "full",
65
+ "data-pace": pace,
66
+ "data-slot": "animated-preview-motion",
67
+ ...props
68
+ });
69
+ };
70
+ /** How long a pointer or keyboard focus rests on the trigger before the card opens. */
71
+ const ANIMATED_PREVIEW_CARD_DELAY_MS = 400;
72
+ /**
73
+ * A preview card opened by hovering or focusing a control. It takes no focus
74
+ * and traps none: the card describes the control, and the control stays the
75
+ * thing that is used.
76
+ */
77
+ const AnimatedPreviewCard = ({ trigger, description, className, children }) => {
78
+ const descriptionId = React$1.useId();
79
+ return /* @__PURE__ */ jsxs(PreviewCard, { children: [
80
+ /* @__PURE__ */ jsx(PreviewCardTrigger, {
81
+ "aria-describedby": descriptionId,
82
+ delay: 400,
83
+ render: trigger
84
+ }),
85
+ /* @__PURE__ */ jsx("span", {
86
+ className: "sr-only",
87
+ id: descriptionId,
88
+ children: description
89
+ }),
90
+ /* @__PURE__ */ jsx(PreviewCardPopup, {
91
+ className: cn("w-72 flex-col gap-2 p-3", className),
92
+ "data-slot": "animated-preview-card",
93
+ children: /* @__PURE__ */ jsxs("div", {
94
+ "aria-hidden": true,
95
+ className: "flex flex-col gap-2",
96
+ children: [children, /* @__PURE__ */ jsx("p", {
97
+ className: "text-muted-foreground text-xs",
98
+ "data-slot": "animated-preview-card-description",
99
+ children: description
100
+ })]
101
+ })
102
+ })
103
+ ] });
104
+ };
105
+ export { ANIMATED_PREVIEW_CARD_DELAY_MS, AnimatedPreview, AnimatedPreviewCard, AnimatedPreviewMotion };
@@ -1,5 +1,4 @@
1
1
  import * as React$1 from "react";
2
- //#region src/components/application-rail.d.ts
3
2
  export declare const APPLICATION_RAIL_WIDTH: "w-12";
4
3
  export declare const APPLICATION_RAIL_BUTTON_SIZE: "size-11";
5
4
  export declare const APPLICATION_RAIL_ICON_SIZE: "size-4";
@@ -15,5 +14,4 @@ export declare const ApplicationRailContent: ({ className, ...props }: React$1.C
15
14
  export declare const ApplicationRailMenu: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
16
15
  export declare const ApplicationRailButton: ({ className, ...props }: React$1.ComponentProps<"button">) => React$1.JSX.Element;
17
16
  export declare const ApplicationRailSeparator: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
18
- export declare const ApplicationRailFooter: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;
19
- //#endregion
17
+ export declare const ApplicationRailFooter: ({ className, ...props }: React$1.ComponentProps<"div">) => React$1.JSX.Element;