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