@fungi.computer/parakeet 0.14.9 → 0.16.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.
@@ -2,3 +2,5 @@ export { AgentHead } from "./components/AgentHead.js";
2
2
  export type { AgentHeadActivity } from "./components/AgentHead.js";
3
3
  export { ShiitakeAvatar } from "./components/ShiitakeAvatar.js";
4
4
  export type { AvatarState } from "./components/ShiitakeAvatar.js";
5
+ export { BootCurtain } from "./components/BootCurtain.js";
6
+ export { BootFailure } from "./components/BootFailure.js";
@@ -1,2 +1,4 @@
1
1
  export { AgentHead } from "./components/AgentHead.js";
2
2
  export { ShiitakeAvatar } from "./components/ShiitakeAvatar.js";
3
+ export { BootCurtain } from "./components/BootCurtain.js";
4
+ export { BootFailure } from "./components/BootFailure.js";
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The one full-viewport wait a person sees between signing in and a ready
3
+ * desktop. Every pre-ready state of that journey renders this component at
4
+ * this fixed position, so the Hub's separate documents read as one loader.
5
+ * It shows the Shiitake mascot thinking and one line of copy, never a
6
+ * spinner; Sprite holds the face still under reduced motion, so the copy
7
+ * alone carries the state. Until the live face is drawn, the same SVG face
8
+ * the Hub's static first-frame markup carries stands in for it. Only a
9
+ * state that cannot fail, or one that lifts the curtain on its own error,
10
+ * may render it: the curtain sits above toasts.
11
+ */
12
+ export declare function BootCurtain({ message }: {
13
+ message: string;
14
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useState } from "react";
3
+ import { bootCurtainFaceSvg } from "./boot-curtain-face.js";
4
+ import { ShiitakeAvatar } from "./ShiitakeAvatar.js";
5
+ /**
6
+ * The one full-viewport wait a person sees between signing in and a ready
7
+ * desktop. Every pre-ready state of that journey renders this component at
8
+ * this fixed position, so the Hub's separate documents read as one loader.
9
+ * It shows the Shiitake mascot thinking and one line of copy, never a
10
+ * spinner; Sprite holds the face still under reduced motion, so the copy
11
+ * alone carries the state. Until the live face is drawn, the same SVG face
12
+ * the Hub's static first-frame markup carries stands in for it. Only a
13
+ * state that cannot fail, or one that lifts the curtain on its own error,
14
+ * may render it: the curtain sits above toasts.
15
+ */
16
+ export function BootCurtain({ message }) {
17
+ const [ready, setReady] = useState(false);
18
+ return (_jsxs("div", { className: "boot-curtain", "data-boot-curtain": "", role: "status", "aria-live": "polite", children: [_jsxs("span", { className: "boot-curtain-stage", children: [ready ? null : (_jsx("span", { className: "boot-curtain-standin", dangerouslySetInnerHTML: { __html: bootCurtainFaceSvg } })), _jsx(ShiitakeAvatar, { className: "boot-curtain-face", onState: (state) => {
19
+ setReady(state.status === "ready");
20
+ }, state: { activity: "thinking", expression: "normal" } })] }), _jsx("p", { className: "boot-curtain-copy", children: message })] }));
21
+ }
@@ -0,0 +1,17 @@
1
+ import type { ReactNode } from "react";
2
+ /**
3
+ * A boot wait that failed, in the curtain's own centered layout: the mascot
4
+ * looking concerned, one plain line naming the real cause, a short reference
5
+ * when the failure carries one, and the host's actions (a compact Reload).
6
+ * It replaces the curtain, so a failure is never left underneath it.
7
+ */
8
+ export declare function BootFailure({ children, message, note, reference, }: {
9
+ /** The recovery actions, such as a Caps Button that reloads. */
10
+ children?: ReactNode;
11
+ /** One plain sentence naming the real cause. */
12
+ message: string;
13
+ /** A second plain line, such as why a recovery attempt also failed. */
14
+ note?: string | undefined;
15
+ /** A short request id or code the person can quote. */
16
+ reference?: string | undefined;
17
+ }): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ShiitakeAvatar } from "./ShiitakeAvatar.js";
3
+ /**
4
+ * A boot wait that failed, in the curtain's own centered layout: the mascot
5
+ * looking concerned, one plain line naming the real cause, a short reference
6
+ * when the failure carries one, and the host's actions (a compact Reload).
7
+ * It replaces the curtain, so a failure is never left underneath it.
8
+ */
9
+ export function BootFailure({ children, message, note, reference, }) {
10
+ return (_jsxs("div", { className: "boot-curtain", "data-boot-failure": "", role: "alert", children: [_jsx("span", { className: "boot-curtain-stage", children: _jsx(ShiitakeAvatar, { className: "boot-curtain-face", state: { activity: "idle", expression: "sad" } }) }), _jsx("p", { className: "boot-curtain-copy", children: message }), note ? _jsx("p", { className: "boot-curtain-copy", children: note }) : null, reference ? (_jsxs("p", { className: "boot-curtain-copy text-sm opacity-70", children: ["Ref ", reference] })) : null, children ? (_jsx("div", { className: "flex flex-wrap justify-center gap-sm", children: children })) : null] }));
11
+ }
@@ -1,5 +1,5 @@
1
1
  import type { Avatar } from "@fungi.computer/sprite/avatar";
