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.
- package/LICENSE +21 -0
- package/README.md +241 -0
- package/dist/r/lit-example-minimal.json +36 -0
- package/dist/r/lit-example-slash-menu.json +55 -0
- package/dist/r/lit-example-table.json +56 -0
- package/dist/r/lit-example-toolbar.json +60 -0
- package/dist/r/lit-sample-sample-doc-table.json +29 -0
- package/dist/r/lit-sample-sample-uploader.json +29 -0
- package/dist/r/lit-ui-button.json +36 -0
- package/dist/r/lit-ui-editor-context.json +30 -0
- package/dist/r/lit-ui-image-upload-popover.json +42 -0
- package/dist/r/lit-ui-slash-menu.json +56 -0
- package/dist/r/lit-ui-table-handle.json +47 -0
- package/dist/r/lit-ui-toolbar.json +55 -0
- package/dist/r/preact-example-block-handle.json +60 -0
- package/dist/r/preact-example-blockquote.json +53 -0
- package/dist/r/preact-example-bold.json +56 -0
- package/dist/r/preact-example-change-tracking.json +50 -0
- package/dist/r/preact-example-code-block-themes.json +66 -0
- package/dist/r/preact-example-code-block.json +60 -0
- package/dist/r/preact-example-code.json +56 -0
- package/dist/r/preact-example-drop-cursor.json +48 -0
- package/dist/r/preact-example-emoji-rules.json +50 -0
- package/dist/r/preact-example-full.json +106 -0
- package/dist/r/preact-example-gap-cursor.json +48 -0
- package/dist/r/preact-example-hard-break.json +59 -0
- package/dist/r/preact-example-heading.json +56 -0
- package/dist/r/preact-example-horizontal-rule.json +53 -0
- package/dist/r/preact-example-image-view.json +55 -0
- package/dist/r/preact-example-inline-menu.json +54 -0
- package/dist/r/preact-example-italic.json +56 -0
- package/dist/r/preact-example-keymap.json +63 -0
- package/dist/r/preact-example-link-mark-view.json +55 -0
- package/dist/r/preact-example-link.json +54 -0
- package/dist/r/preact-example-list-custom-checkbox.json +63 -0
- package/dist/r/preact-example-list.json +56 -0
- package/dist/r/preact-example-loro.json +62 -0
- package/dist/r/preact-example-mark-rule.json +50 -0
- package/dist/r/preact-example-minimal.json +36 -0
- package/dist/r/preact-example-page.json +49 -0
- package/dist/r/preact-example-placeholder.json +43 -0
- package/dist/r/preact-example-readonly.json +66 -0
- package/dist/r/preact-example-rtl.json +74 -0
- package/dist/r/preact-example-save-html.json +36 -0
- package/dist/r/preact-example-save-json.json +36 -0
- package/dist/r/preact-example-save-markdown.json +50 -0
- package/dist/r/preact-example-search.json +54 -0
- package/dist/r/preact-example-slash-menu.json +51 -0
- package/dist/r/preact-example-strike.json +59 -0
- package/dist/r/preact-example-table.json +52 -0
- package/dist/r/preact-example-temml.json +51 -0
- package/dist/r/preact-example-text-align.json +59 -0
- package/dist/r/preact-example-text-color.json +59 -0
- package/dist/r/preact-example-toolbar.json +56 -0
- package/dist/r/preact-example-typography.json +59 -0
- package/dist/r/preact-example-underline.json +56 -0
- package/dist/r/preact-example-unmount.json +58 -0
- package/dist/r/preact-example-user-menu-dynamic.json +67 -0
- package/dist/r/preact-example-user-menu.json +59 -0
- package/dist/r/preact-example-view-adapter.json +58 -0
- package/dist/r/preact-example-word-counter.json +52 -0
- package/dist/r/preact-example-yjs.json +62 -0
- package/dist/r/preact-sample-define-atom-block.json +29 -0
- package/dist/r/preact-sample-katex.json +29 -0
- package/dist/r/preact-sample-sample-doc-block-handle.json +29 -0
- package/dist/r/preact-sample-sample-doc-bold.json +29 -0
- package/dist/r/preact-sample-sample-doc-code-block.json +29 -0
- package/dist/r/preact-sample-sample-doc-code.json +29 -0
- package/dist/r/preact-sample-sample-doc-drop-cursor.json +29 -0
- package/dist/r/preact-sample-sample-doc-full.json +29 -0
- package/dist/r/preact-sample-sample-doc-gap-cursor.json +29 -0
- package/dist/r/preact-sample-sample-doc-hard-break.json +29 -0
- package/dist/r/preact-sample-sample-doc-heading.json +29 -0
- package/dist/r/preact-sample-sample-doc-image.json +29 -0
- package/dist/r/preact-sample-sample-doc-inline-menu.json +29 -0
- package/dist/r/preact-sample-sample-doc-italic.json +29 -0
- package/dist/r/preact-sample-sample-doc-link-mark-view.json +29 -0
- package/dist/r/preact-sample-sample-doc-link.json +29 -0
- package/dist/r/preact-sample-sample-doc-list-custom-checkbox.json +29 -0
- package/dist/r/preact-sample-sample-doc-list.json +29 -0
- package/dist/r/preact-sample-sample-doc-page.json +29 -0
- package/dist/r/preact-sample-sample-doc-readonly.json +29 -0
- package/dist/r/preact-sample-sample-doc-rtl.json +29 -0
- package/dist/r/preact-sample-sample-doc-search.json +29 -0
- package/dist/r/preact-sample-sample-doc-strike.json +29 -0
- package/dist/r/preact-sample-sample-doc-table.json +29 -0
- package/dist/r/preact-sample-sample-doc-tex.json +29 -0
- package/dist/r/preact-sample-sample-doc-text-align.json +29 -0
- package/dist/r/preact-sample-sample-doc-text-color.json +29 -0
- package/dist/r/preact-sample-sample-doc-typography.json +29 -0
- package/dist/r/preact-sample-sample-doc-underline.json +29 -0
- package/dist/r/preact-sample-sample-doc-view-adapter.json +29 -0
- package/dist/r/preact-sample-sample-doc-word-counter.json +29 -0
- package/dist/r/preact-sample-sample-query-users.json +32 -0
- package/dist/r/preact-sample-sample-tag-data.json +27 -0
- package/dist/r/preact-sample-sample-uploader.json +29 -0
- package/dist/r/preact-sample-sample-user-data.json +27 -0
- package/dist/r/preact-sample-temml.json +29 -0
- package/dist/r/preact-ui-block-handle.json +41 -0
- package/dist/r/preact-ui-button.json +36 -0
- package/dist/r/preact-ui-code-block-view.json +36 -0
- package/dist/r/preact-ui-drop-indicator.json +36 -0
- package/dist/r/preact-ui-image-upload-popover.json +42 -0
- package/dist/r/preact-ui-image-view.json +41 -0
- package/dist/r/preact-ui-inline-menu.json +47 -0
- package/dist/r/preact-ui-search.json +47 -0
- package/dist/r/preact-ui-slash-menu.json +50 -0
- package/dist/r/preact-ui-table-handle.json +41 -0
- package/dist/r/preact-ui-tag-menu.json +36 -0
- package/dist/r/preact-ui-toolbar.json +51 -0
- package/dist/r/preact-ui-user-menu.json +36 -0
- package/dist/r/preact-ui-word-counter.json +36 -0
- package/dist/r/react-example-block-handle.json +60 -0
- package/dist/r/react-example-blockquote.json +53 -0
- package/dist/r/react-example-bold.json +56 -0
- package/dist/r/react-example-change-tracking.json +50 -0
- package/dist/r/react-example-code-block-themes.json +66 -0
- package/dist/r/react-example-code-block.json +60 -0
- package/dist/r/react-example-code.json +56 -0
- package/dist/r/react-example-drop-cursor.json +48 -0
- package/dist/r/react-example-emoji-rules.json +50 -0
- package/dist/r/react-example-full.json +113 -0
- package/dist/r/react-example-gap-cursor.json +48 -0
- package/dist/r/react-example-hard-break.json +59 -0
- package/dist/r/react-example-heading.json +56 -0
- package/dist/r/react-example-horizontal-rule.json +53 -0
- package/dist/r/react-example-image-view.json +55 -0
- package/dist/r/react-example-inline-menu.json +54 -0
- package/dist/r/react-example-italic.json +56 -0
- package/dist/r/react-example-keymap.json +63 -0
- package/dist/r/react-example-link-mark-view.json +55 -0
- package/dist/r/react-example-link.json +54 -0
- package/dist/r/react-example-list-custom-checkbox.json +63 -0
- package/dist/r/react-example-list.json +56 -0
- package/dist/r/react-example-loro.json +62 -0
- package/dist/r/react-example-mark-rule.json +50 -0
- package/dist/r/react-example-minimal.json +36 -0
- package/dist/r/react-example-notion.json +166 -0
- package/dist/r/react-example-page.json +62 -0
- package/dist/r/react-example-placeholder.json +43 -0
- package/dist/r/react-example-readonly.json +66 -0
- package/dist/r/react-example-rtl.json +74 -0
- package/dist/r/react-example-save-html.json +36 -0
- package/dist/r/react-example-save-json.json +36 -0
- package/dist/r/react-example-save-markdown.json +50 -0
- package/dist/r/react-example-search.json +54 -0
- package/dist/r/react-example-slash-menu.json +51 -0
- package/dist/r/react-example-strike.json +59 -0
- package/dist/r/react-example-table.json +52 -0
- package/dist/r/react-example-temml.json +51 -0
- package/dist/r/react-example-text-align.json +59 -0
- package/dist/r/react-example-text-color.json +59 -0
- package/dist/r/react-example-toolbar.json +56 -0
- package/dist/r/react-example-tweet.json +63 -0
- package/dist/r/react-example-typography.json +59 -0
- package/dist/r/react-example-underline.json +56 -0
- package/dist/r/react-example-unmount.json +58 -0
- package/dist/r/react-example-user-menu-dynamic.json +67 -0
- package/dist/r/react-example-user-menu.json +59 -0
- package/dist/r/react-example-view-adapter.json +58 -0
- package/dist/r/react-example-word-counter.json +52 -0
- package/dist/r/react-example-yjs.json +62 -0
- package/dist/r/react-sample-define-atom-block.json +29 -0
- package/dist/r/react-sample-katex.json +29 -0
- package/dist/r/react-sample-sample-doc-block-handle.json +29 -0
- package/dist/r/react-sample-sample-doc-bold.json +29 -0
- package/dist/r/react-sample-sample-doc-code-block.json +29 -0
- package/dist/r/react-sample-sample-doc-code.json +29 -0
- package/dist/r/react-sample-sample-doc-drop-cursor.json +29 -0
- package/dist/r/react-sample-sample-doc-full.json +29 -0
- package/dist/r/react-sample-sample-doc-gap-cursor.json +29 -0
- package/dist/r/react-sample-sample-doc-hard-break.json +29 -0
- package/dist/r/react-sample-sample-doc-heading.json +29 -0
- package/dist/r/react-sample-sample-doc-image.json +29 -0
- package/dist/r/react-sample-sample-doc-inline-menu.json +29 -0
- package/dist/r/react-sample-sample-doc-italic.json +29 -0
- package/dist/r/react-sample-sample-doc-link-mark-view.json +29 -0
- package/dist/r/react-sample-sample-doc-link.json +29 -0
- package/dist/r/react-sample-sample-doc-list-custom-checkbox.json +29 -0
- package/dist/r/react-sample-sample-doc-list.json +29 -0
- package/dist/r/react-sample-sample-doc-notion.json +29 -0
- package/dist/r/react-sample-sample-doc-page.json +29 -0
- package/dist/r/react-sample-sample-doc-readonly.json +29 -0
- package/dist/r/react-sample-sample-doc-rtl.json +29 -0
- package/dist/r/react-sample-sample-doc-search.json +29 -0
- package/dist/r/react-sample-sample-doc-strike.json +29 -0
- package/dist/r/react-sample-sample-doc-table.json +29 -0
- package/dist/r/react-sample-sample-doc-tex.json +29 -0
- package/dist/r/react-sample-sample-doc-text-align.json +29 -0
- package/dist/r/react-sample-sample-doc-text-color.json +29 -0
- package/dist/r/react-sample-sample-doc-tweet.json +29 -0
- package/dist/r/react-sample-sample-doc-typography.json +29 -0
- package/dist/r/react-sample-sample-doc-underline.json +29 -0
- package/dist/r/react-sample-sample-doc-view-adapter.json +29 -0
- package/dist/r/react-sample-sample-doc-word-counter.json +29 -0
- package/dist/r/react-sample-sample-query-users.json +32 -0
- package/dist/r/react-sample-sample-tag-data.json +27 -0
- package/dist/r/react-sample-sample-uploader.json +29 -0
- package/dist/r/react-sample-sample-user-data.json +27 -0
- package/dist/r/react-sample-temml.json +29 -0
- package/dist/r/react-ui-block-handle.json +41 -0
- package/dist/r/react-ui-button.json +36 -0
- package/dist/r/react-ui-code-block-view.json +36 -0
- package/dist/r/react-ui-drop-indicator.json +36 -0
- package/dist/r/react-ui-image-upload-popover.json +42 -0
- package/dist/r/react-ui-image-view.json +41 -0
- package/dist/r/react-ui-inline-menu.json +47 -0
- package/dist/r/react-ui-search.json +47 -0
- package/dist/r/react-ui-slash-menu.json +50 -0
- package/dist/r/react-ui-table-handle.json +41 -0
- package/dist/r/react-ui-tag-menu.json +36 -0
- package/dist/r/react-ui-toolbar.json +51 -0
- package/dist/r/react-ui-user-menu.json +36 -0
- package/dist/r/react-ui-word-counter.json +36 -0
- package/dist/r/registry.json +20642 -0
- package/dist/r/solid-example-block-handle.json +60 -0
- package/dist/r/solid-example-blockquote.json +53 -0
- package/dist/r/solid-example-bold.json +56 -0
- package/dist/r/solid-example-change-tracking.json +50 -0
- package/dist/r/solid-example-code-block-themes.json +66 -0
- package/dist/r/solid-example-code-block.json +60 -0
- package/dist/r/solid-example-code.json +56 -0
- package/dist/r/solid-example-drop-cursor.json +48 -0
- package/dist/r/solid-example-emoji-rules.json +50 -0
- package/dist/r/solid-example-full.json +106 -0
- package/dist/r/solid-example-gap-cursor.json +48 -0
- package/dist/r/solid-example-hard-break.json +59 -0
- package/dist/r/solid-example-heading.json +56 -0
- package/dist/r/solid-example-horizontal-rule.json +53 -0
- package/dist/r/solid-example-image-view.json +55 -0
- package/dist/r/solid-example-inline-menu.json +54 -0
- package/dist/r/solid-example-italic.json +56 -0
- package/dist/r/solid-example-keymap.json +63 -0
- package/dist/r/solid-example-link-mark-view.json +55 -0
- package/dist/r/solid-example-link.json +54 -0
- package/dist/r/solid-example-list-custom-checkbox.json +63 -0
- package/dist/r/solid-example-list.json +56 -0
- package/dist/r/solid-example-loro.json +62 -0
- package/dist/r/solid-example-mark-rule.json +50 -0
- package/dist/r/solid-example-minimal.json +36 -0
- package/dist/r/solid-example-placeholder.json +43 -0
- package/dist/r/solid-example-readonly.json +66 -0
- package/dist/r/solid-example-rtl.json +74 -0
- package/dist/r/solid-example-save-html.json +36 -0
- package/dist/r/solid-example-save-json.json +36 -0
- package/dist/r/solid-example-save-markdown.json +50 -0
- package/dist/r/solid-example-search.json +54 -0
- package/dist/r/solid-example-slash-menu.json +51 -0
- package/dist/r/solid-example-strike.json +59 -0
- package/dist/r/solid-example-table.json +52 -0
- package/dist/r/solid-example-temml.json +51 -0
- package/dist/r/solid-example-text-align.json +59 -0
- package/dist/r/solid-example-text-color.json +59 -0
- package/dist/r/solid-example-toolbar.json +56 -0
- package/dist/r/solid-example-typography.json +59 -0
- package/dist/r/solid-example-underline.json +56 -0
- package/dist/r/solid-example-unmount.json +58 -0
- package/dist/r/solid-example-user-menu-dynamic.json +67 -0
- package/dist/r/solid-example-user-menu.json +59 -0
- package/dist/r/solid-example-view-adapter.json +58 -0
- package/dist/r/solid-example-word-counter.json +52 -0
- package/dist/r/solid-example-yjs.json +62 -0
- package/dist/r/solid-sample-define-atom-block.json +29 -0
- package/dist/r/solid-sample-katex.json +29 -0
- package/dist/r/solid-sample-sample-doc-block-handle.json +29 -0
- package/dist/r/solid-sample-sample-doc-bold.json +29 -0
- package/dist/r/solid-sample-sample-doc-code-block.json +29 -0
- package/dist/r/solid-sample-sample-doc-code.json +29 -0
- package/dist/r/solid-sample-sample-doc-drop-cursor.json +29 -0
- package/dist/r/solid-sample-sample-doc-full.json +29 -0
- package/dist/r/solid-sample-sample-doc-gap-cursor.json +29 -0
- package/dist/r/solid-sample-sample-doc-hard-break.json +29 -0
- package/dist/r/solid-sample-sample-doc-heading.json +29 -0
- package/dist/r/solid-sample-sample-doc-image.json +29 -0
- package/dist/r/solid-sample-sample-doc-inline-menu.json +29 -0
- package/dist/r/solid-sample-sample-doc-italic.json +29 -0
- package/dist/r/solid-sample-sample-doc-link-mark-view.json +29 -0
- package/dist/r/solid-sample-sample-doc-link.json +29 -0
- package/dist/r/solid-sample-sample-doc-list-custom-checkbox.json +29 -0
- package/dist/r/solid-sample-sample-doc-list.json +29 -0
- package/dist/r/solid-sample-sample-doc-readonly.json +29 -0
- package/dist/r/solid-sample-sample-doc-rtl.json +29 -0
- package/dist/r/solid-sample-sample-doc-search.json +29 -0
- package/dist/r/solid-sample-sample-doc-strike.json +29 -0
- package/dist/r/solid-sample-sample-doc-table.json +29 -0
- package/dist/r/solid-sample-sample-doc-tex.json +29 -0
- package/dist/r/solid-sample-sample-doc-text-align.json +29 -0
- package/dist/r/solid-sample-sample-doc-text-color.json +29 -0
- package/dist/r/solid-sample-sample-doc-typography.json +29 -0
- package/dist/r/solid-sample-sample-doc-underline.json +29 -0
- package/dist/r/solid-sample-sample-doc-view-adapter.json +29 -0
- package/dist/r/solid-sample-sample-doc-word-counter.json +29 -0
- package/dist/r/solid-sample-sample-query-users.json +32 -0
- package/dist/r/solid-sample-sample-tag-data.json +27 -0
- package/dist/r/solid-sample-sample-uploader.json +29 -0
- package/dist/r/solid-sample-sample-user-data.json +27 -0
- package/dist/r/solid-sample-temml.json +29 -0
- package/dist/r/solid-ui-block-handle.json +41 -0
- package/dist/r/solid-ui-button.json +36 -0
- package/dist/r/solid-ui-code-block-view.json +36 -0
- package/dist/r/solid-ui-drop-indicator.json +36 -0
- package/dist/r/solid-ui-image-upload-popover.json +42 -0
- package/dist/r/solid-ui-image-view.json +41 -0
- package/dist/r/solid-ui-inline-menu.json +47 -0
- package/dist/r/solid-ui-search.json +47 -0
- package/dist/r/solid-ui-slash-menu.json +50 -0
- package/dist/r/solid-ui-table-handle.json +41 -0
- package/dist/r/solid-ui-tag-menu.json +36 -0
- package/dist/r/solid-ui-toolbar.json +51 -0
- package/dist/r/solid-ui-user-menu.json +36 -0
- package/dist/r/solid-ui-word-counter.json +36 -0
- package/dist/r/svelte-example-block-handle.json +60 -0
- package/dist/r/svelte-example-blockquote.json +53 -0
- package/dist/r/svelte-example-bold.json +56 -0
- package/dist/r/svelte-example-change-tracking.json +50 -0
- package/dist/r/svelte-example-code-block-themes.json +66 -0
- package/dist/r/svelte-example-code-block.json +60 -0
- package/dist/r/svelte-example-code.json +56 -0
- package/dist/r/svelte-example-drop-cursor.json +48 -0
- package/dist/r/svelte-example-emoji-rules.json +50 -0
- package/dist/r/svelte-example-full.json +106 -0
- package/dist/r/svelte-example-gap-cursor.json +48 -0
- package/dist/r/svelte-example-hard-break.json +59 -0
- package/dist/r/svelte-example-heading.json +56 -0
- package/dist/r/svelte-example-horizontal-rule.json +53 -0
- package/dist/r/svelte-example-image-view.json +55 -0
- package/dist/r/svelte-example-inline-menu.json +54 -0
- package/dist/r/svelte-example-italic.json +56 -0
- package/dist/r/svelte-example-katex.json +51 -0
- package/dist/r/svelte-example-keymap.json +56 -0
- package/dist/r/svelte-example-link-mark-view.json +55 -0
- package/dist/r/svelte-example-link.json +54 -0
- package/dist/r/svelte-example-list-custom-checkbox.json +63 -0
- package/dist/r/svelte-example-list.json +56 -0
- package/dist/r/svelte-example-loro.json +62 -0
- package/dist/r/svelte-example-mark-rule.json +50 -0
- package/dist/r/svelte-example-minimal.json +36 -0
- package/dist/r/svelte-example-page.json +62 -0
- package/dist/r/svelte-example-placeholder.json +43 -0
- package/dist/r/svelte-example-readonly.json +59 -0
- package/dist/r/svelte-example-rtl.json +74 -0
- package/dist/r/svelte-example-save-html.json +36 -0
- package/dist/r/svelte-example-save-json.json +36 -0
- package/dist/r/svelte-example-save-markdown.json +50 -0
- package/dist/r/svelte-example-search.json +54 -0
- package/dist/r/svelte-example-slash-menu.json +51 -0
- package/dist/r/svelte-example-strike.json +59 -0
- package/dist/r/svelte-example-table.json +52 -0
- package/dist/r/svelte-example-text-align.json +59 -0
- package/dist/r/svelte-example-text-color.json +59 -0
- package/dist/r/svelte-example-toolbar.json +56 -0
- package/dist/r/svelte-example-typography.json +59 -0
- package/dist/r/svelte-example-underline.json +56 -0
- package/dist/r/svelte-example-unmount.json +58 -0
- package/dist/r/svelte-example-user-menu-dynamic.json +67 -0
- package/dist/r/svelte-example-user-menu.json +59 -0
- package/dist/r/svelte-example-view-adapter.json +58 -0
- package/dist/r/svelte-example-word-counter.json +52 -0
- package/dist/r/svelte-example-yjs.json +62 -0
- package/dist/r/svelte-sample-define-atom-block.json +29 -0
- package/dist/r/svelte-sample-katex.json +29 -0
- package/dist/r/svelte-sample-sample-doc-block-handle.json +29 -0
- package/dist/r/svelte-sample-sample-doc-bold.json +29 -0
- package/dist/r/svelte-sample-sample-doc-code-block.json +29 -0
- package/dist/r/svelte-sample-sample-doc-code.json +29 -0
- package/dist/r/svelte-sample-sample-doc-drop-cursor.json +29 -0
- package/dist/r/svelte-sample-sample-doc-full.json +29 -0
- package/dist/r/svelte-sample-sample-doc-gap-cursor.json +29 -0
- package/dist/r/svelte-sample-sample-doc-hard-break.json +29 -0
- package/dist/r/svelte-sample-sample-doc-heading.json +29 -0
- package/dist/r/svelte-sample-sample-doc-image.json +29 -0
- package/dist/r/svelte-sample-sample-doc-inline-menu.json +29 -0
- package/dist/r/svelte-sample-sample-doc-italic.json +29 -0
- package/dist/r/svelte-sample-sample-doc-link-mark-view.json +29 -0
- package/dist/r/svelte-sample-sample-doc-link.json +29 -0
- package/dist/r/svelte-sample-sample-doc-list-custom-checkbox.json +29 -0
- package/dist/r/svelte-sample-sample-doc-list.json +29 -0
- package/dist/r/svelte-sample-sample-doc-page.json +29 -0
- package/dist/r/svelte-sample-sample-doc-readonly.json +29 -0
- package/dist/r/svelte-sample-sample-doc-rtl.json +29 -0
- package/dist/r/svelte-sample-sample-doc-search.json +29 -0
- package/dist/r/svelte-sample-sample-doc-strike.json +29 -0
- package/dist/r/svelte-sample-sample-doc-table.json +29 -0
- package/dist/r/svelte-sample-sample-doc-tex.json +29 -0
- package/dist/r/svelte-sample-sample-doc-text-align.json +29 -0
- package/dist/r/svelte-sample-sample-doc-text-color.json +29 -0
- package/dist/r/svelte-sample-sample-doc-typography.json +29 -0
- package/dist/r/svelte-sample-sample-doc-underline.json +29 -0
- package/dist/r/svelte-sample-sample-doc-view-adapter.json +29 -0
- package/dist/r/svelte-sample-sample-doc-word-counter.json +29 -0
- package/dist/r/svelte-sample-sample-query-users.json +32 -0
- package/dist/r/svelte-sample-sample-tag-data.json +27 -0
- package/dist/r/svelte-sample-sample-uploader.json +29 -0
- package/dist/r/svelte-sample-sample-user-data.json +27 -0
- package/dist/r/svelte-ui-block-handle.json +41 -0
- package/dist/r/svelte-ui-button.json +36 -0
- package/dist/r/svelte-ui-code-block-view.json +36 -0
- package/dist/r/svelte-ui-drop-indicator.json +36 -0
- package/dist/r/svelte-ui-image-upload-popover.json +42 -0
- package/dist/r/svelte-ui-image-view.json +41 -0
- package/dist/r/svelte-ui-inline-menu.json +47 -0
- package/dist/r/svelte-ui-search.json +47 -0
- package/dist/r/svelte-ui-slash-menu.json +50 -0
- package/dist/r/svelte-ui-table-handle.json +41 -0
- package/dist/r/svelte-ui-tag-menu.json +36 -0
- package/dist/r/svelte-ui-toolbar.json +51 -0
- package/dist/r/svelte-ui-user-menu.json +36 -0
- package/dist/r/svelte-ui-word-counter.json +36 -0
- package/dist/r/vanilla-example-minimal.json +36 -0
- package/dist/r/vanilla-example-slash-menu.json +51 -0
- package/dist/r/vanilla-ui-slash-menu.json +50 -0
- package/dist/r/vue-example-block-handle.json +60 -0
- package/dist/r/vue-example-blockquote.json +53 -0
- package/dist/r/vue-example-bold.json +56 -0
- package/dist/r/vue-example-change-tracking.json +50 -0
- package/dist/r/vue-example-code-block-themes.json +66 -0
- package/dist/r/vue-example-code-block.json +60 -0
- package/dist/r/vue-example-code.json +56 -0
- package/dist/r/vue-example-drop-cursor.json +48 -0
- package/dist/r/vue-example-emoji-rules.json +50 -0
- package/dist/r/vue-example-full.json +106 -0
- package/dist/r/vue-example-gap-cursor.json +48 -0
- package/dist/r/vue-example-hard-break.json +59 -0
- package/dist/r/vue-example-heading.json +56 -0
- package/dist/r/vue-example-horizontal-rule.json +53 -0
- package/dist/r/vue-example-image-view.json +55 -0
- package/dist/r/vue-example-inline-menu.json +54 -0
- package/dist/r/vue-example-italic.json +56 -0
- package/dist/r/vue-example-katex.json +51 -0
- package/dist/r/vue-example-keymap.json +63 -0
- package/dist/r/vue-example-link-mark-view.json +55 -0
- package/dist/r/vue-example-link.json +54 -0
- package/dist/r/vue-example-list-custom-checkbox.json +63 -0
- package/dist/r/vue-example-list.json +56 -0
- package/dist/r/vue-example-loro.json +62 -0
- package/dist/r/vue-example-mark-rule.json +50 -0
- package/dist/r/vue-example-minimal.json +36 -0
- package/dist/r/vue-example-placeholder.json +43 -0
- package/dist/r/vue-example-readonly.json +66 -0
- package/dist/r/vue-example-rtl.json +74 -0
- package/dist/r/vue-example-save-html.json +36 -0
- package/dist/r/vue-example-save-json.json +36 -0
- package/dist/r/vue-example-save-markdown.json +50 -0
- package/dist/r/vue-example-search.json +54 -0
- package/dist/r/vue-example-slash-menu.json +51 -0
- package/dist/r/vue-example-strike.json +59 -0
- package/dist/r/vue-example-table.json +52 -0
- package/dist/r/vue-example-text-align.json +59 -0
- package/dist/r/vue-example-text-color.json +59 -0
- package/dist/r/vue-example-toolbar.json +56 -0
- package/dist/r/vue-example-tweet.json +63 -0
- package/dist/r/vue-example-typography.json +59 -0
- package/dist/r/vue-example-underline.json +56 -0
- package/dist/r/vue-example-unmount.json +58 -0
- package/dist/r/vue-example-user-menu-dynamic.json +67 -0
- package/dist/r/vue-example-user-menu.json +59 -0
- package/dist/r/vue-example-view-adapter.json +58 -0
- package/dist/r/vue-example-word-counter.json +52 -0
- package/dist/r/vue-example-yjs.json +62 -0
- package/dist/r/vue-sample-define-atom-block.json +29 -0
- package/dist/r/vue-sample-katex.json +29 -0
- package/dist/r/vue-sample-sample-doc-block-handle.json +29 -0
- package/dist/r/vue-sample-sample-doc-bold.json +29 -0
- package/dist/r/vue-sample-sample-doc-code-block.json +29 -0
- package/dist/r/vue-sample-sample-doc-code.json +29 -0
- package/dist/r/vue-sample-sample-doc-drop-cursor.json +29 -0
- package/dist/r/vue-sample-sample-doc-full.json +29 -0
- package/dist/r/vue-sample-sample-doc-gap-cursor.json +29 -0
- package/dist/r/vue-sample-sample-doc-hard-break.json +29 -0
- package/dist/r/vue-sample-sample-doc-heading.json +29 -0
- package/dist/r/vue-sample-sample-doc-image.json +29 -0
- package/dist/r/vue-sample-sample-doc-inline-menu.json +29 -0
- package/dist/r/vue-sample-sample-doc-italic.json +29 -0
- package/dist/r/vue-sample-sample-doc-link-mark-view.json +29 -0
- package/dist/r/vue-sample-sample-doc-link.json +29 -0
- package/dist/r/vue-sample-sample-doc-list-custom-checkbox.json +29 -0
- package/dist/r/vue-sample-sample-doc-list.json +29 -0
- package/dist/r/vue-sample-sample-doc-readonly.json +29 -0
- package/dist/r/vue-sample-sample-doc-rtl.json +29 -0
- package/dist/r/vue-sample-sample-doc-search.json +29 -0
- package/dist/r/vue-sample-sample-doc-strike.json +29 -0
- package/dist/r/vue-sample-sample-doc-table.json +29 -0
- package/dist/r/vue-sample-sample-doc-tex.json +29 -0
- package/dist/r/vue-sample-sample-doc-text-align.json +29 -0
- package/dist/r/vue-sample-sample-doc-text-color.json +29 -0
- package/dist/r/vue-sample-sample-doc-tweet.json +29 -0
- package/dist/r/vue-sample-sample-doc-typography.json +29 -0
- package/dist/r/vue-sample-sample-doc-underline.json +29 -0
- package/dist/r/vue-sample-sample-doc-view-adapter.json +29 -0
- package/dist/r/vue-sample-sample-doc-word-counter.json +29 -0
- package/dist/r/vue-sample-sample-query-users.json +32 -0
- package/dist/r/vue-sample-sample-tag-data.json +27 -0
- package/dist/r/vue-sample-sample-uploader.json +29 -0
- package/dist/r/vue-sample-sample-user-data.json +27 -0
- package/dist/r/vue-ui-block-handle.json +41 -0
- package/dist/r/vue-ui-button.json +36 -0
- package/dist/r/vue-ui-code-block-view.json +36 -0
- package/dist/r/vue-ui-drop-indicator.json +36 -0
- package/dist/r/vue-ui-image-upload-popover.json +42 -0
- package/dist/r/vue-ui-image-view.json +41 -0
- package/dist/r/vue-ui-inline-menu.json +47 -0
- package/dist/r/vue-ui-search.json +47 -0
- package/dist/r/vue-ui-slash-menu.json +50 -0
- package/dist/r/vue-ui-table-handle.json +41 -0
- package/dist/r/vue-ui-tag-menu.json +36 -0
- package/dist/r/vue-ui-toolbar.json +51 -0
- package/dist/r/vue-ui-user-menu.json +36 -0
- package/dist/r/vue-ui-word-counter.json +36 -0
- package/package.json +353 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "preact-example-inline-menu",
|
|
3
|
+
"title": "preact-example-inline-menu",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Inline formatting menu that appears on text selection.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://prosekit.dev/r/preact-sample-sample-doc-inline-menu.json",
|
|
8
|
+
"https://prosekit.dev/r/preact-ui-inline-menu.json"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": [
|
|
11
|
+
"prosekit"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "registry/src/preact/examples/inline-menu/editor.tsx",
|
|
16
|
+
"type": "registry:component",
|
|
17
|
+
"target": "components/editor/examples/inline-menu/editor.tsx",
|
|
18
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-inline-menu'\nimport { InlineMenu } from '../../ui/inline-menu'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n return createEditor({ extension: defineExtension(), defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div 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 <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} 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\"></div>\n <InlineMenu />\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "registry/src/preact/examples/inline-menu/extension.ts",
|
|
22
|
+
"type": "registry:component",
|
|
23
|
+
"target": "components/editor/examples/inline-menu/extension.ts",
|
|
24
|
+
"content": "import { defineBasicExtension } from 'prosekit/basic'\n\nexport function defineExtension() {\n return defineBasicExtension()\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "registry/src/preact/examples/inline-menu/index.ts",
|
|
28
|
+
"type": "registry:component",
|
|
29
|
+
"target": "components/editor/examples/inline-menu/index.ts",
|
|
30
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"meta": {
|
|
34
|
+
"hasIcons": false,
|
|
35
|
+
"hidden": false,
|
|
36
|
+
"story": "inline-menu",
|
|
37
|
+
"framework": "preact",
|
|
38
|
+
"accumulatedFiles": [
|
|
39
|
+
"registry/src/preact/examples/inline-menu/editor.tsx",
|
|
40
|
+
"registry/src/preact/examples/inline-menu/extension.ts",
|
|
41
|
+
"registry/src/preact/examples/inline-menu/index.ts",
|
|
42
|
+
"registry/src/preact/sample/sample-doc-inline-menu.ts",
|
|
43
|
+
"registry/src/preact/ui/button/button.tsx",
|
|
44
|
+
"registry/src/preact/ui/button/index.ts",
|
|
45
|
+
"registry/src/preact/ui/inline-menu/index.ts",
|
|
46
|
+
"registry/src/preact/ui/inline-menu/inline-menu.tsx"
|
|
47
|
+
],
|
|
48
|
+
"internalDependencies": [
|
|
49
|
+
"preact-sample-sample-doc-inline-menu",
|
|
50
|
+
"preact-ui-inline-menu"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
54
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "preact-example-italic",
|
|
3
|
+
"title": "preact-example-italic",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Example for italic mark.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://prosekit.dev/r/preact-sample-sample-doc-italic.json",
|
|
8
|
+
"https://prosekit.dev/r/preact-ui-toolbar.json"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": [
|
|
11
|
+
"prosekit"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "registry/src/preact/examples/italic/editor.tsx",
|
|
16
|
+
"type": "registry:component",
|
|
17
|
+
"target": "components/editor/examples/italic/editor.tsx",
|
|
18
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-italic'\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div 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 <Toolbar />\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} 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\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "registry/src/preact/examples/italic/extension.ts",
|
|
22
|
+
"type": "registry:component",
|
|
23
|
+
"target": "components/editor/examples/italic/extension.ts",
|
|
24
|
+
"content": "import { defineBaseKeymap, union } from 'prosekit/core'\nimport { defineDoc } from 'prosekit/extensions/doc'\nimport { defineItalic } from 'prosekit/extensions/italic'\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 defineItalic(),\n )\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "registry/src/preact/examples/italic/index.ts",
|
|
28
|
+
"type": "registry:component",
|
|
29
|
+
"target": "components/editor/examples/italic/index.ts",
|
|
30
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"meta": {
|
|
34
|
+
"hasIcons": false,
|
|
35
|
+
"hidden": false,
|
|
36
|
+
"story": "italic",
|
|
37
|
+
"framework": "preact",
|
|
38
|
+
"accumulatedFiles": [
|
|
39
|
+
"registry/src/preact/examples/italic/editor.tsx",
|
|
40
|
+
"registry/src/preact/examples/italic/extension.ts",
|
|
41
|
+
"registry/src/preact/examples/italic/index.ts",
|
|
42
|
+
"registry/src/preact/sample/sample-doc-italic.ts",
|
|
43
|
+
"registry/src/preact/ui/button/button.tsx",
|
|
44
|
+
"registry/src/preact/ui/button/index.ts",
|
|
45
|
+
"registry/src/preact/ui/image-upload-popover/image-upload-popover.tsx",
|
|
46
|
+
"registry/src/preact/ui/image-upload-popover/index.ts",
|
|
47
|
+
"registry/src/preact/ui/toolbar/index.ts",
|
|
48
|
+
"registry/src/preact/ui/toolbar/toolbar.tsx"
|
|
49
|
+
],
|
|
50
|
+
"internalDependencies": [
|
|
51
|
+
"preact-sample-sample-doc-italic",
|
|
52
|
+
"preact-ui-toolbar"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
56
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "preact-example-keymap",
|
|
3
|
+
"title": "preact-example-keymap",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Custom keyboard shortcuts and key bindings.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://prosekit.dev/r/preact-ui-button.json"
|
|
8
|
+
],
|
|
9
|
+
"dependencies": [
|
|
10
|
+
"prosekit"
|
|
11
|
+
],
|
|
12
|
+
"files": [
|
|
13
|
+
{
|
|
14
|
+
"path": "registry/src/preact/examples/keymap/editor.tsx",
|
|
15
|
+
"type": "registry:component",
|
|
16
|
+
"target": "components/editor/examples/keymap/editor.tsx",
|
|
17
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useCallback, useMemo, useState } from 'preact/hooks'\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { defineExtension } from './extension'\nimport Toolbar from './toolbar'\n\nexport default function Editor() {\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension })\n }, [])\n\n const [submissions, setSubmissions] = useState<string[]>([])\n\n const pushSubmission = useCallback(\n (hotkey: string) => {\n const docString = JSON.stringify(editor.getDocJSON())\n const submission = `${new Date().toISOString()}\\t${hotkey}\\n${docString}`\n setSubmissions((prev) => [...prev, submission])\n },\n [editor],\n )\n\n return (\n <ProseKit editor={editor}>\n <div 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 <Toolbar onSubmit={pushSubmission} />\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} 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\"></div>\n </div>\n </div>\n <fieldset className=\"mt-4 box-border flex max-w-full w-full overflow-x-auto border p-4 rounded-md shadow-sm min-w-0\">\n <legend>Submit Records</legend>\n <ol>\n {submissions.map((submission, index) => (\n <li key={index}>\n <pre>{submission}</pre>\n </li>\n ))}\n </ol>\n {submissions.length === 0 && <div>No submissions yet</div>}\n </fieldset>\n </ProseKit>\n )\n}\n"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"path": "registry/src/preact/examples/keymap/extension.ts",
|
|
21
|
+
"type": "registry:component",
|
|
22
|
+
"target": "components/editor/examples/keymap/extension.ts",
|
|
23
|
+
"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"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "registry/src/preact/examples/keymap/index.ts",
|
|
27
|
+
"type": "registry:component",
|
|
28
|
+
"target": "components/editor/examples/keymap/index.ts",
|
|
29
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"path": "registry/src/preact/examples/keymap/toolbar.tsx",
|
|
33
|
+
"type": "registry:component",
|
|
34
|
+
"target": "components/editor/examples/keymap/toolbar.tsx",
|
|
35
|
+
"content": "import { useState } from 'preact/hooks'\n\nimport { Button } from '../../ui/button'\n\nimport { useSubmitKeymap } from './use-submit-keymap'\n\nexport default function Toolbar(props: {\n onSubmit: (hotkey: string) => void\n}) {\n const [hotkey, setHotkey] = useState<'Shift-Enter' | 'Enter'>('Shift-Enter')\n useSubmitKeymap(hotkey, props.onSubmit)\n\n return (\n <div className=\"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 <Button\n pressed={hotkey === 'Shift-Enter'}\n onClick={() => setHotkey('Shift-Enter')}\n >\n <span className=\"mr-1\">Submit with</span>\n <kbd>Shift + Enter</kbd>\n </Button>\n\n <Button pressed={hotkey === 'Enter'} onClick={() => setHotkey('Enter')}>\n <span className=\"mr-1\">Submit with</span>\n <kbd>Enter</kbd>\n </Button>\n </div>\n )\n}\n"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"path": "registry/src/preact/examples/keymap/use-submit-keymap.ts",
|
|
39
|
+
"type": "registry:component",
|
|
40
|
+
"target": "components/editor/examples/keymap/use-submit-keymap.ts",
|
|
41
|
+
"content": "import { useMemo } from 'preact/hooks'\nimport type { Keymap } from 'prosekit/core'\nimport { useKeymap } from 'prosekit/preact'\n\nexport function useSubmitKeymap(\n hotkey: 'Shift-Enter' | 'Enter',\n onSubmit: (hotkey: string) => void,\n) {\n const keymap: Keymap = useMemo(() => {\n return {\n [hotkey]: () => {\n onSubmit(hotkey)\n return true\n },\n }\n }, [hotkey, onSubmit])\n\n useKeymap(keymap)\n}\n"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
"meta": {
|
|
45
|
+
"hasIcons": false,
|
|
46
|
+
"hidden": false,
|
|
47
|
+
"story": "keymap",
|
|
48
|
+
"framework": "preact",
|
|
49
|
+
"accumulatedFiles": [
|
|
50
|
+
"registry/src/preact/examples/keymap/editor.tsx",
|
|
51
|
+
"registry/src/preact/examples/keymap/extension.ts",
|
|
52
|
+
"registry/src/preact/examples/keymap/index.ts",
|
|
53
|
+
"registry/src/preact/examples/keymap/toolbar.tsx",
|
|
54
|
+
"registry/src/preact/examples/keymap/use-submit-keymap.ts",
|
|
55
|
+
"registry/src/preact/ui/button/button.tsx",
|
|
56
|
+
"registry/src/preact/ui/button/index.ts"
|
|
57
|
+
],
|
|
58
|
+
"internalDependencies": [
|
|
59
|
+
"preact-ui-button"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
63
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "preact-example-link-mark-view",
|
|
3
|
+
"title": "preact-example-link-mark-view",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "An example showing how to render a mark as a custom component.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://prosekit.dev/r/preact-sample-sample-doc-link-mark-view.json"
|
|
8
|
+
],
|
|
9
|
+
"dependencies": [
|
|
10
|
+
"prosekit"
|
|
11
|
+
],
|
|
12
|
+
"files": [
|
|
13
|
+
{
|
|
14
|
+
"path": "registry/src/preact/examples/link-mark-view/editor.tsx",
|
|
15
|
+
"type": "registry:component",
|
|
16
|
+
"target": "components/editor/examples/link-mark-view/editor.tsx",
|
|
17
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-link-mark-view'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div 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 <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} 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\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"path": "registry/src/preact/examples/link-mark-view/extension.ts",
|
|
21
|
+
"type": "registry:component",
|
|
22
|
+
"target": "components/editor/examples/link-mark-view/extension.ts",
|
|
23
|
+
"content": "import { defineBasicExtension } from 'prosekit/basic'\nimport { union } from 'prosekit/core'\nimport { definePreactMarkView } from 'prosekit/preact'\n\nimport LinkView from './link-view'\n\nexport function defineExtension() {\n return union(\n defineBasicExtension(),\n definePreactMarkView({\n name: 'link',\n component: LinkView,\n }),\n )\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "registry/src/preact/examples/link-mark-view/index.ts",
|
|
27
|
+
"type": "registry:component",
|
|
28
|
+
"target": "components/editor/examples/link-mark-view/index.ts",
|
|
29
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"path": "registry/src/preact/examples/link-mark-view/link-view.tsx",
|
|
33
|
+
"type": "registry:component",
|
|
34
|
+
"target": "components/editor/examples/link-mark-view/link-view.tsx",
|
|
35
|
+
"content": "import { useEffect, useState } from 'preact/hooks'\nimport type { PreactMarkViewProps } from 'prosekit/preact'\n\nconst colors = [\n '#f06292',\n '#ba68c8',\n '#9575cd',\n '#7986cb',\n '#64b5f6',\n '#4fc3f7',\n '#4dd0e1',\n '#4db6ac',\n '#81c784',\n '#aed581',\n '#ffb74d',\n '#ffa726',\n '#ff8a65',\n '#d4e157',\n '#ffd54f',\n '#ffecb3',\n] as const\n\nfunction pickRandomColor() {\n return colors[Math.floor(Math.random() * colors.length)]\n}\n\nexport default function Link(props: PreactMarkViewProps) {\n const [color, setColor] = useState<string>(colors[0])\n const href = props.mark.attrs.href as string\n\n useEffect(() => {\n const interval = setInterval(() => {\n setColor(pickRandomColor())\n }, 1000)\n return () => clearInterval(interval)\n }, [])\n\n return (\n <a\n href={href}\n ref={props.contentRef}\n style={{ color, transition: 'color 1s ease-in-out' }}\n >\n </a>\n )\n}\n"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"meta": {
|
|
39
|
+
"hasIcons": false,
|
|
40
|
+
"hidden": false,
|
|
41
|
+
"story": "link-mark-view",
|
|
42
|
+
"framework": "preact",
|
|
43
|
+
"accumulatedFiles": [
|
|
44
|
+
"registry/src/preact/examples/link-mark-view/editor.tsx",
|
|
45
|
+
"registry/src/preact/examples/link-mark-view/extension.ts",
|
|
46
|
+
"registry/src/preact/examples/link-mark-view/index.ts",
|
|
47
|
+
"registry/src/preact/examples/link-mark-view/link-view.tsx",
|
|
48
|
+
"registry/src/preact/sample/sample-doc-link-mark-view.ts"
|
|
49
|
+
],
|
|
50
|
+
"internalDependencies": [
|
|
51
|
+
"preact-sample-sample-doc-link-mark-view"
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
55
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "preact-example-link",
|
|
3
|
+
"title": "preact-example-link",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Example for link mark with URL input.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://prosekit.dev/r/preact-sample-sample-doc-link.json",
|
|
8
|
+
"https://prosekit.dev/r/preact-ui-inline-menu.json"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": [
|
|
11
|
+
"prosekit"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "registry/src/preact/examples/link/editor.tsx",
|
|
16
|
+
"type": "registry:component",
|
|
17
|
+
"target": "components/editor/examples/link/editor.tsx",
|
|
18
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-link'\nimport { InlineMenu } from '../../ui/inline-menu'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div 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 <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} 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\"></div>\n <InlineMenu />\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "registry/src/preact/examples/link/extension.ts",
|
|
22
|
+
"type": "registry:component",
|
|
23
|
+
"target": "components/editor/examples/link/extension.ts",
|
|
24
|
+
"content": "import { defineBaseKeymap, union } from 'prosekit/core'\nimport { defineDoc } from 'prosekit/extensions/doc'\nimport { defineLink } from 'prosekit/extensions/link'\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 defineLink(),\n )\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "registry/src/preact/examples/link/index.ts",
|
|
28
|
+
"type": "registry:component",
|
|
29
|
+
"target": "components/editor/examples/link/index.ts",
|
|
30
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"meta": {
|
|
34
|
+
"hasIcons": false,
|
|
35
|
+
"hidden": false,
|
|
36
|
+
"story": "link",
|
|
37
|
+
"framework": "preact",
|
|
38
|
+
"accumulatedFiles": [
|
|
39
|
+
"registry/src/preact/examples/link/editor.tsx",
|
|
40
|
+
"registry/src/preact/examples/link/extension.ts",
|
|
41
|
+
"registry/src/preact/examples/link/index.ts",
|
|
42
|
+
"registry/src/preact/sample/sample-doc-link.ts",
|
|
43
|
+
"registry/src/preact/ui/button/button.tsx",
|
|
44
|
+
"registry/src/preact/ui/button/index.ts",
|
|
45
|
+
"registry/src/preact/ui/inline-menu/index.ts",
|
|
46
|
+
"registry/src/preact/ui/inline-menu/inline-menu.tsx"
|
|
47
|
+
],
|
|
48
|
+
"internalDependencies": [
|
|
49
|
+
"preact-sample-sample-doc-link",
|
|
50
|
+
"preact-ui-inline-menu"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
54
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "preact-example-list-custom-checkbox",
|
|
3
|
+
"title": "preact-example-list-custom-checkbox",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Custom checkbox styling for task lists.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://prosekit.dev/r/preact-sample-sample-doc-list-custom-checkbox.json",
|
|
8
|
+
"https://prosekit.dev/r/preact-ui-toolbar.json"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": [
|
|
11
|
+
"prosekit"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "registry/src/preact/examples/list-custom-checkbox/custom-list.css",
|
|
16
|
+
"type": "registry:component",
|
|
17
|
+
"target": "components/editor/examples/list-custom-checkbox/custom-list.css",
|
|
18
|
+
"content": "div[data-custom-list-css-enabled] .ProseMirror .prosemirror-flat-list[data-list-kind=\"task\"] {\n & > .list-marker label {\n box-sizing: border-box;\n display: flex;\n position: relative;\n left: calc(var(--spacing) * -0.5);\n align-items: center;\n cursor: pointer;\n transition: transform 0.15s ease-in-out;\n\n &:hover {\n transform: scale(1.1);\n }\n\n &::after {\n position: absolute;\n width: calc(var(--spacing) * 5);\n height: calc(var(--spacing) * 5);\n content: \"\";\n color: var(--color-white);\n opacity: 0;\n }\n\n /* https://api.iconify.design/lucide.css?icons=check */\n &::after {\n display: inline-block;\n background-color: currentColor;\n -webkit-mask-image: var(--svg);\n mask-image: var(--svg);\n -webkit-mask-repeat: no-repeat;\n mask-repeat: no-repeat;\n -webkit-mask-size: 100% 100%;\n mask-size: 100% 100%;\n --svg: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' width='24' height='24'%3E%3Cpath fill='none' stroke='black' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M20 6L9 17l-5-5'/%3E%3C/svg%3E\");\n }\n\n & input {\n box-sizing: border-box;\n appearance: none;\n width: calc(var(--spacing) * 5);\n height: calc(var(--spacing) * 5);\n margin: 0;\n border-width: 1px;\n border-style: solid;\n border-radius: var(--radius-md);\n border-color: color-mix(in srgb, var(--color-gray-300) 50%, transparent);\n box-shadow: var(--shadow-sm);\n cursor: pointer;\n transition: all 0.15s ease-in-out;\n\n &:hover {\n box-shadow: var(--shadow-md);\n }\n\n &:checked {\n border-color: var(--color-red-500);\n background-color: var(--color-red-500);\n }\n }\n }\n\n &[data-list-checked] > .list-marker label {\n &::after {\n opacity: 1;\n }\n }\n\n &[data-list-checked] {\n color: var(--color-gray-400);\n text-decoration: line-through;\n text-decoration-color: var(--color-gray-400);\n }\n}\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "registry/src/preact/examples/list-custom-checkbox/editor.tsx",
|
|
22
|
+
"type": "registry:component",
|
|
23
|
+
"target": "components/editor/examples/list-custom-checkbox/editor.tsx",
|
|
24
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\nimport './custom-list.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-list-custom-checkbox'\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({\n extension,\n defaultContent,\n })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div 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\" data-custom-list-css-enabled>\n <Toolbar />\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} 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\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "registry/src/preact/examples/list-custom-checkbox/extension.ts",
|
|
28
|
+
"type": "registry:component",
|
|
29
|
+
"target": "components/editor/examples/list-custom-checkbox/extension.ts",
|
|
30
|
+
"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"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "registry/src/preact/examples/list-custom-checkbox/index.ts",
|
|
34
|
+
"type": "registry:component",
|
|
35
|
+
"target": "components/editor/examples/list-custom-checkbox/index.ts",
|
|
36
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"meta": {
|
|
40
|
+
"hasIcons": false,
|
|
41
|
+
"hidden": false,
|
|
42
|
+
"story": "list-custom-checkbox",
|
|
43
|
+
"framework": "preact",
|
|
44
|
+
"accumulatedFiles": [
|
|
45
|
+
"registry/src/preact/examples/list-custom-checkbox/custom-list.css",
|
|
46
|
+
"registry/src/preact/examples/list-custom-checkbox/editor.tsx",
|
|
47
|
+
"registry/src/preact/examples/list-custom-checkbox/extension.ts",
|
|
48
|
+
"registry/src/preact/examples/list-custom-checkbox/index.ts",
|
|
49
|
+
"registry/src/preact/sample/sample-doc-list-custom-checkbox.ts",
|
|
50
|
+
"registry/src/preact/ui/button/button.tsx",
|
|
51
|
+
"registry/src/preact/ui/button/index.ts",
|
|
52
|
+
"registry/src/preact/ui/image-upload-popover/image-upload-popover.tsx",
|
|
53
|
+
"registry/src/preact/ui/image-upload-popover/index.ts",
|
|
54
|
+
"registry/src/preact/ui/toolbar/index.ts",
|
|
55
|
+
"registry/src/preact/ui/toolbar/toolbar.tsx"
|
|
56
|
+
],
|
|
57
|
+
"internalDependencies": [
|
|
58
|
+
"preact-sample-sample-doc-list-custom-checkbox",
|
|
59
|
+
"preact-ui-toolbar"
|
|
60
|
+
]
|
|
61
|
+
},
|
|
62
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
63
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "preact-example-list",
|
|
3
|
+
"title": "preact-example-list",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Example for list node.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://prosekit.dev/r/preact-sample-sample-doc-list.json",
|
|
8
|
+
"https://prosekit.dev/r/preact-ui-toolbar.json"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": [
|
|
11
|
+
"prosekit"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "registry/src/preact/examples/list/editor.tsx",
|
|
16
|
+
"type": "registry:component",
|
|
17
|
+
"target": "components/editor/examples/list/editor.tsx",
|
|
18
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-list'\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div 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 <Toolbar />\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} 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\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "registry/src/preact/examples/list/extension.ts",
|
|
22
|
+
"type": "registry:component",
|
|
23
|
+
"target": "components/editor/examples/list/extension.ts",
|
|
24
|
+
"content": "import { defineBaseKeymap, union } from 'prosekit/core'\nimport { defineDoc } from 'prosekit/extensions/doc'\nimport { defineList } from 'prosekit/extensions/list'\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 defineList(),\n )\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "registry/src/preact/examples/list/index.ts",
|
|
28
|
+
"type": "registry:component",
|
|
29
|
+
"target": "components/editor/examples/list/index.ts",
|
|
30
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"meta": {
|
|
34
|
+
"hasIcons": false,
|
|
35
|
+
"hidden": false,
|
|
36
|
+
"story": "list",
|
|
37
|
+
"framework": "preact",
|
|
38
|
+
"accumulatedFiles": [
|
|
39
|
+
"registry/src/preact/examples/list/editor.tsx",
|
|
40
|
+
"registry/src/preact/examples/list/extension.ts",
|
|
41
|
+
"registry/src/preact/examples/list/index.ts",
|
|
42
|
+
"registry/src/preact/sample/sample-doc-list.ts",
|
|
43
|
+
"registry/src/preact/ui/button/button.tsx",
|
|
44
|
+
"registry/src/preact/ui/button/index.ts",
|
|
45
|
+
"registry/src/preact/ui/image-upload-popover/image-upload-popover.tsx",
|
|
46
|
+
"registry/src/preact/ui/image-upload-popover/index.ts",
|
|
47
|
+
"registry/src/preact/ui/toolbar/index.ts",
|
|
48
|
+
"registry/src/preact/ui/toolbar/toolbar.tsx"
|
|
49
|
+
],
|
|
50
|
+
"internalDependencies": [
|
|
51
|
+
"preact-sample-sample-doc-list",
|
|
52
|
+
"preact-ui-toolbar"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
56
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "preact-example-loro",
|
|
3
|
+
"title": "preact-example-loro",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Real-time collaboration using Loro CRDT library.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://prosekit.dev/r/preact-ui-toolbar.json"
|
|
8
|
+
],
|
|
9
|
+
"dependencies": [
|
|
10
|
+
"loro-crdt",
|
|
11
|
+
"loro-prosemirror",
|
|
12
|
+
"prosekit"
|
|
13
|
+
],
|
|
14
|
+
"files": [
|
|
15
|
+
{
|
|
16
|
+
"path": "registry/src/preact/examples/loro/editor-component.tsx",
|
|
17
|
+
"type": "registry:component",
|
|
18
|
+
"target": "components/editor/examples/loro/editor-component.tsx",
|
|
19
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\nimport 'prosekit/extensions/loro/style.css'\n\nimport type { CursorAwareness, LoroDocType } from 'loro-prosemirror'\nimport { useMemo } from 'preact/hooks'\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\nexport default function EditorComponent(props: {\n loro: LoroDocType\n awareness: CursorAwareness\n}) {\n const editor = useMemo(() => {\n const extension = defineExtension(props.loro, props.awareness)\n return createEditor({ extension })\n }, [props.loro, props.awareness])\n\n return (\n <ProseKit editor={editor}>\n <div 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 <Toolbar />\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} 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\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"path": "registry/src/preact/examples/loro/editor.tsx",
|
|
23
|
+
"type": "registry:component",
|
|
24
|
+
"target": "components/editor/examples/loro/editor.tsx",
|
|
25
|
+
"content": "import { LoroDoc, type AwarenessListener } from 'loro-crdt'\nimport { CursorAwareness, type LoroDocType } from 'loro-prosemirror'\nimport { useEffect, useState } from 'preact/hooks'\n\nimport EditorComponent from './editor-component'\n\nexport default function Page() {\n const { loroA, awarenessA, loroB, awarenessB } = useLoroDocs()\n\n return (\n <div className=\"h-full flex flex-col gap-2\">\n <EditorComponent loro={loroA} awareness={awarenessA} />\n <EditorComponent loro={loroB} awareness={awarenessB} />\n </div>\n )\n}\n\nfunction useLoroDocs() {\n const [loroState] = useState(() => {\n const loroA: LoroDocType = new LoroDoc()\n const loroB: LoroDocType = new LoroDoc()\n\n const idA = loroA.peerIdStr\n const idB = loroB.peerIdStr\n\n const awarenessA = new CursorAwareness(idA)\n const awarenessB = new CursorAwareness(idB)\n\n return { loroA, loroB, idA, idB, awarenessA, awarenessB }\n })\n\n useEffect(() => {\n const { loroA, loroB, idA, idB, awarenessA, awarenessB } = loroState\n loroA.import(loroB.export({ mode: 'update' }))\n loroB.import(loroA.export({ mode: 'update' }))\n const unsubscribeA = loroA.subscribeLocalUpdates((updates) => {\n loroB.import(updates)\n })\n const unsubscribeB = loroB.subscribeLocalUpdates((updates) => {\n loroA.import(updates)\n })\n const awarenessAListener: AwarenessListener = (_, origin) => {\n if (origin === 'local') {\n awarenessB.apply(awarenessA.encode([idA]))\n }\n }\n const awarenessBListener: AwarenessListener = (_, origin) => {\n if (origin === 'local') {\n awarenessA.apply(awarenessB.encode([idB]))\n }\n }\n awarenessA.addListener(awarenessAListener)\n awarenessB.addListener(awarenessBListener)\n return () => {\n awarenessA.removeListener(awarenessAListener)\n awarenessB.removeListener(awarenessBListener)\n unsubscribeA()\n unsubscribeB()\n }\n }, [loroState])\n\n return loroState\n}\n"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"path": "registry/src/preact/examples/loro/extension.ts",
|
|
29
|
+
"type": "registry:component",
|
|
30
|
+
"target": "components/editor/examples/loro/extension.ts",
|
|
31
|
+
"content": "import type { CursorAwareness, LoroDocType } from 'loro-prosemirror'\nimport { defineBaseCommands, defineBaseKeymap, union } from 'prosekit/core'\nimport { defineBlockquote } from 'prosekit/extensions/blockquote'\nimport { defineBold } from 'prosekit/extensions/bold'\nimport { defineCode } from 'prosekit/extensions/code'\nimport { defineDoc } from 'prosekit/extensions/doc'\nimport { defineDropCursor } from 'prosekit/extensions/drop-cursor'\nimport { defineHeading } from 'prosekit/extensions/heading'\nimport { defineImage } from 'prosekit/extensions/image'\nimport { defineItalic } from 'prosekit/extensions/italic'\nimport { defineLink } from 'prosekit/extensions/link'\nimport { defineList } from 'prosekit/extensions/list'\nimport { defineLoro } from 'prosekit/extensions/loro'\nimport { defineModClickPrevention } from 'prosekit/extensions/mod-click-prevention'\nimport { defineParagraph } from 'prosekit/extensions/paragraph'\nimport { defineStrike } from 'prosekit/extensions/strike'\nimport { defineTable } from 'prosekit/extensions/table'\nimport { defineText } from 'prosekit/extensions/text'\nimport { defineUnderline } from 'prosekit/extensions/underline'\nimport { defineVirtualSelection } from 'prosekit/extensions/virtual-selection'\n\nexport function defineExtension(doc: LoroDocType, awareness: CursorAwareness) {\n return union([\n defineDoc(),\n defineText(),\n defineHeading(),\n defineList(),\n defineBlockquote(),\n defineBaseKeymap(),\n defineBaseCommands(),\n defineItalic(),\n defineBold(),\n defineUnderline(),\n defineStrike(),\n defineCode(),\n defineLink(),\n defineImage(),\n defineParagraph(),\n defineDropCursor(),\n defineVirtualSelection(),\n defineModClickPrevention(),\n defineTable(),\n defineLoro({ doc, awareness }),\n ])\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"path": "registry/src/preact/examples/loro/index.ts",
|
|
35
|
+
"type": "registry:component",
|
|
36
|
+
"target": "components/editor/examples/loro/index.ts",
|
|
37
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"meta": {
|
|
41
|
+
"hasIcons": false,
|
|
42
|
+
"hidden": false,
|
|
43
|
+
"story": "loro",
|
|
44
|
+
"framework": "preact",
|
|
45
|
+
"accumulatedFiles": [
|
|
46
|
+
"registry/src/preact/examples/loro/editor-component.tsx",
|
|
47
|
+
"registry/src/preact/examples/loro/editor.tsx",
|
|
48
|
+
"registry/src/preact/examples/loro/extension.ts",
|
|
49
|
+
"registry/src/preact/examples/loro/index.ts",
|
|
50
|
+
"registry/src/preact/ui/button/button.tsx",
|
|
51
|
+
"registry/src/preact/ui/button/index.ts",
|
|
52
|
+
"registry/src/preact/ui/image-upload-popover/image-upload-popover.tsx",
|
|
53
|
+
"registry/src/preact/ui/image-upload-popover/index.ts",
|
|
54
|
+
"registry/src/preact/ui/toolbar/index.ts",
|
|
55
|
+
"registry/src/preact/ui/toolbar/toolbar.tsx"
|
|
56
|
+
],
|
|
57
|
+
"internalDependencies": [
|
|
58
|
+
"preact-ui-toolbar"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
62
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "preact-example-mark-rule",
|
|
3
|
+
"title": "preact-example-mark-rule",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Input rules for automatic mark formatting.",
|
|
6
|
+
"registryDependencies": [],
|
|
7
|
+
"dependencies": [
|
|
8
|
+
"prosekit"
|
|
9
|
+
],
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"path": "registry/src/preact/examples/mark-rule/editor.tsx",
|
|
13
|
+
"type": "registry:component",
|
|
14
|
+
"target": "components/editor/examples/mark-rule/editor.tsx",
|
|
15
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { defineExtension } from './extension'\n\nexport default function Editor() {\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension })\n }, [])\n\n return (\n <ProseKit editor={editor}>\n <div 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 <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} 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\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"path": "registry/src/preact/examples/mark-rule/extension.ts",
|
|
19
|
+
"type": "registry:component",
|
|
20
|
+
"target": "components/editor/examples/mark-rule/extension.ts",
|
|
21
|
+
"content": "import { defineBaseCommands, defineBaseKeymap, defineHistory, union } from 'prosekit/core'\nimport { defineDoc } from 'prosekit/extensions/doc'\nimport { defineLinkMarkRule, defineLinkSpec } from 'prosekit/extensions/link'\nimport { defineParagraph } from 'prosekit/extensions/paragraph'\nimport { definePlaceholder } from 'prosekit/extensions/placeholder'\nimport { defineText } from 'prosekit/extensions/text'\nimport { defineVirtualSelection } from 'prosekit/extensions/virtual-selection'\n\nimport { defineIssueLink } from './issue-link'\n\nexport function defineExtension() {\n return union(\n defineDoc(),\n defineText(),\n defineParagraph(),\n defineHistory(),\n defineBaseKeymap(),\n defineBaseCommands(),\n defineVirtualSelection(),\n defineLinkSpec(),\n defineLinkMarkRule(),\n definePlaceholder({ placeholder: 'Try typing #123' }),\n defineIssueLink(),\n )\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"path": "registry/src/preact/examples/mark-rule/index.ts",
|
|
25
|
+
"type": "registry:component",
|
|
26
|
+
"target": "components/editor/examples/mark-rule/index.ts",
|
|
27
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"path": "registry/src/preact/examples/mark-rule/issue-link.ts",
|
|
31
|
+
"type": "registry:component",
|
|
32
|
+
"target": "components/editor/examples/mark-rule/issue-link.ts",
|
|
33
|
+
"content": "import { defineMarkSpec, union } from 'prosekit/core'\nimport { defineMarkRule } from 'prosekit/extensions/mark-rule'\n\nexport function defineIssueLink() {\n return union(\n defineMarkSpec({\n name: 'issueLink',\n inclusive: false,\n attrs: {\n issueNumber: {},\n },\n toDOM(node) {\n const issueNumber = node.attrs.issueNumber as number\n return [\n 'a',\n {\n href: `https://example.com/issues/${issueNumber}`,\n title: `Issue #${issueNumber}`,\n },\n 0,\n ]\n },\n }),\n defineMarkRule({\n regex: /#(\\d+)/g,\n type: 'issueLink',\n attrs: (match) => {\n return { issueNumber: Number.parseInt(match[1] || '0') }\n },\n }),\n )\n}\n"
|
|
34
|
+
}
|
|
35
|
+
],
|
|
36
|
+
"meta": {
|
|
37
|
+
"hasIcons": false,
|
|
38
|
+
"hidden": false,
|
|
39
|
+
"story": "mark-rule",
|
|
40
|
+
"framework": "preact",
|
|
41
|
+
"accumulatedFiles": [
|
|
42
|
+
"registry/src/preact/examples/mark-rule/editor.tsx",
|
|
43
|
+
"registry/src/preact/examples/mark-rule/extension.ts",
|
|
44
|
+
"registry/src/preact/examples/mark-rule/index.ts",
|
|
45
|
+
"registry/src/preact/examples/mark-rule/issue-link.ts"
|
|
46
|
+
],
|
|
47
|
+
"internalDependencies": []
|
|
48
|
+
},
|
|
49
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
50
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "preact-example-minimal",
|
|
3
|
+
"title": "preact-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/preact/examples/minimal/editor.tsx",
|
|
13
|
+
"type": "registry:component",
|
|
14
|
+
"target": "components/editor/examples/minimal/editor.tsx",
|
|
15
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { defineBasicExtension } from 'prosekit/basic'\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nexport default function Editor() {\n const editor = useMemo(() => {\n const extension = defineBasicExtension()\n return createEditor({ extension })\n }, [])\n\n return (\n <ProseKit editor={editor}>\n <div ref={editor.mount} className=\"outline-solid p-4\"></div>\n </ProseKit>\n )\n}\n"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"path": "registry/src/preact/examples/minimal/index.ts",
|
|
19
|
+
"type": "registry:component",
|
|
20
|
+
"target": "components/editor/examples/minimal/index.ts",
|
|
21
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
22
|
+
}
|
|
23
|
+
],
|
|
24
|
+
"meta": {
|
|
25
|
+
"hasIcons": false,
|
|
26
|
+
"hidden": false,
|
|
27
|
+
"story": "minimal",
|
|
28
|
+
"framework": "preact",
|
|
29
|
+
"accumulatedFiles": [
|
|
30
|
+
"registry/src/preact/examples/minimal/editor.tsx",
|
|
31
|
+
"registry/src/preact/examples/minimal/index.ts"
|
|
32
|
+
],
|
|
33
|
+
"internalDependencies": []
|
|
34
|
+
},
|
|
35
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
36
|
+
}
|