@kujoforall/paper-ui 0.0.0-stage → 0.2.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 (661) hide show
  1. package/CHANGELOG.md +93 -0
  2. package/LICENSE +21 -0
  3. package/README.md +295 -2
  4. package/dist/components/editor/block-text.d.ts +8 -0
  5. package/dist/components/editor/block-text.d.ts.map +1 -0
  6. package/dist/components/editor/block-text.js +248 -0
  7. package/dist/components/editor/block-text.js.map +1 -0
  8. package/dist/components/editor/blocks.d.ts +33 -0
  9. package/dist/components/editor/blocks.d.ts.map +1 -0
  10. package/dist/components/editor/blocks.js +191 -0
  11. package/dist/components/editor/blocks.js.map +1 -0
  12. package/dist/components/editor/document-editor.d.ts +27 -0
  13. package/dist/components/editor/document-editor.d.ts.map +1 -0
  14. package/dist/components/editor/document-editor.js +42 -0
  15. package/dist/components/editor/document-editor.js.map +1 -0
  16. package/dist/components/editor/document-view.d.ts +22 -0
  17. package/dist/components/editor/document-view.d.ts.map +1 -0
  18. package/dist/components/editor/document-view.js +110 -0
  19. package/dist/components/editor/document-view.js.map +1 -0
  20. package/dist/components/editor/editor-state.d.ts +107 -0
  21. package/dist/components/editor/editor-state.d.ts.map +1 -0
  22. package/dist/components/editor/editor-state.js +217 -0
  23. package/dist/components/editor/editor-state.js.map +1 -0
  24. package/dist/components/editor/extensions/kit-blocks.d.ts +34 -0
  25. package/dist/components/editor/extensions/kit-blocks.d.ts.map +1 -0
  26. package/dist/components/editor/extensions/kit-blocks.js +201 -0
  27. package/dist/components/editor/extensions/kit-blocks.js.map +1 -0
  28. package/dist/components/editor/extensions/spoiler.d.ts +8 -0
  29. package/dist/components/editor/extensions/spoiler.d.ts.map +1 -0
  30. package/dist/components/editor/extensions/spoiler.js +36 -0
  31. package/dist/components/editor/extensions/spoiler.js.map +1 -0
  32. package/dist/components/editor/index.d.ts +10 -0
  33. package/dist/components/editor/index.d.ts.map +1 -0
  34. package/dist/components/editor/index.js +10 -0
  35. package/dist/components/editor/index.js.map +1 -0
  36. package/dist/components/editor/kinds.d.ts +99 -0
  37. package/dist/components/editor/kinds.d.ts.map +1 -0
  38. package/dist/components/editor/kinds.js +74 -0
  39. package/dist/components/editor/kinds.js.map +1 -0
  40. package/dist/components/editor/look.d.ts +18 -0
  41. package/dist/components/editor/look.d.ts.map +1 -0
  42. package/dist/components/editor/look.js +21 -0
  43. package/dist/components/editor/look.js.map +1 -0
  44. package/dist/components/sketch/rough.d.ts +38 -0
  45. package/dist/components/sketch/rough.d.ts.map +1 -0
  46. package/dist/components/sketch/rough.js +57 -0
  47. package/dist/components/sketch/rough.js.map +1 -0
  48. package/dist/components/three/model-viewer.d.ts +36 -0
  49. package/dist/components/three/model-viewer.d.ts.map +1 -0
  50. package/dist/components/three/model-viewer.js +338 -0
  51. package/dist/components/three/model-viewer.js.map +1 -0
  52. package/dist/components/ui/accent-picker.d.ts +2 -0
  53. package/dist/components/ui/accent-picker.d.ts.map +1 -0
  54. package/dist/components/ui/accent-picker.js +44 -0
  55. package/dist/components/ui/accent-picker.js.map +1 -0
  56. package/dist/components/ui/address-field.d.ts +10 -0
  57. package/dist/components/ui/address-field.d.ts.map +1 -0
  58. package/dist/components/ui/address-field.js +24 -0
  59. package/dist/components/ui/address-field.js.map +1 -0
  60. package/dist/components/ui/alert-dialog.d.ts +29 -0
  61. package/dist/components/ui/alert-dialog.d.ts.map +1 -0
  62. package/dist/components/ui/alert-dialog.js +72 -0
  63. package/dist/components/ui/alert-dialog.js.map +1 -0
  64. package/dist/components/ui/animated-height.d.ts +6 -0
  65. package/dist/components/ui/animated-height.d.ts.map +1 -0
  66. package/dist/components/ui/animated-height.js +26 -0
  67. package/dist/components/ui/animated-height.js.map +1 -0
  68. package/dist/components/ui/app-shell.d.ts +26 -0
  69. package/dist/components/ui/app-shell.d.ts.map +1 -0
  70. package/dist/components/ui/app-shell.js +71 -0
  71. package/dist/components/ui/app-shell.js.map +1 -0
  72. package/dist/components/ui/avatar.d.ts +30 -0
  73. package/dist/components/ui/avatar.d.ts.map +1 -0
  74. package/dist/components/ui/avatar.js +50 -0
  75. package/dist/components/ui/avatar.js.map +1 -0
  76. package/dist/components/ui/badge.d.ts +19 -0
  77. package/dist/components/ui/badge.d.ts.map +1 -0
  78. package/dist/components/ui/badge.js +62 -0
  79. package/dist/components/ui/badge.js.map +1 -0
  80. package/dist/components/ui/banner.d.ts +33 -0
  81. package/dist/components/ui/banner.d.ts.map +1 -0
  82. package/dist/components/ui/banner.js +21 -0
  83. package/dist/components/ui/banner.js.map +1 -0
  84. package/dist/components/ui/breadcrumbs.d.ts +10 -0
  85. package/dist/components/ui/breadcrumbs.d.ts.map +1 -0
  86. package/dist/components/ui/breadcrumbs.js +9 -0
  87. package/dist/components/ui/breadcrumbs.js.map +1 -0
  88. package/dist/components/ui/button.d.ts +15 -0
  89. package/dist/components/ui/button.d.ts.map +1 -0
  90. package/dist/components/ui/button.js +110 -0
  91. package/dist/components/ui/button.js.map +1 -0
  92. package/dist/components/ui/calendar.d.ts +5 -0
  93. package/dist/components/ui/calendar.d.ts.map +1 -0
  94. package/dist/components/ui/calendar.js +65 -0
  95. package/dist/components/ui/calendar.js.map +1 -0
  96. package/dist/components/ui/callout.d.ts +32 -0
  97. package/dist/components/ui/callout.d.ts.map +1 -0
  98. package/dist/components/ui/callout.js +40 -0
  99. package/dist/components/ui/callout.js.map +1 -0
  100. package/dist/components/ui/card.d.ts +18 -0
  101. package/dist/components/ui/card.d.ts.map +1 -0
  102. package/dist/components/ui/card.js +28 -0
  103. package/dist/components/ui/card.js.map +1 -0
  104. package/dist/components/ui/checkbox.d.ts +11 -0
  105. package/dist/components/ui/checkbox.d.ts.map +1 -0
  106. package/dist/components/ui/checkbox.js +30 -0
  107. package/dist/components/ui/checkbox.js.map +1 -0
  108. package/dist/components/ui/choice-label.d.ts +13 -0
  109. package/dist/components/ui/choice-label.d.ts.map +1 -0
  110. package/dist/components/ui/choice-label.js +17 -0
  111. package/dist/components/ui/choice-label.js.map +1 -0
  112. package/dist/components/ui/collapsible.d.ts +10 -0
  113. package/dist/components/ui/collapsible.d.ts.map +1 -0
  114. package/dist/components/ui/collapsible.js +21 -0
  115. package/dist/components/ui/collapsible.js.map +1 -0
  116. package/dist/components/ui/collection-layout.d.ts +24 -0
  117. package/dist/components/ui/collection-layout.d.ts.map +1 -0
  118. package/dist/components/ui/collection-layout.js +16 -0
  119. package/dist/components/ui/collection-layout.js.map +1 -0
  120. package/dist/components/ui/combobox.d.ts +10 -0
  121. package/dist/components/ui/combobox.d.ts.map +1 -0
  122. package/dist/components/ui/combobox.js +93 -0
  123. package/dist/components/ui/combobox.js.map +1 -0
  124. package/dist/components/ui/command-menu.d.ts +18 -0
  125. package/dist/components/ui/command-menu.d.ts.map +1 -0
  126. package/dist/components/ui/command-menu.js +49 -0
  127. package/dist/components/ui/command-menu.js.map +1 -0
  128. package/dist/components/ui/context-menu.d.ts +19 -0
  129. package/dist/components/ui/context-menu.d.ts.map +1 -0
  130. package/dist/components/ui/context-menu.js +42 -0
  131. package/dist/components/ui/context-menu.js.map +1 -0
  132. package/dist/components/ui/copy-button.d.ts +11 -0
  133. package/dist/components/ui/copy-button.d.ts.map +1 -0
  134. package/dist/components/ui/copy-button.js +48 -0
  135. package/dist/components/ui/copy-button.js.map +1 -0
  136. package/dist/components/ui/database/calendar-view.d.ts +10 -0
  137. package/dist/components/ui/database/calendar-view.d.ts.map +1 -0
  138. package/dist/components/ui/database/calendar-view.js +65 -0
  139. package/dist/components/ui/database/calendar-view.js.map +1 -0
  140. package/dist/components/ui/database/card-views.d.ts +22 -0
  141. package/dist/components/ui/database/card-views.d.ts.map +1 -0
  142. package/dist/components/ui/database/card-views.js +74 -0
  143. package/dist/components/ui/database/card-views.js.map +1 -0
  144. package/dist/components/ui/database/cells.d.ts +20 -0
  145. package/dist/components/ui/database/cells.d.ts.map +1 -0
  146. package/dist/components/ui/database/cells.js +132 -0
  147. package/dist/components/ui/database/cells.js.map +1 -0
  148. package/dist/components/ui/database/database.d.ts +19 -0
  149. package/dist/components/ui/database/database.d.ts.map +1 -0
  150. package/dist/components/ui/database/database.js +102 -0
  151. package/dist/components/ui/database/database.js.map +1 -0
  152. package/dist/components/ui/database/icons.d.ts +5 -0
  153. package/dist/components/ui/database/icons.d.ts.map +1 -0
  154. package/dist/components/ui/database/icons.js +13 -0
  155. package/dist/components/ui/database/icons.js.map +1 -0
  156. package/dist/components/ui/database/table-view.d.ts +11 -0
  157. package/dist/components/ui/database/table-view.d.ts.map +1 -0
  158. package/dist/components/ui/database/table-view.js +157 -0
  159. package/dist/components/ui/database/table-view.js.map +1 -0
  160. package/dist/components/ui/date-picker.d.ts +40 -0
  161. package/dist/components/ui/date-picker.d.ts.map +1 -0
  162. package/dist/components/ui/date-picker.js +64 -0
  163. package/dist/components/ui/date-picker.js.map +1 -0
  164. package/dist/components/ui/date-time-picker.d.ts +21 -0
  165. package/dist/components/ui/date-time-picker.d.ts.map +1 -0
  166. package/dist/components/ui/date-time-picker.js +34 -0
  167. package/dist/components/ui/date-time-picker.js.map +1 -0
  168. package/dist/components/ui/dialog.d.ts +21 -0
  169. package/dist/components/ui/dialog.d.ts.map +1 -0
  170. package/dist/components/ui/dialog.js +63 -0
  171. package/dist/components/ui/dialog.js.map +1 -0
  172. package/dist/components/ui/document-layout.d.ts +15 -0
  173. package/dist/components/ui/document-layout.d.ts.map +1 -0
  174. package/dist/components/ui/document-layout.js +15 -0
  175. package/dist/components/ui/document-layout.js.map +1 -0
  176. package/dist/components/ui/dropdown-menu.d.ts +24 -0
  177. package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
  178. package/dist/components/ui/dropdown-menu.js +65 -0
  179. package/dist/components/ui/dropdown-menu.js.map +1 -0
  180. package/dist/components/ui/editable-text.d.ts +24 -0
  181. package/dist/components/ui/editable-text.d.ts.map +1 -0
  182. package/dist/components/ui/editable-text.js +85 -0
  183. package/dist/components/ui/editable-text.js.map +1 -0
  184. package/dist/components/ui/empty-state.d.ts +11 -0
  185. package/dist/components/ui/empty-state.d.ts.map +1 -0
  186. package/dist/components/ui/empty-state.js +9 -0
  187. package/dist/components/ui/empty-state.js.map +1 -0
  188. package/dist/components/ui/error-state.d.ts +20 -0
  189. package/dist/components/ui/error-state.d.ts.map +1 -0
  190. package/dist/components/ui/error-state.js +17 -0
  191. package/dist/components/ui/error-state.js.map +1 -0
  192. package/dist/components/ui/field-button.d.ts +15 -0
  193. package/dist/components/ui/field-button.d.ts.map +1 -0
  194. package/dist/components/ui/field-button.js +18 -0
  195. package/dist/components/ui/field-button.js.map +1 -0
  196. package/dist/components/ui/file-preview.d.ts +5 -0
  197. package/dist/components/ui/file-preview.d.ts.map +1 -0
  198. package/dist/components/ui/file-preview.js +66 -0
  199. package/dist/components/ui/file-preview.js.map +1 -0
  200. package/dist/components/ui/file-uploader.d.ts +39 -0
  201. package/dist/components/ui/file-uploader.d.ts.map +1 -0
  202. package/dist/components/ui/file-uploader.js +111 -0
  203. package/dist/components/ui/file-uploader.js.map +1 -0
  204. package/dist/components/ui/filter-builder.d.ts +18 -0
  205. package/dist/components/ui/filter-builder.d.ts.map +1 -0
  206. package/dist/components/ui/filter-builder.js +98 -0
  207. package/dist/components/ui/filter-builder.js.map +1 -0
  208. package/dist/components/ui/focus-shell.d.ts +14 -0
  209. package/dist/components/ui/focus-shell.d.ts.map +1 -0
  210. package/dist/components/ui/focus-shell.js +13 -0
  211. package/dist/components/ui/focus-shell.js.map +1 -0
  212. package/dist/components/ui/handle-row.d.ts +25 -0
  213. package/dist/components/ui/handle-row.d.ts.map +1 -0
  214. package/dist/components/ui/handle-row.js +110 -0
  215. package/dist/components/ui/handle-row.js.map +1 -0
  216. package/dist/components/ui/header-bar.d.ts +5 -0
  217. package/dist/components/ui/header-bar.d.ts.map +1 -0
  218. package/dist/components/ui/header-bar.js +10 -0
  219. package/dist/components/ui/header-bar.js.map +1 -0
  220. package/dist/components/ui/hover-card.d.ts +6 -0
  221. package/dist/components/ui/hover-card.d.ts.map +1 -0
  222. package/dist/components/ui/hover-card.js +13 -0
  223. package/dist/components/ui/hover-card.js.map +1 -0
  224. package/dist/components/ui/image-block.d.ts +31 -0
  225. package/dist/components/ui/image-block.d.ts.map +1 -0
  226. package/dist/components/ui/image-block.js +103 -0
  227. package/dist/components/ui/image-block.js.map +1 -0
  228. package/dist/components/ui/image-card.d.ts +17 -0
  229. package/dist/components/ui/image-card.d.ts.map +1 -0
  230. package/dist/components/ui/image-card.js +39 -0
  231. package/dist/components/ui/image-card.js.map +1 -0
  232. package/dist/components/ui/image-framer.d.ts +24 -0
  233. package/dist/components/ui/image-framer.d.ts.map +1 -0
  234. package/dist/components/ui/image-framer.js +89 -0
  235. package/dist/components/ui/image-framer.js.map +1 -0
  236. package/dist/components/ui/image-viewer.d.ts +31 -0
  237. package/dist/components/ui/image-viewer.d.ts.map +1 -0
  238. package/dist/components/ui/image-viewer.js +114 -0
  239. package/dist/components/ui/image-viewer.js.map +1 -0
  240. package/dist/components/ui/image.d.ts +33 -0
  241. package/dist/components/ui/image.d.ts.map +1 -0
  242. package/dist/components/ui/image.js +61 -0
  243. package/dist/components/ui/image.js.map +1 -0
  244. package/dist/components/ui/index.d.ts +92 -0
  245. package/dist/components/ui/index.d.ts.map +1 -0
  246. package/dist/components/ui/index.js +92 -0
  247. package/dist/components/ui/index.js.map +1 -0
  248. package/dist/components/ui/input.d.ts +75 -0
  249. package/dist/components/ui/input.d.ts.map +1 -0
  250. package/dist/components/ui/input.js +245 -0
  251. package/dist/components/ui/input.js.map +1 -0
  252. package/dist/components/ui/link-block.d.ts +13 -0
  253. package/dist/components/ui/link-block.d.ts.map +1 -0
  254. package/dist/components/ui/link-block.js +21 -0
  255. package/dist/components/ui/link-block.js.map +1 -0
  256. package/dist/components/ui/list-detail.d.ts +23 -0
  257. package/dist/components/ui/list-detail.d.ts.map +1 -0
  258. package/dist/components/ui/list-detail.js +33 -0
  259. package/dist/components/ui/list-detail.js.map +1 -0
  260. package/dist/components/ui/listbox.d.ts +7 -0
  261. package/dist/components/ui/listbox.d.ts.map +1 -0
  262. package/dist/components/ui/listbox.js +29 -0
  263. package/dist/components/ui/listbox.js.map +1 -0
  264. package/dist/components/ui/mac-card.d.ts +15 -0
  265. package/dist/components/ui/mac-card.d.ts.map +1 -0
  266. package/dist/components/ui/mac-card.js +9 -0
  267. package/dist/components/ui/mac-card.js.map +1 -0
  268. package/dist/components/ui/month-picker.d.ts +13 -0
  269. package/dist/components/ui/month-picker.d.ts.map +1 -0
  270. package/dist/components/ui/month-picker.js +53 -0
  271. package/dist/components/ui/month-picker.js.map +1 -0
  272. package/dist/components/ui/multi-select.d.ts +22 -0
  273. package/dist/components/ui/multi-select.d.ts.map +1 -0
  274. package/dist/components/ui/multi-select.js +88 -0
  275. package/dist/components/ui/multi-select.js.map +1 -0
  276. package/dist/components/ui/nav-tree.d.ts +16 -0
  277. package/dist/components/ui/nav-tree.d.ts.map +1 -0
  278. package/dist/components/ui/nav-tree.js +41 -0
  279. package/dist/components/ui/nav-tree.js.map +1 -0
  280. package/dist/components/ui/page.d.ts +23 -0
  281. package/dist/components/ui/page.d.ts.map +1 -0
  282. package/dist/components/ui/page.js +28 -0
  283. package/dist/components/ui/page.js.map +1 -0
  284. package/dist/components/ui/pagination.d.ts +26 -0
  285. package/dist/components/ui/pagination.d.ts.map +1 -0
  286. package/dist/components/ui/pagination.js +54 -0
  287. package/dist/components/ui/pagination.js.map +1 -0
  288. package/dist/components/ui/picker-panel.d.ts +13 -0
  289. package/dist/components/ui/picker-panel.d.ts.map +1 -0
  290. package/dist/components/ui/picker-panel.js +19 -0
  291. package/dist/components/ui/picker-panel.js.map +1 -0
  292. package/dist/components/ui/popover.d.ts +8 -0
  293. package/dist/components/ui/popover.d.ts.map +1 -0
  294. package/dist/components/ui/popover.js +18 -0
  295. package/dist/components/ui/popover.js.map +1 -0
  296. package/dist/components/ui/progress.d.ts +19 -0
  297. package/dist/components/ui/progress.d.ts.map +1 -0
  298. package/dist/components/ui/progress.js +22 -0
  299. package/dist/components/ui/progress.js.map +1 -0
  300. package/dist/components/ui/property.d.ts +11 -0
  301. package/dist/components/ui/property.d.ts.map +1 -0
  302. package/dist/components/ui/property.js +18 -0
  303. package/dist/components/ui/property.js.map +1 -0
  304. package/dist/components/ui/radio-group.d.ts +8 -0
  305. package/dist/components/ui/radio-group.d.ts.map +1 -0
  306. package/dist/components/ui/radio-group.js +18 -0
  307. package/dist/components/ui/radio-group.js.map +1 -0
  308. package/dist/components/ui/rating.d.ts +14 -0
  309. package/dist/components/ui/rating.d.ts.map +1 -0
  310. package/dist/components/ui/rating.js +61 -0
  311. package/dist/components/ui/rating.js.map +1 -0
  312. package/dist/components/ui/save-status.d.ts +8 -0
  313. package/dist/components/ui/save-status.d.ts.map +1 -0
  314. package/dist/components/ui/save-status.js +31 -0
  315. package/dist/components/ui/save-status.js.map +1 -0
  316. package/dist/components/ui/segmented.d.ts +21 -0
  317. package/dist/components/ui/segmented.d.ts.map +1 -0
  318. package/dist/components/ui/segmented.js +12 -0
  319. package/dist/components/ui/segmented.js.map +1 -0
  320. package/dist/components/ui/select-menu.d.ts +12 -0
  321. package/dist/components/ui/select-menu.d.ts.map +1 -0
  322. package/dist/components/ui/select-menu.js +10 -0
  323. package/dist/components/ui/select-menu.js.map +1 -0
  324. package/dist/components/ui/select.d.ts +16 -0
  325. package/dist/components/ui/select.d.ts.map +1 -0
  326. package/dist/components/ui/select.js +45 -0
  327. package/dist/components/ui/select.js.map +1 -0
  328. package/dist/components/ui/selection-bar.d.ts +12 -0
  329. package/dist/components/ui/selection-bar.d.ts.map +1 -0
  330. package/dist/components/ui/selection-bar.js +15 -0
  331. package/dist/components/ui/selection-bar.js.map +1 -0
  332. package/dist/components/ui/separator.d.ts +4 -0
  333. package/dist/components/ui/separator.d.ts.map +1 -0
  334. package/dist/components/ui/separator.js +12 -0
  335. package/dist/components/ui/separator.js.map +1 -0
  336. package/dist/components/ui/settings-layout.d.ts +34 -0
  337. package/dist/components/ui/settings-layout.d.ts.map +1 -0
  338. package/dist/components/ui/settings-layout.js +16 -0
  339. package/dist/components/ui/settings-layout.js.map +1 -0
  340. package/dist/components/ui/share-link.d.ts +14 -0
  341. package/dist/components/ui/share-link.d.ts.map +1 -0
  342. package/dist/components/ui/share-link.js +16 -0
  343. package/dist/components/ui/share-link.js.map +1 -0
  344. package/dist/components/ui/sheet.d.ts +21 -0
  345. package/dist/components/ui/sheet.d.ts.map +1 -0
  346. package/dist/components/ui/sheet.js +53 -0
  347. package/dist/components/ui/sheet.js.map +1 -0
  348. package/dist/components/ui/sidebar.d.ts +82 -0
  349. package/dist/components/ui/sidebar.d.ts.map +1 -0
  350. package/dist/components/ui/sidebar.js +258 -0
  351. package/dist/components/ui/sidebar.js.map +1 -0
  352. package/dist/components/ui/skeleton.d.ts +8 -0
  353. package/dist/components/ui/skeleton.d.ts.map +1 -0
  354. package/dist/components/ui/skeleton.js +15 -0
  355. package/dist/components/ui/skeleton.js.map +1 -0
  356. package/dist/components/ui/spinner.d.ts +12 -0
  357. package/dist/components/ui/spinner.d.ts.map +1 -0
  358. package/dist/components/ui/spinner.js +14 -0
  359. package/dist/components/ui/spinner.js.map +1 -0
  360. package/dist/components/ui/spotlight.d.ts +23 -0
  361. package/dist/components/ui/spotlight.d.ts.map +1 -0
  362. package/dist/components/ui/spotlight.js +110 -0
  363. package/dist/components/ui/spotlight.js.map +1 -0
  364. package/dist/components/ui/stat-tile.d.ts +8 -0
  365. package/dist/components/ui/stat-tile.d.ts.map +1 -0
  366. package/dist/components/ui/stat-tile.js +9 -0
  367. package/dist/components/ui/stat-tile.js.map +1 -0
  368. package/dist/components/ui/step-dialog.d.ts +20 -0
  369. package/dist/components/ui/step-dialog.d.ts.map +1 -0
  370. package/dist/components/ui/step-dialog.js +36 -0
  371. package/dist/components/ui/step-dialog.js.map +1 -0
  372. package/dist/components/ui/steps-layout.d.ts +20 -0
  373. package/dist/components/ui/steps-layout.d.ts.map +1 -0
  374. package/dist/components/ui/steps-layout.js +26 -0
  375. package/dist/components/ui/steps-layout.js.map +1 -0
  376. package/dist/components/ui/switch.d.ts +8 -0
  377. package/dist/components/ui/switch.d.ts.map +1 -0
  378. package/dist/components/ui/switch.js +21 -0
  379. package/dist/components/ui/switch.js.map +1 -0
  380. package/dist/components/ui/table.d.ts +16 -0
  381. package/dist/components/ui/table.d.ts.map +1 -0
  382. package/dist/components/ui/table.js +76 -0
  383. package/dist/components/ui/table.js.map +1 -0
  384. package/dist/components/ui/tabs.d.ts +7 -0
  385. package/dist/components/ui/tabs.d.ts.map +1 -0
  386. package/dist/components/ui/tabs.js +19 -0
  387. package/dist/components/ui/tabs.js.map +1 -0
  388. package/dist/components/ui/theme-toggle.d.ts +16 -0
  389. package/dist/components/ui/theme-toggle.d.ts.map +1 -0
  390. package/dist/components/ui/theme-toggle.js +65 -0
  391. package/dist/components/ui/theme-toggle.js.map +1 -0
  392. package/dist/components/ui/time-list.d.ts +16 -0
  393. package/dist/components/ui/time-list.d.ts.map +1 -0
  394. package/dist/components/ui/time-list.js +49 -0
  395. package/dist/components/ui/time-list.js.map +1 -0
  396. package/dist/components/ui/time-picker.d.ts +47 -0
  397. package/dist/components/ui/time-picker.d.ts.map +1 -0
  398. package/dist/components/ui/time-picker.js +141 -0
  399. package/dist/components/ui/time-picker.js.map +1 -0
  400. package/dist/components/ui/toast.d.ts +18 -0
  401. package/dist/components/ui/toast.d.ts.map +1 -0
  402. package/dist/components/ui/toast.js +77 -0
  403. package/dist/components/ui/toast.js.map +1 -0
  404. package/dist/components/ui/toggle.d.ts +15 -0
  405. package/dist/components/ui/toggle.d.ts.map +1 -0
  406. package/dist/components/ui/toggle.js +55 -0
  407. package/dist/components/ui/toggle.js.map +1 -0
  408. package/dist/components/ui/tooltip.d.ts +15 -0
  409. package/dist/components/ui/tooltip.d.ts.map +1 -0
  410. package/dist/components/ui/tooltip.js +32 -0
  411. package/dist/components/ui/tooltip.js.map +1 -0
  412. package/dist/components/ui/top-bar.d.ts +25 -0
  413. package/dist/components/ui/top-bar.d.ts.map +1 -0
  414. package/dist/components/ui/top-bar.js +23 -0
  415. package/dist/components/ui/top-bar.js.map +1 -0
  416. package/dist/components/ui/typography.d.ts +40 -0
  417. package/dist/components/ui/typography.d.ts.map +1 -0
  418. package/dist/components/ui/typography.js +98 -0
  419. package/dist/components/ui/typography.js.map +1 -0
  420. package/dist/components/ui/video-block.d.ts +14 -0
  421. package/dist/components/ui/video-block.d.ts.map +1 -0
  422. package/dist/components/ui/video-block.js +22 -0
  423. package/dist/components/ui/video-block.js.map +1 -0
  424. package/dist/hooks/use-dismiss.d.ts +5 -0
  425. package/dist/hooks/use-dismiss.d.ts.map +1 -0
  426. package/dist/hooks/use-dismiss.js +23 -0
  427. package/dist/hooks/use-dismiss.js.map +1 -0
  428. package/dist/hooks/use-escape-first.d.ts +3 -0
  429. package/dist/hooks/use-escape-first.d.ts.map +1 -0
  430. package/dist/hooks/use-escape-first.js +27 -0
  431. package/dist/hooks/use-escape-first.js.map +1 -0
  432. package/dist/hooks/use-media-query.d.ts +5 -0
  433. package/dist/hooks/use-media-query.d.ts.map +1 -0
  434. package/dist/hooks/use-media-query.js +16 -0
  435. package/dist/hooks/use-media-query.js.map +1 -0
  436. package/dist/hooks/use-save-queue.d.ts +13 -0
  437. package/dist/hooks/use-save-queue.d.ts.map +1 -0
  438. package/dist/hooks/use-save-queue.js +57 -0
  439. package/dist/hooks/use-save-queue.js.map +1 -0
  440. package/dist/hooks/use-selection.d.ts +10 -0
  441. package/dist/hooks/use-selection.d.ts.map +1 -0
  442. package/dist/hooks/use-selection.js +52 -0
  443. package/dist/hooks/use-selection.js.map +1 -0
  444. package/dist/hooks/use-shared-transition.d.ts +3 -0
  445. package/dist/hooks/use-shared-transition.d.ts.map +1 -0
  446. package/dist/hooks/use-shared-transition.js +38 -0
  447. package/dist/hooks/use-shared-transition.js.map +1 -0
  448. package/dist/hooks/use-upload-queue.d.ts +22 -0
  449. package/dist/hooks/use-upload-queue.d.ts.map +1 -0
  450. package/dist/hooks/use-upload-queue.js +78 -0
  451. package/dist/hooks/use-upload-queue.js.map +1 -0
  452. package/dist/lib/accent.d.ts +5 -0
  453. package/dist/lib/accent.d.ts.map +1 -0
  454. package/dist/lib/accent.js +10 -0
  455. package/dist/lib/accent.js.map +1 -0
  456. package/dist/lib/bento.d.ts +17 -0
  457. package/dist/lib/bento.d.ts.map +1 -0
  458. package/dist/lib/bento.js +92 -0
  459. package/dist/lib/bento.js.map +1 -0
  460. package/dist/lib/database.d.ts +92 -0
  461. package/dist/lib/database.d.ts.map +1 -0
  462. package/dist/lib/database.js +272 -0
  463. package/dist/lib/database.js.map +1 -0
  464. package/dist/lib/dates.d.ts +30 -0
  465. package/dist/lib/dates.d.ts.map +1 -0
  466. package/dist/lib/dates.js +61 -0
  467. package/dist/lib/dates.js.map +1 -0
  468. package/dist/lib/document.d.ts +79 -0
  469. package/dist/lib/document.d.ts.map +1 -0
  470. package/dist/lib/document.js +11 -0
  471. package/dist/lib/document.js.map +1 -0
  472. package/dist/lib/embed.d.ts +14 -0
  473. package/dist/lib/embed.d.ts.map +1 -0
  474. package/dist/lib/embed.js +63 -0
  475. package/dist/lib/embed.js.map +1 -0
  476. package/dist/lib/files.d.ts +23 -0
  477. package/dist/lib/files.d.ts.map +1 -0
  478. package/dist/lib/files.js +69 -0
  479. package/dist/lib/files.js.map +1 -0
  480. package/dist/lib/justified.d.ts +50 -0
  481. package/dist/lib/justified.d.ts.map +1 -0
  482. package/dist/lib/justified.js +78 -0
  483. package/dist/lib/justified.js.map +1 -0
  484. package/dist/lib/keys.d.ts +18 -0
  485. package/dist/lib/keys.d.ts.map +1 -0
  486. package/dist/lib/keys.js +66 -0
  487. package/dist/lib/keys.js.map +1 -0
  488. package/dist/lib/number.d.ts +4 -0
  489. package/dist/lib/number.d.ts.map +1 -0
  490. package/dist/lib/number.js +33 -0
  491. package/dist/lib/number.js.map +1 -0
  492. package/dist/lib/pointer.d.ts +2 -0
  493. package/dist/lib/pointer.d.ts.map +1 -0
  494. package/dist/lib/pointer.js +4 -0
  495. package/dist/lib/pointer.js.map +1 -0
  496. package/dist/lib/prepare-image.d.ts +43 -0
  497. package/dist/lib/prepare-image.d.ts.map +1 -0
  498. package/dist/lib/prepare-image.js +105 -0
  499. package/dist/lib/prepare-image.js.map +1 -0
  500. package/dist/lib/rich-text-dom.d.ts +16 -0
  501. package/dist/lib/rich-text-dom.d.ts.map +1 -0
  502. package/dist/lib/rich-text-dom.js +145 -0
  503. package/dist/lib/rich-text-dom.js.map +1 -0
  504. package/dist/lib/rich-text.d.ts +15 -0
  505. package/dist/lib/rich-text.d.ts.map +1 -0
  506. package/dist/lib/rich-text.js +35 -0
  507. package/dist/lib/rich-text.js.map +1 -0
  508. package/dist/lib/spotlight.d.ts +22 -0
  509. package/dist/lib/spotlight.d.ts.map +1 -0
  510. package/dist/lib/spotlight.js +66 -0
  511. package/dist/lib/spotlight.js.map +1 -0
  512. package/dist/lib/theme.d.ts +6 -0
  513. package/dist/lib/theme.d.ts.map +1 -0
  514. package/dist/lib/theme.js +15 -0
  515. package/dist/lib/theme.js.map +1 -0
  516. package/dist/lib/time.d.ts +19 -0
  517. package/dist/lib/time.d.ts.map +1 -0
  518. package/dist/lib/time.js +91 -0
  519. package/dist/lib/time.js.map +1 -0
  520. package/dist/lib/tree.d.ts +17 -0
  521. package/dist/lib/tree.d.ts.map +1 -0
  522. package/dist/lib/tree.js +35 -0
  523. package/dist/lib/tree.js.map +1 -0
  524. package/dist/lib/utils.d.ts +3 -0
  525. package/dist/lib/utils.d.ts.map +1 -0
  526. package/dist/lib/utils.js +24 -0
  527. package/dist/lib/utils.js.map +1 -0
  528. package/dist/styles/notion.css +817 -0
  529. package/package.json +129 -5
  530. package/src/components/editor/block-text.tsx +271 -0
  531. package/src/components/editor/blocks.tsx +373 -0
  532. package/src/components/editor/document-editor.tsx +106 -0
  533. package/src/components/editor/document-view.tsx +205 -0
  534. package/src/components/editor/editor-state.tsx +298 -0
  535. package/src/components/editor/extensions/kit-blocks.tsx +452 -0
  536. package/src/components/editor/extensions/spoiler.tsx +81 -0
  537. package/src/components/editor/index.ts +10 -0
  538. package/src/components/editor/kinds.ts +158 -0
  539. package/src/components/editor/look.tsx +36 -0
  540. package/src/components/sketch/rough.tsx +90 -0
  541. package/src/components/three/model-viewer.tsx +514 -0
  542. package/src/components/ui/accent-picker.tsx +72 -0
  543. package/src/components/ui/address-field.tsx +57 -0
  544. package/src/components/ui/alert-dialog.tsx +136 -0
  545. package/src/components/ui/animated-height.tsx +34 -0
  546. package/src/components/ui/app-shell.tsx +140 -0
  547. package/src/components/ui/avatar.tsx +106 -0
  548. package/src/components/ui/badge.tsx +81 -0
  549. package/src/components/ui/banner.tsx +53 -0
  550. package/src/components/ui/breadcrumbs.tsx +25 -0
  551. package/src/components/ui/button.tsx +147 -0
  552. package/src/components/ui/calendar.tsx +101 -0
  553. package/src/components/ui/callout.tsx +61 -0
  554. package/src/components/ui/card.tsx +59 -0
  555. package/src/components/ui/checkbox.tsx +66 -0
  556. package/src/components/ui/choice-label.tsx +43 -0
  557. package/src/components/ui/collapsible.tsx +58 -0
  558. package/src/components/ui/collection-layout.tsx +69 -0
  559. package/src/components/ui/combobox.tsx +155 -0
  560. package/src/components/ui/command-menu.tsx +102 -0
  561. package/src/components/ui/context-menu.tsx +89 -0
  562. package/src/components/ui/copy-button.tsx +80 -0
  563. package/src/components/ui/database/calendar-view.tsx +180 -0
  564. package/src/components/ui/database/card-views.tsx +221 -0
  565. package/src/components/ui/database/cells.tsx +237 -0
  566. package/src/components/ui/database/database.tsx +279 -0
  567. package/src/components/ui/database/icons.ts +15 -0
  568. package/src/components/ui/database/table-view.tsx +311 -0
  569. package/src/components/ui/date-picker.tsx +208 -0
  570. package/src/components/ui/date-time-picker.tsx +123 -0
  571. package/src/components/ui/dialog.tsx +151 -0
  572. package/src/components/ui/document-layout.tsx +52 -0
  573. package/src/components/ui/dropdown-menu.tsx +185 -0
  574. package/src/components/ui/editable-text.tsx +142 -0
  575. package/src/components/ui/empty-state.tsx +35 -0
  576. package/src/components/ui/error-state.tsx +67 -0
  577. package/src/components/ui/field-button.tsx +70 -0
  578. package/src/components/ui/file-preview.tsx +80 -0
  579. package/src/components/ui/file-uploader.tsx +375 -0
  580. package/src/components/ui/filter-builder.tsx +304 -0
  581. package/src/components/ui/focus-shell.tsx +48 -0
  582. package/src/components/ui/handle-row.tsx +252 -0
  583. package/src/components/ui/header-bar.tsx +15 -0
  584. package/src/components/ui/hover-card.tsx +30 -0
  585. package/src/components/ui/image-block.tsx +238 -0
  586. package/src/components/ui/image-card.tsx +95 -0
  587. package/src/components/ui/image-framer.tsx +160 -0
  588. package/src/components/ui/image-viewer.tsx +230 -0
  589. package/src/components/ui/image.tsx +200 -0
  590. package/src/components/ui/index.ts +178 -0
  591. package/src/components/ui/input.tsx +471 -0
  592. package/src/components/ui/link-block.tsx +85 -0
  593. package/src/components/ui/list-detail.tsx +115 -0
  594. package/src/components/ui/listbox.ts +26 -0
  595. package/src/components/ui/mac-card.tsx +46 -0
  596. package/src/components/ui/month-picker.tsx +119 -0
  597. package/src/components/ui/multi-select.tsx +221 -0
  598. package/src/components/ui/nav-tree.tsx +92 -0
  599. package/src/components/ui/page.tsx +73 -0
  600. package/src/components/ui/pagination.tsx +143 -0
  601. package/src/components/ui/picker-panel.tsx +69 -0
  602. package/src/components/ui/popover.tsx +42 -0
  603. package/src/components/ui/progress.tsx +76 -0
  604. package/src/components/ui/property.tsx +33 -0
  605. package/src/components/ui/radio-group.tsx +61 -0
  606. package/src/components/ui/rating.tsx +122 -0
  607. package/src/components/ui/save-status.tsx +53 -0
  608. package/src/components/ui/segmented.tsx +74 -0
  609. package/src/components/ui/select-menu.tsx +54 -0
  610. package/src/components/ui/select.tsx +147 -0
  611. package/src/components/ui/selection-bar.tsx +50 -0
  612. package/src/components/ui/separator.tsx +30 -0
  613. package/src/components/ui/settings-layout.tsx +117 -0
  614. package/src/components/ui/share-link.tsx +66 -0
  615. package/src/components/ui/sheet.tsx +90 -0
  616. package/src/components/ui/sidebar.tsx +627 -0
  617. package/src/components/ui/skeleton.tsx +22 -0
  618. package/src/components/ui/spinner.tsx +28 -0
  619. package/src/components/ui/spotlight.tsx +222 -0
  620. package/src/components/ui/stat-tile.tsx +25 -0
  621. package/src/components/ui/step-dialog.tsx +104 -0
  622. package/src/components/ui/steps-layout.tsx +91 -0
  623. package/src/components/ui/switch.tsx +55 -0
  624. package/src/components/ui/table.tsx +99 -0
  625. package/src/components/ui/tabs.tsx +41 -0
  626. package/src/components/ui/theme-toggle.tsx +80 -0
  627. package/src/components/ui/time-list.tsx +106 -0
  628. package/src/components/ui/time-picker.tsx +344 -0
  629. package/src/components/ui/toast.tsx +132 -0
  630. package/src/components/ui/toggle.tsx +76 -0
  631. package/src/components/ui/tooltip.tsx +78 -0
  632. package/src/components/ui/top-bar.tsx +118 -0
  633. package/src/components/ui/typography.tsx +204 -0
  634. package/src/components/ui/video-block.tsx +66 -0
  635. package/src/hooks/use-dismiss.ts +24 -0
  636. package/src/hooks/use-escape-first.ts +25 -0
  637. package/src/hooks/use-media-query.ts +23 -0
  638. package/src/hooks/use-save-queue.ts +78 -0
  639. package/src/hooks/use-selection.ts +51 -0
  640. package/src/hooks/use-shared-transition.ts +40 -0
  641. package/src/hooks/use-upload-queue.ts +111 -0
  642. package/src/lib/accent.ts +11 -0
  643. package/src/lib/bento.ts +87 -0
  644. package/src/lib/database.ts +322 -0
  645. package/src/lib/dates.ts +75 -0
  646. package/src/lib/document.ts +55 -0
  647. package/src/lib/embed.ts +62 -0
  648. package/src/lib/files.ts +73 -0
  649. package/src/lib/justified.ts +106 -0
  650. package/src/lib/keys.ts +72 -0
  651. package/src/lib/number.ts +29 -0
  652. package/src/lib/pointer.ts +3 -0
  653. package/src/lib/prepare-image.ts +141 -0
  654. package/src/lib/rich-text-dom.ts +138 -0
  655. package/src/lib/rich-text.ts +50 -0
  656. package/src/lib/spotlight.ts +78 -0
  657. package/src/lib/theme.ts +18 -0
  658. package/src/lib/time.ts +83 -0
  659. package/src/lib/tree.ts +41 -0
  660. package/src/lib/utils.ts +25 -0
  661. package/src/styles/notion.css +817 -0
