@yurikilian/lex4 0.2.2 → 0.3.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.
@@ -1 +1 @@
1
- {"version":3,"file":"history-capture-plugin.d.ts","sourceRoot":"","sources":["../../../src/lexical/plugins/history-capture-plugin.tsx"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAA2B,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAElF,UAAU,yBAAyB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;CAC5C;AAWD,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAyKpE,CAAC"}
1
+ {"version":3,"file":"history-capture-plugin.d.ts","sourceRoot":"","sources":["../../../src/lexical/plugins/history-capture-plugin.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAA2B,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAElF,UAAU,yBAAyB;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC,aAAa,EAAE,UAAU,CAAC,CAAC;CAC5C;AAED,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAsLpE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"overflow-plugin.d.ts","sourceRoot":"","sources":["../../../src/lexical/plugins/overflow-plugin.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,qBAAqB,EAE3B,MAAM,SAAS,CAAC;AAiBjB,UAAU,mBAAmB;IAC3B,gFAAgF;IAChF,UAAU,EAAE,CACV,eAAe,EAAE,qBAAqB,EACtC,KAAK,EAAE,OAAO,GAAG,SAAS,KACvB,IAAI,CAAC;CACX;AAKD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA8LxD,CAAC"}
1
+ {"version":3,"file":"overflow-plugin.d.ts","sourceRoot":"","sources":["../../../src/lexical/plugins/overflow-plugin.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,qBAAqB,EAE3B,MAAM,SAAS,CAAC;AAkBjB,UAAU,mBAAmB;IAC3B,gFAAgF;IAChF,UAAU,EAAE,CACV,eAAe,EAAE,qBAAqB,EACtC,KAAK,EAAE,OAAO,GAAG,SAAS,KACvB,IAAI,CAAC;CACX;AAKD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA+PxD,CAAC"}
@@ -0,0 +1,34 @@
1
+ import { SerializedLexicalNode } from 'lexical';
2
+ /**
3
+ * Result of finding a split point inside a block element.
4
+ */
5
+ interface DomSplitPoint {
6
+ /** The DOM Text node containing the split offset */
7
+ textNode: Text;
8
+ /** Character offset within the text node */
9
+ offset: number;
10
+ }
11
+ /**
12
+ * Finds the character position inside a block element where content
13
+ * crosses the available height boundary.
14
+ *
15
+ * Uses a binary search with Range.getBoundingClientRect() for efficiency.
16
+ * Returns the offset backed up to the nearest word boundary.
17
+ *
18
+ * @returns The DOM text node and offset, or null if no valid split found
19
+ */
20
+ export declare function findMidBlockSplitPoint(blockElement: HTMLElement, availableHeight: number): DomSplitPoint | null;
21
+ /**
22
+ * Performs a mid-block split on the first overflowing block in the editor.
23
+ *
24
+ * Handles two cases:
25
+ * 1. Paragraph/Heading: splits at a text offset using Range measurement
26
+ * 2. List: splits at a ListItem boundary
27
+ *
28
+ * Must be called inside an editor.update() context.
29
+ *
30
+ * @returns Serialized overflow nodes, or null if split wasn't possible
31
+ */
32
+ export declare function performMidBlockSplit(rootElement: HTMLElement, availableHeight: number, overflowBlockIndex: number): SerializedLexicalNode[] | null;
33
+ export {};
34
+ //# sourceMappingURL=mid-block-split.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mid-block-split.d.ts","sourceRoot":"","sources":["../../../src/lexical/utils/mid-block-split.ts"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,qBAAqB,EAE3B,MAAM,SAAS,CAAC;AAIjB;;GAEG;AACH,UAAU,aAAa;IACrB,oDAAoD;IACpD,QAAQ,EAAE,IAAI,CAAC;IACf,4CAA4C;IAC5C,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,WAAW,EACzB,eAAe,EAAE,MAAM,GACtB,aAAa,GAAG,IAAI,CAuDtB;AAwED;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,EACxB,eAAe,EAAE,MAAM,EACvB,kBAAkB,EAAE,MAAM,GACzB,qBAAqB,EAAE,GAAG,IAAI,CAiChC"}