@aeolus-fleet/ui 0.37.2 → 0.38.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.
Files changed (36) hide show
  1. package/dist/atoms/ship-state.d.ts +32 -0
  2. package/dist/atoms/ship-state.js +43 -0
  3. package/dist/atoms/ship-state.js.map +1 -0
  4. package/dist/index.d.ts +7 -0
  5. package/dist/index.js +7 -0
  6. package/dist/index.js.map +1 -1
  7. package/dist/molecules/app-switcher.d.ts +7 -4
  8. package/dist/molecules/app-switcher.js +8 -5
  9. package/dist/molecules/app-switcher.js.map +1 -1
  10. package/dist/molecules/avatar-menu.d.ts +12 -2
  11. package/dist/molecules/avatar-menu.js +5 -3
  12. package/dist/molecules/avatar-menu.js.map +1 -1
  13. package/dist/molecules/harbour-activity.d.ts +7 -0
  14. package/dist/molecules/harbour-activity.js +36 -0
  15. package/dist/molecules/harbour-activity.js.map +1 -0
  16. package/dist/molecules/harbour-group.d.ts +15 -0
  17. package/dist/molecules/harbour-group.js +17 -0
  18. package/dist/molecules/harbour-group.js.map +1 -0
  19. package/dist/molecules/harbour-numbers.d.ts +14 -0
  20. package/dist/molecules/harbour-numbers.js +42 -0
  21. package/dist/molecules/harbour-numbers.js.map +1 -0
  22. package/dist/molecules/harbour-state.d.ts +14 -0
  23. package/dist/molecules/harbour-state.js +24 -0
  24. package/dist/molecules/harbour-state.js.map +1 -0
  25. package/dist/molecules/harbour-tile.d.ts +25 -0
  26. package/dist/molecules/harbour-tile.js +54 -0
  27. package/dist/molecules/harbour-tile.js.map +1 -0
  28. package/dist/organisms/app-header.d.ts +14 -8
  29. package/dist/organisms/app-header.js +9 -6
  30. package/dist/organisms/app-header.js.map +1 -1
  31. package/dist/organisms/harbour.d.ts +44 -0
  32. package/dist/organisms/harbour.js +30 -0
  33. package/dist/organisms/harbour.js.map +1 -0
  34. package/dist/theme.css +16 -0
  35. package/dist/tokens.css +26 -18
  36. package/package.json +2 -2
@@ -0,0 +1,32 @@
1
+ /**
2
+ * A ship's state as every app shows it (docs/design/state-colours, "Without
3
+ * colour"): one icon and one word per state, in the tone that means it
4
+ * (conventions.md, Colour). The five states, first match wins, then the
5
+ * status that shows beside them: Crewed and Retired. SHIP_STATES holds them
6
+ * in the order the sheet draws them.
7
+ */
8
+ export declare const SHIP_STATES: readonly ["alert", "awaitingCrew", "blocked", "working", "idle", "crewed", "retired"];
9
+ export type ShipStateShown = (typeof SHIP_STATES)[number];
10
+ /** A state's word alone, for a title or a sentence: "Awaiting crew". */
11
+ export declare function shipStateWordOf(state: ShipStateShown): string;
12
+ /** The sheet draws a caption word in a line 17 px tall, its normal line height, not the caption token's 16. */
13
+ declare const SIZES: {
14
+ readonly meta: "text-meta";
15
+ readonly caption: "text-caption leading-4.25";
16
+ };
17
+ interface ShipStateBase {
18
+ /** The word's size: meta in a list or on a page, caption on a tile or a number. A badge is always caption. */
19
+ size?: keyof typeof SIZES;
20
+ className?: string;
21
+ }
22
+ /** Only Alert has a badge: filled in its tone, after a ship's status. The sheet draws no other. */
23
+ export type ShipStateProps = ShipStateBase & ({
24
+ state: 'alert';
25
+ isBadge?: boolean;
26
+ } | {
27
+ state: Exclude<ShipStateShown, 'alert'>;
28
+ isBadge?: never;
29
+ });
30
+ /** A ship's state or status: its icon and word in its tone; Alert also as a badge. */
31
+ export declare function ShipState({ state, isBadge, size, className }: ShipStateProps): import("react").JSX.Element;
32
+ export {};
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Activity, Archive, CircleDashed, CirclePause, OctagonPause, TriangleAlert, UserCheck } from 'lucide-react';
3
+ import { classNames } from '../class-names.js';
4
+ /**
5
+ * A ship's state as every app shows it (docs/design/state-colours, "Without
6
+ * colour"): one icon and one word per state, in the tone that means it
7
+ * (conventions.md, Colour). The five states, first match wins, then the
8
+ * status that shows beside them: Crewed and Retired. SHIP_STATES holds them
9
+ * in the order the sheet draws them.
10
+ */
11
+ export const SHIP_STATES = ['alert', 'awaitingCrew', 'blocked', 'working', 'idle', 'crewed', 'retired'];
12
+ const LOOKS = {
13
+ alert: { word: 'Alert', Icon: TriangleAlert, tone: 'attention' },
14
+ awaitingCrew: { word: 'Awaiting crew', Icon: CircleDashed, tone: 'waiting' },
15
+ blocked: { word: 'Blocked', Icon: OctagonPause, tone: 'blocked' },
16
+ working: { word: 'Working', Icon: Activity, tone: 'active' },
17
+ idle: { word: 'Idle', Icon: CirclePause, tone: null },
18
+ crewed: { word: 'Crewed', Icon: UserCheck, tone: 'ok' },
19
+ retired: { word: 'Retired', Icon: Archive, tone: 'ended' },
20
+ };
21
+ /** A state's word alone, for a title or a sentence: "Awaiting crew". */
22
+ export function shipStateWordOf(state) {
23
+ return LOOKS[state].word;
24
+ }
25
+ /** Text and icon in the tone's foreground; Idle in the muted foreground. */
26
+ const TONE_TEXT = {
27
+ attention: 'text-tone-attention-fg',
28
+ waiting: 'text-tone-waiting-fg',
29
+ blocked: 'text-tone-blocked-fg',
30
+ active: 'text-tone-active-fg',
31
+ ok: 'text-tone-ok-fg',
32
+ ended: 'text-tone-ended-fg',
33
+ none: 'text-muted-foreground',
34
+ };
35
+ /** The sheet draws a caption word in a line 17 px tall, its normal line height, not the caption token's 16. */
36
+ const SIZES = { meta: 'text-meta', caption: 'text-caption leading-4.25' };
37
+ /** A ship's state or status: its icon and word in its tone; Alert also as a badge. */
38
+ export function ShipState({ state, isBadge = false, size = 'meta', className }) {
39
+ const { word, Icon, tone: toneOrNone } = LOOKS[state];
40
+ const tone = toneOrNone ?? 'none';
41
+ return (_jsxs("span", { "data-testid": "ship-state", "data-tone": tone, className: classNames('inline-flex items-center gap-1.25 font-medium', TONE_TEXT[tone], isBadge ? classNames('rounded-full border border-tone-attention-border bg-tone-attention-bg px-2 py-px', SIZES.caption) : SIZES[size], className), children: [_jsx(Icon, { "aria-hidden": true, className: "size-3.5 shrink-0" }), word] }));
42
+ }
43
+ //# sourceMappingURL=ship-state.js.map
@@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CAAC;AAC3B,CAAC;AAED,4EAA4E;AAC5E,MAAM,SAAS,GAAkC;IAC/C,SAAS,EAAE,wBAAwB;IACnC,OAAO,EAAE,sBAAsB;IAC/B,OAAO,EAAE,sBAAsB;IAC/B,MAAM,EAAE,qBAAqB;IAC7B,EAAE,EAAE,iBAAiB;IACrB,KAAK,EAAE,oBAAoB;IAC3B,IAAI,EAAE,uBAAuB;CAC9B,CAAC;AAEF,+GAA+G;AAC/G,MAAM,KAAK,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,2BAA2B,EAAW,CAAC;AAWnF,sFAAsF;AACtF,MAAM,UAAU,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,GAAG,KAAK,EAAE,IAAI,GAAG,MAAM,EAAE,SAAS,EAAkB;IAC5F,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;IACtD,MAAM,IAAI,GAAG,UAAU,IAAI,MAAM,CAAC;IAClC,OAAO,CACL,+BACc,YAAY,eACb,IAAI,EACf,SAAS,EAAE,UAAU,CACnB,+CAA+C,EAC/C,SAAS,CAAC,IAAI,CAAC,EACf,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,kFAAkF,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EACrI,SAAS,CACV,aAED,KAAC,IAAI,yBAAa,SAAS,EAAC,mBAAmB,GAAG,EACjD,IAAI,IACA,CACR,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -11,13 +11,20 @@ export * from './atoms/dialog-surface.js';
11
11
  export * from './atoms/dropdown-menu.js';
12
12
  export * from './atoms/kbd.js';
13
13
  export * from './atoms/sheet.js';
14
+ export * from './atoms/ship-state.js';
14
15
  export * from './atoms/tooltip.js';
15
16
  export * from './class-names.js';
16
17
  export * from './molecules/app-switcher.js';
17
18
  export * from './molecules/avatar-entry.js';
18
19
  export * from './molecules/avatar-menu.js';
20
+ export * from './molecules/harbour-activity.js';
21
+ export * from './molecules/harbour-group.js';
22
+ export * from './molecules/harbour-numbers.js';
23
+ export * from './molecules/harbour-state.js';
24
+ export * from './molecules/harbour-tile.js';
19
25
  export * from './molecules/signed-in-as.js';
20
26
  export * from './organisms/app-header.js';
21
27
  export * from './organisms/command-palette.js';
28
+ export * from './organisms/harbour.js';
22
29
  export * from './organisms/sign-in-background.js';
23
30
  export * from './organisms/sign-in-backgrounds.js';
package/dist/index.js CHANGED
@@ -11,14 +11,21 @@ export * from './atoms/dialog-surface.js';
11
11
  export * from './atoms/dropdown-menu.js';
