@fungi.computer/tourtois 0.30.7 → 0.30.8

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/Vault.js CHANGED
@@ -724,7 +724,7 @@ function ScopePanel({ port, view, credential, manage, notice, refresh, }) {
724
724
  const group = (kind, legend, items) => (_jsx(FieldSet, { legend: legend, disabled: !manage, children: items.length === 0 ? (_jsx("p", { className: "tourtois-settings-empty", children: kind === "agent" ? "No Agents yet." : "No Computers yet." })) : (_jsx("div", { className: "tourtois-vault-choices", children: items.map((item) => (_jsx(Choice, { label: item.name, checked: granted(kind, item.id), disabled: !manage || pending !== null, onChange: (event) => {
725
725
  void change(kind, item.id, event.currentTarget.checked);
726
726
  } }, item.id))) })) }));
727
- return (_jsx(RowPanel, { label: `Scope of ${credential.label}`, children: _jsxs("div", { className: "tourtois-vault-scope", children: [group("agent", "Agents", view.subjects.agents), group("computer", "Computers", view.subjects.computers), _jsx("p", { className: "tourtois-vault-panel-copy", children: "A grant to an Agent never reaches the visitors its channels talk to." }), _jsx(EditDestinations, { initial: credential.destinations ?? [], disabled: !manage, onSave: async (destinations) => {
727
+ return (_jsx(RowPanel, { label: `Scope of ${credential.label}`, children: _jsxs("div", { className: "tourtois-vault-scope", children: [group("agent", "Agents", view.subjects.agents), group("computer", "Computers", view.subjects.computers), _jsx("p", { className: "tourtois-vault-panel-copy", children: "Anyone who can run commands on the Computer this Agent works on can use this secret while it works, only on the sites you allow." }), _jsx("p", { className: "tourtois-vault-panel-copy", children: "A grant to an Agent never reaches the visitors its channels talk to." }), _jsx(EditDestinations, { initial: credential.destinations ?? [], disabled: !manage, onSave: async (destinations) => {
728
728
  try {
729
729
  await port.updateCredential(credential.connectionId, {
730
730
  expectedVersion: credential.version,
@@ -14,9 +14,13 @@
14
14
  border-radius: var(--radius-box);
15
15
  pointer-events: none;
16
16
  }
17
- /* Room for the overlay beside the title; only truncation changes. */
17
+ /* Room for the overlay beside the title; only truncation changes, with a
18
+ mouse as with touch, so a long title never wraps and grows the header. */
18
19
  .tourtois-desktop-stage[data-arranging] .tourtois-gill-frame .caps-card-title {
19
20
  padding-inline-end: 9rem;
21
+ white-space: nowrap;
22
+ overflow: hidden;
23
+ text-overflow: ellipsis;
20
24
  }
21
25
 
22
26
  .tourtois-arrange-controls {
@@ -119,7 +123,12 @@
119
123
  inset-block-end: 100%;
120
124
  margin-block-end: var(--spacing-xs);
121
125
  }
122
- /* Five touch targets and the title share one row: keep them tight. */
126
+ }
127
+
128
+ /* Five touch targets and the title share one 44px row: keep them tight. A
129
+ narrow window driven by a mouse keeps its 32px controls where they sit on
130
+ a desktop (52f8bb42b6). */
131
+ @media (max-width: 640px) and (pointer: coarse) {
123
132
  .tourtois-arrange-controls {
124
133
  inset-block-start: var(--spacing-xl);
125
134
  }
@@ -37,5 +37,49 @@ export function GillFrame({ title, appHeader, size, editHandle, children, onCont
37
37
  observer.disconnect();
38
38
  };
39
39
  }, [measuring]);
40
- return (_jsx(SectionCard, { ref: card, className: "tourtois-gill-frame", heading: appHeader ? (_jsxs("span", { className: "flex min-w-0 items-center gap-sm", children: [_jsx("span", { className: "tourtois-gill-frame-icon", children: appHeader.icon }), _jsx("span", { className: "truncate", children: appHeader.name })] })) : (title), description: appHeader ? title : undefined, "data-gill-size": size, actions: editHandle, children: _jsx("div", { className: "tourtois-gill-body", children: _jsx("div", { ref: content, className: "tourtois-gill-content", children: children }) }) }));
40
+ const scroller = useRef(null);
41
+ // A bounded Gill scrolls its rows. At rest its body ends on a row boundary,
42
+ // so the last visible row is whole and the rest wait below the scroll.
43
+ useLayoutEffect(() => {
44
+ const root = card.current;
45
+ const viewport = scroller.current;
46
+ const body = content.current;
47
+ const header = root?.firstElementChild;
48
+ const section = body?.parentElement?.parentElement;
49
+ if (!root || !viewport || !body || !header || !section)
50
+ return;
51
+ const fit = () => {
52
+ const sectionStyle = getComputedStyle(section);
53
+ // The room the card leaves for its body, read from the card so a
54
+ // limit set here never feeds back into it.
55
+ const room = root.clientHeight -
56
+ header.getBoundingClientRect().height -
57
+ parseFloat(sectionStyle.paddingTop) -
58
+ parseFloat(sectionStyle.paddingBottom);
59
+ const top = body.getBoundingClientRect().top;
60
+ // A row is cut when the body ends inside its content; losing only its
61
+ // bottom padding leaves the row whole.
62
+ const cut = [...body.querySelectorAll(".list-row")]
63
+ .map((row) => {
64
+ const box = row.getBoundingClientRect();
65
+ return {
66
+ top: box.top - top,
67
+ content: box.bottom -
68
+ top -
69
+ parseFloat(getComputedStyle(row).paddingBottom),
70
+ };
71
+ })
72
+ .find((row) => row.top < room && row.content > room + 0.5);
73
+ viewport.style.maxHeight = cut ? `${String(Math.floor(cut.top))}px` : "";
74
+ };
75
+ const observer = new ResizeObserver(fit);
76
+ observer.observe(root);
77
+ observer.observe(header);
78
+ observer.observe(body);
79
+ fit();
80
+ return () => {
81
+ observer.disconnect();
82
+ };
83
+ }, []);
84
+ return (_jsx(SectionCard, { ref: card, className: "tourtois-gill-frame", heading: appHeader ? (_jsxs("span", { className: "flex min-w-0 items-center gap-sm", children: [_jsx("span", { className: "tourtois-gill-frame-icon", children: appHeader.icon }), _jsx("span", { className: "truncate", children: appHeader.name })] })) : (title), description: appHeader ? title : undefined, "data-gill-size": size, actions: editHandle, children: _jsx("div", { ref: scroller, className: "tourtois-gill-body", children: _jsx("div", { ref: content, className: "tourtois-gill-content", children: children }) }) }));
41
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/tourtois",
3
- "version": "0.30.7",
3
+ "version": "0.30.8",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "description": "Tourtois: the trusted desktop shell for Oyster and Fungi, with host-supplied Settings sections",
6
6
  "type": "module",
@@ -77,15 +77,15 @@
77
77
  "LICENSE"
78
78
  ],
79
79
  "dependencies": {
80
- "@fungi.computer/agar": "0.25.0",
80
+ "@fungi.computer/agar": "0.25.1",
81
81
  "@fungi.computer/cairn": "0.1.0",
82
- "@fungi.computer/caps": "0.12.4",
82
+ "@fungi.computer/caps": "0.12.5",
83
83
  "@fungi.computer/ear-tag": "0.1.0",
84
84
  "@fungi.computer/gills": "0.4.0",
85
85
  "@fungi.computer/maosaico": "0.1.2",
86
- "@fungi.computer/parakeet": "0.16.8",
87
- "@fungi.computer/puffball": "0.13.0",
88
- "@fungi.computer/shiitake": "0.21.15",
86
+ "@fungi.computer/parakeet": "0.16.9",
87
+ "@fungi.computer/puffball": "0.13.1",
88
+ "@fungi.computer/shiitake": "0.21.16",
89
89
  "@fungi.computer/sigils": "0.3.2",
90
90
  "@fungi.computer/sprite": "0.2.2",
91
91
  "@fungi.computer/sprite-zdog": "0.3.2",
@@ -100,16 +100,16 @@
100
100
  "lucide-react": "0.460.0",
101
101
  "react-dom": "18.3.1",
102
102
  "zod": "4.4.3",
103
- "@fungi.computer/nacre": "0.8.7"
103
+ "@fungi.computer/nacre": "0.8.8"
104
104
  },
105
105
  "peerDependencies": {
106
106
  "react": "^18.3.1 || ^19.2.0"
107
107
  },
108
108
  "devDependencies": {
109
- "@fungi.computer/oyster": "0.52.2",
109
+ "@fungi.computer/oyster": "0.53.0",
110
110
  "@cloudflare/workers-types": "5.20260828.1",
111
- "@fungi.computer/forage": "0.4.0",
112
- "@fungi.computer/mycelium": "0.4.8",
111
+ "@fungi.computer/forage": "0.4.1",
112
+ "@fungi.computer/mycelium": "0.4.9",
113
113
  "@ladle/react": "5.1.1",
114
114
  "@types/react": "18.3.3",
115
115
  "@vitejs/plugin-react": "6.1.1",