@fungi.computer/tourtois 0.10.0 → 0.12.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.
- package/dist/AppAccessConsent.d.ts +10 -2
- package/dist/AppAccessConsent.js +50 -41
- package/dist/AppPane.d.ts +6 -2
- package/dist/AppPane.js +49 -28
- package/dist/AppWorkbench.js +4 -2
- package/dist/DesktopMenuBar.js +1 -1
- package/dist/TeamDesktop.js +2 -1
- package/dist/WorkbenchAppBar.js +1 -1
- package/dist/app-directory.d.ts +9 -0
- package/dist/app-directory.js +4 -1
- package/dist/chrome.css +4 -18
- package/dist/desktop/Desktop.d.ts +4 -0
- package/dist/desktop/Desktop.js +83 -66
- package/dist/desktop/arrange-toolbar.d.ts +19 -0
- package/dist/desktop/arrange-toolbar.js +63 -0
- package/dist/desktop/arrange.css +145 -0
- package/dist/desktop/launcher-gill.d.ts +6 -1
- package/dist/desktop/launcher-gill.js +61 -8
- package/dist/desktop/row-gill.js +5 -1
- package/dist/desktop/welcome.css +87 -0
- package/dist/desktop/welcome.d.ts +20 -0
- package/dist/desktop/welcome.js +61 -0
- package/dist/desktop/widget-picker.d.ts +19 -0
- package/dist/desktop/widget-picker.js +40 -0
- package/dist/desktop-layout.js +3 -2
- package/dist/layers.d.ts +5 -0
- package/dist/layers.js +10 -2
- package/dist/oyster-platform-controls.js +30 -1
- package/dist/oyster-setup.d.ts +41 -0
- package/dist/oyster-setup.js +39 -0
- package/dist/platform-controls.d.ts +2 -0
- package/dist/platform-controls.js +11 -2
- package/dist/shell.css +42 -54
- package/dist/status-bar.js +20 -19
- package/package.json +22 -15
package/dist/status-bar.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import { AppStatusItem } from "@fungi.computer/caps/blocks/app-status-bar";
|
|
4
|
-
import { Button, } from "@fungi.computer/caps/components/button";
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useDismissOverlays } from "./layers.js";
|
|
3
|
+
import { AppStatusItem, StatusBarChip, } from "@fungi.computer/caps/blocks/app-status-bar";
|
|
5
4
|
import { CountBadge } from "@fungi.computer/caps/components/count-badge";
|
|
6
5
|
import { Status } from "@fungi.computer/caps/components/status";
|
|
7
6
|
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from "@fungi.computer/caps/components/dropdown-menu";
|
|
@@ -12,14 +11,6 @@ const statusIcons = {
|
|
|
12
11
|
processes: _jsx(Activity, { "aria-hidden": "true" }),
|
|
13
12
|
access: _jsx(ShieldCheck, { "aria-hidden": "true" }),
|
|
14
13
|
};
|
|
15
|
-
/**
|
|
16
|
-
* The one control every App status action draws with: a flat chip beside
|
|
17
|
-
* the Computer picker, never a raised key. Caps' status-bar chip replaces
|
|
18
|
-
* this composition when it ships.
|
|
19
|
-
*/
|
|
20
|
-
const StatusBarButton = forwardRef(function StatusBarButton({ label, icon, count, light, pressed, expanded, ...props }, ref) {
|
|
21
|
-
return (_jsxs(Button, { ...props, ref: ref, variant: "ghost", size: "xs", className: "caps-status-bar-picker tourtois-status-chip", ...(pressed === undefined ? {} : { "aria-pressed": pressed }), ...(expanded === undefined ? {} : { "aria-expanded": expanded }), children: [icon, light, _jsx("span", { className: "caps-status-bar-picker-label tourtois-status-chip-label", children: label }), count] }));
|
|
22
|
-
});
|
|
23
14
|
/** One App-declared status item, drawn by the shell as a flat status chip. */
|
|
24
15
|
export function WindowStatusItem({ item, container, onAction, anchorFor, }) {
|
|
25
16
|
const count = (item.kind === "button" || item.kind === "menu") &&
|
|
@@ -31,23 +22,33 @@ export function WindowStatusItem({ item, container, onAction, anchorFor, }) {
|
|
|
31
22
|
case "text":
|
|
32
23
|
return item.tone === undefined ? (_jsx(AppStatusItem, { role: "status", children: item.text })) : (_jsx(Status, { size: "compact", tone: item.tone, label: item.text }));
|
|
33
24
|
case "button":
|
|
34
|
-
return (_jsx(
|
|
25
|
+
return (_jsx(StatusBarChip, { label: item.text, icon: item.icon === undefined && light === undefined ? undefined : (_jsxs(_Fragment, { children: [item.icon === undefined ? null : statusIcons[item.icon], light] })), readout: count, title: item.title ?? item.text, disabled: item.disabled, "aria-haspopup": item.opens, ...(item.expanded === undefined ? {} : { expanded: item.expanded }), onClick: (event) => {
|
|
35
26
|
const anchor = anchorFor(event.currentTarget);
|
|
36
27
|
onAction(anchor === undefined
|
|
37
28
|
? { itemId: item.id }
|
|
38
29
|
: { itemId: item.id, anchor });
|
|
39
30
|
} }));
|
|
40
31
|
case "toggle":
|
|
41
|
-
return (_jsx(
|
|
32
|
+
return (_jsx(StatusBarChip, { label: item.text, pressed: item.pressed, onClick: () => {
|
|
42
33
|
onAction({ itemId: item.id });
|
|
43
34
|
} }));
|
|
44
35
|
case "menu":
|
|
45
36
|
// An App's menu is a plain chip: only the host's picker wears the
|
|
46
37
|
// up-down mark, so an App can't pass a menu off as the Computer.
|
|
47
|
-
return (
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
onAction({ itemId: item.id, optionId: option.id });
|
|
51
|
-
}, children: [_jsx("span", { className: "flex-1", children: option.text }), option.checked === true ? (_jsx(Check, { "aria-hidden": "true", size: 16 })) : null] }, option.id))) })] }));
|
|
38
|
+
return (_jsx(StatusMenu, { label: item.text, readout: count, title: item.title, container: container, options: item.options, onSelect: (optionId) => {
|
|
39
|
+
onAction({ itemId: item.id, optionId });
|
|
40
|
+
} }));
|
|
52
41
|
}
|
|
53
42
|
}
|
|
43
|
+
/** An App's menu chip; it shares the bar's one-open-popover rule. */
|
|
44
|
+
function StatusMenu({ label, readout, title, container, options, onSelect, }) {
|
|
45
|
+
const dismissOthers = useDismissOverlays();
|
|
46
|
+
return (_jsxs(DropdownMenu, { modal: false, onOpenChange: (open) => {
|
|
47
|
+
if (open)
|
|
48
|
+
dismissOthers();
|
|
49
|
+
}, children: [_jsx(DropdownMenuTrigger, { render: _jsx(StatusBarChip, { label: label, readout: readout, title: title }) }), _jsx(DropdownMenuContent, { container: container, align: "start", children: options.map((option) => (_jsxs(DropdownMenuItem, { disabled: option.disabled, ...(option.checked === undefined
|
|
50
|
+
? {}
|
|
51
|
+
: { role: "menuitemradio", "aria-checked": option.checked }), onSelect: () => {
|
|
52
|
+
onSelect(option.id);
|
|
53
|
+
}, children: [_jsx("span", { className: "flex-1", children: option.text }), option.checked === true ? (_jsx(Check, { "aria-hidden": "true", size: 16 })) : null] }, option.id))) })] }));
|
|
54
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fungi.computer/tourtois",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
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,18 +77,18 @@
|
|
|
77
77
|
"LICENSE"
|
|
78
78
|
],
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@fungi.computer/agar": "0.
|
|
80
|
+
"@fungi.computer/agar": "0.9.0",
|
|
81
81
|
"@fungi.computer/cairn": "0.1.0",
|
|
82
|
-
"@fungi.computer/caps": "0.
|
|
82
|
+
"@fungi.computer/caps": "0.10.0",
|
|
83
83
|
"@fungi.computer/ear-tag": "0.1.0",
|
|
84
|
-
"@fungi.computer/gills": "0.
|
|
84
|
+
"@fungi.computer/gills": "0.3.0",
|
|
85
85
|
"@fungi.computer/maosaico": "0.1.1",
|
|
86
|
-
"@fungi.computer/parakeet": "0.
|
|
87
|
-
"@fungi.computer/puffball": "0.5.
|
|
88
|
-
"@fungi.computer/shiitake": "0.12.
|
|
86
|
+
"@fungi.computer/parakeet": "0.11.0",
|
|
87
|
+
"@fungi.computer/puffball": "0.5.5",
|
|
88
|
+
"@fungi.computer/shiitake": "0.12.3",
|
|
89
89
|
"@fungi.computer/sigils": "0.3.0",
|
|
90
|
-
"@fungi.computer/sprite": "0.2.
|
|
91
|
-
"@fungi.computer/sprite-zdog": "0.3.
|
|
90
|
+
"@fungi.computer/sprite": "0.2.2",
|
|
91
|
+
"@fungi.computer/sprite-zdog": "0.3.2",
|
|
92
92
|
"@fungi.computer/whistle": "0.3.0",
|
|
93
93
|
"@tanstack/history": "1.162.1",
|
|
94
94
|
"@tanstack/react-form": "1.33.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.
|
|
103
|
+
"@fungi.computer/nacre": "0.4.0"
|
|
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.17.0",
|
|
110
110
|
"@cloudflare/workers-types": "5.20260828.1",
|
|
111
|
-
"@fungi.computer/forage": "0.3.
|
|
112
|
-
"@fungi.computer/mycelium": "0.3.
|
|
111
|
+
"@fungi.computer/forage": "0.3.5",
|
|
112
|
+
"@fungi.computer/mycelium": "0.3.8",
|
|
113
113
|
"@ladle/react": "5.1.1",
|
|
114
114
|
"@types/react": "18.3.3",
|
|
115
115
|
"@vitejs/plugin-react": "6.1.1",
|
|
@@ -147,6 +147,13 @@
|
|
|
147
147
|
"member"
|
|
148
148
|
],
|
|
149
149
|
"maxBytes": 16384
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"key": "welcome",
|
|
153
|
+
"scopes": [
|
|
154
|
+
"member"
|
|
155
|
+
],
|
|
156
|
+
"maxBytes": 256
|
|
150
157
|
}
|
|
151
158
|
],
|
|
152
159
|
"backend": {
|
|
@@ -233,14 +240,14 @@
|
|
|
233
240
|
"clean": "node --input-type=module --eval \"import { rm } from 'node:fs/promises'; await rm('dist', { recursive: true, force: true });\"",
|
|
234
241
|
"lint": "eslint src backend test workbench .ladle --max-warnings=0 && oxlint --config ../../oxlint.config.ts --deny-warnings src backend test workbench .ladle",
|
|
235
242
|
"typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.workbench.json && tsc -p backend/tsconfig.json && tsc -p test/workerd/tsconfig.json",
|
|
236
|
-
"build": "pnpm run clean && tsc -p tsconfig.build.json && cp src/shell.css src/chrome.css src/spa.css src/settings-navigation.css dist/",
|
|
243
|
+
"build": "pnpm run clean && tsc -p tsconfig.build.json && cp src/shell.css src/chrome.css src/spa.css src/settings-navigation.css dist/ && mkdir -p dist/desktop && cp src/desktop/arrange.css src/desktop/welcome.css dist/desktop/",
|
|
237
244
|
"build:spa": "vite build",
|
|
238
245
|
"dev": "vite",
|
|
239
246
|
"workbench": "ladle serve --host 127.0.0.1 --port 61001",
|
|
240
247
|
"workbench:build": "ladle build --outDir ../../.botanical/tourtois-ladle",
|
|
241
248
|
"test:overlay-layering": "node test/overlay-layering.browser.mjs",
|
|
242
249
|
"test:window-new-version": "node test/window-new-version.browser.mjs",
|
|
243
|
-
"test:workbench": "node test/workbench.browser.mjs && node test/desktop-gills.browser.mjs && node test/app-directory-isolation.browser.mjs && node test/workflows-launcher-icon.browser.mjs && node test/landing-bugs.browser.mjs && node test/show-desktop.browser.mjs && node test/window-stack.browser.mjs && node test/window-chrome-back.browser.mjs && node test/app-bar-menu.browser.mjs && node test/launcher-gill.browser.mjs && node test/desktop-storage.browser.mjs && node test/desktop-method-editing.browser.mjs && node test/phone-layout.browser.mjs && node test/phone-app-switcher.browser.mjs && node test/computer-choice.browser.mjs && node test/window-resize.browser.mjs",
|
|
250
|
+
"test:workbench": "node test/workbench.browser.mjs && node test/desktop-gills.browser.mjs && node test/app-directory-isolation.browser.mjs && node test/workflows-launcher-icon.browser.mjs && node test/landing-bugs.browser.mjs && node test/show-desktop.browser.mjs && node test/window-stack.browser.mjs && node test/window-chrome-back.browser.mjs && node test/app-bar-menu.browser.mjs && node test/launcher-gill.browser.mjs && node test/desktop-storage.browser.mjs && node test/desktop-method-editing.browser.mjs && node test/arrange-layout-shift.browser.mjs && node test/phone-layout.browser.mjs && node test/phone-app-switcher.browser.mjs && node test/computer-choice.browser.mjs && node test/window-resize.browser.mjs",
|
|
244
251
|
"test": "pnpm run test:unit && pnpm run test:merge",
|
|
245
252
|
"test:settings-icons": "node --import tsx ../../tooling/repository/scripts/workbench-proofs.mjs --output ../../.botanical/tourtois-ladle --origin-env TOURTOIS_WORKBENCH_URL test/settings-icons.browser.mjs",
|
|
246
253
|
"format:check": "node ../../tooling/repository/scripts/format-package-check.mjs",
|