@mithrl/design-system 0.4.2 → 0.4.3

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.
@@ -0,0 +1,72 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+ import { type IconGlyphComponent } from "../../components/icon/Icon";
3
+
4
+ export type GeneratedAnswerFollowUp = {
5
+ /** Stable identity reported when the scientist selects this question. */
6
+ id: string;
7
+ /** Suggested question written in the scientist's voice. */
8
+ question: string;
9
+ /** Why this question follows from the current answer. */
10
+ rationale?: ReactNode;
11
+ /** Compact scientific context shown inside the optional Tooltip. */
12
+ tags?: readonly string[];
13
+ /** Optional semantic Lucide glyph. Defaults to CornerDownRight. */
14
+ icon?: IconGlyphComponent;
15
+ };
16
+ export type GeneratedAnswerFollowUpsState = "hidden" | "loading" | "ready";
17
+ export type GeneratedAnswerState = "loading" | "streaming" | "ready";
18
+ type NativeGeneratedAnswerProps = Omit<HTMLAttributes<HTMLElement>, "children" | "title" | "onSelect">;
19
+ export type GeneratedAnswerProps = NativeGeneratedAnswerProps & {
20
+ /** Product-rendered answer content. Markdown rendering remains consumer-owned. */
21
+ children: ReactNode;
22
+ /** Current answer lifecycle. @default "ready" */
23
+ answerState?: GeneratedAnswerState;
24
+ /** Whether answer tokens are still arriving. */
25
+ streaming?: boolean;
26
+ /** Visible message while the investigation is preparing. */
27
+ loadingLabel?: string;
28
+ /** Completed process label. @default "Process" */
29
+ processLabel?: string;
30
+ /** Product-owned execution summary, for example tool and artifact counts. */
31
+ processSummary?: ReactNode;
32
+ /** Follow-up generation state. Defaults to ready when suggestions exist. */
33
+ followUpsState?: GeneratedAnswerFollowUpsState;
34
+ /** Product-owned follow-up suggestions. */
35
+ followUps?: readonly GeneratedAnswerFollowUp[];
36
+ /** Invoked without routing or automatic submission. */
37
+ onFollowUpSelect?: (suggestion: GeneratedAnswerFollowUp) => void;
38
+ /** Ready heading. @default "Ask next" */
39
+ followUpsLabel?: string;
40
+ /** Visible loading message. @default "Drafting follow-ups…" */
41
+ followUpsLoadingLabel?: string;
42
+ };
43
+ /**
44
+ * A completed or streaming answer followed by contextual next questions.
45
+ * Selecting an Ask next row only reports intent to the owner; the product keeps
46
+ * the scientist in the current Question and decides how to fill Composer.
47
+ */
48
+ export declare const GeneratedAnswer: import("react").ForwardRefExoticComponent<NativeGeneratedAnswerProps & {
49
+ /** Product-rendered answer content. Markdown rendering remains consumer-owned. */
50
+ children: ReactNode;
51
+ /** Current answer lifecycle. @default "ready" */
52
+ answerState?: GeneratedAnswerState;
53
+ /** Whether answer tokens are still arriving. */
54
+ streaming?: boolean;
55
+ /** Visible message while the investigation is preparing. */
56
+ loadingLabel?: string;
57
+ /** Completed process label. @default "Process" */
58
+ processLabel?: string;
59
+ /** Product-owned execution summary, for example tool and artifact counts. */
60
+ processSummary?: ReactNode;
61
+ /** Follow-up generation state. Defaults to ready when suggestions exist. */
62
+ followUpsState?: GeneratedAnswerFollowUpsState;
63
+ /** Product-owned follow-up suggestions. */
64
+ followUps?: readonly GeneratedAnswerFollowUp[];
65
+ /** Invoked without routing or automatic submission. */
66
+ onFollowUpSelect?: (suggestion: GeneratedAnswerFollowUp) => void;
67
+ /** Ready heading. @default "Ask next" */
68
+ followUpsLabel?: string;
69
+ /** Visible loading message. @default "Drafting follow-ups…" */
70
+ followUpsLoadingLabel?: string;
71
+ } & import("react").RefAttributes<HTMLElement>>;
72
+ export {};
@@ -0,0 +1,34 @@
1
+ import { type HTMLAttributes, type ReactNode } from "react";
2
+ import { type IconGlyphComponent } from "../../components/icon/Icon";
3
+
4
+ export type NewProjectSuggestedQuestion = {
5
+ id: string;
6
+ question: string;
7
+ rationale: ReactNode;
8
+ tags?: readonly string[];
9
+ icon?: IconGlyphComponent;
10
+ };
11
+ export type NewProjectWorkspaceEmptyStateProps = Omit<HTMLAttributes<HTMLElement>, "children" | "title"> & {
12
+ /** Optional project-specific orientation beneath the primary prompt. */
13
+ description?: ReactNode;
14
+ /** Product-owned suggestions generated from project context and uploads. */
15
+ suggestions: readonly NewProjectSuggestedQuestion[];
16
+ /** Reports selection without prescribing whether the owner fills or submits Composer. */
17
+ onSuggestionSelect?: (suggestion: NewProjectSuggestedQuestion) => void;
18
+ /** Visible label above the generated starting points. */
19
+ suggestionsLabel?: string;
20
+ };
21
+ /**
22
+ * First workspace state after project creation. The application owns routing,
23
+ * suggestion generation, Question creation, and Composer submission.
24
+ */
25
+ export declare const NewProjectWorkspaceEmptyState: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "children" | "title"> & {
26
+ /** Optional project-specific orientation beneath the primary prompt. */
27
+ description?: ReactNode;
28
+ /** Product-owned suggestions generated from project context and uploads. */
29
+ suggestions: readonly NewProjectSuggestedQuestion[];
30
+ /** Reports selection without prescribing whether the owner fills or submits Composer. */
31
+ onSuggestionSelect?: (suggestion: NewProjectSuggestedQuestion) => void;
32
+ /** Visible label above the generated starting points. */
33
+ suggestionsLabel?: string;
34
+ } & import("react").RefAttributes<HTMLElement>>;