@batijs/core 0.0.153 → 0.0.155

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.d.ts CHANGED
@@ -21,6 +21,35 @@ declare function transformAndFormat(code: string, meta: VikeMeta, options: {
21
21
  filepath: string;
22
22
  }): string | Promise<string>;
23
23
 
24
+ declare function h1(text: string): string;
25
+ declare function h2(text: string): string;
26
+ declare function h3(text: string): string;
27
+ declare function bold(text: string): string;
28
+ declare function italic(text: string): string;
29
+ declare function link(href: string, text?: string): string;
30
+ declare function tick(text: string): string;
31
+ declare function code(text: string, lang?: string): string;
32
+ declare function parseReadme(text: string | undefined): Readme;
33
+ declare class Readme {
34
+ private contents;
35
+ constructor(contents: string[]);
36
+ addIntro(content: string): void;
37
+ addTodo(content: string): void;
38
+ addAbout(content: string): void;
39
+ finalize(): string;
40
+ }
41
+ declare const markdown: {
42
+ h1: typeof h1;
43
+ h2: typeof h2;
44
+ h3: typeof h3;
45
+ link: typeof link;
46
+ tick: typeof tick;
47
+ code: typeof code;
48
+ bold: typeof bold;
49
+ italic: typeof italic;
50
+ };
51
+
52
+ declare function loadReadme({ readfile }: TransformerProps): Promise<Readme>;
24
53
  declare function loadAsJson({ readfile, source, target }: TransformerProps): Promise<any>;
25
54
  declare function loadAsMagicast<Exports extends object>({ readfile, source, target, }: TransformerProps): Promise<ProxifiedModule<Exports>>;
26
55
  declare function loadRelativeFileAsMagicast<Exports extends object>(relativePath: string, meta: Pick<ImportMeta, "url">): Promise<ProxifiedModule<Exports>>;
@@ -58,4 +87,4 @@ declare function appendToEnv(envContent: string | undefined | null, key: string,
58
87
 
59
88
  declare function withIcon(icon: string, iconColor?: Color, indentLevel?: number): (str: string) => string;
60
89
 
61
- export { type ContentGetter, type PackageJsonDeps, type PackageJsonScriptOption, type PackageJsonScriptOptions, type PackageJsonScripts, type Transformer, type TransformerProps, type VikeMeta, addDependency, appendToEnv, loadAsJson, loadAsMagicast, loadRelativeFileAsMagicast, setScripts, transformAndFormat, withIcon };
90
+ export { type ContentGetter, type PackageJsonDeps, type PackageJsonScriptOption, type PackageJsonScriptOptions, type PackageJsonScripts, Readme, type Transformer, type TransformerProps, type VikeMeta, addDependency, appendToEnv, loadAsJson, loadAsMagicast, loadReadme, loadRelativeFileAsMagicast, markdown, parseReadme, setScripts, transformAndFormat, withIcon };