{"_id":"@domos-technologies/novel","_rev":"1-be91c25016b5d8e27a43d10f8d58d641","name":"@domos-technologies/novel","dist-tags":{"latest":"0.2.0"},"versions":{"0.1.0":{"name":"@domos-technologies/novel","version":"0.1.0","description":"Notion-style WYSIWYG editor with AI-powered autocompletions","license":"Apache-2.0","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","module":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"build":"tsup","dev":"tsup --watch","check-types":"tsc --noEmit"},"peerDependencies":{"react":"^18.2.0"},"dependencies":{"@radix-ui/react-popover":"^1.0.6","@tiptap/core":"^2.1.7","@tiptap/extension-color":"^2.1.7","@tiptap/extension-highlight":"^2.1.7","@tiptap/extension-horizontal-rule":"^2.1.7","@tiptap/extension-image":"^2.1.7","@tiptap/extension-link":"^2.1.7","@tiptap/extension-placeholder":"2.0.3","@tiptap/extension-task-item":"^2.1.7","@tiptap/extension-task-list":"^2.1.7","@tiptap/extension-text-style":"^2.1.7","@tiptap/extension-underline":"^2.1.7","@tiptap/pm":"^2.1.7","@tiptap/react":"^2.1.7","@tiptap/starter-kit":"^2.1.7","@tiptap/suggestion":"^2.1.7","@types/node":"18.15.3","@types/react":"18.0.28","@types/react-dom":"18.0.11","@upstash/ratelimit":"^0.4.4","@vercel/analytics":"^1.0.2","@vercel/blob":"^0.9.3","@vercel/kv":"^0.2.2","ai":"^2.2.11","clsx":"^1.2.1","eslint":"8.36.0","eslint-config-next":"13.2.4","eventsource-parser":"^0.1.0","lucide-react":"^0.244.0","next":"13.4.20-canary.15","react":"18.2.0","react-dom":"18.2.0","react-markdown":"^8.0.7","sonner":"^0.7.0","tailwind-merge":"^1.14.0","tippy.js":"^6.3.7","tiptap-markdown":"^0.8.2","typescript":"4.9.5","use-debounce":"^9.0.4"},"devDependencies":{"postcss":"^8.4.29","tsup":"^7.2.0"},"author":{"name":"Steven Tey","email":"stevensteel97@gmail.com"},"homepage":"https://novel.sh","repository":{"type":"git","url":"git+https://github.com/steven-tey/novel.git"},"bugs":{"url":"https://github.com/steven-tey/novel/issues"},"keywords":["ai","novel","editor","markdown","nextjs","react"],"_id":"@domos-technologies/novel@0.1.0","gitHead":"44591f8512f924e9acb523a1788f12f589566fee","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-2cbh17L3XwJSsItk2PvS8RzEQ4Br4dayDc4SqL4AvX6hmjXWwVoGqe0S/GmvcCq6jDbP+aidWyC0isK8av7muQ==","shasum":"e157aac92382fa64c1159382ba7bc60d24b23b8f","tarball":"https://registry.npmjs.org/@domos-technologies/novel/-/novel-0.1.0.tgz","fileCount":6,"unpackedSize":1298698,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQC4faKnU5YF6AKcHhOUqrVgqp8zcsTFDL143lVGZ8L5NgIgDZ1oCZHIb3QhZImO0Pdq0Ww8b/UkMnh9ACYy80giOFQ="}]},"_npmUser":{"name":"capevace","email":"luke@mateffy.me"},"directories":{},"maintainers":[{"name":"capevace","email":"luke@mateffy.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/novel_0.1.0_1698943204174_0.5688263491449899"},"_hasShrinkwrap":false},"0.2.0":{"name":"@domos-technologies/novel","version":"0.2.0","description":"Notion-style WYSIWYG editor with AI-powered autocompletions","license":"Apache-2.0","main":"./dist/index.js","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs","module":"./dist/index.mjs","require":"./dist/index.js"}},"scripts":{"build":"tsup","dev":"tsup --watch","check-types":"tsc --noEmit"},"peerDependencies":{"react":"^18.2.0"},"dependencies":{"@radix-ui/react-popover":"^1.0.6","@tiptap/core":"^2.1.7","@tiptap/extension-color":"^2.1.7","@tiptap/extension-highlight":"^2.1.7","@tiptap/extension-horizontal-rule":"^2.1.7","@tiptap/extension-image":"^2.1.7","@tiptap/extension-link":"^2.1.7","@tiptap/extension-placeholder":"2.0.3","@tiptap/extension-task-item":"^2.1.7","@tiptap/extension-task-list":"^2.1.7","@tiptap/extension-text-style":"^2.1.7","@tiptap/extension-underline":"^2.1.7","@tiptap/pm":"^2.1.7","@tiptap/react":"^2.1.7","@tiptap/starter-kit":"^2.1.7","@tiptap/suggestion":"^2.1.7","@types/node":"18.15.3","@types/react":"18.0.28","@types/react-dom":"18.0.11","@upstash/ratelimit":"^0.4.4","@vercel/analytics":"^1.0.2","@vercel/blob":"^0.9.3","@vercel/kv":"^0.2.2","ai":"^2.2.11","clsx":"^1.2.1","eslint":"8.36.0","eslint-config-next":"13.2.4","eventsource-parser":"^0.1.0","lucide-react":"^0.244.0","next":"13.4.20-canary.15","react":"18.2.0","react-dom":"18.2.0","react-markdown":"^8.0.7","sonner":"^0.7.0","tailwind-merge":"^1.14.0","tippy.js":"^6.3.7","tiptap-markdown":"^0.8.2","typescript":"4.9.5","use-debounce":"^9.0.4"},"devDependencies":{"postcss":"^8.4.29","tsup":"^7.2.0"},"author":{"name":"Steven Tey","email":"stevensteel97@gmail.com"},"homepage":"https://novel.sh","repository":{"type":"git","url":"git+https://github.com/steven-tey/novel.git"},"bugs":{"url":"https://github.com/steven-tey/novel/issues"},"keywords":["ai","novel","editor","markdown","nextjs","react"],"_id":"@domos-technologies/novel@0.2.0","gitHead":"44591f8512f924e9acb523a1788f12f589566fee","_nodeVersion":"20.5.1","_npmVersion":"9.8.0","dist":{"integrity":"sha512-CRS6zBAQ9nUdFZDYIRmrrdjoHwp2DBLn+JIUR8A0UfEwiUn0Np54s92w0VPw045Bi//4Zu9YRZq5rlE7gwOMBA==","shasum":"1a711bb3d730852ebe6fd7024ae728cdfccf0db4","tarball":"https://registry.npmjs.org/@domos-technologies/novel/-/novel-0.2.0.tgz","fileCount":6,"unpackedSize":1292190,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDTCofeVqrf8kw8kZ/gHI/sThzORbgRikC3ATd/51rhFgIhAMhRwtZljfRQWrQDbbgIR5sWZZLJ5DHImqiCf9RU3SQz"}]},"_npmUser":{"name":"capevace","email":"luke@mateffy.me"},"directories":{},"maintainers":[{"name":"capevace","email":"luke@mateffy.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/novel_0.2.0_1698943364610_0.6750002363361971"},"_hasShrinkwrap":false}},"time":{"created":"2023-11-02T16:40:04.023Z","0.1.0":"2023-11-02T16:40:04.509Z","modified":"2023-11-02T16:42:45.119Z","0.2.0":"2023-11-02T16:42:44.923Z"},"maintainers":[{"name":"capevace","email":"luke@mateffy.me"}],"description":"Notion-style WYSIWYG editor with AI-powered autocompletions","homepage":"https://novel.sh","keywords":["ai","novel","editor","markdown","nextjs","react"],"repository":{"type":"git","url":"git+https://github.com/steven-tey/novel.git"},"author":{"name":"Steven Tey","email":"stevensteel97@gmail.com"},"bugs":{"url":"https://github.com/steven-tey/novel/issues"},"license":"Apache-2.0","readme":"<a href=\"https://novel.sh\">\n  <img alt=\"Novel is a Notion-style WYSIWYG editor with AI-powered autocompletions.\" src=\"https://novel.sh/opengraph-image.png\">\n  <h1 align=\"center\">Novel</h1>\n</a>\n\n<p align=\"center\">\n  An open-source Notion-style WYSIWYG editor with AI-powered autocompletions. \n</p>\n\n<p align=\"center\">\n  <a href=\"https://news.ycombinator.com/item?id=36360789\"><img src=\"https://img.shields.io/badge/Hacker%20News-369-%23FF6600\" alt=\"Hacker News\"></a>\n  <a href=\"https://github.com/steven-tey/novel/blob/main/LICENSE\">\n    <img src=\"https://img.shields.io/github/license/steven-tey/novel?label=license&logo=github&color=f80&logoColor=fff\" alt=\"License\" />\n  </a>\n  <a href=\"https://github.com/steven-tey/novel\"><img src=\"https://img.shields.io/github/stars/steven-tey/novel?style=social\" alt=\"Novel.sh's GitHub repo\"></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"#introduction\"><strong>Introduction</strong></a> ·\n  <a href=\"#installation\"><strong>Installation</strong></a> ·\n  <a href=\"#deploy-your-own\"><strong>Deploy Your Own</strong></a> ·\n  <a href=\"#setting-up-locally\"><strong>Setting Up Locally</strong></a> ·\n  <a href=\"#tech-stack\"><strong>Tech Stack</strong></a> ·\n  <a href=\"#contributing\"><strong>Contributing</strong></a> ·\n  <a href=\"#license\"><strong>License</strong></a>\n</p>\n<br/>\n\n## Introduction\n\n[Novel](https://novel.sh/) is a Notion-style WYSIWYG editor with AI-powered autocompletions.\n\nhttps://github.com/steven-tey/novel/assets/28986134/2099877f-4f2b-4b1c-8782-5d803d63be5c\n\n<br />\n\n## Installation\n\nTo use Novel in a project, you can run the following command to install the `novel` [NPM package](https://www.npmjs.com/package/novel):\n\n```\nnpm i novel\n```\n\nThen, you can use it in your code like this:\n\n```jsx\nimport { Editor } from \"novel\";\n\nexport default function App() {\n  return <Editor />;\n}\n```\n\nThe `Editor` is a React component that takes in the following props:\n\n| Prop                  | Type                        | Description                                                                                                                                                                                | Default                                                                                                                             |\n| --------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------- |\n| `completionApi`       | `string`                    | The API route to use for the OpenAI completion API.                                                                                                                                        | `/api/generate`                                                                                                                     |\n| `className`           | `string`                    | Editor container classname.                                                                                                                                                                | `\"relative min-h-[500px] w-full max-w-screen-lg border-stone-200 bg-white sm:mb-[calc(20vh)] sm:rounded-lg sm:border sm:shadow-lg\"` |\n| `defaultValue`        | `JSONContent` or `string`   | The default value to use for the editor.                                                                                                                                                   | [`defaultEditorContent`](https://github.com/steven-tey/novel/blob/main/packages/core/src/ui/editor/default-content.tsx)             |\n| `extensions`          | `Extension[]`               | A list of extensions to use for the editor, in addition to the [default Novel extensions](https://github.com/steven-tey/novel/blob/main/packages/core/src/ui/editor/extensions/index.tsx). | `[]`                                                                                                                                |\n| `editorProps`         | `EditorProps`               | Props to pass to the underlying Tiptap editor, in addition to the [default Novel editor props](https://github.com/steven-tey/novel/blob/main/packages/core/src/ui/editor/props.ts).        | `{}`                                                                                                                                |\n| `onUpdate`            | `(editor?: Editor) => void` | A callback function that is called whenever the editor is updated.                                                                                                                         | `() => {}`                                                                                                                          |\n| `onDebouncedUpdate`   | `(editor?: Editor) => void` | A callback function that is called whenever the editor is updated, but only after the defined debounce duration.                                                                           | `() => {}`                                                                                                                          |\n| `debounceDuration`    | `number`                    | The duration (in milliseconds) to debounce the `onDebouncedUpdate` callback.                                                                                                               | `750`                                                                                                                               |\n| `storageKey`          | `string`                    | The key to use for storing the editor's value in local storage.                                                                                                                            | `novel__content`                                                                                                                    |\n| `disableLocalStorage` | `boolean`                   | Enabling this option will prevent read/write content from/to local storage.                                                                                                                | `false`                                                                                                                             |\n\n> **Note**: Make sure to define an API endpoint that matches the `completionApi` prop (default is `/api/generate`). This is needed for the AI autocompletions to work. Here's an example: https://github.com/steven-tey/novel/blob/main/apps/web/app/api/generate/route.ts\n\nHere's an example application: https://github.com/steven-tey/novella\n\n## Deploy Your Own\n\nYou can deploy your own version of Novel to Vercel with one click:\n\n[![Deploy with Vercel](https://vercel.com/button)](https://stey.me/novel-deploy)\n\n## Setting Up Locally\n\nTo set up Novel locally, you'll need to clone the repository and set up the following environment variables:\n\n- `OPENAI_API_KEY` – your OpenAI API key (you can get one [here](https://platform.openai.com/account/api-keys))\n- `BLOB_READ_WRITE_TOKEN` – your Vercel Blob read/write token (currently [still in beta](https://vercel.com/docs/storage/vercel-blob/quickstart#quickstart), but feel free to [sign up on this form](https://vercel.fyi/blob-beta) for access)\n\nIf you've deployed this to Vercel, you can also use [`vc env pull`](https://vercel.com/docs/cli/env#exporting-development-environment-variables) to pull the environment variables from your Vercel project.\n\nTo run the app locally, you can run the following commands:\n\n```\npnpm i\npnpm build\npnpm dev\n```\n\n## Cross-framework support\n\nWhile Novel is built for React, we also have a few community-maintained packages for non-React frameworks:\n\n- Svelte: https://novel.sh/svelte\n- Vue: https://novel.sh/vue\n\n## VSCode Extension\n\nThanks to @bennykok, Novel also has a VSCode Extension: https://novel.sh/vscode\n\nhttps://github.com/steven-tey/novel/assets/28986134/58ebf7e3-cdb3-43df-878b-119e304f7373\n\n## Tech Stack\n\nNovel is built on the following stack:\n\n- [Next.js](https://nextjs.org/) – framework\n- [Tiptap](https://tiptap.dev/) – text editor\n- [OpenAI](https://openai.com/) - AI completions\n- [Vercel AI SDK](https://sdk.vercel.ai/docs) – AI library\n- [Vercel](https://vercel.com) – deployments\n- [TailwindCSS](https://tailwindcss.com/) – styles\n- [Cal Sans](https://github.com/calcom/font) – font\n\n## Contributing\n\nHere's how you can contribute:\n\n- [Open an issue](https://github.com/steven-tey/novel/issues) if you believe you've encountered a bug.\n- Make a [pull request](https://github.com/steven-tey/novel/pull) to add new features/make quality-of-life improvements/fix bugs.\n\n<a href=\"https://github.com/steven-tey/novel/graphs/contributors\">\n  <img src=\"https://contrib.rocks/image?repo=steven-tey/novel\" />\n</a>\n\n## Repo Activity\n\n![Novel.sh repo activity – generated by Axiom](https://repobeats.axiom.co/api/embed/2ebdaa143b0ad6e7c2ee23151da7b37f67da0b36.svg)\n\n## License\n\nLicensed under the [Apache-2.0 license](https://github.com/steven-tey/novel/blob/main/LICENSE.md).\n","readmeFilename":"README.md"}