@openim/im-composer 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,84 +1,138 @@
1
1
  {
2
- "name": "@openim/im-composer",
3
- "version": "1.0.0",
4
- "description": "A React IM composer component with dual mode (plain/rich) supporting @mentions, emoji, attachments, and markdown",
5
- "author": "blooming",
6
- "license": "MIT",
7
- "type": "module",
8
- "main": "./dist/index.cjs",
9
- "module": "./dist/index.js",
10
- "types": "./dist/index.d.ts",
11
- "exports": {
12
- ".": {
13
- "types": "./dist/index.d.ts",
14
- "import": "./dist/index.js",
15
- "require": "./dist/index.cjs"
16
- },
17
- "./styles.css": "./dist/index.css"
2
+ "name": "@openim/im-composer",
3
+ "version": "1.0.1",
4
+ "description": "IM dual-mode input editor based on Tiptap - supports plain text with @mentions and rich text with Markdown",
5
+ "author": "blooming",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/openimsdk"
10
+ },
11
+ "homepage": "https://github.com/openimsdk",
12
+ "bugs": {
13
+ "url": "https://github.com/openimsdk"
14
+ },
15
+ "main": "./dist/index.js",
16
+ "module": "./dist/index.mjs",
17
+ "types": "./dist/index.d.ts",
18
+ "sideEffects": [
19
+ "**/*.css",
20
+ "**/*.scss"
21
+ ],
22
+ "exports": {
23
+ ".": {
24
+ "types": "./dist/index.d.ts",
25
+ "import": "./dist/index.mjs",
26
+ "require": "./dist/index.js"
18
27
  },
19
- "files": [
20
- "dist",
21
- "LICENSE",
22
- "README.md",
23
- "CHANGELOG.md"
24
- ],
25
- "scripts": {
26
- "build": "tsup",
27
- "dev": "tsup --watch",
28
- "test": "vitest run",
29
- "test:watch": "vitest",
30
- "prepublishOnly": "pnpm run build && pnpm run test"
31
- },
32
- "repository": {
33
- "type": "git",
34
- "url": "https://github.com/openimsdk/im-composer.git"
35
- },
36
- "homepage": "https://github.com/openimsdk/im-composer",
37
- "bugs": {
38
- "url": "https://github.com/openimsdk/im-composer/issues"
39
- },
40
- "keywords": [
41
- "react",
42
- "im",
43
- "composer",
44
- "editor",
45
- "lexical",
46
- "mention",
47
- "emoji",
48
- "markdown",
49
- "rich-text",
50
- "openim",
51
- "chat",
52
- "input"
53
- ],
54
- "dependencies": {
55
- "lexical": "^0.39.0",
56
- "@lexical/react": "^0.39.0",
57
- "@lexical/markdown": "^0.39.0",
58
- "@lexical/rich-text": "^0.39.0",
59
- "@lexical/list": "^0.39.0",
60
- "@lexical/code": "^0.39.0",
61
- "@lexical/link": "^0.39.0",
62
- "@lexical/selection": "^0.39.0",
63
- "@lexical/utils": "^0.39.0"
64
- },
65
- "peerDependencies": {
66
- "react": "^18.0.0 || ^19.0.0",
67
- "react-dom": "^18.0.0 || ^19.0.0"
68
- },
69
- "devDependencies": {
70
- "react": "^18.3.1",
71
- "react-dom": "^18.3.1",
72
- "@testing-library/react": "^16.1.0",
73
- "@testing-library/dom": "^10.4.0",
74
- "@types/react": "^18.3.17",
75
- "@types/react-dom": "^18.3.5",
76
- "jsdom": "^25.0.1",
77
- "tsup": "^8.3.5",
78
- "typescript": "^5.7.2",
79
- "vitest": "^2.1.8"
80
- },
81
- "engines": {
82
- "node": ">=18.0.0"
83
- }
84
- }
28
+ "./styles.css": "./dist/index.css"
29
+ },
30
+ "files": [
31
+ "dist",
32
+ "LICENSE",
33
+ "README.md"
34
+ ],
35
+ "scripts": {
36
+ "build": "tsup",
37
+ "dev": "tsup --watch",
38
+ "test": "vitest run",
39
+ "test:watch": "vitest",
40
+ "prepublishOnly": "pnpm run build && pnpm run test"
41
+ },
42
+ "keywords": [
43
+ "tiptap",
44
+ "editor",
45
+ "im",
46
+ "instant-messaging",
47
+ "composer",
48
+ "mention",
49
+ "markdown",
50
+ "react",
51
+ "rich-text",
52
+ "chat",
53
+ "input"
54
+ ],
55
+ "peerDependencies": {
56
+ "react": "^18.0.0",
57
+ "react-dom": "^18.0.0",
58
+ "@tiptap/core": "^3.0.0",
59
+ "@tiptap/pm": "^3.0.0",
60
+ "@tiptap/react": "^3.0.0",
61
+ "@tiptap/starter-kit": "^3.0.0",
62
+ "@tiptap/extension-highlight": "^3.0.0",
63
+ "@tiptap/extension-image": "^3.0.0",
64
+ "@tiptap/extension-link": "^3.0.0",
65
+ "@tiptap/extension-list": "^3.0.0",
66
+ "@tiptap/extension-mention": "^3.0.0",
67
+ "@tiptap/extension-placeholder": "^3.0.0",
68
+ "@tiptap/extension-subscript": "^3.0.0",
69
+ "@tiptap/extension-superscript": "^3.0.0",
70
+ "@tiptap/extension-text-align": "^3.0.0",
71
+ "@tiptap/extension-typography": "^3.0.0",
72
+ "@tiptap/extension-underline": "^3.0.0",
73
+ "@tiptap/extensions": "^3.0.0",
74
+ "@tiptap/suggestion": "^3.0.0",
75
+ "@floating-ui/react": "^0.27.0",
76
+ "@radix-ui/react-dropdown-menu": "^2.0.0",
77
+ "@radix-ui/react-popover": "^1.0.0"
78
+ },
79
+ "peerDependenciesMeta": {
80
+ "@tiptap/extension-highlight": { "optional": true },
81
+ "@tiptap/extension-image": { "optional": true },
82
+ "@tiptap/extension-list": { "optional": true },
83
+ "@tiptap/extension-subscript": { "optional": true },
84
+ "@tiptap/extension-superscript": { "optional": true },
85
+ "@tiptap/extension-text-align": { "optional": true },
86
+ "@tiptap/extension-typography": { "optional": true },
87
+ "@tiptap/extension-underline": { "optional": true },
88
+ "@floating-ui/react": { "optional": true },
89
+ "@radix-ui/react-dropdown-menu": { "optional": true },
90
+ "@radix-ui/react-popover": { "optional": true }
91
+ },
92
+ "dependencies": {
93
+ "lodash.throttle": "^4.1.1",
94
+ "react-hotkeys-hook": "^5.2.1"
95
+ },
96
+ "devDependencies": {
97
+ "@floating-ui/react": "^0.27.16",
98
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
99
+ "@radix-ui/react-popover": "^1.1.15",
100
+ "@testing-library/jest-dom": "^6.9.1",
101
+ "@testing-library/react": "^14.1.0",
102
+ "@tiptap/core": "^3.14.0",
103
+ "@tiptap/extension-document": "^3.14.0",
104
+ "@tiptap/extension-hard-break": "^3.14.0",
105
+ "@tiptap/extension-highlight": "^3.14.0",
106
+ "@tiptap/extension-history": "^3.14.0",
107
+ "@tiptap/extension-horizontal-rule": "^3.14.0",
108
+ "@tiptap/extension-image": "^3.14.0",
109
+ "@tiptap/extension-link": "^3.14.0",
110
+ "@tiptap/extension-list": "^3.14.0",
111
+ "@tiptap/extension-mention": "^3.14.0",
112
+ "@tiptap/extension-paragraph": "^3.14.0",
113
+ "@tiptap/extension-placeholder": "^3.14.0",
114
+ "@tiptap/extension-subscript": "^3.14.0",
115
+ "@tiptap/extension-superscript": "^3.14.0",
116
+ "@tiptap/extension-text": "^3.14.0",
117
+ "@tiptap/extension-text-align": "^3.14.0",
118
+ "@tiptap/extension-typography": "^3.14.0",
119
+ "@tiptap/extension-underline": "^3.14.0",
120
+ "@tiptap/extensions": "^3.14.0",
121
+ "@tiptap/pm": "^3.14.0",
122
+ "@tiptap/react": "^3.14.0",
123
+ "@tiptap/starter-kit": "^3.14.0",
124
+ "@tiptap/suggestion": "^3.14.0",
125
+ "@types/lodash.throttle": "^4.1.9",
126
+ "@types/react": "^18.2.0",
127
+ "@types/react-dom": "^18.2.0",
128
+ "esbuild-sass-plugin": "^3.3.1",
129
+ "jsdom": "^24.0.0",
130
+ "react": "^18.2.0",
131
+ "react-dom": "^18.2.0",
132
+ "sass": "^1.97.1",
133
+ "sass-embedded": "^1.97.1",
134
+ "tsup": "^8.0.1",
135
+ "typescript": "^5.3.0",
136
+ "vitest": "^2.0.0"
137
+ }
138
+ }
package/CHANGELOG.md DELETED
@@ -1,37 +0,0 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
- and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
-
8
- ## [1.0.0] - 2024-12-29
9
-
10
- ### Added
11
-
12
- - **Dual Mode Support**: Plain text and Rich text (Markdown) modes
13
- - **@Mentions**: Type `@` to search and mention users with customizable provider
14
- - **Attachments**: Paste or drag files with image preview (plain mode)
15
- - **Quote Messages**: Reply to messages with quote blocks (plain mode)
16
- - **Emoji Support**: Full Unicode emoji with optional Twemoji integration
17
- - **Draft Support**: Save and restore editor state with `getDraft()`/`setDraft()`
18
- - **Rich Text Features**:
19
- - Formatting toolbar (bold, italic, strikethrough, code)
20
- - Headings (H1, H2, H3)
21
- - Lists (bullet and ordered)
22
- - Code blocks
23
- - Block quotes
24
- - Links with click-to-edit popup
25
- - Image upload and embedding
26
- - **i18n Support**: Customizable locale for all text labels
27
- - **Keyboard Shortcuts**:
28
- - Configurable send key (Enter / Ctrl+Enter / Cmd+Enter)
29
- - Markdown shortcuts (e.g., `**bold**`, `# heading`)
30
- - Link shortcut (Cmd/Ctrl + K)
31
- - **Ref Methods**: Focus, clear, export, import, insert text, and more
32
- - **TypeScript**: Full type definitions included
33
-
34
- ### Dependencies
35
-
36
- - Built on [Lexical](https://lexical.dev/) editor framework
37
- - Requires React 18+ or 19+