@fungi.computer/tourtois 0.10.0 → 0.11.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/shell.css CHANGED
@@ -1,6 +1,8 @@
1
1
  @import "./chrome.css";
2
2
  @import "./spa.css";
3
3
  @import "./settings-navigation.css";
4
+ @import "./desktop/arrange.css";
5
+ @import "./desktop/welcome.css";
4
6
 
5
7
  /* SH-1: a 32px desktop menu bar on desktop widths, matching the window
6
8
  title bar and footer so the three chrome bars read as one system.
@@ -101,6 +103,26 @@
101
103
  padding: var(--spacing-md);
102
104
  }
103
105
 
106
+ .tourtois-app-consent-rights {
107
+ margin: 0;
108
+ padding-inline-start: var(--spacing-lg);
109
+ list-style: disc;
110
+ display: flex;
111
+ flex-direction: column;
112
+ gap: var(--spacing-xs);
113
+ }
114
+
115
+ .tourtois-app-consent-footer {
116
+ justify-content: space-between;
117
+ align-items: center;
118
+ margin-top: var(--spacing-sm);
119
+ }
120
+
121
+ .tourtois-app-consent-decision {
122
+ display: flex;
123
+ gap: var(--spacing-sm);
124
+ }
125
+
104
126
  .tourtois-settings-layout {
105
127
  display: grid;
106
128
  grid-template-columns: 9rem minmax(0, 1fr);
@@ -734,27 +756,6 @@
734
756
  overflow: auto;
735
757
  padding: 16px;
736
758
  }
737
- /* The arrange toolbar sits in the chrome layer, directly under the menu bar,
738
- so no window covers it. */
739
- .tourtois-desktop-controls {
740
- position: absolute;
741
- inset-inline: 0;
742
- top: var(--spacing-3xl);
743
- box-sizing: border-box;
744
- display: flex;
745
- flex-wrap: wrap;
746
- align-items: center;
747
- gap: 8px;
748
- padding: 8px 16px;
749
- background: var(--color-base-200);
750
- box-shadow: inset 0 -1px 0 var(--color-base-300);
751
- pointer-events: auto;
752
- }
753
- @media (min-width: 541px) {
754
- .tourtois-desktop-controls {
755
- top: var(--spacing-2xl);
756
- }
757
- }
758
759
  /* The recovery card sits mid-desktop, bounded like any panel EmptyState. */
759
760
  .tourtois-desktop-empty {
760
761
  display: grid;
@@ -764,16 +765,6 @@
764
765
  .tourtois-desktop-empty > .empty-state {
765
766
  width: min(100%, 32rem);
766
767
  }
767
- .tourtois-desktop-add-gill {
768
- width: 11rem;
769
- flex: 0 0 auto;
770
- }
771
- .tourtois-gill-controls {
772
- display: flex;
773
- flex-wrap: nowrap;
774
- align-items: center;
775
- gap: 4px;
776
- }
777
768
  .tourtois-gill-sizes {
778
769
  display: inline-flex;
779
770
  flex: 0 0 auto;
@@ -827,9 +818,6 @@
827
818
  }
828
819
 
829
820
  @media (max-width: 640px), (any-pointer: coarse) {
830
- .tourtois-gill-sizes {
831
- gap: 20px;
832
- }
833
821
  /* Reset Caps join composition when its expanded touch targets apply. */
834
822
  .tourtois-gill-sizes > .join-item {
835
823
  --join-ss: initial;
@@ -1,7 +1,6 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { forwardRef } from "react";
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(StatusBarButton, { label: item.text, icon: item.icon === undefined ? undefined : statusIcons[item.icon], count: count, light: light, title: item.title ?? item.text, disabled: item.disabled, "aria-haspopup": item.opens, ...(item.expanded === undefined ? {} : { expanded: item.expanded }), onClick: (event) => {
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(StatusBarButton, { label: item.text, pressed: item.pressed, onClick: () => {
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 (_jsxs(DropdownMenu, { modal: false, children: [_jsx(DropdownMenuTrigger, { render: _jsx(StatusBarButton, { label: item.text, count: count, title: item.title }) }), _jsx(DropdownMenuContent, { container: container, align: "start", children: item.options.map((option) => (_jsxs(DropdownMenuItem, { disabled: option.disabled, ...(option.checked === undefined
48
- ? {}
49
- : { role: "menuitemradio", "aria-checked": option.checked }), onSelect: () => {
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.10.0",
3
+ "version": "0.11.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.8.0",
80
+ "@fungi.computer/agar": "0.9.0",
81
81
  "@fungi.computer/cairn": "0.1.0",
82
- "@fungi.computer/caps": "0.8.0",
82
+ "@fungi.computer/caps": "0.9.0",
83
83
  "@fungi.computer/ear-tag": "0.1.0",
84
- "@fungi.computer/gills": "0.2.2",
84
+ "@fungi.computer/gills": "0.3.0",
85
85
  "@fungi.computer/maosaico": "0.1.1",
86
- "@fungi.computer/parakeet": "0.9.2",
87
- "@fungi.computer/puffball": "0.5.4",
88
- "@fungi.computer/shiitake": "0.12.2",
86
+ "@fungi.computer/parakeet": "0.10.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.1",
91
- "@fungi.computer/sprite-zdog": "0.3.1",
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.2.3"
103
+ "@fungi.computer/nacre": "0.3.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.15.0",
109
+ "@fungi.computer/oyster": "0.16.0",
110
110
  "@cloudflare/workers-types": "5.20260828.1",
111
- "@fungi.computer/forage": "0.3.4",
112
- "@fungi.computer/mycelium": "0.3.7",
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",