@modality-counter/core 2.9.1 → 2.9.3
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/index.js +422 -422
- package/dist/mdx.js +234 -0
- package/dist/testing.js +253 -253
- package/dist/types/__tests__/MdxEntry.test.d.ts +1 -0
- package/dist/types/__tests__/UtilFrontmatterExtraction.test.d.ts +1 -0
- package/dist/types/index.d.ts +0 -6
- package/dist/types/mdx.d.ts +2 -0
- package/dist/types/util_frontmatter.d.ts +17 -0
- package/dist/types/util_mdx.d.ts +1 -16
- package/package.json +6 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -14,12 +14,6 @@ export { toCounterCLIHelp, toCounterMethodHelp, type HelpFormat } from "./toCoun
|
|
|
14
14
|
export { validateMethodFile, MethodFileSchema } from "./schemas/methodology-validation.js";
|
|
15
15
|
export { validateTemplateFile, TemplateFileSchema } from "./schemas/template-validation.js";
|
|
16
16
|
export { validateProtocolFile } from "./schemas/protocol-validation.js";
|
|
17
|
-
export { extractCodeBlocks, extractYamlBlocks, readMdxPrompt, readMdxYaml, readPrompt, } from "./util_prompts";
|
|
18
|
-
export { readMdx, importMdx } from "./util_mdx";
|
|
19
|
-
/**
|
|
20
|
-
* Test setup helpers live in a separate entry point to keep bun:test
|
|
21
|
-
* out of the main bundle: import from "@modality-counter/core/testing".
|
|
22
|
-
*/
|
|
23
17
|
/**
|
|
24
18
|
* Protocols
|
|
25
19
|
*/
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parsed YAML frontmatter. `name` and `description` are the conventional
|
|
3
|
+
* fields every consumer reads; any other key may appear, so it is `unknown`
|
|
4
|
+
* and must be narrowed before use.
|
|
5
|
+
*/
|
|
6
|
+
export interface Frontmatter {
|
|
7
|
+
name?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Parse YAML frontmatter from markdown/mdx content. Light dependency (yaml only)
|
|
13
|
+
* so it can be imported without pulling the heavy MDX/bun-plugin stack.
|
|
14
|
+
* Returns object with parsed frontmatter data and remaining content
|
|
15
|
+
* Handles both Unix (\n) and Windows (\r\n) line endings
|
|
16
|
+
*/
|
|
17
|
+
export declare function parseFrontmatter(content: string): Frontmatter;
|
package/dist/types/util_mdx.d.ts
CHANGED
|
@@ -1,21 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
/**
|
|
3
|
-
* Parsed YAML frontmatter. `name` and `description` are the conventional
|
|
4
|
-
* fields every consumer reads; any other key may appear, so it is `unknown`
|
|
5
|
-
* and must be narrowed before use.
|
|
6
|
-
*/
|
|
7
|
-
export interface Frontmatter {
|
|
8
|
-
name?: string;
|
|
9
|
-
description?: string;
|
|
10
|
-
[key: string]: unknown;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Parse YAML frontmatter from markdown/mdx content
|
|
14
|
-
* Returns object with parsed frontmatter data and remaining content
|
|
15
|
-
* Handles both Unix (\n) and Windows (\r\n) line endings
|
|
16
|
-
*/
|
|
17
|
-
export declare function parseFrontmatter(content: string): Frontmatter;
|
|
18
2
|
export declare const readMdx: (Component: React.ReactElement) => string;
|
|
19
3
|
export declare const importMdx: (filePath: string) => Promise<any>;
|
|
20
4
|
export declare const getDirName: () => string;
|
|
21
5
|
export declare const importAbsoluteMdx: (absoluteFilePath: string) => Promise<any>;
|
|
6
|
+
export { parseFrontmatter, type Frontmatter } from "./util_frontmatter.js";
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.9.
|
|
2
|
+
"version": "2.9.3",
|
|
3
3
|
"name": "@modality-counter/core",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
@@ -46,6 +46,11 @@
|
|
|
46
46
|
"types": "./dist/types/testing.d.ts",
|
|
47
47
|
"require": "./dist/testing.js",
|
|
48
48
|
"import": "./dist/testing.js"
|
|
49
|
+
},
|
|
50
|
+
"./mdx": {
|
|
51
|
+
"types": "./dist/types/mdx.d.ts",
|
|
52
|
+
"require": "./dist/mdx.js",
|
|
53
|
+
"import": "./dist/mdx.js"
|
|
49
54
|
}
|
|
50
55
|
},
|
|
51
56
|
"types": "./dist/types/index.d.ts",
|