@haklex/rich-editor 0.0.57 → 0.0.59
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.
|
@@ -2503,7 +2503,7 @@ function detectMarkdown(text) {
|
|
|
2503
2503
|
if (/`.+?`/.test(text)) score += 1;
|
|
2504
2504
|
if (/^[-*_]{3,}$/m.test(text)) score += 2;
|
|
2505
2505
|
const paragraphs = text.split(/\n{2,}/).filter(Boolean);
|
|
2506
|
-
if (paragraphs.length >=
|
|
2506
|
+
if (paragraphs.length >= 2) score += 5;
|
|
2507
2507
|
if (text.length < 20) score -= 3;
|
|
2508
2508
|
if (!text.includes("\n")) score -= 2;
|
|
2509
2509
|
return score >= 5;
|
package/dist/editor.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { b as blockIdState } from "./RichEditor-
|
|
2
|
-
import { A, F, d, I, e, f, h, i, N, R, a, c, j, g, s, u } from "./RichEditor-
|
|
1
|
+
import { b as blockIdState } from "./RichEditor-gH1U7if8.js";
|
|
2
|
+
import { A, F, d, I, e, f, h, i, N, R, a, c, j, g, s, u } from "./RichEditor-gH1U7if8.js";
|
|
3
3
|
import { h as useFootnoteContent, j as useFootnoteDisplayNumber } from "./favicon-DUlhCRKH.js";
|
|
4
4
|
import { $, q, r, s as s2, t, v, w, x, y, z, A as A2, B, D, E, G, H, I as I2, J, K, L, C, F as F2, M, O, P, Q, S, T, U, V, W, X, Y, N as N2, Z, _, a as a2, b, a0, e as e2, c as c2, a1, f as f2, g as g2, u as u2, i as i2, k, l, m, n } from "./favicon-DUlhCRKH.js";
|
|
5
5
|
import { a as a3, c as c3, g as g3, n as n2 } from "./utils-fpeaZV1R.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MarkdownPastePlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/MarkdownPastePlugin.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MarkdownPastePlugin.d.ts","sourceRoot":"","sources":["../../src/plugins/MarkdownPastePlugin.tsx"],"names":[],"mappings":"AAkIA,wBAAgB,mBAAmB,SA6DlC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haklex/rich-editor",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.59",
|
|
4
4
|
"description": "Core rich text editor based on Lexical",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -30,9 +30,9 @@
|
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"nanoid": "^5.1.6",
|
|
32
32
|
"thumbhash": "^0.1.1",
|
|
33
|
-
"@haklex/rich-editor-ui": "0.0.
|
|
34
|
-
"@haklex/rich-
|
|
35
|
-
"@haklex/rich-
|
|
33
|
+
"@haklex/rich-editor-ui": "0.0.59",
|
|
34
|
+
"@haklex/rich-headless": "0.0.59",
|
|
35
|
+
"@haklex/rich-style-token": "0.0.59"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@base-ui/react": "^1.2.0",
|