md-pipe 0.5.5 → 0.6.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.
- package/cli-contract.yaml +10 -0
- package/dist/md-pipe.bundle.mjs +1120 -0
- package/dist/md-pipe.bundle.mjs.map +7 -0
- package/docs/cli-reference.md +2 -0
- package/package.json +14 -10
- package/dist/cli.d.ts +0 -2
- package/dist/cli.js.map +0 -1
- package/dist/commands/init.d.ts +0 -6
- package/dist/commands/init.js +0 -28
- package/dist/commands/init.js.map +0 -1
- package/dist/config.d.ts +0 -19
- package/dist/config.js +0 -176
- package/dist/config.js.map +0 -1
- package/dist/generated/commands.d.ts +0 -7
- package/dist/generated/commands.js +0 -67
- package/dist/generated/commands.js.map +0 -1
- package/dist/generated/index.d.ts +0 -6
- package/dist/generated/index.js +0 -7
- package/dist/generated/index.js.map +0 -1
- package/dist/generated/policy-runtime.d.ts +0 -113
- package/dist/generated/policy-runtime.js +0 -195
- package/dist/generated/policy-runtime.js.map +0 -1
- package/dist/generated/policy.d.ts +0 -116
- package/dist/generated/policy.js +0 -165
- package/dist/generated/policy.js.map +0 -1
- package/dist/generated/program.d.ts +0 -21
- package/dist/generated/program.js +0 -54
- package/dist/generated/program.js.map +0 -1
- package/dist/generated/schemas.d.ts +0 -26
- package/dist/generated/schemas.js +0 -30
- package/dist/generated/schemas.js.map +0 -1
- package/dist/generated/types.d.ts +0 -67
- package/dist/generated/types.js +0 -3
- package/dist/generated/types.js.map +0 -1
- package/dist/pipeline/html.d.ts +0 -2
- package/dist/pipeline/html.js +0 -91
- package/dist/pipeline/html.js.map +0 -1
- package/dist/pipeline/index.d.ts +0 -2
- package/dist/pipeline/index.js +0 -48
- package/dist/pipeline/index.js.map +0 -1
- package/dist/pipeline/pdf.d.ts +0 -2
- package/dist/pipeline/pdf.js +0 -87
- package/dist/pipeline/pdf.js.map +0 -1
- package/dist/pipeline/preprocess.d.ts +0 -2
- package/dist/pipeline/preprocess.js +0 -134
- package/dist/pipeline/preprocess.js.map +0 -1
- package/dist/pipeline/render.d.ts +0 -1
- package/dist/pipeline/render.js +0 -5
- package/dist/pipeline/render.js.map +0 -1
- package/dist/pipeline/transform.d.ts +0 -2
- package/dist/pipeline/transform.js +0 -75
- package/dist/pipeline/transform.js.map +0 -1
- package/dist/types.d.ts +0 -104
- package/dist/types.js +0 -8
- package/dist/types.js.map +0 -1
package/dist/types.d.ts
DELETED
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
import type { CheerioAPI, Cheerio } from "cheerio";
|
|
2
|
-
import type { AnyNode } from "domhandler";
|
|
3
|
-
export interface ProjectConfig {
|
|
4
|
-
theme?: string;
|
|
5
|
-
themes?: Record<string, ThemeConfig>;
|
|
6
|
-
directives?: Record<string, string>;
|
|
7
|
-
transforms?: string[];
|
|
8
|
-
pipeline?: string;
|
|
9
|
-
output?: string;
|
|
10
|
-
strictDirectives?: boolean;
|
|
11
|
-
pdf?: PdfConfig;
|
|
12
|
-
template?: string;
|
|
13
|
-
styles?: string[];
|
|
14
|
-
scripts?: string[];
|
|
15
|
-
}
|
|
16
|
-
export interface ThemeConfig {
|
|
17
|
-
template?: string;
|
|
18
|
-
styles?: string[];
|
|
19
|
-
scripts?: string[];
|
|
20
|
-
}
|
|
21
|
-
export interface PdfConfig {
|
|
22
|
-
paper?: {
|
|
23
|
-
size?: string;
|
|
24
|
-
margin?: string | Record<string, string>;
|
|
25
|
-
printBackground?: boolean;
|
|
26
|
-
};
|
|
27
|
-
displayHeaderFooter?: boolean;
|
|
28
|
-
scale?: number;
|
|
29
|
-
}
|
|
30
|
-
export interface Frontmatter {
|
|
31
|
-
title?: string;
|
|
32
|
-
theme?: string;
|
|
33
|
-
pipeline?: string;
|
|
34
|
-
output?: string;
|
|
35
|
-
template?: string;
|
|
36
|
-
styles?: string[];
|
|
37
|
-
scripts?: string[];
|
|
38
|
-
directives?: Record<string, string>;
|
|
39
|
-
outputs?: FrontmatterOutput[];
|
|
40
|
-
header?: string;
|
|
41
|
-
landscape?: boolean;
|
|
42
|
-
viewport?: string;
|
|
43
|
-
pdf?: PdfConfig;
|
|
44
|
-
css?: string;
|
|
45
|
-
paper?: {
|
|
46
|
-
size?: string;
|
|
47
|
-
margin?: string | Record<string, string>;
|
|
48
|
-
orientation?: string;
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
export interface FrontmatterOutput {
|
|
52
|
-
pipeline: string;
|
|
53
|
-
output: string;
|
|
54
|
-
pdf?: PdfConfig;
|
|
55
|
-
}
|
|
56
|
-
export interface ResolvedConfig {
|
|
57
|
-
theme?: string;
|
|
58
|
-
template?: string;
|
|
59
|
-
title?: string;
|
|
60
|
-
styles: string[];
|
|
61
|
-
scripts: string[];
|
|
62
|
-
directives: Record<string, DirectiveDef>;
|
|
63
|
-
transforms: Map<string, TransformFn>;
|
|
64
|
-
pipeline: {
|
|
65
|
-
start: string;
|
|
66
|
-
end: string;
|
|
67
|
-
};
|
|
68
|
-
output?: string;
|
|
69
|
-
strict: boolean;
|
|
70
|
-
verbose: boolean;
|
|
71
|
-
pdf: {
|
|
72
|
-
paperSize: string;
|
|
73
|
-
landscape: boolean;
|
|
74
|
-
header?: string;
|
|
75
|
-
margin?: string;
|
|
76
|
-
scale?: number;
|
|
77
|
-
viewport?: {
|
|
78
|
-
width: number;
|
|
79
|
-
height: number;
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
inputDir?: string;
|
|
83
|
-
}
|
|
84
|
-
export interface DirectiveDef {
|
|
85
|
-
element: string;
|
|
86
|
-
classes: string[];
|
|
87
|
-
id?: string;
|
|
88
|
-
attrs: Record<string, string>;
|
|
89
|
-
transformNames: string[];
|
|
90
|
-
}
|
|
91
|
-
export type TransformFn = (context: TransformContext) => void | Promise<void>;
|
|
92
|
-
export interface TransformContext {
|
|
93
|
-
$: CheerioAPI;
|
|
94
|
-
el: AnyNode;
|
|
95
|
-
config: ResolvedConfig;
|
|
96
|
-
helpers: TransformHelpers;
|
|
97
|
-
}
|
|
98
|
-
export interface TransformHelpers {
|
|
99
|
-
tableToObjects: (table: Cheerio<AnyNode>) => Record<string, string>[];
|
|
100
|
-
escapeHtml: (value: string) => string;
|
|
101
|
-
}
|
|
102
|
-
export type TransformModule = Record<string, TransformFn>;
|
|
103
|
-
export type StageName = "preprocess" | "render" | "transform" | "html" | "pdf";
|
|
104
|
-
export declare const STAGE_ORDER: StageName[];
|
package/dist/types.js
DELETED
package/dist/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AA8GA,MAAM,CAAC,MAAM,WAAW,GAAgB;IACtC,YAAY;IACZ,QAAQ;IACR,WAAW;IACX,MAAM;IACN,KAAK;CACN,CAAC"}
|