@lobehub/editor 4.9.1 → 4.9.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/editor",
3
- "version": "4.9.1",
3
+ "version": "4.9.2",
4
4
  "description": "A powerful and extensible rich text editor built on Meta's Lexical framework, providing a modern editing experience with React integration.",
5
5
  "keywords": [
6
6
  "lobehub",
@@ -10,19 +10,15 @@ const SUPPORTED_VERSION = '0.42.0';
10
10
 
11
11
  const FILE_HASHES = {
12
12
  'Lexical.dev.js': {
13
- original: 'a7627f790028c3d6cd13b28bb0efdd8e5b48f85a1f0d62df5696e52c8b5f790d',
14
13
  patched: '7c81a9785b397dc09ce0ecc9f3126d3e4903cdfd12d5c51318965ed74b0e3ccb',
15
14
  },
16
15
  'Lexical.dev.mjs': {
17
- original: '0dd55914d1f967694a77f4fa842ecbbdc9376f7832b8cca380a213e30c4153b3',
18
16
  patched: '880f22f2ec2d873e1699766de39edce5123b4730009bb88bb33d7e4da98a4ad9',
19
17
  },
20
18
  'Lexical.prod.js': {
21
- original: 'dea32eb95962fa45df8251a42144f63821f7745f7dcfcc24d63f33d9cfb79a76',
22
19
  patched: '9f97867340b84853cf82bbd2d60ef9f944ee61ef058daa37007b820c2780a103',
23
20
  },
24
21
  'Lexical.prod.mjs': {
25
- original: 'b4c3af0707687a7d14519233cf9d373cb62261a281be6239649a4a1b36000e4b',
26
22
  patched: 'f7b2993582b2cc0573ca468373831b17971e0bb7383f5ca8785d4b93ab967c0b',
27
23
  },
28
24
  };
@@ -55,11 +51,7 @@ function getContentHashState(content, hashes) {
55
51
  return { currentHash, normalizedContent, normalizedHash, status: 'patched' };
56
52
  }
57
53
 
58
- if (normalizedHash === hashes.original) {
59
- return { currentHash, normalizedContent, normalizedHash, status: 'original' };
60
- }
61
-
62
- return { currentHash, normalizedContent, normalizedHash, status: 'unknown' };
54
+ return { currentHash, normalizedContent, normalizedHash, status: 'needs-patch' };
63
55
  }
64
56
 
65
57
  function splitLines(text) {
@@ -220,17 +212,6 @@ function patchLexical() {
220
212
  throw new Error(`[lobe-editor] Missing patch entry for ${filename}`);
221
213
  }
222
214
 
223
- if (currentState.status !== 'original') {
224
- const normalizedHashMessage =
225
- currentState.currentHash === currentState.normalizedHash
226
- ? ''
227
- : `; normalized content hash ${currentState.normalizedHash}`;
228
-
229
- throw new Error(
230
- `[lobe-editor] Refuse to patch ${filename}: unknown content hash ${currentState.currentHash}${normalizedHashMessage}.`,
231
- );
232
- }
233
-
234
215
  const patchedContent = applyPatchToContent(currentState.normalizedContent, filePatch);
235
216
  const patchedHash = sha256(patchedContent);
236
217