@@ -0,0 +1,141 @@
1
+ "use client";
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as PopoverPrimitive from "@radix-ui/react-popover";
4
+ import { Clock, X } from "lucide-react";
5
+ import { useEffect, useId, useRef, useState } from "react";
6
+ import { useMediaQuery } from "../../hooks/use-media-query.js";
7
+ import { isTime } from "../../lib/dates.js";
8
+ import { formatTime, localHourCycle, minutesOf, nearest, parseTime, timesEvery } from "../../lib/time.js";
9
+ import { cn } from "../../lib/utils.js";
10
+ import { FieldButton } from "./field-button.js";
11
+ import { Input } from "./input.js";
12
+ import { PickerPanel } from "./picker-panel.js";
13
+ import { TimeList } from "./time-list.js";
14
+ import { useEscapeFirst } from "../../hooks/use-escape-first.js";
15
+ export function TimePicker(props) {
16
+ // A mouse or trackpad types; a finger presses. Decided as the device says, live.
17
+ const fine = useMediaQuery("(pointer: fine)");
18
+ return (_jsxs(_Fragment, { children: [fine ? _jsx(TypedTime, { ...props }) : _jsx(PressedTime, { ...props }), props.name !== undefined && _jsx("input", { type: "hidden", name: props.name, value: isTime(props.value) ? props.value : "" })] }));
19
+ }
20
+ function TypedTime({ value, onChange, minuteStep = 15, hourCycle, relativeTo, clearable = true, placeholder = "Pick a time", size, disabled, invalid, id, className,
21
+ // Sent by the hidden field TimePicker draws, never by the visible one.
22
+ name: _name, ...aria }) {
23
+ const cycle = hourCycle ?? localHourCycle();
24
+ const time = isTime(value) ? value : null;
25
+ const shown = time === null ? "" : formatTime(time, cycle);
26
+ const [text, setText] = useState(shown);
27
+ const [open, setOpen] = useState(false);
28
+ const [active, setActive] = useState(null);
29
+ const field = useRef(null);
30
+ const listId = useId();
31
+ const times = timesEvery(minuteStep, { after: relativeTo, include: time });
32
+ // Follow the value while it is not being typed in.
33
+ useEffect(() => {
34
+ if (document.activeElement !== field.current)
35
+ setText(shown);
36
+ }, [shown]);
37
+ const commit = (next) => {
38
+ setOpen(false);
39
+ setActive(null);
40
+ if (next === null) {
41
+ setText(shown);
42
+ return;
43
+ }
44
+ setText(formatTime(next, cycle));
45
+ if (next !== time)
46
+ onChange(next);
47
+ };
48
+ // Escape closes the list and nothing else, before a dialog around it hears it.
49
+ useEscapeFirst(open, field, () => {
50
+ setOpen(false);
51
+ setText(shown);
52
+ });
53
+ return (_jsxs(PopoverPrimitive.Root, { open: open && !disabled, children: [_jsx(PopoverPrimitive.Anchor, { asChild: true, children: _jsx("div", { className: cn("w-full min-w-0", className), children: _jsx(Input, { ref: field, id: id, size: size, role: "combobox", "aria-expanded": open, "aria-controls": open ? listId : undefined, "aria-autocomplete": "list", "aria-activedescendant": open && active ? `${listId}-${active.replace(":", "")}` : undefined, "aria-invalid": invalid || undefined, autoComplete: "off", disabled: disabled, placeholder: placeholder, value: text, start: _jsx(Clock, { "aria-hidden": true }), end: clearable && time !== null && !disabled ? (_jsx("button", { type: "button", "aria-label": "Clear the time", onClick: () => {
54
+ onChange(null);
55
+ setText("");
56
+ field.current?.focus();
57
+ }, className: "flex justify-center items-center hover:bg-tint-active -mr-1 rounded-small size-5 text-ink-tertiary hover:text-ink [&_svg]:size-3.5", children: _jsx(X, {}) })) : undefined, onFocus: (e) => {
58
+ e.currentTarget.select();
59
+ setOpen(true);
60
+ setActive(time ?? nearest(times, relativeTo) ?? null);
61
+ }, onChange: (e) => {
62
+ setText(e.target.value);
63
+ setOpen(true);
64
+ const typed = parseTime(e.target.value);
65
+ if (typed)
66
+ setActive(times.includes(typed) ? typed : (nearest(times, typed) ?? null));
67
+ }, onBlur: () => {
68
+ if (text.trim() === "") {
69
+ // Emptied: that clears it, if it may be cleared; otherwise the time stays.
70
+ setOpen(false);
71
+ if (clearable) {
72
+ if (time !== null)
73
+ onChange(null);
74
+ setText("");
75
+ }
76
+ else
77
+ setText(shown);
78
+ return;
79
+ }
80
+ // A time is kept; anything else is put back as it was.
81
+ commit(parseTime(text));
82
+ }, onKeyDown: (e) => {
83
+ if (e.key === "ArrowDown" || e.key === "ArrowUp") {
84
+ e.preventDefault();
85
+ setOpen(true);
86
+ const at = active ? times.indexOf(active) : -1;
87
+ const next = e.key === "ArrowDown" ? Math.min(times.length - 1, at + 1) : Math.max(0, at === -1 ? times.length - 1 : at - 1);
88
+ setActive(times[next]);
89
+ setText(formatTime(times[next], cycle));
90
+ }
91
+ else if (e.key === "Enter") {
92
+ const typed = parseTime(text);
93
+ if (open || typed) {
94
+ e.preventDefault();
95
+ commit(typed ?? active);
96
+ }
97
+ }
98
+ }, ...aria }) }) }), _jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { onOpenAutoFocus: (e) => e.preventDefault(), onCloseAutoFocus: (e) => e.preventDefault(), onInteractOutside: (e) => {
99
+ if (e.target instanceof Node && field.current?.parentElement?.contains(e.target))
100
+ e.preventDefault();
101
+ }, align: "start", sideOffset: 4, collisionPadding: 8, className: "z-(--z-overlay) bg-surface-overlay shadow-popover rounded-surface outline-none w-(--radix-popper-anchor-width) min-w-44 animate-slide-in", children: _jsx(TimeList, { id: listId, mode: "active", value: time, active: active, onActive: setActive, onChange: (t) => commit(t), step: minuteStep, hourCycle: cycle, relativeTo: relativeTo, className: "h-56" }) }) })] }));
102
+ }
103
+ function PressedTime({ value, onChange, minuteStep = 15, hourCycle, relativeTo, clearable = true, placeholder = "Pick a time", size, disabled, invalid, id, className,
104
+ // Sent by the hidden field TimePicker draws, never by the visible one.
105
+ name: _name, ...aria }) {
106
+ const [open, setOpen] = useState(false);
107
+ const cycle = hourCycle ?? localHourCycle();
108
+ const time = isTime(value) ? value : null;
109
+ return (_jsx(PickerPanel, { open: open, onOpenChange: setOpen, title: aria["aria-label"] ?? "Pick a time",
110
+ // The list takes focus on the chosen time, so the arrows start there.
111
+ onOpenAutoFocus: (e) => {
112
+ e.preventDefault();
113
+ e.currentTarget.querySelector('[role=option][tabindex="0"]')?.focus({ preventScroll: true });
114
+ }, trigger: _jsx(FieldButton, { icon: Clock, id: id, size: size, disabled: disabled, invalid: invalid, placeholder: placeholder, onClear: clearable ? () => onChange(null) : undefined, clearLabel: "Clear the time", className: className, ...aria, children: time === null ? null : _jsx("span", { className: "tabular-nums", children: formatTime(time, cycle) }) }), children: _jsx(TimeList, { value: time, onChange: (t) => {
115
+ onChange(t);
116
+ setOpen(false);
117
+ }, step: minuteStep, hourCycle: cycle, relativeTo: relativeTo, label: aria["aria-label"] ?? "Times", className: "max-sm:w-full max-sm:h-[min(24rem,60dvh)]" }) }));
118
+ }
119
+ /* A start and an end time, in two fields: the end's list starts after the start
120
+ and gives each time's length. Moving the start moves the end with it, keeping
121
+ the length, as a calendar does. */
122
+ export function TimeRangePicker({ value, onChange, minuteStep = 15, hourCycle, names, className, labels = { from: "Start time", to: "End time" }, }) {
123
+ return (_jsxs("div", { className: cn("flex items-center gap-2", className), children: [_jsx(TimePicker
124
+ // Two fields share the row: each may shrink below an input's natural width.
125
+ , {
126
+ // Two fields share the row: each may shrink below an input's natural width.
127
+ className: "flex-1 min-w-0", "aria-label": labels.from, placeholder: "Start", value: value.from, minuteStep: minuteStep, hourCycle: hourCycle, name: names?.from, onChange: (from) => {
128
+ if (from && value.from && value.to) {
129
+ const length = minutesOf(value.to) - minutesOf(value.from);
130
+ const end = minutesOf(from) + length;
131
+ if (length > 0 && end < 24 * 60)
132
+ return onChange({ from, to: `${String(Math.floor(end / 60)).padStart(2, "0")}:${String(end % 60).padStart(2, "0")}` });
133
+ }
134
+ onChange({ from, to: value.to && from && minutesOf(value.to) <= minutesOf(from) ? null : value.to });
135
+ } }), _jsx("span", { "aria-hidden": true, className: "text-ink-tertiary", children: "\u2013" }), _jsx(TimePicker
136
+ // Two fields share the row: each may shrink below an input's natural width.
137
+ , {
138
+ // Two fields share the row: each may shrink below an input's natural width.
139
+ className: "flex-1 min-w-0", "aria-label": labels.to, placeholder: "End", value: value.to, relativeTo: value.from, minuteStep: minuteStep, hourCycle: hourCycle, name: names?.to, onChange: (to) => onChange({ ...value, to }) })] }));
140
+ }
141
+ //# sourceMappingURL=time-picker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-picker.js","sourceRoot":"","sources":["../../../src/components/ui/time-picker.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,SAAS,EAAE,UAAU,EAAkB,MAAM,mBAAmB,CAAC;AAC1H,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAoB,CAAC;AACjD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAa,CAAC;AACpC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAoB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAiB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAyCjE,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC7C,iFAAiF;IACjF,MAAM,IAAI,GAAG,aAAa,CAAC,iBAAiB,CAAC,CAAC;IAC9C,OAAO,CACH,8BACK,IAAI,CAAC,CAAC,CAAC,KAAC,SAAS,OAAK,KAAK,GAAI,CAAC,CAAC,CAAC,KAAC,WAAW,OAAK,KAAK,GAAI,EAC5D,KAAK,CAAC,IAAI,KAAK,SAAS,IAAI,gBAAO,IAAI,EAAC,QAA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AM,GAAG,CAAC,IAAI,GAAG,GAAG,EAAE,GAAG,EAAE;4BAAE,OAAO,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC;oBAC5J,CAAC;oBACD,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,KAAK,CAAC,EAAE,IAAI,IAAI,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,CAAC;gBACzG,CAAC,GACH,EACF,oCAAkB,SAAS,EAAC,mBAAmB,uBAExC,EACP,KAAC,UAAU;YACP,4EAA4E;;gBAA5E,4EAA4E;gBAC5E,SAAS,EAAC,gBAAgB,gBACd,MAAM,CAAC,EAAE,EACrB,WAAW,EAAC,KAAK,EACjB,KAAK,EAAE,KAAK,CAAC,EAAE,EACf,UAAU,EAAE,KAAK,CAAC,IAAI,EACtB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,KAAK,EAAE,EAAE,EACf,QAAQ,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,GAC9C,IACA,CACT,CAAC;AACN,CAAC"}
@@ -0,0 +1,18 @@
1
+ import { type ReactNode } from "react";
2
+ export type ToastTone = "done" | "info" | "error";
3
+ export type Toast = {
4
+ message: ReactNode;
5
+ tone?: ToastTone;
6
+ action?: {
7
+ label: string;
8
+ onAction: () => void;
9
+ };
10
+ /** How long it stays, in ms. 6s, or 10s when it has an action to reach. */
11
+ duration?: number;
12
+ };
13
+ /** Says, briefly and out of the way, that something happened. Needs a ToastProvider above. */
14
+ export declare const useToast: () => (toast: Toast) => void;
15
+ export declare function ToastProvider({ children }: {
16
+ children: ReactNode;
17
+ }): import("react").JSX.Element;
18
+ //# sourceMappingURL=toast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast.d.ts","sourceRoot":"","sources":["../../../src/components/ui/toast.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAI5G,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAClD,MAAM,MAAM,KAAK,GAAG;IAChB,OAAO,EAAE,SAAS,CAAC;IACnB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,MAAM,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC;IACjD,2EAA2E;IAC3E,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAIF,8FAA8F;AAC9F,eAAO,MAAM,QAAQ,gBAHa,KAAK,KAAK,IAGC,CAAC;AAqB9C,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BA2FlE"}
@@ -0,0 +1,77 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Check, Info, TriangleAlert, X } from "lucide-react";
4
+ import { createContext, useCallback, useContext, useEffect, useRef, useState } from "react";
5
+ import { cn } from "../../lib/utils.js";
6
+ import { Button } from "./button.js";
7
+ const Ctx = createContext(() => { });
8
+ /** Says, briefly and out of the way, that something happened. Needs a ToastProvider above. */
9
+ export const useToast = () => useContext(Ctx);
10
+ const SHOWN_MS = 6000;
11
+ const WITH_ACTION_MS = 10000;
12
+ const TONES = {
13
+ done: { icon: Check, className: "bg-tag-green-bg text-tag-green-ink" },
14
+ info: { icon: Info, className: "bg-tag-blue-bg text-tag-blue-ink" },
15
+ error: { icon: TriangleAlert, className: "bg-tag-red-bg text-tag-red-ink" },
16
+ };
17
+ /* One toast at a time, at the bottom of the window. A newer one replaces the one
18
+ showing. It leaves by itself; hovering or focusing it holds it, and its action or
19
+ its cross dismisses it. For telling what just happened, never for something that
20
+ needs an answer: that is a dialog.
21
+
22
+ A toast is at the far end of the page, out of a keyboard's easy reach, so F8
23
+ moves focus to it (as Radix's toasts do), Escape there dismisses it, and one
24
+ with an action stays 10 seconds rather than 6.
25
+
26
+ From endgame, 2026-12-05, with tones added. */
27
+ export function ToastProvider({ children }) {
28
+ const [toast, setToast] = useState(null);
29
+ const [held, setHeld] = useState(false);
30
+ const next = useRef(0);
31
+ const box = useRef(null);
32
+ // Where focus was before F8 took it to the toast, to go back to.
33
+ const returnTo = useRef(null);
34
+ const show = useCallback((t) => setToast({ ...t, id: ++next.current }), []);
35
+ // Gone by its cross, its action or Escape: a toast that leaves never hears the
36
+ // pointer leave or the focus go, so `held` is let go of here, or every later
37
+ // toast would stay up. Focus taken to it by F8 goes back where it came from.
38
+ const dismiss = useCallback(() => {
39
+ const hadFocus = box.current?.contains(document.activeElement) ?? false;
40
+ setToast(null);
41
+ setHeld(false);
42
+ if (hadFocus) {
43
+ returnTo.current?.focus?.();
44
+ returnTo.current = null;
45
+ }
46
+ }, []);
47
+ useEffect(() => {
48
+ if (!toast || held)
49
+ return;
50
+ const timer = setTimeout(() => setToast(null), toast.duration ?? (toast.action ? WITH_ACTION_MS : SHOWN_MS));
51
+ return () => clearTimeout(timer);
52
+ }, [toast, held]);
53
+ useEffect(() => {
54
+ if (!toast)
55
+ return;
56
+ const onKey = (e) => {
57
+ if (e.key === "F8") {
58
+ e.preventDefault();
59
+ if (!box.current?.contains(document.activeElement))
60
+ returnTo.current = document.activeElement;
61
+ box.current?.querySelector("button")?.focus();
62
+ }
63
+ };
64
+ window.addEventListener("keydown", onKey);
65
+ return () => window.removeEventListener("keydown", onKey);
66
+ }, [toast]);
67
+ const tone = TONES[toast?.tone ?? "done"];
68
+ const Icon = tone.icon;
69
+ return (_jsxs(Ctx.Provider, { value: show, children: [children, _jsx("div", { role: "region", "aria-label": "Notifications (F8)", "aria-live": "polite", className: "z-(--z-toast) fixed inset-x-0 bottom-0 flex justify-center p-4 pb-[max(1rem,env(safe-area-inset-bottom))] pointer-events-none", children: toast && (_jsxs("div", { ref: box, onKeyDown: (e) => {
70
+ if (e.key === "Escape")
71
+ dismiss();
72
+ }, role: toast.tone === "error" ? "alert" : "status", onMouseEnter: () => setHeld(true), onMouseLeave: () => setHeld(false), onFocus: () => setHeld(true), onBlur: () => setHeld(false), className: "flex items-center gap-3 bg-surface-overlay shadow-popover py-2 pr-2 pl-3 rounded-overlay max-w-[min(32rem,100%)] text-sm animate-toast-in pointer-events-auto", children: [_jsx("span", { className: cn("flex justify-center items-center rounded-full size-5 shrink-0", tone.className), children: _jsx(Icon, { className: "size-3", strokeWidth: 3 }) }), _jsx("span", { className: "flex-1 min-w-0", children: toast.message }), toast.action && (_jsx(Button, { variant: "ghost", size: "sm", onClick: () => {
73
+ toast.action.onAction();
74
+ dismiss();
75
+ }, className: "font-medium text-accent-text shrink-0", children: toast.action.label })), _jsx(Button, { variant: "ghost", size: "icon-sm", "aria-label": "Dismiss", onClick: dismiss, className: "text-ink-tertiary hover:text-ink shrink-0", children: _jsx(X, {}) })] }, toast.id)) })] }));
76
+ }
77
+ //# sourceMappingURL=toast.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toast.js","sourceRoot":"","sources":["../../../src/components/ui/toast.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,aAAa,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,E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AAS,EAAC,QAAQ,EAAC,WAAW,EAAE,CAAC,GAAI,GACxC,EACP,eAAM,SAAS,EAAC,gBAAgB,YAAE,KAAK,CAAC,OAAO,GAAQ,EACtD,KAAK,CAAC,MAAM,IAAI,CACb,KAAC,MAAM,IACH,OAAO,EAAC,OAAO,EACf,IAAI,EAAC,IAAI,EACT,OAAO,EAAE,GAAG,EAAE;gCACV,KAAK,CAAC,MAAO,CAAC,QAAQ,EAAE,CAAC;gCACzB,OAAO,EAAE,CAAC;4BACd,CAAC,EACD,SAAS,EAAC,uCAAuC,YAEhD,KAAK,CAAC,MAAM,CAAC,KAAK,GACd,CACZ,EACD,KAAC,MAAM,IAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,SAAS,gBAAY,SAAS,EAAC,OAAO,EAAE,OAAO,EAAE,SAAS,EAAC,2CAA2C,YAC/H,KAAC,CAAC,KAAG,GACA,KA9BJ,KAAK,CAAC,EAAE,CA+BX,CACT,GACC,IACK,CAClB,CAAC;AACN,CAAC"}
@@ -0,0 +1,15 @@
1
+ import * as TogglePrimitive from "@radix-ui/react-toggle";
2
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
3
+ import { type VariantProps } from "class-variance-authority";
4
+ import { type ComponentProps } from "react";
5
+ declare const toggleVariants: (props?: ({
6
+ variant?: "secondary" | "ghost" | null | undefined;
7
+ size?: "md" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
8
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
+ type ToggleLook = VariantProps<typeof toggleVariants>;
10
+ /** `pressed` and `onPressedChange`, or `defaultPressed` to let it keep its own. Name an icon-only one with aria-label. */
11
+ export declare function Toggle({ className, variant, size, ...props }: ComponentProps<typeof TogglePrimitive.Root> & ToggleLook): import("react").JSX.Element;
12
+ export declare function ToggleGroup({ className, variant, size, children, ...props }: ComponentProps<typeof ToggleGroupPrimitive.Root> & ToggleLook): import("react").JSX.Element;
13
+ export declare function ToggleGroupItem({ className, variant, size, ...props }: ComponentProps<typeof ToggleGroupPrimitive.Item> & ToggleLook): import("react").JSX.Element;
14
+ export { toggleVariants };
15
+ //# sourceMappingURL=toggle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle.d.ts","sourceRoot":"","sources":["../../../src/components/ui/toggle.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAA6B,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAYvE,QAAA,MAAM,cAAc;;;8EA4BnB,CAAC;AAEF,KAAK,UAAU,GAAG,YAAY,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,0HAA0H;AAC1H,wBAAgB,MAAM,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,GAAG,UAAU,+BAEtH;AAID,wBAAgB,WAAW,CAAC,EACxB,SAAS,EACT,OAAO,EACP,IAAI,EACJ,QAAQ,EACR,GAAG,KAAK,EACX,EAAE,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,GAAG,UAAU,+BAM/D;AAED,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,GAAG,UAAU,+BAGpI;AAED,OAAO,EAAE,cAAc,EAAE,CAAC"}
@@ -0,0 +1,55 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import * as TogglePrimitive from "@radix-ui/react-toggle";
4
+ import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
5
+ import { cva } from "class-variance-authority";
6
+ import { createContext, useContext } from "react";
7
+ import { cn } from "../../lib/utils.js";
8
+ /* A button that stays pressed: Bold in a toolbar, a filter that is on. It says so
9
+ to assistive technology (aria-pressed) and looks it: the accent's tint, which
10
+ no hover state uses, so "on" never reads as "under the pointer".
11
+
12
+ For a row of them, ToggleGroup: arrow keys move between them, Tab leaves the row.
13
+ `type="multiple"` lets any number be on (Bold, Italic); `type="single"` one at
14
+ most, and none (an alignment that can be cleared). To choose exactly one of a
15
+ few, always one, use Segmented. */
16
+ const toggleVariants = cva([
17
+ "inline-flex items-center justify-center gap-1.5 shrink-0 rounded-control font-medium text-sm whitespace-nowrap select-none",
18
+ "text-ink-secondary transition-[background-color,box-shadow,color] duration-(--duration-fast) ease-out-notion",
19
+ "hover:bg-tint-hover hover:text-ink active:bg-tint-active",
20
+ "data-[state=on]:bg-accent-tint data-[state=on]:text-accent-text",
21
+ "disabled:pointer-events-none disabled:text-ink-disabled",
22
+ "[&_svg]:shrink-0 [&_svg]:pointer-events-none",
23
+ ], {
24
+ variants: {
25
+ variant: {
26
+ /** Bare until hovered or on: in a toolbar. */
27
+ ghost: "",
28
+ /** With an edge, standing alone among other controls. */
29
+ secondary: "bg-surface shadow-xs data-[state=on]:shadow-[0_0_0_1px_var(--accent)]",
30
+ },
31
+ size: {
32
+ sm: "h-control-sm px-2 [&_svg]:size-3.5",
33
+ md: "h-control-md px-2.5 [&_svg]:size-4",
34
+ lg: "h-control-lg px-3 text-body [&_svg]:size-4",
35
+ "icon-sm": "size-control-sm [&_svg]:size-3.5",
36
+ icon: "size-control-md [&_svg]:size-4",
37
+ "icon-lg": "size-control-lg [&_svg]:size-5",
38
+ },
39
+ },
40
+ defaultVariants: { variant: "ghost", size: "md" },
41
+ });
42
+ /** `pressed` and `onPressedChange`, or `defaultPressed` to let it keep its own. Name an icon-only one with aria-label. */
43
+ export function Toggle({ className, variant, size, ...props }) {
44
+ return _jsx(TogglePrimitive.Root, { className: cn(toggleVariants({ variant, size }), className), ...props });
45
+ }
46
+ const GroupLook = createContext({});
47
+ export function ToggleGroup({ className, variant, size, children, ...props }) {
48
+ return (_jsx(ToggleGroupPrimitive.Root, { className: cn("inline-flex items-center gap-0.5", className), ...props, children: _jsx(GroupLook.Provider, { value: { variant, size }, children: children }) }));
49
+ }
50
+ export function ToggleGroupItem({ className, variant, size, ...props }) {
51
+ const group = useContext(GroupLook);
52
+ return _jsx(ToggleGroupPrimitive.Item, { className: cn(toggleVariants({ variant: variant ?? group.variant, size: size ?? group.size }), className), ...props });
53
+ }
54
+ export { toggleVariants };
55
+ //# sourceMappingURL=toggle.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toggle.js","sourceRoot":"","sources":["../../../src/components/ui/toggle.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,GAAG,EAAqB,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,UAAU,EAAuB,MAAM,OAAO,CAAC;AACvE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC;;;;;;;qCAOqC;AAErC,MAAM,cAAc,GAAG,GAAG,CACtB;IACI,4HAA4H;IAC5H,8GAA8G;IAC9G,0DAA0D;IAC1D,iEAAiE;IACjE,yDAAyD;IACzD,8CAA8C;CACjD,EACD;IACI,QAAQ,EAAE;QACN,OAAO,EAAE;YACL,8CAA8C;YAC9C,KAAK,EAAE,EAAE;YACT,yDAAyD;YACzD,SAAS,EAAE,uEAAuE;SACrF;QACD,IAAI,EAAE;YACF,EAAE,EAAE,oCAAoC;YACxC,EAAE,EAAE,oCAAoC;YACxC,EAAE,EAAE,4CAA4C;YAChD,SAAS,EAAE,kCAAkC;YAC7C,IAAI,EAAE,gCAAgC;YACtC,SAAS,EAAE,gCAAgC;SAC9C;KACJ;IACD,eAAe,EAAE,EAAE,OAAO,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entPropsWithoutRef, type ReactNode } from "react";
3
+ export declare const TooltipProvider: import("react").FC<TooltipPrimitive.TooltipProviderProps>;
4
+ export declare const TooltipRoot: import("react").FC<TooltipPrimitive.TooltipProps>;
5
+ export declare const TooltipTrigger: import("react").ForwardRefExoticComponent<TooltipPrimitive.TooltipTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
6
+ export declare function TooltipContent({ className, sideOffset, ...props }: ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>): import("react").JSX.Element;
7
+ /** Convenience wrapper — the common case in one element. */
8
+ export declare function Tooltip({ children, content, side, shortcut, delayDuration, }: {
9
+ children: ReactNode;
10
+ content: ReactNode;
11
+ side?: "top" | "right" | "bottom" | "left";
12
+ shortcut?: string;
13
+ delayDuration?: number;
14
+ }): import("react").JSX.Element;
15
+ //# sourceMappingURL=tooltip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../src/components/ui/tooltip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAkB,KAAK,wBAAwB,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAYtF,eAAO,MAAM,eAAe,2DAA4B,CAAC;AACzD,eAAO,MAAM,WAAW,mDAAwB,CAAC;AACjD,eAAO,MAAM,cAAc,oIAA2B,CAAC;AAEvD,wBAAgB,cAAc,CAAC,EAC3B,SAAS,EACT,UAAc,EACd,GAAG,KAAK,EACX,EAAE,wBAAwB,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,+BAe3D;AAED,4DAA4D;AAO5D,wBAAgB,OAAO,CAAC,EACpB,QAAQ,EACR,OAAO,EACP,IAAY,EACZ,QAAQ,EACR,aAAmB,GACtB,EAAE;IACC,QAAQ,EAAE,SAAS,CAAC;IACpB,OAAO,EAAE,SAAS,CAAC;IACnB,IAAI,CAAC,EAAE,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,CAAC;CAC1B,+BAkBA"}
@@ -0,0 +1,32 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
4
+ import { isValidElement } from "react";
5
+ import { formatShortcut } from "../../lib/keys.js";
6
+ import { usePlatform } from "./typography.js";
7
+ import { cn } from "../../lib/utils.js";
8
+ /* A tooltip is a small overlay like any other: the theme's own surface and
9
+ ink, lifted by the popover shadow, so it is light in light mode, dark in
10
+ dark, and takes an accent wash with everything else.
11
+
12
+ Until 2026-12-02 it was a dark chip in both modes, to raise contrast. In a
13
+ real app that read as a piece of dark mode left on a light page. */
14
+ export const TooltipProvider = TooltipPrimitive.Provider;
15
+ export const TooltipRoot = TooltipPrimitive.Root;
16
+ export const TooltipTrigger = TooltipPrimitive.Trigger;
17
+ export function TooltipContent({ className, sideOffset = 6, ...props }) {
18
+ return (_jsx(TooltipPrimitive.Portal, { children: _jsx(TooltipPrimitive.Content, { sideOffset: sideOffset, className: cn("z-(--z-tooltip) bg-surface-overlay shadow-popover px-2 py-1 rounded-control", "max-w-56 font-medium text-ink text-caption", "data-[state=delayed-open]:animate-fade-in", className), ...props }) }));
19
+ }
20
+ /** Convenience wrapper — the common case in one element. */
21
+ /* A word or two about a control, on hover or focus. `shortcut` is written once,
22
+ "mod+k", and shown as the platform has it (⌘K, Ctrl+K).
23
+
24
+ A disabled button takes no pointer events, so a tooltip saying why it is disabled
25
+ could never open. When the child is disabled it is wrapped in a span that takes
26
+ them instead, and that span is focusable so the reason is reachable by keyboard. */
27
+ export function Tooltip({ children, content, side = "top", shortcut, delayDuration = 400, }) {
28
+ const on = usePlatform();
29
+ const child = isValidElement(children) && children.props.disabled ? (_jsx("span", { tabIndex: 0, className: "inline-flex rounded-control", children: children })) : (children);
30
+ return (_jsxs(TooltipRoot, { delayDuration: delayDuration, children: [_jsx(TooltipTrigger, { asChild: true, children: child }), _jsxs(TooltipContent, { side: side, children: [content, shortcut && _jsx("span", { className: "ml-1.5 text-ink-tertiary", children: formatShortcut(shortcut, on) })] })] }));
31
+ }
32
+ //# sourceMappingURL=tooltip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tooltip.js","sourceRoot":"","sources":["../../../src/components/ui/tooltip.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAiD,MAAM,OAAO,CAAC;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAkB,CAAC;AAC/C,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC;;;;;sEAKsE;AAEtE,MAAM,CAAC,MAAM,eAAe,GAAG,gBAAgB,CAAC,QAAQ,CAAC;AACzD,MAAM,CAAC,MAAM,WAAW,GAAG,gBAAgB,CAAC,IAAI,CAAC;AACjD,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC,OAAO,CAAC;AAEvD,MAAM,UAAU,cAAc,CAAC,EAC3B,SAAS,EACT,UAAU,GAAG,CAAC,EACd,GAAG,KAAK,EACgD;IACxD,OAAO,CACH,KAAC,gBAAgB,CAAC,MAAM,cACpB,KAAC,gBAAgB,CAAC,OAAO,IACrB,UAAU,EAAE,UAAU,EACtB,SAAS,EAAE,EAAE,CACT,6EAA6E,EAC7E,4CAA4C,EAC5C,2CAA2C,EAC3C,SAAS,CACZ,KACG,KAAK,GACX,GACoB,CAC7B,CAAC;AACN,CAAC;AAED,4DAA4D;AAC5D;;;;;sFAKsF;AACtF,MAAM,UAAU,OAAO,CAAC,EACpB,QAAQ,EACR,OAAO,EACP,IAAI,GAAG,KAAK,EACZ,QAAQ,EACR,aAAa,GAAG,GAAG,GAOtB;IACG,MAAM,EAAE,GAAG,WAAW,EAAE,CAAC;IACzB,MAAM,KAAK,GAAG,cAAc,CAAyB,QAAQ,CAAC,IAAI,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CACxF,eAAM,QAAQ,EAAE,CAAC,EAAE,SAAS,EAAC,6BAA6B,YACrD,QAAQ,GACN,CACV,CAAC,CAAC,CAAC,CACA,QAAQ,CACX,CAAC;IACF,OAAO,CACH,MAAC,WAAW,IAAC,aAAa,EAAE,aAAa,aACrC,KAAC,cAAc,IAAC,OAAO,kBAAE,KAAK,GAAkB,EAChD,MAAC,cAAc,IAAC,IAAI,EAAE,IAAI,aACrB,OAAO,EACP,QAAQ,IAAI,eAAM,SAAS,EAAC,0BAA0B,YAAE,cAAc,CAAC,QAAQ,EAAE,EAAE,CAAC,GAAQ,IAChF,IACP,CACjB,CAAC;AACN,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { type ElementType, type ReactNode } from "react";
2
+ export type TopBarLink = {
3
+ label: string;
4
+ href: string;
5
+ current?: boolean;
6
+ };
7
+ declare const WIDTHS: {
8
+ readonly reading: "max-w-reading";
9
+ readonly wide: "max-w-wide";
10
+ };
11
+ export declare function TopBarShell({ brand, links, actions, link: Link, width, label, children, className, }: {
12
+ /** The app's name or mark, usually a link home. */
13
+ brand: ReactNode;
14
+ links?: readonly TopBarLink[];
15
+ /** Beside the menu on the right: a theme toggle, an account, a sign-in button. */
16
+ actions?: ReactNode;
17
+ link?: ElementType;
18
+ width?: keyof typeof WIDTHS;
19
+ /** Names the navigation for a screen reader. */
20
+ label?: string;
21
+ children: ReactNode;
22
+ className?: string;
23
+ }): import("react").JSX.Element;
24
+ export {};
25
+ //# sourceMappingURL=top-bar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"top-bar.d.ts","sourceRoot":"","sources":["../../../src/components/ui/top-bar.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAuB,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAmB9E,MAAM,MAAM,UAAU,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,CAAC;AAE5E,QAAA,MAAM,MAAM;;;CAA4D,CAAC;AAEzE,wBAAgB,WAAW,CAAC,EACxB,KAAK,EACL,KAAU,EACV,OAAO,EACP,IAAI,EAAE,IAAU,EAChB,KAAc,EACd,KAAc,EACd,QAAQ,EACR,SAAS,GACZ,EAAE;IACC,mDAAmD;IACnD,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,SAAS,UAAU,EAAE,CAAC;IAC9B,kFAAkF;IAClF,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,OAAO,MAAM,CAAC;IAC5B,gDAAgD;IAChD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,+BAsEA"}
@@ -0,0 +1,23 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Menu } from "lucide-react";
4
+ import { useEffect, useState } from "react";
5
+ import { cn } from "../../lib/utils.js";
6
+ import { Button } from "./button.js";
7
+ import { Sheet, SheetBody, SheetContent, SheetHeader, SheetTitle, SheetTrigger } from "./sheet.js";
8
+ const WIDTHS = { reading: "max-w-reading", wide: "max-w-wide" };
9
+ export function TopBarShell({ brand, links = [], actions, link: Link = "a", width = "wide", label = "Main", children, className, }) {
10
+ const [scrolled, setScrolled] = useState(false);
11
+ const [open, setOpen] = useState(false);
12
+ useEffect(() => {
13
+ const onScroll = () => setScrolled(window.scrollY > 0);
14
+ onScroll();
15
+ window.addEventListener("scroll", onScroll, { passive: true });
16
+ return () => window.removeEventListener("scroll", onScroll);
17
+ }, []);
18
+ const item = (l, big) => (_jsx(Link, { href: l.href, "aria-current": l.current ? "page" : undefined, onClick: () => setOpen(false), className: cn("inline-flex relative items-center rounded-control font-medium text-sm transition-colors duration-(--duration-fast)", big ? "px-3 h-11 w-full hover:bg-tint-hover" : "px-2.5 h-control-md hover:bg-tint-hover", l.current ? "text-ink" : "text-ink-secondary hover:text-ink",
19
+ // The current one ruled in ink under it, as a tab is (in the bar only).
20
+ !big && "after:absolute after:inset-x-2.5 after:-bottom-3 after:h-0.5 after:rounded-full after:content-['']", !big && l.current && "after:bg-ink", big && l.current && "bg-tint-active"), children: l.label }, l.href));
21
+ return (_jsxs("div", { className: cn("flex flex-col bg-surface min-h-dvh", className), children: [_jsx("header", { "data-scrolled": scrolled || undefined, className: "@container top-0 z-(--z-sticky) sticky bg-surface data-scrolled:shadow-edge-b transition-shadow duration-(--duration-fast)", children: _jsxs("div", { className: cn("flex items-center gap-2 mx-auto px-5 @xl:px-8 @4xl:px-12 w-full h-14", WIDTHS[width]), children: [_jsx("div", { className: "flex items-center min-w-0 shrink-0", children: brand }), links.length > 0 && (_jsx("nav", { "aria-label": label, className: "@max-3xl:hidden flex items-center gap-1 ml-4", children: links.map((l) => item(l, false)) })), _jsxs("div", { className: "flex items-center gap-1 ml-auto shrink-0", children: [actions, links.length > 0 && (_jsxs(Sheet, { open: open, onOpenChange: setOpen, children: [_jsx(SheetTrigger, { asChild: true, children: _jsx(Button, { variant: "ghost", size: "icon", "aria-label": "Menu", className: "@3xl:hidden", children: _jsx(Menu, {}) }) }), _jsxs(SheetContent, { side: "right", "aria-describedby": undefined, children: [_jsx(SheetHeader, { children: _jsx(SheetTitle, { children: label }) }), _jsx(SheetBody, { children: _jsx("nav", { "aria-label": label, className: "flex flex-col gap-0.5", children: links.map((l) => item(l, true)) }) })] })] }))] })] }) }), _jsx("main", { className: "@container flex-1", children: children })] }));
22
+ }
23
+ //# sourceMappingURL=top-bar.js.map
@@ -0,0 +1 @@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,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,aACpC,KAAC,YAAY,IAAC,OAAO,kBACjB,KAAC,MAAM,IAAC,OAAO,EAAC,OAAO,EAAC,IAAI,EAAC,MAAM,gBAAY,MAAM,EAAC,SAAS,EAAC,aAAa,YACzE,KAAC,IAAI,KAAG,GACH,GACE,EACf,MAAC,YAAY,IAAC,IAAI,EAAC,OAAO,sBAAmB,SAAS,aAClD,KAAC,WAAW,cACR,KAAC,UAAU,cAAE,KAAK,GAAc,GACtB,EACd,KAAC,SAAS,cACN,4BAAiB,KAAK,EAAE,SAAS,EAAC,uBAAuB,YACpD,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC,GAC9B,GACE,IACD,IACX,CACX,IACC,IACJ,GACD,EACT,eAAM,SAAS,EAAC,mBAAmB,YAAE,QAAQ,GAAQ,IACnD,CACT,CAAC;AACN,CAAC"}
@@ -0,0 +1,40 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ import { type ComponentProps, type ComponentPropsWithoutRef, type ElementType, type ReactNode } from "react";
3
+ import { type Platform } from "../../lib/keys.js";
4
+ type HeadingLevel = "display" | "title" | 1 | 2 | 3;
5
+ export interface HeadingProps extends Omit<ComponentPropsWithoutRef<"h1">, "color"> {
6
+ level?: HeadingLevel;
7
+ as?: ElementType;
8
+ /** Drop the default top/bottom margin when composing custom layouts. */
9
+ flush?: boolean;
10
+ }
11
+ export declare function Heading({ level, as, flush, className, ...props }: HeadingProps): import("react").JSX.Element;
12
+ declare const textVariants: (props?: ({
13
+ tone?: "accent" | "default" | "disabled" | "secondary" | "tertiary" | "success" | "warning" | "info" | "danger" | null | undefined;
14
+ size?: "caption" | "lead" | "body" | "micro" | "sm" | null | undefined;
15
+ weight?: "normal" | "medium" | "semibold" | null | undefined;
16
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
17
+ export interface TextProps extends Omit<ComponentPropsWithoutRef<"p">, "color">, VariantProps<typeof textVariants> {
18
+ as?: ElementType;
19
+ }
20
+ export declare function Text({ as, tone, size, weight, className, ...props }: TextProps): import("react").JSX.Element;
21
+ /** Inline code. Tinted, not boxed — a box would outrank the paragraph. */
22
+ export declare function Code({ className, ...props }: ComponentPropsWithoutRef<"code">): import("react").JSX.Element;
23
+ export declare function Kbd({ className, ...props }: ComponentProps<"kbd">): import("react").JSX.Element;
24
+ export declare function usePlatform(): Platform;
25
+ export declare function Shortcut({ keys, className }: {
26
+ keys: string;
27
+ className?: string;
28
+ }): import("react").JSX.Element;
29
+ /**
30
+ * Long-form content wrapper. Applies the reading measure plus the
31
+ * vertical rhythm Notion uses between blocks. Wrap raw markdown output
32
+ * in this and it looks intentional with no further work.
33
+ */
34
+ export declare function Prose({ children, className, serif, }: {
35
+ children: ReactNode;
36
+ className?: string;
37
+ serif?: boolean;
38
+ }): import("react").JSX.Element;
39
+ export {};
40
+ //# sourceMappingURL=typography.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"typography.d.ts","sourceRoot":"","sources":["../../../src/components/ui/typography.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAwB,KAAK,cAAc,EAAE,KAAK,wBAAwB,EAAE,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnI,OAAO,EAAyC,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAwBzF,KAAK,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AAUpD,MAAM,WAAW,YACb,SAAQ,IAAI,CAAC,wBAAwB,CAAC,IAAI,CAAC,EAAE,OAAO,CAAC;IACrD,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,wEAAwE;IACxE,KAAK,CAAC,EAAE,OAAO,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