uilint-react 0.2.56 → 0.2.58

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,45 @@
1
+ /**
2
+ * Source Code Cache Service
3
+ *
4
+ * Caches fetched source files with TTL and provides
5
+ * line extraction utilities for the source viewer.
6
+ */
7
+ export interface CachedSourceFile {
8
+ content: string;
9
+ lines: string[];
10
+ totalLines: number;
11
+ relativePath: string;
12
+ fetchedAt: number;
13
+ }
14
+ export interface SourceContext {
15
+ lines: string[];
16
+ startLine: number;
17
+ highlightLine: number;
18
+ relativePath: string;
19
+ }
20
+ /**
21
+ * Get cached source file if available and not expired
22
+ */
23
+ export declare function getCachedSource(filePath: string): CachedSourceFile | null;
24
+ /**
25
+ * Store source file in cache
26
+ */
27
+ export declare function setCachedSource(filePath: string, content: string, totalLines: number, relativePath: string): CachedSourceFile;
28
+ /**
29
+ * Invalidate cached source for a file (called on file:changed)
30
+ */
31
+ export declare function invalidateSource(filePath: string): void;
32
+ /**
33
+ * Clear entire source cache
34
+ */
35
+ export declare function clearSourceCache(): void;
36
+ /**
37
+ * Extract lines around a target line with configurable context.
38
+ */
39
+ export declare function extractContext(cached: CachedSourceFile, targetLine: number, contextAbove?: number, contextBelow?: number): SourceContext;
40
+ /**
41
+ * Get or set pending request for deduplication
42
+ */
43
+ export declare function getPendingRequest(filePath: string): Promise<CachedSourceFile | null> | undefined;
44
+ export declare function setPendingRequest(filePath: string, promise: Promise<CachedSourceFile | null>): void;
45
+ //# sourceMappingURL=source-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-cache.d.ts","sourceRoot":"","sources":["../../../src/core/services/source-cache.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,YAAY,EAAE,MAAM,CAAC;CACtB;AAQD;;GAEG;AACH,wBAAgB,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,GAAG,IAAI,CAQzE;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,MAAM,EACf,UAAU,EAAE,MAAM,EAClB,YAAY,EAAE,MAAM,GACnB,gBAAgB,CAUlB;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAEvD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,MAAM,EAAE,gBAAgB,EACxB,UAAU,EAAE,MAAM,EAClB,YAAY,GAAE,MAAU,EACxB,YAAY,GAAE,MAAU,GACvB,aAAa,CAWf;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,GAAG,SAAS,CAE9C;AAED,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,OAAO,EAAE,OAAO,CAAC,gBAAgB,GAAG,IAAI,CAAC,GACxC,IAAI,CAMN"}