pruff-skills 0.5.4 → 0.5.6

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.
@@ -1,5 +1,5 @@
1
1
  import { __toESM } from "../../rolldown-runtime.mjs";
2
- import { LD, RD, SD, _D, dD, fD, require_picocolors, require_src } from "./core.mjs";
2
+ import { LD, MD, RD, SD, _D, dD, fD, require_picocolors, require_src } from "./core.mjs";
3
3
  import { stripVTControlCharacters } from "node:util";
4
4
  import y from "node:process";
5
5
  var import_picocolors = /* @__PURE__ */ __toESM(require_picocolors(), 1);
@@ -7,7 +7,7 @@ var import_src = require_src();
7
7
  function ce() {
8
8
  return y.platform !== "win32" ? y.env.TERM !== "linux" : !!y.env.CI || !!y.env.WT_SESSION || !!y.env.TERMINUS_SUBLIME || y.env.ConEmuTask === "{cmd::Cmder}" || y.env.TERM_PROGRAM === "Terminus-Sublime" || y.env.TERM_PROGRAM === "vscode" || y.env.TERM === "xterm-256color" || y.env.TERM === "alacritty" || y.env.TERMINAL_EMULATOR === "JetBrains-JediTerm";
9
9
  }
10
- const V = ce(), u = (t, n) => V ? t : n, le = u("◆", "*"), L = u("■", "x"), W = u("▲", "x"), C = u("◇", "o"), ue = u("┌", "T"), o = u("│", "|"), d = u("└", "—"), k = u("●", ">"), P = u("○", " "), A = u("◻", "[•]"), T = u("◼", "[+]"), F = u("◻", "[ ]"), _ = u("─", "-"), me = u("╮", "+"), de = u("├", "+"), pe = u("╯", "+"), q = u("●", "•"), D = u("◆", "*"), U = u("▲", "!"), K = u("■", "x"), b = (t) => {
10
+ const V = ce(), u = (t, n) => V ? t : n, le = u("◆", "*"), L = u("■", "x"), W = u("▲", "x"), C = u("◇", "o"), ue = u("┌", "T"), o = u("│", "|"), d = u("└", "—"), k = u("●", ">"), P = u("○", " "), A = u("◻", "[•]"), T = u("◼", "[+]"), F = u("◻", "[ ]"), $e = u("▪", "•"), _ = u("─", "-"), me = u("╮", "+"), de = u("├", "+"), pe = u("╯", "+"), q = u("●", "•"), D = u("◆", "*"), U = u("▲", "!"), K = u("■", "x"), b = (t) => {
11
11
  switch (t) {
12
12
  case "initial":
13
13
  case "active": return import_picocolors.default.cyan(le);
@@ -43,6 +43,26 @@ ${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(this.
43
43
  ${import_picocolors.default.gray(o)}` : ""}`;
44
44
  default: return `${n}${import_picocolors.default.cyan(o)} ${i}
45
45
  ${import_picocolors.default.cyan(d)}
46
+ `;
47
+ }
48
+ }
49
+ }).prompt(), ge = (t) => new MD({
50
+ validate: t.validate,
51
+ mask: t.mask ?? $e,
52
+ render() {
53
+ const n = `${import_picocolors.default.gray(o)}
54
+ ${b(this.state)} ${t.message}
55
+ `, r = this.valueWithCursor, i = this.masked;
56
+ switch (this.state) {
57
+ case "error": return `${n.trim()}
58
+ ${import_picocolors.default.yellow(o)} ${i}
59
+ ${import_picocolors.default.yellow(d)} ${import_picocolors.default.yellow(this.error)}
60
+ `;
61
+ case "submit": return `${n}${import_picocolors.default.gray(o)} ${import_picocolors.default.dim(i)}`;
62
+ case "cancel": return `${n}${import_picocolors.default.gray(o)} ${import_picocolors.default.strikethrough(import_picocolors.default.dim(i ?? ""))}${i ? `
63
+ ${import_picocolors.default.gray(o)}` : ""}`;
64
+ default: return `${n}${import_picocolors.default.cyan(o)} ${r}
65
+ ${import_picocolors.default.cyan(d)}
46
66
  `;
47
67
  }
48
68
  }
@@ -351,4 +371,4 @@ ${J}${i.trimStart()}`), r = 3 + stripVTControlCharacters(i.trimStart()).length);
351
371
  }
352
372
  };
353
373
  };
354
- export { Ie, M, Me, Se, Y, be, fe, he, ve, xe, ye };
374
+ export { Ie, M, Me, Se, Y, be, fe, ge, he, ve, xe, ye };