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
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "svelte-ui-toolbar",
3
+ "title": "svelte-ui-toolbar",
4
+ "type": "registry:component",
5
+ "description": "",
6
+ "registryDependencies": [
7
+ "https://prosekit.dev/r/svelte-ui-button.json",
8
+ "https://prosekit.dev/r/svelte-ui-image-upload-popover.json"
9
+ ],
10
+ "dependencies": [
11
+ "@egoist/tailwindcss-icons",
12
+ "@iconify-json/lucide",
13
+ "prosekit"
14
+ ],
15
+ "files": [
16
+ {
17
+ "path": "registry/src/svelte/ui/toolbar/index.ts",
18
+ "type": "registry:component",
19
+ "target": "components/editor/ui/toolbar/index.ts",
20
+ "content": "export { default as Toolbar } from './toolbar.svelte'\n"
21
+ },
22
+ {
23
+ "path": "registry/src/svelte/ui/toolbar/toolbar.svelte",
24
+ "type": "registry:component",
25
+ "target": "components/editor/ui/toolbar/toolbar.svelte",
26
+ "content": "<script lang=\"ts\">\nimport type { BasicExtension } from 'prosekit/basic'\nimport type { Editor } from 'prosekit/core'\nimport type { Uploader } from 'prosekit/extensions/file'\nimport { useEditorDerivedValue } from 'prosekit/svelte'\n\nimport { Button } from '../button'\nimport { ImageUploadPopover } from '../image-upload-popover'\n\ninterface Props {\n uploader?: Uploader<string>\n}\n\nconst props: Props = $props()\nconst uploader = $derived(props.uploader)\n\nfunction getToolbarItems(editor: Editor<BasicExtension>) {\n return {\n undo: editor.commands.undo\n ? {\n isActive: false,\n canExec: editor.commands.undo.canExec(),\n command: () => editor.commands.undo(),\n }\n : undefined,\n redo: editor.commands.redo\n ? {\n isActive: false,\n canExec: editor.commands.redo.canExec(),\n command: () => editor.commands.redo(),\n }\n : undefined,\n bold: editor.commands.toggleBold\n ? {\n isActive: editor.marks.bold.isActive(),\n canExec: editor.commands.toggleBold.canExec(),\n command: () => editor.commands.toggleBold(),\n }\n : undefined,\n italic: editor.commands.toggleItalic\n ? {\n isActive: editor.marks.italic.isActive(),\n canExec: editor.commands.toggleItalic.canExec(),\n command: () => editor.commands.toggleItalic(),\n }\n : undefined,\n underline: editor.commands.toggleUnderline\n ? {\n isActive: editor.marks.underline.isActive(),\n canExec: editor.commands.toggleUnderline.canExec(),\n command: () => editor.commands.toggleUnderline(),\n }\n : undefined,\n strike: editor.commands.toggleStrike\n ? {\n isActive: editor.marks.strike.isActive(),\n canExec: editor.commands.toggleStrike.canExec(),\n command: () => editor.commands.toggleStrike(),\n }\n : undefined,\n code: editor.commands.toggleCode\n ? {\n isActive: editor.marks.code.isActive(),\n canExec: editor.commands.toggleCode.canExec(),\n command: () => editor.commands.toggleCode(),\n }\n : undefined,\n codeBlock: editor.commands.insertCodeBlock\n ? {\n isActive: editor.nodes.codeBlock.isActive(),\n canExec: editor.commands.insertCodeBlock.canExec({ language: 'javascript' }),\n command: () => editor.commands.insertCodeBlock({ language: 'javascript' }),\n }\n : undefined,\n heading1: editor.commands.toggleHeading\n ? {\n isActive: editor.nodes.heading.isActive({ level: 1 }),\n canExec: editor.commands.toggleHeading.canExec({ level: 1 }),\n command: () => editor.commands.toggleHeading({ level: 1 }),\n }\n : undefined,\n heading2: editor.commands.toggleHeading\n ? {\n isActive: editor.nodes.heading.isActive({ level: 2 }),\n canExec: editor.commands.toggleHeading.canExec({ level: 2 }),\n command: () => editor.commands.toggleHeading({ level: 2 }),\n }\n : undefined,\n heading3: editor.commands.toggleHeading\n ? {\n isActive: editor.nodes.heading.isActive({ level: 3 }),\n canExec: editor.commands.toggleHeading.canExec({ level: 3 }),\n command: () => editor.commands.toggleHeading({ level: 3 }),\n }\n : undefined,\n horizontalRule: editor.commands.insertHorizontalRule\n ? {\n isActive: editor.nodes.horizontalRule.isActive(),\n canExec: editor.commands.insertHorizontalRule.canExec(),\n command: () => editor.commands.insertHorizontalRule(),\n }\n : undefined,\n blockquote: editor.commands.toggleBlockquote\n ? {\n isActive: editor.nodes.blockquote.isActive(),\n canExec: editor.commands.toggleBlockquote.canExec(),\n command: () => editor.commands.toggleBlockquote(),\n }\n : undefined,\n bulletList: editor.commands.toggleList\n ? {\n isActive: editor.nodes.list.isActive({ kind: 'bullet' }),\n canExec: editor.commands.toggleList.canExec({ kind: 'bullet' }),\n command: () => editor.commands.toggleList({ kind: 'bullet' }),\n }\n : undefined,\n orderedList: editor.commands.toggleList\n ? {\n isActive: editor.nodes.list.isActive({ kind: 'ordered' }),\n canExec: editor.commands.toggleList.canExec({ kind: 'ordered' }),\n command: () => editor.commands.toggleList({ kind: 'ordered' }),\n }\n : undefined,\n taskList: editor.commands.toggleList\n ? {\n isActive: editor.nodes.list.isActive({ kind: 'task' }),\n canExec: editor.commands.toggleList.canExec({ kind: 'task' }),\n command: () => editor.commands.toggleList({ kind: 'task' }),\n }\n : undefined,\n toggleList: editor.commands.toggleList\n ? {\n isActive: editor.nodes.list.isActive({ kind: 'toggle' }),\n canExec: editor.commands.toggleList.canExec({ kind: 'toggle' }),\n command: () => editor.commands.toggleList({ kind: 'toggle' }),\n }\n : undefined,\n indentList: editor.commands.indentList\n ? {\n isActive: false,\n canExec: editor.commands.indentList.canExec(),\n command: () => editor.commands.indentList(),\n }\n : undefined,\n dedentList: editor.commands.dedentList\n ? {\n isActive: false,\n canExec: editor.commands.dedentList.canExec(),\n command: () => editor.commands.dedentList(),\n }\n : undefined,\n insertImage: editor.commands.insertImage\n ? {\n isActive: false,\n canExec: editor.commands.insertImage.canExec(),\n }\n : undefined,\n }\n}\n\nconst items = useEditorDerivedValue(getToolbarItems)\n</script>\n\n<div class=\"z-2 box-border border-gray-200 dark:border-gray-800 border-solid border-l-0 border-r-0 border-t-0 border-b flex flex-wrap gap-1 p-2 items-center\">\n {#if $items.undo}\n <Button\n pressed={$items.undo.isActive}\n disabled={!$items.undo.canExec}\n onClick={$items.undo.command}\n tooltip=\"Undo\"\n >\n <div class=\"i-lucide-undo-2 size-5 block\"></div>\n </Button>\n {/if}\n {#if $items.redo}\n <Button\n pressed={$items.redo.isActive}\n disabled={!$items.redo.canExec}\n onClick={$items.redo.command}\n tooltip=\"Redo\"\n >\n <div class=\"i-lucide-redo-2 size-5 block\"></div>\n </Button>\n {/if}\n\n {#if $items.bold}\n <Button\n pressed={$items.bold.isActive}\n disabled={!$items.bold.canExec}\n onClick={$items.bold.command}\n tooltip=\"Bold\"\n >\n <div class=\"i-lucide-bold size-5 block\"></div>\n </Button>\n {/if}\n {#if $items.italic}\n <Button\n pressed={$items.italic.isActive}\n disabled={!$items.italic.canExec}\n onClick={$items.italic.command}\n tooltip=\"Italic\"\n >\n <div class=\"i-lucide-italic size-5 block\"></div>\n </Button>\n {/if}\n {#if $items.underline}\n <Button\n pressed={$items.underline.isActive}\n disabled={!$items.underline.canExec}\n onClick={$items.underline.command}\n tooltip=\"Underline\"\n >\n <div class=\"i-lucide-underline size-5 block\"></div>\n </Button>\n {/if}\n {#if $items.strike}\n <Button\n pressed={$items.strike.isActive}\n disabled={!$items.strike.canExec}\n onClick={$items.strike.command}\n tooltip=\"Strike\"\n >\n <div class=\"i-lucide-strikethrough size-5 block\"></div>\n </Button>\n {/if}\n {#if $items.code}\n <Button\n pressed={$items.code.isActive}\n disabled={!$items.code.canExec}\n onClick={$items.code.command}\n tooltip=\"Code\"\n >\n <div class=\"i-lucide-code size-5 block\"></div>\n </Button>\n {/if}\n {#if $items.codeBlock}\n <Button\n pressed={$items.codeBlock.isActive}\n disabled={!$items.codeBlock.canExec}\n onClick={$items.codeBlock.command}\n tooltip=\"Code Block\"\n >\n <div class=\"i-lucide-square-code size-5 block\"></div>\n </Button>\n {/if}\n {#if $items.heading1}\n <Button\n pressed={$items.heading1.isActive}\n disabled={!$items.heading1.canExec}\n onClick={$items.heading1.command}\n tooltip=\"Heading 1\"\n >\n <div class=\"i-lucide-heading-1 size-5 block\"></div>\n </Button>\n {/if}\n {#if $items.heading2}\n <Button\n pressed={$items.heading2.isActive}\n disabled={!$items.heading2.canExec}\n onClick={$items.heading2.command}\n tooltip=\"Heading 2\"\n >\n <div class=\"i-lucide-heading-2 size-5 block\"></div>\n </Button>\n {/if}\n {#if $items.heading3}\n <Button\n pressed={$items.heading3.isActive}\n disabled={!$items.heading3.canExec}\n onClick={$items.heading3.command}\n tooltip=\"Heading 3\"\n >\n <div class=\"i-lucide-heading-3 size-5 block\"></div>\n </Button>\n {/if}\n {#if $items.horizontalRule}\n <Button\n pressed={$items.horizontalRule.isActive}\n disabled={!$items.horizontalRule.canExec}\n onClick={$items.horizontalRule.command}\n tooltip=\"Divider\"\n >\n <div class=\"i-lucide-minus size-5 block\"></div>\n </Button>\n {/if}\n {#if $items.blockquote}\n <Button\n pressed={$items.blockquote.isActive}\n disabled={!$items.blockquote.canExec}\n onClick={$items.blockquote.command}\n tooltip=\"Blockquote\"\n >\n <div class=\"i-lucide-text-quote size-5 block\"></div>\n </Button>\n {/if}\n {#if $items.bulletList}\n <Button\n pressed={$items.bulletList.isActive}\n disabled={!$items.bulletList.canExec}\n onClick={$items.bulletList.command}\n tooltip=\"Bullet List\"\n >\n <div class=\"i-lucide-list size-5 block\"></div>\n </Button>\n {/if}\n {#if $items.orderedList}\n <Button\n pressed={$items.orderedList.isActive}\n disabled={!$items.orderedList.canExec}\n onClick={$items.orderedList.command}\n tooltip=\"Ordered List\"\n >\n <div class=\"i-lucide-list-ordered size-5 block\"></div>\n </Button>\n {/if}\n {#if $items.taskList}\n <Button\n pressed={$items.taskList.isActive}\n disabled={!$items.taskList.canExec}\n onClick={$items.taskList.command}\n tooltip=\"Task List\"\n >\n <div class=\"i-lucide-list-checks size-5 block\"></div>\n </Button>\n {/if}\n {#if $items.toggleList}\n <Button\n pressed={$items.toggleList.isActive}\n disabled={!$items.toggleList.canExec}\n onClick={$items.toggleList.command}\n tooltip=\"Toggle List\"\n >\n <div class=\"i-lucide-list-collapse size-5 block\"></div>\n </Button>\n {/if}\n {#if $items.indentList}\n <Button\n pressed={$items.indentList.isActive}\n disabled={!$items.indentList.canExec}\n onClick={$items.indentList.command}\n tooltip=\"Increase indentation\"\n >\n <div class=\"i-lucide-indent-increase size-5 block\"></div>\n </Button>\n {/if}\n {#if $items.dedentList}\n <Button\n pressed={$items.dedentList.isActive}\n disabled={!$items.dedentList.canExec}\n onClick={$items.dedentList.command}\n tooltip=\"Decrease indentation\"\n >\n <div class=\"i-lucide-indent-decrease size-5 block\"></div>\n </Button>\n {/if}\n {#if uploader && $items.insertImage}\n <ImageUploadPopover\n {uploader}\n disabled={!$items.insertImage.canExec}\n tooltip=\"Insert Image\"\n >\n <div class=\"i-lucide-image size-5 block\"></div>\n </ImageUploadPopover>\n {/if}\n</div>\n"
27
+ }
28
+ ],
29
+ "meta": {
30
+ "hasIcons": true,
31
+ "hidden": false,
32
+ "story": "",
33
+ "framework": "svelte",
34
+ "accumulatedFiles": [
35
+ "registry/src/svelte/ui/button/button.svelte",
36
+ "registry/src/svelte/ui/button/index.ts",
37
+ "registry/src/svelte/ui/image-upload-popover/image-upload-popover.svelte",
38
+ "registry/src/svelte/ui/image-upload-popover/index.ts",
39
+ "registry/src/svelte/ui/toolbar/index.ts",
40
+ "registry/src/svelte/ui/toolbar/toolbar.svelte"
41
+ ],
42
+ "internalDependencies": [
43
+ "svelte-ui-button",
44
+ "svelte-ui-image-upload-popover"
45
+ ]
46
+ },
47
+ "css": {
48
+ "@plugin @egoist/tailwindcss-icons": {}
49
+ },
50
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
51
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "svelte-ui-user-menu",
3
+ "title": "svelte-ui-user-menu",
4
+ "type": "registry:component",
5
+ "description": "",
6
+ "registryDependencies": [],
7
+ "dependencies": [
8
+ "prosekit"
9
+ ],
10
+ "files": [
11
+ {
12
+ "path": "registry/src/svelte/ui/user-menu/index.ts",
13
+ "type": "registry:component",
14
+ "target": "components/editor/ui/user-menu/index.ts",
15
+ "content": "export { default as UserMenu } from './user-menu.svelte'\n"
16
+ },
17
+ {
18
+ "path": "registry/src/svelte/ui/user-menu/user-menu.svelte",
19
+ "type": "registry:component",
20
+ "target": "components/editor/ui/user-menu/user-menu.svelte",
21
+ "content": "<script lang=\"ts\">\nimport type { BasicExtension } from 'prosekit/basic'\nimport { canUseRegexLookbehind, type Union } from 'prosekit/core'\nimport type { MentionExtension } from 'prosekit/extensions/mention'\nimport { useEditor } from 'prosekit/svelte'\nimport {\n AutocompleteEmpty,\n AutocompleteItem,\n AutocompletePopup,\n AutocompletePositioner,\n AutocompleteRoot,\n} from 'prosekit/svelte/autocomplete'\n\ninterface Props {\n users: { id: number; name: string }[]\n loading?: boolean\n onQueryChange?: (query: string) => void\n onOpenChange?: (open: boolean) => void\n}\n\nconst props: Props = $props()\nconst loading = $derived(props.loading ?? false)\n\nconst editor = useEditor<Union<[MentionExtension, BasicExtension]>>()\n\nfunction handleUserInsert(id: number, username: string) {\n $editor.commands.insertMention({\n id: id.toString(),\n value: '@' + username,\n kind: 'user',\n })\n $editor.commands.insertText({ text: ' ' })\n}\n\n// Match inputs like \"@\", \"@foo\", \"@foo bar\" etc. Do not match \"@ foo\".\nconst regex = canUseRegexLookbehind() ? /(?<!\\S)@(\\S.*)?$/u : /@(\\S.*)?$/u\n</script>\n\n<AutocompleteRoot\n {regex}\n onQueryChange={(event) => props.onQueryChange?.(event.detail)}\n onOpenChange={(event) => props.onOpenChange?.(event.detail)}\n>\n <AutocompletePositioner 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 <AutocompletePopup class=\"box-border 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 motion-safe:duration-40 rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-950 shadow-lg flex flex-col relative max-h-100 min-w-60 select-none overflow-auto whitespace-nowrap p-1\">\n <AutocompleteEmpty class=\"relative flex items-center justify-between min-w-32 scroll-my-1 rounded-sm px-3 py-1.5 box-border cursor-default select-none whitespace-nowrap outline-hidden data-highlighted:bg-gray-100 dark:data-highlighted:bg-gray-800\">\n {loading ? 'Loading...' : 'No results'}\n </AutocompleteEmpty>\n\n {#each props.users as user (user.id)}\n <AutocompleteItem\n class=\"relative flex items-center justify-between min-w-32 scroll-my-1 rounded-sm px-3 py-1.5 box-border cursor-default select-none whitespace-nowrap outline-hidden data-highlighted:bg-gray-100 dark:data-highlighted:bg-gray-800\"\n onSelect={() => handleUserInsert(user.id, user.name)}\n >\n {#if loading}\n <span class=\"opacity-50\">\n {user.name}\n </span>\n {:else}\n <span>\n {user.name}\n </span>\n {/if}\n </AutocompleteItem>\n {/each}\n </AutocompletePopup>\n </AutocompletePositioner>\n</AutocompleteRoot>\n"
22
+ }
23
+ ],
24
+ "meta": {
25
+ "hasIcons": false,
26
+ "hidden": false,
27
+ "story": "",
28
+ "framework": "svelte",
29
+ "accumulatedFiles": [
30
+ "registry/src/svelte/ui/user-menu/index.ts",
31
+ "registry/src/svelte/ui/user-menu/user-menu.svelte"
32
+ ],
33
+ "internalDependencies": []
34
+ },
35
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
36
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "svelte-ui-word-counter",
3
+ "title": "svelte-ui-word-counter",
4
+ "type": "registry:component",
5
+ "description": "",
6
+ "registryDependencies": [],
7
+ "dependencies": [
8
+ "prosekit"
9
+ ],
10
+ "files": [
11
+ {
12
+ "path": "registry/src/svelte/ui/word-counter/index.ts",
13
+ "type": "registry:component",
14
+ "target": "components/editor/ui/word-counter/index.ts",
15
+ "content": "export { default as WordCounter } from './word-counter.svelte'\n"
16
+ },
17
+ {
18
+ "path": "registry/src/svelte/ui/word-counter/word-counter.svelte",
19
+ "type": "registry:component",
20
+ "target": "components/editor/ui/word-counter/word-counter.svelte",
21
+ "content": "<script lang=\"ts\">\nimport type { Editor } from 'prosekit/core'\nimport { useEditorDerivedValue } from 'prosekit/svelte'\n\nfunction getCounts(editor: Editor) {\n const doc = editor.state.doc\n const words = doc ? doc.textBetween(0, doc.content.size, ' ') : ''\n const wordCount = words.split(/\\s+/).filter((word) => word).length\n const characterCount = doc ? doc.textContent.length : 0\n return { wordCount, characterCount }\n}\n\nconst counts = useEditorDerivedValue(getCounts)\n</script>\n\n<div class=\"p-4 text-center italic tabular-nums\">\n Word Count: {$counts.wordCount}\n <br />\n Character Count: {$counts.characterCount}\n</div>\n"
22
+ }
23
+ ],
24
+ "meta": {
25
+ "hasIcons": false,
26
+ "hidden": false,
27
+ "story": "",
28
+ "framework": "svelte",
29
+ "accumulatedFiles": [
30
+ "registry/src/svelte/ui/word-counter/index.ts",
31
+ "registry/src/svelte/ui/word-counter/word-counter.svelte"
32
+ ],
33
+ "internalDependencies": []
34
+ },
35
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
36
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "vanilla-example-minimal",
3
+ "title": "vanilla-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/vanilla/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 { defineBasicExtension } from 'prosekit/basic'\nimport { createEditor } from 'prosekit/core'\n\nexport function setupVanillaEditor() {\n const extension = defineBasicExtension()\n const editor = createEditor({ extension })\n\n return {\n render: () => {\n const element = document.createElement('div')\n element.className = 'outline-solid p-4'\n editor.mount(element)\n return element\n },\n destroy: () => {\n editor.unmount()\n },\n }\n}\n"
16
+ },
17
+ {
18
+ "path": "registry/src/vanilla/examples/minimal/index.ts",
19
+ "type": "registry:component",
20
+ "target": "components/editor/examples/minimal/index.ts",
21
+ "content": "export { setupVanillaEditor } from './editor'\n"
22
+ }
23
+ ],
24
+ "meta": {
25
+ "hasIcons": false,
26
+ "hidden": false,
27
+ "story": "minimal",
28
+ "framework": "vanilla",
29
+ "accumulatedFiles": [
30
+ "registry/src/vanilla/examples/minimal/editor.ts",
31
+ "registry/src/vanilla/examples/minimal/index.ts"
32
+ ],
33
+ "internalDependencies": []
34
+ },
35
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
36
+ }
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "vanilla-example-slash-menu",
3
+ "title": "vanilla-example-slash-menu",
4
+ "type": "registry:block",
5
+ "description": "Command menu triggered by typing slash (/).",
6
+ "registryDependencies": [
7
+ "https://prosekit.dev/r/vanilla-ui-slash-menu.json"
8
+ ],
9
+ "dependencies": [
10
+ "prosekit"
11
+ ],
12
+ "files": [
13
+ {
14
+ "path": "registry/src/vanilla/examples/slash-menu/editor.ts",
15
+ "type": "registry:component",
16
+ "target": "components/editor/examples/slash-menu/editor.ts",
17
+ "content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { createEditor } from 'prosekit/core'\n\nimport { renderSlashMenu } from '../../ui/slash-menu'\n\nimport { defineExtension } from './extension'\n\nexport function setupVanillaEditor() {\n const extension = defineExtension()\n const editor = createEditor({ extension })\n\n return {\n render: () => {\n const port = document.createElement('div')\n port.className = '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\n const scrolling = document.createElement('div')\n scrolling.className = 'relative w-full flex-1 box-border overflow-y-auto'\n port.append(scrolling)\n\n const content = document.createElement('div')\n content.className = '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'\n scrolling.append(content)\n\n scrolling.append(renderSlashMenu(editor))\n\n editor.mount(content)\n\n return port\n },\n destroy: () => {\n editor.unmount()\n },\n }\n}\n"
18
+ },
19
+ {
20
+ "path": "registry/src/vanilla/examples/slash-menu/extension.ts",
21
+ "type": "registry:component",
22
+ "target": "components/editor/examples/slash-menu/extension.ts",
23
+ "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"
24
+ },
25
+ {
26
+ "path": "registry/src/vanilla/examples/slash-menu/index.ts",
27
+ "type": "registry:component",
28
+ "target": "components/editor/examples/slash-menu/index.ts",
29
+ "content": "export { setupVanillaEditor } from './editor'\n"
30
+ }
31
+ ],
32
+ "meta": {
33
+ "hasIcons": false,
34
+ "hidden": false,
35
+ "story": "slash-menu",
36
+ "framework": "vanilla",
37
+ "accumulatedFiles": [
38
+ "registry/src/vanilla/examples/slash-menu/editor.ts",
39
+ "registry/src/vanilla/examples/slash-menu/extension.ts",
40
+ "registry/src/vanilla/examples/slash-menu/index.ts",
41
+ "registry/src/vanilla/ui/slash-menu/index.ts",
42
+ "registry/src/vanilla/ui/slash-menu/slash-menu-empty.ts",
43
+ "registry/src/vanilla/ui/slash-menu/slash-menu-item.ts",
44
+ "registry/src/vanilla/ui/slash-menu/slash-menu.ts"
45
+ ],
46
+ "internalDependencies": [
47
+ "vanilla-ui-slash-menu"
48
+ ]
49
+ },
50
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
51
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "vanilla-ui-slash-menu",
3
+ "title": "vanilla-ui-slash-menu",
4
+ "type": "registry:component",
5
+ "description": "",
6
+ "registryDependencies": [],
7
+ "dependencies": [
8
+ "prosekit"
9
+ ],
10
+ "files": [
11
+ {
12
+ "path": "registry/src/vanilla/ui/slash-menu/index.ts",
13
+ "type": "registry:component",
14
+ "target": "components/editor/ui/slash-menu/index.ts",
15
+ "content": "export { renderSlashMenu } from './slash-menu'\n"
16
+ },
17
+ {
18
+ "path": "registry/src/vanilla/ui/slash-menu/slash-menu-empty.ts",
19
+ "type": "registry:component",
20
+ "target": "components/editor/ui/slash-menu/slash-menu-empty.ts",
21
+ "content": "import 'prosekit/web/autocomplete'\n\nimport type { AutocompleteEmptyElement } from 'prosekit/web/autocomplete'\n\nexport function renderSlashMenuEmpty() {\n const empty = document.createElement('prosekit-autocomplete-empty') as AutocompleteEmptyElement\n empty.className = 'relative flex items-center justify-between min-w-32 scroll-my-1 rounded-sm px-3 py-1.5 box-border cursor-default select-none whitespace-nowrap outline-hidden data-highlighted:bg-gray-100 dark:data-highlighted:bg-gray-800'\n\n const span = document.createElement('span')\n span.textContent = 'No results'\n empty.append(span)\n\n return empty\n}\n"
22
+ },
23
+ {
24
+ "path": "registry/src/vanilla/ui/slash-menu/slash-menu-item.ts",
25
+ "type": "registry:component",
26
+ "target": "components/editor/ui/slash-menu/slash-menu-item.ts",
27
+ "content": "import 'prosekit/web/autocomplete'\n\nimport type { AutocompleteItemElement } from 'prosekit/web/autocomplete'\n\nexport function renderSlashMenuItem(options: {\n label: string\n kbd?: string\n onSelect: () => void\n}) {\n const item = document.createElement('prosekit-autocomplete-item') as AutocompleteItemElement\n item.className = 'relative flex items-center justify-between min-w-32 scroll-my-1 rounded-sm px-3 py-1.5 box-border cursor-default select-none whitespace-nowrap outline-hidden data-highlighted:bg-gray-100 dark:data-highlighted:bg-gray-800'\n item.addEventListener('select', () => options.onSelect())\n\n const span = document.createElement('span')\n span.textContent = options.label\n item.append(span)\n\n if (options.kbd) {\n const kbd = document.createElement('kbd')\n kbd.className = 'text-xs font-mono text-gray-400 dark:text-gray-500'\n kbd.textContent = options.kbd\n item.append(kbd)\n }\n\n return item\n}\n"
28
+ },
29
+ {
30
+ "path": "registry/src/vanilla/ui/slash-menu/slash-menu.ts",
31
+ "type": "registry:component",
32
+ "target": "components/editor/ui/slash-menu/slash-menu.ts",
33
+ "content": "import 'prosekit/web/autocomplete'\n\nimport type { BasicExtension } from 'prosekit/basic'\nimport type { Editor } from 'prosekit/core'\nimport { canUseRegexLookbehind } from 'prosekit/core'\nimport type { AutocompletePopupElement, AutocompletePositionerElement, AutocompleteRootElement } from 'prosekit/web/autocomplete'\n\nimport { renderSlashMenuEmpty } from './slash-menu-empty'\nimport { renderSlashMenuItem } from './slash-menu-item'\n\n// Match inputs like \"/\", \"/table\", \"/heading 1\" etc. Do not match \"/ heading\".\nconst regex = canUseRegexLookbehind() ? /(?<!\\S)\\/(\\S.*)?$/u : /\\/(\\S.*)?$/u\n\nexport function renderSlashMenu(\n editor: Editor<BasicExtension>,\n) {\n const root = document.createElement('prosekit-autocomplete-root') as AutocompleteRootElement\n root.editor = editor\n root.regex = regex\n\n const positioner = document.createElement('prosekit-autocomplete-positioner') as AutocompletePositionerElement\n positioner.className = 'block overflow-visible bg-transparent w-min h-min z-50 motion-safe:ease-out motion-safe:transition-transform motion-safe:duration-100'\n\n const popup = document.createElement('prosekit-autocomplete-popup') as AutocompletePopupElement\n popup.className = 'box-border 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 motion-safe:duration-40 rounded-lg border border-gray-200 dark:border-gray-800 bg-white dark:bg-gray-950 shadow-lg flex flex-col relative max-h-100 min-w-60 select-none overflow-auto whitespace-nowrap p-1'\n\n popup.append(renderSlashMenuItem({ label: 'Text', kbd: undefined, onSelect: () => editor.commands.setParagraph() }))\n popup.append(renderSlashMenuItem({ label: 'Heading 1', kbd: '#', onSelect: () => editor.commands.setHeading({ level: 1 }) }))\n popup.append(renderSlashMenuItem({ label: 'Heading 2', kbd: '##', onSelect: () => editor.commands.setHeading({ level: 2 }) }))\n popup.append(renderSlashMenuItem({ label: 'Heading 3', kbd: '###', onSelect: () => editor.commands.setHeading({ level: 3 }) }))\n popup.append(renderSlashMenuItem({ label: 'Bullet list', kbd: '-', onSelect: () => editor.commands.wrapInList({ kind: 'bullet' }) }))\n popup.append(renderSlashMenuItem({ label: 'Ordered list', kbd: '1.', onSelect: () => editor.commands.wrapInList({ kind: 'ordered' }) }))\n popup.append(renderSlashMenuItem({ label: 'Task list', kbd: '[]', onSelect: () => editor.commands.wrapInList({ kind: 'task' }) }))\n popup.append(renderSlashMenuItem({ label: 'Toggle list', kbd: '>>', onSelect: () => editor.commands.wrapInList({ kind: 'toggle' }) }))\n popup.append(renderSlashMenuItem({ label: 'Quote', kbd: '>', onSelect: () => editor.commands.setBlockquote() }))\n popup.append(renderSlashMenuItem({ label: 'Table', onSelect: () => editor.commands.insertTable({ row: 3, col: 3 }) }))\n popup.append(renderSlashMenuItem({ label: 'Divider', kbd: '---', onSelect: () => editor.commands.insertHorizontalRule() }))\n popup.append(renderSlashMenuItem({ label: 'Code', kbd: '```', onSelect: () => editor.commands.setCodeBlock() }))\n popup.append(renderSlashMenuEmpty())\n\n positioner.append(popup)\n root.append(positioner)\n\n return root\n}\n"
34
+ }
35
+ ],
36
+ "meta": {
37
+ "hasIcons": false,
38
+ "hidden": false,
39
+ "story": "",
40
+ "framework": "vanilla",
41
+ "accumulatedFiles": [
42
+ "registry/src/vanilla/ui/slash-menu/index.ts",
43
+ "registry/src/vanilla/ui/slash-menu/slash-menu-empty.ts",
44
+ "registry/src/vanilla/ui/slash-menu/slash-menu-item.ts",
45
+ "registry/src/vanilla/ui/slash-menu/slash-menu.ts"
46
+ ],
47
+ "internalDependencies": []
48
+ },
49
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
50
+ }
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "vue-example-block-handle",
3
+ "title": "vue-example-block-handle",
4
+ "type": "registry:block",
5
+ "description": "A handle that appears on hover, allowing you to drag and re-order blocks.",
6
+ "registryDependencies": [
7
+ "https://prosekit.dev/r/vue-sample-sample-doc-block-handle.json",
8
+ "https://prosekit.dev/r/vue-ui-block-handle.json",
9
+ "https://prosekit.dev/r/vue-ui-code-block-view.json",
10
+ "https://prosekit.dev/r/vue-ui-drop-indicator.json"
11
+ ],
12
+ "dependencies": [
13
+ "prosekit"
14
+ ],
15
+ "files": [
16
+ {
17
+ "path": "registry/src/vue/examples/block-handle/editor.vue",
18
+ "type": "registry:component",
19
+ "target": "components/editor/examples/block-handle/editor.vue",
20
+ "content": "<script setup lang=\"ts\">\nimport 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/vue'\n\nimport { sampleContent } from '../../sample/sample-doc-block-handle'\nimport { BlockHandle } from '../../ui/block-handle'\nimport { DropIndicator } from '../../ui/drop-indicator'\n\nimport { defineExtension } from './extension'\n\nconst props = defineProps<{\n initialContent?: NodeJSON\n}>()\n\nconst extension = defineExtension()\nconst defaultContent = props.initialContent ?? sampleContent\nconst editor = createEditor({ extension, defaultContent })\n</script>\n\n<template>\n <ProseKit :editor=\"editor\">\n <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=\"(el) => editor.mount(el as HTMLElement | null)\" 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\" />\n <BlockHandle />\n <DropIndicator />\n </div>\n </div>\n </ProseKit>\n</template>\n"
21
+ },
22
+ {
23
+ "path": "registry/src/vue/examples/block-handle/extension.ts",
24
+ "type": "registry:component",
25
+ "target": "components/editor/examples/block-handle/extension.ts",
26
+ "content": "import { defineBasicExtension } from 'prosekit/basic'\nimport { union } from 'prosekit/core'\n\nimport { defineCodeBlockView } from '../../ui/code-block-view'\n\nexport function defineExtension() {\n return union([defineBasicExtension(), defineCodeBlockView()])\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
27
+ },
28
+ {
29
+ "path": "registry/src/vue/examples/block-handle/index.ts",
30
+ "type": "registry:component",
31
+ "target": "components/editor/examples/block-handle/index.ts",
32
+ "content": "export { default as ExampleEditor } from './editor.vue'\n"
33
+ }
34
+ ],
35
+ "meta": {
36
+ "hasIcons": false,
37
+ "hidden": false,
38
+ "story": "block-handle",
39
+ "framework": "vue",
40
+ "accumulatedFiles": [
41
+ "registry/src/vue/examples/block-handle/editor.vue",
42
+ "registry/src/vue/examples/block-handle/extension.ts",
43
+ "registry/src/vue/examples/block-handle/index.ts",
44
+ "registry/src/vue/sample/sample-doc-block-handle.ts",
45
+ "registry/src/vue/ui/block-handle/block-handle.vue",
46
+ "registry/src/vue/ui/block-handle/index.ts",
47
+ "registry/src/vue/ui/code-block-view/code-block-view.vue",
48
+ "registry/src/vue/ui/code-block-view/index.ts",
49
+ "registry/src/vue/ui/drop-indicator/drop-indicator.vue",
50
+ "registry/src/vue/ui/drop-indicator/index.ts"
51
+ ],
52
+ "internalDependencies": [
53
+ "vue-sample-sample-doc-block-handle",
54
+ "vue-ui-block-handle",
55
+ "vue-ui-code-block-view",
56
+ "vue-ui-drop-indicator"
57
+ ]
58
+ },
59
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
60
+ }
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "vue-example-blockquote",
3
+ "title": "vue-example-blockquote",
4
+ "type": "registry:block",
5
+ "description": "Example for blockquote node.",
6
+ "registryDependencies": [
7
+ "https://prosekit.dev/r/vue-ui-toolbar.json"
8
+ ],
9
+ "dependencies": [
10
+ "prosekit"
11
+ ],
12
+ "files": [
13
+ {
14
+ "path": "registry/src/vue/examples/blockquote/editor.vue",
15
+ "type": "registry:component",
16
+ "target": "components/editor/examples/blockquote/editor.vue",
17
+ "content": "<script setup lang=\"ts\">\nimport 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/vue'\n\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\nconst extension = defineExtension()\nconst editor = createEditor({ extension })\n</script>\n\n<template>\n <ProseKit :editor=\"editor\">\n <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 <Toolbar />\n <div class=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div :ref=\"(el) => editor.mount(el as HTMLElement | null)\" 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\" />\n </div>\n </div>\n </ProseKit>\n</template>\n"
18
+ },
19
+ {
20
+ "path": "registry/src/vue/examples/blockquote/extension.ts",
21
+ "type": "registry:component",
22
+ "target": "components/editor/examples/blockquote/extension.ts",
23
+ "content": "import { defineBaseKeymap, union } from 'prosekit/core'\nimport { defineBlockquote } from 'prosekit/extensions/blockquote'\nimport { defineDoc } from 'prosekit/extensions/doc'\nimport { defineParagraph } from 'prosekit/extensions/paragraph'\nimport { defineText } from 'prosekit/extensions/text'\n\nexport function defineExtension() {\n return union(\n defineBaseKeymap(),\n defineDoc(),\n defineText(),\n defineParagraph(),\n defineBlockquote(),\n )\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
24
+ },
25
+ {
26
+ "path": "registry/src/vue/examples/blockquote/index.ts",
27
+ "type": "registry:component",
28
+ "target": "components/editor/examples/blockquote/index.ts",
29
+ "content": "export { default as ExampleEditor } from './editor.vue'\n"
30
+ }
31
+ ],
32
+ "meta": {
33
+ "hasIcons": false,
34
+ "hidden": false,
35
+ "story": "blockquote",
36
+ "framework": "vue",
37
+ "accumulatedFiles": [
38
+ "registry/src/vue/examples/blockquote/editor.vue",
39
+ "registry/src/vue/examples/blockquote/extension.ts",
40
+ "registry/src/vue/examples/blockquote/index.ts",
41
+ "registry/src/vue/ui/button/button.vue",
42
+ "registry/src/vue/ui/button/index.ts",
43
+ "registry/src/vue/ui/image-upload-popover/image-upload-popover.vue",
44
+ "registry/src/vue/ui/image-upload-popover/index.ts",
45
+ "registry/src/vue/ui/toolbar/index.ts",
46
+ "registry/src/vue/ui/toolbar/toolbar.vue"
47
+ ],
48
+ "internalDependencies": [
49
+ "vue-ui-toolbar"
50
+ ]
51
+ },
52
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
53
+ }
@@ -0,0 +1,56 @@
1
+ {
2
+ "name": "vue-example-bold",
3
+ "title": "vue-example-bold",
4
+ "type": "registry:block",
5
+ "description": "Example for bold mark.",
6
+ "registryDependencies": [
7
+ "https://prosekit.dev/r/vue-sample-sample-doc-bold.json",
8
+ "https://prosekit.dev/r/vue-ui-toolbar.json"
9
+ ],
10
+ "dependencies": [
11
+ "prosekit"
12
+ ],
13
+ "files": [
14
+ {
15
+ "path": "registry/src/vue/examples/bold/editor.vue",
16
+ "type": "registry:component",
17
+ "target": "components/editor/examples/bold/editor.vue",
18
+ "content": "<script setup lang=\"ts\">\nimport 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/vue'\n\nimport { sampleContent } from '../../sample/sample-doc-bold'\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\nconst props = defineProps<{\n initialContent?: NodeJSON\n}>()\n\nconst extension = defineExtension()\nconst defaultContent = props.initialContent ?? sampleContent\nconst editor = createEditor({ extension, defaultContent })\n</script>\n\n<template>\n <ProseKit :editor=\"editor\">\n <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 <Toolbar />\n <div class=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div :ref=\"(el) => editor.mount(el as HTMLElement | null)\" 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\" />\n </div>\n </div>\n </ProseKit>\n</template>\n"
19
+ },
20
+ {
21
+ "path": "registry/src/vue/examples/bold/extension.ts",
22
+ "type": "registry:component",
23
+ "target": "components/editor/examples/bold/extension.ts",
24
+ "content": "import { defineBaseKeymap, union } from 'prosekit/core'\nimport { defineBold } from 'prosekit/extensions/bold'\nimport { defineDoc } from 'prosekit/extensions/doc'\nimport { defineParagraph } from 'prosekit/extensions/paragraph'\nimport { defineText } from 'prosekit/extensions/text'\n\nexport function defineExtension() {\n return union(\n defineBaseKeymap(),\n defineDoc(),\n defineText(),\n defineParagraph(),\n defineBold(),\n )\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
25
+ },
26
+ {
27
+ "path": "registry/src/vue/examples/bold/index.ts",
28
+ "type": "registry:component",
29
+ "target": "components/editor/examples/bold/index.ts",
30
+ "content": "export { default as ExampleEditor } from './editor.vue'\n"
31
+ }
32
+ ],
33
+ "meta": {
34
+ "hasIcons": false,
35
+ "hidden": false,
36
+ "story": "bold",
37
+ "framework": "vue",
38
+ "accumulatedFiles": [
39
+ "registry/src/vue/examples/bold/editor.vue",
40
+ "registry/src/vue/examples/bold/extension.ts",
41
+ "registry/src/vue/examples/bold/index.ts",
42
+ "registry/src/vue/sample/sample-doc-bold.ts",
43
+ "registry/src/vue/ui/button/button.vue",
44
+ "registry/src/vue/ui/button/index.ts",
45
+ "registry/src/vue/ui/image-upload-popover/image-upload-popover.vue",
46
+ "registry/src/vue/ui/image-upload-popover/index.ts",
47
+ "registry/src/vue/ui/toolbar/index.ts",
48
+ "registry/src/vue/ui/toolbar/toolbar.vue"
49
+ ],
50
+ "internalDependencies": [
51
+ "vue-sample-sample-doc-bold",
52
+ "vue-ui-toolbar"
53
+ ]
54
+ },
55
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
56
+ }
@@ -0,0 +1,50 @@
1
+ {
2
+ "name": "vue-example-change-tracking",
3
+ "title": "vue-example-change-tracking",
4
+ "type": "registry:block",
5
+ "description": "Track and commit document changes with version history.",
6
+ "registryDependencies": [],
7
+ "dependencies": [
8
+ "prosekit"
9
+ ],
10
+ "files": [
11
+ {
12
+ "path": "registry/src/vue/examples/change-tracking/editor-diff.vue",
13
+ "type": "registry:component",
14
+ "target": "components/editor/examples/change-tracking/editor-diff.vue",
15
+ "content": "<script setup lang=\"ts\">\nimport { defineBasicExtension } from 'prosekit/basic'\nimport { createEditor, union } from 'prosekit/core'\nimport { defineCommitViewer, type Commit } from 'prosekit/extensions/commit'\nimport { defineReadonly } from 'prosekit/extensions/readonly'\nimport { ProseKit } from 'prosekit/vue'\n\nconst props = defineProps<{ commit: Commit }>()\n\nconst editor = createEditor({\n extension: union(\n defineBasicExtension(),\n defineReadonly(),\n defineCommitViewer(props.commit),\n ),\n})\n</script>\n\n<template>\n <ProseKit :editor=\"editor\">\n <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=\"(el) => editor.mount(el as HTMLElement | null)\" 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 </ProseKit>\n</template>\n"
16
+ },
17
+ {
18
+ "path": "registry/src/vue/examples/change-tracking/editor-main.vue",
19
+ "type": "registry:component",
20
+ "target": "components/editor/examples/change-tracking/editor-main.vue",
21
+ "content": "<script setup lang=\"ts\">\nimport 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { defineBasicExtension } from 'prosekit/basic'\nimport { createEditor, union, type NodeJSON } from 'prosekit/core'\nimport { defineCommitRecorder, type CommitRecorder } from 'prosekit/extensions/commit'\nimport { ProseKit } from 'prosekit/vue'\n\nconst props = defineProps<{\n commitRecorder: CommitRecorder\n initialContent?: NodeJSON\n}>()\n\nconst editor = createEditor({\n extension: union(\n defineBasicExtension(),\n defineCommitRecorder(props.commitRecorder),\n ),\n defaultContent: props.initialContent,\n})\n</script>\n\n<template>\n <ProseKit :editor=\"editor\">\n <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=\"(el) => editor.mount(el as HTMLElement | null)\" 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 </ProseKit>\n</template>\n"
22
+ },
23
+ {
24
+ "path": "registry/src/vue/examples/change-tracking/editor.vue",
25
+ "type": "registry:component",
26
+ "target": "components/editor/examples/change-tracking/editor.vue",
27
+ "content": "<script setup lang=\"ts\">\nimport 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport type { NodeJSON } from 'prosekit/core'\nimport { CommitRecorder, type Commit } from 'prosekit/extensions/commit'\nimport { ref } from 'vue'\n\nimport EditorDiff from './editor-diff.vue'\nimport EditorMain from './editor-main.vue'\n\nconst commits = ref<{ id: string; date: Date; commit: Commit }[]>([])\nconst key = ref(0)\nconst initialContent = ref<NodeJSON | undefined>()\nconst commitRecorder = new CommitRecorder()\n\nfunction handleCommit() {\n const commit = commitRecorder.commit()\n if (!commit) return\n const id = Math.random().toString(36).slice(2, 9)\n commits.value = [{ id, date: new Date(), commit }, ...commits.value]\n}\n\nfunction handleRestore(id: string) {\n const index = commits.value.findIndex((commit) => commit.id === id)\n const commit = commits.value[index]\n if (index === -1 || !commit) return\n const doc = commit.commit.doc\n initialContent.value = doc\n commits.value = commits.value.slice(index)\n key.value = key.value + 1\n}\n</script>\n\n<template>\n <div class=\"grid grid-cols-2 gap-2\">\n <div class=\"flex flex-col gap-4\">\n <div class=\"max-h-md\">\n <EditorMain\n :key=\"key\"\n :initial-content=\"initialContent\"\n :commit-recorder=\"commitRecorder\"\n />\n </div>\n <button class=\"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-white dark:ring-offset-gray-950 transition-colors focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-gray-900 dark:focus-visible:ring-gray-300 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 border-0 bg-gray-900 dark:bg-gray-50 text-gray-50 dark:text-gray-900 hover:bg-gray-900/90 dark:hover:bg-gray-50/90 h-10 px-4 py-2\" @click=\"handleCommit\">\n Save\n </button>\n </div>\n <div class=\"flex flex-col gap-4\">\n <div v-for=\"commit in commits\" :key=\"commit.id\">\n <div class=\"max-h-md\">\n <EditorDiff :commit=\"commit.commit\" />\n </div>\n <div class=\"w-full inline-flex justify-between p-1 text-sm\">\n <span class=\"opacity-50\">\n {{ commit.date.toLocaleTimeString() }}\n </span>\n <button\n class=\"underline opacity-50 hover:opacity-100\"\n @click=\"() => handleRestore(commit.id)\"\n >\n Restore\n </button>\n </div>\n </div>\n </div>\n </div>\n</template>\n"
28
+ },
29
+ {
30
+ "path": "registry/src/vue/examples/change-tracking/index.ts",
31
+ "type": "registry:component",
32
+ "target": "components/editor/examples/change-tracking/index.ts",
33
+ "content": "export { default as ExampleEditor } from './editor.vue'\n"
34
+ }
35
+ ],
36
+ "meta": {
37
+ "hasIcons": false,
38
+ "hidden": false,
39
+ "story": "change-tracking",
40
+ "framework": "vue",
41
+ "accumulatedFiles": [
42
+ "registry/src/vue/examples/change-tracking/editor-diff.vue",
43
+ "registry/src/vue/examples/change-tracking/editor-main.vue",
44
+ "registry/src/vue/examples/change-tracking/editor.vue",
45
+ "registry/src/vue/examples/change-tracking/index.ts"
46
+ ],
47
+ "internalDependencies": []
48
+ },
49
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
50
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "name": "vue-example-code-block-themes",
3
+ "title": "vue-example-code-block-themes",
4
+ "type": "registry:block",
5
+ "description": "Code block with multiple syntax highlighting themes.",
6
+ "registryDependencies": [
7
+ "https://prosekit.dev/r/vue-sample-sample-doc-code-block.json",
8
+ "https://prosekit.dev/r/vue-ui-code-block-view.json"
9
+ ],
10
+ "dependencies": [
11
+ "prosekit"
12
+ ],
13
+ "files": [
14
+ {
15
+ "path": "registry/src/vue/examples/code-block-themes/editor.vue",
16
+ "type": "registry:component",
17
+ "target": "components/editor/examples/code-block-themes/editor.vue",
18
+ "content": "<script setup lang=\"ts\">\nimport 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/vue'\n\nimport { sampleContent } from '../../sample/sample-doc-code-block'\n\nimport { defineExtension } from './extension'\nimport Toolbar from './toolbar.vue'\n\nconst props = defineProps<{\n initialContent?: NodeJSON\n}>()\n\nconst extension = defineExtension()\nconst defaultContent = props.initialContent ?? sampleContent\nconst editor = createEditor({\n extension,\n defaultContent,\n})\n</script>\n\n<template>\n <ProseKit :editor=\"editor\">\n <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 <Toolbar />\n <div class=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div :ref=\"(el) => editor.mount(el as HTMLElement | null)\" 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\" />\n </div>\n </div>\n </ProseKit>\n</template>\n"
19
+ },
20
+ {
21
+ "path": "registry/src/vue/examples/code-block-themes/extension.ts",
22
+ "type": "registry:component",
23
+ "target": "components/editor/examples/code-block-themes/extension.ts",
24
+ "content": "import { defineBasicExtension } from 'prosekit/basic'\nimport { union } from 'prosekit/core'\n\nimport { defineCodeBlockView } from '../../ui/code-block-view'\n\nexport function defineExtension() {\n return union(defineBasicExtension(), defineCodeBlockView())\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
25
+ },
26
+ {
27
+ "path": "registry/src/vue/examples/code-block-themes/index.ts",
28
+ "type": "registry:component",
29
+ "target": "components/editor/examples/code-block-themes/index.ts",
30
+ "content": "export { default as ExampleEditor } from './editor.vue'\n"
31
+ },
32
+ {
33
+ "path": "registry/src/vue/examples/code-block-themes/theme-selector.vue",
34
+ "type": "registry:component",
35
+ "target": "components/editor/examples/code-block-themes/theme-selector.vue",
36
+ "content": "<script setup lang=\"ts\">\nimport { defineCodeBlockShiki, shikiBundledThemesInfo, type ShikiBundledTheme } from 'prosekit/extensions/code-block'\nimport { useExtension } from 'prosekit/vue'\nimport { computed, ref } from 'vue'\n\nconst theme = ref<ShikiBundledTheme>('github-dark')\nconst extension = computed(() => {\n return defineCodeBlockShiki({ themes: [theme.value] })\n})\n\nuseExtension(extension)\n</script>\n\n<template>\n <label for=\"code-block-theme-selector\">Theme</label>\n <select\n id=\"code-block-theme-selector\"\n v-model=\"theme\"\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 >\n <option\n v-for=\"info in shikiBundledThemesInfo\"\n :key=\"info.id\"\n :value=\"info.id\"\n >\n {{ info.id }}\n </option>\n </select>\n</template>\n"
37
+ },
38
+ {
39
+ "path": "registry/src/vue/examples/code-block-themes/toolbar.vue",
40
+ "type": "registry:component",
41
+ "target": "components/editor/examples/code-block-themes/toolbar.vue",
42
+ "content": "<script setup lang=\"ts\">\nimport ThemeSelector from './theme-selector.vue'\n</script>\n\n<template>\n <div class=\"z-2 box-border border-gray-200 dark:border-gray-800 border-solid border-l-0 border-r-0 border-t-0 border-b flex flex-wrap gap-1 p-2 items-center\">\n <ThemeSelector />\n </div>\n</template>\n"
43
+ }
44
+ ],
45
+ "meta": {
46
+ "hasIcons": false,
47
+ "hidden": false,
48
+ "story": "code-block-themes",
49
+ "framework": "vue",
50
+ "accumulatedFiles": [
51
+ "registry/src/vue/examples/code-block-themes/editor.vue",
52
+ "registry/src/vue/examples/code-block-themes/extension.ts",
53
+ "registry/src/vue/examples/code-block-themes/index.ts",
54
+ "registry/src/vue/examples/code-block-themes/theme-selector.vue",
55
+ "registry/src/vue/examples/code-block-themes/toolbar.vue",
56
+ "registry/src/vue/sample/sample-doc-code-block.ts",
57
+ "registry/src/vue/ui/code-block-view/code-block-view.vue",
58
+ "registry/src/vue/ui/code-block-view/index.ts"
59
+ ],
60
+ "internalDependencies": [
61
+ "vue-sample-sample-doc-code-block",
62
+ "vue-ui-code-block-view"
63
+ ]
64
+ },
65
+ "$schema": "https://ui.shadcn.com/schema/registry-item.json"
66
+ }