tokmon 0.14.2 → 0.14.3
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/cli.js +11 -2
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -608,6 +608,7 @@ function glyphs() {
|
|
|
608
608
|
}
|
|
609
609
|
|
|
610
610
|
// src/app.tsx
|
|
611
|
+
import { spawn } from "child_process";
|
|
611
612
|
import { useState as useState3, useEffect as useEffect3, useCallback, useRef as useRef2, useMemo } from "react";
|
|
612
613
|
import { Box as Box7, Text as Text7, Transform, useInput, useStdout, useApp } from "ink";
|
|
613
614
|
import { useMouse } from "@zenobius/ink-mouse";
|
|
@@ -3900,6 +3901,14 @@ function detectHyperlinks(env, isTTY) {
|
|
|
3900
3901
|
return false;
|
|
3901
3902
|
}
|
|
3902
3903
|
var HYPERLINKS = detectHyperlinks(process.env, process.stdout.isTTY === true);
|
|
3904
|
+
function openUrl(url) {
|
|
3905
|
+
try {
|
|
3906
|
+
if (process.platform === "darwin") spawn("open", [url], { stdio: "ignore", detached: true }).unref();
|
|
3907
|
+
else if (process.platform === "win32") spawn("cmd", ["/c", "start", "", url], { stdio: "ignore", detached: true }).unref();
|
|
3908
|
+
else spawn("xdg-open", [url], { stdio: "ignore", detached: true }).unref();
|
|
3909
|
+
} catch {
|
|
3910
|
+
}
|
|
3911
|
+
}
|
|
3903
3912
|
function osc8(text, url) {
|
|
3904
3913
|
if (!HYPERLINKS) return text;
|
|
3905
3914
|
return `\x1B]8;;${url}\x07${text}\x1B]8;;\x07`;
|
|
@@ -4925,9 +4934,9 @@ function Footer({ hasAccounts, paginated, cols }) {
|
|
|
4925
4934
|
const showPage = paginated && inner >= BASE2 + (showJump ? JUMP : 0) + PAGE;
|
|
4926
4935
|
return /* @__PURE__ */ jsxs7(Box7, { marginTop: 1, flexWrap: "nowrap", children: [
|
|
4927
4936
|
/* @__PURE__ */ jsx7(Text7, { dimColor: true, children: "by " }),
|
|
4928
|
-
/* @__PURE__ */ jsx7(Transform, { transform: (s) => osc8(s, REPO_URL), children: /* @__PURE__ */ jsx7(Text7, { children: "David Ilie" }) }),
|
|
4937
|
+
/* @__PURE__ */ jsx7(ClickableBox, { onClick: () => openUrl(REPO_URL), children: /* @__PURE__ */ jsx7(Transform, { transform: (s) => osc8(s, REPO_URL), children: /* @__PURE__ */ jsx7(Text7, { underline: true, children: "David Ilie" }) }) }),
|
|
4929
4938
|
/* @__PURE__ */ jsx7(Text7, { dimColor: true, children: " (" }),
|
|
4930
|
-
/* @__PURE__ */ jsx7(Transform, { transform: (s) => osc8(s, "https://davidilie.com"), children: /* @__PURE__ */ jsx7(Text7, { color: "cyan", children: "davidilie.com" }) }),
|
|
4939
|
+
/* @__PURE__ */ jsx7(ClickableBox, { onClick: () => openUrl("https://davidilie.com"), children: /* @__PURE__ */ jsx7(Transform, { transform: (s) => osc8(s, "https://davidilie.com"), children: /* @__PURE__ */ jsx7(Text7, { color: "cyan", underline: true, children: "davidilie.com" }) }) }),
|
|
4931
4940
|
/* @__PURE__ */ jsxs7(Text7, { dimColor: true, children: [
|
|
4932
4941
|
") ",
|
|
4933
4942
|
glyphs().middot,
|