12
12
  export * from './atoms/kbd.js';
13
13
  export * from './atoms/sheet.js';
14
+ export * from './atoms/ship-state.js';
14
15
  export * from './atoms/tooltip.js';
15
16
  export * from './class-names.js';
16
17
  export * from './molecules/app-switcher.js';
17
18
  export * from './molecules/avatar-entry.js';
18
19
  export * from './molecules/avatar-menu.js';
20
+ export * from './molecules/harbour-activity.js';
21
+ export * from './molecules/harbour-group.js';
22
+ export * from './molecules/harbour-numbers.js';
23
+ export * from './molecules/harbour-state.js';
24
+ export * from './molecules/harbour-tile.js';
19
25
  export * from './molecules/signed-in-as.js';
20
26
  export * from './organisms/app-header.js';
21
27
  export * from './organisms/command-palette.js';
28
+ export * from './organisms/harbour.js';
22
29
  export * from './organisms/sign-in-background.js';
23
30
  export * from './organisms/sign-in-backgrounds.js';
24
31
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AACzC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,uBAAuB,CAAC;AACtC,cAAc,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iCAAiC,CAAC;AAChD,cAAc,8BAA8B,CAAC;AAC7C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wBAAwB,CAAC;AACvC,cAAc,mCAAmC,CAAC;AAClD,cAAc,oCAAoC,CAAC"}
@@ -3,10 +3,13 @@ interface AppSwitcherProps {
3
3
  switcher: AppSwitcherModel;
4
4
  /**
5
5
  * full: "Acme / Console ▾", the fleet part switching fleet and the app part
6
- * switching app, each a menu. compact (phone, H6): "Console ▾", one bottom
7
- * Sheet with the fleets, then the apps.
6
+ * switching app, each a menu. fleet: "Acme", one menu with the fleets, then
7
+ * the apps, for an app whose breadcrumb follows the fleet. compact (phone,
8
+ * H6): "Console ▾", one bottom Sheet with the fleets, then the apps.
8
9
  */
9
- layout: 'full' | 'compact';
10
+ layout: 'full' | 'fleet' | 'compact';
11
+ /** compact: what the title reads in place of the app's name, such as the page's ("Fleet"). */
12
+ title?: string;
10
13
  className?: string;
11
14
  }
12
15
  /**
@@ -16,5 +19,5 @@ interface AppSwitcherProps {
16
19
  * until the browser leaves. Without anywhere else to go it is plain text,
17
20
  * with no ▾.
18
21
  */
19
- export declare function AppSwitcher({ switcher, layout, className }: AppSwitcherProps): import("react").JSX.Element;
22
+ export declare function AppSwitcher({ switcher, layout, title, className }: AppSwitcherProps): import("react").JSX.Element;
20
23
  export {};
@@ -1,9 +1,9 @@
1
1
  'use client';
2
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Check, ChevronDown, LoaderCircle } from 'lucide-react';
4
4
  import { useState } from 'react';
5
5
  import { Button } from '../atoms/button.js';
6
- import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuTrigger } from '../atoms/dropdown-menu.js';
6
+ import { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from '../atoms/dropdown-menu.js';
7
7
  import { Sheet, SheetClose, SheetContent, SheetTitle, SheetTrigger } from '../atoms/sheet.js';
8
8
  import { classNames } from '../class-names.js';
9
9
  const triggerClass = 'inline-flex min-w-0 items-center gap-1 rounded-md px-1.5 py-1 text-body font-semibold text-foreground outline-none transition-colors duration-(--duration-fast) hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring aria-expanded:bg-accent disabled:opacity-60';
@@ -43,14 +43,17 @@ function SheetGroup({ label, children }) {
43
43
  * until the browser leaves. Without anywhere else to go it is plain text,
44
44
  * with no ▾.
45
45
  */
46
- export function AppSwitcher({ switcher, layout, className }) {
46
+ export function AppSwitcher({ switcher, layout, title, className }) {
47
47
  const [opening, setOpening] = useState(undefined);
48
48
  const { fleet, appLabel, fleets, apps, canSwitch } = switcher;
49
49
  if (!canSwitch) {
50
- return (_jsxs("p", { "data-testid": "app-switcher", className: classNames('flex min-w-0 items-center gap-1 px-1.5 text-body font-semibold text-foreground', className), children: [layout === 'full' ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "truncate", children: fleet.name }), _jsx("span", { "aria-hidden": true, className: "text-muted-foreground", children: "/" })] })) : null, _jsx("span", { className: "truncate", children: appLabel })] }));
50
+ return (_jsxs("p", { "data-testid": "app-switcher", className: classNames('flex min-w-0 items-center gap-1 px-1.5 text-body font-semibold text-foreground', layout === 'fleet' && 'px-0 font-normal text-muted-foreground', layout === 'compact' && title !== undefined && 'text-title-touch', className), children: [layout === 'compact' ? null : _jsx("span", { className: "truncate", children: fleet.name }), layout === 'full' ? _jsx("span", { "aria-hidden": true, className: "text-muted-foreground", children: "/" }) : null, layout === 'fleet' ? null : _jsx("span", { className: "truncate", children: title ?? appLabel })] }));
51
51
  }
52
52
  if (layout === 'compact') {
53
- return (_jsxs(Sheet, { children: [_jsxs(SheetTrigger, { "data-testid": "app-switcher", "aria-label": `Switch fleet or app: ${fleet.name}, ${appLabel}`, className: classNames(triggerClass, 'text-title-touch', className), children: [_jsx("span", { className: "truncate", children: appLabel }), opening === undefined ? _jsx(ChevronDown, { "aria-hidden": true, className: "size-(--size-icon) shrink-0 text-muted-foreground" }) : _jsx(LoaderCircle, { "aria-hidden": true, className: "size-(--size-icon) shrink-0 animate-spin motion-reduce:animate-none" })] }), _jsxs(SheetContent, { side: "bottom", "data-testid": "app-switcher-sheet", className: "gap-3", children: [_jsx(SheetTitle, { className: "sr-only", children: "Switch fleet or app" }), _jsx(SheetGroup, { label: "Fleets", children: fleets.map((choice) => (_jsx(SheetChoice, { url: choice.url, name: choice.name, isCurrent: choice.isCurrent, opening: opening, onOpen: setOpening, testId: "app-switcher-fleet" }, choice.id))) }), _jsx(SheetGroup, { label: "Apps", children: apps.map((choice) => (_jsx(SheetChoice, { url: choice.url, name: choice.label, isCurrent: choice.isCurrent, opening: opening, onOpen: setOpening, testId: "app-switcher-app" }, choice.app))) }), _jsx(SheetClose, { render: _jsx(Button, { size: "touch", className: "w-full" }), children: "Cancel" })] })] }));
53
+ return (_jsxs(Sheet, { children: [_jsxs(SheetTrigger, { "data-testid": "app-switcher", "aria-label": `Switch fleet or app: ${fleet.name}, ${appLabel}`, className: classNames(triggerClass, 'text-title-touch', className), children: [_jsx("span", { className: "truncate", children: title ?? appLabel }), opening === undefined ? _jsx(ChevronDown, { "aria-hidden": true, className: "size-(--size-icon) shrink-0 text-muted-foreground" }) : _jsx(LoaderCircle, { "aria-hidden": true, className: "size-(--size-icon) shrink-0 animate-spin motion-reduce:animate-none" })] }), _jsxs(SheetContent, { side: "bottom", "data-testid": "app-switcher-sheet", className: "gap-3", children: [_jsx(SheetTitle, { className: "sr-only", children: "Switch fleet or app" }), _jsx(SheetGroup, { label: "Fleets", children: fleets.map((choice) => (_jsx(SheetChoice, { url: choice.url, name: choice.name, isCurrent: choice.isCurrent, opening: opening, onOpen: setOpening, testId: "app-switcher-fleet" }, choice.id))) }), _jsx(SheetGroup, { label: "Apps", children: apps.map((choice) => (_jsx(SheetChoice, { url: choice.url, name: choice.label, isCurrent: choice.isCurrent, opening: opening, onOpen: setOpening, testId: "app-switcher-app" }, choice.app))) }), _jsx(SheetClose, { render: _jsx(Button, { size: "touch", className: "w-full" }), children: "Cancel" })] })] }));
54
+ }
55
+ if (layout === 'fleet') {
56
+ return (_jsx("nav", { "aria-label": "Fleet and app", "data-testid": "app-switcher", className: classNames('flex min-w-0 items-center', className), children: _jsxs(DropdownMenu, { children: [_jsxs(DropdownMenuTrigger, { "data-testid": "app-switcher-fleets", "aria-label": `Fleet: ${fleet.name}, ${appLabel}. Switch fleet or app`, className: classNames(triggerClass, '-mx-1.5 font-normal text-muted-foreground hover:text-foreground'), children: [_jsx("span", { className: "truncate", children: fleet.name }), opening === undefined ? null : _jsx(LoaderCircle, { "aria-hidden": true, className: "size-(--size-icon-sm) shrink-0 animate-spin motion-reduce:animate-none" })] }), _jsxs(DropdownMenuContent, { align: "start", className: "w-56", children: [_jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuLabel, { children: "Fleets" }), fleets.map((choice) => (_jsx(MenuChoice, { url: choice.url, name: choice.name, isCurrent: choice.isCurrent, opening: opening, onOpen: setOpening, testId: "app-switcher-fleet" }, choice.id)))] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuLabel, { children: "Apps" }), apps.map((choice) => (_jsx(MenuChoice, { url: choice.url, name: choice.label, isCurrent: choice.isCurrent, opening: opening, onOpen: setOpening, testId: "app-switcher-app" }, choice.app)))] })] })] }) }));
54
57
  }
