@typix-editor/extension-link 2.0.0 → 4.0.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.
Files changed (2) hide show
  1. package/README.md +47 -0
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -0,0 +1,47 @@
1
+ # @typix-editor/extension-link
2
+
3
+ Link extension for Typix editors. Wraps Lexical's LinkPlugin with optional custom URL validation.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @typix-editor/extension-link
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```tsx
14
+ import { LinkExtension } from "@typix-editor/extension-link";
15
+
16
+ <EditorRoot editorConfig={config}>
17
+ <EditorContent />
18
+ <LinkExtension />
19
+ </EditorRoot>
20
+ ```
21
+
22
+ ### Custom URL Validation
23
+
24
+ ```tsx
25
+ <LinkExtension validateUrl={(url) => {
26
+ try {
27
+ const parsed = new URL(url);
28
+ return ["https:", "http:"].includes(parsed.protocol);
29
+ } catch {
30
+ return false;
31
+ }
32
+ }} />
33
+ ```
34
+
35
+ ## Props
36
+
37
+ | Prop | Type | Default | Description |
38
+ |------|------|---------|-------------|
39
+ | `validateUrl` | `(url: string) => boolean` | Typix's built-in `validateUrl` | Custom URL validation function |
40
+
41
+ ## Documentation
42
+
43
+ [typix.com/docs/extensions/link](https://typix.com/docs/extensions/link)
44
+
45
+ ## License
46
+
47
+ MIT
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@typix-editor/extension-link",
3
- "version": "2.0.0",
3
+ "version": "4.0.0",
4
4
  "description": "Link extension for Typix",
5
5
  "keywords": [],
6
6
  "author": "Diyorbek Juraev <mrdiyorbekjuraev@gmail.com>",
@@ -29,15 +29,15 @@
29
29
  "react-dom": "^18.2.0 || ^19.0.0-0"
30
30
  },
31
31
  "devDependencies": {
32
- "@lexical/react": "^0.39.0",
33
- "@lexical/link": "^0.39.0",
32
+ "@lexical/react": "^0.40.0",
33
+ "@lexical/link": "^0.40.0",
34
34
  "@types/node": "^25.1.0",
35
35
  "@types/react": "^19.2.7",
36
36
  "@types/react-dom": "^19.2.1",
37
- "lexical": "^0.39.0",
37
+ "lexical": "^0.40.0",
38
38
  "react": "^18.2.0 || ^19.0.0-0",
39
39
  "react-dom": "^18.2.0 || ^19.0.0-0",
40
- "@typix-editor/react": "2.0.0"
40
+ "@typix-editor/react": "4.0.0"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "tsup",