@cascivo/editor 0.1.1 → 0.2.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 CHANGED
@@ -58,6 +58,21 @@ import { Highlight } from '@cascivo/editor'
58
58
  Ships small, tree-shakeable grammars: `plaintext`, `json`, `javascript`, `typescript`, `css`,
59
59
  `html`, `markdown`, `bash`. Register your own with `registerGrammar(grammar)`.
60
60
 
61
+ ### Large documents
62
+
63
+ The editor edits long Markdown documents — generated docs, concatenated books, big notes —
64
+ well past the old ~5,000-line ceiling. On every render it tokenizes only the **visible window**
65
+ (O(viewport)) rather than the whole document, and an edit re-tokenizes only the **changed
66
+ suffix** until the grammar state reconverges. This is the same overlay + owned-tokenizer model,
67
+ with **zero new dependencies** and **byte-identical highlighting output** — just a persistent
68
+ per-line state index (`LineStateIndex`) feeding a viewport-scoped `tokenizeRange`. Scrolling and
69
+ typing stay smooth well past 50,000 lines.
70
+
71
+ One trade-off: with `wrap` (soft-wrap) on, row heights are variable so DOM windowing is disabled
72
+ and every row renders (O(n) render). Edits stay cheap, but for sustained editing of very large
73
+ documents (≳10,000 lines) disable `wrap`. See [`PERFORMANCE.md`](./PERFORMANCE.md) for the
74
+ measured before/after numbers and the deferred worker-offload boundary.
75
+
61
76
  ### Extending the editor
62
77
 
63
78
  Three bounded seams — no plugin lifecycle, no transaction filters (use a full editor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cascivo/editor",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "private": false,
5
5
  "description": "Lightweight CSS-native code editor — native textarea overlay + owned zero-dependency tokenizer",
6
6
  "keywords": [
package/readme.body.md CHANGED
@@ -40,6 +40,21 @@ import { Highlight } from '@cascivo/editor'
40
40
  Ships small, tree-shakeable grammars: `plaintext`, `json`, `javascript`, `typescript`, `css`,
41
41
  `html`, `markdown`, `bash`. Register your own with `registerGrammar(grammar)`.
42
42
 
43
+ ### Large documents
44
+
45
+ The editor edits long Markdown documents — generated docs, concatenated books, big notes —
46
+ well past the old ~5,000-line ceiling. On every render it tokenizes only the **visible window**
47
+ (O(viewport)) rather than the whole document, and an edit re-tokenizes only the **changed
48
+ suffix** until the grammar state reconverges. This is the same overlay + owned-tokenizer model,
49
+ with **zero new dependencies** and **byte-identical highlighting output** — just a persistent
50
+ per-line state index (`LineStateIndex`) feeding a viewport-scoped `tokenizeRange`. Scrolling and
51
+ typing stay smooth well past 50,000 lines.
52
+
53
+ One trade-off: with `wrap` (soft-wrap) on, row heights are variable so DOM windowing is disabled
54
+ and every row renders (O(n) render). Edits stay cheap, but for sustained editing of very large
55
+ documents (≳10,000 lines) disable `wrap`. See [`PERFORMANCE.md`](./PERFORMANCE.md) for the
56
+ measured before/after numbers and the deferred worker-offload boundary.
57
+
43
58
  ### Extending the editor
44
59
 
45
60
  Three bounded seams — no plugin lifecycle, no transaction filters (use a full editor