55
58
  return (_jsxs("nav", { "aria-label": "Fleet and app", "data-testid": "app-switcher", className: classNames('flex min-w-0 items-center gap-0.5', className), children: [_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { "data-testid": "app-switcher-fleets", "aria-label": `Fleet: ${fleet.name}. Switch fleet`, className: triggerClass, children: _jsx("span", { className: "truncate", children: fleet.name }) }), _jsx(DropdownMenuContent, { align: "start", className: "w-56", children: _jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuLabel, { children: "Fleets" }), fleets.map((choice) => (_jsx(MenuChoice, { url: choice.url, name: choice.name, isCurrent: choice.isCurrent, opening: opening, onOpen: setOpening, testId: "app-switcher-fleet" }, choice.id)))] }) })] }), _jsx("span", { "aria-hidden": true, className: "text-muted-foreground", children: "/" }), _jsxs(DropdownMenu, { children: [_jsxs(DropdownMenuTrigger, { "data-testid": "app-switcher-apps", "aria-label": `App: ${appLabel}. Switch app`, className: triggerClass, children: [_jsx("span", { className: "truncate", children: appLabel }), opening === undefined ? _jsx(ChevronDown, { "aria-hidden": true, className: "size-(--size-icon-sm) shrink-0 text-muted-foreground" }) : _jsx(LoaderCircle, { "aria-hidden": true, className: "size-(--size-icon-sm) shrink-0 animate-spin motion-reduce:animate-none" })] }), _jsx(DropdownMenuContent, { align: "start", className: "w-56", children: _jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuLabel, { children: "Apps" }), apps.map((choice) => (_jsx(MenuChoice, { url: choice.url, name: choice.label, isCurrent: choice.isCurrent, opening: opening, onOpen: setOpening, testId: "app-switcher-app" }, choice.app)))] }) })] })] }));
56
59
  }
@@ -1 +1 @@
1
- {"version":3,"file":"app-switcher.js","sourceRoot":"","sources":["../../src/molecules/app-switcher.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAGjD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAC3J,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAC9F,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAmB/C,MAAM,YAAY,GAChB,gRAAgR,CAAC;AAEnR,6EAA6E;AAC7E,SAAS,IAAI,CAAC,EAAE,SAAS,EAAE,SAAS,EAA8C;IAChF,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,KAAC,YAAY,yBAAa,SAAS,EAAC,iDAAiD,GAAG,CAAC;IAClG,CAAC;IACD,OAAO,SAAS,CAAC,CAAC,CAAC,KAAC,KAAK,yBAAa,SAAS,EAAC,SAAS,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC;AACtE,CAAC;AAED,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EAAE,MAAM,CAAC,GAAG,EAAE,IAAI,EAAE,MAAM,CAAC,KAAK,EAAE,SAAS,EAAE,MAAM,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAC,kBAAkB,IAA7I,MAAM,CAAC,GAAG,CAAsI,CAClK,CAAC,IACgB,GACA,IACT,IACX,CACP,CAAC;AACJ,CAAC"}
@@ -27,13 +27,22 @@ export interface AvatarMenuProps {
27
27
  isSigningOut: boolean;
28
28
  entries?: readonly AvatarMenuEntry[];
29
29
  }
30
+ interface AvatarMenuLayout {
31
+ /** avatar: the avatar alone, last in a header. row: the avatar, the name and the caption, in an app's sidebar foot. */
32
+ layout?: 'avatar' | 'row';
33
+ /** row: the line under the name, such as the fleet in view ("Acme fleet"). */
34
+ caption?: string;
35
+ className?: string;
36
+ }
30
37
  /**
31
- * The avatar menu on desktop (header design H8, H10, H13): the avatar opens a
38
+ * The avatar menu on desktop (header design H8, H10, H13): the avatar, last in
39
+ * a header, or a row of the avatar, the name and a caption in an app's sidebar
40
+ * foot (docs/design/fleet-overview), opens a
32
41
  * DropdownMenu with who is signed in here and how, the account's own pages
33
42
  * in Account, the app's entries, the theme (applied at once), keyboard
34
43
  * shortcuts, help and sign out, which shows "Signing out" until it ends.
35
44
  */
36
- export declare function AvatarMenu(props: AvatarMenuProps): import("react").JSX.Element;
45
+ export declare function AvatarMenu(props: AvatarMenuProps & AvatarMenuLayout): import("react").JSX.Element;
37
46
  /**
38
47
  * The avatar menu on phone (H6): the avatar opens the same content as a
39
48
  * bottom Sheet, with the app's phone-only entries for what its tab bar
@@ -41,3 +50,4 @@ export declare function AvatarMenu(props: AvatarMenuProps): import("react").JSX.
41
50
  * phone.
42
51
  */
43
52
  export declare function AvatarMenuSheet(props: AvatarMenuProps): import("react").JSX.Element;
53
+ export {};
@@ -49,17 +49,19 @@ function ShortcutsDialog({ isOpen, onOpenChange, shortcuts }) {
49
49
  return (_jsx(Dialog, { open: isOpen, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { size: "sm", "data-testid": "avatar-menu-shortcuts-dialog", children: [_jsxs(DialogHeader, { children: [_jsx(DialogTitle, { children: "Keyboard shortcuts" }), _jsx(DialogDescription, { children: "What the keys do here." })] }), _jsx("ul", { className: "flex flex-col gap-2", children: shortcuts.map((shortcut) => (_jsxs("li", { className: "flex items-center justify-between gap-4 text-body text-foreground", children: [shortcut.label, _jsx("span", { className: "flex gap-1", children: shortcut.keys.map((key) => (_jsx(Kbd, { children: key }, key))) })] }, shortcut.label))) })] }) }));
50
50
  }
51
51
  /**
52
- * The avatar menu on desktop (header design H8, H10, H13): the avatar opens a
52
+ * The avatar menu on desktop (header design H8, H10, H13): the avatar, last in
53
+ * a header, or a row of the avatar, the name and a caption in an app's sidebar
54
+ * foot (docs/design/fleet-overview), opens a
53
55
  * DropdownMenu with who is signed in here and how, the account's own pages
54
56
  * in Account, the app's entries, the theme (applied at once), keyboard
55
57
  * shortcuts, help and sign out, which shows "Signing out" until it ends.
56
58
  */
