@fungi.computer/tourtois 0.14.0 → 0.14.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/AppPane.js +5 -2
- package/dist/AppWorkbench.js +4 -0
- package/dist/shell-commands.d.ts +4 -3
- package/dist/shell-commands.js +15 -8
- package/package.json +5 -5
package/dist/AppPane.js
CHANGED
|
@@ -121,9 +121,12 @@ function AppWindowControls({ phone, navigation, onAction, popover, ...actions })
|
|
|
121
121
|
onAction({ kind: "action", actionId: command.id });
|
|
122
122
|
}, children: command.label }, command.id))), actions.onPromote ? (_jsx(DropdownMenuItem, { onSelect: actions.onPromote, children: "Make main window" })) : null, _jsx(DropdownMenuItem, { onSelect: actions.onToggleMaximize, children: actions.maximized ? "Restore window" : "Maximize window" }), _jsx(DropdownMenuItem, { onSelect: actions.onMinimize, children: "Minimize window" }), _jsx(DropdownMenuItem, { variant: "destructive", onSelect: actions.onClose, children: "Close window" })] })] }));
|
|
123
123
|
}
|
|
124
|
-
/**
|
|
124
|
+
/**
|
|
125
|
+
* Back and Forward for an App that publishes navigation, disabled while it
|
|
126
|
+
* cannot move, so the title keeps its place; none for one that never does.
|
|
127
|
+
*/
|
|
125
128
|
function historyProps(navigation, title, onBack, onForward) {
|
|
126
|
-
if (navigation === null
|
|
129
|
+
if (navigation === null)
|
|
127
130
|
return {};
|
|
128
131
|
return {
|
|
129
132
|
back: {
|
package/dist/AppWorkbench.js
CHANGED
|
@@ -285,6 +285,10 @@ export function AppWorkbench({ paneLayerRef, phone, teamId, teamName, initialCom
|
|
|
285
285
|
if (activeId)
|
|
286
286
|
goBack(activeId);
|
|
287
287
|
},
|
|
288
|
+
forward: () => {
|
|
289
|
+
if (activeId)
|
|
290
|
+
goForward(activeId);
|
|
291
|
+
},
|
|
288
292
|
});
|
|
289
293
|
useEffect(() => {
|
|
290
294
|
appSurfaceHost?.focus?.(activeSurfaceId);
|
package/dist/shell-commands.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import { CommandDialogs, type ShellCommandState } from "./command-dialogs.js";
|
|
2
2
|
import { type ShellActions } from "@fungi.computer/nacre/commands";
|
|
3
3
|
import type { TourtoisAppSurfaceHost } from "./app-surface.js";
|
|
4
|
-
/** The Back hint for this platform
|
|
4
|
+
/** The Back hint for this platform. */
|
|
5
5
|
export declare function backHint(): string;
|
|
6
|
-
/** The Forward hint for this platform
|
|
6
|
+
/** The Forward hint for this platform, the matching chord to Back's. */
|
|
7
7
|
export declare function forwardHint(): string;
|
|
8
8
|
/**
|
|
9
9
|
* Register the shell's commands, dispatch their direct chords from the host
|
|
10
10
|
* document, and own the which-key and `:` line open state.
|
|
11
11
|
*/
|
|
12
|
-
export declare function useShellCommands(host: TourtoisAppSurfaceHost | null, actions: Omit<ShellActions, "showKeys" | "showCommandLine" | "back"> & Readonly<{
|
|
12
|
+
export declare function useShellCommands(host: TourtoisAppSurfaceHost | null, actions: Omit<ShellActions, "showKeys" | "showCommandLine" | "back" | "forward"> & Readonly<{
|
|
13
13
|
back: () => void;
|
|
14
|
+
forward: () => void;
|
|
14
15
|
showDesktop: () => Promise<void>;
|
|
15
16
|
}>): ShellCommandState;
|
|
16
17
|
/** Draw the shared shell dialogs in Tourtois's dialog layer. */
|
package/dist/shell-commands.js
CHANGED
|
@@ -2,18 +2,22 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { CommandDialogs } from "./command-dialogs.js";
|
|
3
3
|
import { useLayer } from "@fungi.computer/maosaico";
|
|
4
4
|
import { Sigil, isSigilName } from "@fungi.computer/sigils";
|
|
5
|
-
import { backBinding, shellCommands, } from "@fungi.computer/nacre/commands";
|
|
5
|
+
import { backBinding, forwardBinding, shellCommands, } from "@fungi.computer/nacre/commands";
|
|
6
6
|
import { useEffect, useMemo, useRef, useState, useSyncExternalStore, } from "react";
|
|
7
7
|
import { AppIcon } from "./app-icon.js";
|
|
8
8
|
import { installShellKeys } from "@fungi.computer/nacre/keys";
|
|
9
|
-
/**
|
|
9
|
+
/** A tooltip naming the leader chord for `binding`, e.g. "Back (Ctrl K, then [)". */
|
|
10
|
+
function chordHint(name, binding) {
|
|
11
|
+
const key = binding.slice("<leader>".length);
|
|
12
|
+
return `${name} (${isMac() ? "⌘K" : "Ctrl K"}, then ${key})`;
|
|
13
|
+
}
|
|
14
|
+
/** The Back hint for this platform. */
|
|
10
15
|
export function backHint() {
|
|
11
|
-
|
|
12
|
-
return `Back (${isMac() ? "⌘K" : "Ctrl K"}, then ${key})`;
|
|
16
|
+
return chordHint("Back", backBinding);
|
|
13
17
|
}
|
|
14
|
-
/** The Forward hint for this platform
|
|
18
|
+
/** The Forward hint for this platform, the matching chord to Back's. */
|
|
15
19
|
export function forwardHint() {
|
|
16
|
-
return
|
|
20
|
+
return chordHint("Forward", forwardBinding);
|
|
17
21
|
}
|
|
18
22
|
const emptySnapshot = Object.freeze({
|
|
19
23
|
bindings: Object.freeze([]),
|
|
@@ -70,6 +74,9 @@ export function useShellCommands(host, actions) {
|
|
|
70
74
|
back: () => {
|
|
71
75
|
latest.current.back();
|
|
72
76
|
},
|
|
77
|
+
forward: () => {
|
|
78
|
+
latest.current.forward();
|
|
79
|
+
},
|
|
73
80
|
}),
|
|
74
81
|
{
|
|
75
82
|
id: "desktop.show",
|
|
@@ -77,9 +84,9 @@ export function useShellCommands(host, actions) {
|
|
|
77
84
|
category: "Window",
|
|
78
85
|
description: "Hide visible Apps, or restore the Apps hidden by Show desktop.",
|
|
79
86
|
projections: {
|
|
80
|
-
bindings: { values: ["<leader>d"], order:
|
|
87
|
+
bindings: { values: ["<leader>d"], order: 9 },
|
|
81
88
|
palette: { order: 18 },
|
|
82
|
-
help: { order:
|
|
89
|
+
help: { order: 9 },
|
|
83
90
|
},
|
|
84
91
|
handler: async () => {
|
|
85
92
|
setKeysOpen(false);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/tourtois",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.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.10.0",
|
|
81
81
|
"@fungi.computer/cairn": "0.1.0",
|
|
82
|
-
"@fungi.computer/caps": "0.11.
|
|
82
|
+
"@fungi.computer/caps": "0.11.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.2",
|
|
86
|
-
"@fungi.computer/parakeet": "0.11.
|
|
86
|
+
"@fungi.computer/parakeet": "0.11.19",
|
|
87
87
|
"@fungi.computer/puffball": "0.5.5",
|
|
88
88
|
"@fungi.computer/shiitake": "0.13.1",
|
|
89
89
|
"@fungi.computer/sigils": "0.3.1",
|
|
@@ -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.5.
|
|
103
|
+
"@fungi.computer/nacre": "0.5.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.21.
|
|
109
|
+
"@fungi.computer/oyster": "0.21.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",
|