@shadospace/editor 1.0.1 → 1.0.3

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.
Files changed (2) hide show
  1. package/README.md +53 -21
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -1,21 +1,53 @@
1
- # Next.js template
2
-
3
- This is a Next.js template with shadcn/ui.
4
-
5
- ## Adding components
6
-
7
- To add components to your app, run the following command:
8
-
9
- ```bash
10
- npx shadcn@latest add button
11
- ```
12
-
13
- This will place the ui components in the `components` directory.
14
-
15
- ## Using components
16
-
17
- To use the components in your app, import them as follows:
18
-
19
- ```tsx
20
- import { Button } from "@/components/ui/button";
21
- ```
1
+ # @shadospace/editor
2
+
3
+ A beautiful, feature-rich Tiptap editor scaffolding for Next.js projects using shadcn/ui.
4
+
5
+ This is not just a component library; it's a CLI scaffolding tool that places the editor source files directly into your project so you can customize them fully.
6
+
7
+ ## Features
8
+
9
+ - **Tiptap Starter Kit** fully integrated.
10
+ - **Dynamic Menu Bar** with essential formatting tools.
11
+ - **Tailwind CSS** styling pre-configured.
12
+ - **Interactive States** and clean UI.
13
+
14
+ ## Prerequisites
15
+
16
+ Before installing, ensure your project meets the following requirements:
17
+
18
+ 1. **Next.js** project.
19
+ 2. **shadcn/ui** initialized (requires a `components.json` file in the root).
20
+
21
+ ## Installation
22
+
23
+ Install the package as a dependency. The installation will automatically trigger the setup script.
24
+
25
+ ```bash
26
+ bun add @shadospace/editor
27
+ # or
28
+ npm install @shadospace/editor
29
+ ```
30
+
31
+ ## Configuration
32
+
33
+ The package automatically detects your project structure (with or without a `src` folder) and places files in `components/editor/`. It also references the stylesheet in your global CSS file.
34
+
35
+ ## Usage
36
+
37
+ After installation, the component files will be copied into your project. You can import and use the editor like this (adjust the path if you use a different alias):
38
+
39
+ ```tsx
40
+ import Editor from "@/components/editor";
41
+
42
+ export default function Page() {
43
+ return (
44
+ <div className="container mx-auto p-6">
45
+ <Editor />
46
+ </div>
47
+ );
48
+ }
49
+ ```
50
+
51
+ ## Customization
52
+
53
+ Since the editor files are copied directly into your project, you can edit them anytime to add new features or change the styling.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shadospace/editor",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "files": [
@@ -17,7 +17,7 @@
17
17
  "lint": "eslint",
18
18
  "format": "prettier --write \"**/*.{ts,tsx}\"",
19
19
  "typecheck": "tsc --noEmit",
20
- "postinstall": "bun scripts/init.js"
20
+ "postinstall": "node scripts/init.js"
21
21
  },
22
22
  "dependencies": {
23
23
  "@hookform/resolvers": "^5.2.2",