@fungi.computer/tourtois 0.12.0 → 0.12.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/AppWorkbench.js
CHANGED
|
@@ -5,6 +5,7 @@ import {} from "@fungi.computer/caps/blocks/app-bar";
|
|
|
5
5
|
import { ResizeHandle } from "@fungi.computer/caps/components/resize-handle";
|
|
6
6
|
import { LoadingState } from "@fungi.computer/caps/blocks/loading-state";
|
|
7
7
|
import { toast, Toaster } from "@fungi.computer/caps/components/toaster";
|
|
8
|
+
import { WORKBENCH_NOTICES } from "./app-toast.js";
|
|
8
9
|
import { WindowSnapPreview } from "@fungi.computer/caps/components/window";
|
|
9
10
|
import { MaosaicoRegion, useLayer, useMaosaicoLayout, } from "@fungi.computer/maosaico";
|
|
10
11
|
import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore, } from "react";
|
|
@@ -42,7 +43,7 @@ function announceFloating(tiled, projection) {
|
|
|
42
43
|
if (!tiled && !hasVisibleAppWindows(projection))
|
|
43
44
|
toast("New windows will float", {
|
|
44
45
|
id: "workbench-layout",
|
|
45
|
-
toasterId:
|
|
46
|
+
toasterId: WORKBENCH_NOTICES,
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
49
|
/** The trial's starter Apps that are still being set up, if the host says so. */
|
|
@@ -123,7 +124,7 @@ export function AppWorkbench({ paneLayerRef, phone, teamId, teamName, initialCom
|
|
|
123
124
|
message = "This App lost its connection.";
|
|
124
125
|
const notice = {
|
|
125
126
|
id: "workbench-status",
|
|
126
|
-
toasterId:
|
|
127
|
+
toasterId: WORKBENCH_NOTICES,
|
|
127
128
|
closeButton: true,
|
|
128
129
|
dismissible: true,
|
|
129
130
|
};
|
|
@@ -586,7 +587,7 @@ export function AppWorkbench({ paneLayerRef, phone, teamId, teamName, initialCom
|
|
|
586
587
|
}, onOpenPermissions: () => {
|
|
587
588
|
openAppPermissions(activeWindow.launch.surfaceId);
|
|
588
589
|
} }, activeWindow.windowId)) : null, systemMenuItems: systemMenuItems }), noticeContainer
|
|
589
|
-
? createPortal(_jsx(Toaster, { id:
|
|
590
|
+
? createPortal(_jsx(Toaster, { id: WORKBENCH_NOTICES, position: "bottom-right", offset: 24, mobileOffset: 24, style: { fontFamily: "var(--font-sans)" }, closeButton: true }), noticeContainer)
|
|
590
591
|
: null, _jsxs("div", { className: "relative min-h-0 flex-1", children: [_jsx(MaosaicoRegion, { layer: "desktop", style: { position: "absolute", inset: 0 }, "data-desktop-visibility": visibility, ref: desktopRef, "aria-hidden": covered ? true : undefined, children: _jsx(Desktop, { phone: phone, editing: desktopEditing, onEditingChange: setDesktopEditing, onOwner: receiveDesktopOwner, launcherItems: launchableItems, onAllApps: () => {
|
|
591
592
|
setAppDialOpen(true);
|
|
592
593
|
}, installing: installingApps(appsQuery.data), onRetryInstall: platform.retryInstall, paused: covered, apps: windowApps, needsUpdate: needsUpdate, onAppSettings: (app) => {
|
package/dist/app-surface.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type ReactNode } from "react";
|
|
2
2
|
import type { WhistleCommand, WhistleCommandKey, WhistleExecutionInput, WhistleExecutionOutcome, WhistleMenuProjection, WhistleSnapshot } from "@fungi.computer/whistle";
|
|
3
|
-
import type { AgentSessionSelection, AppNavigationState, AppStatusItem, FileNavigationInput } from "@fungi.computer/agar";
|
|
3
|
+
import type { AgentSessionSelection, AppNavigationState, AppStatusItem, FileNavigationInput, ToastInput } from "@fungi.computer/agar";
|
|
4
4
|
import type { AppOpenInput, AppRoleChoice } from "@fungi.computer/agar/apps";
|
|
5
5
|
import type { AppDeclaredCommand } from "@fungi.computer/puffball/app";
|
|
6
6
|
import type { AppWindowMount } from "./app-windows.js";
|
|
@@ -20,6 +20,8 @@ export type TourtoisAppMountEvents = Pick<WindowEvents, "onDeliveryPending"> & R
|
|
|
20
20
|
onNavigationState?: (state: AppNavigationState | null) => void;
|
|
21
21
|
/** The App's parsed status readouts for its window's status bar. */
|
|
22
22
|
onStatusItems?: (items: readonly AppStatusItem[]) => void;
|
|
23
|
+
/** A transient notice the App asks the shell to show. */
|
|
24
|
+
onToast?: (toast: ToastInput) => void;
|
|
23
25
|
/**
|
|
24
26
|
* The App's own document took focus, as when the person clicks into it.
|
|
25
27
|
* Its sandboxed frame keeps that pointer from this document, so the App's
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { showNotice } from "@fungi.computer/caps/components/toaster";
|
|
2
|
+
/** The one Toaster mount an App's notice reaches in the Tourtois shell. */
|
|
3
|
+
export const WORKBENCH_NOTICES = "workbench-notices";
|
|
4
|
+
export function showAppToast(notice) {
|
|
5
|
+
showNotice(notice, WORKBENCH_NOTICES);
|
|
6
|
+
}
|
package/dist/desktop/Desktop.js
CHANGED
|
@@ -8,6 +8,7 @@ import { LoadingState } from "@fungi.computer/caps/blocks/loading-state";
|
|
|
8
8
|
import { Button } from "@fungi.computer/caps/components/button";
|
|
9
9
|
import { IconButton } from "@fungi.computer/caps/components/icon-button";
|
|
10
10
|
import { GripVertical, Trash2 } from "lucide-react";
|
|
11
|
+
import { WORKBENCH_NOTICES } from "../app-toast.js";
|
|
11
12
|
import { toast } from "@fungi.computer/caps/components/toaster";
|
|
12
13
|
import { Badge } from "@fungi.computer/caps/components/badge";
|
|
13
14
|
import { Sigil } from "@fungi.computer/sigils";
|
|
@@ -248,7 +249,7 @@ function ArrangedDesktop({ owner, ...props }) {
|
|
|
248
249
|
if (saved)
|
|
249
250
|
toast("Desktop saved", {
|
|
250
251
|
id: "desktop-saved",
|
|
251
|
-
toasterId:
|
|
252
|
+
toasterId: WORKBENCH_NOTICES,
|
|
252
253
|
});
|
|
253
254
|
setSaved(false);
|
|
254
255
|
onEditingChange(false);
|
package/dist/shell-host.js
CHANGED
|
@@ -141,7 +141,7 @@ export function createTourtoisShell(workbench) {
|
|
|
141
141
|
// One Whistle graph for Tourtois's own shell commands and every mounted
|
|
142
142
|
// child's Release-validated commands, so the menu bar and Cmd-K follow focus.
|
|
143
143
|
const commands = createAppSurfaceCommandHost();
|
|
144
|
-
const mount = async (container, launch, signal, { onAgentSessionSelection, onDeliveryPending, onComputerChoice, onNavigation, onAppOpen, onAppRole, onSelectionChanged, onNavigationState, onStatusItems, onFocus, }) => {
|
|
144
|
+
const mount = async (container, launch, signal, { onAgentSessionSelection, onDeliveryPending, onComputerChoice, onNavigation, onAppOpen, onAppRole, onSelectionChanged, onNavigationState, onStatusItems, onToast, onFocus, }) => {
|
|
145
145
|
const commandMount = commands.mount(launch.surfaceId, launch.commands);
|
|
146
146
|
let resolveHandle = () => undefined;
|
|
147
147
|
const handleReady = new Promise((resolve) => {
|
|
@@ -191,6 +191,12 @@ export function createTourtoisShell(workbench) {
|
|
|
191
191
|
onNavigationState(parseNavigationRelay(relayed));
|
|
192
192
|
}),
|
|
193
193
|
}),
|
|
194
|
+
...(onToast && {
|
|
195
|
+
onToast: (toast) => {
|
|
196
|
+
onToast(toast);
|
|
197
|
+
return Promise.resolve();
|
|
198
|
+
},
|
|
199
|
+
}),
|
|
194
200
|
...(onStatusItems && {
|
|
195
201
|
onStatusItems: (items) =>
|
|
196
202
|
// The host parsed these at the App's edge; parse again at ours.
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useEffect, useMemo, useRef } from "react";
|
|
2
|
+
import { showAppToast } from "./app-toast.js";
|
|
2
3
|
import { createAppWindowManager, } from "./app-windows.js";
|
|
3
4
|
/** One mounted host connection owns its windows, including StrictMode teardown. */
|
|
4
5
|
export function useAppWindowManager(host, teamId, events) {
|
|
@@ -27,6 +28,7 @@ export function useAppWindowManager(host, teamId, events) {
|
|
|
27
28
|
},
|
|
28
29
|
onNavigationState: projectionEvents.onNavigationState,
|
|
29
30
|
onStatusItems: projectionEvents.onStatusItems,
|
|
31
|
+
onToast: showAppToast,
|
|
30
32
|
onComputerChoice: projectionEvents.onComputerChoice,
|
|
31
33
|
});
|
|
32
34
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/tourtois",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
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.0",
|
|
81
81
|
"@fungi.computer/cairn": "0.1.0",
|
|
82
|
-
"@fungi.computer/caps": "0.10.
|
|
82
|
+
"@fungi.computer/caps": "0.10.1",
|
|
83
83
|
"@fungi.computer/ear-tag": "0.1.0",
|
|
84
84
|
"@fungi.computer/gills": "0.3.0",
|
|
85
85
|
"@fungi.computer/maosaico": "0.1.1",
|
|
86
|
-
"@fungi.computer/parakeet": "0.11.
|
|
86
|
+
"@fungi.computer/parakeet": "0.11.1",
|
|
87
87
|
"@fungi.computer/puffball": "0.5.5",
|
|
88
88
|
"@fungi.computer/shiitake": "0.12.3",
|
|
89
89
|
"@fungi.computer/sigils": "0.3.0",
|
|
@@ -100,13 +100,13 @@
|
|
|
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.4.
|
|
103
|
+
"@fungi.computer/nacre": "0.4.1"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"react": "^18.3.1 || ^19.2.0"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
|
-
"@fungi.computer/oyster": "0.
|
|
109
|
+
"@fungi.computer/oyster": "0.18.1",
|
|
110
110
|
"@cloudflare/workers-types": "5.20260828.1",
|
|
111
111
|
"@fungi.computer/forage": "0.3.5",
|
|
112
112
|
"@fungi.computer/mycelium": "0.3.8",
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
"typescript": "5.9.3",
|
|
119
119
|
"vite": "8.2.2",
|
|
120
120
|
"vitest": "4.1.11",
|
|
121
|
-
"wrangler": "4.
|
|
121
|
+
"wrangler": "4.156.2",
|
|
122
122
|
"eslint": "10.9.1",
|
|
123
123
|
"oxlint": "1.78.0",
|
|
124
124
|
"tsx": "4.23.12",
|