safechunk 0.0.0-stage → 0.1.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.
@@ -0,0 +1,15 @@
1
+ /** Core text chunking engine for safechunk. */
2
+ type Target = "telegram" | "discord" | "llm";
3
+ type Format = "plain" | "markdown" | "html";
4
+ interface ChunkOptions {
5
+ maxSize?: number;
6
+ max_size?: number;
7
+ target?: Target;
8
+ format?: Format;
9
+ overlap?: number;
10
+ }
11
+ declare const TARGET_LIMITS: Readonly<Record<Target, number>>;
12
+ /** Split text into chunks preserving document structure, markup, and Unicode graphemes. */
13
+ declare function chunk(text: string, options?: ChunkOptions): string[];
14
+
15
+ export { type ChunkOptions, type Format, TARGET_LIMITS, type Target, chunk };
@@ -0,0 +1,15 @@
1
+ /** Core text chunking engine for safechunk. */
2
+ type Target = "telegram" | "discord" | "llm";
3
+ type Format = "plain" | "markdown" | "html";
4
+ interface ChunkOptions {
5
+ maxSize?: number;
6
+ max_size?: number;
7
+ target?: Target;
8
+ format?: Format;
9
+ overlap?: number;
10
+ }
11
+ declare const TARGET_LIMITS: Readonly<Record<Target, number>>;
12
+ /** Split text into chunks preserving document structure, markup, and Unicode graphemes. */
13
+ declare function chunk(text: string, options?: ChunkOptions): string[];
14
+
15
+ export { type ChunkOptions, type Format, TARGET_LIMITS, type Target, chunk };