@sanmokeji/smo-editor 0.0.2 → 0.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.
package/README.md CHANGED
@@ -1,48 +1,37 @@
1
- # smo-editor
1
+ # @sanmokeji/smo-editor
2
2
 
3
- This template should help get you started developing with Vue 3 in Vite.
3
+ 🚀 **SmoEditor** 是一款基于 Vue 3 Tiptap 打造的轻量、高效、开箱即用的富文本编辑器组件。具备完美的 TypeScript 类型支持。
4
4
 
5
- ## Recommended IDE Setup
5
+ ---
6
6
 
7
- [VS Code](https://code.visualstudio.com/) + [Vue (Official)](https://marketplace.visualstudio.com/items?itemName=Vue.volar) (and disable Vetur).
7
+ ## 特性
8
8
 
9
- ## Recommended Browser Setup
9
+ - **轻量高效**:基于 Tiptap 核心精心封装,无冗余依赖。
10
+ - 📦 **开箱即用**:内置常用富文本工具栏,集成图片上传、气泡菜单等高级功能。
11
+ - 💙 **TypeScript 强类型**:提供完整的、模块化的类型定义,享受完美的 IDE 提示。
12
+ - 🎨 **样式优雅**:原生支持现代样式体系,适配极佳。
10
13
 
11
- - Chromium-based browsers (Chrome, Edge, Brave, etc.):
12
- - [Vue.js devtools](https://chromewebstore.google.com/detail/vuejs-devtools/nhdogjmejiglipccpnnnanhbledajbpd)
13
- - [Turn on Custom Object Formatter in Chrome DevTools](http://bit.ly/object-formatters)
14
- - Firefox:
15
- - [Vue.js devtools](https://addons.mozilla.org/en-US/firefox/addon/vue-js-devtools/)
16
- - [Turn on Custom Object Formatter in Firefox DevTools](https://fxdx.dev/firefox-devtools-custom-object-formatters/)
14
+ ---
17
15
 
18
- ## Type Support for `.vue` Imports in TS
16
+ ## 📦 安装
19
17
 
20
- TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [Volar](https://marketplace.visualstudio.com/items?itemName=Vue.volar) to make the TypeScript language service aware of `.vue` types.
18
+ 使用你喜欢的包管理器进行安装:
21
19
 
22
- ## Customize configuration
20
+ ```bash
21
+ # 使用 pnpm (推荐)
22
+ pnpm add @sanmokeji/smo-editor
23
23
 
24
- See [Vite Configuration Reference](https://vite.dev/config/).
24
+ # 使用 npm
25
+ npm i @sanmokeji/smo-editor
25
26
 
26
- ## Project Setup
27
-
28
- ```sh
29
- pnpm install
30
- ```
31
-
32
- ### Compile and Hot-Reload for Development
33
-
34
- ```sh
35
- pnpm dev
36
- ```
37
-
38
- ### Type-Check, Compile and Minify for Production
39
-
40
- ```sh
41
- pnpm build
27
+ # 使用 yarn
28
+ yarn add @sanmokeji/smo-editor
42
29
  ```
43
30
 
44
- ### Lint with [ESLint](https://eslint.org/)
31
+ ## 开始使用
45
32
 
46
- ```sh
47
- pnpm lint
33
+ ```ts
34
+ import { SmoEditor, type SmoEditorOptions } from '@sanmokeji/smo-editor'
35
+ // 2. 引入组件配套样式
36
+ import '@sanmokeji/smo-editor/dist/index.css'
48
37
  ```
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@sanmokeji/smo-editor",
3
- "version": "0.0.2",
4
- "main": "./dist/smo-editor.js",
5
- "module": "./dist/smo-editor.js",
3
+ "version": "0.0.3",
4
+ "main": "./dist/index.js",
5
+ "module": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
7
7
  "type": "module",
8
8
  "exports": {
@@ -11,7 +11,7 @@
11
11
  "import": "./dist/smo-editor.js",
12
12
  "default": "./dist/smo-editor.js"
13
13
  },
14
- "./dist/smo-editor.css": "./dist/smo-editor.css"
14
+ "./dist/index.css": "./dist/index.css"
15
15
  },
16
16
  "description": "基于 Tiptap + Vue 3 的富文本编辑器组件。",
17
17
  "keywords": [
File without changes
File without changes