@nuasite/cms-marker 0.0.65 → 0.0.67
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/dist/types/build-processor.d.ts +2 -1
- package/dist/types/build-processor.d.ts.map +1 -1
- package/dist/types/component-registry.d.ts.map +1 -1
- package/dist/types/config.d.ts +19 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/dev-middleware.d.ts +10 -2
- package/dist/types/dev-middleware.d.ts.map +1 -1
- package/dist/types/error-collector.d.ts +56 -0
- package/dist/types/error-collector.d.ts.map +1 -0
- package/dist/types/html-processor.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/manifest-writer.d.ts.map +1 -1
- package/dist/types/source-finder.d.ts +18 -3
- package/dist/types/source-finder.d.ts.map +1 -1
- package/dist/types/tailwind-colors.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/types/types.d.ts +2 -4
- package/dist/types/types.d.ts.map +1 -1
- package/dist/types/vite-plugin.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/build-processor.ts +73 -19
- package/src/component-registry.ts +2 -0
- package/src/config.ts +29 -0
- package/src/dev-middleware.ts +12 -4
- package/src/error-collector.ts +106 -0
- package/src/html-processor.ts +55 -37
- package/src/index.ts +20 -4
- package/src/manifest-writer.ts +12 -2
- package/src/source-finder.ts +1003 -295
- package/src/tailwind-colors.ts +249 -48
- package/src/types.ts +2 -4
- package/src/vite-plugin.ts +4 -12
- package/dist/types/astro-transform.d.ts +0 -21
- package/dist/types/astro-transform.d.ts.map +0 -1
- package/src/astro-transform.ts +0 -205
|
@@ -2,7 +2,8 @@ import type { AstroIntegrationLogger } from 'astro';
|
|
|
2
2
|
import type { ManifestWriter } from './manifest-writer';
|
|
3
3
|
import type { CmsMarkerOptions } from './types';
|
|
4
4
|
/**
|
|
5
|
-
* Process build output - processes all HTML files in parallel
|
|
5
|
+
* Process build output - processes all HTML files in parallel.
|
|
6
|
+
* Uses error aggregation to continue processing even if some files fail.
|
|
6
7
|
*/
|
|
7
8
|
export declare function processBuildOutput(dir: URL, config: Required<CmsMarkerOptions>, manifestWriter: ManifestWriter, idCounter: {
|
|
8
9
|
value: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-processor.d.ts","sourceRoot":"","sources":["../../src/build-processor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAA;AAKnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"build-processor.d.ts","sourceRoot":"","sources":["../../src/build-processor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,OAAO,CAAA;AAKnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAUvD,OAAO,KAAK,EAAE,gBAAgB,EAAmB,MAAM,SAAS,CAAA;AA6MhE;;;GAGG;AACH,wBAAsB,kBAAkB,CACvC,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAClC,cAAc,EAAE,cAAc,EAC9B,SAAS,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,EAC5B,MAAM,CAAC,EAAE,sBAAsB,GAC7B,OAAO,CAAC,IAAI,CAAC,CAiDf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component-registry.d.ts","sourceRoot":"","sources":["../../src/component-registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"component-registry.d.ts","sourceRoot":"","sources":["../../src/component-registry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAiB,MAAM,SAAS,CAAA;AAEjE;;GAEG;AACH,qBAAa,iBAAiB;IAC7B,OAAO,CAAC,UAAU,CAA8C;IAChE,OAAO,CAAC,aAAa,CAAU;gBAEnB,aAAa,GAAE,MAAM,EAAuB;IAIxD;;OAEG;IACG,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAW3B;;OAEG;IACH,aAAa,IAAI,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC;IAIpD;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS;IAI3D;;OAEG;YACW,aAAa;IAe3B;;OAEG;YACW,cAAc;IAqB5B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IA2FzB;;;OAGG;IACH,OAAO,CAAC,qBAAqB;IAyB7B;;OAEG;YACW,YAAY;IA2C1B;;OAEG;IACH,OAAO,CAAC,aAAa;IAoBrB;;OAEG;IACH,OAAO,CAAC,YAAY;IA2BpB;;OAEG;IACH,OAAO,CAAC,kBAAkB;CAY1B;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAClC,OAAO,EAAE,MAAM,EACf,aAAa,EAAE,MAAM,GACnB,KAAK,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CAAE,CAAC,CA6BxD"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Global configuration for cms-marker.
|
|
3
|
+
* This allows overriding the project root for testing.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Get the current project root directory.
|
|
7
|
+
* Returns the override if set, otherwise process.cwd().
|
|
8
|
+
*/
|
|
9
|
+
export declare function getProjectRoot(): string;
|
|
10
|
+
/**
|
|
11
|
+
* Set the project root directory override.
|
|
12
|
+
* Call this to use a specific directory instead of process.cwd().
|
|
13
|
+
*/
|
|
14
|
+
export declare function setProjectRoot(root: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* Reset the project root to use process.cwd() again.
|
|
17
|
+
*/
|
|
18
|
+
export declare function resetProjectRoot(): void;
|
|
19
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH;;;GAGG;AACH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAEjD;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAEvC"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { IncomingMessage, ServerResponse } from 'node:http';
|
|
2
2
|
import type { ManifestWriter } from './manifest-writer';
|
|
3
3
|
import type { CmsMarkerOptions, ComponentDefinition } from './types';
|
|
4
|
-
|
|
4
|
+
/** Minimal ViteDevServer interface to avoid version conflicts between Astro's bundled Vite and root Vite */
|
|
5
|
+
interface ViteDevServerLike {
|
|
6
|
+
middlewares: {
|
|
7
|
+
use: (middleware: (req: IncomingMessage, res: ServerResponse, next: () => void) => void) => void;
|
|
8
|
+
};
|
|
9
|
+
transformIndexHtml: (url: string, html: string) => Promise<string>;
|
|
10
|
+
}
|
|
11
|
+
export declare function createDevMiddleware(server: ViteDevServerLike, config: Required<CmsMarkerOptions>, manifestWriter: ManifestWriter, componentDefinitions: Record<string, ComponentDefinition>, idCounter: {
|
|
5
12
|
value: number;
|
|
6
13
|
}): void;
|
|
14
|
+
export {};
|
|
7
15
|
//# sourceMappingURL=dev-middleware.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dev-middleware.d.ts","sourceRoot":"","sources":["../../src/dev-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"dev-middleware.d.ts","sourceRoot":"","sources":["../../src/dev-middleware.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAEhE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAEvD,OAAO,KAAK,EAAE,gBAAgB,EAAmB,mBAAmB,EAAE,MAAM,SAAS,CAAA;AAErF,4GAA4G;AAC5G,UAAU,iBAAiB;IAC1B,WAAW,EAAE;QACZ,GAAG,EAAE,CAAC,UAAU,EAAE,CAAC,GAAG,EAAE,eAAe,EAAE,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,MAAM,IAAI,KAAK,IAAI,KAAK,IAAI,CAAA;KAChG,CAAA;IACD,kBAAkB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAA;CAClE;AAkBD,wBAAgB,mBAAmB,CAClC,MAAM,EAAE,iBAAiB,EACzB,MAAM,EAAE,QAAQ,CAAC,gBAAgB,CAAC,EAClC,cAAc,EAAE,cAAc,EAC9B,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CAAC,EACzD,SAAS,EAAE;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,QA2H5B"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Collects errors during processing for aggregated reporting.
|
|
3
|
+
* This allows the build to continue while tracking what failed.
|
|
4
|
+
*/
|
|
5
|
+
export declare class ErrorCollector {
|
|
6
|
+
private errors;
|
|
7
|
+
private warnings;
|
|
8
|
+
/**
|
|
9
|
+
* Record an error with context about where it occurred.
|
|
10
|
+
*/
|
|
11
|
+
addError(context: string, error: Error): void;
|
|
12
|
+
/**
|
|
13
|
+
* Record a warning (non-fatal issue).
|
|
14
|
+
*/
|
|
15
|
+
addWarning(context: string, message: string): void;
|
|
16
|
+
/**
|
|
17
|
+
* Check if any errors were recorded.
|
|
18
|
+
*/
|
|
19
|
+
hasErrors(): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Check if any warnings were recorded.
|
|
22
|
+
*/
|
|
23
|
+
hasWarnings(): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Get all recorded errors.
|
|
26
|
+
*/
|
|
27
|
+
getErrors(): ReadonlyArray<{
|
|
28
|
+
context: string;
|
|
29
|
+
error: Error;
|
|
30
|
+
}>;
|
|
31
|
+
/**
|
|
32
|
+
* Get all recorded warnings.
|
|
33
|
+
*/
|
|
34
|
+
getWarnings(): ReadonlyArray<{
|
|
35
|
+
context: string;
|
|
36
|
+
message: string;
|
|
37
|
+
}>;
|
|
38
|
+
/**
|
|
39
|
+
* Get a summary of all errors and warnings.
|
|
40
|
+
*/
|
|
41
|
+
getSummary(): string;
|
|
42
|
+
/**
|
|
43
|
+
* Clear all recorded errors and warnings.
|
|
44
|
+
*/
|
|
45
|
+
clear(): void;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Get the global error collector instance.
|
|
49
|
+
* Creates one if it doesn't exist.
|
|
50
|
+
*/
|
|
51
|
+
export declare function getErrorCollector(): ErrorCollector;
|
|
52
|
+
/**
|
|
53
|
+
* Reset the global error collector (call at start of each build).
|
|
54
|
+
*/
|
|
55
|
+
export declare function resetErrorCollector(): void;
|
|
56
|
+
//# sourceMappingURL=error-collector.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"error-collector.d.ts","sourceRoot":"","sources":["../../src/error-collector.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,cAAc;IAC1B,OAAO,CAAC,MAAM,CAA+C;IAC7D,OAAO,CAAC,QAAQ,CAAkD;IAElE;;OAEG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI;IAI7C;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI;IAIlD;;OAEG;IACH,SAAS,IAAI,OAAO;IAIpB;;OAEG;IACH,WAAW,IAAI,OAAO;IAItB;;OAEG;IACH,SAAS,IAAI,aAAa,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,KAAK,CAAA;KAAE,CAAC;IAI7D;;OAEG;IACH,WAAW,IAAI,aAAa,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAIlE;;OAEG;IACH,UAAU,IAAI,MAAM;IAoBpB;;OAEG;IACH,KAAK,IAAI,IAAI;CAIb;AAKD;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,CAKlD;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAM1C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"html-processor.d.ts","sourceRoot":"","sources":["../../src/html-processor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"html-processor.d.ts","sourceRoot":"","sources":["../../src/html-processor.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAiB,aAAa,EAAiB,MAAM,SAAS,CAAA;AAM7F;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,wKAuBpB,CAAA;AAEV,MAAM,WAAW,kBAAkB;IAClC,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAC5B,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,gBAAgB,EAAE,OAAO,CAAA;IACzB,gBAAgB,EAAE,OAAO,CAAA;IACzB,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;IACxB,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,4FAA4F;IAC5F,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,kFAAkF;IAClF,cAAc,CAAC,EAAE;QAChB,IAAI,EAAE,MAAM,CAAA;QACZ,IAAI,EAAE,MAAM,CAAA;QACZ,mFAAmF;QACnF,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,sEAAsE;QACtE,WAAW,CAAC,EAAE,MAAM,CAAA;KACpB,CAAA;CACD;AAED,MAAM,WAAW,iBAAiB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAA;IACtC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAA;IAC7C,6DAA6D;IAC7D,mBAAmB,CAAC,EAAE,MAAM,CAAA;CAC5B;AA+ED;;GAEG;AACH,wBAAsB,WAAW,CAChC,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,kBAAkB,EAC3B,SAAS,EAAE,MAAM,MAAM,EACvB,UAAU,CAAC,EAAE,MAAM,GACjB,OAAO,CAAC,iBAAiB,CAAC,CA8d5B;AAaD;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import type { AstroIntegration } from 'astro';
|
|
2
2
|
import type { CmsMarkerOptions } from './types';
|
|
3
3
|
export default function cmsMarker(options?: CmsMarkerOptions): AstroIntegration;
|
|
4
|
-
export {
|
|
4
|
+
export { getProjectRoot, resetProjectRoot, setProjectRoot } from './config';
|
|
5
5
|
export type { CollectionInfo, MarkdownContent, SourceLocation, VariableReference } from './source-finder';
|
|
6
|
+
export { findCollectionSource, parseMarkdownContent } from './source-finder';
|
|
6
7
|
export type * from './types';
|
|
7
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAA;AAO7C,OAAO,KAAK,EAAE,gBAAgB,EAAuB,MAAM,SAAS,CAAA;AAGpE,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,gBAAgB,CAkGlF;AAGD,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,UAAU,CAAA;AAE3E,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACzG,OAAO,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAA;AAC5E,mBAAmB,SAAS,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest-writer.d.ts","sourceRoot":"","sources":["../../src/manifest-writer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"manifest-writer.d.ts","sourceRoot":"","sources":["../../src/manifest-writer.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACX,eAAe,EACf,mBAAmB,EACnB,WAAW,EACX,eAAe,EACf,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EAEb,MAAM,SAAS,CAAA;AAMhB;;;GAGG;AACH,qBAAa,cAAc;IAC1B,OAAO,CAAC,cAAc,CAAa;IACnC,OAAO,CAAC,aAAa,CAIP;IACd,OAAO,CAAC,MAAM,CAAa;IAC3B,OAAO,CAAC,YAAY,CAAQ;IAC5B,OAAO,CAAC,oBAAoB,CAAqC;IACjE,OAAO,CAAC,eAAe,CAA6B;IACpD,OAAO,CAAC,mBAAmB,CAAiC;IAC5D,OAAO,CAAC,UAAU,CAAmC;gBAEzC,YAAY,EAAE,MAAM,EA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sBAAsB,IAAI,mBAAmB,GAAG,SAAS;CAGzD"}
|
|
@@ -1,4 +1,13 @@
|
|
|
1
1
|
import type { ManifestEntry } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Clear all caches - call at start of each build
|
|
4
|
+
*/
|
|
5
|
+
export declare function clearSourceFinderCache(): void;
|
|
6
|
+
/**
|
|
7
|
+
* Initialize search index by pre-scanning all source files.
|
|
8
|
+
* This is much faster than searching per-entry.
|
|
9
|
+
*/
|
|
10
|
+
export declare function initializeSearchIndex(): Promise<void>;
|
|
2
11
|
export interface SourceLocation {
|
|
3
12
|
file: string;
|
|
4
13
|
line: number;
|
|
@@ -39,16 +48,21 @@ export interface MarkdownContent {
|
|
|
39
48
|
collectionSlug: string;
|
|
40
49
|
}
|
|
41
50
|
/**
|
|
42
|
-
* Find source file and line number for text content
|
|
51
|
+
* Find source file and line number for text content.
|
|
52
|
+
* Uses pre-built search index for fast lookups.
|
|
43
53
|
*/
|
|
44
54
|
export declare function findSourceLocation(textContent: string, tag: string): Promise<SourceLocation | undefined>;
|
|
45
55
|
/**
|
|
46
|
-
* Find source file and line number for an image by its src attribute
|
|
56
|
+
* Find source file and line number for an image by its src attribute.
|
|
57
|
+
* Uses pre-built search index for fast lookups.
|
|
47
58
|
*/
|
|
48
59
|
export declare function findImageSourceLocation(imageSrc: string): Promise<SourceLocation | undefined>;
|
|
49
60
|
/**
|
|
50
61
|
* Extract complete tag snippet including content and indentation.
|
|
51
62
|
* Exported for use in html-processor to populate sourceSnippet.
|
|
63
|
+
*
|
|
64
|
+
* When startLine points to a line inside the element (e.g., the text content line),
|
|
65
|
+
* this function searches backwards to find the opening tag first.
|
|
52
66
|
*/
|
|
53
67
|
export declare function extractCompleteTagSnippet(lines: string[], startLine: number, tag: string): string;
|
|
54
68
|
/**
|
|
@@ -85,7 +99,8 @@ export declare function findCollectionSource(pagePath: string, contentDir?: stri
|
|
|
85
99
|
*/
|
|
86
100
|
export declare function findMarkdownSourceLocation(textContent: string, collectionInfo: CollectionInfo): Promise<SourceLocation | undefined>;
|
|
87
101
|
/**
|
|
88
|
-
* Parse markdown file and extract frontmatter fields and full body content
|
|
102
|
+
* Parse markdown file and extract frontmatter fields and full body content.
|
|
103
|
+
* Uses caching for better performance.
|
|
89
104
|
* @param collectionInfo - Collection information (name, slug, file path)
|
|
90
105
|
* @returns Parsed markdown content with frontmatter and body
|
|
91
106
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source-finder.d.ts","sourceRoot":"","sources":["../../src/source-finder.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"source-finder.d.ts","sourceRoot":"","sources":["../../src/source-finder.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAiD5C;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAO7C;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,IAAI,CAAC,CAwC3D;AAwUD,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,IAAI,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,YAAY,CAAA;IACjE,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,6CAA6C;IAC7C,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,wCAAwC;IACxC,cAAc,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,iBAAiB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,cAAc;IAC9B,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,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AMG;AACH,wBAAsB,0BAA0B,CAC/C,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,cAAc,GAC5B,OAAO,CAAC,cAAc,GAAG,SAAS,CAAC,CAmErC;AAED;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACzC,cAAc,EAAE,cAAc,GAC5B,OAAO,CAAC,eAAe,GAAG,SAAS,CAAC,CAuEtC;AAmBD;;;;;;;GAOG;AACH,wBAAsB,iCAAiC,CACtD,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,GACpC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,CAAC,CAgDxC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tailwind-colors.d.ts","sourceRoot":"","sources":["../../src/tailwind-colors.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tailwind-colors.d.ts","sourceRoot":"","sources":["../../src/tailwind-colors.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,mBAAmB,EAAE,YAAY,EAAiC,MAAM,SAAS,CAAA;AAEhH;;GAEG;AACH,eAAO,MAAM,uBAAuB,gNAuB1B,CAAA;AAEV;;GAEG;AACH,eAAO,MAAM,eAAe,uFAAwF,CAAA;AAEpH;;GAEG;AACH,eAAO,MAAM,cAAc,kEAAmE,CAAA;AAyX9F;;GAEG;AACH,wBAAsB,mBAAmB,CAAC,WAAW,GAAE,MAAyB,GAAG,OAAO,CAAC,eAAe,CAAC,CA+C1G;AAuDD;;GAEG;AACH,wBAAsB,eAAe,CAAC,WAAW,GAAE,MAAyB,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAoC1G;AAgGD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,YAAY,GAAG,SAAS,CA2BlG;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CA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