@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
package/CHANGELOG.md ADDED
@@ -0,0 +1,93 @@
1
+ # @kujoforall/paper-ui
2
+
3
+ ## 0.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - eb6c890: Finish Actions, the first group of Basics (docs/parts/basics.md).
8
+
9
+ - `Button` is `type="button"` unless given another type, so it no longer submits a surrounding form by accident. **Behaviour change**: a Button meant to submit must say `type="submit"`.
10
+ - `Button` takes `ref`, `loading`, sizes `icon-sm` / `icon` / `icon-lg`; every variant has a pressed look; a link button is disabled with `aria-disabled`; long labels shorten with an ellipsis; an icon-only button with no name warns in development.
11
+ - Filled colours under white text use the new `accent-solid` / `danger-solid` tokens (and `-hover`, `-active`), which pass WCAG AA in every colour theme, light and dark. **Removed**: `accent-hover`, `danger-hover`.
12
+ - The focus ring is the full accent, 2px clear of the control (was a faint halo).
13
+ - New: `Toggle`, `ToggleGroup`, `ToggleGroupItem`; `Shortcut` and `usePlatform`; `lib/keys` (`formatShortcut`, `speakShortcut`, `platform`); `Spinner`.
14
+ - `Tooltip`'s `shortcut` is written as `mod+k` and shown per platform; a Tooltip on a disabled button now opens.
15
+
16
+ - 317dacf: Bring back what the apps improved, and start v1 (docs/v1.md).
17
+
18
+ - New: `ToastProvider` / `useToast` (tones: done, info, error), `Combobox`, `NativeSelect`, `AnimatedHeight`, `Section`, `ThemeProvider` / `useTheme`, `hooks/use-dismiss`, `lib/prepare-image`, `lib/pointer`, `lib/theme` (`themeInitScript`), month helpers in `lib/dates` (`today`, `daysIn`, `shiftMonth`, `monthSpan`, `formatMonth`, …), the `torn-edge` utility.
19
+ - `Dialog` is a bottom sheet on phones and does not raise the keyboard on touch screens.
20
+ - `Page` takes `width` (`"wide"`, the default, or `"reading"`) and passes its props through.
21
+ - `ThemeToggle` is a plain sun-and-moon button and needs a `ThemeProvider` above it. **Breaking for 0.1 users**: the animated toggle is gone, and framer-motion is no longer a dependency.
22
+ - `Input` and `Textarea` take a `ref`. Buttons with a leading icon are evenly padded; `ClickableRow` ignores buttons and menus opened from it; `NavTree` opens the parents of the active page when it changes.
23
+ - Pressable elements show the pointer cursor.
24
+
25
+ - d1f876a: Finish Choices, the third group of Basics.
26
+
27
+ - New `--control-edge` token: the edge that shows a control's state, 3:1 or better on every surface. Empty checkboxes and radios, the off Switch and Segmented's chosen option use it.
28
+ - `Checkbox` is built on Radix: takes `aria-label`, `id`, `disabled`, `name`, `required`, `ref`, `indeterminate`, `label` and `description`, a Field's label and error, and is 24px to press. **Changed**: it now takes every checkbox prop, not only `checked`, `onCheckedChange` and `className`.
29
+ - New: `Switch`, `RadioGroup` / `RadioGroupItem`, `MultiSelect` (Notion's tags).
30
+ - `Segmented` is a radio group (arrow keys move the choice) and takes icons, `size`, `disabled` and `name`. **Changed**: its role is `radiogroup` / `radio`, not `tablist` / `tab`.
31
+ - `Select`'s trigger, `NativeSelect` and pickers' `FieldButton` take a Field's label and error; both selects take `size`; `NativeSelect` is 16px on phones.
32
+ - `SelectMenu` announces its value with its name, and takes `disabled`.
33
+ - `Combobox`'s list opens in its own layer, so scrolling containers no longer clip it.
34
+
35
+ - 2fbfa09: Finish Containers and feedback, the fifth group of Basics.
36
+
37
+ - New: `Collapsible` / `CollapsibleTrigger` / `CollapsibleContent` and `Disclosure`; `Tabs` / `TabsList` / `TabsTrigger` / `TabsContent`; `EmptyState`; `AlertDialog` and its parts, `ConfirmProvider` and `useConfirm()`.
38
+ - `Card` takes `asChild` (an interactive card should be a link or button) and `ref`; `CardTitle` takes `as`.
39
+ - `Callout`'s words are in the page's ink, its icon is hidden from assistive technology, it is a `note`, and it takes `tone`.
40
+ - `Toast`: F8 reaches it, Escape dismisses it, one with an action stays 10 seconds, and each takes `duration`.
41
+
42
+ - 2f9601a: Finish Display, the fourth group of Basics.
43
+
44
+ - **The nine tag colours' inks are adjusted** so text reads at 4.5:1 on its own ground in light and dark (grounds unchanged; lightness moved, hue kept). Light yellow and orange change the most. Light `--danger` is now `#c13937`.
45
+ - New: `Avatar`, `AvatarStack`, `initials`; `ProgressBar` (known or indeterminate); `Skeleton`, `SkeletonText`; `TableCaption`.
46
+ - `Progress` is named by its visible label and says "n of m". `Spinner` takes `size`. `Badge` takes `ref`.
47
+ - `Table`'s scrolling box can be reached by Tab and is named by `label`; `Th` / `Td` take `numeric`; `ClickableRow` opens on Enter only on the row itself.
48
+
49
+ - 68a3373: Complete the foundations. New tokens: `success`, `warning`, `info` (aliases of the green, yellow and blue tags) with `-tint`, `danger-ink`, `scrim`, `on-media-*`, `text-lead`, `text-micro`, `leading-prose`, the `link` utility, `rounded-small`, `h-control-sm/md/lg`, `max-w-reading` / `max-w-wide` / `max-w-measure`, layers (`--z-raised`, `--z-sticky`, `--z-overlay`, `--z-toast`, `--z-tooltip`) and speeds (`--duration-instant`, `fast`, `base`, `slow`). Radii are in rem. Thin scrollbars; a high-contrast fallback outline.
50
+
51
+ Every component uses them: no raw colours, pixel radii, numbered durations or page-level z-indexes remain. `Heading` takes `level="display"`; `Text` takes `size="lead" | "micro"` and tones `disabled`, `success`, `warning`, `info`. `Text tone="accent"` now uses `accent-text`, as words should. `text-display` scales with the page's width rather than the window's, and `Page` margins step with the room it has. `SidebarProvider`'s widths default to `--sidebar-width` and `--sidebar-width-icon`.
52
+
53
+ Fixed: MacCard used `text-foreground`, a colour the kit never defined; ImageBlock used `numeric`, a utility it never defined.
54
+
55
+ - 621d9a9: Layouts: `HeaderBar`; the shells `TopBarShell` and `FocusShell`; and the page layouts `DocumentLayout` (with `Breakout`), `CollectionLayout` (with `CollectionToolbar`), `ListDetail` (with `ListItem`), `SettingsLayout` (with `SettingsSection` and `SettingsRow`) and `StepsLayout`. Each has a written phone behaviour (docs/parts/layouts.md).
56
+ - 5548205: `Image` sharpens in: the picture arrives blurred and slightly large and clears into place as it fades up, while its stand-in fades out under it (new `--duration-reveal`, 400ms). Only a picture an Image first appeared with, already in the cache, shows at once. `ImageViewer` fades in and grows its first picture into place when it opens (new `animate-viewer-in`), unless `transitionName` animates it from a thumbnail.
57
+ - 8201c62: Finish Media.
58
+
59
+ - `Image` takes `ratio` (square, portrait, landscape, wide, tall, or a number), `focus` (`{ x, y, zoom }`), `icon`, `emptyLabel`, `pending` and `backdrop`; `fit="contain"` fills the room beside the picture with a blur of it. Its existing props are unchanged. New exports: `focusStyle`, `ratioOf`, `ImageFocus`, `ImageRatio`.
60
+ - New: `ImageFramer` (drag or arrow keys to frame a picture, zoom in steps), with `clampFocus`, `dragFocus`, `ZOOMS`.
61
+ - `ImageCard`'s selection tick eases in and out; the check grows in when picked.
62
+ - `ImageViewer`: swipe to step on touch screens, arrows shown wherever there is no hover, Home and End, an announced position, and a message when a picture fails to load.
63
+ - Fixed: `VideoBlock` and `LinkBlock` could make a phone's page wider than the screen.
64
+
65
+ - 1e7e927: Finish Overlays, the last group of Basics.
66
+
67
+ - New: `ContextMenu` and its parts; `Sheet` (left, right or bottom) and its parts; `HoverCard`.
68
+ - `DialogContent` takes `size` (`sm`, `md`, `lg`). Dialog and Popover parts take `ref`.
69
+ - Menus scroll when taller than the room there is. `DropdownMenuShortcut` takes `keys` ("mod+d"), shown per platform and hidden from the item's name.
70
+
71
+ - 5c38bb8: Patterns. New: `Rating`, `CopyButton`, `ShareLink`, `Banner`, `SaveStatus`, `ErrorState`, `NotFound`, `Pagination`, `LoadMore`, `lib/prepare-image`, `ModelViewer` (from `@kujoforall/paper-ui/three`, with `three` an optional peer), `DragRows` (dnd-kit) for `HandleRow`, `lib/database` with `FilterBuilder`/`SortBuilder`, the editor's toggle, callout, code and table blocks, and `Database` with table, board, gallery, list and calendar views. Fixes from a review, among them a split line in the editor showing its words twice, IME Enter, the editor's Tab trap, the "/" menu, held toasts, and saves lost on page close. Shared: `useEscapeFirst`, `matchShortcut`, list option styles, the dialog panel, `Button variant="on-media"`, `shadow-edge` tokens. `HandleRow` now needs a `DragRows` around its rows to drag. `AppShell` is deprecated.
72
+ - 043dcda: Finish Pickers.
73
+
74
+ - `TimePicker` is reworked: with a mouse, a field to type a time into ("9:30pm", "930", "noon") with a list of times under it; on a touch screen, a field that opens the list with large rows (a sheet on a phone). Shown on the reader's 12- or 24-hour clock (`hourCycle`), held as `HH:MM`. New `relativeTo`, `size`. **Changed**: `minuteStep` defaults to 15; `TimeColumns` is removed (use `TimeList`).
75
+ - New: `TimeRangePicker`, `MonthPicker`, `TimeList`, `PickerPanel`; `DatePicker` takes `shortcuts`; `lib/time` (`parseTime`, `formatTime`, `localHourCycle`, `timesEvery`, `durationLabel`).
76
+ - Every picker opens as a bottom sheet on a phone; calendar days are 40px on touch screens. `FieldButton` takes `size`.
77
+
78
+ - 2670d8a: The sidebar app (docs/layouts/sidebar.md): `SidebarProvider`, `Sidebar`, `SidebarHeader`, `SidebarContent`, `SidebarGroup` (with label, action and content), `SidebarMenu`, `SidebarMenuItem`, `SidebarMenuButton`, `SidebarMenuAction`, `SidebarMenuBadge`, `SidebarMenuSub` and its parts, `SidebarMenuSkeleton`, `SidebarFooter`, `SidebarSeparator`, `SidebarRail`, `SidebarInset`, `SidebarTrigger` and `useSidebar`, after shadcn's sidebar. Collapses away or to icons, three variants (column, inset, floating), a drawer on phones, ⌘\ to toggle, state remembered. Also `useMediaQuery` and `useIsPhone` in `hooks/use-media-query`.
79
+
80
+ Fixed: `cn` dropped the kit's own type sizes (`text-caption`, `text-title`, …) when a text colour came after them.
81
+
82
+ - 6f94d06: Finish Text inputs, the second group of Basics.
83
+
84
+ - `Field` wires its label, hint and error to the control inside (no ids to write), marks it invalid on an error and announces the error; takes `required` and `disabled`. `useField()` for any control inside one.
85
+ - Every text input takes `variant` (`field`, `quiet`) and `size` (`sm`, `md`, `lg`); text is 16px on phones so iOS does not zoom; fields have a faint edge; read-only, invalid-while-focused and autofill looks.
86
+ - `Input` takes `start` and `end`. `Textarea` takes `autoGrow` and `maxRows`. New: `SearchField`, `lib/number` (`parseNumber`, `clamp`), the `--ink-placeholder` token (placeholders pass 4.5:1).
87
+ - `NumberInput` follows outside changes, saves on Enter, reads 1,234.5 / 1.234,5 / 12,5 as meant, steps with the arrows, takes `min`, `max`, `step`. **Changed**: it defaults to the field look; pass `variant="quiet"` in a property list.
88
+ - `QuietInput` shows focus. `Label` takes `required`.
89
+ - `cn` knows the kit's heights, radii, shadows and widths, so a later class replaces them.
90
+
91
+ ## 0.1.0
92
+
93
+ First release as a package: the kit as it stood on 2026-12-05, built with `tsc` to one module per file, with `"use client"` kept, type declarations, source maps and the original source.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Nandan Patel
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,296 @@
1
- # Temporary Holding Version
1
+ # paper-ui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ `@kujoforall/paper-ui`: a Notion-flavoured component set. Radix primitives for
4
+ behaviour, Tailwind v4 for tokens, published to npm so every app uses one copy.
5
+
6
+ ```bash
7
+ npm install && npm run dev # the showcase → http://localhost:5173
8
+ ```
9
+
10
+ ## The three ideas
11
+
12
+ **One ink, many alphas.** There is no grey ramp. Secondary text, borders,
13
+ dividers and hover tints are all `#37352f` — a warm brown-black, never pure
14
+ `#000` — at different opacities. That single rule is why nothing in the system
15
+ clashes, and it halves the token count.
16
+
17
+ | Token | Light | Role |
18
+ | --- | --- | --- |
19
+ | `--ink` | `#37352f` | body text |
20
+ | `--ink-secondary` | 65% | supporting copy |
21
+ | `--ink-tertiary` | 50% | placeholders, captions |
22
+ | `--hairline` | 9% | dividers |
23
+ | `--hairline-strong` | 16% | field borders |
24
+ | `--tint-hover` | 5.5% | hover ground |
25
+ | `--accent` | `#2383e2` | the one colour an accent theme sets |
26
+ | `--accent-text` | mixed | the accent pulled toward the ink, for titles and markers |
27
+
28
+ **Shadows start with a 1px ring.** Every elevation token leads with
29
+ `0 0 0 1px rgb(15 15 15 / .05)` before any blur. The ring is what keeps a white
30
+ popover crisp against a white page; diffuse blur alone reads as mush. Dark mode
31
+ inverts the logic — a *lighter* ring separates, a *heavier* drop lifts.
32
+
33
+ ```
34
+ --shadow-popover:
35
+ 0 0 0 1px rgb(15 15 15 / .05), /* ring: the separator */
36
+ 0 3px 6px rgb(15 15 15 / .10), /* contact shadow */
37
+ 0 9px 24px rgb(15 15 15 / .20); /* ambient lift */
38
+ ```
39
+
40
+ **Nine pastels, no picker.** Each is a tinted ground plus same-hue ink, all at
41
+ low chroma, so forty tags on one board still read calm. A user cannot pick an
42
+ ugly combination because they cannot pick an arbitrary one. Resist a tenth.
43
+
44
+ ```tsx
45
+ <Badge color="blue">Design</Badge>
46
+ <Badge color={tagColorFor(user.id)}>{user.name}</Badge> // stable, unchosen
47
+ ```
48
+
49
+ **One accent, seven themes.** Light and dark decide the surfaces; the accent
50
+ decides which colour titles, markers and controls take. A theme is one line,
51
+ `[data-accent="green"] { --accent: #448361; }`, and hover, tint, focus ring and
52
+ `--accent-text` are mixed from it. The hues are the tag inks, so an accent never
53
+ clashes with a badge beside it. `AccentPicker` sets `data-accent` on `<html>` and
54
+ remembers it.
55
+
56
+ ## Every token
57
+
58
+ The showcase's Foundations page lists every token with its class and its value as
59
+ it resolves, in the current theme. In short, beyond the ink, lines and accent above:
60
+
61
+ | Group | Tokens |
62
+ | --- | --- |
63
+ | Surfaces | `surface`, `surface-sunken`, `surface-raised`, `surface-overlay` |
64
+ | Status | `success`, `warning`, `info` (aliases of the green, yellow and blue tags), `danger`; each with `-tint` |
65
+ | Filled | `accent-solid`, `danger-solid` and their `-hover` / `-active`: the deeper fill under white text, AA on every theme |
66
+ | Over things | `scrim` behind dialogs and drawers; `on-media-faint`, `on-media`, `on-media-strong`, `on-media-ink`, `on-media-edge` for controls on pictures |
67
+ | Type | `text-display` (scales with the page), `title`, `h1`–`h3`, `lead`, `body`, `sm`, `caption`, `micro`; `leading-prose`; `font-sans`, `serif`, `mono`, `hand`; the `link` utility |
68
+ | Shape | `rounded-small` 3px, `control` 4px, `surface` 8px, `overlay` 10px, `full` for round things |
69
+ | Size | `h-control-sm` / `md` / `lg` (28 / 32 / 40px); icons `size-3.5` / `4` / `5`; `max-w-measure`, `max-w-reading`, `max-w-wide`; `--sidebar-width`, `--sidebar-width-icon` |
70
+ | Shadows | `shadow-xs`, `sm`, `md`, `popover`, `dialog`, `inset-shadow-field` |
71
+ | Motion | `duration-(--duration-instant|fast|base|slow)` (75 / 100 / 150 / 200ms), `ease-out-notion`, `animate-fade-in`, `scale-in`, `slide-in`, `sheet-in`, `drawer-in`, `toast-in`, `step-in` |
72
+ | Layers | `z-(--z-raised|sticky|overlay|toast|tooltip)` (10 / 20 / 50 / 60 / 70) |
73
+
74
+ A test (`foundations.test.tsx`) fails if a component uses a raw colour, a px
75
+ radius, a numbered duration, a page-level z-index or a size off the scale.
76
+
77
+ ## Testing
78
+
79
+ ```bash
80
+ npm test # vitest, in jsdom
81
+ ```
82
+
83
+ The tests check behaviour and accessibility, not pixels: what each component
84
+ renders, what it reports, and how it answers the keyboard. The layouts in `lib`
85
+ are checked as pure functions. Looking at the showcase is still how a change to
86
+ the look is checked.
87
+
88
+ ## Using it in an app
89
+
90
+ ```bash
91
+ npm install @kujoforall/paper-ui
92
+ ```
93
+
94
+ The app needs React 19 and Tailwind 4. Its stylesheet imports Tailwind, then the
95
+ kit's, which carries the tokens and tells Tailwind where the kit's classes are:
96
+
97
+ ```css
98
+ @import "tailwindcss";
99
+ @import "@kujoforall/paper-ui/styles.css";
100
+ ```
101
+
102
+ | Import | Holds |
103
+ | --- | --- |
104
+ | `@kujoforall/paper-ui` | every component in `src/components/ui` |
105
+ | `@kujoforall/paper-ui/editor` | `DocumentEditor`, `DocumentView` and what an extension is built from |
106
+ | `@kujoforall/paper-ui/sketch` | the hand-drawn shapes (roughjs) |
107
+ | `@kujoforall/paper-ui/hooks/<name>` | a hook from `src/hooks`, e.g. `hooks/use-selection` |
108
+ | `@kujoforall/paper-ui/lib/<name>` | a helper from `src/lib`, e.g. `lib/utils` (`cn`), `lib/rich-text` |
109
+ | `@kujoforall/paper-ui/styles.css` | the stylesheet |
110
+
111
+ The package is one module per source file, so an app's bundle holds only what it
112
+ imports. Components carry `"use client"`, so a Next server component can render
113
+ them. The source ships beside the build, so go-to-definition and stack traces
114
+ land in the kit's own code.
115
+
116
+ Dark mode is class-based (`<html class="dark">`). `index.html` has the
117
+ before-paint script that prevents a flash, for the theme and for the accent:
118
+ `themeInitScript(storageKey)` from `lib/theme`. In Next, put it in a `<script>` in
119
+ the root layout's `<head>`, and wrap the app in `ThemeProvider` with the same key. The hand-drawn font is Caveat, loaded by the app (it sets
120
+ `--font-caveat`, or a `<link>` works).
121
+
122
+ Things that take a link (`NavTree`, `Breadcrumbs`) accept your router's link
123
+ component as `link` and default to a plain `<a>`. `EditableText` reports clicks on
124
+ links and page mentions through `onLink`. Nothing here imports a router.
125
+
126
+ ## Releasing
127
+
128
+ ```bash
129
+ npx changeset # say what changed and whether it is a patch, minor or major
130
+ ```
131
+
132
+ Commit the changeset with the change. When it reaches `main`, the Release
133
+ workflow opens a "Version packages" pull request that bumps the version and
134
+ writes `CHANGELOG.md`; merging that publishes to npm. Every pull request runs CI:
135
+ typecheck, tests, the package build, and `npm run smoke`.
136
+
137
+ `npm run smoke` packs the package as npm would publish it, installs it into a
138
+ fresh Vite 8 app and a fresh Next 16 app, typechecks and builds both, and checks
139
+ the kit's tokens and classes reach their CSS. `--keep` leaves the apps to look
140
+ at; `--version 0.2.0` tests a version already on the registry instead.
141
+
142
+ Inside the kit, imports are relative and written with their `.ts`/`.tsx`
143
+ extension (`tsc` rewrites them to `.js`); the showcase may use `@/`, the
144
+ published folders may not. `npm run build:lib` builds `dist/`,
145
+ `npm run dev:lib` rebuilds it on every change, and `npm run build:site` builds
146
+ the showcase into `site/`.
147
+
148
+ ## Extending
149
+
150
+ Three escape hatches, in order of preference.
151
+
152
+ 1. **Retheme** — change the ~40 custom properties in `:root` / `.dark`. Nothing
153
+ downstream hardcodes a colour, so the set re-skins wholesale.
154
+ 2. **Override per-instance** — every component takes `className` and merges it
155
+ through `tailwind-merge`, so `<Button className="h-12 rounded-full">` wins
156
+ over the variant.
157
+ 3. **Add a variant** — extend the `cva` config in the component file. You own
158
+ these files; there is no package to fight.
159
+
160
+ `asChild` is available on `Button` and the Radix triggers for composition
161
+ without wrapper elements.
162
+
163
+ ## Conventions worth keeping
164
+
165
+ - **Exactly one `primary` button per view.** The accent fill is the loudest
166
+ thing the system does. Two of them and neither reads as the next step.
167
+ - **Hover is a tint, never a border.** A border appearing on hover shifts
168
+ layout and draws a box the design didn't ask for.
169
+ - **Hierarchy from type and space only.** No coloured section bars, no rules
170
+ above headings, no boxes to group things that whitespace already groups.
171
+ - **Use the `affordance` utility for row actions.** Put `group` on the row and
172
+ `affordance` on the control: it is invisible until hover, but still reachable
173
+ by keyboard (it reveals on `focus-visible` and `focus-within`).
174
+ - **Keep motion under 200ms.** Overlays fade at 120–140ms with a 2% scale.
175
+ Nothing springs. Past 200ms it stops feeling like feedback and starts
176
+ feeling like latency.
177
+ - **Respect the measure.** The `measure` utility caps text at 44rem. Long
178
+ lines are the fastest way to make a clean design feel cheap.
179
+
180
+ ## Patterns
181
+
182
+ Beyond single components, the kit carries the patterns a Notion-like app is made
183
+ of. They were extracted from a real one (`~/projects/web-apps/endgame`), which is
184
+ the place to look for each of them used in anger.
185
+
186
+ | Pattern | Where | What it gives you |
187
+ | --- | --- | --- |
188
+ | App frame | `AppShell`, `SidebarFrame`, `SidebarSection` | Collapsing sidebar (`⌘\`), a drawer on small screens, and a `main` that is a container, so pages size to the room they have |
189
+ | Navigation | `NavTree`, `Breadcrumbs` | A nested tree with coloured icons and the active entry in the accent |
190
+ | Records | `PropertyList`, `Property`, `QuietInput`, `NumberInput`, `SelectMenu` | A record's fields with no boxes until hovered; a number that commits on blur |
191
+ | Data | `Table`, `Th`, `Td`, `ClickableRow`, `StatTile`, `Progress` | A table that scrolls in its own box; headline figures; "n of m" with an action |
192
+ | Editing | `EditableText`, `lib/rich-text`, `lib/rich-text-dom` | Rich text edited in place over a JSON span model, with caret helpers |
193
+ | Commands | `CommandMenu` | The "/" menu: anchored to the caret, never takes focus |
194
+ | Jumping | `Spotlight`, `useSpotlightShortcut`, `lib/spotlight` | ⌘K search over every place to go: each typed word must match, label matches rank first, typed letters are picked out |
195
+ | Block rows | `HandleRow` | Hover controls in the margin: add below, drag to move, click for a menu |
196
+ | Trees | `lib/tree` | Pure locate / insert / update / remove on `{ id, children }` |
197
+ | Saving | `hooks/use-save-queue` | Optimistic saves: debounced per key, sent in order, flushed on page hide |
198
+ | Sketches | `components/sketch/rough` | rough.js strokes in the kit's colours: `RoughBox`, `RoughPaths` |
199
+
200
+ A third, a trip planner (`~/projects/web-apps/triptrack`), added these:
201
+
202
+ | Pattern | Where | What it gives you |
203
+ | --- | --- | --- |
204
+ | Pictures in documents | `ImageBlock` | A picture as a block: chosen, dropped, pasted or linked when empty; centred, sized by dragging its sides (or the arrow keys), with a caption under it. It holds no upload logic |
205
+ | Videos and links in documents | `VideoBlock`, `LinkBlock`, `AddressField`, `lib/embed` | A YouTube or Vimeo video played in place, sandboxed and from YouTube's no-cookie domain; a web page as a card with a typed name. Empty, each asks for its link and says why one will not do. `lib/embed` checks addresses the same way on a server |
206
+
207
+ A second app, a photo library (`~/projects/web-apps/vault`), added these:
208
+
209
+ | Pattern | Where | What it gives you |
210
+ | --- | --- | --- |
211
+ | Images | `Image` | A picture that holds its shape, shows a blurred stand-in, then fades in; one already cached is shown at once |
212
+ | Image cards | `ImageCard`, `ImageCardButton`, `ImageCardBadge` | A picture as a card, with controls and markers on its corners that read on any photo, and a picked state |
213
+ | Carousel | `ImageViewer` | One picture at a time at full size: arrow keys, a slide from the side each came from, neighbours fetched ahead, a toolbar and a sliding side panel |
214
+ | Shared transition | `hooks/use-shared-transition` | Growing a thumbnail into the full view and back with View Transitions, by saying which one element carries the name |
215
+ | Multi-step dialog | `StepDialog`, `Stepper` | A dialog several steps long that keeps one size and slides each step in |
216
+ | Selection | `hooks/use-selection`, `SelectionBar` | Picking several things, a run of them with Shift, and a bar of what to do with them |
217
+ | Views of a panel | `Segmented` | Two or three views chosen like tabs |
218
+ | Sidebar app | `SidebarProvider`, `Sidebar` and its parts, `SidebarInset`, `SidebarTrigger`, `useSidebar` | The frame of an app with a navigation column: collapses away or to icons, three variants, a drawer on phones, ⌘\\. See docs/layouts/sidebar.md |
219
+ | Page header | `HeaderBar` | The sticky 2.75rem bar over a page: a trigger and breadcrumbs on the left, actions at `end` |
220
+ | Top bar app | `TopBarShell` | The app's name and a few destinations across the top; on a phone they fold into a menu sheet. Takes the app's `link` |
221
+ | Focus | `FocusShell` | One task, no navigation: a mark, a way out, the small print; `aside` splits the window from 64rem |
222
+ | Document | `DocumentLayout`, `Breakout` | Cover, icon, title and properties, then a 44rem reading column a wide block can break out of |
223
+ | Collection | `CollectionLayout`, `CollectionToolbar` | A titled page with a sticky toolbar: search, filters, a count, the view switch |
224
+ | List and detail | `ListDetail`, `ListItem` | A list beside the chosen one, one at a time under 48rem of its own width; arrow keys move through the list |
225
+ | Settings | `SettingsLayout`, `SettingsSection`, `SettingsRow` | Sections beside their forms, the menu first on a phone; a row keeps a small control beside its name |
226
+ | Steps | `StepsLayout` | A flow of steps as a page: progress at the top, the step sliding in, Back and Continue pinned at the foot |
227
+ | Rating | `Rating` | Stars in whole or half steps, a slider to a screen reader, read-only for lists |
228
+ | Copy and share | `CopyButton`, `copyText`, `ShareLink` | Copy with a tick and a spoken Copied; a public link switched on and off |
229
+ | Page messages | `Banner`, `SaveStatus` | A message about the whole page; where an editor's changes are (saving, saved, offline, failed) |
230
+ | Errors | `ErrorState`, `NotFound` | What failed and Try again, details folded away; a 404 page's body |
231
+ | Paging | `Pagination`, `pageWindow`, `LoadMore` | Numbered pages (links when given hrefs); load more by a button or as the foot scrolls into view |
232
+ | Filter and sort | `FilterBuilder`, `SortBuilder`, `FilterButton`, `SortButton` | Narrow and order any list by typed properties, each filter a sentence; rules in `lib/database` |
233
+ | Database | `Database`, `TableView`, `BoardView`, `GalleryView`, `ListView`, `CalendarView`, `CellValue`, `CellEditor` | Notion's database: views of one set of rows; a spreadsheet table, a board and calendar to drag in |
234
+ | Dragging rows | `DragRows`, `HandleRow` | Rows dragged with dnd-kit (mouse, touch), moved by keyboard from the grip's menu |
235
+ | 3D model | `ModelViewer` (from `@kujoforall/paper-ui/three`) | A glTF model traced in while it loads; turn, zoom and pan by pointer, touch or keys. Needs `three` |
236
+ | Pictures for upload | `prepareImage` (`lib/prepare-image`) | A display JPEG and a thumbnail under byte budgets, upright, never the original |
237
+ | Editor blocks | `toggleBlock`, `calloutBlock`, `codeBlock`, `tableBlock`, `KIT_BLOCKS` | Given to every DocumentEditor and DocumentView; `kinds.hide` turns any off |
238
+ | Page frame | `Page`, `PageHeader`, `Section` | One width (`reading` or `wide`) and one title size for every page of an app, and titled parts within it |
239
+ | Toasts | `ToastProvider`, `useToast` | Saying briefly what just happened, with an optional Undo; errors announced at once |
240
+ | Theme | `ThemeProvider`, `useTheme`, `ThemeToggle`, `lib/theme` | Light, dark or the system's, kept under the app's own key, with a before-paint script |
241
+ | File previews | `FilePreview` · `FileUploader` / `FileDropArea` | A cheap picture of an image file before it is uploaded |
242
+ | Uploading | `FileUploader`, `FileDropArea`, `hooks/use-upload-queue`, `lib/files` | A four-step upload dialog around a function you supply that sends one file: drop area, folders, previews, validation, a few at a time, retry, summary. `single` makes it take one file, for a thing that has one picture |
243
+ | Picture layouts | `lib/justified` | `justify()` for rows that fill the width, `masonry()` for columns, with heights known before drawing |
244
+ | Bento | `lib/bento` | `bento()` packs pictures into a grid of cells with no holes: each asks for a span, and a gap goes to the neighbour it crops least |
245
+ | Colour themes | `AccentPicker`, `lib/accent`, `[data-accent]` in `notion.css` | Paper, or one of seven colours that sets the accent and washes every surface with it, so the background matches |
246
+ | Pickers | `Select`, `DatePicker`, `DateRangePicker`, `TimePicker`, `DateTimePicker`, `Calendar`, `Popover`, `FieldButton`, `lib/dates` | Fields you press rather than type in: one of a list, a day, a first and last day, a time, a day with a time. Each rests as the same well as `Input` and holds a plain string |
247
+ | Sidebar from anywhere | `toggleSidebar()`, `--sidebar-w` | Opening the shell's sidebar from outside it, and laying things out around it |
248
+
249
+ Three things learned the hard way, kept as comments where they apply:
250
+
251
+ - **Centre with `translate`, animate with `transform`.** Tailwind v4's
252
+ `-translate-x-1/2` sets the `translate` property. A keyframe that also translates
253
+ moves the element twice, and a dialog visibly jumps on open.
254
+ - **Do not mix a custom size class and a colour in one `cn()`.** tailwind-merge
255
+ cannot tell `text-h2` from a text colour and keeps only one. Put the colour on
256
+ another element, or outside `cn`.
257
+ - **Draw rough.js in the browser only.** Its arithmetic rounds differently in Node,
258
+ and hydration rejects the difference.
259
+ - **In dark mode `surface-raised` and `surface-sunken` are the same colour.** One drawn
260
+ on the other vanishes. Where something must show against whatever is under it, use
261
+ a tint (`bg-tint-active`) or `surface-overlay`.
262
+ - **Controls on top of a picture are white on a dark disc in both themes.** They have
263
+ to read against the picture, not the page. Everything else, tooltips included,
264
+ follows the theme.
265
+ - **Hide work in progress from a list; do not show a placeholder that will move.** An
266
+ item that appears in one place and jumps to another reads as a glitch. Let it
267
+ arrive once, where it belongs.
268
+ - **A calendar in a popover in a dialog has to be given focus by the popover.** The
269
+ calendar's own `autoFocus` fires before the popover has taken over the dialog's
270
+ focus trap, and the dialog pulls focus back. `focusCalendarDay` on
271
+ `onOpenAutoFocus` does it at the right moment.
272
+ - **Several states on one element are resolved in `cn()`, not as sibling classes.**
273
+ A day can be today, outside the month and chosen at once. Which class wins as CSS
274
+ depends on the order the stylesheet was built in; in `cn()` the last one named wins.
275
+ - **A date in a form is a string, never a `Date` built from one.**
276
+ `new Date("2027-01-12")` is midnight in Greenwich and the day before for anyone west
277
+ of it. `lib/dates` builds local days from the parts.
278
+ - **A callback passed to `mutate()` is dropped if its component unmounts.** Anything
279
+ that must happen after a delete that removes the page itself, such as navigating
280
+ away, belongs in the hook's own `onSuccess`.
281
+
282
+ ## What's here
283
+
284
+ `Button` · `Input` / `Textarea` / `Label` / `Field` · `Card` · `Badge` ·
285
+ `Callout` · `Dialog` · `DropdownMenu` · `Tooltip` · `Separator` ·
286
+ `Heading` / `Text` / `Code` / `Kbd` / `Prose` · `ThemeToggle` · `MacCard` ·
287
+ `Checkbox` · `SelectMenu` · `AccentPicker` · `Table` · `StatTile` · `Progress` ·
288
+ `Property` · `Breadcrumbs` · `NavTree` · `AppShell` · `EditableText` ·
289
+ `CommandMenu` · `Spotlight` · `HandleRow` · `RoughBox` · `Image` · `ImageCard` · `ImageViewer` ·
290
+ `StepDialog` / `Stepper` · `SelectionBar` · `Segmented` · `Page` / `PageHeader` ·
291
+ `FilePreview` · `FileUploader` / `FileDropArea` · `VideoBlock` · `LinkBlock` · `AddressField` · `Popover` · `FieldButton` ·
292
+ `Select` · `Calendar` · `DatePicker` / `DateRangePicker` · `TimePicker` ·
293
+ `DateTimePicker` · `ImageFramer` · `TimeRangePicker` · `MonthPicker` · `TimeList` · `PickerPanel` · `Sheet` · `ContextMenu` · `HoverCard` · `Tabs` · `Disclosure` · `EmptyState` · `AlertDialog` / `useConfirm` · `Avatar` / `AvatarStack` · `Skeleton` · `ProgressBar` · `SearchField` · `Switch` · `RadioGroup` · `MultiSelect` · `Toggle` / `ToggleGroup` · `Shortcut` · `Spinner` · `NativeSelect` · `Combobox` · `Toast` · `AnimatedHeight` · `Section` ·
294
+ `ThemeProvider` · `hooks/use-dismiss` · `lib/prepare-image` · `lib/pointer` · `lib/theme`
295
+
296
+ Not yet built: Radio, Switch, Tabs, Toast, Avatar, a multi-select.
@@ -0,0 +1,8 @@
1
+ import { type TextNode } from "./kinds.js";
2
+ export declare function BlockText({ block, placeholder, alwaysShowPlaceholder, className, }: {
3
+ block: TextNode;
4
+ placeholder?: string;
5
+ alwaysShowPlaceholder?: boolean;
6
+ className?: string;
7
+ }): import("react").JSX.Element;
8
+ //# sourceMappingURL=block-text.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"block-text.d.ts","sourceRoot":"","sources":["../../../src/components/editor/block-text.tsx"],"names":[],"mappings":"AASA,OAAO,EAA8D,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAavG,wBAAgB,SAAS,CAAC,EACtB,KAAK,EACL,WAAW,EACX,qBAAqB,EACrB,SAAS,GACZ,EAAE;IACC,KAAK,EAAE,QAAQ,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,+BA8OA"}