2
- import { type AvatarPresentation, type SpriteService } from "@fungi.computer/sprite";
2
+ import { type AvatarPresentation, type PlayerState, type SpriteService } from "@fungi.computer/sprite";
3
3
  /** The current activity and expression supplied to a live avatar. */
4
4
  export type AvatarState = Readonly<Pick<AvatarPresentation, "activity" | "expression">>;
5
5
  /**
@@ -14,6 +14,8 @@ export declare const ShiitakeAvatar: import("react").NamedExoticComponent<{
14
14
  avatar?: Avatar | null;
15
15
  /** Replaces the default 3rem size, for a host that sizes the head itself. */
16
16
  className?: string;
17
+ /** Called as the player loads, draws and fails; a host can show a stand-in until it is ready. */
18
+ onState?: (state: PlayerState) => void;
17
19
  /** Replaces the shared Shiitake service; a faithful fake for tests. */
18
20
  service?: SpriteService;
19
21
  /** Activity and expression presented by the avatar. */
@@ -11,9 +11,9 @@ import { shiitakeSprite } from "./sprite-service.js";
11
11
  * Conversations have no avatar: an Agent's head is `AgentHead`, drawn from
12
12
  * the Agent record.
13
13
  */
14
- export const ShiitakeAvatar = memo(function ShiitakeAvatar({ avatar, className = "h-12 w-12 shrink-0", service = shiitakeSprite, state, }) {
14
+ export const ShiitakeAvatar = memo(function ShiitakeAvatar({ avatar, className = "h-12 w-12 shrink-0", onState, service = shiitakeSprite, state, }) {
15
15
  const presentation = useMemo(() => (avatar ? avatarPresentation(avatar) : undefined), [avatar]);
16
- return (_jsx(Sprite, { "aria-hidden": "true", className: className, service: service, src: presentation?.src ?? { local: "mushroom" }, ...(presentation
16
+ return (_jsx(Sprite, { "aria-hidden": "true", className: className, service: service, ...(onState ? { onState } : {}), src: presentation?.src ?? { local: "mushroom" }, ...(presentation
17
17
  ? {
18
18
  appearance: presentation.appearance,
19
19
  renderStyle: presentation.renderStyle,
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The mascot as plain SVG: the stand-in the boot curtain draws before the live
3
+ * Sprite is ready. The Hub's static first-frame documents carry this same
4
+ * markup, so the face never leaves the screen between documents.
5
+ */
6
+ export declare const bootCurtainFaceSvg: string;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * The mascot as plain SVG: the stand-in the boot curtain draws before the live
3
+ * Sprite is ready. The Hub's static first-frame documents carry this same
4
+ * markup, so the face never leaves the screen between documents.
5
+ */
6
+ export const bootCurtainFaceSvg = '<svg class="boot-curtain-face" viewBox="0 0 96 96" aria-hidden="true" focusable="false">' +
7
+ '<path d="M17 52h62c0 18-14 32-31 32S17 70 17 52z" fill="#fff3e0"/>' +
8
+ '<path d="M6 50C6 26 24 8 48 8s42 18 42 42c0 3-3 5-6 5H12c-3 0-6-2-6-5z" fill="#ff8383"/>' +
9
+ '<path d="M10 52h76" stroke="#ffd9b8" stroke-width="5" stroke-linecap="round"/>' +
10
+ '<circle cx="25" cy="27" r="12" fill="#ffd9b8"/>' +
11
+ '<ellipse cx="38" cy="65" rx="4.5" ry="6" fill="#2a2024"/>' +
12
+ '<ellipse cx="58" cy="65" rx="4.5" ry="6" fill="#2a2024"/>' +
13
+ '<circle cx="39.5" cy="62.5" r="1.6" fill="#ffffff"/>' +
14
+ '<circle cx="59.5" cy="62.5" r="1.6" fill="#ffffff"/>' +
15
+ '<rect x="43" y="75" width="10" height="2.4" rx="1.2" fill="#2a2024"/>' +
16
+ "</svg>";
@@ -13,6 +13,11 @@ export type ParakeetVisitor = Readonly<{
13
13
  }>;
14
14
  /** Props for the standalone retained conversation surface. */
15
15
  export type ParakeetProps = Readonly<{
16
+ /**
17
+ * Show no author line on prompts while one human has written them all, so a
18
+ * solo chat carries no label; it appears once a second person writes.
19
+ */
20
+ hideSoleAuthor?: boolean | undefined;
16
21
  /** Show short identity suffixes for same-named authors; never in visitor mode. */
17
22
  disambiguateAuthors?: boolean | undefined;
18
23
  /**
@@ -51,6 +56,8 @@ export type ParakeetProps = Readonly<{
51
56
  }>;
52
57
  /** Props for the reusable retained conversation view. */
53
58
  export type ParakeetViewProps = Readonly<{
59
+ /** Hide the prompt author line while one human has written every prompt. */
60
+ hideSoleAuthor?: boolean | undefined;
54
61
  /** Show short identity suffixes for same-named authors; never in visitor mode. */
55
62
  disambiguateAuthors?: boolean | undefined;
56
63
  /** Visitor mode hides internal readouts and disables slash commands. */
@@ -83,6 +90,6 @@ export type ParakeetViewProps = Readonly<{
83
90
  commands?: ParakeetCommandRuntime | undefined;
84
91
  }>;
85
92
  /** Render the retained conversation surface within one Parakeet provider. */
86
- export declare function ParakeetView({ disambiguateAuthors, visitor, composerActionVariant, empty, hostFacts, autoFocus, commands, renderToolActions, claimsToolMedia, renderAssistantAttachment, formatAssistantText, onLink, onOpen, }: ParakeetViewProps): ReactElement;
93
+ export declare function ParakeetView({ hideSoleAuthor, disambiguateAuthors, visitor, composerActionVariant, empty, hostFacts, autoFocus, commands, renderToolActions, claimsToolMedia, renderAssistantAttachment, formatAssistantText, onLink, onOpen, }: ParakeetViewProps): ReactElement;
87
94
  /** Standalone typed composer and exact-message timeline. */
88
- export declare function Parakeet({ authorOf, disambiguateAuthors, visitor, markdownPolicy, composerActionVariant, empty, hostFacts, session, clients, renderToolActions, claimsToolMedia, renderAssistantAttachment, formatAssistantText, commands, onLink, onOpen, }: ParakeetProps): ReactElement;
95
+ export declare function Parakeet({ authorOf, hideSoleAuthor, disambiguateAuthors, visitor, markdownPolicy, composerActionVariant, empty, hostFacts, session, clients, renderToolActions, claimsToolMedia, renderAssistantAttachment, formatAssistantText, commands, onLink, onOpen, }: ParakeetProps): ReactElement;
package/dist/parakeet.js CHANGED
@@ -24,7 +24,7 @@ import { useSlashCommands, } from "./commands/use-slash-commands.js";
24
24
  import { TimelineItem } from "./components/TimelineItem.js";
25
25
  import { MarkdownPolicyContext } from "./components/MarkdownRenderer.js";
26
26
  /** Render the retained conversation surface within one Parakeet provider. */
27
- export function ParakeetView({ disambiguateAuthors, visitor, composerActionVariant, empty, hostFacts, autoFocus, commands, renderToolActions, claimsToolMedia, renderAssistantAttachment, formatAssistantText, onLink, onOpen, }) {
27
+ export function ParakeetView({ hideSoleAuthor, disambiguateAuthors, visitor, composerActionVariant, empty, hostFacts, autoFocus, commands, renderToolActions, claimsToolMedia, renderAssistantAttachment, formatAssistantText, onLink, onOpen, }) {
28
28
  const textareaRef = useRef(null);
29
29
  // Opening a conversation puts the caret in the composer; a click elsewhere keeps it.
30
30
  useEffect(() => {
@@ -56,7 +56,7 @@ export function ParakeetView({ disambiguateAuthors, visitor, composerActionVaria
56
56
  : null;
57
57
  if (anchor instanceof HTMLAnchorElement && onLink?.(anchor.href))
58
58
  event.preventDefault();
59
- }, children: [_jsxs("div", { className: "flex h-full w-full flex-col border-r border-base-300", children: [_jsx(ConversationTimeline, { disambiguateAuthors: visitor === undefined && disambiguateAuthors === true, clientActions: clientActions, onOpen: onOpen, focusAfterJump: textareaRef, empty: empty, renderToolActions: renderToolActions, claimsToolMedia: claimsToolMedia, renderAssistantAttachment: renderAssistantAttachment, formatAssistantText: formatAssistantText }), contributions.some(({ entryId, value }) => value.panel.some((row) => JSON.stringify([entryId, row.id]) !== answering)) ? (_jsx("section", { "aria-label": "Session extension controls", className: "w-full shrink-0 border-t border-base-300 bg-base-100", children: contributions.map(({ entryId, value: contribution }) => {
59
+ }, children: [_jsxs("div", { className: "flex h-full w-full flex-col border-r border-base-300", children: [_jsx(ConversationTimeline, { hideSoleAuthor: hideSoleAuthor === true, disambiguateAuthors: visitor === undefined && disambiguateAuthors === true, clientActions: clientActions, onOpen: onOpen, focusAfterJump: textareaRef, empty: empty, renderToolActions: renderToolActions, claimsToolMedia: claimsToolMedia, renderAssistantAttachment: renderAssistantAttachment, formatAssistantText: formatAssistantText }), contributions.some(({ entryId, value }) => value.panel.some((row) => JSON.stringify([entryId, row.id]) !== answering)) ? (_jsx("section", { "aria-label": "Session extension controls", className: "w-full shrink-0 border-t border-base-300 bg-base-100", children: contributions.map(({ entryId, value: contribution }) => {
60
60
  const value = {
61
61
  ...contribution,
62
62
  panel: contribution.panel.filter((row) => JSON.stringify([entryId, row.id]) !== answering),
@@ -110,7 +110,7 @@ function ConversationInteraction({ slash, }) {
110
110
  slash.store.close();
111
111
  }, children: _jsx(DialogContent, { className: "w-[min(32rem,calc(100vw-2rem))] rounded-box bg-base-100 p-md shadow-lg", keepMounted: false, children: open === undefined ? null : (_jsx(InteractionPanel, { host: open.host, onClose: slash.store.close }, open.key)) }) }));
112
112
  }
113
- function ConversationTimeline({ disambiguateAuthors, clientActions, onOpen, focusAfterJump, empty, renderToolActions, claimsToolMedia, renderAssistantAttachment, formatAssistantText, }) {
113
+ function ConversationTimeline({ hideSoleAuthor, disambiguateAuthors, clientActions, onOpen, focusAfterJump, empty, renderToolActions, claimsToolMedia, renderAssistantAttachment, formatAssistantText, }) {
114
114
  const { modelSetup } = useContext(ParakeetHostFactsContext);
115
115
  const dismissFailed = useDismissFailedPrompt();
116
116
  const composer = useComposer();
@@ -121,6 +121,21 @@ function ConversationTimeline({ disambiguateAuthors, clientActions, onOpen, focu
121
121
  const authorNames = useMemo(() => authorDisplayNames(disambiguateAuthors
122
122
  ? [...timelineController.settled, ...timelineController.tail].flatMap((item) => ("author" in item && item.author ? [item.author] : []))
123
123
  : []), [disambiguateAuthors, timelineController.settled, timelineController.tail]);
124
+ // One human wrote every prompt: the label would only name the reader.
125
+ const soleAuthor = useMemo(() => {
126
+ if (!hideSoleAuthor)
127
+ return false;
128
+ const humans = new Set();
129
+ for (const item of [
130
+ ...timelineController.settled,
131
+ ...timelineController.tail,
132
+ ])
133
+ if (item.kind === "user_message" &&
134
+ item.author !== undefined &&
135
+ item.author.kind !== "agent")
136
+ humans.add(item.author.id);
137
+ return humans.size <= 1;
138
+ }, [hideSoleAuthor, timelineController.settled, timelineController.tail]);
124
139
  const contributions = useClientContributions();
125
140
  const placed = placeClientTimeline(contributions, timelineController.commandAnchors, timelineController.positionAnchors);
126
141
  const before = placed.before.map(({ entryId, cell }) => (_jsx(ClientRows, { entryId: entryId, rows: cell.rows, actions: clientActions, onOpen: onOpen }, `${entryId}:${cell.id}`)));
@@ -261,18 +276,22 @@ function ConversationTimeline({ disambiguateAuthors, clientActions, onOpen, focu
261
276
  top: 0,
262
277
  transform: `translateY(${String(virtualItem.start)}px)`,
263
278
  width: "100%",
264
- }, children: [virtualItem.index === 0 ? before : null, _jsx(TimelineItem, { item: "author" in item &&
265
- item.author &&
266
- authorNames.has(item.author.id)
267
- ? {
268
- ...item,
269
- author: {
270
- ...item.author,
271
- name: authorNames.get(item.author.id) ??
272
- item.author.name,
273
- },
274
- }
275
- : item, onDismissFailed: dismissFailed, onRetry: virtualItem.index === count - 1 &&
279
+ }, children: [virtualItem.index === 0 ? before : null, _jsx(TimelineItem, { item: soleAuthor &&
280
+ item.kind === "user_message" &&
281
+ item.author?.kind !== "agent"
282
+ ? { ...item, author: undefined }
283
+ : "author" in item &&
284
+ item.author &&
285
+ authorNames.has(item.author.id)
286
+ ? {
287
+ ...item,
288
+ author: {
289
+ ...item.author,
290
+ name: authorNames.get(item.author.id) ??
291
+ item.author.name,
292
+ },
293
+ }
294
+ : item, onDismissFailed: dismissFailed, onRetry: virtualItem.index === count - 1 &&
276
295
  (composer.failure === "failed" ||
277
296
  composer.failure === "admission")
278
297
  ? composer.retry
@@ -398,6 +417,6 @@ function ConversationComposer({ visitor, textareaRef, composerActionVariant, sla
398
417
  return _jsx(ChatComposer, { ...composerProps });
399
418
  }
400
419
  /** Standalone typed composer and exact-message timeline. */
401
- export function Parakeet({ authorOf, disambiguateAuthors, visitor, markdownPolicy = "session", composerActionVariant, empty, hostFacts, session, clients, renderToolActions, claimsToolMedia, renderAssistantAttachment, formatAssistantText, commands, onLink, onOpen, }) {
402
- return (_jsx(MarkdownPolicyContext.Provider, { value: markdownPolicy, children: _jsx(ParakeetProvider, { session: session, clients: clients, authorOf: authorOf, children: _jsx(ParakeetView, { disambiguateAuthors: disambiguateAuthors, visitor: visitor, composerActionVariant: composerActionVariant, empty: empty, hostFacts: hostFacts, renderToolActions: renderToolActions, claimsToolMedia: claimsToolMedia, renderAssistantAttachment: renderAssistantAttachment, formatAssistantText: formatAssistantText, commands: commands, onLink: onLink, onOpen: onOpen }) }) }));
420
+ export function Parakeet({ authorOf, hideSoleAuthor, disambiguateAuthors, visitor, markdownPolicy = "session", composerActionVariant, empty, hostFacts, session, clients, renderToolActions, claimsToolMedia, renderAssistantAttachment, formatAssistantText, commands, onLink, onOpen, }) {
421
+ return (_jsx(MarkdownPolicyContext.Provider, { value: markdownPolicy, children: _jsx(ParakeetProvider, { session: session, clients: clients, authorOf: authorOf, children: _jsx(ParakeetView, { hideSoleAuthor: hideSoleAuthor, disambiguateAuthors: disambiguateAuthors, visitor: visitor, composerActionVariant: composerActionVariant, empty: empty, hostFacts: hostFacts, renderToolActions: renderToolActions, claimsToolMedia: claimsToolMedia, renderAssistantAttachment: renderAssistantAttachment, formatAssistantText: formatAssistantText, commands: commands, onLink: onLink, onOpen: onOpen }) }) }));
403
422
  }
package/dist/styles.css CHANGED
@@ -19624,6 +19624,50 @@
19624
19624
  max-width: none;
19625
19625
  }
19626
19626
  }
19627
+ .boot-curtain {
19628
+ position: fixed;
19629
+ inset: 0;
19630
+ z-index: 2147483000;
19631
+ display: flex;
19632
+ flex-direction: column;
19633
+ align-items: center;
19634
+ justify-content: center;
19635
+ gap: 1rem;
19636
+ background: var(--color-base-100, #eff1f5);
19637
+ color: var(--color-base-content, #4c4f69);
19638
+ font-family: system-ui, sans-serif;
19639
+ }
19640
+ @media (prefers-color-scheme: dark) {
19641
+ .boot-curtain {
19642
+ background: var(--color-base-100, #1e1e2e);
19643
+ color: var(--color-base-content, #cdd6f4);
19644
+ }
19645
+ }
19646
+ .boot-curtain-stage {
19647
+ position: relative;
19648
+ display: block;
19649
+ width: 6rem;
19650
+ height: 6rem;
19651
+ }
19652
+ .boot-curtain-stage > * {
19653
+ position: absolute;
19654
+ inset: 0;
19655
+ }
19656
+ .boot-curtain-standin svg {
19657
+ display: block;
19658
+ }
19659
+ .boot-curtain-face {
19660
+ width: 6rem;
19661
+ height: 6rem;
19662
+ }
19663
+ .boot-curtain-copy {
19664
+ margin: 0;
19665
+ min-height: 1.5rem;
19666
+ max-width: 32rem;
19667
+ padding-inline: 1rem;
19668
+ font-size: 0.9375rem;
19669
+ text-align: center;
19670
+ }
19627
19671
  :root {
19628
19672
  --prose-max-width: 80ch;
19629
19673
  --tool-error-rail: #fff7a0;
package/docs/api/index.md CHANGED
@@ -582,6 +582,7 @@ Public composer options for an anonymous visitor conversation.
582
582
 
583
583
  ```ts
584
584
  type ParakeetProps = Readonly<{
585
+ hideSoleAuthor?: boolean;
585
586
  disambiguateAuthors?: boolean;
586
587
  authorOf?: ParakeetAuthorOf;
587
588
  visitor?: ParakeetVisitor;
@@ -609,6 +610,7 @@ Props for the standalone retained conversation surface.
609
610
 
610
611
  ```ts
611
612
  type ParakeetViewProps = Readonly<{
613
+ hideSoleAuthor?: boolean;
612
614
  disambiguateAuthors?: boolean;
613
615
  visitor?: ParakeetVisitor;
614
616
  composerActionVariant?: "primary" | "outline";
@@ -1074,6 +1076,7 @@ const ShiitakeAvatar: NamedExoticComponent<{
1074
1076
  | "watercolor";
1075
1077
  } | null;
1076
1078
  className?: string;
1079
+ onState?: (state) => void;
1077
1080
  service?: SpriteService;
1078
1081
  state: AvatarState;
1079
1082
  }>;
@@ -1096,6 +1099,61 @@ Defaults only, with no reader choices.
1096
1099
 
1097
1100
  ## Functions
1098
1101
 
1102
+ ### BootCurtain()
1103
+
1104
+ ```ts
1105
+ function BootCurtain(__namedParameters): Element;
1106
+ ```
1107
+
1108
+ The one full-viewport wait a person sees between signing in and a ready desktop.
1109
+ Every pre-ready state of that journey renders this component at this fixed
1110
+ position, so the Hub's separate documents read as one loader. It shows the
1111
+ Shiitake mascot thinking and one line of copy, never a spinner; Sprite holds the
1112
+ face still under reduced motion, so the copy alone carries the state. Until the
1113
+ live face is drawn, the same SVG face the Hub's static first-frame markup
1114
+ carries stands in for it. Only a state that cannot fail, or one that lifts the
1115
+ curtain on its own error, may render it: the curtain sits above toasts.
1116
+
1117
+ #### Parameters
1118
+
1119
+ | Parameter | Type |
1120
+ | --------------------------- | -------------------------- |
1121
+ | `__namedParameters` | \{ `message`: `string`; \} |
1122
+ | `__namedParameters.message` | `string` |
1123
+
1124
+ #### Returns
1125
+
1126
+ `Element`
1127
+
1128
+ ---
1129
+
1130
+ ### BootFailure()
1131
+
1132
+ ```ts
1133
+ function BootFailure(__namedParameters): Element;
1134
+ ```
1135
+
1136
+ A boot wait that failed, in the curtain's own centered layout: the mascot
1137
+ looking concerned, one plain line naming the real cause, a short reference when
1138
+ the failure carries one, and the host's actions (a compact Reload). It replaces
1139
+ the curtain, so a failure is never left underneath it.
1140
+
1141
+ #### Parameters
1142
+
1143
+ | Parameter | Type | Description |
1144
+ | ------------------------------ | ----------------------------------------------------------------------------------------------- | ---------------------------------------------------------------- |
1145
+ | `__namedParameters` | \{ `children?`: `ReactNode`; `message`: `string`; `note?`: `string`; `reference?`: `string`; \} | - |
1146
+ | `__namedParameters.children?` | `ReactNode` | The recovery actions, such as a Caps Button that reloads. |
1147
+ | `__namedParameters.message` | `string` | One plain sentence naming the real cause. |
1148
+ | `__namedParameters.note?` | `string` | A second plain line, such as why a recovery attempt also failed. |
1149
+ | `__namedParameters.reference?` | `string` | A short request id or code the person can quote. |
1150
+
1151
+ #### Returns
1152
+
1153
+ `Element`
1154
+
1155
+ ---
1156
+
1099
1157
  ### composerSendState()
1100
1158
 
1101
1159
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fungi.computer/parakeet",
3
- "version": "0.14.9",
3
+ "version": "0.16.0",
4
4
  "author": "Levi <levi@technomancy.dev>",
5
5
  "private": false,
6
6
  "description": "Standalone React composer for a typed Shiitake Session",
@@ -31,6 +31,10 @@
31
31
  "types": "./dist/agent-head.d.ts",
32
32
  "import": "./dist/agent-head.js"
33
33
  },
34
+ "./boot-curtain-face": {
35
+ "types": "./dist/components/boot-curtain-face.d.ts",
36
+ "import": "./dist/components/boot-curtain-face.js"
37
+ },
34
38
  "./website-visitor-client": {
35
39
  "types": "./dist/website-visitor-client.d.ts",
36
40
  "import": "./dist/website-visitor-client.js"
@@ -64,14 +68,14 @@
64
68
  },
65
69
  "dependencies": {
66
70
  "@earendil-works/pi-ai": "1.5.2",
67
- "@fungi.computer/agar": "0.23.0",
71
+ "@fungi.computer/agar": "0.23.1",
68
72
  "@fungi.computer/bird-dog": "0.3.7",
69
73
  "@fungi.computer/cairn": "0.1.0",
70
74
  "@fungi.computer/caps": "0.12.2",
71
75
  "@fungi.computer/gills": "0.4.0",
72
- "@fungi.computer/knapsack": "0.4.20",
76
+ "@fungi.computer/knapsack": "0.4.21",
73
77
  "@fungi.computer/mule": "0.3.0",
74
- "@fungi.computer/shiitake": "0.21.8",
78
+ "@fungi.computer/shiitake": "0.21.9",
75
79
  "@fungi.computer/sigils": "0.3.2",
76
80
  "@fungi.computer/sprite": "0.2.2",
77
81
  "@fungi.computer/sprite-zdog": "0.3.2",
package/src/styles.css CHANGED
@@ -15,6 +15,54 @@
15
15
 
16
16
  @plugin "@tailwindcss/typography";
17
17
 
18
+ /* The boot curtain: one fixed, full-viewport wait for the whole sign-in to
19
+ * desktop journey. The Hub document carries the same classes as static markup
20
+ * so a page that has not run its script yet already shows it. */
21
+ .boot-curtain {
22
+ position: fixed;
23
+ inset: 0;
24
+ z-index: 2147483000;
25
+ display: flex;
26
+ flex-direction: column;
27
+ align-items: center;
28
+ justify-content: center;
29
+ gap: 1rem;
30
+ background: var(--color-base-100, #eff1f5);
31
+ color: var(--color-base-content, #4c4f69);
32
+ font-family: system-ui, sans-serif;
33
+ }
34
+ @media (prefers-color-scheme: dark) {
35
+ .boot-curtain {
36
+ background: var(--color-base-100, #1e1e2e);
37
+ color: var(--color-base-content, #cdd6f4);
38
+ }
39
+ }
40
+ .boot-curtain-stage {
41
+ position: relative;
42
+ display: block;
43
+ width: 6rem;
44
+ height: 6rem;
45
+ }
46
+ .boot-curtain-stage > * {
47
+ position: absolute;
48
+ inset: 0;
49
+ }
50
+ .boot-curtain-standin svg {
51
+ display: block;
52
+ }
53
+ .boot-curtain-face {
54
+ width: 6rem;
55
+ height: 6rem;
56
+ }
57
+ .boot-curtain-copy {
58
+ margin: 0;
59
+ min-height: 1.5rem;
60
+ max-width: 32rem;
61
+ padding-inline: 1rem;
62
+ font-size: 0.9375rem;
63
+ text-align: center;
64
+ }
65
+
18
66
  :root {
19
67
  --prose-max-width: 80ch;
20
68
  --tool-error-rail: #fff7a0;