md-pipe 0.5.6 → 0.6.1

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