@haklex/rich-plugin-slash-menu 0.23.0 → 0.25.0
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 +30 -30
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -10,30 +10,30 @@ pnpm add @haklex/rich-plugin-slash-menu
|
|
|
10
10
|
|
|
11
11
|
## Peer Dependencies
|
|
12
12
|
|
|
13
|
-
| Package
|
|
14
|
-
|
|
|
15
|
-
| `@lexical/list`
|
|
16
|
-
| `@lexical/react`
|
|
17
|
-
| `@lexical/rich-text` | `^0.
|
|
18
|
-
| `@lexical/selection` | `^0.
|
|
19
|
-
| `@lexical/table`
|
|
20
|
-
| `lexical`
|
|
21
|
-
| `lucide-react`
|
|
22
|
-
| `react`
|
|
23
|
-
| `react-dom`
|
|
13
|
+
| Package | Version |
|
|
14
|
+
| -------------------- | --------- |
|
|
15
|
+
| `@lexical/list` | `^0.45.0` |
|
|
16
|
+
| `@lexical/react` | `^0.45.0` |
|
|
17
|
+
| `@lexical/rich-text` | `^0.45.0` |
|
|
18
|
+
| `@lexical/selection` | `^0.45.0` |
|
|
19
|
+
| `@lexical/table` | `^0.45.0` |
|
|
20
|
+
| `lexical` | `^0.45.0` |
|
|
21
|
+
| `lucide-react` | `^1.0.0` |
|
|
22
|
+
| `react` | `>= 19` |
|
|
23
|
+
| `react-dom` | `>= 19` |
|
|
24
24
|
|
|
25
25
|
## Usage
|
|
26
26
|
|
|
27
27
|
```tsx
|
|
28
|
-
import { SlashMenuPlugin } from '@haklex/rich-plugin-slash-menu'
|
|
29
|
-
import '@haklex/rich-plugin-slash-menu/style.css'
|
|
28
|
+
import { SlashMenuPlugin } from '@haklex/rich-plugin-slash-menu';
|
|
29
|
+
import '@haklex/rich-plugin-slash-menu/style.css';
|
|
30
30
|
|
|
31
31
|
function Editor() {
|
|
32
32
|
return (
|
|
33
33
|
<RichEditor>
|
|
34
34
|
<SlashMenuPlugin />
|
|
35
35
|
</RichEditor>
|
|
36
|
-
)
|
|
36
|
+
);
|
|
37
37
|
}
|
|
38
38
|
```
|
|
39
39
|
|
|
@@ -46,33 +46,33 @@ import {
|
|
|
46
46
|
SlashMenuList,
|
|
47
47
|
getBuiltinItems,
|
|
48
48
|
collectNodeSlashItems,
|
|
49
|
-
} from '@haklex/rich-plugin-slash-menu'
|
|
50
|
-
import type { SlashMenuPluginProps } from '@haklex/rich-plugin-slash-menu'
|
|
49
|
+
} from '@haklex/rich-plugin-slash-menu';
|
|
50
|
+
import type { SlashMenuPluginProps } from '@haklex/rich-plugin-slash-menu';
|
|
51
51
|
|
|
52
52
|
// Get builtin slash menu items
|
|
53
|
-
const items = getBuiltinItems()
|
|
53
|
+
const items = getBuiltinItems();
|
|
54
54
|
|
|
55
55
|
// Collect slash items registered by nodes
|
|
56
|
-
const nodeItems = collectNodeSlashItems()
|
|
56
|
+
const nodeItems = collectNodeSlashItems();
|
|
57
57
|
```
|
|
58
58
|
|
|
59
59
|
## Exports
|
|
60
60
|
|
|
61
|
-
| Export
|
|
62
|
-
|
|
|
63
|
-
| `SlashMenuPlugin`
|
|
64
|
-
| `SlashMenuItem`
|
|
65
|
-
| `SlashMenuList`
|
|
66
|
-
| `getBuiltinItems`
|
|
67
|
-
| `collectNodeSlashItems` | Function
|
|
68
|
-
| `SlashMenuPluginProps`
|
|
61
|
+
| Export | Type | Description |
|
|
62
|
+
| ----------------------- | --------------- | ---------------------------------------------------- |
|
|
63
|
+
| `SlashMenuPlugin` | Component | Main plugin component to render inside `RichEditor` |
|
|
64
|
+
| `SlashMenuItem` | Component | Individual menu item component |
|
|
65
|
+
| `SlashMenuList` | Component | Menu list container component |
|
|
66
|
+
| `getBuiltinItems` | Function | Returns the default set of slash menu items |
|
|
67
|
+
| `collectNodeSlashItems` | Function | Collects slash menu items registered by editor nodes |
|
|
68
|
+
| `SlashMenuPluginProps` | TypeScript type | Props type for `SlashMenuPlugin` |
|
|
69
69
|
|
|
70
70
|
## Sub-path Exports
|
|
71
71
|
|
|
72
|
-
| Path
|
|
73
|
-
|
|
|
74
|
-
| `@haklex/rich-plugin-slash-menu`
|
|
75
|
-
| `@haklex/rich-plugin-slash-menu/style.css` | Stylesheet
|
|
72
|
+
| Path | Description |
|
|
73
|
+
| ------------------------------------------ | -------------------------------------------------- |
|
|
74
|
+
| `@haklex/rich-plugin-slash-menu` | Plugin component, menu items, utilities, and types |
|
|
75
|
+
| `@haklex/rich-plugin-slash-menu/style.css` | Stylesheet |
|
|
76
76
|
|
|
77
77
|
## Part of Haklex
|
|
78
78
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-plugin-slash-menu",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"description": "Slash command menu plugin",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -51,8 +51,8 @@
|
|
|
51
51
|
"lucide-react": "^1.0.0",
|
|
52
52
|
"react": ">=19",
|
|
53
53
|
"react-dom": ">=19",
|
|
54
|
-
"@haklex/rich-editor": "0.
|
|
55
|
-
"@haklex/rich-style-token": "0.
|
|
54
|
+
"@haklex/rich-editor": "0.25.0",
|
|
55
|
+
"@haklex/rich-style-token": "0.25.0"
|
|
56
56
|
},
|
|
57
57
|
"publishConfig": {
|
|
58
58
|
"access": "public"
|