@fungi.computer/tourtois 0.12.11 → 0.12.13

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.
@@ -162,19 +162,15 @@ function ArrangedDesktop({ owner, ...props }) {
162
162
  .filter((item) => item.row <= row && row < item.row + item.h)
163
163
  .map((item) => {
164
164
  const declaration = snapshot.layout.items.find((entry) => entry.id === item.id);
165
+ const canonical = item.h * rowHeight + (item.h - 1) * gap;
166
+ const natural = contentHeights.get(item.id) ?? canonical;
165
167
  const isLauncher = declaration !== undefined &&
166
168
  catalog.some((gill) => gill.kind === "launcher" &&
167
169
  gill.surfaceId === declaration.surfaceId &&
168
170
  gill.gillId === declaration.gillId);
169
- const canonical = item.h * rowHeight + (item.h - 1) * gap;
170
- const natural = contentHeights.get(item.id) ?? canonical;
171
- const height = isLauncher
172
- ? props.phone
173
- ? natural
174
- : Math.max(canonical, natural)
175
- : props.phone
176
- ? Math.min(natural, canonical)
177
- : canonical;
171
+ // Launchers grow to show their Apps; row Gills stay bounded and
172
+ // scroll once populated. Both fit their content when it is short.
173
+ const height = isLauncher ? natural : Math.min(natural, canonical);
178
174
  return Math.max(0, height - (item.h - 1) * gap) / item.h;
179
175
  })));
