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,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "solid-example-typography",
|
|
3
|
+
"title": "solid-example-typography",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Typography enhancements like smart quotes and dashes.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://prosekit.dev/r/solid-sample-katex.json",
|
|
8
|
+
"https://prosekit.dev/r/solid-sample-sample-doc-typography.json",
|
|
9
|
+
"https://prosekit.dev/r/solid-ui-block-handle.json",
|
|
10
|
+
"https://prosekit.dev/r/solid-ui-drop-indicator.json"
|
|
11
|
+
],
|
|
12
|
+
"dependencies": [
|
|
13
|
+
"prosekit"
|
|
14
|
+
],
|
|
15
|
+
"files": [
|
|
16
|
+
{
|
|
17
|
+
"path": "registry/src/solid/examples/typography/editor.tsx",
|
|
18
|
+
"type": "registry:component",
|
|
19
|
+
"target": "components/editor/examples/typography/editor.tsx",
|
|
20
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/solid'\nimport type { JSX } from 'solid-js'\n\nimport { sampleContent } from '../../sample/sample-doc-typography'\nimport { BlockHandle } from '../../ui/block-handle'\nimport { DropIndicator } from '../../ui/drop-indicator'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps): JSX.Element {\n const defaultContent = props.initialContent ?? sampleContent\n const extension = defineExtension()\n const editor = createEditor({ extension, defaultContent })\n\n return (\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={editor.mount} 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 <BlockHandle />\n <DropIndicator />\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"path": "registry/src/solid/examples/typography/extension.ts",
|
|
24
|
+
"type": "registry:component",
|
|
25
|
+
"target": "components/editor/examples/typography/extension.ts",
|
|
26
|
+
"content": "import { defineBasicExtension } from 'prosekit/basic'\nimport { union } from 'prosekit/core'\nimport { defineMath } from 'prosekit/extensions/math'\n\nimport { renderKaTeXMathBlock, renderKaTeXMathInline } from '../../sample/katex'\n\nexport function defineExtension() {\n return union(defineBasicExtension(), defineMath({ renderMathBlock: renderKaTeXMathBlock, renderMathInline: renderKaTeXMathInline }))\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"path": "registry/src/solid/examples/typography/index.ts",
|
|
30
|
+
"type": "registry:component",
|
|
31
|
+
"target": "components/editor/examples/typography/index.ts",
|
|
32
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"meta": {
|
|
36
|
+
"hasIcons": false,
|
|
37
|
+
"hidden": false,
|
|
38
|
+
"story": "typography",
|
|
39
|
+
"framework": "solid",
|
|
40
|
+
"accumulatedFiles": [
|
|
41
|
+
"registry/src/solid/examples/typography/editor.tsx",
|
|
42
|
+
"registry/src/solid/examples/typography/extension.ts",
|
|
43
|
+
"registry/src/solid/examples/typography/index.ts",
|
|
44
|
+
"registry/src/solid/sample/katex.ts",
|
|
45
|
+
"registry/src/solid/sample/sample-doc-typography.ts",
|
|
46
|
+
"registry/src/solid/ui/block-handle/block-handle.tsx",
|
|
47
|
+
"registry/src/solid/ui/block-handle/index.ts",
|
|
48
|
+
"registry/src/solid/ui/drop-indicator/drop-indicator.tsx",
|
|
49
|
+
"registry/src/solid/ui/drop-indicator/index.ts"
|
|
50
|
+
],
|
|
51
|
+
"internalDependencies": [
|
|
52
|
+
"solid-sample-katex",
|
|
53
|
+
"solid-sample-sample-doc-typography",
|
|
54
|
+
"solid-ui-block-handle",
|
|
55
|
+
"solid-ui-drop-indicator"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
59
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "solid-example-underline",
|
|
3
|
+
"title": "solid-example-underline",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Example for underline mark.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://prosekit.dev/r/solid-sample-sample-doc-underline.json",
|
|
8
|
+
"https://prosekit.dev/r/solid-ui-toolbar.json"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": [
|
|
11
|
+
"prosekit"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "registry/src/solid/examples/underline/editor.tsx",
|
|
16
|
+
"type": "registry:component",
|
|
17
|
+
"target": "components/editor/examples/underline/editor.tsx",
|
|
18
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/solid'\nimport type { JSX } from 'solid-js'\n\nimport { sampleContent } from '../../sample/sample-doc-underline'\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps): JSX.Element {\n const defaultContent = props.initialContent ?? sampleContent\n const extension = defineExtension()\n const editor = createEditor({ extension, defaultContent })\n\n return (\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={editor.mount} 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 )\n}\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "registry/src/solid/examples/underline/extension.ts",
|
|
22
|
+
"type": "registry:component",
|
|
23
|
+
"target": "components/editor/examples/underline/extension.ts",
|
|
24
|
+
"content": "import { defineBaseKeymap, union } from 'prosekit/core'\nimport { defineDoc } from 'prosekit/extensions/doc'\nimport { defineParagraph } from 'prosekit/extensions/paragraph'\nimport { defineText } from 'prosekit/extensions/text'\nimport { defineUnderline } from 'prosekit/extensions/underline'\n\nexport function defineExtension() {\n return union(\n defineBaseKeymap(),\n defineDoc(),\n defineText(),\n defineParagraph(),\n defineUnderline(),\n )\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "registry/src/solid/examples/underline/index.ts",
|
|
28
|
+
"type": "registry:component",
|
|
29
|
+
"target": "components/editor/examples/underline/index.ts",
|
|
30
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"meta": {
|
|
34
|
+
"hasIcons": false,
|
|
35
|
+
"hidden": false,
|
|
36
|
+
"story": "underline",
|
|
37
|
+
"framework": "solid",
|
|
38
|
+
"accumulatedFiles": [
|
|
39
|
+
"registry/src/solid/examples/underline/editor.tsx",
|
|
40
|
+
"registry/src/solid/examples/underline/extension.ts",
|
|
41
|
+
"registry/src/solid/examples/underline/index.ts",
|
|
42
|
+
"registry/src/solid/sample/sample-doc-underline.ts",
|
|
43
|
+
"registry/src/solid/ui/button/button.tsx",
|
|
44
|
+
"registry/src/solid/ui/button/index.ts",
|
|
45
|
+
"registry/src/solid/ui/image-upload-popover/image-upload-popover.tsx",
|
|
46
|
+
"registry/src/solid/ui/image-upload-popover/index.ts",
|
|
47
|
+
"registry/src/solid/ui/toolbar/index.ts",
|
|
48
|
+
"registry/src/solid/ui/toolbar/toolbar.tsx"
|
|
49
|
+
],
|
|
50
|
+
"internalDependencies": [
|
|
51
|
+
"solid-sample-sample-doc-underline",
|
|
52
|
+
"solid-ui-toolbar"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
56
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "solid-example-unmount",
|
|
3
|
+
"title": "solid-example-unmount",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Properly unmount and remount editor instances.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://prosekit.dev/r/solid-ui-inline-menu.json"
|
|
8
|
+
],
|
|
9
|
+
"dependencies": [
|
|
10
|
+
"prosekit"
|
|
11
|
+
],
|
|
12
|
+
"files": [
|
|
13
|
+
{
|
|
14
|
+
"path": "registry/src/solid/examples/unmount/editor-component.tsx",
|
|
15
|
+
"type": "registry:component",
|
|
16
|
+
"target": "components/editor/examples/unmount/editor-component.tsx",
|
|
17
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { defineBasicExtension } from 'prosekit/basic'\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/solid'\nimport type { JSX } from 'solid-js'\n\nimport { InlineMenu } from '../../ui/inline-menu'\n\nimport ExtensionComponent from './extension-component.tsx'\n\nexport default function EditorComponent(props: {\n placeholder: string\n}): JSX.Element {\n const extension = defineBasicExtension()\n const editor = createEditor({ extension })\n\n return (\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={editor.mount} 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 <InlineMenu />\n </div>\n </div>\n <ExtensionComponent placeholder={props.placeholder} />\n </ProseKit>\n )\n}\n"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"path": "registry/src/solid/examples/unmount/editor.tsx",
|
|
21
|
+
"type": "registry:component",
|
|
22
|
+
"target": "components/editor/examples/unmount/editor.tsx",
|
|
23
|
+
"content": "import { createSignal, For, type JSX } from 'solid-js'\n\nimport EditorComponent from './editor-component'\n\nexport default function Editor(): JSX.Element {\n let nextKey = 1\n const [editorKeys, setEditorKeys] = createSignal<number[]>([])\n\n const addEditor = () => {\n const key = nextKey\n nextKey += 1\n setEditorKeys((keys) => [...keys, key])\n }\n\n const removeEditor = (key: number) => {\n setEditorKeys((keys) => keys.filter((k) => k !== key))\n }\n\n return (\n <div class=\"flex flex-col gap-2\">\n <div class=\"flex gap-2\">\n <button onClick={addEditor} class=\"border p-2\">\n Add editor\n </button>\n <For each={editorKeys()}>\n {(key) => (\n <button\n onClick={() => removeEditor(key)}\n class=\"border p-2\"\n >\n Unmount No.{key}\n </button>\n )}\n </For>\n </div>\n <For each={editorKeys()}>\n {(key) => (\n <div>\n <EditorComponent\n placeholder={`Editor No.${key}`}\n />\n </div>\n )}\n </For>\n </div>\n )\n}\n"
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"path": "registry/src/solid/examples/unmount/extension-component.tsx",
|
|
27
|
+
"type": "registry:component",
|
|
28
|
+
"target": "components/editor/examples/unmount/extension-component.tsx",
|
|
29
|
+
"content": "import { definePlaceholder } from 'prosekit/extensions/placeholder'\nimport { useExtension } from 'prosekit/solid'\nimport { createMemo, type JSX } from 'solid-js'\n\nexport default function ExtensionComponent(props: {\n placeholder: string\n}): JSX.Element {\n const extension = createMemo(() => {\n return definePlaceholder({ placeholder: props.placeholder })\n })\n\n useExtension(extension)\n\n return null\n}\n"
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"path": "registry/src/solid/examples/unmount/index.ts",
|
|
33
|
+
"type": "registry:component",
|
|
34
|
+
"target": "components/editor/examples/unmount/index.ts",
|
|
35
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"meta": {
|
|
39
|
+
"hasIcons": false,
|
|
40
|
+
"hidden": false,
|
|
41
|
+
"story": "unmount",
|
|
42
|
+
"framework": "solid",
|
|
43
|
+
"accumulatedFiles": [
|
|
44
|
+
"registry/src/solid/examples/unmount/editor-component.tsx",
|
|
45
|
+
"registry/src/solid/examples/unmount/editor.tsx",
|
|
46
|
+
"registry/src/solid/examples/unmount/extension-component.tsx",
|
|
47
|
+
"registry/src/solid/examples/unmount/index.ts",
|
|
48
|
+
"registry/src/solid/ui/button/button.tsx",
|
|
49
|
+
"registry/src/solid/ui/button/index.ts",
|
|
50
|
+
"registry/src/solid/ui/inline-menu/index.ts",
|
|
51
|
+
"registry/src/solid/ui/inline-menu/inline-menu.tsx"
|
|
52
|
+
],
|
|
53
|
+
"internalDependencies": [
|
|
54
|
+
"solid-ui-inline-menu"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
58
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "solid-example-user-menu-dynamic",
|
|
3
|
+
"title": "solid-example-user-menu-dynamic",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Dynamic autocomplete menu with async data loading.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://prosekit.dev/r/solid-sample-sample-query-users.json",
|
|
8
|
+
"https://prosekit.dev/r/solid-ui-user-menu.json"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": [
|
|
11
|
+
"prosekit"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "registry/src/solid/examples/user-menu-dynamic/editor.tsx",
|
|
16
|
+
"type": "registry:component",
|
|
17
|
+
"target": "components/editor/examples/user-menu-dynamic/editor.tsx",
|
|
18
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/solid'\nimport type { JSX } from 'solid-js'\n\nimport { defineExtension } from './extension'\nimport UserMenuDynamic from './user-menu-dynamic'\n\nexport default function Editor(): JSX.Element {\n const extension = defineExtension()\n const editor = createEditor({ extension })\n\n return (\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={editor.mount} 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 <UserMenuDynamic />\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "registry/src/solid/examples/user-menu-dynamic/extension.ts",
|
|
22
|
+
"type": "registry:component",
|
|
23
|
+
"target": "components/editor/examples/user-menu-dynamic/extension.ts",
|
|
24
|
+
"content": "import { defineBasicExtension } from 'prosekit/basic'\nimport { union } from 'prosekit/core'\nimport { defineMention } from 'prosekit/extensions/mention'\nimport { definePlaceholder } from 'prosekit/extensions/placeholder'\n\nexport function defineExtension() {\n return union(\n defineBasicExtension(),\n definePlaceholder({\n placeholder: 'Type @ to mention someone...',\n }),\n defineMention(),\n )\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "registry/src/solid/examples/user-menu-dynamic/index.ts",
|
|
28
|
+
"type": "registry:component",
|
|
29
|
+
"target": "components/editor/examples/user-menu-dynamic/index.ts",
|
|
30
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "registry/src/solid/examples/user-menu-dynamic/use-user-query.ts",
|
|
34
|
+
"type": "registry:component",
|
|
35
|
+
"target": "components/editor/examples/user-menu-dynamic/use-user-query.ts",
|
|
36
|
+
"content": "import { createEffect, createSignal } from 'solid-js'\n\nimport type { User } from '../../sample/sample-query-users'\nimport { queryUsers } from '../../sample/sample-query-users'\n\n/**\n * Simulate a user searching with some delay.\n */\nexport function useUserQuery(\n getQuery: () => string,\n getEnabled: () => boolean,\n) {\n const [users, setUsers] = createSignal<User[]>([])\n const [loading, setLoading] = createSignal(true)\n\n createEffect(() => {\n const query = getQuery()\n const enabled = getEnabled()\n\n if (!enabled) {\n setUsers([])\n return\n }\n\n setLoading(true)\n let cancelled = false\n\n void queryUsers(query).then((filteredUsers) => {\n if (cancelled) {\n return\n }\n setUsers(filteredUsers)\n setLoading(false)\n })\n\n return () => {\n cancelled = true\n }\n })\n\n return { loading, users }\n}\n"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"path": "registry/src/solid/examples/user-menu-dynamic/user-menu-dynamic.tsx",
|
|
40
|
+
"type": "registry:component",
|
|
41
|
+
"target": "components/editor/examples/user-menu-dynamic/user-menu-dynamic.tsx",
|
|
42
|
+
"content": "import { createSignal, type JSX } from 'solid-js'\n\nimport { UserMenu } from '../../ui/user-menu'\n\nimport { useUserQuery } from './use-user-query'\n\nexport default function UserMenuDynamic(): JSX.Element {\n const [query, setQuery] = createSignal('')\n const [open, setOpen] = createSignal(false)\n\n const { loading, users } = useUserQuery(query, open)\n\n return (\n <UserMenu\n users={users()}\n loading={loading()}\n onQueryChange={setQuery}\n onOpenChange={setOpen}\n />\n )\n}\n"
|
|
43
|
+
}
|
|
44
|
+
],
|
|
45
|
+
"meta": {
|
|
46
|
+
"hasIcons": false,
|
|
47
|
+
"hidden": false,
|
|
48
|
+
"story": "user-menu-dynamic",
|
|
49
|
+
"framework": "solid",
|
|
50
|
+
"accumulatedFiles": [
|
|
51
|
+
"registry/src/solid/examples/user-menu-dynamic/editor.tsx",
|
|
52
|
+
"registry/src/solid/examples/user-menu-dynamic/extension.ts",
|
|
53
|
+
"registry/src/solid/examples/user-menu-dynamic/index.ts",
|
|
54
|
+
"registry/src/solid/examples/user-menu-dynamic/use-user-query.ts",
|
|
55
|
+
"registry/src/solid/examples/user-menu-dynamic/user-menu-dynamic.tsx",
|
|
56
|
+
"registry/src/solid/sample/sample-query-users.ts",
|
|
57
|
+
"registry/src/solid/sample/sample-user-data.ts",
|
|
58
|
+
"registry/src/solid/ui/user-menu/index.ts",
|
|
59
|
+
"registry/src/solid/ui/user-menu/user-menu.tsx"
|
|
60
|
+
],
|
|
61
|
+
"internalDependencies": [
|
|
62
|
+
"solid-sample-sample-query-users",
|
|
63
|
+
"solid-ui-user-menu"
|
|
64
|
+
]
|
|
65
|
+
},
|
|
66
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
67
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "solid-example-user-menu",
|
|
3
|
+
"title": "solid-example-user-menu",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Autocomplete menu for @mentions and #hashtag",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://prosekit.dev/r/solid-sample-sample-tag-data.json",
|
|
8
|
+
"https://prosekit.dev/r/solid-sample-sample-user-data.json",
|
|
9
|
+
"https://prosekit.dev/r/solid-ui-tag-menu.json",
|
|
10
|
+
"https://prosekit.dev/r/solid-ui-user-menu.json"
|
|
11
|
+
],
|
|
12
|
+
"dependencies": [
|
|
13
|
+
"prosekit"
|
|
14
|
+
],
|
|
15
|
+
"files": [
|
|
16
|
+
{
|
|
17
|
+
"path": "registry/src/solid/examples/user-menu/editor.tsx",
|
|
18
|
+
"type": "registry:component",
|
|
19
|
+
"target": "components/editor/examples/user-menu/editor.tsx",
|
|
20
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/solid'\nimport type { JSX } from 'solid-js'\n\nimport { tags } from '../../sample/sample-tag-data'\nimport { users } from '../../sample/sample-user-data'\nimport { TagMenu } from '../../ui/tag-menu'\nimport { UserMenu } from '../../ui/user-menu'\n\nimport { defineExtension } from './extension'\n\nexport default function Editor(): JSX.Element {\n const extension = defineExtension()\n const editor = createEditor({ extension })\n\n return (\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={editor.mount} 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 <UserMenu users={users} />\n <TagMenu tags={tags} />\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"path": "registry/src/solid/examples/user-menu/extension.ts",
|
|
24
|
+
"type": "registry:component",
|
|
25
|
+
"target": "components/editor/examples/user-menu/extension.ts",
|
|
26
|
+
"content": "import { defineBasicExtension } from 'prosekit/basic'\nimport { union } from 'prosekit/core'\nimport { defineMention } from 'prosekit/extensions/mention'\nimport { definePlaceholder } from 'prosekit/extensions/placeholder'\n\nexport function defineExtension() {\n return union(\n defineBasicExtension(),\n definePlaceholder({\n placeholder: 'Type @ to mention someone or # to tag something...',\n }),\n defineMention(),\n )\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"path": "registry/src/solid/examples/user-menu/index.ts",
|
|
30
|
+
"type": "registry:component",
|
|
31
|
+
"target": "components/editor/examples/user-menu/index.ts",
|
|
32
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
"meta": {
|
|
36
|
+
"hasIcons": false,
|
|
37
|
+
"hidden": false,
|
|
38
|
+
"story": "user-menu",
|
|
39
|
+
"framework": "solid",
|
|
40
|
+
"accumulatedFiles": [
|
|
41
|
+
"registry/src/solid/examples/user-menu/editor.tsx",
|
|
42
|
+
"registry/src/solid/examples/user-menu/extension.ts",
|
|
43
|
+
"registry/src/solid/examples/user-menu/index.ts",
|
|
44
|
+
"registry/src/solid/sample/sample-tag-data.ts",
|
|
45
|
+
"registry/src/solid/sample/sample-user-data.ts",
|
|
46
|
+
"registry/src/solid/ui/tag-menu/index.ts",
|
|
47
|
+
"registry/src/solid/ui/tag-menu/tag-menu.tsx",
|
|
48
|
+
"registry/src/solid/ui/user-menu/index.ts",
|
|
49
|
+
"registry/src/solid/ui/user-menu/user-menu.tsx"
|
|
50
|
+
],
|
|
51
|
+
"internalDependencies": [
|
|
52
|
+
"solid-sample-sample-tag-data",
|
|
53
|
+
"solid-sample-sample-user-data",
|
|
54
|
+
"solid-ui-tag-menu",
|
|
55
|
+
"solid-ui-user-menu"
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
59
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "solid-example-view-adapter",
|
|
3
|
+
"title": "solid-example-view-adapter",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Custom node and mark views using view adapters.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://prosekit.dev/r/solid-sample-define-atom-block.json",
|
|
8
|
+
"https://prosekit.dev/r/solid-sample-sample-doc-view-adapter.json"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": [
|
|
11
|
+
"prosekit"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "registry/src/solid/examples/view-adapter/atom-block-view.tsx",
|
|
16
|
+
"type": "registry:component",
|
|
17
|
+
"target": "components/editor/examples/view-adapter/atom-block-view.tsx",
|
|
18
|
+
"content": "import { useEditorDerivedValue, type SolidNodeViewProps } from 'prosekit/solid'\nimport type { JSX } from 'solid-js'\n\nexport function AtomBlockView(props: SolidNodeViewProps): JSX.Element {\n const docJSON = useEditorDerivedValue((editor) => {\n return JSON.stringify(editor.getDocJSON(), null, 2)\n })\n\n return (\n <div attr:data-atom-block=\"true\" attr:data-atom-block-view=\"true\" class=\"bg-green-500/30\">\n <div attr:data-testid=\"atom-block-view-label\">Atom Block View</div>\n <div attr:data-testid=\"atom-block-view-pos\">{props.getPos()}</div>\n <div attr:data-testid=\"atom-block-view-context\">\n <pre>{docJSON()}</pre>\n </div>\n </div>\n )\n}\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "registry/src/solid/examples/view-adapter/editor.tsx",
|
|
22
|
+
"type": "registry:component",
|
|
23
|
+
"target": "components/editor/examples/view-adapter/editor.tsx",
|
|
24
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/solid'\nimport { createMemo, type JSX } from 'solid-js'\n\nimport { sampleContent } from '../../sample/sample-doc-view-adapter'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps): JSX.Element {\n const defaultContent = () => props.initialContent ?? sampleContent\n const editor = createMemo(() => {\n return createEditor({ extension: defineExtension(), defaultContent: defaultContent() })\n })\n\n return (\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={editor().mount} 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 )\n}\n"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "registry/src/solid/examples/view-adapter/extension.ts",
|
|
28
|
+
"type": "registry:component",
|
|
29
|
+
"target": "components/editor/examples/view-adapter/extension.ts",
|
|
30
|
+
"content": "import { defineBasicExtension } from 'prosekit/basic'\nimport { union } from 'prosekit/core'\nimport { defineSolidNodeView } from 'prosekit/solid'\n\nimport { defineAtomBlock } from '../../sample/define-atom-block'\n\nimport { AtomBlockView } from './atom-block-view'\n\nexport function defineExtension() {\n return union(\n defineBasicExtension(),\n defineAtomBlock(),\n defineSolidNodeView({\n name: 'atomBlock',\n component: AtomBlockView,\n }),\n )\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"path": "registry/src/solid/examples/view-adapter/index.ts",
|
|
34
|
+
"type": "registry:component",
|
|
35
|
+
"target": "components/editor/examples/view-adapter/index.ts",
|
|
36
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
37
|
+
}
|
|
38
|
+
],
|
|
39
|
+
"meta": {
|
|
40
|
+
"hasIcons": false,
|
|
41
|
+
"hidden": true,
|
|
42
|
+
"story": "view-adapter",
|
|
43
|
+
"framework": "solid",
|
|
44
|
+
"accumulatedFiles": [
|
|
45
|
+
"registry/src/solid/examples/view-adapter/atom-block-view.tsx",
|
|
46
|
+
"registry/src/solid/examples/view-adapter/editor.tsx",
|
|
47
|
+
"registry/src/solid/examples/view-adapter/extension.ts",
|
|
48
|
+
"registry/src/solid/examples/view-adapter/index.ts",
|
|
49
|
+
"registry/src/solid/sample/define-atom-block.ts",
|
|
50
|
+
"registry/src/solid/sample/sample-doc-view-adapter.ts"
|
|
51
|
+
],
|
|
52
|
+
"internalDependencies": [
|
|
53
|
+
"solid-sample-define-atom-block",
|
|
54
|
+
"solid-sample-sample-doc-view-adapter"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
58
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "solid-example-word-counter",
|
|
3
|
+
"title": "solid-example-word-counter",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Display word and character count statistics.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://prosekit.dev/r/solid-sample-sample-doc-word-counter.json",
|
|
8
|
+
"https://prosekit.dev/r/solid-ui-word-counter.json"
|
|
9
|
+
],
|
|
10
|
+
"dependencies": [
|
|
11
|
+
"prosekit"
|
|
12
|
+
],
|
|
13
|
+
"files": [
|
|
14
|
+
{
|
|
15
|
+
"path": "registry/src/solid/examples/word-counter/editor.tsx",
|
|
16
|
+
"type": "registry:component",
|
|
17
|
+
"target": "components/editor/examples/word-counter/editor.tsx",
|
|
18
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/solid'\nimport type { JSX } from 'solid-js'\n\nimport { sampleContent } from '../../sample/sample-doc-word-counter'\nimport { WordCounter } from '../../ui/word-counter'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps): JSX.Element {\n const defaultContent = props.initialContent ?? sampleContent\n const extension = defineExtension()\n const editor = createEditor({ extension, defaultContent })\n\n return (\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={editor.mount} 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 <WordCounter />\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
"path": "registry/src/solid/examples/word-counter/extension.ts",
|
|
22
|
+
"type": "registry:component",
|
|
23
|
+
"target": "components/editor/examples/word-counter/extension.ts",
|
|
24
|
+
"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"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"path": "registry/src/solid/examples/word-counter/index.ts",
|
|
28
|
+
"type": "registry:component",
|
|
29
|
+
"target": "components/editor/examples/word-counter/index.ts",
|
|
30
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"meta": {
|
|
34
|
+
"hasIcons": false,
|
|
35
|
+
"hidden": false,
|
|
36
|
+
"story": "word-counter",
|
|
37
|
+
"framework": "solid",
|
|
38
|
+
"accumulatedFiles": [
|
|
39
|
+
"registry/src/solid/examples/word-counter/editor.tsx",
|
|
40
|
+
"registry/src/solid/examples/word-counter/extension.ts",
|
|
41
|
+
"registry/src/solid/examples/word-counter/index.ts",
|
|
42
|
+
"registry/src/solid/sample/sample-doc-word-counter.ts",
|
|
43
|
+
"registry/src/solid/ui/word-counter/index.ts",
|
|
44
|
+
"registry/src/solid/ui/word-counter/word-counter.tsx"
|
|
45
|
+
],
|
|
46
|
+
"internalDependencies": [
|
|
47
|
+
"solid-sample-sample-doc-word-counter",
|
|
48
|
+
"solid-ui-word-counter"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
52
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "solid-example-yjs",
|
|
3
|
+
"title": "solid-example-yjs",
|
|
4
|
+
"type": "registry:block",
|
|
5
|
+
"description": "Real-time collaboration using Yjs CRDT library.",
|
|
6
|
+
"registryDependencies": [
|
|
7
|
+
"https://prosekit.dev/r/solid-ui-toolbar.json"
|
|
8
|
+
],
|
|
9
|
+
"dependencies": [
|
|
10
|
+
"prosekit",
|
|
11
|
+
"y-websocket",
|
|
12
|
+
"yjs"
|
|
13
|
+
],
|
|
14
|
+
"files": [
|
|
15
|
+
{
|
|
16
|
+
"path": "registry/src/solid/examples/yjs/editor-component.tsx",
|
|
17
|
+
"type": "registry:component",
|
|
18
|
+
"target": "components/editor/examples/yjs/editor-component.tsx",
|
|
19
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\nimport 'prosekit/extensions/yjs/style.css'\n\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/solid'\nimport { createMemo, type JSX } from 'solid-js'\nimport { WebsocketProvider } from 'y-websocket'\nimport * as Y from 'yjs'\n\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\nexport default function EditorComponent(props: { room?: string }): JSX.Element {\n const editor = createMemo(() => {\n const doc = new Y.Doc()\n const provider = new WebsocketProvider(\n 'wss://demos.yjs.dev/ws',\n `github.com/prosekit/room_${props.room}`,\n doc,\n )\n\n const extension = defineExtension(doc, provider.awareness)\n return createEditor({ extension })\n })\n\n return (\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={editor().mount} 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 )\n}\n"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"path": "registry/src/solid/examples/yjs/editor.tsx",
|
|
23
|
+
"type": "registry:component",
|
|
24
|
+
"target": "components/editor/examples/yjs/editor.tsx",
|
|
25
|
+
"content": "import { createSignal, type JSX } from 'solid-js'\n\nimport EditorComponent from './editor-component'\n\nexport default function Editor(): JSX.Element {\n const [room] = createSignal(Math.random().toString(36).substring(2, 15))\n\n return (\n <div class=\"h-full flex flex-col gap-2\">\n <EditorComponent room={room()} />\n <EditorComponent room={room()} />\n </div>\n )\n}\n"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"path": "registry/src/solid/examples/yjs/extension.ts",
|
|
29
|
+
"type": "registry:component",
|
|
30
|
+
"target": "components/editor/examples/yjs/extension.ts",
|
|
31
|
+
"content": "import { 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 { 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'\nimport { defineYjs } from 'prosekit/extensions/yjs'\nimport type { Awareness } from 'prosekit/extensions/yjs'\nimport type * as Y from 'yjs'\n\nexport function defineExtension(doc: Y.Doc, awareness: Awareness) {\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 defineYjs({ doc, awareness }),\n )\n}\n\nexport type EditorExtension = ReturnType<typeof defineExtension>\n"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"path": "registry/src/solid/examples/yjs/index.ts",
|
|
35
|
+
"type": "registry:component",
|
|
36
|
+
"target": "components/editor/examples/yjs/index.ts",
|
|
37
|
+
"content": "export { default as ExampleEditor } from './editor'\n"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"meta": {
|
|
41
|
+
"hasIcons": false,
|
|
42
|
+
"hidden": false,
|
|
43
|
+
"story": "yjs",
|
|
44
|
+
"framework": "solid",
|
|
45
|
+
"accumulatedFiles": [
|
|
46
|
+
"registry/src/solid/examples/yjs/editor-component.tsx",
|
|
47
|
+
"registry/src/solid/examples/yjs/editor.tsx",
|
|
48
|
+
"registry/src/solid/examples/yjs/extension.ts",
|
|
49
|
+
"registry/src/solid/examples/yjs/index.ts",
|
|
50
|
+
"registry/src/solid/ui/button/button.tsx",
|
|
51
|
+
"registry/src/solid/ui/button/index.ts",
|
|
52
|
+
"registry/src/solid/ui/image-upload-popover/image-upload-popover.tsx",
|
|
53
|
+
"registry/src/solid/ui/image-upload-popover/index.ts",
|
|
54
|
+
"registry/src/solid/ui/toolbar/index.ts",
|
|
55
|
+
"registry/src/solid/ui/toolbar/toolbar.tsx"
|
|
56
|
+
],
|
|
57
|
+
"internalDependencies": [
|
|
58
|
+
"solid-ui-toolbar"
|
|
59
|
+
]
|
|
60
|
+
},
|
|
61
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
62
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "solid-sample-define-atom-block",
|
|
3
|
+
"title": "solid-sample-define-atom-block",
|
|
4
|
+
"type": "registry:component",
|
|
5
|
+
"description": "",
|
|
6
|
+
"registryDependencies": [],
|
|
7
|
+
"dependencies": [
|
|
8
|
+
"prosekit"
|
|
9
|
+
],
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"path": "registry/src/solid/sample/define-atom-block.ts",
|
|
13
|
+
"type": "registry:component",
|
|
14
|
+
"target": "components/editor/sample/define-atom-block.ts",
|
|
15
|
+
"content": "import { defineNodeSpec } from 'prosekit/core'\n\n/**\n * Defines an atom block node for testing purposes.\n */\nexport function defineAtomBlock() {\n return defineNodeSpec({\n name: 'atomBlock',\n group: 'block',\n atom: true,\n parseDOM: [{\n tag: 'div[data-atom-block]',\n }],\n toDOM: () => {\n return ['div', { 'data-atom-block': 'true' }, 'atom block']\n },\n })\n}\n"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"meta": {
|
|
19
|
+
"hasIcons": false,
|
|
20
|
+
"hidden": false,
|
|
21
|
+
"story": "",
|
|
22
|
+
"framework": "solid",
|
|
23
|
+
"accumulatedFiles": [
|
|
24
|
+
"registry/src/solid/sample/define-atom-block.ts"
|
|
25
|
+
],
|
|
26
|
+
"internalDependencies": []
|
|
27
|
+
},
|
|
28
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
29
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "solid-sample-katex",
|
|
3
|
+
"title": "solid-sample-katex",
|
|
4
|
+
"type": "registry:component",
|
|
5
|
+
"description": "",
|
|
6
|
+
"registryDependencies": [],
|
|
7
|
+
"dependencies": [
|
|
8
|
+
"katex"
|
|
9
|
+
],
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"path": "registry/src/solid/sample/katex.ts",
|
|
13
|
+
"type": "registry:component",
|
|
14
|
+
"target": "components/editor/sample/katex.ts",
|
|
15
|
+
"content": "import { render } from 'katex'\n\nexport function renderKaTeXMathBlock(text: string, element: HTMLElement) {\n render(text, element, { displayMode: true, throwOnError: false, output: 'mathml' })\n}\n\nexport function renderKaTeXMathInline(text: string, element: HTMLElement) {\n render(text, element, { displayMode: false, throwOnError: false, output: 'mathml' })\n}\n"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"meta": {
|
|
19
|
+
"hasIcons": false,
|
|
20
|
+
"hidden": false,
|
|
21
|
+
"story": "",
|
|
22
|
+
"framework": "solid",
|
|
23
|
+
"accumulatedFiles": [
|
|
24
|
+
"registry/src/solid/sample/katex.ts"
|
|
25
|
+
],
|
|
26
|
+
"internalDependencies": []
|
|
27
|
+
},
|
|
28
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
29
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "solid-sample-sample-doc-block-handle",
|
|
3
|
+
"title": "solid-sample-sample-doc-block-handle",
|
|
4
|
+
"type": "registry:component",
|
|
5
|
+
"description": "",
|
|
6
|
+
"registryDependencies": [],
|
|
7
|
+
"dependencies": [
|
|
8
|
+
"prosekit"
|
|
9
|
+
],
|
|
10
|
+
"files": [
|
|
11
|
+
{
|
|
12
|
+
"path": "registry/src/solid/sample/sample-doc-block-handle.ts",
|
|
13
|
+
"type": "registry:component",
|
|
14
|
+
"target": "components/editor/sample/sample-doc-block-handle.ts",
|
|
15
|
+
"content": "import type { NodeJSON } from 'prosekit/core'\n\nexport const sampleContent: NodeJSON = {\n type: 'doc',\n content: [\n {\n type: 'heading',\n attrs: {\n level: 1,\n },\n content: [\n {\n type: 'text',\n text: 'Drag and Drop Demo',\n },\n ],\n },\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'Try dragging any paragraph or heading by clicking on the handle that appears on the left when you hover over it.',\n },\n ],\n },\n {\n type: 'heading',\n attrs: {\n level: 2,\n },\n content: [\n {\n type: 'text',\n text: 'Getting Started',\n },\n ],\n },\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'Hover over any block to see the drag handle appear. Click and drag to reorder content.',\n },\n ],\n },\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'This paragraph can be moved above or below other blocks.',\n },\n ],\n },\n {\n type: 'heading',\n attrs: {\n level: 2,\n },\n content: [\n {\n type: 'text',\n text: 'Different Block Types',\n },\n ],\n },\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'You can drag paragraphs, headings, lists, code blocks, and more.',\n },\n ],\n },\n {\n type: 'heading',\n attrs: {\n level: 3,\n },\n content: [\n {\n type: 'text',\n text: 'Lists Work Too',\n },\n ],\n },\n {\n type: 'list',\n attrs: {\n kind: 'bullet',\n order: null,\n checked: false,\n collapsed: false,\n },\n content: [\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'This entire list can be dragged',\n },\n ],\n },\n ],\n },\n {\n type: 'list',\n attrs: {\n kind: 'bullet',\n order: null,\n checked: false,\n collapsed: false,\n },\n content: [\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'Individual list items stay together',\n },\n ],\n },\n ],\n },\n {\n type: 'list',\n attrs: {\n kind: 'bullet',\n order: null,\n checked: false,\n collapsed: false,\n },\n content: [\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'Try moving this list around',\n },\n ],\n },\n ],\n },\n {\n type: 'list',\n attrs: {\n kind: 'ordered',\n order: null,\n checked: false,\n collapsed: false,\n },\n content: [\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'Ordered lists also support dragging',\n },\n ],\n },\n ],\n },\n {\n type: 'list',\n attrs: {\n kind: 'ordered',\n order: null,\n checked: false,\n collapsed: false,\n },\n content: [\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'The numbering updates automatically',\n },\n ],\n },\n ],\n },\n {\n type: 'list',\n attrs: {\n kind: 'ordered',\n order: null,\n checked: false,\n collapsed: false,\n },\n content: [\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'Drag this list to see it in action',\n },\n ],\n },\n ],\n },\n {\n type: 'heading',\n attrs: {\n level: 3,\n },\n content: [\n {\n type: 'text',\n text: 'Code Blocks',\n },\n ],\n },\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'Even code blocks can be moved:',\n },\n ],\n },\n {\n type: 'codeBlock',\n attrs: {\n language: 'javascript',\n },\n content: [\n {\n type: 'text',\n text: '// This code block can be dragged\\nfunction dragAndDrop() {\\n return \"Easy to rearrange!\"\\n}',\n },\n ],\n },\n {\n type: 'heading',\n attrs: {\n level: 2,\n },\n content: [\n {\n type: 'text',\n text: 'Nested Content',\n },\n ],\n },\n {\n type: 'blockquote',\n content: [\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'This blockquote can be moved as a single unit.',\n },\n ],\n },\n {\n type: 'blockquote',\n content: [\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'Nested blockquotes move together with their parent.',\n },\n ],\n },\n ],\n },\n ],\n },\n {\n type: 'heading',\n attrs: {\n level: 2,\n },\n content: [\n {\n type: 'text',\n text: 'Try It Yourself',\n },\n ],\n },\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'Practice by moving this paragraph to the top of the document.',\n },\n ],\n },\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'Or drag this one to between the headings above.',\n },\n ],\n },\n {\n type: 'paragraph',\n content: [\n {\n type: 'text',\n text: 'The drag handles make it easy to reorganize your content exactly how you want it.',\n },\n ],\n },\n ],\n}\n"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"meta": {
|
|
19
|
+
"hasIcons": false,
|
|
20
|
+
"hidden": false,
|
|
21
|
+
"story": "",
|
|
22
|
+
"framework": "solid",
|
|
23
|
+
"accumulatedFiles": [
|
|
24
|
+
"registry/src/solid/sample/sample-doc-block-handle.ts"
|
|
25
|
+
],
|
|
26
|
+
"internalDependencies": []
|
|
27
|
+
},
|
|
28
|
+
"$schema": "https://ui.shadcn.com/schema/registry-item.json"
|
|
29
|
+
}
|