unity-hub-cli 0.10.0 → 0.10.1
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.js +8 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -621,7 +621,7 @@ var UnityTempDirectoryCleaner = class {
|
|
|
621
621
|
|
|
622
622
|
// src/presentation/App.tsx
|
|
623
623
|
import clipboard from "clipboardy";
|
|
624
|
-
import { Box as Box5, Text as Text3, useApp, useInput, useStdout } from "ink";
|
|
624
|
+
import { Box as Box5, Text as Text3, useApp, useInput, useStdout as useStdout2 } from "ink";
|
|
625
625
|
import { useCallback, useEffect as useEffect3, useMemo as useMemo2, useState as useState3 } from "react";
|
|
626
626
|
|
|
627
627
|
// src/presentation/components/LayoutManager.tsx
|
|
@@ -693,7 +693,7 @@ var buildCdCommand = (targetPath) => {
|
|
|
693
693
|
};
|
|
694
694
|
|
|
695
695
|
// src/presentation/components/ProjectRow.tsx
|
|
696
|
-
import { Box as Box2, Text } from "ink";
|
|
696
|
+
import { Box as Box2, Text, useStdout } from "ink";
|
|
697
697
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
698
698
|
var ProjectRow = ({
|
|
699
699
|
isSelected,
|
|
@@ -710,13 +710,16 @@ var ProjectRow = ({
|
|
|
710
710
|
showPath,
|
|
711
711
|
scrollbar
|
|
712
712
|
}) => {
|
|
713
|
+
const { stdout } = useStdout();
|
|
714
|
+
const computedCenterWidth = typeof stdout?.columns === "number" ? Math.max(0, stdout.columns - 6) : void 0;
|
|
715
|
+
const centerWidth = typeof computedCenterWidth === "number" ? Math.max(0, computedCenterWidth - (isSelected ? 1 : 0)) : void 0;
|
|
713
716
|
return /* @__PURE__ */ jsxs2(Box2, { flexDirection: "row", children: [
|
|
714
|
-
/* @__PURE__ */ jsxs2(Box2, { width: 1, flexDirection: "column", alignItems: "center", marginLeft:
|
|
717
|
+
/* @__PURE__ */ jsxs2(Box2, { width: 1, flexDirection: "column", alignItems: "center", marginLeft: 0, children: [
|
|
715
718
|
/* @__PURE__ */ jsx2(Text, { color: isSelected ? "green" : void 0, children: selectionBar }),
|
|
716
719
|
showBranch ? /* @__PURE__ */ jsx2(Text, { color: isSelected ? "green" : void 0, children: selectionBar }) : null,
|
|
717
720
|
showPath ? /* @__PURE__ */ jsx2(Text, { color: isSelected ? "green" : void 0, children: selectionBar }) : null
|
|
718
721
|
] }),
|
|
719
|
-
/* @__PURE__ */ jsxs2(Box2, {
|
|
722
|
+
/* @__PURE__ */ jsxs2(Box2, { flexDirection: "column", marginLeft: isSelected ? 2 : 1, width: centerWidth, children: [
|
|
720
723
|
/* @__PURE__ */ jsxs2(Text, { wrap: "truncate", children: [
|
|
721
724
|
/* @__PURE__ */ jsx2(Text, { color: projectColor, bold: true, children: projectName }),
|
|
722
725
|
/* @__PURE__ */ jsxs2(Text, { children: [
|
|
@@ -1102,7 +1105,7 @@ var App = ({
|
|
|
1102
1105
|
showPath = true
|
|
1103
1106
|
}) => {
|
|
1104
1107
|
const { exit } = useApp();
|
|
1105
|
-
const { stdout } =
|
|
1108
|
+
const { stdout } = useStdout2();
|
|
1106
1109
|
const [projectViews, setProjectViews] = useState3(projects);
|
|
1107
1110
|
const [isSortMenuOpen, setIsSortMenuOpen] = useState3(false);
|
|
1108
1111
|
const linesPerProject = (showBranch ? 1 : 0) + (showPath ? 1 : 0) + 2;
|