180
176
  const binding = useMaosaicoBento({
@@ -65,17 +65,24 @@ export function LauncherGill({ items, size = "M", onAllApps, loading = false, un
65
65
  const ready = !loading && !unavailable;
66
66
  return (_jsxs(GillFrame, { title: "Launcher", size: size, onContentHeight: onContentHeight, editHandle: editHandle ?? (_jsx(Button, { size: "xs", variant: "outline", "aria-expanded": editing, onClick: () => {
67
67
  setEditing(!editing);
68
- }, children: editing ? "Done" : "Edit launcher" })), children: [loading ? _jsx(LoadingState, { message: "Loading Apps\u2026" }) : null, unavailable ? (_jsxs("p", { role: "alert", children: ["App directory unavailable.", " ", onRetry ? (_jsx(Button, { size: "sm", variant: "ghost", onClick: onRetry, children: "Retry" })) : null] })) : null, ready ? (_jsxs(_Fragment, { children: [welcome.visible ? (_jsx(FirstRunWelcome, { items: items, onDismiss: welcome.dismiss })) : null, items.length === 0 ? (_jsx(EmptyState, { variant: "hint", title: "No Apps available", description: "Installed launchable Apps appear here." })) : null, items.length > 0 && shown.length === 0 ? (_jsx("p", { children: "No Apps shown. Edit the launcher to show them again." })) : null, _jsx(AppGrid, { "aria-label": "Apps", items: [
68
+ }, children: editing ? "Done" : "Edit launcher" })), children: [loading ? _jsx(LoadingState, { message: "Loading Apps\u2026" }) : null, unavailable ? (_jsx(FailureLine, { role: "alert", message: "App directory unavailable.", ...(onRetry ? { onRetry } : {}) })) : null, ready ? (_jsxs(_Fragment, { children: [welcome.visible && shown.length > 0 ? (_jsx(FirstRunWelcome, { items: items, onDismiss: welcome.dismiss })) : null, items.length === 0 ? (_jsx(EmptyState, { variant: "hint", title: "No Apps available", description: "Open All Apps to find what you can use.", primaryAction: { label: "Open All Apps", onSelect: onAllApps } })) : null, items.length > 0 && shown.length === 0 && !editing ? (_jsx(EmptyState, { variant: "quiet", title: "Choose the Apps you want here", description: "Your Apps are hidden from the launcher.", primaryAction: {
69
+ label: "Show Apps",
70
+ onSelect: () => {
71
+ setEditing(true);
72
+ },
73
+ } })) : null, items.length > 0 ||
74
+ pendingTiles.length > 0 ||
75
+ warnings.length > 0 ? (_jsx(AppGrid, { "aria-label": "Apps", items: [
69
76
  ...tiles,
70
77
  ...pendingTiles,
71
78
  ...warnings,
72
79
  {
73
80
  id: "all-apps",
74
- label: "All Apps ›",
81
+ label: "All Apps",
75
82
  icon: _jsx(Sigil, { name: "allApps" }),
76
83
  onSelect: onAllApps,
77
84
  },
78
- ], size: "lg" }), _jsx("div", { className: "tourtois-install-notes", children: installing.map((entry) => entry.state === "installing" ? null : (_jsx(InstallNote, { entry: entry, onRetry: onRetryInstall, onOpen: starterItem(items, entry.installationId)?.onSelect }, entry.installationId))) }), _jsx("div", { className: "tourtois-launcher-more", children: _jsxs(Button, { size: "sm", variant: "ghost", onClick: () => {
85
+ ], size: "lg" })) : null, _jsx("div", { className: "tourtois-install-notes", children: installing.map((entry) => entry.state === "installing" ? null : (_jsx(InstallNote, { entry: entry, onRetry: onRetryInstall, onOpen: starterItem(items, entry.installationId)?.onSelect }, entry.installationId))) }), _jsx("div", { className: "tourtois-launcher-more", children: _jsxs(Button, { size: "sm", variant: "ghost", onClick: () => {
79
86
  window.open(installDocs, "_blank", "noopener,noreferrer");
80
87
  }, children: ["More Apps", _jsx(ExternalLink, { "aria-hidden": "true", size: 14 })] }) }), editing ? (_jsx(DataList, { "aria-label": "Launcher preferences", children: items.map((item) => (_jsx(DataRow, { children: _jsxs("div", { className: "tourtois-launcher-preference", children: [_jsx("span", { "aria-hidden": "true", className: "grid size-6 place-items-center [&_svg]:size-full", children: item.icon ?? _jsx(Sigil, { name: "installApps" }) }), _jsx("div", { className: "tourtois-launcher-preference-identity", children: _jsx("span", { children: item.label }) }), _jsxs(Select, { "aria-label": `Launcher state for ${item.label}`, value: stateFor(item.id), onChange: (event) => {
81
88
  const value = event.currentTarget.value;
@@ -7,6 +7,8 @@ import { ActionRow } from "@fungi.computer/caps/components/action-row";
7
7
  import { Button } from "@fungi.computer/caps/components/button";
8
8
  import { EmptyState } from "@fungi.computer/caps/blocks/empty-state";
9
9
  import { Status } from "@fungi.computer/caps/components/status";
10
+ import { LoadingState } from "@fungi.computer/caps/blocks/loading-state";
11
+ import { FailureLine } from "@fungi.computer/caps/components/failure-line";
10
12
  import { GillFrame } from "./gill-frame.js";
11
13
  function detail(row) {
12
14
  return row.tone === "error" && row.detail ? (_jsx(Badge, { size: "sm", variant: "quiet", tone: "error", children: row.detail })) : (row.detail);
@@ -119,13 +121,19 @@ export function RowGill({ surfaceId, appHeader, declaration, params, size, pause
119
121
  (recovery === undefined &&
120
122
  response?.state === "error" &&
121
123
  response.reason === "exec_isolation_required");
122
- return (_jsxs(GillFrame, { title: response?.title ?? declaration.title, appHeader: appHeader, size: size, onContentHeight: onContentHeight, editHandle: editHandle, children: [error ? (_jsxs("p", { role: "alert", children: [error, " ", _jsx(Button, { size: "sm", variant: "ghost", onClick: () => {
123
- setRetry((value) => value + 1);
124
- }, children: "Retry" })] })) : null, !response && !error ? (_jsxs("p", { role: "status", children: ["Loading ", declaration.title, "\u2026"] })) : null, response?.state === "error" ? (_jsxs("div", { children: [_jsx("p", { role: "alert", children: response.reason === "exec_isolation_required" && launch
124
+ return (_jsxs(GillFrame, { title: response?.title ?? declaration.title, appHeader: appHeader, size: size, onContentHeight: onContentHeight, editHandle: editHandle, children: [error ? (_jsx(FailureLine, { role: "alert", message: error, onRetry: () => {
125
+ setRetry((value) => value + 1);
126
+ } })) : null, !response && !error ? (_jsx(LoadingState, { message: `Loading ${declaration.title}…` })) : null, !error && response?.state === "error" ? (_jsxs("div", { children: [_jsx(FailureLine, { role: "alert", message: response.reason === "exec_isolation_required" && launch
125
127
  ? `${response.title} isn't available on this preview. Open ${launch.label}.`
126
- : response.error }), recoveryParam && onConfigure ? (_jsxs(Button, { size: "sm", variant: "primary", onClick: onConfigure, children: ["Choose ", recoveryParam.label] })) : null, opensApp && launch ? (_jsxs(Button, { size: "sm", variant: "primary", onClick: () => {
128
+ : response.error, ...(!recovery && !opensApp
129
+ ? {
130
+ onRetry: () => {
131
+ setRetry((value) => value + 1);
132
+ },
133
+ }
134
+ : {}) }), recoveryParam && onConfigure ? (_jsxs(Button, { size: "sm", variant: "primary", onClick: onConfigure, children: ["Choose ", recoveryParam.label] })) : null, opensApp && launch ? (_jsxs(Button, { size: "sm", variant: "primary", onClick: () => {
127
135
  launch.onSelect();
128
- }, children: ["Open ", launch.label] })) : null] })) : null, response?.state === "empty" ? (_jsx(EmptyState, { variant: "quiet", title: response.emptyText ?? "Nothing here yet.", description: null, actions: launch &&
136
+ }, children: ["Open ", launch.label] })) : null] })) : null, !error && response?.state === "empty" ? (_jsx(EmptyState, { variant: "quiet", title: response.emptyText ?? "Nothing here yet.", description: null, actions: launch &&
129
137
  (response.action?.kind === "open" ||
130
138
  response.emptyText === undefined) ? (_jsxs(Button, { size: "sm", variant: "outline", onClick: () => {
131
139
  launch.onSelect();
@@ -3,8 +3,8 @@
3
3
  display: flex;
4
4
  align-items: center;
5
5
  gap: var(--spacing-lg);
6
- padding: var(--spacing-md) var(--spacing-lg);
7
- margin-block-end: var(--spacing-lg);
6
+ padding: var(--spacing-sm) 0;
7
+ margin-block-end: var(--spacing-md);
8
8
  /* Align the invitation with the App tiles inside the Launcher. */
9
9
  margin-inline: calc(var(--spacing-sm) + 1px);
10
10
  }
@@ -28,7 +28,7 @@
28
28
  margin: 0;
29
29
  color: var(--stipe-fg-muted);
30
30
  font-size: var(--text-sm);
31
- line-height: 1.4;
31
+ line-height: 1.5;
32
32
  }
33
33
  .tourtois-welcome-text .tourtois-welcome-hint {
34
34
  margin-block-start: var(--spacing-2xs);
@@ -66,7 +66,7 @@
66
66
  display: flex;
67
67
  justify-content: flex-end;
68
68
  /* The ghost button's own padding would pull its text off the grid's edge. */
69
- margin-inline-end: calc(-1 * (var(--spacing-md) + 1px));
69
+ margin-inline-end: 0;
70
70
  margin-block-start: var(--spacing-sm);
71
71
  }
72
72
 
@@ -53,7 +53,7 @@ export function FirstRunWelcome({ items, onDismiss, }) {
53
53
  const lead = starterItem(items, "grove") ?? hello;
54
54
  if (!lead)
55
55
  return null;
56
- return (_jsxs("section", { className: "tourtois-welcome", "aria-labelledby": "tourtois-welcome-title", children: [_jsx("span", { className: "tourtois-welcome-mascot", "aria-hidden": "true", children: _jsx(ShiitakeAvatar, { className: "h-full w-full", state: { activity: "idle", expression: "normal" } }) }), _jsxs("div", { className: "tourtois-welcome-text", children: [_jsx("h3", { id: "tourtois-welcome-title", children: "This is your Oyster" }), _jsx("p", { children: "A place to talk to Agents, make things, and keep your work together." }), _jsxs("p", { className: "tourtois-welcome-hint", children: [_jsx(Keycap, { size: "hint", children: isMac() ? "⌘" : "Ctrl" }), " ", _jsx(Keycap, { size: "hint", children: "K" }), " then ", _jsx(Keycap, { size: "hint", children: "O" }), " ", "opens any App"] })] }), _jsxs("div", { className: "tourtois-welcome-actions", children: [_jsxs(Button, { size: "sm", variant: "primary", onClick: () => {
56
+ return (_jsxs("section", { className: "tourtois-welcome", "aria-labelledby": "tourtois-welcome-title", children: [_jsx("span", { className: "tourtois-welcome-mascot", "aria-hidden": "true", children: _jsx(ShiitakeAvatar, { className: "h-full w-full", state: { activity: "idle", expression: "normal" } }) }), _jsxs("div", { className: "tourtois-welcome-text", children: [_jsx("h3", { id: "tourtois-welcome-title", children: "This is your Oyster" }), _jsx("p", { children: "Open an App to chat with AI helpers, write, or make something." }), _jsxs("p", { className: "tourtois-welcome-hint", children: [_jsx(Keycap, { size: "hint", children: isMac() ? "⌘" : "Ctrl" }), " ", _jsx(Keycap, { size: "hint", children: "K" }), " then ", _jsx(Keycap, { size: "hint", children: "O" }), " ", "opens any App"] })] }), _jsxs("div", { className: "tourtois-welcome-actions", children: [_jsxs(Button, { size: "sm", variant: "primary", onClick: () => {
57
57
  lead.onSelect();
58
58
  }, children: ["Open ", lead.label] }), _jsx(Button, { size: "sm", variant: "ghost", onClick: onDismiss, children: "Not now" })] })] }));
59
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/tourtois",
3
- "version": "0.12.11",
3
+ "version": "0.12.13",
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",
@@ -79,11 +79,11 @@
79
79
  "dependencies": {
80
80
  "@fungi.computer/agar": "0.9.1",
81
81
  "@fungi.computer/cairn": "0.1.0",
82
- "@fungi.computer/caps": "0.10.1",
82
+ "@fungi.computer/caps": "0.10.2",
83
83
  "@fungi.computer/ear-tag": "0.1.0",
84
84
  "@fungi.computer/gills": "0.3.0",
85
85
  "@fungi.computer/maosaico": "0.1.2",
86
- "@fungi.computer/parakeet": "0.11.5",
86
+ "@fungi.computer/parakeet": "0.11.6",
87
87
  "@fungi.computer/puffball": "0.5.5",
88
88
  "@fungi.computer/shiitake": "0.12.4",
89
89
  "@fungi.computer/sigils": "0.3.0",
@@ -106,7 +106,7 @@
106
106
  "react": "^18.3.1 || ^19.2.0"
107
107
  },
108
108
  "devDependencies": {
109
- "@fungi.computer/oyster": "0.19.18",
109
+ "@fungi.computer/oyster": "0.19.24",
110
110
  "@cloudflare/workers-types": "5.20260828.1",
111
111
  "@fungi.computer/forage": "0.3.5",
112
112
  "@fungi.computer/mycelium": "0.3.8",