prosekit-registry 0.0.21 → 0.0.22
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/dist/r/lit-example-minimal.json +1 -1
- package/dist/r/lit-example-slash-menu.json +2 -2
- package/dist/r/lit-example-table.json +2 -2
- package/dist/r/lit-example-toolbar.json +2 -2
- package/dist/r/lit-sample-sample-doc-table.json +1 -1
- package/dist/r/lit-sample-sample-uploader.json +1 -1
- package/dist/r/lit-ui-button.json +2 -2
- package/dist/r/lit-ui-editor-context.json +1 -1
- package/dist/r/lit-ui-image-upload-popover.json +2 -2
- package/dist/r/lit-ui-slash-menu.json +4 -4
- package/dist/r/lit-ui-table-handle.json +2 -2
- package/dist/r/lit-ui-toolbar.json +1 -1
- package/dist/r/preact-example-block-handle.json +2 -2
- package/dist/r/preact-example-blockquote.json +2 -2
- package/dist/r/preact-example-bold.json +2 -2
- package/dist/r/preact-example-change-tracking.json +3 -3
- package/dist/r/preact-example-code-block-themes.json +2 -2
- package/dist/r/preact-example-code-block.json +2 -2
- package/dist/r/preact-example-code.json +2 -2
- package/dist/r/preact-example-drop-cursor.json +2 -2
- package/dist/r/preact-example-emoji-rules.json +2 -2
- package/dist/r/preact-example-full.json +2 -2
- package/dist/r/preact-example-gap-cursor.json +2 -2
- package/dist/r/preact-example-hard-break.json +2 -2
- package/dist/r/preact-example-heading.json +2 -2
- package/dist/r/preact-example-horizontal-rule.json +2 -2
- package/dist/r/preact-example-image-view.json +2 -2
- package/dist/r/preact-example-inline-menu.json +2 -2
- package/dist/r/preact-example-italic.json +2 -2
- package/dist/r/preact-example-keymap.json +2 -2
- package/dist/r/preact-example-link-mark-view.json +2 -2
- package/dist/r/preact-example-link.json +2 -2
- package/dist/r/preact-example-list-custom-checkbox.json +2 -2
- package/dist/r/preact-example-list.json +2 -2
- package/dist/r/preact-example-loro.json +2 -2
- package/dist/r/preact-example-mark-rule.json +2 -2
- package/dist/r/preact-example-minimal.json +1 -1
- package/dist/r/preact-example-placeholder.json +2 -2
- package/dist/r/preact-example-readonly.json +2 -2
- package/dist/r/preact-example-rtl.json +2 -2
- package/dist/r/preact-example-save-html.json +2 -2
- package/dist/r/preact-example-save-json.json +2 -2
- package/dist/r/preact-example-save-markdown.json +2 -2
- package/dist/r/preact-example-search.json +2 -2
- package/dist/r/preact-example-slash-menu.json +2 -2
- package/dist/r/preact-example-strike.json +2 -2
- package/dist/r/preact-example-table.json +2 -2
- package/dist/r/preact-example-temml.json +2 -2
- package/dist/r/preact-example-text-align.json +2 -2
- package/dist/r/preact-example-text-color.json +3 -3
- package/dist/r/preact-example-toolbar.json +2 -2
- package/dist/r/preact-example-typography.json +2 -2
- package/dist/r/preact-example-underline.json +2 -2
- package/dist/r/preact-example-unmount.json +2 -2
- package/dist/r/preact-example-user-menu-dynamic.json +2 -2
- package/dist/r/preact-example-user-menu.json +2 -2
- package/dist/r/preact-example-view-adapter.json +2 -2
- package/dist/r/preact-example-word-counter.json +2 -2
- package/dist/r/preact-example-yjs.json +2 -2
- package/dist/r/preact-sample-define-atom-block.json +1 -1
- package/dist/r/preact-sample-sample-doc-block-handle.json +1 -1
- package/dist/r/preact-sample-sample-doc-bold.json +1 -1
- package/dist/r/preact-sample-sample-doc-code-block.json +1 -1
- package/dist/r/preact-sample-sample-doc-code.json +1 -1
- package/dist/r/preact-sample-sample-doc-drop-cursor.json +1 -1
- package/dist/r/preact-sample-sample-doc-full.json +1 -1
- package/dist/r/preact-sample-sample-doc-gap-cursor.json +1 -1
- package/dist/r/preact-sample-sample-doc-hard-break.json +1 -1
- package/dist/r/preact-sample-sample-doc-heading.json +1 -1
- package/dist/r/preact-sample-sample-doc-image.json +1 -1
- package/dist/r/preact-sample-sample-doc-inline-menu.json +1 -1
- package/dist/r/preact-sample-sample-doc-italic.json +1 -1
- package/dist/r/preact-sample-sample-doc-link-mark-view.json +1 -1
- package/dist/r/preact-sample-sample-doc-link.json +1 -1
- package/dist/r/preact-sample-sample-doc-list-custom-checkbox.json +1 -1
- package/dist/r/preact-sample-sample-doc-list.json +1 -1
- package/dist/r/preact-sample-sample-doc-readonly.json +1 -1
- package/dist/r/preact-sample-sample-doc-rtl.json +1 -1
- package/dist/r/preact-sample-sample-doc-search.json +1 -1
- package/dist/r/preact-sample-sample-doc-strike.json +1 -1
- package/dist/r/preact-sample-sample-doc-table.json +1 -1
- package/dist/r/preact-sample-sample-doc-tex.json +1 -1
- package/dist/r/preact-sample-sample-doc-text-align.json +1 -1
- package/dist/r/preact-sample-sample-doc-text-color.json +1 -1
- package/dist/r/preact-sample-sample-doc-typography.json +1 -1
- package/dist/r/preact-sample-sample-doc-underline.json +1 -1
- package/dist/r/preact-sample-sample-doc-view-adapter.json +1 -1
- package/dist/r/preact-sample-sample-doc-word-counter.json +1 -1
- package/dist/r/preact-sample-sample-uploader.json +1 -1
- package/dist/r/preact-ui-block-handle.json +2 -2
- package/dist/r/preact-ui-button.json +2 -2
- package/dist/r/preact-ui-code-block-view.json +1 -1
- package/dist/r/preact-ui-drop-indicator.json +1 -1
- package/dist/r/preact-ui-image-upload-popover.json +2 -2
- package/dist/r/preact-ui-image-view.json +1 -1
- package/dist/r/preact-ui-inline-menu.json +2 -2
- package/dist/r/preact-ui-search.json +2 -2
- package/dist/r/preact-ui-slash-menu.json +4 -4
- package/dist/r/preact-ui-table-handle.json +2 -2
- package/dist/r/preact-ui-tag-menu.json +2 -2
- package/dist/r/preact-ui-toolbar.json +1 -1
- package/dist/r/preact-ui-user-menu.json +2 -2
- package/dist/r/preact-ui-word-counter.json +1 -1
- package/dist/r/react-example-block-handle.json +2 -2
- package/dist/r/react-example-blockquote.json +2 -2
- package/dist/r/react-example-bold.json +2 -2
- package/dist/r/react-example-change-tracking.json +3 -3
- package/dist/r/react-example-code-block-themes.json +2 -2
- package/dist/r/react-example-code-block.json +2 -2
- package/dist/r/react-example-code.json +2 -2
- package/dist/r/react-example-drop-cursor.json +2 -2
- package/dist/r/react-example-emoji-rules.json +2 -2
- package/dist/r/react-example-full.json +2 -2
- package/dist/r/react-example-gap-cursor.json +2 -2
- package/dist/r/react-example-hard-break.json +2 -2
- package/dist/r/react-example-heading.json +2 -2
- package/dist/r/react-example-horizontal-rule.json +2 -2
- package/dist/r/react-example-image-view.json +2 -2
- package/dist/r/react-example-inline-menu.json +2 -2
- package/dist/r/react-example-italic.json +2 -2
- package/dist/r/react-example-keymap.json +2 -2
- package/dist/r/react-example-link-mark-view.json +2 -2
- package/dist/r/react-example-link.json +2 -2
- package/dist/r/react-example-list-custom-checkbox.json +2 -2
- package/dist/r/react-example-list.json +2 -2
- package/dist/r/react-example-loro.json +2 -2
- package/dist/r/react-example-mark-rule.json +2 -2
- package/dist/r/react-example-minimal.json +1 -1
- package/dist/r/react-example-notion.json +6 -6
- package/dist/r/react-example-page.json +2 -2
- package/dist/r/react-example-placeholder.json +2 -2
- package/dist/r/react-example-readonly.json +2 -2
- package/dist/r/react-example-rtl.json +2 -2
- package/dist/r/react-example-save-html.json +2 -2
- package/dist/r/react-example-save-json.json +2 -2
- package/dist/r/react-example-save-markdown.json +2 -2
- package/dist/r/react-example-search.json +2 -2
- package/dist/r/react-example-slash-menu.json +2 -2
- package/dist/r/react-example-strike.json +2 -2
- package/dist/r/react-example-table.json +2 -2
- package/dist/r/react-example-temml.json +2 -2
- package/dist/r/react-example-text-align.json +2 -2
- package/dist/r/react-example-text-color.json +3 -3
- package/dist/r/react-example-toolbar.json +2 -2
- package/dist/r/react-example-tweet.json +2 -2
- package/dist/r/react-example-typography.json +2 -2
- package/dist/r/react-example-underline.json +2 -2
- package/dist/r/react-example-unmount.json +2 -2
- package/dist/r/react-example-user-menu-dynamic.json +2 -2
- package/dist/r/react-example-user-menu.json +2 -2
- package/dist/r/react-example-view-adapter.json +2 -2
- package/dist/r/react-example-word-counter.json +2 -2
- package/dist/r/react-example-yjs.json +2 -2
- package/dist/r/react-sample-define-atom-block.json +1 -1
- package/dist/r/react-sample-sample-doc-block-handle.json +1 -1
- package/dist/r/react-sample-sample-doc-bold.json +1 -1
- package/dist/r/react-sample-sample-doc-code-block.json +1 -1
- package/dist/r/react-sample-sample-doc-code.json +1 -1
- package/dist/r/react-sample-sample-doc-drop-cursor.json +1 -1
- package/dist/r/react-sample-sample-doc-full.json +1 -1
- package/dist/r/react-sample-sample-doc-gap-cursor.json +1 -1
- package/dist/r/react-sample-sample-doc-hard-break.json +1 -1
- package/dist/r/react-sample-sample-doc-heading.json +1 -1
- package/dist/r/react-sample-sample-doc-image.json +1 -1
- package/dist/r/react-sample-sample-doc-inline-menu.json +1 -1
- package/dist/r/react-sample-sample-doc-italic.json +1 -1
- package/dist/r/react-sample-sample-doc-link-mark-view.json +1 -1
- package/dist/r/react-sample-sample-doc-link.json +1 -1
- package/dist/r/react-sample-sample-doc-list-custom-checkbox.json +1 -1
- package/dist/r/react-sample-sample-doc-list.json +1 -1
- package/dist/r/react-sample-sample-doc-notion.json +1 -1
- package/dist/r/react-sample-sample-doc-page.json +1 -1
- package/dist/r/react-sample-sample-doc-readonly.json +1 -1
- package/dist/r/react-sample-sample-doc-rtl.json +1 -1
- package/dist/r/react-sample-sample-doc-search.json +1 -1
- package/dist/r/react-sample-sample-doc-strike.json +1 -1
- package/dist/r/react-sample-sample-doc-table.json +1 -1
- package/dist/r/react-sample-sample-doc-tex.json +1 -1
- package/dist/r/react-sample-sample-doc-text-align.json +1 -1
- package/dist/r/react-sample-sample-doc-text-color.json +1 -1
- package/dist/r/react-sample-sample-doc-tweet.json +1 -1
- package/dist/r/react-sample-sample-doc-typography.json +1 -1
- package/dist/r/react-sample-sample-doc-underline.json +1 -1
- package/dist/r/react-sample-sample-doc-view-adapter.json +1 -1
- package/dist/r/react-sample-sample-doc-word-counter.json +1 -1
- package/dist/r/react-sample-sample-uploader.json +1 -1
- package/dist/r/react-ui-block-handle.json +2 -2
- package/dist/r/react-ui-button.json +2 -2
- package/dist/r/react-ui-code-block-view.json +1 -1
- package/dist/r/react-ui-drop-indicator.json +1 -1
- package/dist/r/react-ui-image-upload-popover.json +2 -2
- package/dist/r/react-ui-image-view.json +1 -1
- package/dist/r/react-ui-inline-menu.json +2 -2
- package/dist/r/react-ui-search.json +2 -2
- package/dist/r/react-ui-slash-menu.json +4 -4
- package/dist/r/react-ui-table-handle.json +2 -2
- package/dist/r/react-ui-tag-menu.json +2 -2
- package/dist/r/react-ui-toolbar.json +1 -1
- package/dist/r/react-ui-user-menu.json +2 -2
- package/dist/r/react-ui-word-counter.json +1 -1
- package/dist/r/registry.json +480 -480
- package/dist/r/solid-example-block-handle.json +2 -2
- package/dist/r/solid-example-blockquote.json +2 -2
- package/dist/r/solid-example-bold.json +2 -2
- package/dist/r/solid-example-change-tracking.json +3 -3
- package/dist/r/solid-example-code-block-themes.json +2 -2
- package/dist/r/solid-example-code-block.json +2 -2
- package/dist/r/solid-example-code.json +2 -2
- package/dist/r/solid-example-drop-cursor.json +2 -2
- package/dist/r/solid-example-emoji-rules.json +2 -2
- package/dist/r/solid-example-full.json +2 -2
- package/dist/r/solid-example-gap-cursor.json +2 -2
- package/dist/r/solid-example-hard-break.json +2 -2
- package/dist/r/solid-example-heading.json +2 -2
- package/dist/r/solid-example-horizontal-rule.json +2 -2
- package/dist/r/solid-example-image-view.json +2 -2
- package/dist/r/solid-example-inline-menu.json +2 -2
- package/dist/r/solid-example-italic.json +2 -2
- package/dist/r/solid-example-keymap.json +2 -2
- package/dist/r/solid-example-link-mark-view.json +2 -2
- package/dist/r/solid-example-link.json +2 -2
- package/dist/r/solid-example-list-custom-checkbox.json +2 -2
- package/dist/r/solid-example-list.json +2 -2
- package/dist/r/solid-example-loro.json +2 -2
- package/dist/r/solid-example-mark-rule.json +2 -2
- package/dist/r/solid-example-minimal.json +1 -1
- package/dist/r/solid-example-placeholder.json +2 -2
- package/dist/r/solid-example-readonly.json +2 -2
- package/dist/r/solid-example-rtl.json +2 -2
- package/dist/r/solid-example-save-html.json +2 -2
- package/dist/r/solid-example-save-json.json +2 -2
- package/dist/r/solid-example-save-markdown.json +2 -2
- package/dist/r/solid-example-search.json +2 -2
- package/dist/r/solid-example-slash-menu.json +2 -2
- package/dist/r/solid-example-strike.json +2 -2
- package/dist/r/solid-example-table.json +2 -2
- package/dist/r/solid-example-temml.json +2 -2
- package/dist/r/solid-example-text-align.json +2 -2
- package/dist/r/solid-example-text-color.json +3 -3
- package/dist/r/solid-example-toolbar.json +2 -2
- package/dist/r/solid-example-typography.json +2 -2
- package/dist/r/solid-example-underline.json +2 -2
- package/dist/r/solid-example-unmount.json +2 -2
- package/dist/r/solid-example-user-menu-dynamic.json +2 -2
- package/dist/r/solid-example-user-menu.json +2 -2
- package/dist/r/solid-example-view-adapter.json +2 -2
- package/dist/r/solid-example-word-counter.json +2 -2
- package/dist/r/solid-example-yjs.json +2 -2
- package/dist/r/solid-sample-define-atom-block.json +1 -1
- package/dist/r/solid-sample-sample-doc-block-handle.json +1 -1
- package/dist/r/solid-sample-sample-doc-bold.json +1 -1
- package/dist/r/solid-sample-sample-doc-code-block.json +1 -1
- package/dist/r/solid-sample-sample-doc-code.json +1 -1
- package/dist/r/solid-sample-sample-doc-drop-cursor.json +1 -1
- package/dist/r/solid-sample-sample-doc-full.json +1 -1
- package/dist/r/solid-sample-sample-doc-gap-cursor.json +1 -1
- package/dist/r/solid-sample-sample-doc-hard-break.json +1 -1
- package/dist/r/solid-sample-sample-doc-heading.json +1 -1
- package/dist/r/solid-sample-sample-doc-image.json +1 -1
- package/dist/r/solid-sample-sample-doc-inline-menu.json +1 -1
- package/dist/r/solid-sample-sample-doc-italic.json +1 -1
- package/dist/r/solid-sample-sample-doc-link-mark-view.json +1 -1
- package/dist/r/solid-sample-sample-doc-link.json +1 -1
- package/dist/r/solid-sample-sample-doc-list-custom-checkbox.json +1 -1
- package/dist/r/solid-sample-sample-doc-list.json +1 -1
- package/dist/r/solid-sample-sample-doc-readonly.json +1 -1
- package/dist/r/solid-sample-sample-doc-rtl.json +1 -1
- package/dist/r/solid-sample-sample-doc-search.json +1 -1
- package/dist/r/solid-sample-sample-doc-strike.json +1 -1
- package/dist/r/solid-sample-sample-doc-table.json +1 -1
- package/dist/r/solid-sample-sample-doc-tex.json +1 -1
- package/dist/r/solid-sample-sample-doc-text-align.json +1 -1
- package/dist/r/solid-sample-sample-doc-text-color.json +1 -1
- package/dist/r/solid-sample-sample-doc-typography.json +1 -1
- package/dist/r/solid-sample-sample-doc-underline.json +1 -1
- package/dist/r/solid-sample-sample-doc-view-adapter.json +1 -1
- package/dist/r/solid-sample-sample-doc-word-counter.json +1 -1
- package/dist/r/solid-sample-sample-uploader.json +1 -1
- package/dist/r/solid-ui-block-handle.json +2 -2
- package/dist/r/solid-ui-button.json +2 -2
- package/dist/r/solid-ui-code-block-view.json +1 -1
- package/dist/r/solid-ui-drop-indicator.json +1 -1
- package/dist/r/solid-ui-image-upload-popover.json +2 -2
- package/dist/r/solid-ui-image-view.json +1 -1
- package/dist/r/solid-ui-inline-menu.json +2 -2
- package/dist/r/solid-ui-search.json +2 -2
- package/dist/r/solid-ui-slash-menu.json +4 -4
- package/dist/r/solid-ui-table-handle.json +2 -2
- package/dist/r/solid-ui-tag-menu.json +2 -2
- package/dist/r/solid-ui-toolbar.json +1 -1
- package/dist/r/solid-ui-user-menu.json +2 -2
- package/dist/r/solid-ui-word-counter.json +1 -1
- package/dist/r/svelte-example-block-handle.json +2 -2
- package/dist/r/svelte-example-blockquote.json +2 -2
- package/dist/r/svelte-example-bold.json +2 -2
- package/dist/r/svelte-example-change-tracking.json +3 -3
- package/dist/r/svelte-example-code-block-themes.json +2 -2
- package/dist/r/svelte-example-code-block.json +2 -2
- package/dist/r/svelte-example-code.json +2 -2
- package/dist/r/svelte-example-drop-cursor.json +2 -2
- package/dist/r/svelte-example-emoji-rules.json +2 -2
- package/dist/r/svelte-example-full.json +2 -2
- package/dist/r/svelte-example-gap-cursor.json +2 -2
- package/dist/r/svelte-example-hard-break.json +2 -2
- package/dist/r/svelte-example-heading.json +2 -2
- package/dist/r/svelte-example-horizontal-rule.json +2 -2
- package/dist/r/svelte-example-image-view.json +2 -2
- package/dist/r/svelte-example-inline-menu.json +2 -2
- package/dist/r/svelte-example-italic.json +2 -2
- package/dist/r/svelte-example-katex.json +2 -2
- package/dist/r/svelte-example-keymap.json +2 -2
- package/dist/r/svelte-example-link-mark-view.json +2 -2
- package/dist/r/svelte-example-link.json +2 -2
- package/dist/r/svelte-example-list-custom-checkbox.json +2 -2
- package/dist/r/svelte-example-list.json +2 -2
- package/dist/r/svelte-example-loro.json +2 -2
- package/dist/r/svelte-example-mark-rule.json +2 -2
- package/dist/r/svelte-example-minimal.json +1 -1
- package/dist/r/svelte-example-page.json +2 -2
- package/dist/r/svelte-example-placeholder.json +2 -2
- package/dist/r/svelte-example-readonly.json +2 -2
- package/dist/r/svelte-example-rtl.json +2 -2
- package/dist/r/svelte-example-save-html.json +2 -2
- package/dist/r/svelte-example-save-json.json +2 -2
- package/dist/r/svelte-example-save-markdown.json +2 -2
- package/dist/r/svelte-example-search.json +2 -2
- package/dist/r/svelte-example-slash-menu.json +2 -2
- package/dist/r/svelte-example-strike.json +2 -2
- package/dist/r/svelte-example-table.json +2 -2
- package/dist/r/svelte-example-text-align.json +2 -2
- package/dist/r/svelte-example-text-color.json +3 -3
- package/dist/r/svelte-example-toolbar.json +2 -2
- package/dist/r/svelte-example-typography.json +2 -2
- package/dist/r/svelte-example-underline.json +2 -2
- package/dist/r/svelte-example-unmount.json +2 -2
- package/dist/r/svelte-example-user-menu-dynamic.json +2 -2
- package/dist/r/svelte-example-user-menu.json +2 -2
- package/dist/r/svelte-example-view-adapter.json +2 -2
- package/dist/r/svelte-example-word-counter.json +2 -2
- package/dist/r/svelte-example-yjs.json +2 -2
- package/dist/r/svelte-sample-define-atom-block.json +1 -1
- package/dist/r/svelte-sample-sample-doc-block-handle.json +1 -1
- package/dist/r/svelte-sample-sample-doc-bold.json +1 -1
- package/dist/r/svelte-sample-sample-doc-code-block.json +1 -1
- package/dist/r/svelte-sample-sample-doc-code.json +1 -1
- package/dist/r/svelte-sample-sample-doc-drop-cursor.json +1 -1
- package/dist/r/svelte-sample-sample-doc-full.json +1 -1
- package/dist/r/svelte-sample-sample-doc-gap-cursor.json +1 -1
- package/dist/r/svelte-sample-sample-doc-hard-break.json +1 -1
- package/dist/r/svelte-sample-sample-doc-heading.json +1 -1
- package/dist/r/svelte-sample-sample-doc-image.json +1 -1
- package/dist/r/svelte-sample-sample-doc-inline-menu.json +1 -1
- package/dist/r/svelte-sample-sample-doc-italic.json +1 -1
- package/dist/r/svelte-sample-sample-doc-link-mark-view.json +1 -1
- package/dist/r/svelte-sample-sample-doc-link.json +1 -1
- package/dist/r/svelte-sample-sample-doc-list-custom-checkbox.json +1 -1
- package/dist/r/svelte-sample-sample-doc-list.json +1 -1
- package/dist/r/svelte-sample-sample-doc-page.json +1 -1
- package/dist/r/svelte-sample-sample-doc-readonly.json +1 -1
- package/dist/r/svelte-sample-sample-doc-rtl.json +1 -1
- package/dist/r/svelte-sample-sample-doc-search.json +1 -1
- package/dist/r/svelte-sample-sample-doc-strike.json +1 -1
- package/dist/r/svelte-sample-sample-doc-table.json +1 -1
- package/dist/r/svelte-sample-sample-doc-tex.json +1 -1
- package/dist/r/svelte-sample-sample-doc-text-align.json +1 -1
- package/dist/r/svelte-sample-sample-doc-text-color.json +1 -1
- package/dist/r/svelte-sample-sample-doc-typography.json +1 -1
- package/dist/r/svelte-sample-sample-doc-underline.json +1 -1
- package/dist/r/svelte-sample-sample-doc-view-adapter.json +1 -1
- package/dist/r/svelte-sample-sample-doc-word-counter.json +1 -1
- package/dist/r/svelte-sample-sample-uploader.json +1 -1
- package/dist/r/svelte-ui-block-handle.json +2 -2
- package/dist/r/svelte-ui-button.json +2 -2
- package/dist/r/svelte-ui-code-block-view.json +1 -1
- package/dist/r/svelte-ui-drop-indicator.json +1 -1
- package/dist/r/svelte-ui-image-upload-popover.json +2 -2
- package/dist/r/svelte-ui-image-view.json +1 -1
- package/dist/r/svelte-ui-inline-menu.json +2 -2
- package/dist/r/svelte-ui-search.json +2 -2
- package/dist/r/svelte-ui-slash-menu.json +4 -4
- package/dist/r/svelte-ui-table-handle.json +2 -2
- package/dist/r/svelte-ui-tag-menu.json +2 -2
- package/dist/r/svelte-ui-toolbar.json +1 -1
- package/dist/r/svelte-ui-user-menu.json +2 -2
- package/dist/r/svelte-ui-word-counter.json +1 -1
- package/dist/r/vanilla-example-minimal.json +1 -1
- package/dist/r/vanilla-example-slash-menu.json +2 -2
- package/dist/r/vanilla-ui-slash-menu.json +4 -4
- package/dist/r/vue-example-block-handle.json +2 -2
- package/dist/r/vue-example-blockquote.json +2 -2
- package/dist/r/vue-example-bold.json +2 -2
- package/dist/r/vue-example-change-tracking.json +3 -3
- package/dist/r/vue-example-code-block-themes.json +2 -2
- package/dist/r/vue-example-code-block.json +2 -2
- package/dist/r/vue-example-code.json +2 -2
- package/dist/r/vue-example-drop-cursor.json +2 -2
- package/dist/r/vue-example-emoji-rules.json +2 -2
- package/dist/r/vue-example-full.json +2 -2
- package/dist/r/vue-example-gap-cursor.json +2 -2
- package/dist/r/vue-example-hard-break.json +2 -2
- package/dist/r/vue-example-heading.json +2 -2
- package/dist/r/vue-example-horizontal-rule.json +2 -2
- package/dist/r/vue-example-image-view.json +2 -2
- package/dist/r/vue-example-inline-menu.json +2 -2
- package/dist/r/vue-example-italic.json +2 -2
- package/dist/r/vue-example-katex.json +2 -2
- package/dist/r/vue-example-keymap.json +2 -2
- package/dist/r/vue-example-link-mark-view.json +2 -2
- package/dist/r/vue-example-link.json +2 -2
- package/dist/r/vue-example-list-custom-checkbox.json +2 -2
- package/dist/r/vue-example-list.json +2 -2
- package/dist/r/vue-example-loro.json +2 -2
- package/dist/r/vue-example-mark-rule.json +2 -2
- package/dist/r/vue-example-minimal.json +1 -1
- package/dist/r/vue-example-placeholder.json +2 -2
- package/dist/r/vue-example-readonly.json +2 -2
- package/dist/r/vue-example-rtl.json +2 -2
- package/dist/r/vue-example-save-html.json +2 -2
- package/dist/r/vue-example-save-json.json +2 -2
- package/dist/r/vue-example-save-markdown.json +2 -2
- package/dist/r/vue-example-search.json +2 -2
- package/dist/r/vue-example-slash-menu.json +2 -2
- package/dist/r/vue-example-strike.json +2 -2
- package/dist/r/vue-example-table.json +2 -2
- package/dist/r/vue-example-text-align.json +2 -2
- package/dist/r/vue-example-text-color.json +3 -3
- package/dist/r/vue-example-toolbar.json +2 -2
- package/dist/r/vue-example-tweet.json +2 -2
- package/dist/r/vue-example-typography.json +2 -2
- package/dist/r/vue-example-underline.json +2 -2
- package/dist/r/vue-example-unmount.json +2 -2
- package/dist/r/vue-example-user-menu-dynamic.json +2 -2
- package/dist/r/vue-example-user-menu.json +2 -2
- package/dist/r/vue-example-view-adapter.json +2 -2
- package/dist/r/vue-example-word-counter.json +2 -2
- package/dist/r/vue-example-yjs.json +2 -2
- package/dist/r/vue-sample-define-atom-block.json +1 -1
- package/dist/r/vue-sample-sample-doc-block-handle.json +1 -1
- package/dist/r/vue-sample-sample-doc-bold.json +1 -1
- package/dist/r/vue-sample-sample-doc-code-block.json +1 -1
- package/dist/r/vue-sample-sample-doc-code.json +1 -1
- package/dist/r/vue-sample-sample-doc-drop-cursor.json +1 -1
- package/dist/r/vue-sample-sample-doc-full.json +1 -1
- package/dist/r/vue-sample-sample-doc-gap-cursor.json +1 -1
- package/dist/r/vue-sample-sample-doc-hard-break.json +1 -1
- package/dist/r/vue-sample-sample-doc-heading.json +1 -1
- package/dist/r/vue-sample-sample-doc-image.json +1 -1
- package/dist/r/vue-sample-sample-doc-inline-menu.json +1 -1
- package/dist/r/vue-sample-sample-doc-italic.json +1 -1
- package/dist/r/vue-sample-sample-doc-link-mark-view.json +1 -1
- package/dist/r/vue-sample-sample-doc-link.json +1 -1
- package/dist/r/vue-sample-sample-doc-list-custom-checkbox.json +1 -1
- package/dist/r/vue-sample-sample-doc-list.json +1 -1
- package/dist/r/vue-sample-sample-doc-readonly.json +1 -1
- package/dist/r/vue-sample-sample-doc-rtl.json +1 -1
- package/dist/r/vue-sample-sample-doc-search.json +1 -1
- package/dist/r/vue-sample-sample-doc-strike.json +1 -1
- package/dist/r/vue-sample-sample-doc-table.json +1 -1
- package/dist/r/vue-sample-sample-doc-tex.json +1 -1
- package/dist/r/vue-sample-sample-doc-text-align.json +1 -1
- package/dist/r/vue-sample-sample-doc-text-color.json +1 -1
- package/dist/r/vue-sample-sample-doc-tweet.json +1 -1
- package/dist/r/vue-sample-sample-doc-typography.json +1 -1
- package/dist/r/vue-sample-sample-doc-underline.json +1 -1
- package/dist/r/vue-sample-sample-doc-view-adapter.json +1 -1
- package/dist/r/vue-sample-sample-doc-word-counter.json +1 -1
- package/dist/r/vue-sample-sample-uploader.json +1 -1
- package/dist/r/vue-ui-block-handle.json +2 -2
- package/dist/r/vue-ui-button.json +2 -2
- package/dist/r/vue-ui-code-block-view.json +1 -1
- package/dist/r/vue-ui-drop-indicator.json +1 -1
- package/dist/r/vue-ui-image-upload-popover.json +2 -2
- package/dist/r/vue-ui-image-view.json +1 -1
- package/dist/r/vue-ui-inline-menu.json +2 -2
- package/dist/r/vue-ui-search.json +2 -2
- package/dist/r/vue-ui-slash-menu.json +4 -4
- package/dist/r/vue-ui-table-handle.json +2 -2
- package/dist/r/vue-ui-tag-menu.json +2 -2
- package/dist/r/vue-ui-toolbar.json +1 -1
- package/dist/r/vue-ui-user-menu.json +2 -2
- package/dist/r/vue-ui-word-counter.json +1 -1
- package/package.json +13 -13
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
"description": "Auto-convert text shortcuts to emojis using input rules.",
|
|
6
6
|
"registryDependencies": [],
|
|
7
7
|
"dependencies": [
|
|
8
|
-
"prosekit@^0.20.0
|
|
8
|
+
"prosekit@^0.20.0"
|
|
9
9
|
],
|
|
10
10
|
"files": [
|
|
11
11
|
{
|
|
12
12
|
"path": "registry/src/preact/examples/emoji-rules/editor.tsx",
|
|
13
13
|
"type": "registry:component",
|
|
14
14
|
"target": "components/editor/examples/emoji-rules/editor.tsx",
|
|
15
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { defineExtension } from './extension'\n\nexport default function Editor() {\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension })\n }, [])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
15
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { defineExtension } from './extension'\n\nexport default function Editor() {\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension })\n }, [])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"path": "registry/src/preact/examples/emoji-rules/emoji.ts",
|
|
@@ -21,14 +21,14 @@
|
|
|
21
21
|
"https://unpkg.com/prosekit-registry/dist/r/preact-ui-user-menu.json"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": [
|
|
24
|
-
"prosekit@^0.20.0
|
|
24
|
+
"prosekit@^0.20.0"
|
|
25
25
|
],
|
|
26
26
|
"files": [
|
|
27
27
|
{
|
|
28
28
|
"path": "registry/src/preact/examples/full/editor.tsx",
|
|
29
29
|
"type": "registry:component",
|
|
30
30
|
"target": "components/editor/examples/full/editor.tsx",
|
|
31
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-full'\nimport { tags } from '../../sample/sample-tag-data'\nimport { sampleUploader } from '../../sample/sample-uploader'\nimport { users } from '../../sample/sample-user-data'\nimport { BlockHandle } from '../../ui/block-handle'\nimport { DropIndicator } from '../../ui/drop-indicator'\nimport { InlineMenu } from '../../ui/inline-menu'\nimport { SlashMenu } from '../../ui/slash-menu'\nimport { TableHandle } from '../../ui/table-handle'\nimport { TagMenu } from '../../ui/tag-menu'\nimport { Toolbar } from '../../ui/toolbar'\nimport { UserMenu } from '../../ui/user-menu'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
31
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-full'\nimport { tags } from '../../sample/sample-tag-data'\nimport { sampleUploader } from '../../sample/sample-uploader'\nimport { users } from '../../sample/sample-user-data'\nimport { BlockHandle } from '../../ui/block-handle'\nimport { DropIndicator } from '../../ui/drop-indicator'\nimport { InlineMenu } from '../../ui/inline-menu'\nimport { SlashMenu } from '../../ui/slash-menu'\nimport { TableHandle } from '../../ui/table-handle'\nimport { TagMenu } from '../../ui/tag-menu'\nimport { Toolbar } from '../../ui/toolbar'\nimport { UserMenu } from '../../ui/user-menu'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <Toolbar uploader={sampleUploader} />\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n <InlineMenu />\n <SlashMenu />\n <UserMenu users={users} />\n <TagMenu tags={tags} />\n <BlockHandle />\n <TableHandle />\n <DropIndicator />\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
32
32
|
},
|
|
33
33
|
{
|
|
34
34
|
"path": "registry/src/preact/examples/full/extension.ts",
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
"https://unpkg.com/prosekit-registry/dist/r/preact-sample-sample-doc-gap-cursor.json"
|
|
8
8
|
],
|
|
9
9
|
"dependencies": [
|
|
10
|
-
"prosekit@^0.20.0
|
|
10
|
+
"prosekit@^0.20.0"
|
|
11
11
|
],
|
|
12
12
|
"files": [
|
|
13
13
|
{
|
|
14
14
|
"path": "registry/src/preact/examples/gap-cursor/editor.tsx",
|
|
15
15
|
"type": "registry:component",
|
|
16
16
|
"target": "components/editor/examples/gap-cursor/editor.tsx",
|
|
17
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-gap-cursor'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n return createEditor({ extension: defineExtension(), defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
17
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-gap-cursor'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n return createEditor({ extension: defineExtension(), defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"path": "registry/src/preact/examples/gap-cursor/extension.ts",
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"https://unpkg.com/prosekit-registry/dist/r/preact-ui-button.json"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": [
|
|
11
|
-
"prosekit@^0.20.0
|
|
11
|
+
"prosekit@^0.20.0"
|
|
12
12
|
],
|
|
13
13
|
"files": [
|
|
14
14
|
{
|
|
15
15
|
"path": "registry/src/preact/examples/hard-break/editor.tsx",
|
|
16
16
|
"type": "registry:component",
|
|
17
17
|
"target": "components/editor/examples/hard-break/editor.tsx",
|
|
18
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-hard-break'\n\nimport { defineExtension } from './extension'\nimport Toolbar from './toolbar'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
18
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-hard-break'\n\nimport { defineExtension } from './extension'\nimport Toolbar from './toolbar'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <Toolbar />\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"path": "registry/src/preact/examples/hard-break/extension.ts",
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"https://unpkg.com/prosekit-registry/dist/r/preact-ui-toolbar.json"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": [
|
|
11
|
-
"prosekit@^0.20.0
|
|
11
|
+
"prosekit@^0.20.0"
|
|
12
12
|
],
|
|
13
13
|
"files": [
|
|
14
14
|
{
|
|
15
15
|
"path": "registry/src/preact/examples/heading/editor.tsx",
|
|
16
16
|
"type": "registry:component",
|
|
17
17
|
"target": "components/editor/examples/heading/editor.tsx",
|
|
18
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-heading'\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n return createEditor({ extension: defineExtension(), defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
18
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-heading'\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n return createEditor({ extension: defineExtension(), defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <Toolbar />\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"path": "registry/src/preact/examples/heading/extension.ts",
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
"https://unpkg.com/prosekit-registry/dist/r/preact-ui-toolbar.json"
|
|
8
8
|
],
|
|
9
9
|
"dependencies": [
|
|
10
|
-
"prosekit@^0.20.0
|
|
10
|
+
"prosekit@^0.20.0"
|
|
11
11
|
],
|
|
12
12
|
"files": [
|
|
13
13
|
{
|
|
14
14
|
"path": "registry/src/preact/examples/horizontal-rule/editor.tsx",
|
|
15
15
|
"type": "registry:component",
|
|
16
16
|
"target": "components/editor/examples/horizontal-rule/editor.tsx",
|
|
17
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\nexport default function Editor() {\n const editor = useMemo(() => {\n return createEditor({ extension: defineExtension() })\n }, [])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
17
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\nexport default function Editor() {\n const editor = useMemo(() => {\n return createEditor({ extension: defineExtension() })\n }, [])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <Toolbar />\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"path": "registry/src/preact/examples/horizontal-rule/extension.ts",
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"https://unpkg.com/prosekit-registry/dist/r/preact-ui-image-view.json"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": [
|
|
12
|
-
"prosekit@^0.20.0
|
|
12
|
+
"prosekit@^0.20.0"
|
|
13
13
|
],
|
|
14
14
|
"files": [
|
|
15
15
|
{
|
|
16
16
|
"path": "registry/src/preact/examples/image-view/editor.tsx",
|
|
17
17
|
"type": "registry:component",
|
|
18
18
|
"target": "components/editor/examples/image-view/editor.tsx",
|
|
19
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-image'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
19
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-image'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"path": "registry/src/preact/examples/image-view/extension.ts",
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"https://unpkg.com/prosekit-registry/dist/r/preact-ui-inline-menu.json"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": [
|
|
11
|
-
"prosekit@^0.20.0
|
|
11
|
+
"prosekit@^0.20.0"
|
|
12
12
|
],
|
|
13
13
|
"files": [
|
|
14
14
|
{
|
|
15
15
|
"path": "registry/src/preact/examples/inline-menu/editor.tsx",
|
|
16
16
|
"type": "registry:component",
|
|
17
17
|
"target": "components/editor/examples/inline-menu/editor.tsx",
|
|
18
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-inline-menu'\nimport { InlineMenu } from '../../ui/inline-menu'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n return createEditor({ extension: defineExtension(), defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
18
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-inline-menu'\nimport { InlineMenu } from '../../ui/inline-menu'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n return createEditor({ extension: defineExtension(), defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n <InlineMenu />\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"path": "registry/src/preact/examples/inline-menu/extension.ts",
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"https://unpkg.com/prosekit-registry/dist/r/preact-ui-toolbar.json"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": [
|
|
11
|
-
"prosekit@^0.20.0
|
|
11
|
+
"prosekit@^0.20.0"
|
|
12
12
|
],
|
|
13
13
|
"files": [
|
|
14
14
|
{
|
|
15
15
|
"path": "registry/src/preact/examples/italic/editor.tsx",
|
|
16
16
|
"type": "registry:component",
|
|
17
17
|
"target": "components/editor/examples/italic/editor.tsx",
|
|
18
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-italic'\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
18
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-italic'\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <Toolbar />\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"path": "registry/src/preact/examples/italic/extension.ts",
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
"https://unpkg.com/prosekit-registry/dist/r/preact-ui-button.json"
|
|
8
8
|
],
|
|
9
9
|
"dependencies": [
|
|
10
|
-
"prosekit@^0.20.0
|
|
10
|
+
"prosekit@^0.20.0"
|
|
11
11
|
],
|
|
12
12
|
"files": [
|
|
13
13
|
{
|
|
14
14
|
"path": "registry/src/preact/examples/keymap/editor.tsx",
|
|
15
15
|
"type": "registry:component",
|
|
16
16
|
"target": "components/editor/examples/keymap/editor.tsx",
|
|
17
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useCallback, useMemo, useState } from 'preact/hooks'\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { defineExtension } from './extension'\nimport Toolbar from './toolbar'\n\nexport default function Editor() {\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension })\n }, [])\n\n const [submissions, setSubmissions] = useState<string[]>([])\n\n const pushSubmission = useCallback(\n (hotkey: string) => {\n const docString = JSON.stringify(editor.getDocJSON())\n const submission = `${new Date().toISOString()}\\t${hotkey}\\n${docString}`\n setSubmissions((prev) => [...prev, submission])\n },\n [editor],\n )\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
17
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useCallback, useMemo, useState } from 'preact/hooks'\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { defineExtension } from './extension'\nimport Toolbar from './toolbar'\n\nexport default function Editor() {\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension })\n }, [])\n\n const [submissions, setSubmissions] = useState<string[]>([])\n\n const pushSubmission = useCallback(\n (hotkey: string) => {\n const docString = JSON.stringify(editor.getDocJSON())\n const submission = `${new Date().toISOString()}\\t${hotkey}\\n${docString}`\n setSubmissions((prev) => [...prev, submission])\n },\n [editor],\n )\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <Toolbar onSubmit={pushSubmission} />\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </div>\n <fieldset className=\"mt-4 box-border flex max-w-full w-full overflow-x-auto border p-4 rounded-md shadow-sm min-w-0\">\n <legend>Submit Records</legend>\n <ol>\n {submissions.map((submission, index) => (\n <li key={index}>\n <pre>{submission}</pre>\n </li>\n ))}\n </ol>\n {submissions.length === 0 && <div>No submissions yet</div>}\n </fieldset>\n </ProseKit>\n )\n}\n"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"path": "registry/src/preact/examples/keymap/extension.ts",
|
|
@@ -7,14 +7,14 @@
|
|
|
7
7
|
"https://unpkg.com/prosekit-registry/dist/r/preact-sample-sample-doc-link-mark-view.json"
|
|
8
8
|
],
|
|
9
9
|
"dependencies": [
|
|
10
|
-
"prosekit@^0.20.0
|
|
10
|
+
"prosekit@^0.20.0"
|
|
11
11
|
],
|
|
12
12
|
"files": [
|
|
13
13
|
{
|
|
14
14
|
"path": "registry/src/preact/examples/link-mark-view/editor.tsx",
|
|
15
15
|
"type": "registry:component",
|
|
16
16
|
"target": "components/editor/examples/link-mark-view/editor.tsx",
|
|
17
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-link-mark-view'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
17
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-link-mark-view'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
20
|
"path": "registry/src/preact/examples/link-mark-view/extension.ts",
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"https://unpkg.com/prosekit-registry/dist/r/preact-ui-inline-menu.json"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": [
|
|
11
|
-
"prosekit@^0.20.0
|
|
11
|
+
"prosekit@^0.20.0"
|
|
12
12
|
],
|
|
13
13
|
"files": [
|
|
14
14
|
{
|
|
15
15
|
"path": "registry/src/preact/examples/link/editor.tsx",
|
|
16
16
|
"type": "registry:component",
|
|
17
17
|
"target": "components/editor/examples/link/editor.tsx",
|
|
18
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-link'\nimport { InlineMenu } from '../../ui/inline-menu'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
18
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-link'\nimport { InlineMenu } from '../../ui/inline-menu'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n <InlineMenu />\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"path": "registry/src/preact/examples/link/extension.ts",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"https://unpkg.com/prosekit-registry/dist/r/preact-ui-toolbar.json"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": [
|
|
11
|
-
"prosekit@^0.20.0
|
|
11
|
+
"prosekit@^0.20.0"
|
|
12
12
|
],
|
|
13
13
|
"files": [
|
|
14
14
|
{
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"path": "registry/src/preact/examples/list-custom-checkbox/editor.tsx",
|
|
22
22
|
"type": "registry:component",
|
|
23
23
|
"target": "components/editor/examples/list-custom-checkbox/editor.tsx",
|
|
24
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\nimport './custom-list.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-list-custom-checkbox'\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({\n extension,\n defaultContent,\n })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
24
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\nimport './custom-list.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-list-custom-checkbox'\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({\n extension,\n defaultContent,\n })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\" data-custom-list-css-enabled>\n <Toolbar />\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"path": "registry/src/preact/examples/list-custom-checkbox/extension.ts",
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"https://unpkg.com/prosekit-registry/dist/r/preact-ui-toolbar.json"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": [
|
|
11
|
-
"prosekit@^0.20.0
|
|
11
|
+
"prosekit@^0.20.0"
|
|
12
12
|
],
|
|
13
13
|
"files": [
|
|
14
14
|
{
|
|
15
15
|
"path": "registry/src/preact/examples/list/editor.tsx",
|
|
16
16
|
"type": "registry:component",
|
|
17
17
|
"target": "components/editor/examples/list/editor.tsx",
|
|
18
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-list'\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
18
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-list'\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <Toolbar />\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"path": "registry/src/preact/examples/list/extension.ts",
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"dependencies": [
|
|
10
10
|
"loro-crdt",
|
|
11
11
|
"loro-prosemirror",
|
|
12
|
-
"prosekit@^0.20.0
|
|
12
|
+
"prosekit@^0.20.0"
|
|
13
13
|
],
|
|
14
14
|
"files": [
|
|
15
15
|
{
|
|
16
16
|
"path": "registry/src/preact/examples/loro/editor-component.tsx",
|
|
17
17
|
"type": "registry:component",
|
|
18
18
|
"target": "components/editor/examples/loro/editor-component.tsx",
|
|
19
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\nimport 'prosekit/extensions/loro/style.css'\n\nimport type { CursorAwareness, LoroDocType } from 'loro-prosemirror'\nimport { useMemo } from 'preact/hooks'\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\nexport default function EditorComponent(props: {\n loro: LoroDocType\n awareness: CursorAwareness\n}) {\n const editor = useMemo(() => {\n const extension = defineExtension(props.loro, props.awareness)\n return createEditor({ extension })\n }, [props.loro, props.awareness])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
19
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\nimport 'prosekit/extensions/loro/style.css'\n\nimport type { CursorAwareness, LoroDocType } from 'loro-prosemirror'\nimport { useMemo } from 'preact/hooks'\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { Toolbar } from '../../ui/toolbar'\n\nimport { defineExtension } from './extension'\n\nexport default function EditorComponent(props: {\n loro: LoroDocType\n awareness: CursorAwareness\n}) {\n const editor = useMemo(() => {\n const extension = defineExtension(props.loro, props.awareness)\n return createEditor({ extension })\n }, [props.loro, props.awareness])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <Toolbar />\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
20
20
|
},
|
|
21
21
|
{
|
|
22
22
|
"path": "registry/src/preact/examples/loro/editor.tsx",
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
"description": "Input rules for automatic mark formatting.",
|
|
6
6
|
"registryDependencies": [],
|
|
7
7
|
"dependencies": [
|
|
8
|
-
"prosekit@^0.20.0
|
|
8
|
+
"prosekit@^0.20.0"
|
|
9
9
|
],
|
|
10
10
|
"files": [
|
|
11
11
|
{
|
|
12
12
|
"path": "registry/src/preact/examples/mark-rule/editor.tsx",
|
|
13
13
|
"type": "registry:component",
|
|
14
14
|
"target": "components/editor/examples/mark-rule/editor.tsx",
|
|
15
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { defineExtension } from './extension'\n\nexport default function Editor() {\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension })\n }, [])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
15
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { defineExtension } from './extension'\n\nexport default function Editor() {\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension })\n }, [])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"path": "registry/src/preact/examples/mark-rule/extension.ts",
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
"description": "Placeholder text displayed.",
|
|
6
6
|
"registryDependencies": [],
|
|
7
7
|
"dependencies": [
|
|
8
|
-
"prosekit@^0.20.0
|
|
8
|
+
"prosekit@^0.20.0"
|
|
9
9
|
],
|
|
10
10
|
"files": [
|
|
11
11
|
{
|
|
12
12
|
"path": "registry/src/preact/examples/placeholder/editor.tsx",
|
|
13
13
|
"type": "registry:component",
|
|
14
14
|
"target": "components/editor/examples/placeholder/editor.tsx",
|
|
15
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useCallback, useMemo } from 'preact/hooks'\nimport { createEditor, jsonFromNode, type NodeJSON } from 'prosekit/core'\nimport type { ProseMirrorNode } from 'prosekit/pm/model'\nimport { ProseKit, useDocChange } from 'prosekit/preact'\n\nimport { defineExtension } from './extension'\n\nexport default function Editor(props: {\n initialContent?: NodeJSON\n onDocUpdate?: (doc: NodeJSON) => void\n}) {\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent: props.initialContent })\n }, [props.initialContent])\n\n const { onDocUpdate } = props\n const handleDocChange = useCallback(\n (doc: ProseMirrorNode) => onDocUpdate?.(jsonFromNode(doc)),\n [onDocUpdate],\n )\n useDocChange(handleDocChange, { editor })\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
15
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useCallback, useMemo } from 'preact/hooks'\nimport { createEditor, jsonFromNode, type NodeJSON } from 'prosekit/core'\nimport type { ProseMirrorNode } from 'prosekit/pm/model'\nimport { ProseKit, useDocChange } from 'prosekit/preact'\n\nimport { defineExtension } from './extension'\n\nexport default function Editor(props: {\n initialContent?: NodeJSON\n onDocUpdate?: (doc: NodeJSON) => void\n}) {\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent: props.initialContent })\n }, [props.initialContent])\n\n const { onDocUpdate } = props\n const handleDocChange = useCallback(\n (doc: ProseMirrorNode) => onDocUpdate?.(jsonFromNode(doc)),\n [onDocUpdate],\n )\n useDocChange(handleDocChange, { editor })\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"path": "registry/src/preact/examples/placeholder/extension.ts",
|
|
@@ -8,14 +8,14 @@
|
|
|
8
8
|
"https://unpkg.com/prosekit-registry/dist/r/preact-ui-button.json"
|
|
9
9
|
],
|
|
10
10
|
"dependencies": [
|
|
11
|
-
"prosekit@^0.20.0
|
|
11
|
+
"prosekit@^0.20.0"
|
|
12
12
|
],
|
|
13
13
|
"files": [
|
|
14
14
|
{
|
|
15
15
|
"path": "registry/src/preact/examples/readonly/editor.tsx",
|
|
16
16
|
"type": "registry:component",
|
|
17
17
|
"target": "components/editor/examples/readonly/editor.tsx",
|
|
18
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-readonly'\n\nimport { defineExtension } from './extension'\nimport Toolbar from './toolbar'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
18
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-readonly'\n\nimport { defineExtension } from './extension'\nimport Toolbar from './toolbar'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <Toolbar />\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
19
19
|
},
|
|
20
20
|
{
|
|
21
21
|
"path": "registry/src/preact/examples/readonly/extension.ts",
|
|
@@ -14,14 +14,14 @@
|
|
|
14
14
|
"https://unpkg.com/prosekit-registry/dist/r/preact-ui-toolbar.json"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": [
|
|
17
|
-
"prosekit@^0.20.0
|
|
17
|
+
"prosekit@^0.20.0"
|
|
18
18
|
],
|
|
19
19
|
"files": [
|
|
20
20
|
{
|
|
21
21
|
"path": "registry/src/preact/examples/rtl/editor.tsx",
|
|
22
22
|
"type": "registry:component",
|
|
23
23
|
"target": "components/editor/examples/rtl/editor.tsx",
|
|
24
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { defineBasicExtension } from 'prosekit/basic'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-rtl'\nimport { sampleUploader } from '../../sample/sample-uploader'\nimport { BlockHandle } from '../../ui/block-handle'\nimport { DropIndicator } from '../../ui/drop-indicator'\nimport { InlineMenu } from '../../ui/inline-menu'\nimport { SlashMenu } from '../../ui/slash-menu'\nimport { TableHandle } from '../../ui/table-handle'\nimport { Toolbar } from '../../ui/toolbar'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineBasicExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div dir=\"rtl\" 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-
|
|
24
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useMemo } from 'preact/hooks'\nimport { defineBasicExtension } from 'prosekit/basic'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit } from 'prosekit/preact'\n\nimport { sampleContent } from '../../sample/sample-doc-rtl'\nimport { sampleUploader } from '../../sample/sample-uploader'\nimport { BlockHandle } from '../../ui/block-handle'\nimport { DropIndicator } from '../../ui/drop-indicator'\nimport { InlineMenu } from '../../ui/inline-menu'\nimport { SlashMenu } from '../../ui/slash-menu'\nimport { TableHandle } from '../../ui/table-handle'\nimport { Toolbar } from '../../ui/toolbar'\n\ninterface EditorProps {\n initialContent?: NodeJSON\n}\n\nexport default function Editor(props: EditorProps) {\n const defaultContent = props.initialContent ?? sampleContent\n const editor = useMemo(() => {\n const extension = defineBasicExtension()\n return createEditor({ extension, defaultContent })\n }, [defaultContent])\n\n return (\n <ProseKit editor={editor}>\n <div dir=\"rtl\" 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-[canvas] text-black dark:text-white\">\n <Toolbar uploader={sampleUploader} />\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n <InlineMenu />\n <SlashMenu />\n <BlockHandle dir=\"rtl\" />\n <TableHandle dir=\"rtl\" />\n <DropIndicator />\n </div>\n </div>\n </ProseKit>\n )\n}\n"
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
"path": "registry/src/preact/examples/rtl/index.ts",
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
"description": "Save and load documents as HTML format.",
|
|
6
6
|
"registryDependencies": [],
|
|
7
7
|
"dependencies": [
|
|
8
|
-
"prosekit@^0.20.0
|
|
8
|
+
"prosekit@^0.20.0"
|
|
9
9
|
],
|
|
10
10
|
"files": [
|
|
11
11
|
{
|
|
12
12
|
"path": "registry/src/preact/examples/save-html/editor.tsx",
|
|
13
13
|
"type": "registry:component",
|
|
14
14
|
"target": "components/editor/examples/save-html/editor.tsx",
|
|
15
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useCallback, useMemo, useState } from 'preact/hooks'\nimport { defineBasicExtension } from 'prosekit/basic'\nimport { createEditor, jsonFromHTML } from 'prosekit/core'\nimport { ProseKit, useDocChange } from 'prosekit/preact'\n\nexport default function Editor() {\n // A list of saved documents, stored as HTML strings\n const [records, setRecords] = useState<string[]>([])\n // Whether there are unsaved changes\n const [hasUnsavedChange, setHasUnsavedChange] = useState(false)\n // A key to force a re-render of the editor\n const [key, setKey] = useState(1)\n\n const editor = useMemo(() => {\n const extension = defineBasicExtension()\n return createEditor({ extension })\n }, [])\n\n const handleDocChange = useCallback(() => setHasUnsavedChange(true), [])\n useDocChange(handleDocChange, { editor })\n\n const handleSave = useCallback(() => {\n const record = editor.getDocHTML()\n setRecords((prev) => [...prev, record])\n setHasUnsavedChange(false)\n }, [editor])\n\n const handleLoad = useCallback(\n (record: string) => {\n editor.setContent(jsonFromHTML(record, { schema: editor.schema }))\n setHasUnsavedChange(false)\n setKey((prev) => prev + 1)\n },\n [editor],\n )\n\n return (\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
15
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useCallback, useMemo, useState } from 'preact/hooks'\nimport { defineBasicExtension } from 'prosekit/basic'\nimport { createEditor, jsonFromHTML } from 'prosekit/core'\nimport { ProseKit, useDocChange } from 'prosekit/preact'\n\nexport default function Editor() {\n // A list of saved documents, stored as HTML strings\n const [records, setRecords] = useState<string[]>([])\n // Whether there are unsaved changes\n const [hasUnsavedChange, setHasUnsavedChange] = useState(false)\n // A key to force a re-render of the editor\n const [key, setKey] = useState(1)\n\n const editor = useMemo(() => {\n const extension = defineBasicExtension()\n return createEditor({ extension })\n }, [])\n\n const handleDocChange = useCallback(() => setHasUnsavedChange(true), [])\n useDocChange(handleDocChange, { editor })\n\n const handleSave = useCallback(() => {\n const record = editor.getDocHTML()\n setRecords((prev) => [...prev, record])\n setHasUnsavedChange(false)\n }, [editor])\n\n const handleLoad = useCallback(\n (record: string) => {\n editor.setContent(jsonFromHTML(record, { schema: editor.schema }))\n setHasUnsavedChange(false)\n setKey((prev) => prev + 1)\n },\n [editor],\n )\n\n return (\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <button\n onClick={handleSave}\n disabled={!hasUnsavedChange}\n className=\"m-1 border border-solid bg-white px-2 py-1 text-sm text-black disabled:cursor-not-allowed disabled:text-gray-500\"\n >\n {hasUnsavedChange ? 'Save' : 'No changes to save'}\n </button>\n <ul className=\"border-b border-t border-solid text-sm\">\n {records.map((record, index) => (\n <li key={index} className=\"m-1 flex gap-2\">\n <button\n className=\"border border-solid bg-white px-2 py-1 text-black\"\n onClick={() => handleLoad(record)}\n >\n Load\n </button>\n <span className=\"flex-1 overflow-x-scroll p-2\">\n <pre>{record}</pre>\n </span>\n </li>\n ))}\n </ul>\n <ProseKit editor={editor} key={key}>\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </ProseKit>\n </div>\n )\n}\n"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"path": "registry/src/preact/examples/save-html/index.ts",
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
"description": "Save and load documents as JSON format.",
|
|
6
6
|
"registryDependencies": [],
|
|
7
7
|
"dependencies": [
|
|
8
|
-
"prosekit@^0.20.0
|
|
8
|
+
"prosekit@^0.20.0"
|
|
9
9
|
],
|
|
10
10
|
"files": [
|
|
11
11
|
{
|
|
12
12
|
"path": "registry/src/preact/examples/save-json/editor.tsx",
|
|
13
13
|
"type": "registry:component",
|
|
14
14
|
"target": "components/editor/examples/save-json/editor.tsx",
|
|
15
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useCallback, useMemo, useState } from 'preact/hooks'\nimport { defineBasicExtension } from 'prosekit/basic'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit, useDocChange } from 'prosekit/preact'\n\nexport default function Editor() {\n // A list of saved documents, stored as JSON strings\n const [records, setRecords] = useState<string[]>([])\n // Whether there are unsaved changes\n const [hasUnsavedChange, setHasUnsavedChange] = useState(false)\n // A key to force a re-render of the editor\n const [key, setKey] = useState(1)\n\n const editor = useMemo(() => {\n const extension = defineBasicExtension()\n return createEditor({ extension })\n }, [])\n\n const handleDocChange = useCallback(() => setHasUnsavedChange(true), [])\n useDocChange(handleDocChange, { editor })\n\n const handleSave = useCallback(() => {\n const record = JSON.stringify(editor.getDocJSON())\n setRecords((prev) => [...prev, record])\n setHasUnsavedChange(false)\n }, [editor])\n\n const handleLoad = useCallback((record: string) => {\n editor.setContent(JSON.parse(record) as NodeJSON)\n setHasUnsavedChange(false)\n setKey((prev) => prev + 1)\n }, [editor])\n\n return (\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
15
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useCallback, useMemo, useState } from 'preact/hooks'\nimport { defineBasicExtension } from 'prosekit/basic'\nimport { createEditor, type NodeJSON } from 'prosekit/core'\nimport { ProseKit, useDocChange } from 'prosekit/preact'\n\nexport default function Editor() {\n // A list of saved documents, stored as JSON strings\n const [records, setRecords] = useState<string[]>([])\n // Whether there are unsaved changes\n const [hasUnsavedChange, setHasUnsavedChange] = useState(false)\n // A key to force a re-render of the editor\n const [key, setKey] = useState(1)\n\n const editor = useMemo(() => {\n const extension = defineBasicExtension()\n return createEditor({ extension })\n }, [])\n\n const handleDocChange = useCallback(() => setHasUnsavedChange(true), [])\n useDocChange(handleDocChange, { editor })\n\n const handleSave = useCallback(() => {\n const record = JSON.stringify(editor.getDocJSON())\n setRecords((prev) => [...prev, record])\n setHasUnsavedChange(false)\n }, [editor])\n\n const handleLoad = useCallback((record: string) => {\n editor.setContent(JSON.parse(record) as NodeJSON)\n setHasUnsavedChange(false)\n setKey((prev) => prev + 1)\n }, [editor])\n\n return (\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <button\n onClick={handleSave}\n disabled={!hasUnsavedChange}\n className=\"m-1 border border-solid bg-white px-2 py-1 text-sm text-black disabled:cursor-not-allowed disabled:text-gray-500\"\n >\n {hasUnsavedChange ? 'Save' : 'No changes to save'}\n </button>\n <ul className=\"border-b border-t border-solid text-sm\">\n {records.map((record, index) => (\n <li key={index} className=\"m-1 flex gap-2\">\n <button\n className=\"border border-solid bg-white px-2 py-1 text-black\"\n onClick={() => handleLoad(record)}\n >\n Load\n </button>\n <span className=\"flex-1 overflow-x-scroll p-2\">\n <pre>{record}</pre>\n </span>\n </li>\n ))}\n </ul>\n <ProseKit editor={editor} key={key}>\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </ProseKit>\n </div>\n )\n}\n"
|
|
16
16
|
},
|
|
17
17
|
{
|
|
18
18
|
"path": "registry/src/preact/examples/save-json/index.ts",
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"description": "Save and load documents as Markdown format.",
|
|
6
6
|
"registryDependencies": [],
|
|
7
7
|
"dependencies": [
|
|
8
|
-
"prosekit@^0.20.0
|
|
8
|
+
"prosekit@^0.20.0",
|
|
9
9
|
"rehype-parse",
|
|
10
10
|
"rehype-remark",
|
|
11
11
|
"remark-gfm",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"path": "registry/src/preact/examples/save-markdown/editor.tsx",
|
|
20
20
|
"type": "registry:component",
|
|
21
21
|
"target": "components/editor/examples/save-markdown/editor.tsx",
|
|
22
|
-
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useCallback, useMemo, useState } from 'preact/hooks'\nimport { defineBasicExtension } from 'prosekit/basic'\nimport { createEditor, jsonFromHTML } from 'prosekit/core'\nimport { ProseKit, useDocChange } from 'prosekit/preact'\n\nimport { htmlFromMarkdown, markdownFromHTML } from './markdown'\n\nexport default function Editor() {\n // A list of saved documents, stored as Markdown strings\n const [records, setRecords] = useState<string[]>([])\n // Whether there are unsaved changes\n const [hasUnsavedChange, setHasUnsavedChange] = useState(false)\n // A key to force a re-render of the editor\n const [key, setKey] = useState(1)\n\n const editor = useMemo(() => {\n const extension = defineBasicExtension()\n return createEditor({ extension })\n }, [])\n\n const handleDocChange = useCallback(() => setHasUnsavedChange(true), [])\n useDocChange(handleDocChange, { editor })\n\n const handleSave = useCallback(() => {\n const html = editor.getDocHTML()\n const record = markdownFromHTML(html)\n setRecords((prev) => [...prev, record])\n setHasUnsavedChange(false)\n }, [editor])\n\n const handleLoad = useCallback(\n (record: string) => {\n const html = htmlFromMarkdown(record)\n editor.setContent(jsonFromHTML(html, { schema: editor.schema }))\n setHasUnsavedChange(false)\n setKey((prev) => prev + 1)\n },\n [editor],\n )\n\n return (\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-
|
|
22
|
+
"content": "import 'prosekit/basic/style.css'\nimport 'prosekit/basic/typography.css'\n\nimport { useCallback, useMemo, useState } from 'preact/hooks'\nimport { defineBasicExtension } from 'prosekit/basic'\nimport { createEditor, jsonFromHTML } from 'prosekit/core'\nimport { ProseKit, useDocChange } from 'prosekit/preact'\n\nimport { htmlFromMarkdown, markdownFromHTML } from './markdown'\n\nexport default function Editor() {\n // A list of saved documents, stored as Markdown strings\n const [records, setRecords] = useState<string[]>([])\n // Whether there are unsaved changes\n const [hasUnsavedChange, setHasUnsavedChange] = useState(false)\n // A key to force a re-render of the editor\n const [key, setKey] = useState(1)\n\n const editor = useMemo(() => {\n const extension = defineBasicExtension()\n return createEditor({ extension })\n }, [])\n\n const handleDocChange = useCallback(() => setHasUnsavedChange(true), [])\n useDocChange(handleDocChange, { editor })\n\n const handleSave = useCallback(() => {\n const html = editor.getDocHTML()\n const record = markdownFromHTML(html)\n setRecords((prev) => [...prev, record])\n setHasUnsavedChange(false)\n }, [editor])\n\n const handleLoad = useCallback(\n (record: string) => {\n const html = htmlFromMarkdown(record)\n editor.setContent(jsonFromHTML(html, { schema: editor.schema }))\n setHasUnsavedChange(false)\n setKey((prev) => prev + 1)\n },\n [editor],\n )\n\n return (\n <div className=\"box-border h-full w-full min-h-36 overflow-y-hidden overflow-x-hidden rounded-md border border-solid border-gray-200 dark:border-gray-700 shadow-sm flex flex-col bg-[canvas] text-black dark:text-white\">\n <button\n onClick={handleSave}\n disabled={!hasUnsavedChange}\n className=\"m-1 border border-solid bg-white px-2 py-1 text-sm text-black disabled:cursor-not-allowed disabled:text-gray-500\"\n >\n {hasUnsavedChange ? 'Save' : 'No changes to save'}\n </button>\n <ul className=\"border-b border-t border-solid text-sm\">\n {records.map((record, index) => (\n <li key={index} className=\"m-1 flex gap-2\">\n <button\n className=\"border border-solid bg-white px-2 py-1 text-black\"\n onClick={() => handleLoad(record)}\n >\n Load\n </button>\n <span className=\"flex-1 overflow-x-scroll p-2\">\n <pre>{record}</pre>\n </span>\n </li>\n ))}\n </ul>\n <ProseKit editor={editor} key={key}>\n <div className=\"relative w-full flex-1 box-border overflow-y-auto\">\n <div ref={editor.mount} className=\"ProseMirror box-border min-h-full px-[max(4rem,calc(50%-20rem))] py-8 outline-hidden outline-0 [&_span[data-mention=user]]:text-blue-500 [&_span[data-mention=tag]]:text-violet-500\"></div>\n </div>\n </ProseKit>\n </div>\n )\n}\n"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"path": "registry/src/preact/examples/save-markdown/index.ts",
|