git-viewer 10.0.0 → 12.0.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.
@@ -1715,10 +1715,10 @@ function Sidebar(handle) {
1715
1715
  css: {
1716
1716
  padding: "12px",
1717
1717
  fontWeight: 600,
1718
- fontSize: "11px",
1719
1718
  textTransform: "uppercase",
1720
1719
  letterSpacing: "0.5px",
1721
- color: colors.textMuted
1720
+ color: colors.textMuted,
1721
+ borderBottom: `1px solid ${colors.border}`
1722
1722
  },
1723
1723
  children: "Git Tree Viewer"
1724
1724
  }
@@ -1729,7 +1729,8 @@ function Sidebar(handle) {
1729
1729
  RefSection,
1730
1730
  {
1731
1731
  title: remote.toUpperCase(),
1732
- nodes
1732
+ nodes,
1733
+ initialExpanded: false
1733
1734
  },
1734
1735
  remote
1735
1736
  ))
@@ -1739,36 +1740,43 @@ function Sidebar(handle) {
1739
1740
  );
1740
1741
  }
1741
1742
  function RefSection(handle) {
1742
- let expanded = true;
1743
- return ({ title, nodes }) => /* @__PURE__ */ jsx("div", { css: { marginBottom: "8px" }, children: [
1744
- /* @__PURE__ */ jsx(
1745
- "div",
1746
- {
1747
- css: {
1748
- padding: "4px 12px",
1749
- fontSize: "10px",
1750
- fontWeight: 600,
1751
- textTransform: "uppercase",
1752
- letterSpacing: "0.5px",
1753
- color: colors.textMuted,
1754
- cursor: "pointer",
1755
- "&:hover": { color: colors.text }
1756
- },
1757
- on: {
1758
- click: () => {
1759
- expanded = !expanded;
1760
- handle.update();
1761
- }
1762
- },
1763
- children: [
1764
- expanded ? "\u25BC" : "\u25B6",
1765
- " ",
1766
- title
1767
- ]
1768
- }
1769
- ),
1770
- expanded && /* @__PURE__ */ jsx("div", { css: { paddingLeft: "8px" }, children: nodes.map((node) => /* @__PURE__ */ jsx(RefNodeItem, { node, depth: 0 }, node.name)) })
1771
- ] });
1743
+ let expanded = null;
1744
+ return ({
1745
+ title,
1746
+ nodes,
1747
+ initialExpanded = true
1748
+ }) => {
1749
+ if (expanded === null) expanded = initialExpanded;
1750
+ return /* @__PURE__ */ jsx("div", { css: { marginBottom: "8px" }, children: [
1751
+ /* @__PURE__ */ jsx(
1752
+ "div",
1753
+ {
1754
+ css: {
1755
+ padding: "4px 12px",
1756
+ fontSize: "10px",
1757
+ fontWeight: 600,
1758
+ textTransform: "uppercase",
1759
+ letterSpacing: "0.5px",
1760
+ color: colors.textMuted,
1761
+ cursor: "pointer",
1762
+ "&:hover": { color: colors.text }
1763
+ },
1764
+ on: {
1765
+ click: () => {
1766
+ expanded = !expanded;
1767
+ handle.update();
1768
+ }
1769
+ },
1770
+ children: [
1771
+ expanded ? "\u25BC" : "\u25B6",
1772
+ " ",
1773
+ title
1774
+ ]
1775
+ }
1776
+ ),
1777
+ expanded && /* @__PURE__ */ jsx("div", { css: { paddingLeft: "8px" }, children: nodes.map((node) => /* @__PURE__ */ jsx(RefNodeItem, { node, depth: 0 }, node.name)) })
1778
+ ] });
1779
+ };
1772
1780
  }
1773
1781
  function RefNodeItem(handle) {
1774
1782
  let store = handle.context.get(App);
@@ -1892,7 +1900,7 @@ function CommitList(handle) {
1892
1900
  display: "flex",
1893
1901
  alignItems: "center",
1894
1902
  gap: "8px",
1895
- padding: "8px 12px",
1903
+ padding: "7.5px 12px",
1896
1904
  borderBottom: `1px solid ${colors.border}`,
1897
1905
  background: colors.bgLight
1898
1906
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "git-viewer",
3
- "version": "10.0.0",
3
+ "version": "12.0.0",
4
4
  "description": "Visual git log viewer with branch graph and diff display",
5
5
  "repository": {
6
6
  "type": "git",