@openim/im-composer 1.0.0 → 1.0.2
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/LICENSE +1 -1
- package/README.md +214 -203
- package/dist/index.css +1 -518
- package/dist/index.d.mts +617 -0
- package/dist/index.d.ts +487 -276
- package/dist/index.js +24 -2641
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +32 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +129 -82
- package/CHANGELOG.md +0 -37
- package/dist/index.cjs +0 -2603
- package/dist/index.cjs.map +0 -1
- package/dist/index.css.map +0 -1
- package/dist/index.d.cts +0 -406
package/package.json
CHANGED
|
@@ -1,84 +1,131 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
"name": "@openim/im-composer",
|
|
3
|
+
"version": "1.0.2",
|
|
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
|
-
"
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"
|
|
82
|
-
|
|
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
|
+
},
|
|
59
|
+
"dependencies": {
|
|
60
|
+
"@floating-ui/react": "^0.27.0",
|
|
61
|
+
"@radix-ui/react-dropdown-menu": "^2.0.0",
|
|
62
|
+
"@radix-ui/react-popover": "^1.0.0",
|
|
63
|
+
"@tiptap/core": "^3.0.0",
|
|
64
|
+
"@tiptap/extension-document": "^3.0.0",
|
|
65
|
+
"@tiptap/extension-hard-break": "^3.0.0",
|
|
66
|
+
"@tiptap/extension-highlight": "^3.0.0",
|
|
67
|
+
"@tiptap/extension-history": "^3.0.0",
|
|
68
|
+
"@tiptap/extension-horizontal-rule": "^3.0.0",
|
|
69
|
+
"@tiptap/extension-image": "^3.0.0",
|
|
70
|
+
"@tiptap/extension-link": "^3.0.0",
|
|
71
|
+
"@tiptap/extension-list": "^3.0.0",
|
|
72
|
+
"@tiptap/extension-mention": "^3.0.0",
|
|
73
|
+
"@tiptap/extension-paragraph": "^3.0.0",
|
|
74
|
+
"@tiptap/extension-placeholder": "^3.0.0",
|
|
75
|
+
"@tiptap/extension-subscript": "^3.0.0",
|
|
76
|
+
"@tiptap/extension-superscript": "^3.0.0",
|
|
77
|
+
"@tiptap/extension-text": "^3.0.0",
|
|
78
|
+
"@tiptap/extension-text-align": "^3.0.0",
|
|
79
|
+
"@tiptap/extension-typography": "^3.0.0",
|
|
80
|
+
"@tiptap/extension-underline": "^3.0.0",
|
|
81
|
+
"@tiptap/extensions": "^3.0.0",
|
|
82
|
+
"@tiptap/pm": "^3.0.0",
|
|
83
|
+
"@tiptap/react": "^3.0.0",
|
|
84
|
+
"@tiptap/starter-kit": "^3.0.0",
|
|
85
|
+
"@tiptap/suggestion": "^3.0.0",
|
|
86
|
+
"lodash.throttle": "^4.1.1",
|
|
87
|
+
"react-hotkeys-hook": "^5.2.1"
|
|
88
|
+
},
|
|
89
|
+
"devDependencies": {
|
|
90
|
+
"@floating-ui/react": "^0.27.16",
|
|
91
|
+
"@radix-ui/react-dropdown-menu": "^2.1.16",
|
|
92
|
+
"@radix-ui/react-popover": "^1.1.15",
|
|
93
|
+
"@testing-library/jest-dom": "^6.9.1",
|
|
94
|
+
"@testing-library/react": "^14.1.0",
|
|
95
|
+
"@tiptap/core": "^3.14.0",
|
|
96
|
+
"@tiptap/extension-document": "^3.14.0",
|
|
97
|
+
"@tiptap/extension-hard-break": "^3.14.0",
|
|
98
|
+
"@tiptap/extension-highlight": "^3.14.0",
|
|
99
|
+
"@tiptap/extension-history": "^3.14.0",
|
|
100
|
+
"@tiptap/extension-horizontal-rule": "^3.14.0",
|
|
101
|
+
"@tiptap/extension-image": "^3.14.0",
|
|
102
|
+
"@tiptap/extension-link": "^3.14.0",
|
|
103
|
+
"@tiptap/extension-list": "^3.14.0",
|
|
104
|
+
"@tiptap/extension-mention": "^3.14.0",
|
|
105
|
+
"@tiptap/extension-paragraph": "^3.14.0",
|
|
106
|
+
"@tiptap/extension-placeholder": "^3.14.0",
|
|
107
|
+
"@tiptap/extension-subscript": "^3.14.0",
|
|
108
|
+
"@tiptap/extension-superscript": "^3.14.0",
|
|
109
|
+
"@tiptap/extension-text": "^3.14.0",
|
|
110
|
+
"@tiptap/extension-text-align": "^3.14.0",
|
|
111
|
+
"@tiptap/extension-typography": "^3.14.0",
|
|
112
|
+
"@tiptap/extension-underline": "^3.14.0",
|
|
113
|
+
"@tiptap/extensions": "^3.14.0",
|
|
114
|
+
"@tiptap/pm": "^3.14.0",
|
|
115
|
+
"@tiptap/react": "^3.14.0",
|
|
116
|
+
"@tiptap/starter-kit": "^3.14.0",
|
|
117
|
+
"@tiptap/suggestion": "^3.14.0",
|
|
118
|
+
"@types/lodash.throttle": "^4.1.9",
|
|
119
|
+
"@types/react": "^18.2.0",
|
|
120
|
+
"@types/react-dom": "^18.2.0",
|
|
121
|
+
"esbuild-sass-plugin": "^3.3.1",
|
|
122
|
+
"jsdom": "^24.0.0",
|
|
123
|
+
"react": "^18.2.0",
|
|
124
|
+
"react-dom": "^18.2.0",
|
|
125
|
+
"sass": "^1.97.1",
|
|
126
|
+
"sass-embedded": "^1.97.1",
|
|
127
|
+
"tsup": "^8.0.1",
|
|
128
|
+
"typescript": "^5.3.0",
|
|
129
|
+
"vitest": "^2.0.0"
|
|
130
|
+
}
|
|
131
|
+
}
|
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+
|