MCPcopy
hub / github.com/di-sukharev/opencommit / "node_modules/@clack/prompts/dist/index.mjs"

Function "node_modules/@clack/prompts/dist/index.mjs"

out/cli.cjs:678–998  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

676var import_node_process2, import_picocolors2, import_sisteransi2, p2, u, W4, D3, F3, f2, L5, a2, o, w5, S4, _5, y4, A3, q4, R5, G5, H4, K4, U5, Z4, z4, X3, h2, J4, Y3, Q3, ee, te, re, se, b5, ie, ne, ae, ce, g3, C3, le, $e;
677var init_dist2 = __esm({
678 "node_modules/@clack/prompts/dist/index.mjs"() {
679 init_dist();
680 init_dist();
681 import_node_process2 = __toESM(require("node:process"), 1);
682 import_picocolors2 = __toESM(require_picocolors(), 1);
683 import_sisteransi2 = __toESM(require_src(), 1);
684 p2 = N4();
685 u = (r3, n2) => p2 ? r3 : n2;
686 W4 = u("\u25C6", "*");
687 D3 = u("\u25A0", "x");
688 F3 = u("\u25B2", "x");
689 f2 = u("\u25C7", "o");
690 L5 = u("\u250C", "T");
691 a2 = u("\u2502", "|");
692 o = u("\u2514", "\u2014");
693 w5 = u("\u25CF", ">");
694 S4 = u("\u25CB", " ");
695 _5 = u("\u25FB", "[\u2022]");
696 y4 = u("\u25FC", "[+]");
697 A3 = u("\u25FB", "[ ]");
698 q4 = u("\u25AA", "\u2022");
699 R5 = u("\u2500", "-");
700 G5 = u("\u256E", "+");
701 H4 = u("\u251C", "+");
702 K4 = u("\u256F", "+");
703 U5 = u("\u25CF", "\u2022");
704 Z4 = u("\u25C6", "*");
705 z4 = u("\u25B2", "!");
706 X3 = u("\u25A0", "x");
707 h2 = (r3) => {
708 switch (r3) {
709 case "initial":
710 case "active":
711 return import_picocolors2.default.cyan(W4);
712 case "cancel":
713 return import_picocolors2.default.red(D3);
714 case "error":
715 return import_picocolors2.default.yellow(F3);
716 case "submit":
717 return import_picocolors2.default.green(f2);
718 }
719 };
720 J4 = (r3) => new TD({ validate: r3.validate, placeholder: r3.placeholder, defaultValue: r3.defaultValue, initialValue: r3.initialValue, render() {
721 const n2 = `${import_picocolors2.default.gray(a2)}
722${h2(this.state)} ${r3.message}
723`, s2 = r3.placeholder ? import_picocolors2.default.inverse(r3.placeholder[0]) + import_picocolors2.default.dim(r3.placeholder.slice(1)) : import_picocolors2.default.inverse(import_picocolors2.default.hidden("_")), t2 = this.value ? this.valueWithCursor : s2;
724 switch (this.state) {
725 case "error":
726 return `${n2.trim()}
727${import_picocolors2.default.yellow(a2)} ${t2}
728${import_picocolors2.default.yellow(o)} ${import_picocolors2.default.yellow(this.error)}
729`;
730 case "submit":
731 return `${n2}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.dim(this.value || r3.placeholder)}`;
732 case "cancel":
733 return `${n2}${import_picocolors2.default.gray(a2)} ${import_picocolors2.default.strikethrough(import_picocolors2.default.dim(this.value ?? ""))}${this.value?.trim() ? `
734` + import_picocolors2.default.gray(a2) : ""}`;
735 default:

Callers

nothing calls this directly

Calls 11

__toESMFunction · 0.85
N4Function · 0.85
ueFunction · 0.85
hD2Function · 0.85
promptMethod · 0.80
maxMethod · 0.45
writeMethod · 0.45
pushMethod · 0.45
messageMethod · 0.45
keysMethod · 0.45
catchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…