57
59
  export function AvatarMenu(props) {
58
- const { name, signedInAs, accountUrl, theme, themes, hasTheme, onThemeChange, shortcuts, helpUrl, onSignOut, isSigningOut, entries = [] } = props;
60
+ const { name, signedInAs, accountUrl, theme, themes, hasTheme, onThemeChange, shortcuts, helpUrl, onSignOut, isSigningOut, entries = [], layout = 'avatar', caption, className } = props;
59
61
  const [isShortcutsOpen, setIsShortcutsOpen] = useState(false);
60
62
  const shown = displayNameOf(name, signedInAs);
61
63
  const label = `Account menu, ${shown}${signedInAs === undefined ? '' : `, ${signedInAsOf(signedInAs)}`}`;
62
- return (_jsxs(_Fragment, { children: [_jsxs(DropdownMenu, { children: [_jsx(DropdownMenuTrigger, { "data-testid": "avatar-menu", "aria-label": label, className: "inline-flex size-(--size-control) shrink-0 items-center justify-center rounded-full outline-none focus-visible:outline-2 focus-visible:outline-ring", children: _jsx(Avatar, { kind: signedInAs === 'argo' ? 'argo' : 'account', size: 28, name: shown }) }), _jsxs(DropdownMenuContent, { align: "end", className: "w-64", children: [_jsx(WhoHeader, { name: name, signedInAs: signedInAs, session: props.session }), accountUrl === undefined
64
+ return (_jsxs(_Fragment, { children: [_jsxs(DropdownMenu, { children: [layout === 'row' ? (_jsxs(DropdownMenuTrigger, { "data-testid": "avatar-menu", "aria-label": label, className: classNames('flex w-full min-w-0 items-center gap-2.5 rounded-md p-2 text-left outline-none transition-colors duration-(--duration-fast) hover:bg-accent focus-visible:outline-2 focus-visible:outline-ring aria-expanded:bg-accent', className), children: [_jsx(Avatar, { kind: signedInAs === 'argo' ? 'argo' : 'account', size: 28, name: shown }), _jsxs("span", { "data-slot": "avatar-menu-words", className: "flex min-w-0 flex-col", children: [_jsx("span", { className: "truncate text-body font-medium text-foreground", children: shown }), caption === undefined ? null : _jsx("span", { className: "truncate text-caption text-muted-foreground", children: caption })] })] })) : (_jsx(DropdownMenuTrigger, { "data-testid": "avatar-menu", "aria-label": label, className: classNames('inline-flex size-(--size-control) shrink-0 items-center justify-center rounded-full outline-none focus-visible:outline-2 focus-visible:outline-ring', className), children: _jsx(Avatar, { kind: signedInAs === 'argo' ? 'argo' : 'account', size: 28, name: shown }) })), _jsxs(DropdownMenuContent, { align: layout === 'row' ? 'start' : 'end', side: layout === 'row' ? 'top' : 'bottom', className: "w-64", children: [_jsx(WhoHeader, { name: name, signedInAs: signedInAs, session: props.session }), accountUrl === undefined
63
65
  ? null
64
66
  : accountPagesOf(accountUrl).map(({ key, label: pageLabel, href, Icon }) => (_jsxs(DropdownMenuItem, { "data-testid": `avatar-menu-${key}`, render: (itemProps) => (_jsx("a", { ...itemProps, href: href, children: itemProps.children })), children: [_jsx(Icon, { "aria-hidden": true }), pageLabel] }, key))), entries
65
67
  .filter((entry) => entry.isPhoneOnly !== true)
@@ -1 +1 @@
1
- {"version":3,"file":"avatar-menu.js","sourceRoot":"","sources":["../../src/molecules/avatar-menu.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO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SAAS,EAAC,SAAS,sCAA6B,IACpD,EACJ,iBAAQ,IAAI,EAAC,QAAQ,iBAAa,sBAAsB,EAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,YACtH,KAAC,YAAY,IAAC,YAAY,EAAE,YAAY,GAAI,GACrC,EACT,KAAC,UAAU,IAAC,MAAM,EAAE,KAAC,MAAM,IAAC,IAAI,EAAC,OAAO,EAAC,SAAS,EAAC,iBAAiB,GAAG,uBAAqB,IAC/E,IACT,CACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * When a ship last did something, in the words of Harbour's tile, so the
3
+ * console and Bridge say it alike (docs/design/fleet-overview, "The tile"):
4
+ * now, 25 min, 3 h, yesterday, 2 d up to 6 d, then the date (28 Oct); "No
5
+ * activity yet" while it did nothing.
6
+ */
7
+ export declare function lastActivityWordsOf(lastActivityAt: string | null, now: Date): string;
@@ -0,0 +1,36 @@
1
+ const MINUTE_MS = 60_000;
2
+ const MINUTES_IN_HOUR = 60;
3
+ const HOURS_IN_DAY = 24;
4
+ /** From two days ago a tile counts days; from a week ago it gives the date. */
5
+ const DAYS_COUNTED_FROM = 2;
6
+ const DAYS_IN_WEEK = 7;
7
+ const MONTHS = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
8
+ /**
9
+ * When a ship last did something, in the words of Harbour's tile, so the
10
+ * console and Bridge say it alike (docs/design/fleet-overview, "The tile"):
11
+ * now, 25 min, 3 h, yesterday, 2 d up to 6 d, then the date (28 Oct); "No
12
+ * activity yet" while it did nothing.
13
+ */
14
+ export function lastActivityWordsOf(lastActivityAt, now) {
15
+ if (lastActivityAt === null) {
16
+ return 'No activity yet';
17
+ }
18
+ const at = new Date(lastActivityAt);
19
+ const minutes = Math.floor((now.getTime() - at.getTime()) / MINUTE_MS);
20
+ if (minutes < 1) {
21
+ return 'now';
22
+ }
23
+ if (minutes < MINUTES_IN_HOUR) {
24
+ return `${String(minutes)} min`;
25
+ }
26
+ const hours = Math.floor(minutes / MINUTES_IN_HOUR);
27
+ if (hours < HOURS_IN_DAY) {
28
+ return `${String(hours)} h`;
29
+ }
30
+ const days = Math.floor(hours / HOURS_IN_DAY);
31
+ if (days < DAYS_COUNTED_FROM) {
32
+ return 'yesterday';
33
+ }
34
+ return days < DAYS_IN_WEEK ? `${String(days)} d` : `${String(at.getDate())} ${MONTHS[at.getMonth()] ?? ''}`;
35
+ }
36
+ //# sourceMappingURL=harbour-activity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harbour-activity.js","sourceRoot":"","sources":["../../src/molecules/harbour-activity.ts"],"names":[],"mappings":"AAAA,MAAM,SAAS,GAAG,MAAM,CAAC;AACzB,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,YAAY,GAAG,EAAE,CAAC;AACxB,+EAA+E;AAC/E,MAAM,iBAAiB,GAAG,CAAC,CAAC;AAC5B,MAAM,YAAY,GAAG,CAAC,CAAC;AAEvB,MAAM,MAAM,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAU,CAAC;AAE7G;;;;;GAKG;AACH,MAAM,UAAU,mBAAmB,CAAC,cAA6B,EAAE,GAAS;IAC1E,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;QAC5B,OAAO,iBAAiB,CAAC;IAC3B,CAAC;IACD,MAAM,EAAE,GAAG,IAAI,IAAI,CAAC,cAAc,CAAC,CAAC;IACpC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC,CAAC;IACvE,IAAI,OAAO,GAAG,CAAC,EAAE,CAAC;QAChB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,OAAO,GAAG,eAAe,EAAE,CAAC;QAC9B,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC;IAClC,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,eAAe,CAAC,CAAC;IACpD,IAAI,KAAK,GAAG,YAAY,EAAE,CAAC;QACzB,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;IAC9B,CAAC;IACD,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,YAAY,CAAC,CAAC;IAC9C,IAAI,IAAI,GAAG,iBAAiB,EAAE,CAAC;QAC7B,OAAO,WAAW,CAAC;IACrB,CAAC;IACD,OAAO,IAAI,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC;AAC9G,CAAC"}
@@ -0,0 +1,15 @@
1
+ import type { ShipId } from '@aeolus-fleet/common';
2
+ import type { useRender } from '@base-ui/react/use-render';
3
+ import { type HarbourGroupKind } from './harbour-state.js';
4
+ import { type HarbourTileShip } from './harbour-tile.js';
5
+ export interface HarbourGroupProps {
6
+ kind: HarbourGroupKind;
7
+ /** Its ships, in the order given: the app orders them (alert, waiting, working, idle). */
8
+ tiles: readonly HarbourTileShip[];
9
+ /** Each ship's page; none draws tiles that are not links. */
10
+ hrefOf?: (shipId: ShipId) => string;
11
+ link?: useRender.RenderProp;
12
+ now: Date;
13
+ }
14
+ /** One of Harbour's groups (docs/design/fleet-overview): its icon, word and how many ships it holds, then its tiles. */
15
+ export declare function HarbourGroup({ kind, tiles, hrefOf, link, now }: HarbourGroupProps): import("react").JSX.Element;
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { HARBOUR_GROUP_LOOK } from './harbour-state.js';
4
+ import { HarbourTile } from './harbour-tile.js';
5
+ /**
6
+ * The tiles' columns, by Harbour's own width (a container query on Harbour,
7
+ * docs/design/fleet-overview): as many tiles of at least 14rem as fit (four at
8
+ * the console's 1440, seven at 1920, three in Bridge's column at 1920, one
9
+ * in Bridge's column at 1440), two a row on a phone, under 24rem.
10
+ */
11
+ const TILE_COLUMNS = 'grid-cols-[repeat(auto-fill,minmax(14rem,1fr))] @max-[24rem]:grid-cols-2';
12
+ /** One of Harbour's groups (docs/design/fleet-overview): its icon, word and how many ships it holds, then its tiles. */
13
+ export function HarbourGroup({ kind, tiles, hrefOf, link, now }) {
14
+ const { word, Icon } = HARBOUR_GROUP_LOOK[kind];
15
+ return (_jsxs("section", { "aria-label": word, className: "flex flex-col gap-2", "data-testid": `harbour-group-${kind}`, children: [_jsxs("h3", { className: "flex items-center gap-2 text-body leading-5 font-semibold", children: [_jsx(Icon, { "aria-hidden": true, className: "size-4 shrink-0" }), word, _jsx("span", { className: "font-normal text-muted-foreground tabular-nums", children: tiles.length })] }), _jsx("ul", { className: `grid gap-2 ${TILE_COLUMNS}`, children: tiles.map((ship) => (_jsx("li", { className: "min-w-0", children: _jsx(HarbourTile, { ship: ship, kind: kind, href: hrefOf?.(ship.id), link: link, now: now }) }, ship.id))) })] }));
16
+ }
17
+ //# sourceMappingURL=harbour-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harbour-group.js","sourceRoot":"","sources":["../../src/molecules/harbour-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAKb,OAAO,EAAE,kBAAkB,EAAyB,MAAM,oBAAoB,CAAC;AAC/E,OAAO,EAAE,WAAW,EAAwB,MAAM,mBAAmB,CAAC;AAEtE;;;;;GAKG;AACH,MAAM,YAAY,GAAG,0EAA0E,CAAC;AAYhG,wHAAwH;AACxH,MAAM,UAAU,YAAY,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,GAAG,EAAqB;IAChF,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;IAChD,OAAO,CACL,iCAAqB,IAAI,EAAE,SAAS,EAAC,qBAAqB,iBAAc,iBAAiB,IAAI,EAAE,aAC7F,cAAI,SAAS,EAAC,2DAA2D,aACvE,KAAC,IAAI,yBAAa,SAAS,EAAC,iBAAiB,GAAG,EAC/C,IAAI,EACL,eAAM,SAAS,EAAC,gDAAgD,YAAE,KAAK,CAAC,MAAM,GAAQ,IACnF,EACL,aAAI,SAAS,EAAE,cAAc,YAAY,EAAE,YACxC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CACnB,aAAkB,SAAS,EAAC,SAAS,YACnC,KAAC,WAAW,IAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,GAAI,IAD/E,IAAI,CAAC,EAAE,CAEX,CACN,CAAC,GACC,IACG,CACX,CAAC;AACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ import type { HarbourOutput } from '@aeolus-fleet/common';
2
+ /** Harbour's numbers: the ships, and how many are in each state. */
3
+ export type HarbourCounts = NonNullable<HarbourOutput['counts']>;
4
+ /**
5
+ * Harbour's numbers (docs/design/fleet-overview, docs/design/state-colours):
6
+ * the ships, then Alert, Awaiting crew, Blocked, Working and Idle, each a
7
+ * ShipState in its tone; only Alert is filled, and a number at 0 carries no
8
+ * tone at all. Large numbers, small ones when Harbour is narrow (under
9
+ * 35rem: a phone, Bridge's column at 1440). Undefined draws the shape that
10
+ * is coming.
11
+ */
12
+ export declare function HarbourNumbers({ counts }: {
13
+ counts: HarbourCounts | undefined;
14
+ }): import("react").JSX.Element;
@@ -0,0 +1,42 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Ship } from 'lucide-react';
3
+ import { ShipState } from '../atoms/ship-state.js';
4
+ import { classNames } from '../class-names.js';
5
+ /** The states in the order the numbers show them (docs/design/state-colours, "Five states"). */
6
+ const STATES = ['alert', 'awaitingCrew', 'blocked', 'working', 'idle'];
7
+ /** At 0 a state's number carries no tone: its word is muted, its value in the foreground. */
8
+ const NO_TONE = 'text-muted-foreground';
9
+ /** Only Alert fills its card, above 0. */
10
+ const ALERT_CARD = 'border-tone-attention-border bg-tone-attention-bg';
11
+ /** A number's value in its state's tone, above 0; Idle has none and stays in the foreground. */
12
+ const VALUE_TONES = {
13
+ alert: 'text-tone-attention-fg',
14
+ awaitingCrew: 'text-tone-waiting-fg',
15
+ blocked: 'text-tone-blocked-fg',
16
+ working: 'text-tone-active-fg',
17
+ idle: '',
18
+ };
19
+ function HarbourNumber({ value, word, testId, valueTone, card }) {
20
+ return (_jsxs("div", { "data-testid": testId, className: classNames('flex min-w-0 flex-col gap-0.5 rounded-lg border border-border bg-card px-3 py-2.5 @max-[35rem]:items-center @max-[35rem]:px-1 @max-[35rem]:py-2 @max-[35rem]:text-center', card), children: [value === undefined ? (_jsx("span", { "aria-hidden": true, className: "block h-8 w-10 animate-pulse rounded-md bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none @max-[35rem]:size-6.5" })) : (_jsx("span", { className: classNames('text-[28px] leading-8.5 font-semibold text-foreground tabular-nums @max-[35rem]:text-[22px] @max-[35rem]:leading-6.5', valueTone), children: value })), word] }));
21
+ }
22
+ /**
23
+ * The word under a number, smaller when Harbour is narrow; "Awaiting crew" may wrap there (Thomas, 3 Nov).
24
+ * On a phone (under 24rem) six numbers leave no room for an icon beside a word: the icon sits above it.
25
+ */
26
+ const WORD = 'min-w-0 items-start @max-[35rem]:gap-0.75 @max-[35rem]:text-[11px] @max-[35rem]:leading-3.5 [&_svg]:mt-0.5 @max-[35rem]:[&_svg]:mt-px @max-[35rem]:[&_svg]:size-3 @max-[24rem]:flex-col @max-[24rem]:items-center';
27
+ /**
28
+ * Harbour's numbers (docs/design/fleet-overview, docs/design/state-colours):
29
+ * the ships, then Alert, Awaiting crew, Blocked, Working and Idle, each a
30
+ * ShipState in its tone; only Alert is filled, and a number at 0 carries no
31
+ * tone at all. Large numbers, small ones when Harbour is narrow (under
32
+ * 35rem: a phone, Bridge's column at 1440). Undefined draws the shape that
33
+ * is coming.
34
+ */
35
+ export function HarbourNumbers({ counts }) {
36
+ return (_jsx("div", { className: "@container min-w-0", "data-testid": "harbour-numbers", children: _jsxs("div", { className: "grid grid-cols-6 gap-3 @max-[35rem]:gap-1.5", children: [_jsx(HarbourNumber, { value: counts?.ships, word: _jsxs("span", { className: classNames('inline-flex gap-1.25 text-meta font-medium text-muted-foreground', WORD), children: [_jsx(Ship, { "aria-hidden": true, className: "size-3.5 shrink-0" }), "Ships"] }), testId: "harbour-number-ships" }), STATES.map((state) => {
37
+ const value = counts?.[state];
38
+ const isToned = value !== undefined && value > 0;
39
+ return (_jsx(HarbourNumber, { value: value, word: _jsx(ShipState, { state: state, className: classNames(WORD, isToned ? undefined : NO_TONE) }), testId: `harbour-number-${state}`, valueTone: isToned ? VALUE_TONES[state] : undefined, card: isToned && state === 'alert' ? ALERT_CARD : undefined }, state));
40
+ })] }) }));
41
+ }
42
+ //# sourceMappingURL=harbour-numbers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harbour-numbers.js","sourceRoot":"","sources":["../../src/molecules/harbour-numbers.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAK/C,gGAAgG;AAChG,MAAM,MAAM,GAA4B,C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GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;oBACpB,MAAM,KAAK,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC;oBAC9B,MAAM,OAAO,GAAG,KAAK,KAAK,SAAS,IAAI,KAAK,GAAG,CAAC,CAAC;oBACjD,OAAO,CACL,KAAC,aAAa,IAEZ,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,KAAC,SAAS,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,GAAI,EAC7F,MAAM,EAAE,kBAAkB,KAAK,EAAE,EACjC,SAAS,EAAE,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,EACnD,IAAI,EAAE,OAAO,IAAI,KAAK,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS,IALtD,KAAK,CAMV,CACH,CAAC;gBACJ,CAAC,CAAC,IACE,GACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,14 @@
1
+ import { type LucideIcon } from 'lucide-react';
2
+ /**
3
+ * Harbour's groups (docs/design/fleet-overview), shared by its groups and
4
+ * tiles. A ship's state shows through ShipState, as everywhere else.
5
+ */
6
+ /** Harbour's groups, in the order it shows them: People, Agents, Plugins, Through the gateway. */
7
+ export declare const HARBOUR_GROUP_KINDS: readonly ["people", "agents", "plugins", "gateway"];
8
+ export type HarbourGroupKind = (typeof HARBOUR_GROUP_KINDS)[number];
9
+ export declare const HARBOUR_GROUP_LOOK: Record<HarbourGroupKind, {
10
+ word: string;
11
+ Icon: LucideIcon;
12
+ kindWord: string;
13
+ KindIcon: LucideIcon;
14
+ }>;
@@ -0,0 +1,24 @@
1
+ import { Network, Plug, SquareTerminal, User, Users } from 'lucide-react';
2
+ /**
3
+ * Harbour's groups (docs/design/fleet-overview), shared by its groups and
4
+ * tiles. A ship's state shows through ShipState, as everywhere else.
5
+ */
6
+ /** Harbour's groups, in the order it shows them: People, Agents, Plugins, Through the gateway. */
7
+ export const HARBOUR_GROUP_KINDS = ['people', 'agents', 'plugins', 'gateway'];
8
+ export const HARBOUR_GROUP_LOOK = {
9
+ people: { word: 'People', Icon: Users, kindWord: 'Person', KindIcon: User },
10
+ agents: {
11
+ word: 'Agents',
12
+ Icon: SquareTerminal,
13
+ kindWord: 'Agent',
14
+ KindIcon: SquareTerminal,
15
+ },
16
+ plugins: { word: 'Plugins', Icon: Plug, kindWord: 'Plugin', KindIcon: Plug },
17
+ gateway: {
18
+ word: 'Through the gateway',
19
+ Icon: Network,
20
+ kindWord: 'Through the gateway',
21
+ KindIcon: Network,
22
+ },
23
+ };
24
+ //# sourceMappingURL=harbour-state.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harbour-state.js","sourceRoot":"","sources":["../../src/molecules/harbour-state.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,KAAK,EAAmB,MAAM,cAAc,CAAC;AAE3F;;;GAGG;AAEH,kGAAkG;AAClG,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,CAAU,CAAC;AAIvF,MAAM,CAAC,MAAM,kBAAkB,GAAyG;IACtI,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC3E,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,IAAI,EAAE,cAAc;QACpB,QAAQ,EAAE,OAAO;QACjB,QAAQ,EAAE,cAAc;KACzB;IACD,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;IAC5E,OAAO,EAAE;QACP,IAAI,EAAE,qBAAqB;QAC3B,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,qBAAqB;QAC/B,QAAQ,EAAE,OAAO;KAClB;CACF,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { HarbourOutput } from '@aeolus-fleet/common';
2
+ import { useRender } from '@base-ui/react/use-render';
3
+ import { type HarbourGroupKind } from './harbour-state.js';
4
+ /** A ship as its tile shows it: `fleet.harbour`'s tile, its group saying its kind. */
5
+ export type HarbourTileShip = Pick<HarbourOutput['items'][number], 'id' | 'name' | 'state' | 'note' | 'lastActivityAt'>;
6
+ export interface HarbourTileProps {
7
+ ship: HarbourTileShip;
8
+ /** The group the tile sits in: its kind icon. */
9
+ kind: HarbourGroupKind;
10
+ /** The ship's page; none draws a tile that is not a link. */
11
+ href?: string;
12
+ /** The app's link, such as Next.js's Link, through Base UI's render prop; a plain anchor without one. */
13
+ link?: useRender.RenderProp;
14
+ /** The time the last activity is measured from. */
15
+ now: Date;
16
+ }
17
+ /**
18
+ * One ship on Harbour (docs/design/fleet-overview, "The tile"), the same in
19
+ * the console and Bridge: its kind, its whole name, what it is doing (its
20
+ * report's note, two lines), its state and when it last did something. With
21
+ * an href it opens the ship's page, the arrow showing on hover and focus. A
22
+ * working ship's tile carries the live band in Sea, which stands still under
23
+ * reduced motion. The title holds "name: note" for the note cut short.
24
+ */
25
+ export declare function HarbourTile({ ship, kind, href, link, now }: HarbourTileProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
@@ -0,0 +1,54 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
+ import { useRender } from '@base-ui/react/use-render';
4
+ import { ArrowUpRight } from 'lucide-react';
5
+ import { ShipState, shipStateWordOf } from '../atoms/ship-state.js';
6
+ import { classNames } from '../class-names.js';
7
+ import { lastActivityWordsOf } from './harbour-activity.js';
8
+ import { HARBOUR_GROUP_LOOK } from './harbour-state.js';
9
+ /** A tile is filled in its state's tone (docs/design/state-colours); Idle stays plain, so colour marks only what is going on. */
10
+ const TILE_TONES = {
11
+ alert: 'border-tone-attention-border bg-tone-attention-bg text-tone-attention-fg',
12
+ awaitingCrew: 'border-tone-waiting-border bg-tone-waiting-bg text-tone-waiting-fg',
13
+ blocked: 'border-tone-blocked-border bg-tone-blocked-bg text-tone-blocked-fg',
14
+ working: 'border-tone-active-border bg-tone-active-bg text-tone-active-fg',
15
+ idle: 'border-border bg-card text-muted-foreground',
16
+ };
17
+ /** On a link, hover and press give the border the state's colour. */
18
+ const LINK_TONES = {
19
+ alert: 'hover:border-tone-attention-fg active:border-tone-attention-fg',
20
+ awaitingCrew: 'hover:border-tone-waiting-fg active:border-tone-waiting-fg',
21
+ blocked: 'hover:border-tone-blocked-fg active:border-tone-blocked-fg',
22
+ working: 'hover:border-tone-active-fg active:border-tone-active-fg',
23
+ idle: 'hover:border-muted-foreground active:border-muted-foreground',
24
+ };
25
+ const TILE = 'relative grid h-full min-h-28 min-w-0 grid-rows-[auto_1fr_auto] gap-1 overflow-hidden rounded-md border px-3 py-2.5 no-underline';
26
+ /** A link lifts a little on hover with a soft shadow; pressed, it sits down again. Reduced motion: nothing moves. */
27
+ const LINK = 'group cursor-pointer transition-[border-color,box-shadow,transform] duration-(--duration-fast) outline-none hover:-translate-y-px hover:shadow-[0_2px_8px_-2px_color-mix(in_oklch,var(--foreground)_18%,transparent)] focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring active:translate-y-0 active:shadow-none motion-reduce:transition-none motion-reduce:hover:translate-y-0';
28
+ /**
29
+ * One ship on Harbour (docs/design/fleet-overview, "The tile"), the same in
30
+ * the console and Bridge: its kind, its whole name, what it is doing (its
31
+ * report's note, two lines), its state and when it last did something. With
32
+ * an href it opens the ship's page, the arrow showing on hover and focus. A
33
+ * working ship's tile carries the live band in Sea, which stands still under
34
+ * reduced motion. The title holds "name: note" for the note cut short.
35
+ */
36
+ export function HarbourTile({ ship, kind, href, link, now }) {
37
+ const { name, state, note } = ship;
38
+ const { kindWord, KindIcon } = HARBOUR_GROUP_LOOK[kind];
39
+ const isLink = href !== undefined;
40
+ const content = (_jsxs(_Fragment, { children: [_jsxs("span", { className: "flex min-w-0 items-start gap-2 pr-4.5", children: [_jsx("span", { "data-testid": "harbour-tile-kind", title: kindWord, className: classNames('inline-flex size-5.5 shrink-0 items-center justify-center rounded-md border bg-card/70', state === 'idle' ? 'border-border' : 'border-current/25'), children: _jsx(KindIcon, { "aria-hidden": true, className: "size-3.25" }) }), _jsx("span", { className: "min-w-0 pt-0.5 text-meta leading-4.5 font-semibold wrap-anywhere text-foreground", children: name })] }), isLink ? (_jsx("span", { className: "absolute top-2.25 right-2.25 inline-flex text-muted-foreground opacity-0 transition-opacity duration-(--duration-fast) group-hover:opacity-100 group-focus-visible:opacity-100 motion-reduce:transition-none", children: _jsx(ArrowUpRight, { "aria-hidden": true, className: "size-3.5" }) })) : null, _jsx("span", { className: "line-clamp-2 text-caption leading-4 text-muted-foreground", children: note }), _jsxs("span", { className: "flex flex-wrap items-center justify-between gap-x-2 gap-y-0.5", children: [_jsx(ShipState, { state: state, size: "caption" }), _jsx("span", { "data-testid": "harbour-tile-age", className: "text-caption whitespace-nowrap text-muted-foreground", children: lastActivityWordsOf(ship.lastActivityAt, now) })] }), state === 'working' ? (_jsx("i", { "data-testid": "harbour-tile-live", "aria-hidden": true, className: "absolute inset-x-0 bottom-0 h-0.5 animate-live-band bg-[linear-gradient(90deg,transparent,var(--live-band),transparent)] bg-size-[40%_100%] bg-no-repeat opacity-70 motion-reduce:animate-none motion-reduce:bg-live-band motion-reduce:bg-none motion-reduce:opacity-35" })) : null] }));
41
+ return useRender({
42
+ defaultTagName: isLink ? 'a' : 'div',
43
+ render: isLink ? link : undefined,
44
+ props: {
45
+ 'data-testid': 'harbour-tile',
46
+ 'data-state': state,
47
+ title: `${name}: ${note ?? shipStateWordOf(state)}`,
48
+ className: classNames(TILE, TILE_TONES[state], isLink ? classNames(LINK, LINK_TONES[state]) : undefined),
49
+ ...(isLink ? { href } : {}),
50
+ children: content,
51
+ },
52
+ });
53
+ }
54
+ //# sourceMappingURL=harbour-tile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harbour-tile.js","sourceRoot":"","sources":["../../src/molecules/harbour-tile.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAIb,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAyB,MAAM,oBAAoB,CAAC;AAK/E,iIAAiI;AACjI,MAAM,UAAU,GAAiC;IAC/C,KAAK,EAAE,0EAA0E;IACjF,YAAY,EAAE,oEAAoE;IAClF,OAAO,EAAE,oEAAoE;IAC7E,OAAO,EAAE,iEAAiE;IAC1E,IAAI,EAAE,6CAA6C;CACpD,CAAC;AAEF,qEAAqE;AACrE,MAAM,UAAU,GAAiC;IAC/C,KAAK,EAAE,gEAAgE;IACvE,YAAY,EAAE,4DAA4D;IAC1E,OAAO,EAAE,4DAA4D;IACrE,OAAO,EAAE,0DAA0D;IACnE,IAAI,EAAE,8DAA8D;CACrE,CAAC;AAEF,MAAM,IAAI,GAAG,kIAAkI,CAAC;AAEhJ,qHAAqH;AACrH,MAAM,IAAI,GACR,iZAAiZ,CAAC;AAcpZ;;;;;;;GAOG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAoB;IAC3E,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAA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K,EAAE;YACL,aAAa,EAAE,cAAc;YAC7B,YAAY,EAAE,KAAK;YACnB,KAAK,EAAE,GAAG,IAAI,KAAK,IAAI,IAAI,eAAe,CAAC,KAAK,CAAC,EAAE;YACnD,SAAS,EAAE,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;YACxG,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YAC3B,QAAQ,EAAE,OAAO;SAClB;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -4,24 +4,30 @@ import { type AvatarMenuProps } from '../molecules/avatar-menu.js';
4
4
  interface AppHeaderProps {
5
5
  /** Undefined while the fleet in view is not known yet: the title's shape stands in. */
6
6
  switcher: AppSwitcherModel | undefined;
7
- /** The avatar menu, always last. */
8
- account: AvatarMenuProps;
7
+ /** full: "Acme / Console ▾"; fleet: "Acme" alone, for an app whose breadcrumb follows the fleet. */
8
+ switcherLayout?: 'full' | 'fleet';
9
+ /** The avatar menu, always last; unset, the app shows it elsewhere, such as in its sidebar foot. */
10
+ account?: AvatarMenuProps;
9
11
  /** Opens the command palette; without it the search trigger is not shown. */
10
12
  onSearch?: () => void;
11
13
  /** The search trigger's words: "Search ships or jump to". */
12
14
  searchLabel?: string;
15
+ /** trigger: a button with the ⌘K hint, after the app's controls. field: shaped as a search field, before them. */
16
+ search?: 'trigger' | 'field';
13
17
  /** The app's own part after the title, such as a breadcrumb. */
14
18
  children?: ReactNode;
15
- /** The app's own controls before the search, such as a live status or Compose. */
19
+ /** The app's own controls beside the search, such as a live status or Compose. */
16
20
  actions?: ReactNode;
17
21
  className?: string;
18
22
  }
19
23
  /**
20
24
  * The header every Aeolus web app shows on desktop (header design H1 to H13),
21
- * 56 px: the switcher in the title ("Acme / Console ▾"), the app's own part
22
- * after it, then the app's controls, the command palette's search trigger
23
- * with its ⌘K hint, and the avatar menu. Each app's own bar takes the
24
- * header on phone, with the switcher compact (H6).
25
+ * 56 px: the switcher in the title ("Acme / Console ▾", or "Acme" alone), the
26
+ * app's own part after it, then the app's controls, the command palette's
27
+ * search trigger with its ⌘K hint (or a search field before the controls,
28
+ * as the console draws it: docs/design/fleet-overview), and the avatar menu
29
+ * unless the app shows it elsewhere. Each app's own bar takes the header on
30
+ * phone, with the switcher compact (H6).
25
31
  */
26
- export declare function AppHeader({ switcher, account, onSearch, searchLabel, children, actions, className }: AppHeaderProps): import("react").JSX.Element;
32
+ export declare function AppHeader({ switcher, switcherLayout, account, onSearch, searchLabel, search, children, actions, className }: AppHeaderProps): import("react").JSX.Element;
27
33
  export {};
@@ -7,12 +7,15 @@ import { AvatarMenu } from '../molecules/avatar-menu.js';
7
7
  import { classNames } from '../class-names.js';
8
8
  /**
9
9
  * The header every Aeolus web app shows on desktop (header design H1 to H13),
10
- * 56 px: the switcher in the title ("Acme / Console ▾"), the app's own part
11
- * after it, then the app's controls, the command palette's search trigger
12
- * with its ⌘K hint, and the avatar menu. Each app's own bar takes the
13
- * header on phone, with the switcher compact (H6).
10
+ * 56 px: the switcher in the title ("Acme / Console ▾", or "Acme" alone), the
11
+ * app's own part after it, then the app's controls, the command palette's
12
+ * search trigger with its ⌘K hint (or a search field before the controls,
13
+ * as the console draws it: docs/design/fleet-overview), and the avatar menu
14
+ * unless the app shows it elsewhere. Each app's own bar takes the header on
15
+ * phone, with the switcher compact (H6).
14
16
  */
15
- export function AppHeader({ switcher, account, onSearch, searchLabel = 'Search or jump to', children, actions, className }) {
16
- return (_jsxs("header", { "data-slot": "app-header", className: classNames('sticky top-0 z-30 flex h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6', className), children: [_jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [switcher === undefined ? (_jsx("span", { "data-testid": "app-switcher-loading", "aria-hidden": true, className: "h-4 w-36 shrink-0 animate-pulse rounded bg-muted motion-reduce:animate-none" })) : (_jsx(AppSwitcher, { switcher: switcher, layout: "full", className: "shrink-0" })), children] }), _jsxs("div", { className: "flex shrink-0 items-center gap-3", children: [actions, onSearch ? (_jsxs(Button, { size: "sm", icon: _jsx(Search, { "aria-hidden": true }), "data-testid": "header-search", className: "w-60 justify-start font-normal text-muted-foreground max-lg:w-auto", onClick: onSearch, children: [_jsx("span", { className: "grow text-left max-lg:sr-only", children: searchLabel }), _jsx(Kbd, { children: "\u2318K" })] })) : null, _jsx(AvatarMenu, { ...account })] })] }));
17
+ export function AppHeader({ switcher, switcherLayout = 'full', account, onSearch, searchLabel = 'Search or jump to', search = 'trigger', children, actions, className }) {
18
+ const searchTrigger = onSearch ? (search === 'field' ? (_jsx(Button, { variant: "secondary", size: "md", icon: _jsx(Search, { "aria-hidden": true }), "data-testid": "header-search", onClick: onSearch, className: "w-50 justify-start font-normal text-muted-foreground outline-none focus-visible:outline-2 focus-visible:outline-ring", children: _jsx("span", { className: "truncate", children: searchLabel }) })) : (_jsxs(Button, { size: "sm", icon: _jsx(Search, { "aria-hidden": true }), "data-testid": "header-search", className: "w-60 justify-start font-normal text-muted-foreground max-lg:w-auto", onClick: onSearch, children: [_jsx("span", { className: "grow text-left max-lg:sr-only", children: searchLabel }), _jsx(Kbd, { children: "\u2318K" })] }))) : null;
19
+ return (_jsxs("header", { "data-slot": "app-header", className: classNames('sticky top-0 z-30 flex h-(--size-header) shrink-0 items-center justify-between gap-4 border-b border-border bg-background px-6', className), children: [_jsxs("div", { className: "flex min-w-0 items-center gap-3", children: [switcher === undefined ? (_jsx("span", { "data-testid": "app-switcher-loading", "aria-hidden": true, className: "h-4 w-36 shrink-0 animate-pulse rounded bg-muted motion-reduce:animate-none" })) : (_jsx(AppSwitcher, { switcher: switcher, layout: switcherLayout, className: "shrink-0" })), children] }), _jsxs("div", { className: "flex shrink-0 items-center gap-3", children: [search === 'field' ? searchTrigger : null, actions, search === 'trigger' ? searchTrigger : null, account === undefined ? null : _jsx(AvatarMenu, { ...account })] })] }));
17
20
  }
18
21
  //# sourceMappingURL=app-header.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"app-header.js","sourceRoot":"","sources":["../../src/organisms/app-header.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGtC,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACtC,OAAO,EAAE,UAAU,EAAwB,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAkB/C;;;;;;GAMG;AACH,MAAM,UAAU,SAAS,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE,WAAW,GAAG,mBAAmB,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAkB;IACxI,OAAO,CACL,+BACY,YAAY,EACtB,SAAS,EAAE,UAAU,CAAC,gIAAgI,EAAE,SAAS,CAAC,aAElK,eAAK,SAAS,EAAC,iCAAiC,aAC7C,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CACxB,8BAAkB,sBAAsB,uBAAa,SAAS,EAAC,6EAA6E,GAAG,CAChJ,CAAC,CAAC,CAAC,CACF,KAAC,WAAW,IAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAC,MAAM,EAAC,SAAS,EAAC,UAAU,GAAG,CACvE,EACA,QAAQ,IACL,EACN,eAAK,SAAS,EAAC,kCAAkC,aAC9C,OAAO,EACP,QAAQ,CAAC,CAAC,CAAC,CACV,MAAC,MAAM,IAAC,IAAI,EAAC,IAAI,EAAC,IAAI,EAAE,KAAC,MAAM,0BAAe,iBAAc,eAAe,EAAC,SAAS,EAAC,oEAAoE,EAAC,OAAO,EAAE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AAoE,EAAC,OAAO,EAAE,QAAQ,aAC1K,eAAM,SAAS,EAAC,+BAA+B,YAAE,WAAW,GAAQ,EACpE,KAAC,GAAG,0BAAS,IACN,CACV,CACF,CAAC,CAAC,CAAC,IAAI,CAAC;IACT,OAAO,CACL,+BACY,YAAY,EACtB,SAAS,EAAE,UAAU,CAAC,gIAAgI,EAAE,SAAS,CAAC,aAElK,eAAK,SAAS,EAAC,iCAAiC,aAC7C,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CACxB,8BAAkB,sBAAsB,uBAAa,SAAS,EAAC,6EAA6E,GAAG,CAChJ,CAAC,CAAC,CAAC,CACF,KAAC,WAAW,IAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,SAAS,EAAC,UAAU,GAAG,CACjF,EACA,QAAQ,IACL,EACN,eAAK,SAAS,EAAC,kCAAkC,aAC9C,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,EACzC,OAAO,EACP,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,EAC3C,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,UAAU,OAAK,OAAO,GAAI,IACvD,IACC,CACV,CAAC;AACJ,CAAC"}
@@ -0,0 +1,44 @@
1
+ import type { ShipId } from '@aeolus-fleet/common';
2
+ import type { useRender } from '@base-ui/react/use-render';
3
+ import type { ReactNode } from 'react';
4
+ import { type HarbourCounts } from '../molecules/harbour-numbers.js';
5
+ import type { HarbourGroupKind } from '../molecules/harbour-state.js';
6
+ import type { HarbourTileShip } from '../molecules/harbour-tile.js';
7
+ /** One of Harbour's groups as the app hands it: its kind and its tiles, in the order to show. */
8
+ export interface HarbourGroupShips {
9
+ kind: HarbourGroupKind;
10
+ tiles: readonly HarbourTileShip[];
11
+ }
12
+ export interface HarbourProps {
13
+ /** The numbers; undefined draws their loading shape. */
14
+ counts: HarbourCounts | undefined;
15
+ /** The groups with a ship, in order; undefined draws the loading shape. */
16
+ groups: readonly HarbourGroupShips[] | undefined;
17
+ /** The time each tile's last activity is measured from. */
18
+ now: Date;
19
+ /** Each ship's page; none draws tiles that are not links. */
20
+ hrefOf?: (shipId: ShipId) => string;
21
+ /** The app's link for the tiles, such as Next.js's Link, through Base UI's render prop. */
22
+ link?: useRender.RenderProp;
23
+ /** Between the numbers and the groups: the console's filter bar; Bridge passes none. */
24
+ between?: ReactNode;
25
+ /** Stands in for the groups when there are none: no match, argo alone. */
26
+ empty?: ReactNode;
27
+ state: 'ready' | 'loading' | 'error';
28
+ /** The failed read's technical reason, in mono. */
29
+ errorDetail?: string;
30
+ onRetry: () => void;
31
+ /** A new result is coming: the groups shown are the previous one, dimmed. */
32
+ isUpdating?: boolean;
33
+ }
34
+ /**
35
+ * Harbour (docs/design/fleet-overview), the fleet overview the console and
36
+ * Bridge share: the numbers on top, then what the app puts between (the
37
+ * console's filter bar), then one tile per ship grouped People, Agents,
38
+ * Plugins and Through the gateway. Props only: each app reads the fleet its
39
+ * own way. It lays itself out by its own width, not the window's (a
40
+ * container query), so the same part fits the console's page and Bridge's
41
+ * column. While the fleet is read, the shape that is coming; when the read
42
+ * fails, what went wrong and Try again.
43
+ */
44
+ export declare function Harbour({ counts, groups, now, hrefOf, link, between, empty, state, errorDetail, onRetry, isUpdating }: HarbourProps): import("react").JSX.Element;
@@ -0,0 +1,30 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { CircleAlert, RotateCw } from 'lucide-react';
4
+ import { Button } from '../atoms/button.js';
5
+ import { classNames } from '../class-names.js';
6
+ import { HarbourGroup } from '../molecules/harbour-group.js';
7
+ import { HarbourNumbers } from '../molecules/harbour-numbers.js';
8
+ /** The shape of the tiles that are coming, while the fleet is read. */
9
+ const LOADING_TILES = ['first', 'second', 'third', 'fourth'];
10
+ function HarbourLoading() {
11
+ return (_jsxs("div", { className: "flex flex-col gap-2", "data-testid": "harbour-loading", "aria-hidden": true, children: [_jsx("span", { className: "h-4 w-30 animate-pulse rounded-sm bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none" }), _jsx("div", { className: "grid grid-cols-[repeat(auto-fill,minmax(14rem,1fr))] gap-2 @max-[24rem]:grid-cols-2", children: LOADING_TILES.map((key) => (_jsx("span", { className: "min-h-28 animate-pulse rounded-md bg-secondary [animation-duration:var(--duration-pulse)] motion-reduce:animate-none" }, key))) })] }));
12
+ }
13
+ function HarbourError({ detail, onRetry }) {
14
+ return (_jsxs("div", { role: "alert", "data-testid": "harbour-error", className: "flex items-start gap-2.5 rounded-lg border border-tone-attention-border bg-tone-attention-bg px-3 py-2.5 text-tone-attention-fg", children: [_jsx(CircleAlert, { "aria-hidden": true, className: "mt-0.5 size-4 shrink-0" }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [_jsx("p", { className: "text-meta font-semibold text-foreground", children: "Couldn\u2019t read the fleet" }), _jsxs("p", { className: "text-meta text-foreground", children: ["Nothing changed. The page tries again by itself", detail === undefined ? '.' : '; ', detail === undefined ? null : _jsx("code", { className: "font-mono text-code wrap-anywhere", children: detail })] })] }), _jsx(Button, { size: "xs", icon: _jsx(RotateCw, { "aria-hidden": true }), onClick: onRetry, "data-testid": "harbour-retry", children: "Try again" })] }));
15
+ }
16
+ /**
17
+ * Harbour (docs/design/fleet-overview), the fleet overview the console and
18
+ * Bridge share: the numbers on top, then what the app puts between (the
19
+ * console's filter bar), then one tile per ship grouped People, Agents,
20
+ * Plugins and Through the gateway. Props only: each app reads the fleet its
21
+ * own way. It lays itself out by its own width, not the window's (a
22
+ * container query), so the same part fits the console's page and Bridge's
23
+ * column. While the fleet is read, the shape that is coming; when the read
24
+ * fails, what went wrong and Try again.
25
+ */
26
+ export function Harbour({ counts, groups, now, hrefOf, link, between, empty, state, errorDetail, onRetry, isUpdating = false }) {
27
+ const body = state === 'error' ? (_jsx(HarbourError, { detail: errorDetail, onRetry: onRetry })) : state === 'loading' || groups === undefined ? (_jsx(HarbourLoading, {})) : groups.length === 0 ? (empty) : (_jsx("div", { className: classNames('flex flex-col gap-3.5 transition-opacity duration-(--duration-fast) motion-reduce:transition-none', isUpdating ? 'opacity-55' : undefined), "aria-busy": isUpdating, "data-testid": "harbour-groups", children: groups.map(({ kind, tiles }) => (_jsx(HarbourGroup, { kind: kind, tiles: tiles, hrefOf: hrefOf, link: link, now: now }, kind))) }));
28
+ return (_jsxs("section", { "aria-label": "Harbour", className: "@container flex min-w-0 flex-col gap-3.5", "data-testid": "harbour", children: [state === 'error' && counts === undefined ? null : _jsx(HarbourNumbers, { counts: state === 'loading' ? undefined : counts }), between, body] }));
29
+ }
30
+ //# sourceMappingURL=harbour.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"harbour.js","sourceRoot":"","sources":["../../src/organisms/harbour.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAIb,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGrD,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAC7D,OAAO,EAAE,cAAc,EAAsB,MAAM,iCAAiC,CAAC;AAiCrF,uEAAuE;AACvE,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AAEtE,SAAS,cAAc;IACrB,OAAO,CACL,eAAK,SAAS,EAAC,qBAAqB,iBAAa,iBAAiB,kCAChE,eAAM,SAAS,EAAC,sHAAsH,GAAG,EACzI,cAAK,SAAS,EAAC,qFAAqF,YACjG,aAAa,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAC1B,eAAgB,SAAS,EAAC,sHAAsH,IAArI,G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AAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAE,UAAU,CAAC,mGAAmG,EAAE,UAAU,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,eAAa,UAAU,iBAAc,gBAAgB,YACxN,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,CAC/B,KAAC,YAAY,IAAY,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,IAApE,IAAI,CAAoE,CAC5F,CAAC,GACE,CACP,CAAC;IACJ,OAAO,CACL,iCAAoB,SAAS,EAAC,SAAS,EAAC,0CAA0C,iBAAa,SAAS,aAErG,KAAK,KAAK,OAAO,IAAI,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,cAAc,IAAC,MAAM,EAAE,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,GAAI,EACvH,OAAO,EACP,IAAI,IACG,CACX,CAAC;AACJ,CAAC"}
package/dist/theme.css CHANGED
@@ -48,6 +48,9 @@
48
48
  --color-tone-active-bg: var(--tone-active-bg);
49
49
  --color-tone-active-fg: var(--tone-active-fg);
50
50
  --color-tone-active-border: var(--tone-active-border);
51
+ --color-tone-blocked-bg: var(--tone-blocked-bg);
52
+ --color-tone-blocked-fg: var(--tone-blocked-fg);
53
+ --color-tone-blocked-border: var(--tone-blocked-border);
51
54
  --color-tone-ok-bg: var(--tone-ok-bg);
52
55
  --color-tone-ok-fg: var(--tone-ok-fg);
53
56
  --color-tone-ok-border: var(--tone-ok-border);
@@ -57,6 +60,7 @@
57
60
  --color-tone-ended-bg: var(--tone-ended-bg);
58
61
  --color-tone-ended-fg: var(--tone-ended-fg);
59
62
  --color-tone-ended-border: var(--tone-ended-border);
63
+ --color-live-band: var(--live-band);
60
64
  }
61
65
 
62
66
  @theme {
@@ -112,6 +116,18 @@
112
116
  background-color: var(--highlight);
113
117
  }
114
118
  }
119
+
120
+ /* A working ship's Harbour tile: a band of light runs along its foot (docs/design/fleet-overview). */
121
+ --animate-live-band: live-band 2.4s linear infinite;
122
+
123
+ @keyframes live-band {
124
+ from {
125
+ background-position: -60% 0;
126
+ }
127
+ to {
128
+ background-position: 160% 0;
129
+ }
130
+ }
115
131
  }
116
132
 
117
133
  @layer base {
package/dist/tokens.css CHANGED
@@ -20,21 +20,26 @@
20
20
  --primary-foreground:oklch(0.985 0.003 247);
21
21
  --destructive:oklch(0.53 0.2 27);
22
22
  --destructive-foreground:oklch(0.99 0 0);
23
- --tone-waiting-bg:oklch(0.965 0.045 85);
24
- --tone-waiting-fg:oklch(0.47 0.1 62);
25
- --tone-waiting-border:oklch(0.87 0.08 80);
26
- --tone-active-bg:oklch(0.955 0.03 250);
27
- --tone-active-fg:oklch(0.45 0.14 257);
28
- --tone-active-border:oklch(0.86 0.06 252);
23
+ --tone-waiting-bg:#FDF4E1;
24
+ --tone-waiting-fg:#8A5300;
25
+ --tone-waiting-border:#F0D198;
26
+ --tone-active-bg:#E8F6FB;
27
+ --tone-active-fg:#0B6A88;
28
+ --tone-active-border:#A6DAEB;
29
+ --tone-blocked-bg:#F3EEFC;
30
+ --tone-blocked-fg:#6B3FB8;
31
+ --tone-blocked-border:#D3C3F2;
29
32
  --tone-ok-bg:oklch(0.96 0.04 155);
30
33
  --tone-ok-fg:oklch(0.44 0.1 155);
31
34
  --tone-ok-border:oklch(0.86 0.07 155);
32
- --tone-attention-bg:oklch(0.957 0.028 25);
33
- --tone-attention-fg:oklch(0.5 0.19 27);
34
- --tone-attention-border:oklch(0.86 0.07 25);
35
+ --tone-attention-bg:#FFEEE9;
36
+ --tone-attention-fg:#AE3820;
37
+ --tone-attention-border:#FFC2B2;
35
38
  --tone-ended-bg:oklch(0.957 0.005 247);
36
39
  --tone-ended-fg:oklch(0.47 0.015 257);
37
40
  --tone-ended-border:oklch(0.87 0.01 247);
41
+ /* A working ship's live band: Sea itself, both modes, where nothing is read (docs/design/state-colours, "The brand's colours"). */
42
+ --live-band:#2BA3C9;
38
43
  --card-foreground:var(--foreground);
39
44
  --popover-foreground:var(--foreground);
40
45
  --secondary-foreground:var(--foreground);
@@ -135,18 +140,21 @@
135
140
  --primary-foreground:oklch(0.21 0.035 257);
136
141
  --destructive:oklch(0.56 0.19 25);
137
142
  --destructive-foreground:oklch(0.99 0 0);
138
- --tone-waiting-bg:oklch(0.29 0.055 72);
139
- --tone-waiting-fg:oklch(0.87 0.11 82);
140
- --tone-waiting-border:oklch(0.41 0.075 72);
141
- --tone-active-bg:oklch(0.29 0.06 257);
142
- --tone-active-fg:oklch(0.85 0.08 252);
143
- --tone-active-border:oklch(0.42 0.09 257);
143
+ --tone-waiting-bg:#33280F;
144
+ --tone-waiting-fg:#F3C46C;
145
+ --tone-waiting-border:#6E5119;
146
+ --tone-active-bg:#0E2C37;
147
+ --tone-active-fg:#85D3EC;
148
+ --tone-active-border:#1F5E72;
149
+ --tone-blocked-bg:#2A2142;
150
+ --tone-blocked-fg:#C9B1F7;
151
+ --tone-blocked-border:#523E86;
144
152
  --tone-ok-bg:oklch(0.29 0.05 155);
145
153
  --tone-ok-fg:oklch(0.86 0.1 155);
146
154
  --tone-ok-border:oklch(0.41 0.07 155);
147
- --tone-attention-bg:oklch(0.3 0.07 25);
148
- --tone-attention-fg:oklch(0.84 0.09 25);
149
- --tone-attention-border:oklch(0.45 0.11 25);
155
+ --tone-attention-bg:#3A1E19;
156
+ --tone-attention-fg:#FFA58F;
157
+ --tone-attention-border:#7B3628;
150
158
  --tone-ended-bg:oklch(0.255 0.01 257);
151
159
  --tone-ended-fg:oklch(0.78 0.015 257);
152
160
  --tone-ended-border:oklch(0.36 0.012 257);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aeolus-fleet/ui",
3
- "version": "0.37.2",
3
+ "version": "0.38.0",
4
4
  "description": "The UI parts every Aeolus web app shows: atoms, molecules and organisms, props only, and the design tokens.",
5
5
  "keywords": [
6
6
  "aeolus"
@@ -37,7 +37,7 @@
37
37
  "postpack": "rm LICENSE"
38
38
  },
39
39
  "peerDependencies": {
40
- "@aeolus-fleet/common": "0.37.2",
40
+ "@aeolus-fleet/common": "0.38.0",
41
41
  "@base-ui/react": "^1.8.0",
42
42
  "class-variance-authority": "^0.7.1",
43
43
  "clsx": "^2.1.1",