@hypercli/ui 0.2.3 → 0.4.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/dist/colors.d.ts +32 -0
- package/dist/colors.d.ts.map +1 -0
- package/dist/colors.js +40 -0
- package/dist/colors.js.map +1 -0
- package/dist/md.d.ts +12 -0
- package/dist/md.d.ts.map +1 -0
- package/dist/md.js +19 -0
- package/dist/md.js.map +1 -0
- package/dist/messages.d.ts +20 -0
- package/dist/messages.d.ts.map +1 -0
- package/dist/messages.js +65 -0
- package/dist/messages.js.map +1 -0
- package/dist/palette.d.ts +20 -0
- package/dist/palette.d.ts.map +1 -0
- package/dist/palette.js +22 -0
- package/dist/palette.js.map +1 -0
- package/dist/styles.d.ts +43 -0
- package/dist/styles.d.ts.map +1 -0
- package/dist/styles.js +44 -0
- package/dist/styles.js.map +1 -0
- package/dist/symbols.d.ts +19 -0
- package/dist/symbols.d.ts.map +1 -0
- package/dist/symbols.js +21 -0
- package/dist/symbols.js.map +1 -0
- package/dist/theme.d.ts +9 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +53 -0
- package/dist/theme.js.map +1 -0
- package/dist/tokens.d.ts +26 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +30 -0
- package/dist/tokens.js.map +1 -0
- package/dist/types.d.ts +38 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +11 -0
- package/dist/types.js.map +1 -0
- package/package.json +1 -1
package/dist/colors.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color functions — the `c` object.
|
|
3
|
+
*
|
|
4
|
+
* Each function wraps chalk to apply a semantic color.
|
|
5
|
+
* Merged from gen/lib/colors.ts + core/ui/styles.ts.
|
|
6
|
+
*/
|
|
7
|
+
export declare const c: {
|
|
8
|
+
success: (text: string) => string;
|
|
9
|
+
error: (text: string) => string;
|
|
10
|
+
warning: (text: string) => string;
|
|
11
|
+
info: (text: string) => string;
|
|
12
|
+
muted: (text: string) => string;
|
|
13
|
+
command: (text: string) => string;
|
|
14
|
+
danger: (text: string) => string;
|
|
15
|
+
highlight: (text: string) => string;
|
|
16
|
+
dim: (text: string) => string;
|
|
17
|
+
bold: (text: string) => string;
|
|
18
|
+
subtle: (text: string) => string;
|
|
19
|
+
text: (text: string) => string;
|
|
20
|
+
kit: (text: string) => string;
|
|
21
|
+
recipe: (text: string) => string;
|
|
22
|
+
cookbook: (text: string) => string;
|
|
23
|
+
helper: (text: string) => string;
|
|
24
|
+
property: (text: string) => string;
|
|
25
|
+
required: (text: string) => string;
|
|
26
|
+
default: (value: any) => string;
|
|
27
|
+
enum: (text: string) => string;
|
|
28
|
+
title: (text: string) => string;
|
|
29
|
+
heading: (text: string) => string;
|
|
30
|
+
version: (text: string) => string;
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,eAAO,MAAM,CAAC;oBAEG,MAAM;kBACR,MAAM;oBACJ,MAAM;iBACT,MAAM;kBACL,MAAM;oBAGJ,MAAM;mBACP,MAAM;sBAGH,MAAM;gBACZ,MAAM;iBACL,MAAM;mBACJ,MAAM;iBACR,MAAM;gBAGP,MAAM;mBACH,MAAM;qBACJ,MAAM;mBACR,MAAM;qBAGJ,MAAM;qBACN,MAAM;qBACN,GAAG;iBACP,MAAM;kBAGL,MAAM;oBACJ,MAAM;oBACN,MAAM;CACtB,CAAC"}
|
package/dist/colors.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Color functions — the `c` object.
|
|
3
|
+
*
|
|
4
|
+
* Each function wraps chalk to apply a semantic color.
|
|
5
|
+
* Merged from gen/lib/colors.ts + core/ui/styles.ts.
|
|
6
|
+
*/
|
|
7
|
+
import chalk from "chalk";
|
|
8
|
+
import { palette } from "./palette.js";
|
|
9
|
+
export const c = {
|
|
10
|
+
// Status colors
|
|
11
|
+
success: (text) => chalk.green(text),
|
|
12
|
+
error: (text) => chalk.red(text),
|
|
13
|
+
warning: (text) => chalk.yellow(text),
|
|
14
|
+
info: (text) => chalk.blue(text),
|
|
15
|
+
muted: (text) => chalk.gray(text),
|
|
16
|
+
// From core/ui/styles — hex-based
|
|
17
|
+
command: (text) => chalk.hex(palette.brand)(text),
|
|
18
|
+
danger: (text) => chalk.hex(palette.danger)(text),
|
|
19
|
+
// Formatting helpers
|
|
20
|
+
highlight: (text) => chalk.cyan(text),
|
|
21
|
+
dim: (text) => chalk.dim(text),
|
|
22
|
+
bold: (text) => chalk.bold(text),
|
|
23
|
+
subtle: (text) => chalk.gray(text),
|
|
24
|
+
text: (text) => text,
|
|
25
|
+
// CLI entity colors
|
|
26
|
+
kit: (text) => chalk.magenta(text),
|
|
27
|
+
recipe: (text) => chalk.cyan.bold(text),
|
|
28
|
+
cookbook: (text) => chalk.magenta.bold(text),
|
|
29
|
+
helper: (text) => chalk.yellow(text),
|
|
30
|
+
// Code/data colors
|
|
31
|
+
property: (text) => chalk.cyan(text),
|
|
32
|
+
required: (text) => chalk.red.bold(text),
|
|
33
|
+
default: (value) => chalk.gray(` (default: ${JSON.stringify(value)})`),
|
|
34
|
+
enum: (text) => chalk.yellow(text),
|
|
35
|
+
// Headings & labels
|
|
36
|
+
title: (text) => chalk.bold.cyan(text),
|
|
37
|
+
heading: (text) => chalk.bold.yellow(text),
|
|
38
|
+
version: (text) => chalk.gray(text),
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=colors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.js","sourceRoot":"","sources":["../src/colors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,cA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CAAC;IAC1C,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;IAC/C,QAAQ,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC;IACpD,MAAM,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;IAE5C,mBAAmB;IACnB,QAAQ,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;IAC5C,QAAQ,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC;IAChD,OAAO,EAAE,CAAC,KAAU,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC;IAC3E,IAAI,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC;IAE1C,oBAAoB;IACpB,KAAK,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;IAC9C,OAAO,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IAClD,OAAO,EAAE,CAAC,IAAY,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC;CAC3C,CAAC"}
|
package/dist/md.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline markdown processor for CLI strings.
|
|
3
|
+
*
|
|
4
|
+
* Transforms a subset of markdown into chalk-styled terminal output:
|
|
5
|
+
* - `code` → command color (palette.brand)
|
|
6
|
+
* - **bold** → chalk.bold
|
|
7
|
+
* - *dim* → chalk.dim
|
|
8
|
+
*
|
|
9
|
+
* Opt-in only — not auto-applied to other functions.
|
|
10
|
+
*/
|
|
11
|
+
export declare function md(text: string): string;
|
|
12
|
+
//# sourceMappingURL=md.d.ts.map
|
package/dist/md.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"md.d.ts","sourceRoot":"","sources":["../src/md.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,wBAAgB,EAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAKvC"}
|
package/dist/md.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inline markdown processor for CLI strings.
|
|
3
|
+
*
|
|
4
|
+
* Transforms a subset of markdown into chalk-styled terminal output:
|
|
5
|
+
* - `code` → command color (palette.brand)
|
|
6
|
+
* - **bold** → chalk.bold
|
|
7
|
+
* - *dim* → chalk.dim
|
|
8
|
+
*
|
|
9
|
+
* Opt-in only — not auto-applied to other functions.
|
|
10
|
+
*/
|
|
11
|
+
import chalk from "chalk";
|
|
12
|
+
import { palette } from "./palette.js";
|
|
13
|
+
export function md(text) {
|
|
14
|
+
return text
|
|
15
|
+
.replace(/`([^`]+)`/g, (_, code) => chalk.hex(palette.brand)(code))
|
|
16
|
+
.replace(/\*\*([^*]+)\*\*/g, (_, bold) => chalk.bold(bold))
|
|
17
|
+
.replace(/(?<!\*)\*([^*]+)\*(?!\*)/g, (_, dim) => chalk.dim(dim));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=md.js.map
|
package/dist/md.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"md.js","sourceRoot":"","sources":["../src/md.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,UAAU,EAAE,CAAC,IAAY;IAC9B,OAAO,IAAI;SACT,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,CAAC;SAClE,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;SAC1D,OAAO,CAAC,2BAA2B,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured message blocks — the `msg` namespace.
|
|
3
|
+
*
|
|
4
|
+
* Produces formatted multi-line messages with icons, bars, and indentation.
|
|
5
|
+
* Supports both props objects and simple string shorthand.
|
|
6
|
+
*/
|
|
7
|
+
interface MessageProps {
|
|
8
|
+
title?: string;
|
|
9
|
+
summary: string;
|
|
10
|
+
body?: string | string[];
|
|
11
|
+
}
|
|
12
|
+
export declare const msg: {
|
|
13
|
+
error: (input: string | MessageProps) => string;
|
|
14
|
+
warning: (input: string | MessageProps) => string;
|
|
15
|
+
success: (input: string | MessageProps) => string;
|
|
16
|
+
info: (input: string | MessageProps) => string;
|
|
17
|
+
tip: (input: string | MessageProps) => string;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAeH,UAAU,YAAY;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;CACzB;AAwDD,eAAO,MAAM,GAAG;mBANA,MAAM,GAAG,YAAY,KAAG,MAAM;qBAA9B,MAAM,GAAG,YAAY,KAAG,MAAM;qBAA9B,MAAM,GAAG,YAAY,KAAG,MAAM;kBAA9B,MAAM,GAAG,YAAY,KAAG,MAAM;iBAA9B,MAAM,GAAG,YAAY,KAAG,MAAM;CAY7C,CAAC"}
|
package/dist/messages.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Structured message blocks — the `msg` namespace.
|
|
3
|
+
*
|
|
4
|
+
* Produces formatted multi-line messages with icons, bars, and indentation.
|
|
5
|
+
* Supports both props objects and simple string shorthand.
|
|
6
|
+
*/
|
|
7
|
+
import chalk from "chalk";
|
|
8
|
+
import { md } from "./md.js";
|
|
9
|
+
import { symbols } from "./symbols.js";
|
|
10
|
+
import { tokens } from "./tokens.js";
|
|
11
|
+
const INDENT = " ";
|
|
12
|
+
const ICON_GAP = " ";
|
|
13
|
+
const types = {
|
|
14
|
+
error: { prefix: "Error:", icon: symbols.error, color: chalk.red },
|
|
15
|
+
warning: { prefix: "Warning:", icon: symbols.warning, color: chalk.yellow },
|
|
16
|
+
success: { prefix: "Success:", icon: symbols.success, color: chalk.green },
|
|
17
|
+
info: { prefix: "Info:", icon: symbols.info, color: chalk.blue },
|
|
18
|
+
tip: { prefix: "Tip:", icon: symbols.tip, color: chalk.hex(tokens.tip) },
|
|
19
|
+
};
|
|
20
|
+
function formatMessage(type, props) {
|
|
21
|
+
const { prefix, icon, color } = types[type];
|
|
22
|
+
const { title, summary, body } = props;
|
|
23
|
+
const lines = [];
|
|
24
|
+
// Don't add leading indent for tip messages
|
|
25
|
+
const leadingIndent = type === "tip" ? "" : INDENT;
|
|
26
|
+
const contentIndent = type === "tip" ? INDENT : `${INDENT}${INDENT}`;
|
|
27
|
+
const styledSummary = md(summary);
|
|
28
|
+
if (!title) {
|
|
29
|
+
// summary-only: just icon + summary
|
|
30
|
+
lines.push(`${leadingIndent}${color(icon)}${ICON_GAP}${styledSummary}`);
|
|
31
|
+
}
|
|
32
|
+
else if (!body) {
|
|
33
|
+
// title + summary
|
|
34
|
+
lines.push(`${leadingIndent}${color(prefix)} ${title}`);
|
|
35
|
+
lines.push("");
|
|
36
|
+
lines.push(`${contentIndent}${color(icon)}${ICON_GAP}${styledSummary}`);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
// title + summary + body
|
|
40
|
+
const bodyLines = Array.isArray(body) ? body : body.split("\n");
|
|
41
|
+
lines.push(`${leadingIndent}${color(prefix)} ${title}`);
|
|
42
|
+
lines.push("");
|
|
43
|
+
lines.push(`${contentIndent}${color(icon)}${ICON_GAP}${styledSummary}`);
|
|
44
|
+
lines.push(`${contentIndent}${color(symbols.bar)}`);
|
|
45
|
+
for (const bodyLine of bodyLines) {
|
|
46
|
+
lines.push(`${contentIndent}${color(symbols.bar)}${ICON_GAP}${chalk.dim(bodyLine)}`);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
lines.push("");
|
|
50
|
+
return lines.join("\n");
|
|
51
|
+
}
|
|
52
|
+
function makeMessageFn(type) {
|
|
53
|
+
return (input) => {
|
|
54
|
+
const props = typeof input === "string" ? { summary: input } : input;
|
|
55
|
+
return formatMessage(type, props);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export const msg = {
|
|
59
|
+
error: makeMessageFn("error"),
|
|
60
|
+
warning: makeMessageFn("warning"),
|
|
61
|
+
success: makeMessageFn("success"),
|
|
62
|
+
info: makeMessageFn("info"),
|
|
63
|
+
tip: makeMessageFn("tip"),
|
|
64
|
+
};
|
|
65
|
+
//# sourceMappingURL=messages.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.js","sourceRoot":"","sources":["../src/messages.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAC7B,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YAClC,KAAK,CAAC,IAAI,CAAC,GAAG,aAAa,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,QAAQ,GAAG,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;QACtF,CAAC;IACF,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACf,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED,SAAS,aAAa,CAAC,IAAY;IAClC,OAAO,CAAC,KAA4B,EAAU,EAAE;QAC/C,MAAM,KAAK,GAAiB,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC;QACnF,OAAO,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,GAAG,GAAG;IAClB,KAAK,EAAE,aAAa,CAAC,OAAO,CAAC;IAC7B,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC;IACjC,OAAO,EAAE,aAAa,CAAC,SAAS,CAAC;IACjC,IAAI,EAAE,aAAa,CAAC,MAAM,CAAC;IAC3B,GAAG,EAAE,aAAa,CAAC,KAAK,CAAC;CACzB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Raw color values — single source of truth for the HyperDev CLI palette.
|
|
3
|
+
*
|
|
4
|
+
* All hex values and terminal color names live here.
|
|
5
|
+
* No chalk imports, no logic — just constants.
|
|
6
|
+
*/
|
|
7
|
+
export declare const palette: {
|
|
8
|
+
readonly brand: "#4EC9B0";
|
|
9
|
+
readonly danger: "#F67280";
|
|
10
|
+
readonly tipBlue: "#7FB3D5";
|
|
11
|
+
readonly red: "red";
|
|
12
|
+
readonly green: "green";
|
|
13
|
+
readonly yellow: "yellow";
|
|
14
|
+
readonly blue: "blue";
|
|
15
|
+
readonly magenta: "magenta";
|
|
16
|
+
readonly cyan: "cyan";
|
|
17
|
+
readonly gray: "gray";
|
|
18
|
+
readonly white: "white";
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=palette.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"palette.d.ts","sourceRoot":"","sources":["../src/palette.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,eAAO,MAAM,OAAO;;;;;;;;;;;;CAeV,CAAC"}
|
package/dist/palette.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Raw color values — single source of truth for the HyperDev CLI palette.
|
|
3
|
+
*
|
|
4
|
+
* All hex values and terminal color names live here.
|
|
5
|
+
* No chalk imports, no logic — just constants.
|
|
6
|
+
*/
|
|
7
|
+
export const palette = {
|
|
8
|
+
// Brand colors (hex)
|
|
9
|
+
brand: "#4EC9B0", // teal — commands, code
|
|
10
|
+
danger: "#F67280", // coral — destructive actions
|
|
11
|
+
tipBlue: "#7FB3D5", // pastel blue — tips
|
|
12
|
+
// Terminal builtins (named for chalk compatibility)
|
|
13
|
+
red: "red",
|
|
14
|
+
green: "green",
|
|
15
|
+
yellow: "yellow",
|
|
16
|
+
blue: "blue",
|
|
17
|
+
magenta: "magenta",
|
|
18
|
+
cyan: "cyan",
|
|
19
|
+
gray: "gray",
|
|
20
|
+
white: "white",
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=palette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"palette.js","sourceRoot":"","sources":["../src/palette.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG;IACtB,qBAAqB;IACrB,KAAK,EAAE,SAAS,EAAE,wBAAwB;IAC1C,MAAM,EAAE,SAAS,EAAE,8BAA8B;IACjD,OAAO,EAAE,SAAS,EAAE,qBAAqB;IAEzC,oDAAoD;IACpD,GAAG,EAAE,KAAK;IACV,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,SAAS;IAClB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;CACL,CAAC"}
|
package/dist/styles.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composite style formatters — the `s` object.
|
|
3
|
+
*
|
|
4
|
+
* These produce multi-element styled strings (icon + text, key: value, etc.).
|
|
5
|
+
* Merged from gen/lib/styles.ts + core/ui/styles.ts.
|
|
6
|
+
*/
|
|
7
|
+
import { md } from "./md.js";
|
|
8
|
+
export declare const s: {
|
|
9
|
+
/** Dim hint text */
|
|
10
|
+
hint: (text: string) => string;
|
|
11
|
+
/** Status messages with icons */
|
|
12
|
+
success: (text: string) => string;
|
|
13
|
+
error: (text: string) => string;
|
|
14
|
+
warning: (text: string) => string;
|
|
15
|
+
info: (text: string) => string;
|
|
16
|
+
/** Bold section heading */
|
|
17
|
+
section: (text: string) => string;
|
|
18
|
+
/** Inline code (gray backticks) */
|
|
19
|
+
code: (text: string) => string;
|
|
20
|
+
/** Emphasized text */
|
|
21
|
+
highlight: (text: string) => string;
|
|
22
|
+
/** "Prefix: text" title */
|
|
23
|
+
title: (prefix: string, text: string) => string;
|
|
24
|
+
/** Horizontal rule */
|
|
25
|
+
hr: () => string;
|
|
26
|
+
/** "key: value" with optional indent */
|
|
27
|
+
keyValue: (key: string, value: string, indent?: number) => string;
|
|
28
|
+
/** Section header with optional count */
|
|
29
|
+
header: (text: string, count?: number) => string;
|
|
30
|
+
/** Dim description with optional indent */
|
|
31
|
+
description: (text: string, indent?: number) => string;
|
|
32
|
+
/** Bulleted list item */
|
|
33
|
+
listItem: (text: string) => string;
|
|
34
|
+
/** Indent text by N spaces */
|
|
35
|
+
indent: (text: string, spaces: number) => string;
|
|
36
|
+
/** Dim file path */
|
|
37
|
+
path: (text: string) => string;
|
|
38
|
+
/** Dim version string */
|
|
39
|
+
version: (text: string) => string;
|
|
40
|
+
/** Inline markdown → styled terminal text */
|
|
41
|
+
md: typeof md;
|
|
42
|
+
};
|
|
43
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,EAAE,EAAE,MAAM,SAAS,CAAC;AAE7B,eAAO,MAAM,CAAC;IACb,oBAAoB;iBACP,MAAM;IAEnB,iCAAiC;oBACjB,MAAM;kBACR,MAAM;oBACJ,MAAM;iBACT,MAAM;IAEnB,2BAA2B;oBACX,MAAM;IAEtB,mCAAmC;iBACtB,MAAM;IAEnB,sBAAsB;sBACJ,MAAM;IAExB,2BAA2B;oBACX,MAAM,QAAQ,MAAM;IAEpC,sBAAsB;;IAGtB,wCAAwC;oBACxB,MAAM,SAAS,MAAM;IAGrC,yCAAyC;mBAC1B,MAAM,UAAU,MAAM;IAGrC,2CAA2C;wBACvB,MAAM;IAE1B,yBAAyB;qBACR,MAAM;IAEvB,8BAA8B;mBACf,MAAM,UAAU,MAAM;IAErC,oBAAoB;iBACP,MAAM;IAEnB,yBAAyB;oBACT,MAAM;IAEtB,6CAA6C;;CAE7C,CAAC"}
|
package/dist/styles.js
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Composite style formatters — the `s` object.
|
|
3
|
+
*
|
|
4
|
+
* These produce multi-element styled strings (icon + text, key: value, etc.).
|
|
5
|
+
* Merged from gen/lib/styles.ts + core/ui/styles.ts.
|
|
6
|
+
*/
|
|
7
|
+
import chalk from "chalk";
|
|
8
|
+
import { md } from "./md.js";
|
|
9
|
+
export const s = {
|
|
10
|
+
/** Dim hint text */
|
|
11
|
+
hint: (text) => chalk.gray(text),
|
|
12
|
+
/** Status messages with icons */
|
|
13
|
+
success: (text) => chalk.green(`\u2714 ${text}`),
|
|
14
|
+
error: (text) => chalk.red(`\u2718 ${text}`),
|
|
15
|
+
warning: (text) => chalk.yellow(`\u26a0 ${text}`),
|
|
16
|
+
info: (text) => chalk.blue(`\u2139 ${text}`),
|
|
17
|
+
/** Bold section heading */
|
|
18
|
+
section: (text) => chalk.bold.cyan(text),
|
|
19
|
+
/** Inline code (gray backticks) */
|
|
20
|
+
code: (text) => chalk.gray(`\`${text}\``),
|
|
21
|
+
/** Emphasized text */
|
|
22
|
+
highlight: (text) => chalk.cyan.bold(text),
|
|
23
|
+
/** "Prefix: text" title */
|
|
24
|
+
title: (prefix, text) => chalk.bold.cyan(`${prefix}: ${text}`),
|
|
25
|
+
/** Horizontal rule */
|
|
26
|
+
hr: () => chalk.gray("\u2500".repeat(60)),
|
|
27
|
+
/** "key: value" with optional indent */
|
|
28
|
+
keyValue: (key, value, indent = 0) => `${" ".repeat(indent)}${chalk.cyan(`${key}:`)} ${value}`,
|
|
29
|
+
/** Section header with optional count */
|
|
30
|
+
header: (text, count) => chalk.bold.yellow(count !== undefined ? `${text} (${count})` : text),
|
|
31
|
+
/** Dim description with optional indent */
|
|
32
|
+
description: (text, indent = 0) => " ".repeat(indent) + chalk.gray(text),
|
|
33
|
+
/** Bulleted list item */
|
|
34
|
+
listItem: (text) => chalk.white(` \u2022 ${text}`),
|
|
35
|
+
/** Indent text by N spaces */
|
|
36
|
+
indent: (text, spaces) => " ".repeat(spaces) + text,
|
|
37
|
+
/** Dim file path */
|
|
38
|
+
path: (text) => chalk.gray(text),
|
|
39
|
+
/** Dim version string */
|
|
40
|
+
version: (text) => chalk.gray(text),
|
|
41
|
+
/** Inline markdown → styled terminal text */
|
|
42
|
+
md,
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["../src/styles.ts"],"names":[],"mappings":"AAAA;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
export declare const symbols: {
|
|
7
|
+
readonly error: "×";
|
|
8
|
+
readonly warning: "▲";
|
|
9
|
+
readonly success: "✔";
|
|
10
|
+
readonly info: "●";
|
|
11
|
+
readonly tip: "◆";
|
|
12
|
+
readonly bar: "│";
|
|
13
|
+
readonly bullet: "•";
|
|
14
|
+
readonly dash: "─";
|
|
15
|
+
readonly arrow: "▸";
|
|
16
|
+
readonly arrowFilled: "▶︎";
|
|
17
|
+
readonly arrowThin: "▹";
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=symbols.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbols.d.ts","sourceRoot":"","sources":["../src/symbols.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,OAAO;;;;;;;;;;;;CAeV,CAAC"}
|
package/dist/symbols.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unicode glyphs for CLI output.
|
|
3
|
+
*
|
|
4
|
+
* Consolidated from core/ui/symbols.ts and gen's inline usage.
|
|
5
|
+
*/
|
|
6
|
+
export const symbols = {
|
|
7
|
+
// Status indicators
|
|
8
|
+
error: "\u00d7", // ×
|
|
9
|
+
warning: "\u25b2", // ▲
|
|
10
|
+
success: "\u2714", // ✔
|
|
11
|
+
info: "\u25cf", // ●
|
|
12
|
+
tip: "\u25c6", // ◆
|
|
13
|
+
// Structural
|
|
14
|
+
bar: "\u2502", // │
|
|
15
|
+
bullet: "\u2022", // •
|
|
16
|
+
dash: "\u2500", // ─
|
|
17
|
+
arrow: "\u25b8", // ▸
|
|
18
|
+
arrowFilled: "\u25b6\ufe0e", // ▶︎
|
|
19
|
+
arrowThin: "\u25b9", // ▹
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=symbols.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"symbols.js","sourceRoot":"","sources":["../src/symbols.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG;IACtB,oBAAoB;IACpB,KAAK,EAAE,QAAQ,EAAE,IAAI;IACrB,OAAO,EAAE,QAAQ,EAAE,IAAI;IACvB,OAAO,EAAE,QAAQ,EAAE,IAAI;IACvB,IAAI,EAAE,QAAQ,EAAE,IAAI;IACpB,GAAG,EAAE,QAAQ,EAAE,IAAI;IAEnB,aAAa;IACb,GAAG,EAAE,QAAQ,EAAE,IAAI;IACnB,MAAM,EAAE,QAAQ,EAAE,IAAI;IACtB,IAAI,EAAE,QAAQ,EAAE,IAAI;IACpB,KAAK,EAAE,QAAQ,EAAE,IAAI;IACrB,WAAW,EAAE,cAAc,EAAE,KAAK;IAClC,SAAS,EAAE,QAAQ,EAAE,IAAI;CAChB,CAAC"}
|
package/dist/theme.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cli-html help theme for `hyper --help` output.
|
|
3
|
+
*
|
|
4
|
+
* Moved from cli/src/help/theme.ts.
|
|
5
|
+
* Uses palette.brand for code color to stay in sync with the design system.
|
|
6
|
+
*/
|
|
7
|
+
import type { HelpThemeConfig } from "./types.js";
|
|
8
|
+
export declare const helpTheme: HelpThemeConfig;
|
|
9
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,eAAO,MAAM,SAAS,EAAE,eA4CvB,CAAC"}
|
package/dist/theme.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cli-html help theme for `hyper --help` output.
|
|
3
|
+
*
|
|
4
|
+
* Moved from cli/src/help/theme.ts.
|
|
5
|
+
* Uses palette.brand for code color to stay in sync with the design system.
|
|
6
|
+
*/
|
|
7
|
+
import { palette } from "./palette.js";
|
|
8
|
+
export const helpTheme = {
|
|
9
|
+
lineWidth: {
|
|
10
|
+
max: 100,
|
|
11
|
+
},
|
|
12
|
+
theme: {
|
|
13
|
+
h1: {
|
|
14
|
+
color: "blue bold",
|
|
15
|
+
indicator: {
|
|
16
|
+
marker: "\u25b6\ufe0e",
|
|
17
|
+
color: "blue bold",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
h2: {
|
|
21
|
+
color: "yellow bold",
|
|
22
|
+
indicator: {
|
|
23
|
+
marker: "\u25b8",
|
|
24
|
+
color: "yellow bold",
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
h3: {
|
|
28
|
+
color: "white bold",
|
|
29
|
+
indicator: {
|
|
30
|
+
marker: "\u25b9",
|
|
31
|
+
color: "white bold",
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
code: {
|
|
35
|
+
color: `hex-${palette.brand.slice(1)}`,
|
|
36
|
+
block: {
|
|
37
|
+
color: "gray",
|
|
38
|
+
numbers: {
|
|
39
|
+
enabled: false,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
table: {
|
|
44
|
+
header: {
|
|
45
|
+
color: "white bold",
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
a: {
|
|
49
|
+
color: "cyan underline",
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=theme.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../src/theme.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAGvC,MAAM,CAAC,MAAM,SAAS,GAAoB;IACzC,SAAS,EAAE;QACV,GAAG,EAAE,GAAG;KACR;IACD,KAAK,EAAE;QACN,EAAE,EAAE;YACH,KAAK,EAAE,WAAW;YAClB,SAAS,EAAE;gBACV,MAAM,EAAE,cAAc;gBACtB,KAAK,EAAE,WAAW;aAClB;SACD;QACD,EAAE,EAAE;YACH,KAAK,EAAE,aAAa;YACpB,SAAS,EAAE;gBACV,MAAM,EAAE,QAAQ;gBAChB,KAAK,EAAE,aAAa;aACpB;SACD;QACD,EAAE,EAAE;YACH,KAAK,EAAE,YAAY;YACnB,SAAS,EAAE;gBACV,MAAM,EAAE,QAAQ;gBAChB,KAAK,EAAE,YAAY;aACnB;SACD;QACD,IAAI,EAAE;YACL,KAAK,EAAE,OAAO,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE;YACtC,KAAK,EAAE;gBACN,KAAK,EAAE,MAAM;gBACb,OAAO,EAAE;oBACR,OAAO,EAAE,KAAK;iBACd;aACD;SACD;QACD,KAAK,EAAE;YACN,MAAM,EAAE;gBACP,KAAK,EAAE,YAAY;aACnB;SACD;QACD,CAAC,EAAE;YACF,KAAK,EAAE,gBAAgB;SACvB;KACD;CACD,CAAC"}
|
package/dist/tokens.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic tokens — map UI roles to palette values.
|
|
3
|
+
*
|
|
4
|
+
* These tokens define *what* a color means in the CLI context,
|
|
5
|
+
* not *what* color it is. Change the palette, and all tokens update.
|
|
6
|
+
*/
|
|
7
|
+
export declare const tokens: {
|
|
8
|
+
readonly success: "green";
|
|
9
|
+
readonly error: "red";
|
|
10
|
+
readonly warning: "yellow";
|
|
11
|
+
readonly info: "blue";
|
|
12
|
+
readonly tip: "#7FB3D5";
|
|
13
|
+
readonly muted: "gray";
|
|
14
|
+
readonly command: "#4EC9B0";
|
|
15
|
+
readonly danger: "#F67280";
|
|
16
|
+
readonly kit: "magenta";
|
|
17
|
+
readonly recipe: "cyan";
|
|
18
|
+
readonly cookbook: "magenta";
|
|
19
|
+
readonly highlight: "cyan";
|
|
20
|
+
readonly subtle: "gray";
|
|
21
|
+
readonly title: "cyan";
|
|
22
|
+
readonly heading: "yellow";
|
|
23
|
+
readonly version: "gray";
|
|
24
|
+
readonly path: "gray";
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;CAuBT,CAAC"}
|
package/dist/tokens.js
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Semantic tokens — map UI roles to palette values.
|
|
3
|
+
*
|
|
4
|
+
* These tokens define *what* a color means in the CLI context,
|
|
5
|
+
* not *what* color it is. Change the palette, and all tokens update.
|
|
6
|
+
*/
|
|
7
|
+
import { palette } from "./palette.js";
|
|
8
|
+
export const tokens = {
|
|
9
|
+
// Status
|
|
10
|
+
success: palette.green,
|
|
11
|
+
error: palette.red,
|
|
12
|
+
warning: palette.yellow,
|
|
13
|
+
info: palette.blue,
|
|
14
|
+
tip: palette.tipBlue,
|
|
15
|
+
muted: palette.gray,
|
|
16
|
+
// CLI entities
|
|
17
|
+
command: palette.brand,
|
|
18
|
+
danger: palette.danger,
|
|
19
|
+
kit: palette.magenta,
|
|
20
|
+
recipe: palette.cyan,
|
|
21
|
+
cookbook: palette.magenta,
|
|
22
|
+
// Text roles
|
|
23
|
+
highlight: palette.cyan,
|
|
24
|
+
subtle: palette.gray,
|
|
25
|
+
title: palette.cyan,
|
|
26
|
+
heading: palette.yellow,
|
|
27
|
+
version: palette.gray,
|
|
28
|
+
path: palette.gray,
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,CAAC,MAAM,MAAM,GAAG;IACrB,SAAS;IACT,OAAO,EAAE,OAAO,CAAC,KAAK;IACtB,KAAK,EAAE,OAAO,CAAC,GAAG;IAClB,OAAO,EAAE,OAAO,CAAC,MAAM;IACvB,IAAI,EAAE,OAAO,CAAC,IAAI;IAClB,GAAG,EAAE,OAAO,CAAC,OAAO;IACpB,KAAK,EAAE,OAAO,CAAC,IAAI;IAEnB,eAAe;IACf,OAAO,EAAE,OAAO,CAAC,KAAK;IACtB,MAAM,EAAE,OAAO,CAAC,MAAM;IACtB,GAAG,EAAE,OAAO,CAAC,OAAO;IACpB,MAAM,EAAE,OAAO,CAAC,IAAI;IACpB,QAAQ,EAAE,OAAO,CAAC,OAAO;IAEzB,aAAa;IACb,SAAS,EAAE,OAAO,CAAC,IAAI;IACvB,MAAM,EAAE,OAAO,CAAC,IAAI;IACpB,KAAK,EAAE,OAAO,CAAC,IAAI;IACnB,OAAO,EAAE,OAAO,CAAC,MAAM;IACvB,OAAO,EAAE,OAAO,CAAC,IAAI;IACrB,IAAI,EAAE,OAAO,CAAC,IAAI;CACT,CAAC"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cli-html type fixes.
|
|
3
|
+
*
|
|
4
|
+
* The published types in cli-html have incorrect HeadingStyle —
|
|
5
|
+
* they use `marker?: string` but the actual config uses `indicator: { marker, color }`.
|
|
6
|
+
* This module re-exports corrected types.
|
|
7
|
+
*
|
|
8
|
+
* Moved from core/src/logger/cli-html-types.ts.
|
|
9
|
+
*/
|
|
10
|
+
import type { Config as CliHtmlConfig, Theme as CliHtmlTheme } from "cli-html";
|
|
11
|
+
export type { CliHtmlConfig, CliHtmlTheme };
|
|
12
|
+
export interface HeadingStyle {
|
|
13
|
+
color?: string;
|
|
14
|
+
indicator?: {
|
|
15
|
+
marker?: string;
|
|
16
|
+
color?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* cli-html Theme with corrected heading types.
|
|
21
|
+
*/
|
|
22
|
+
export type Theme = Omit<CliHtmlTheme, "h1" | "h2" | "h3" | "h4" | "h5" | "h6"> & {
|
|
23
|
+
h1?: string | HeadingStyle;
|
|
24
|
+
h2?: string | HeadingStyle;
|
|
25
|
+
h3?: string | HeadingStyle;
|
|
26
|
+
h4?: string | HeadingStyle;
|
|
27
|
+
h5?: string | HeadingStyle;
|
|
28
|
+
h6?: string | HeadingStyle;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* cli-html Config with corrected Theme type.
|
|
32
|
+
*/
|
|
33
|
+
export interface HelpThemeConfig {
|
|
34
|
+
theme?: Theme;
|
|
35
|
+
lineWidth?: CliHtmlConfig["lineWidth"];
|
|
36
|
+
asciiMode?: boolean;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,aAAa,EAAE,KAAK,IAAI,YAAY,EAAE,MAAM,UAAU,CAAC;AAE/E,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC;AAE5C,MAAM,WAAW,YAAY;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE;QACX,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACF;AAED;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,IAAI,CAAC,YAAY,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,GAAG;IACjF,EAAE,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC3B,EAAE,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC3B,EAAE,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC3B,EAAE,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC3B,EAAE,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;IAC3B,EAAE,CAAC,EAAE,MAAM,GAAG,YAAY,CAAC;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC;IACvC,SAAS,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* cli-html type fixes.
|
|
3
|
+
*
|
|
4
|
+
* The published types in cli-html have incorrect HeadingStyle —
|
|
5
|
+
* they use `marker?: string` but the actual config uses `indicator: { marker, color }`.
|
|
6
|
+
* This module re-exports corrected types.
|
|
7
|
+
*
|
|
8
|
+
* Moved from core/src/logger/cli-html-types.ts.
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|