prosekit-registry 0.0.1

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 (509) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +241 -0
  3. package/dist/r/lit-example-minimal.json +36 -0
  4. package/dist/r/lit-example-slash-menu.json +55 -0
  5. package/dist/r/lit-example-table.json +56 -0
  6. package/dist/r/lit-example-toolbar.json +60 -0
  7. package/dist/r/lit-sample-sample-doc-table.json +29 -0
  8. package/dist/r/lit-sample-sample-uploader.json +29 -0
  9. package/dist/r/lit-ui-button.json +36 -0
  10. package/dist/r/lit-ui-editor-context.json +30 -0
  11. package/dist/r/lit-ui-image-upload-popover.json +42 -0
  12. package/dist/r/lit-ui-slash-menu.json +56 -0
  13. package/dist/r/lit-ui-table-handle.json +47 -0
  14. package/dist/r/lit-ui-toolbar.json +55 -0
  15. package/dist/r/preact-example-block-handle.json +60 -0
  16. package/dist/r/preact-example-blockquote.json +53 -0
  17. package/dist/r/preact-example-bold.json +56 -0
  18. package/dist/r/preact-example-change-tracking.json +50 -0
  19. package/dist/r/preact-example-code-block-themes.json +66 -0
  20. package/dist/r/preact-example-code-block.json +60 -0
  21. package/dist/r/preact-example-code.json +56 -0
  22. package/dist/r/preact-example-drop-cursor.json +48 -0
  23. package/dist/r/preact-example-emoji-rules.json +50 -0
  24. package/dist/r/preact-example-full.json +106 -0
  25. package/dist/r/preact-example-gap-cursor.json +48 -0
  26. package/dist/r/preact-example-hard-break.json +59 -0
  27. package/dist/r/preact-example-heading.json +56 -0
  28. package/dist/r/preact-example-horizontal-rule.json +53 -0
  29. package/dist/r/preact-example-image-view.json +55 -0
  30. package/dist/r/preact-example-inline-menu.json +54 -0
  31. package/dist/r/preact-example-italic.json +56 -0
  32. package/dist/r/preact-example-keymap.json +63 -0
  33. package/dist/r/preact-example-link-mark-view.json +55 -0
  34. package/dist/r/preact-example-link.json +54 -0
  35. package/dist/r/preact-example-list-custom-checkbox.json +63 -0
  36. package/dist/r/preact-example-list.json +56 -0
  37. package/dist/r/preact-example-loro.json +62 -0
  38. package/dist/r/preact-example-mark-rule.json +50 -0
  39. package/dist/r/preact-example-minimal.json +36 -0
  40. package/dist/r/preact-example-page.json +49 -0
  41. package/dist/r/preact-example-placeholder.json +43 -0
  42. package/dist/r/preact-example-readonly.json +66 -0
  43. package/dist/r/preact-example-rtl.json +74 -0
  44. package/dist/r/preact-example-save-html.json +36 -0
  45. package/dist/r/preact-example-save-json.json +36 -0
  46. package/dist/r/preact-example-save-markdown.json +50 -0
  47. package/dist/r/preact-example-search.json +54 -0
  48. package/dist/r/preact-example-slash-menu.json +51 -0
  49. package/dist/r/preact-example-strike.json +59 -0
  50. package/dist/r/preact-example-table.json +52 -0
  51. package/dist/r/preact-example-temml.json +51 -0
  52. package/dist/r/preact-example-text-align.json +59 -0
  53. package/dist/r/preact-example-text-color.json +59 -0
  54. package/dist/r/preact-example-toolbar.json +56 -0
  55. package/dist/r/preact-example-typography.json +59 -0
  56. package/dist/r/preact-example-underline.json +56 -0
  57. package/dist/r/preact-example-unmount.json +58 -0
  58. package/dist/r/preact-example-user-menu-dynamic.json +67 -0
  59. package/dist/r/preact-example-user-menu.json +59 -0
  60. package/dist/r/preact-example-view-adapter.json +58 -0
  61. package/dist/r/preact-example-word-counter.json +52 -0
  62. package/dist/r/preact-example-yjs.json +62 -0
  63. package/dist/r/preact-sample-define-atom-block.json +29 -0
  64. package/dist/r/preact-sample-katex.json +29 -0
  65. package/dist/r/preact-sample-sample-doc-block-handle.json +29 -0
  66. package/dist/r/preact-sample-sample-doc-bold.json +29 -0
  67. package/dist/r/preact-sample-sample-doc-code-block.json +29 -0
  68. package/dist/r/preact-sample-sample-doc-code.json +29 -0
  69. package/dist/r/preact-sample-sample-doc-drop-cursor.json +29 -0
  70. package/dist/r/preact-sample-sample-doc-full.json +29 -0
  71. package/dist/r/preact-sample-sample-doc-gap-cursor.json +29 -0
  72. package/dist/r/preact-sample-sample-doc-hard-break.json +29 -0
  73. package/dist/r/preact-sample-sample-doc-heading.json +29 -0
  74. package/dist/r/preact-sample-sample-doc-image.json +29 -0
  75. package/dist/r/preact-sample-sample-doc-inline-menu.json +29 -0
  76. package/dist/r/preact-sample-sample-doc-italic.json +29 -0
  77. package/dist/r/preact-sample-sample-doc-link-mark-view.json +29 -0
  78. package/dist/r/preact-sample-sample-doc-link.json +29 -0
  79. package/dist/r/preact-sample-sample-doc-list-custom-checkbox.json +29 -0
  80. package/dist/r/preact-sample-sample-doc-list.json +29 -0
  81. package/dist/r/preact-sample-sample-doc-page.json +29 -0
  82. package/dist/r/preact-sample-sample-doc-readonly.json +29 -0
  83. package/dist/r/preact-sample-sample-doc-rtl.json +29 -0
  84. package/dist/r/preact-sample-sample-doc-search.json +29 -0
  85. package/dist/r/preact-sample-sample-doc-strike.json +29 -0
  86. package/dist/r/preact-sample-sample-doc-table.json +29 -0
  87. package/dist/r/preact-sample-sample-doc-tex.json +29 -0
  88. package/dist/r/preact-sample-sample-doc-text-align.json +29 -0
  89. package/dist/r/preact-sample-sample-doc-text-color.json +29 -0
  90. package/dist/r/preact-sample-sample-doc-typography.json +29 -0
  91. package/dist/r/preact-sample-sample-doc-underline.json +29 -0
  92. package/dist/r/preact-sample-sample-doc-view-adapter.json +29 -0
  93. package/dist/r/preact-sample-sample-doc-word-counter.json +29 -0
  94. package/dist/r/preact-sample-sample-query-users.json +32 -0
  95. package/dist/r/preact-sample-sample-tag-data.json +27 -0
  96. package/dist/r/preact-sample-sample-uploader.json +29 -0
  97. package/dist/r/preact-sample-sample-user-data.json +27 -0
  98. package/dist/r/preact-sample-temml.json +29 -0
  99. package/dist/r/preact-ui-block-handle.json +41 -0
  100. package/dist/r/preact-ui-button.json +36 -0
  101. package/dist/r/preact-ui-code-block-view.json +36 -0
  102. package/dist/r/preact-ui-drop-indicator.json +36 -0
  103. package/dist/r/preact-ui-image-upload-popover.json +42 -0
  104. package/dist/r/preact-ui-image-view.json +41 -0
  105. package/dist/r/preact-ui-inline-menu.json +47 -0
  106. package/dist/r/preact-ui-search.json +47 -0
  107. package/dist/r/preact-ui-slash-menu.json +50 -0
  108. package/dist/r/preact-ui-table-handle.json +41 -0
  109. package/dist/r/preact-ui-tag-menu.json +36 -0
  110. package/dist/r/preact-ui-toolbar.json +51 -0
  111. package/dist/r/preact-ui-user-menu.json +36 -0
  112. package/dist/r/preact-ui-word-counter.json +36 -0
  113. package/dist/r/react-example-block-handle.json +60 -0
  114. package/dist/r/react-example-blockquote.json +53 -0
  115. package/dist/r/react-example-bold.json +56 -0
  116. package/dist/r/react-example-change-tracking.json +50 -0
  117. package/dist/r/react-example-code-block-themes.json +66 -0
  118. package/dist/r/react-example-code-block.json +60 -0
  119. package/dist/r/react-example-code.json +56 -0
  120. package/dist/r/react-example-drop-cursor.json +48 -0
  121. package/dist/r/react-example-emoji-rules.json +50 -0
  122. package/dist/r/react-example-full.json +113 -0
  123. package/dist/r/react-example-gap-cursor.json +48 -0
  124. package/dist/r/react-example-hard-break.json +59 -0
  125. package/dist/r/react-example-heading.json +56 -0
  126. package/dist/r/react-example-horizontal-rule.json +53 -0
  127. package/dist/r/react-example-image-view.json +55 -0
  128. package/dist/r/react-example-inline-menu.json +54 -0
  129. package/dist/r/react-example-italic.json +56 -0
  130. package/dist/r/react-example-keymap.json +63 -0
  131. package/dist/r/react-example-link-mark-view.json +55 -0
  132. package/dist/r/react-example-link.json +54 -0
  133. package/dist/r/react-example-list-custom-checkbox.json +63 -0
  134. package/dist/r/react-example-list.json +56 -0
  135. package/dist/r/react-example-loro.json +62 -0
  136. package/dist/r/react-example-mark-rule.json +50 -0
  137. package/dist/r/react-example-minimal.json +36 -0
  138. package/dist/r/react-example-notion.json +166 -0
  139. package/dist/r/react-example-page.json +62 -0
  140. package/dist/r/react-example-placeholder.json +43 -0
  141. package/dist/r/react-example-readonly.json +66 -0
  142. package/dist/r/react-example-rtl.json +74 -0
  143. package/dist/r/react-example-save-html.json +36 -0
  144. package/dist/r/react-example-save-json.json +36 -0
  145. package/dist/r/react-example-save-markdown.json +50 -0
  146. package/dist/r/react-example-search.json +54 -0
  147. package/dist/r/react-example-slash-menu.json +51 -0
  148. package/dist/r/react-example-strike.json +59 -0
  149. package/dist/r/react-example-table.json +52 -0
  150. package/dist/r/react-example-temml.json +51 -0
  151. package/dist/r/react-example-text-align.json +59 -0
  152. package/dist/r/react-example-text-color.json +59 -0
  153. package/dist/r/react-example-toolbar.json +56 -0
  154. package/dist/r/react-example-tweet.json +63 -0
  155. package/dist/r/react-example-typography.json +59 -0
  156. package/dist/r/react-example-underline.json +56 -0
  157. package/dist/r/react-example-unmount.json +58 -0
  158. package/dist/r/react-example-user-menu-dynamic.json +67 -0
  159. package/dist/r/react-example-user-menu.json +59 -0
  160. package/dist/r/react-example-view-adapter.json +58 -0
  161. package/dist/r/react-example-word-counter.json +52 -0
  162. package/dist/r/react-example-yjs.json +62 -0
  163. package/dist/r/react-sample-define-atom-block.json +29 -0
  164. package/dist/r/react-sample-katex.json +29 -0
  165. package/dist/r/react-sample-sample-doc-block-handle.json +29 -0
  166. package/dist/r/react-sample-sample-doc-bold.json +29 -0
  167. package/dist/r/react-sample-sample-doc-code-block.json +29 -0
  168. package/dist/r/react-sample-sample-doc-code.json +29 -0
  169. package/dist/r/react-sample-sample-doc-drop-cursor.json +29 -0
  170. package/dist/r/react-sample-sample-doc-full.json +29 -0
  171. package/dist/r/react-sample-sample-doc-gap-cursor.json +29 -0
  172. package/dist/r/react-sample-sample-doc-hard-break.json +29 -0
  173. package/dist/r/react-sample-sample-doc-heading.json +29 -0
  174. package/dist/r/react-sample-sample-doc-image.json +29 -0
  175. package/dist/r/react-sample-sample-doc-inline-menu.json +29 -0
  176. package/dist/r/react-sample-sample-doc-italic.json +29 -0
  177. package/dist/r/react-sample-sample-doc-link-mark-view.json +29 -0
  178. package/dist/r/react-sample-sample-doc-link.json +29 -0
  179. package/dist/r/react-sample-sample-doc-list-custom-checkbox.json +29 -0
  180. package/dist/r/react-sample-sample-doc-list.json +29 -0
  181. package/dist/r/react-sample-sample-doc-notion.json +29 -0
  182. package/dist/r/react-sample-sample-doc-page.json +29 -0
  183. package/dist/r/react-sample-sample-doc-readonly.json +29 -0
  184. package/dist/r/react-sample-sample-doc-rtl.json +29 -0
  185. package/dist/r/react-sample-sample-doc-search.json +29 -0
  186. package/dist/r/react-sample-sample-doc-strike.json +29 -0
  187. package/dist/r/react-sample-sample-doc-table.json +29 -0
  188. package/dist/r/react-sample-sample-doc-tex.json +29 -0
  189. package/dist/r/react-sample-sample-doc-text-align.json +29 -0
  190. package/dist/r/react-sample-sample-doc-text-color.json +29 -0
  191. package/dist/r/react-sample-sample-doc-tweet.json +29 -0
  192. package/dist/r/react-sample-sample-doc-typography.json +29 -0
  193. package/dist/r/react-sample-sample-doc-underline.json +29 -0
  194. package/dist/r/react-sample-sample-doc-view-adapter.json +29 -0
  195. package/dist/r/react-sample-sample-doc-word-counter.json +29 -0
  196. package/dist/r/react-sample-sample-query-users.json +32 -0
  197. package/dist/r/react-sample-sample-tag-data.json +27 -0
  198. package/dist/r/react-sample-sample-uploader.json +29 -0
  199. package/dist/r/react-sample-sample-user-data.json +27 -0
  200. package/dist/r/react-sample-temml.json +29 -0
  201. package/dist/r/react-ui-block-handle.json +41 -0
  202. package/dist/r/react-ui-button.json +36 -0
  203. package/dist/r/react-ui-code-block-view.json +36 -0
  204. package/dist/r/react-ui-drop-indicator.json +36 -0
  205. package/dist/r/react-ui-image-upload-popover.json +42 -0
  206. package/dist/r/react-ui-image-view.json +41 -0
  207. package/dist/r/react-ui-inline-menu.json +47 -0
  208. package/dist/r/react-ui-search.json +47 -0
  209. package/dist/r/react-ui-slash-menu.json +50 -0
  210. package/dist/r/react-ui-table-handle.json +41 -0
  211. package/dist/r/react-ui-tag-menu.json +36 -0
  212. package/dist/r/react-ui-toolbar.json +51 -0
  213. package/dist/r/react-ui-user-menu.json +36 -0
  214. package/dist/r/react-ui-word-counter.json +36 -0
  215. package/dist/r/registry.json +20642 -0
  216. package/dist/r/solid-example-block-handle.json +60 -0
  217. package/dist/r/solid-example-blockquote.json +53 -0
  218. package/dist/r/solid-example-bold.json +56 -0
  219. package/dist/r/solid-example-change-tracking.json +50 -0
  220. package/dist/r/solid-example-code-block-themes.json +66 -0
  221. package/dist/r/solid-example-code-block.json +60 -0
  222. package/dist/r/solid-example-code.json +56 -0
  223. package/dist/r/solid-example-drop-cursor.json +48 -0
  224. package/dist/r/solid-example-emoji-rules.json +50 -0
  225. package/dist/r/solid-example-full.json +106 -0
  226. package/dist/r/solid-example-gap-cursor.json +48 -0
  227. package/dist/r/solid-example-hard-break.json +59 -0
  228. package/dist/r/solid-example-heading.json +56 -0
  229. package/dist/r/solid-example-horizontal-rule.json +53 -0
  230. package/dist/r/solid-example-image-view.json +55 -0
  231. package/dist/r/solid-example-inline-menu.json +54 -0
  232. package/dist/r/solid-example-italic.json +56 -0
  233. package/dist/r/solid-example-keymap.json +63 -0
  234. package/dist/r/solid-example-link-mark-view.json +55 -0
  235. package/dist/r/solid-example-link.json +54 -0
  236. package/dist/r/solid-example-list-custom-checkbox.json +63 -0
  237. package/dist/r/solid-example-list.json +56 -0
  238. package/dist/r/solid-example-loro.json +62 -0
  239. package/dist/r/solid-example-mark-rule.json +50 -0
  240. package/dist/r/solid-example-minimal.json +36 -0
  241. package/dist/r/solid-example-placeholder.json +43 -0
  242. package/dist/r/solid-example-readonly.json +66 -0
  243. package/dist/r/solid-example-rtl.json +74 -0
  244. package/dist/r/solid-example-save-html.json +36 -0
  245. package/dist/r/solid-example-save-json.json +36 -0
  246. package/dist/r/solid-example-save-markdown.json +50 -0
  247. package/dist/r/solid-example-search.json +54 -0
  248. package/dist/r/solid-example-slash-menu.json +51 -0
  249. package/dist/r/solid-example-strike.json +59 -0
  250. package/dist/r/solid-example-table.json +52 -0
  251. package/dist/r/solid-example-temml.json +51 -0
  252. package/dist/r/solid-example-text-align.json +59 -0
  253. package/dist/r/solid-example-text-color.json +59 -0
  254. package/dist/r/solid-example-toolbar.json +56 -0
  255. package/dist/r/solid-example-typography.json +59 -0
  256. package/dist/r/solid-example-underline.json +56 -0
  257. package/dist/r/solid-example-unmount.json +58 -0
  258. package/dist/r/solid-example-user-menu-dynamic.json +67 -0
  259. package/dist/r/solid-example-user-menu.json +59 -0
  260. package/dist/r/solid-example-view-adapter.json +58 -0
  261. package/dist/r/solid-example-word-counter.json +52 -0
  262. package/dist/r/solid-example-yjs.json +62 -0
  263. package/dist/r/solid-sample-define-atom-block.json +29 -0
  264. package/dist/r/solid-sample-katex.json +29 -0
  265. package/dist/r/solid-sample-sample-doc-block-handle.json +29 -0
  266. package/dist/r/solid-sample-sample-doc-bold.json +29 -0
  267. package/dist/r/solid-sample-sample-doc-code-block.json +29 -0
  268. package/dist/r/solid-sample-sample-doc-code.json +29 -0
  269. package/dist/r/solid-sample-sample-doc-drop-cursor.json +29 -0
  270. package/dist/r/solid-sample-sample-doc-full.json +29 -0
  271. package/dist/r/solid-sample-sample-doc-gap-cursor.json +29 -0
  272. package/dist/r/solid-sample-sample-doc-hard-break.json +29 -0
  273. package/dist/r/solid-sample-sample-doc-heading.json +29 -0
  274. package/dist/r/solid-sample-sample-doc-image.json +29 -0
  275. package/dist/r/solid-sample-sample-doc-inline-menu.json +29 -0
  276. package/dist/r/solid-sample-sample-doc-italic.json +29 -0
  277. package/dist/r/solid-sample-sample-doc-link-mark-view.json +29 -0
  278. package/dist/r/solid-sample-sample-doc-link.json +29 -0
  279. package/dist/r/solid-sample-sample-doc-list-custom-checkbox.json +29 -0
  280. package/dist/r/solid-sample-sample-doc-list.json +29 -0
  281. package/dist/r/solid-sample-sample-doc-readonly.json +29 -0
  282. package/dist/r/solid-sample-sample-doc-rtl.json +29 -0
  283. package/dist/r/solid-sample-sample-doc-search.json +29 -0
  284. package/dist/r/solid-sample-sample-doc-strike.json +29 -0
  285. package/dist/r/solid-sample-sample-doc-table.json +29 -0
  286. package/dist/r/solid-sample-sample-doc-tex.json +29 -0
  287. package/dist/r/solid-sample-sample-doc-text-align.json +29 -0
  288. package/dist/r/solid-sample-sample-doc-text-color.json +29 -0
  289. package/dist/r/solid-sample-sample-doc-typography.json +29 -0
  290. package/dist/r/solid-sample-sample-doc-underline.json +29 -0
  291. package/dist/r/solid-sample-sample-doc-view-adapter.json +29 -0
  292. package/dist/r/solid-sample-sample-doc-word-counter.json +29 -0
  293. package/dist/r/solid-sample-sample-query-users.json +32 -0
  294. package/dist/r/solid-sample-sample-tag-data.json +27 -0
  295. package/dist/r/solid-sample-sample-uploader.json +29 -0
  296. package/dist/r/solid-sample-sample-user-data.json +27 -0
  297. package/dist/r/solid-sample-temml.json +29 -0
  298. package/dist/r/solid-ui-block-handle.json +41 -0
  299. package/dist/r/solid-ui-button.json +36 -0
  300. package/dist/r/solid-ui-code-block-view.json +36 -0
  301. package/dist/r/solid-ui-drop-indicator.json +36 -0
  302. package/dist/r/solid-ui-image-upload-popover.json +42 -0
  303. package/dist/r/solid-ui-image-view.json +41 -0
  304. package/dist/r/solid-ui-inline-menu.json +47 -0
  305. package/dist/r/solid-ui-search.json +47 -0
  306. package/dist/r/solid-ui-slash-menu.json +50 -0
  307. package/dist/r/solid-ui-table-handle.json +41 -0
  308. package/dist/r/solid-ui-tag-menu.json +36 -0
  309. package/dist/r/solid-ui-toolbar.json +51 -0
  310. package/dist/r/solid-ui-user-menu.json +36 -0
  311. package/dist/r/solid-ui-word-counter.json +36 -0
  312. package/dist/r/svelte-example-block-handle.json +60 -0
  313. package/dist/r/svelte-example-blockquote.json +53 -0
  314. package/dist/r/svelte-example-bold.json +56 -0
  315. package/dist/r/svelte-example-change-tracking.json +50 -0
  316. package/dist/r/svelte-example-code-block-themes.json +66 -0
  317. package/dist/r/svelte-example-code-block.json +60 -0
  318. package/dist/r/svelte-example-code.json +56 -0
  319. package/dist/r/svelte-example-drop-cursor.json +48 -0
  320. package/dist/r/svelte-example-emoji-rules.json +50 -0
  321. package/dist/r/svelte-example-full.json +106 -0
  322. package/dist/r/svelte-example-gap-cursor.json +48 -0
  323. package/dist/r/svelte-example-hard-break.json +59 -0
  324. package/dist/r/svelte-example-heading.json +56 -0
  325. package/dist/r/svelte-example-horizontal-rule.json +53 -0
  326. package/dist/r/svelte-example-image-view.json +55 -0
  327. package/dist/r/svelte-example-inline-menu.json +54 -0
  328. package/dist/r/svelte-example-italic.json +56 -0
  329. package/dist/r/svelte-example-katex.json +51 -0
  330. package/dist/r/svelte-example-keymap.json +56 -0
  331. package/dist/r/svelte-example-link-mark-view.json +55 -0
  332. package/dist/r/svelte-example-link.json +54 -0
  333. package/dist/r/svelte-example-list-custom-checkbox.json +63 -0
  334. package/dist/r/svelte-example-list.json +56 -0
  335. package/dist/r/svelte-example-loro.json +62 -0
  336. package/dist/r/svelte-example-mark-rule.json +50 -0
  337. package/dist/r/svelte-example-minimal.json +36 -0
  338. package/dist/r/svelte-example-page.json +62 -0
  339. package/dist/r/svelte-example-placeholder.json +43 -0
  340. package/dist/r/svelte-example-readonly.json +59 -0
  341. package/dist/r/svelte-example-rtl.json +74 -0
  342. package/dist/r/svelte-example-save-html.json +36 -0
  343. package/dist/r/svelte-example-save-json.json +36 -0
  344. package/dist/r/svelte-example-save-markdown.json +50 -0
  345. package/dist/r/svelte-example-search.json +54 -0
  346. package/dist/r/svelte-example-slash-menu.json +51 -0
  347. package/dist/r/svelte-example-strike.json +59 -0
  348. package/dist/r/svelte-example-table.json +52 -0
  349. package/dist/r/svelte-example-text-align.json +59 -0
  350. package/dist/r/svelte-example-text-color.json +59 -0
  351. package/dist/r/svelte-example-toolbar.json +56 -0
  352. package/dist/r/svelte-example-typography.json +59 -0
  353. package/dist/r/svelte-example-underline.json +56 -0
  354. package/dist/r/svelte-example-unmount.json +58 -0
  355. package/dist/r/svelte-example-user-menu-dynamic.json +67 -0
  356. package/dist/r/svelte-example-user-menu.json +59 -0
  357. package/dist/r/svelte-example-view-adapter.json +58 -0
  358. package/dist/r/svelte-example-word-counter.json +52 -0
  359. package/dist/r/svelte-example-yjs.json +62 -0
  360. package/dist/r/svelte-sample-define-atom-block.json +29 -0
  361. package/dist/r/svelte-sample-katex.json +29 -0
  362. package/dist/r/svelte-sample-sample-doc-block-handle.json +29 -0
  363. package/dist/r/svelte-sample-sample-doc-bold.json +29 -0
  364. package/dist/r/svelte-sample-sample-doc-code-block.json +29 -0
  365. package/dist/r/svelte-sample-sample-doc-code.json +29 -0
  366. package/dist/r/svelte-sample-sample-doc-drop-cursor.json +29 -0
  367. package/dist/r/svelte-sample-sample-doc-full.json +29 -0
  368. package/dist/r/svelte-sample-sample-doc-gap-cursor.json +29 -0
  369. package/dist/r/svelte-sample-sample-doc-hard-break.json +29 -0
  370. package/dist/r/svelte-sample-sample-doc-heading.json +29 -0
  371. package/dist/r/svelte-sample-sample-doc-image.json +29 -0
  372. package/dist/r/svelte-sample-sample-doc-inline-menu.json +29 -0
  373. package/dist/r/svelte-sample-sample-doc-italic.json +29 -0
  374. package/dist/r/svelte-sample-sample-doc-link-mark-view.json +29 -0
  375. package/dist/r/svelte-sample-sample-doc-link.json +29 -0
  376. package/dist/r/svelte-sample-sample-doc-list-custom-checkbox.json +29 -0
  377. package/dist/r/svelte-sample-sample-doc-list.json +29 -0
  378. package/dist/r/svelte-sample-sample-doc-page.json +29 -0
  379. package/dist/r/svelte-sample-sample-doc-readonly.json +29 -0
  380. package/dist/r/svelte-sample-sample-doc-rtl.json +29 -0
  381. package/dist/r/svelte-sample-sample-doc-search.json +29 -0
  382. package/dist/r/svelte-sample-sample-doc-strike.json +29 -0
  383. package/dist/r/svelte-sample-sample-doc-table.json +29 -0
  384. package/dist/r/svelte-sample-sample-doc-tex.json +29 -0
  385. package/dist/r/svelte-sample-sample-doc-text-align.json +29 -0
  386. package/dist/r/svelte-sample-sample-doc-text-color.json +29 -0
  387. package/dist/r/svelte-sample-sample-doc-typography.json +29 -0
  388. package/dist/r/svelte-sample-sample-doc-underline.json +29 -0
  389. package/dist/r/svelte-sample-sample-doc-view-adapter.json +29 -0
  390. package/dist/r/svelte-sample-sample-doc-word-counter.json +29 -0
  391. package/dist/r/svelte-sample-sample-query-users.json +32 -0
  392. package/dist/r/svelte-sample-sample-tag-data.json +27 -0
  393. package/dist/r/svelte-sample-sample-uploader.json +29 -0
  394. package/dist/r/svelte-sample-sample-user-data.json +27 -0
  395. package/dist/r/svelte-ui-block-handle.json +41 -0
  396. package/dist/r/svelte-ui-button.json +36 -0
  397. package/dist/r/svelte-ui-code-block-view.json +36 -0
  398. package/dist/r/svelte-ui-drop-indicator.json +36 -0
  399. package/dist/r/svelte-ui-image-upload-popover.json +42 -0
  400. package/dist/r/svelte-ui-image-view.json +41 -0
  401. package/dist/r/svelte-ui-inline-menu.json +47 -0
  402. package/dist/r/svelte-ui-search.json +47 -0
  403. package/dist/r/svelte-ui-slash-menu.json +50 -0
  404. package/dist/r/svelte-ui-table-handle.json +41 -0
  405. package/dist/r/svelte-ui-tag-menu.json +36 -0
  406. package/dist/r/svelte-ui-toolbar.json +51 -0
  407. package/dist/r/svelte-ui-user-menu.json +36 -0
  408. package/dist/r/svelte-ui-word-counter.json +36 -0
  409. package/dist/r/vanilla-example-minimal.json +36 -0
  410. package/dist/r/vanilla-example-slash-menu.json +51 -0
  411. package/dist/r/vanilla-ui-slash-menu.json +50 -0
  412. package/dist/r/vue-example-block-handle.json +60 -0
  413. package/dist/r/vue-example-blockquote.json +53 -0
  414. package/dist/r/vue-example-bold.json +56 -0
  415. package/dist/r/vue-example-change-tracking.json +50 -0
  416. package/dist/r/vue-example-code-block-themes.json +66 -0
  417. package/dist/r/vue-example-code-block.json +60 -0
  418. package/dist/r/vue-example-code.json +56 -0
  419. package/dist/r/vue-example-drop-cursor.json +48 -0
  420. package/dist/r/vue-example-emoji-rules.json +50 -0
  421. package/dist/r/vue-example-full.json +106 -0
  422. package/dist/r/vue-example-gap-cursor.json +48 -0
  423. package/dist/r/vue-example-hard-break.json +59 -0
  424. package/dist/r/vue-example-heading.json +56 -0
  425. package/dist/r/vue-example-horizontal-rule.json +53 -0
  426. package/dist/r/vue-example-image-view.json +55 -0
  427. package/dist/r/vue-example-inline-menu.json +54 -0
  428. package/dist/r/vue-example-italic.json +56 -0
  429. package/dist/r/vue-example-katex.json +51 -0
  430. package/dist/r/vue-example-keymap.json +63 -0
  431. package/dist/r/vue-example-link-mark-view.json +55 -0
  432. package/dist/r/vue-example-link.json +54 -0
  433. package/dist/r/vue-example-list-custom-checkbox.json +63 -0
  434. package/dist/r/vue-example-list.json +56 -0
  435. package/dist/r/vue-example-loro.json +62 -0
  436. package/dist/r/vue-example-mark-rule.json +50 -0
  437. package/dist/r/vue-example-minimal.json +36 -0
  438. package/dist/r/vue-example-placeholder.json +43 -0
  439. package/dist/r/vue-example-readonly.json +66 -0
  440. package/dist/r/vue-example-rtl.json +74 -0
  441. package/dist/r/vue-example-save-html.json +36 -0
  442. package/dist/r/vue-example-save-json.json +36 -0
  443. package/dist/r/vue-example-save-markdown.json +50 -0
  444. package/dist/r/vue-example-search.json +54 -0
  445. package/dist/r/vue-example-slash-menu.json +51 -0
  446. package/dist/r/vue-example-strike.json +59 -0
  447. package/dist/r/vue-example-table.json +52 -0
  448. package/dist/r/vue-example-text-align.json +59 -0
  449. package/dist/r/vue-example-text-color.json +59 -0
  450. package/dist/r/vue-example-toolbar.json +56 -0
  451. package/dist/r/vue-example-tweet.json +63 -0
  452. package/dist/r/vue-example-typography.json +59 -0
  453. package/dist/r/vue-example-underline.json +56 -0
  454. package/dist/r/vue-example-unmount.json +58 -0
  455. package/dist/r/vue-example-user-menu-dynamic.json +67 -0
  456. package/dist/r/vue-example-user-menu.json +59 -0
  457. package/dist/r/vue-example-view-adapter.json +58 -0
  458. package/dist/r/vue-example-word-counter.json +52 -0
  459. package/dist/r/vue-example-yjs.json +62 -0
  460. package/dist/r/vue-sample-define-atom-block.json +29 -0
  461. package/dist/r/vue-sample-katex.json +29 -0
  462. package/dist/r/vue-sample-sample-doc-block-handle.json +29 -0
  463. package/dist/r/vue-sample-sample-doc-bold.json +29 -0
  464. package/dist/r/vue-sample-sample-doc-code-block.json +29 -0
  465. package/dist/r/vue-sample-sample-doc-code.json +29 -0
  466. package/dist/r/vue-sample-sample-doc-drop-cursor.json +29 -0
  467. package/dist/r/vue-sample-sample-doc-full.json +29 -0
  468. package/dist/r/vue-sample-sample-doc-gap-cursor.json +29 -0
  469. package/dist/r/vue-sample-sample-doc-hard-break.json +29 -0
  470. package/dist/r/vue-sample-sample-doc-heading.json +29 -0
  471. package/dist/r/vue-sample-sample-doc-image.json +29 -0
  472. package/dist/r/vue-sample-sample-doc-inline-menu.json +29 -0
  473. package/dist/r/vue-sample-sample-doc-italic.json +29 -0
  474. package/dist/r/vue-sample-sample-doc-link-mark-view.json +29 -0
  475. package/dist/r/vue-sample-sample-doc-link.json +29 -0
  476. package/dist/r/vue-sample-sample-doc-list-custom-checkbox.json +29 -0
  477. package/dist/r/vue-sample-sample-doc-list.json +29 -0
  478. package/dist/r/vue-sample-sample-doc-readonly.json +29 -0
  479. package/dist/r/vue-sample-sample-doc-rtl.json +29 -0
  480. package/dist/r/vue-sample-sample-doc-search.json +29 -0
  481. package/dist/r/vue-sample-sample-doc-strike.json +29 -0
  482. package/dist/r/vue-sample-sample-doc-table.json +29 -0
  483. package/dist/r/vue-sample-sample-doc-tex.json +29 -0
  484. package/dist/r/vue-sample-sample-doc-text-align.json +29 -0
  485. package/dist/r/vue-sample-sample-doc-text-color.json +29 -0
  486. package/dist/r/vue-sample-sample-doc-tweet.json +29 -0
  487. package/dist/r/vue-sample-sample-doc-typography.json +29 -0
  488. package/dist/r/vue-sample-sample-doc-underline.json +29 -0
  489. package/dist/r/vue-sample-sample-doc-view-adapter.json +29 -0
  490. package/dist/r/vue-sample-sample-doc-word-counter.json +29 -0
  491. package/dist/r/vue-sample-sample-query-users.json +32 -0
  492. package/dist/r/vue-sample-sample-tag-data.json +27 -0
  493. package/dist/r/vue-sample-sample-uploader.json +29 -0
  494. package/dist/r/vue-sample-sample-user-data.json +27 -0
  495. package/dist/r/vue-ui-block-handle.json +41 -0
  496. package/dist/r/vue-ui-button.json +36 -0
  497. package/dist/r/vue-ui-code-block-view.json +36 -0
  498. package/dist/r/vue-ui-drop-indicator.json +36 -0
  499. package/dist/r/vue-ui-image-upload-popover.json +42 -0
  500. package/dist/r/vue-ui-image-view.json +41 -0
  501. package/dist/r/vue-ui-inline-menu.json +47 -0
  502. package/dist/r/vue-ui-search.json +47 -0
  503. package/dist/r/vue-ui-slash-menu.json +50 -0
  504. package/dist/r/vue-ui-table-handle.json +41 -0
  505. package/dist/r/vue-ui-tag-menu.json +36 -0
  506. package/dist/r/vue-ui-toolbar.json +51 -0
  507. package/dist/r/vue-ui-user-menu.json +36 -0
  508. package/dist/r/vue-ui-word-counter.json +36 -0
  509. package/package.json +353 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 ocavue
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 ADDED
@@ -0,0 +1,241 @@
1
+ # ProseKit Registry
2
+
3
+ The registry contains framework examples and shared UI components. Source files are organized in `registry/src`, with dedicated directories for each supported framework: `react`, `vue`, `svelte`, `solid`, and `preact`.
4
+
5
+ ## Common Guidelines
6
+
7
+ ### Same DOM Across Frameworks
8
+
9
+ All framework implementations of the same example must render identical DOM structures.
10
+
11
+ ### No Props Destructuring
12
+
13
+ Avoid destructuring component props across all frameworks. Destructuring breaks reactivity in frameworks like Solid. Maintaining consistent syntax across frameworks also improves code maintainability.
14
+
15
+ **Correct:**
16
+
17
+ ```tsx
18
+ function Foo(props: FooProps) {
19
+ return <div>{props.foo}</div>;
20
+ }
21
+ ```
22
+
23
+ **Incorrect:**
24
+
25
+ ```tsx
26
+ function Foo({ foo }: FooProps) {
27
+ return <div>{foo}</div>;
28
+ }
29
+ ```
30
+
31
+ ### Union Call Convention
32
+
33
+ The `union` function should be called with individual arguments, not an array.
34
+
35
+ **Correct:**
36
+
37
+ ```ts
38
+ return union(defineBasicExtension(), defineCodeBlockView());
39
+ ```
40
+
41
+ **Incorrect:**
42
+
43
+ ```ts
44
+ return union([defineBasicExtension(), defineCodeBlockView()]);
45
+ ```
46
+
47
+ ### Default Content Location
48
+
49
+ To provide default content for an example, create a file at `registry/src/<framework>/sample/sample-doc-<example-name>.ts` and export the content using the following format:
50
+
51
+ ```ts
52
+ import type { NodeJSON } from "prosekit/core";
53
+
54
+ export const sampleContent: NodeJSON = {
55
+ /* ... */
56
+ };
57
+ ```
58
+
59
+ ### 'use client' Directive
60
+
61
+ Only use the `'use client'` directive in React framework index files. Do not use it in Vue, Svelte, Solid, Preact, or other frameworks as it is specific to React Server Components.
62
+
63
+ ## Vue-Specific Guidelines
64
+
65
+ ### Event Handlers
66
+
67
+ Use `@event-name` syntax instead of `:on-event-name` for event handlers in Vue templates.
68
+
69
+ **Good:**
70
+
71
+ ```
72
+ <Component @query-change="handleQueryChange" />
73
+ ```
74
+
75
+ **Bad:**
76
+
77
+ ```
78
+ <Component :on-query-change="handleQueryChange" />
79
+ ```
80
+
81
+ ### Props Declaration
82
+
83
+ Use `const props = defineProps<Props>()` to declare component props. This provides better clarity and consistency with other frameworks' patterns.
84
+
85
+ **Good:**
86
+
87
+ ```vue
88
+ <script setup lang="ts">
89
+ interface Props {
90
+ name: string
91
+ age?: number
92
+ }
93
+
94
+ const props = defineProps<Props>()
95
+ </script>
96
+
97
+ <template>
98
+ <div>{{ props.name }}</div>
99
+ </template>
100
+ ```
101
+
102
+ **Bad:**
103
+
104
+ ```vue
105
+ <script setup lang="ts">
106
+ interface Props {
107
+ name: string
108
+ age?: number
109
+ }
110
+
111
+ defineProps<Props>()
112
+ </script>
113
+
114
+ <template>
115
+ <div>{{ name }}</div>
116
+ </template>
117
+ ```
118
+
119
+ ### Side Effects with Cleanup
120
+
121
+ Prefer `watchEffect` over `watch` to track reactive dependencies automatically.
122
+
123
+ **Good:**
124
+
125
+ ```ts
126
+ watchEffect((onCleanup) => {
127
+ const value = valueRef.value;
128
+ // do something with value
129
+ onCleanup(() => {
130
+ // cleanup logic
131
+ });
132
+ });
133
+ ```
134
+
135
+ **Bad:**
136
+
137
+ ```ts
138
+ watch([valueRef], (newValue, oldValue, onCleanup) => {
139
+ // do something with newValue
140
+ onCleanup(() => {
141
+ // cleanup logic
142
+ });
143
+ });
144
+ ```
145
+
146
+ ## Svelte-Specific Guidelines
147
+
148
+ ### Syntax
149
+
150
+ Use Svelte v5 runes syntax (`$state`, `$derived`, `$props`, `$effect`) instead of legacy syntax.
151
+
152
+ **Good:**
153
+
154
+ ```svelte
155
+ <script lang="ts">
156
+ interface Props {
157
+ name: string;
158
+ }
159
+ const props: Props = $props();
160
+ let count = $state(0);
161
+ let doubled = $derived(count * 2);
162
+ </script>
163
+
164
+ <div>{props.name} {doubled}</div>
165
+ ```
166
+
167
+ **Bad:**
168
+
169
+ ```svelte
170
+ <script lang="ts">
171
+ export let name = 'World';
172
+ let count = 0;
173
+ $: doubled = count * 2;
174
+ </script>
175
+
176
+ <div>{name} {doubled}</div>
177
+ ```
178
+
179
+ ## Solid-Specific Guidelines
180
+
181
+ ### Use `attr:` for data attributes
182
+
183
+ Use `attr:` for data attributes
184
+
185
+ **Good:**
186
+
187
+ ```tsx
188
+ <SolidComponent
189
+ attr:data-testid="test-id"
190
+ attr:data-selected={selected ? "" : undefined}
191
+ />
192
+ ```
193
+
194
+ **Bad:**
195
+
196
+ ```tsx
197
+ <SolidComponent
198
+ data-testid="test-id"
199
+ data-selected={selected ? "" : undefined}
200
+ />
201
+ ```
202
+
203
+ ### Explicitly specify the return type of components
204
+
205
+ **Good:**
206
+
207
+ ```tsx
208
+ import type { JSX } from 'solid-js'
209
+
210
+ export default function Foo(): JSX.Element {
211
+ return <div>Foo</div>
212
+ }
213
+ ```
214
+
215
+ **Bad:**
216
+
217
+ ```tsx
218
+ export default function Foo() {
219
+ return <div>Foo</div>
220
+ }
221
+ ```
222
+
223
+ ### Use `For` instead of `.map()`
224
+
225
+ **Good:**
226
+
227
+ ```tsx
228
+ <div>
229
+ <For each={items}>
230
+ {(item) => <div>{item}</div>}
231
+ </For>
232
+ </div>
233
+ ```
234
+
235
+ **Bad:**
236
+
237
+ ```tsx
238
+ <div>{items.map((item) => (
239
+ <div>{item}</div>)
240
+ )}</div>
241
+ ```
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "lit-example-minimal",
3
+ "title": "lit-example-minimal",
4
+ "type": "registry:block",
5
+ "description": "Minimal editor setup with basic functionality.",
6
+ "registryDependencies": [],
7
+ "dependencies": [
8
+ "prosekit"
9
+ ],
10
+ "files": [
11
+ {
12
+ "path": "registry/src/lit/examples/minimal/editor.ts",
13
+ "type": "registry:component",
14
+ "target": "components/editor/examples/minimal/editor.ts",
15
+ "content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { html, LitElement, type PropertyDeclaration, type PropertyValues } from 'lit'\nimport { createRef, ref, type Ref } from 'lit/directives/ref.js'\nimport { defineBasicExtension } from 'prosekit/basic'\nimport type { Editor } from 'prosekit/core'\nimport { createEditor } from 'prosekit/core'\n\nexport class LitEditor extends LitElement {\n static override properties = {\n editor: { state: true, attribute: false } satisfies PropertyDeclaration<Editor>,\n }\n\n private editor: Editor\n private ref: Ref<HTMLDivElement>\n\n constructor() {\n super()\n\n const extension = defineBasicExtension()\n this.editor = createEditor({ extension })\n this.ref = createRef<HTMLDivElement>()\n }\n\n override createRenderRoot() {\n return this\n }\n\n override disconnectedCallback() {\n this.editor.unmount()\n super.disconnectedCallback()\n }\n\n override updated(changedProperties: PropertyValues) {\n super.updated(changedProperties)\n this.editor.mount(this.ref.value)\n }\n\n override render() {\n return html`<div class=\"outline-solid p-4\" ${ref(this.ref)}></div>`\n }\n}\n\nexport function registerLitEditor() {\n if (customElements.get('lit-editor-example-minimal')) return\n customElements.define('lit-editor-example-minimal', LitEditor)\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lit-editor-example-minimal': LitEditor\n }\n}\n"
16
+ },
17
+ {
18
+ "path": "registry/src/lit/examples/minimal/index.ts",
19
+ "type": "registry:component",
20
+ "target": "components/editor/examples/minimal/index.ts",
21
+ "content": "export { LitEditor as ExampleEditor, registerLitEditor } from './editor'\n"
22
+ }
23
+ ],
24
+ "meta": {
25
+ "hasIcons": false,
26
+ "hidden": false,
27
+ "story": "minimal",
28
+ "framework": "lit",
29
+ "accumulatedFiles": [
30
+ "registry/src/lit/examples/minimal/editor.ts",
31
+ "registry/src/lit/examples/minimal/index.ts"
32
+ ],
33
+ "internalDependencies": []
34
+ },
35
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
36
+ }
@@ -0,0 +1,55 @@
1
+ {
2
+ "name": "lit-example-slash-menu",
3
+ "title": "lit-example-slash-menu",
4
+ "type": "registry:block",
5
+ "description": "Command menu triggered by typing slash (/).",
6
+ "registryDependencies": [
7
+ "https://prosekit.dev/r/lit-ui-editor-context.json",
8
+ "https://prosekit.dev/r/lit-ui-slash-menu.json"
9
+ ],
10
+ "dependencies": [
11
+ "@lit/context",
12
+ "prosekit"
13
+ ],
14
+ "files": [
15
+ {
16
+ "path": "registry/src/lit/examples/slash-menu/editor.ts",
17
+ "type": "registry:component",
18
+ "target": "components/editor/examples/slash-menu/editor.ts",
19
+ "content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport '../../ui/slash-menu/index'\n\nimport { ContextProvider } from '@lit/context'\nimport { html, LitElement, type PropertyDeclaration, type PropertyValues } from 'lit'\nimport { createRef, ref, type Ref } from 'lit/directives/ref.js'\nimport type { Editor } from 'prosekit/core'\nimport { createEditor } from 'prosekit/core'\n\nimport { editorContext } from '../../ui/editor-context'\n\nimport { defineExtension } from './extension'\n\nexport class LitEditor extends LitElement {\n static override properties = {\n editor: {\n state: true,\n attribute: false,\n } satisfies PropertyDeclaration<Editor>,\n }\n\n private editor: Editor\n private ref: Ref<HTMLDivElement>\n constructor() {\n super()\n\n const extension = defineExtension()\n this.editor = createEditor({ extension })\n this.ref = createRef<HTMLDivElement>()\n new ContextProvider(this, {\n context: editorContext,\n initialValue: this.editor,\n })\n }\n\n override createRenderRoot() {\n return this\n }\n\n override disconnectedCallback() {\n this.editor.unmount()\n super.disconnectedCallback()\n }\n\n override updated(changedProperties: PropertyValues) {\n super.updated(changedProperties)\n this.editor.mount(this.ref.value)\n }\n\n override render() {\n return html`<div class=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-white dark:bg-gray-950 text-black dark:text-white\">\n <div class=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ${ref(this.ref)} class=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n <lit-editor-slash-menu style=\"display: contents;\"></lit-editor-slash-menu>\n </div>\n </div>`\n }\n}\n\nexport function registerLitEditor() {\n if (customElements.get('lit-editor-example-slash-menu')) return\n customElements.define('lit-editor-example-slash-menu', LitEditor)\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lit-editor-example-slash-menu': LitEditor\n }\n}\n"
20
+ },
21
+ {
22
+ "path": "registry/src/lit/examples/slash-menu/extension.ts",
23
+ "type": "registry:component",
24
+ "target": "components/editor/examples/slash-menu/extension.ts",
25
+ "content": "import { defineBasicExtension } from 'prosekit/basic'\nimport { union } from 'prosekit/core'\nimport { definePlaceholder } from 'prosekit/extensions/placeholder'\n\nexport function defineExtension() {\n return union(\n defineBasicExtension(),\n definePlaceholder({ placeholder: 'Press / for commands...' }),\n )\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
26
+ },
27
+ {
28
+ "path": "registry/src/lit/examples/slash-menu/index.ts",
29
+ "type": "registry:component",
30
+ "target": "components/editor/examples/slash-menu/index.ts",
31
+ "content": "export { LitEditor as ExampleEditor, registerLitEditor } from './editor'\n"
32
+ }
33
+ ],
34
+ "meta": {
35
+ "hasIcons": false,
36
+ "hidden": false,
37
+ "story": "slash-menu",
38
+ "framework": "lit",
39
+ "accumulatedFiles": [
40
+ "registry/src/lit/examples/slash-menu/editor.ts",
41
+ "registry/src/lit/examples/slash-menu/extension.ts",
42
+ "registry/src/lit/examples/slash-menu/index.ts",
43
+ "registry/src/lit/ui/editor-context.ts",
44
+ "registry/src/lit/ui/slash-menu/index.ts",
45
+ "registry/src/lit/ui/slash-menu/slash-menu-empty.ts",
46
+ "registry/src/lit/ui/slash-menu/slash-menu-item.ts",
47
+ "registry/src/lit/ui/slash-menu/slash-menu.ts"
48
+ ],
49
+ "internalDependencies": [
50
+ "lit-ui-editor-context",
51
+ "lit-ui-slash-menu"
52
+ ]
53
+ },
54
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
55
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "lit-example-table",
3
+ "title": "lit-example-table",
4
+ "type": "registry:block",
5
+ "description": "Table node with row and column operations.",
6
+ "registryDependencies": [
7
+ "https://prosekit.dev/r/lit-sample-sample-doc-table.json",
8
+ "https://prosekit.dev/r/lit-ui-editor-context.json",
9
+ "https://prosekit.dev/r/lit-ui-table-handle.json"
10
+ ],
11
+ "dependencies": [
12
+ "@lit/context",
13
+ "prosekit"
14
+ ],
15
+ "files": [
16
+ {
17
+ "path": "registry/src/lit/examples/table/editor.ts",
18
+ "type": "registry:component",
19
+ "target": "components/editor/examples/table/editor.ts",
20
+ "content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport '../../ui/table-handle/index'\n\nimport { ContextProvider } from '@lit/context'\nimport { html, LitElement, type PropertyDeclaration, type PropertyValues } from 'lit'\nimport { createRef, ref, type Ref } from 'lit/directives/ref.js'\nimport type { Editor } from 'prosekit/core'\nimport { createEditor } from 'prosekit/core'\n\nimport { sampleContent } from '../../sample/sample-doc-table'\nimport { editorContext } from '../../ui/editor-context'\n\nimport { defineExtension } from './extension'\n\nexport class LitEditor extends LitElement {\n static override properties = {\n editor: { state: true, attribute: false } satisfies PropertyDeclaration<Editor>,\n }\n\n private editor: Editor\n private ref: Ref<HTMLDivElement>\n constructor() {\n super()\n\n const extension = defineExtension()\n this.editor = createEditor({ extension, defaultContent: sampleContent })\n this.ref = createRef<HTMLDivElement>()\n new ContextProvider(this, {\n context: editorContext,\n initialValue: this.editor,\n })\n }\n\n override createRenderRoot() {\n return this\n }\n\n override updated(changedProperties: PropertyValues) {\n super.updated(changedProperties)\n this.editor.mount(this.ref.value)\n }\n\n override render() {\n return html`<div class=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-white dark:bg-gray-950 text-black dark:text-white\">\n <div class=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ${ref(this.ref)} class=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n <lit-editor-table-handle></lit-editor-table-handle>\n </div>\n </div>`\n }\n}\n\nexport function registerLitEditor() {\n if (customElements.get('lit-editor-example-table')) return\n customElements.define('lit-editor-example-table', LitEditor)\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lit-editor-example-table': LitEditor\n }\n}\n"
21
+ },
22
+ {
23
+ "path": "registry/src/lit/examples/table/extension.ts",
24
+ "type": "registry:component",
25
+ "target": "components/editor/examples/table/extension.ts",
26
+ "content": "import { defineBaseKeymap, defineHistory, union } from 'prosekit/core'\nimport { defineDoc } from 'prosekit/extensions/doc'\nimport { defineGapCursor } from 'prosekit/extensions/gap-cursor'\nimport { defineParagraph } from 'prosekit/extensions/paragraph'\nimport { defineTable } from 'prosekit/extensions/table'\nimport { defineText } from 'prosekit/extensions/text'\n\nexport function defineExtension() {\n return union(\n defineBaseKeymap(),\n defineDoc(),\n defineText(),\n defineParagraph(),\n defineTable(),\n defineHistory(),\n defineGapCursor(),\n )\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
27
+ },
28
+ {
29
+ "path": "registry/src/lit/examples/table/index.ts",
30
+ "type": "registry:component",
31
+ "target": "components/editor/examples/table/index.ts",
32
+ "content": "export { LitEditor as ExampleEditor, registerLitEditor } from './editor'\n"
33
+ }
34
+ ],
35
+ "meta": {
36
+ "hasIcons": false,
37
+ "hidden": false,
38
+ "story": "table",
39
+ "framework": "lit",
40
+ "accumulatedFiles": [
41
+ "registry/src/lit/examples/table/editor.ts",
42
+ "registry/src/lit/examples/table/extension.ts",
43
+ "registry/src/lit/examples/table/index.ts",
44
+ "registry/src/lit/sample/sample-doc-table.ts",
45
+ "registry/src/lit/ui/editor-context.ts",
46
+ "registry/src/lit/ui/table-handle/index.ts",
47
+ "registry/src/lit/ui/table-handle/table-handle.ts"
48
+ ],
49
+ "internalDependencies": [
50
+ "lit-sample-sample-doc-table",
51
+ "lit-ui-editor-context",
52
+ "lit-ui-table-handle"
53
+ ]
54
+ },
55
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
56
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "lit-example-toolbar",
3
+ "title": "lit-example-toolbar",
4
+ "type": "registry:block",
5
+ "description": "Formatting toolbar with common editing actions.",
6
+ "registryDependencies": [
7
+ "https://prosekit.dev/r/lit-sample-sample-uploader.json",
8
+ "https://prosekit.dev/r/lit-ui-editor-context.json",
9
+ "https://prosekit.dev/r/lit-ui-toolbar.json"
10
+ ],
11
+ "dependencies": [
12
+ "@lit/context",
13
+ "prosekit"
14
+ ],
15
+ "files": [
16
+ {
17
+ "path": "registry/src/lit/examples/toolbar/editor.ts",
18
+ "type": "registry:component",
19
+ "target": "components/editor/examples/toolbar/editor.ts",
20
+ "content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport '../../ui/toolbar/index'\n\nimport { ContextProvider } from '@lit/context'\nimport { html, LitElement, type PropertyDeclaration, type PropertyValues } from 'lit'\nimport { createRef, ref, type Ref } from 'lit/directives/ref.js'\nimport type { Editor } from 'prosekit/core'\nimport { createEditor } from 'prosekit/core'\n\nimport { sampleUploader } from '../../sample/sample-uploader'\nimport { editorContext } from '../../ui/editor-context'\n\nimport { defineExtension } from './extension'\n\nexport class LitEditor extends LitElement {\n static override properties = {\n editor: {\n state: true,\n attribute: false,\n } satisfies PropertyDeclaration<Editor>,\n }\n\n private editor: Editor\n private ref: Ref<HTMLDivElement>\n constructor() {\n super()\n\n const extension = defineExtension()\n this.editor = createEditor({ extension })\n this.ref = createRef<HTMLDivElement>()\n new ContextProvider(this, {\n context: editorContext,\n initialValue: this.editor,\n })\n }\n\n override createRenderRoot() {\n return this\n }\n\n override disconnectedCallback() {\n this.editor.unmount()\n super.disconnectedCallback()\n }\n\n override updated(changedProperties: PropertyValues) {\n super.updated(changedProperties)\n this.editor.mount(this.ref.value)\n }\n\n override render() {\n return html`<div class=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-white dark:bg-gray-950 text-black dark:text-white\">\n <lit-editor-toolbar .uploader=${sampleUploader}></lit-editor-toolbar>\n <div class=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ${ref(this.ref)} class=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </div>`\n }\n}\n\nexport function registerLitEditor() {\n if (customElements.get('lit-editor-example-toolbar')) return\n customElements.define('lit-editor-example-toolbar', LitEditor)\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lit-editor-example-toolbar': LitEditor\n }\n}\n"
21
+ },
22
+ {
23
+ "path": "registry/src/lit/examples/toolbar/extension.ts",
24
+ "type": "registry:component",
25
+ "target": "components/editor/examples/toolbar/extension.ts",
26
+ "content": "import { defineBasicExtension } from 'prosekit/basic'\nimport { union } from 'prosekit/core'\n\nexport function defineExtension() {\n return union(defineBasicExtension())\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
27
+ },
28
+ {
29
+ "path": "registry/src/lit/examples/toolbar/index.ts",
30
+ "type": "registry:component",
31
+ "target": "components/editor/examples/toolbar/index.ts",
32
+ "content": "export { LitEditor as ExampleEditor, registerLitEditor } from './editor'\n"
33
+ }
34
+ ],
35
+ "meta": {
36
+ "hasIcons": false,
37
+ "hidden": false,
38
+ "story": "toolbar",
39
+ "framework": "lit",
40
+ "accumulatedFiles": [
41
+ "registry/src/lit/examples/toolbar/editor.ts",
42
+ "registry/src/lit/examples/toolbar/extension.ts",
43
+ "registry/src/lit/examples/toolbar/index.ts",
44
+ "registry/src/lit/sample/sample-uploader.ts",
45
+ "registry/src/lit/ui/button/button.ts",
46
+ "registry/src/lit/ui/button/index.ts",
47
+ "registry/src/lit/ui/editor-context.ts",
48
+ "registry/src/lit/ui/image-upload-popover/image-upload-popover.ts",
49
+ "registry/src/lit/ui/image-upload-popover/index.ts",
50
+ "registry/src/lit/ui/toolbar/index.ts",
51
+ "registry/src/lit/ui/toolbar/toolbar.ts"
52
+ ],
53
+ "internalDependencies": [
54
+ "lit-sample-sample-uploader",
55
+ "lit-ui-editor-context",
56
+ "lit-ui-toolbar"
57
+ ]
58
+ },
59
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
60
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "lit-sample-sample-doc-table",
3
+ "title": "lit-sample-sample-doc-table",
4
+ "type": "registry:component",
5
+ "description": "",
6
+ "registryDependencies": [],
7
+ "dependencies": [
8
+ "prosekit"
9
+ ],
10
+ "files": [
11
+ {
12
+ "path": "registry/src/lit/sample/sample-doc-table.ts",
13
+ "type": "registry:component",
14
+ "target": "components/editor/sample/sample-doc-table.ts",
15
+ "content": "import type { NodeJSON } from 'prosekit/core'\n\nexport const sampleContent: NodeJSON = {\n type: 'doc',\n content: [\n {\n type: 'table',\n content: [\n {\n type: 'tableRow',\n content: [\n {\n type: 'tableCell',\n attrs: {\n colspan: 1,\n rowspan: 1,\n colwidth: null,\n },\n content: [\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'A1',\n },\n ],\n },\n ],\n },\n {\n type: 'tableCell',\n attrs: {\n colspan: 1,\n rowspan: 1,\n colwidth: null,\n },\n content: [\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'B1',\n },\n ],\n },\n ],\n },\n {\n type: 'tableCell',\n attrs: {\n colspan: 1,\n rowspan: 1,\n colwidth: null,\n },\n content: [\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'C1',\n },\n ],\n },\n ],\n },\n {\n type: 'tableCell',\n attrs: {\n colspan: 1,\n rowspan: 1,\n colwidth: null,\n },\n content: [\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'D1',\n },\n ],\n },\n ],\n },\n ],\n },\n {\n type: 'tableRow',\n content: [\n {\n type: 'tableCell',\n attrs: {\n colspan: 1,\n rowspan: 1,\n colwidth: null,\n },\n content: [\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'A2',\n },\n ],\n },\n ],\n },\n {\n type: 'tableCell',\n attrs: {\n colspan: 1,\n rowspan: 1,\n colwidth: null,\n },\n content: [\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'B2',\n },\n ],\n },\n ],\n },\n {\n type: 'tableCell',\n attrs: {\n colspan: 1,\n rowspan: 1,\n colwidth: null,\n },\n content: [\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'C2',\n },\n ],\n },\n ],\n },\n {\n type: 'tableCell',\n attrs: {\n colspan: 1,\n rowspan: 1,\n colwidth: null,\n },\n content: [\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'D2',\n },\n ],\n },\n ],\n },\n ],\n },\n ],\n },\n ],\n}\n"
16
+ }
17
+ ],
18
+ "meta": {
19
+ "hasIcons": false,
20
+ "hidden": false,
21
+ "story": "",
22
+ "framework": "lit",
23
+ "accumulatedFiles": [
24
+ "registry/src/lit/sample/sample-doc-table.ts"
25
+ ],
26
+ "internalDependencies": []
27
+ },
28
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
29
+ }
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "lit-sample-sample-uploader",
3
+ "title": "lit-sample-sample-uploader",
4
+ "type": "registry:component",
5
+ "description": "",
6
+ "registryDependencies": [],
7
+ "dependencies": [
8
+ "prosekit"
9
+ ],
10
+ "files": [
11
+ {
12
+ "path": "registry/src/lit/sample/sample-uploader.ts",
13
+ "type": "registry:component",
14
+ "target": "components/editor/sample/sample-uploader.ts",
15
+ "content": "import type { Uploader } from 'prosekit/extensions/file'\n\n/**\n * Uploads the given file to https://tmpfiles.org/ and returns the URL of the\n * uploaded file.\n *\n * This function is only for demonstration purposes. All uploaded files will be\n * deleted by the server after 1 hour.\n */\nexport const sampleUploader: Uploader<string> = ({ file, onProgress }): Promise<string> => {\n return new Promise((resolve, reject) => {\n const xhr = new XMLHttpRequest()\n const formData = new FormData()\n formData.append('file', file)\n\n xhr.upload.addEventListener('progress', (event) => {\n if (event.lengthComputable) {\n onProgress({\n loaded: event.loaded,\n total: event.total,\n })\n }\n })\n\n xhr.addEventListener('load', () => {\n if (xhr.status === 200) {\n try {\n const json = JSON.parse(xhr.responseText) as { data: { url: string } }\n const url: string = json.data.url.replace('tmpfiles.org/', 'tmpfiles.org/dl/')\n\n // Simulate a larger delay\n setTimeout(() => resolve(url), 1000)\n } catch (error) {\n reject(new Error('Failed to parse response', { cause: error }))\n }\n } else {\n reject(new Error(`Upload failed with status ${xhr.status}`))\n }\n })\n\n xhr.addEventListener('error', () => {\n reject(new Error('Upload failed'))\n })\n\n xhr.open('POST', 'https://tmpfiles.org/api/v1/upload', true)\n xhr.send(formData)\n })\n}\n"
16
+ }
17
+ ],
18
+ "meta": {
19
+ "hasIcons": false,
20
+ "hidden": false,
21
+ "story": "",
22
+ "framework": "lit",
23
+ "accumulatedFiles": [
24
+ "registry/src/lit/sample/sample-uploader.ts"
25
+ ],
26
+ "internalDependencies": []
27
+ },
28
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
29
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "lit-ui-button",
3
+ "title": "lit-ui-button",
4
+ "type": "registry:component",
5
+ "description": "",
6
+ "registryDependencies": [],
7
+ "dependencies": [
8
+ "prosekit"
9
+ ],
10
+ "files": [
11
+ {
12
+ "path": "registry/src/lit/ui/button/button.ts",
13
+ "type": "registry:component",
14
+ "target": "components/editor/ui/button/button.ts",
15
+ "content": "import 'prosekit/lit/tooltip'\n\nimport { html, LitElement, nothing, type PropertyDeclaration } from 'lit'\n\nclass LitButton extends LitElement {\n static override properties = {\n pressed: { type: Boolean },\n disabled: { type: Boolean },\n tooltip: { type: String },\n icon: { type: String },\n } satisfies Record<string, PropertyDeclaration>\n\n pressed = false\n disabled = false\n tooltip = ''\n icon = ''\n\n override createRenderRoot() {\n return this\n }\n\n override connectedCallback() {\n super.connectedCallback()\n this.classList.add('contents')\n }\n\n private handleMouseDown = (event: MouseEvent) => {\n // Prevent the editor from being blurred when the button is clicked\n event.preventDefault()\n }\n\n override render() {\n const tooltip = this.tooltip\n\n return html`\n <prosekit-tooltip-root>\n <prosekit-tooltip-trigger class=\"block\">\n <button\n data-state=${this.pressed ? 'on' : 'off'}\n class=\"outline-unset focus-visible:outline-unset flex items-center justify-center rounded-md p-2 font-medium transition focus-visible:ring-2 text-sm focus-visible:ring-gray-900 dark:focus-visible:ring-gray-300 disabled:pointer-events-none min-w-9 min-h-9 text-gray-900 dark:text-gray-50 disabled:text-gray-900/50 dark:disabled:text-gray-50/50 bg-transparent hover:bg-gray-100 dark:hover:bg-gray-800 data-[state=on]:bg-gray-200 dark:data-[state=on]:bg-gray-700\"\n ?disabled=${this.disabled}\n @mousedown=${this.handleMouseDown}\n >\n ${this.icon ? html`<div class=\"${this.icon}\"></div>` : nothing}\n ${tooltip ? html`<span class=\"sr-only\">${tooltip}</span>` : nothing}\n </button>\n </prosekit-tooltip-trigger>\n ${tooltip\n ? html`\n <prosekit-tooltip-positioner class=\"block overflow-visible bg-transparent w-min h-min z-50 motion-safe:ease-out motion-safe:transition-transform motion-safe:duration-100\">\n <prosekit-tooltip-popup class=\"flex box-border motion-safe:duration-100 data-[state=closed]:motion-safe:duration-150 motion-safe:transition-discrete motion-safe:transition-all data-[state=closed]:opacity-0 starting:opacity-0 opacity-100 data-[state=closed]:scale-95 starting:scale-95 scale-100 overflow-hidden rounded-md border border-solid bg-gray-900 dark:bg-gray-50 px-3 py-1.5 text-xs text-gray-50 dark:text-gray-900 shadow-xs text-nowrap\">\n ${tooltip}\n </prosekit-tooltip-popup>\n </prosekit-tooltip-positioner>\n `\n : nothing}\n </prosekit-tooltip-root>\n `\n }\n}\n\ncustomElements.define('lit-editor-button', LitButton)\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'lit-editor-button': LitButton\n }\n}\n"
16
+ },
17
+ {
18
+ "path": "registry/src/lit/ui/button/index.ts",
19
+ "type": "registry:component",
20
+ "target": "components/editor/ui/button/index.ts",
21
+ "content": "import './button'\n"
22
+ }
23
+ ],
24
+ "meta": {
25
+ "hasIcons": false,
26
+ "hidden": false,
27
+ "story": "",
28
+ "framework": "lit",
29
+ "accumulatedFiles": [
30
+ "registry/src/lit/ui/button/button.ts",
31
+ "registry/src/lit/ui/button/index.ts"
32
+ ],
33
+ "internalDependencies": []
34
+ },
35
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
36
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "lit-ui-editor-context",
3
+ "title": "lit-ui-editor-context",
4
+ "type": "registry:component",
5
+ "description": "",
6
+ "registryDependencies": [],
7
+ "dependencies": [
8
+ "@lit/context",
9
+ "prosekit"
10
+ ],
11
+ "files": [
12
+ {
13
+ "path": "registry/src/lit/ui/editor-context.ts",
14
+ "type": "registry:component",
15
+ "target": "components/editor/ui/editor-context.ts",
16
+ "content": "import { createContext } from '@lit/context'\nimport type { Editor } from 'prosekit/core'\n\nexport const editorContext = createContext<Editor | undefined>('prosekit-editor')\n"
17
+ }
18
+ ],
19
+ "meta": {
20
+ "hasIcons": false,
21
+ "hidden": false,
22
+ "story": "",
23
+ "framework": "lit",
24
+ "accumulatedFiles": [
25
+ "registry/src/lit/ui/editor-context.ts"
26
+ ],
27
+ "internalDependencies": []
28
+ },
29
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
30
+ }