@mithrl/design-system 0.4.1 → 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.
- package/dist/components/approval-card/ApprovalCard.d.ts +27 -15
- package/dist/components/approval-plan-card/ApprovalPlanCard.d.ts +28 -0
- package/dist/components/approval-plan-card/approvalPlanTypes.d.ts +35 -0
- package/dist/components/composer/Composer.d.ts +8 -1
- package/dist/components/composer/ComposerUpload.d.ts +65 -0
- package/dist/components/dropdown-menu/DropdownMenu.d.ts +4 -0
- package/dist/components/explorer/Explorer.d.ts +3 -2
- package/dist/components/file-dropzone/FileDropzone.d.ts +17 -0
- package/dist/components/process-steps/ProcessSteps.d.ts +46 -0
- package/dist/components/status-orb/StatusOrb.d.ts +2 -2
- package/dist/components/upload-queue/UploadQueue.d.ts +4 -0
- package/dist/index.d.ts +15 -3
- package/dist/index.js +4201 -3040
- package/dist/internal/ResourceTypeIcon.d.ts +17 -0
- package/dist/patterns/approval-plan-review/ApprovalPlanReview.d.ts +55 -0
- package/dist/patterns/approval-plan-review/approvalPlanExample.d.ts +2 -0
- package/dist/patterns/generated-answer/GeneratedAnswer.d.ts +72 -0
- package/dist/patterns/new-project-workspace/NewProjectWorkspaceEmptyState.d.ts +34 -0
- package/dist/styles.css +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
|
|
2
|
+
export type UploadResourceType = "data" | "structured-data" | "document" | "code" | "notebook" | "image" | "scientific-data" | "archive" | "generic";
|
|
3
|
+
export type ScientificOutputResourceType = "dataset" | "report" | "figure" | "plot" | "code" | "generic";
|
|
4
|
+
type ResourceTypeIconProps = {
|
|
5
|
+
type: UploadResourceType;
|
|
6
|
+
tone: "upload";
|
|
7
|
+
className?: string;
|
|
8
|
+
} | {
|
|
9
|
+
type: ScientificOutputResourceType;
|
|
10
|
+
tone: "output";
|
|
11
|
+
className?: string;
|
|
12
|
+
};
|
|
13
|
+
/** Matches the file-type taxonomy used by Explorer; consumers may override it. */
|
|
14
|
+
export declare function resolveUploadResourceType(name: string): UploadResourceType;
|
|
15
|
+
/** Shared Explorer resource marker used wherever a resource type is previewed. */
|
|
16
|
+
export declare function ResourceTypeIcon(props: ResourceTypeIconProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type HTMLAttributes } from "react";
|
|
2
|
+
import { type ApprovalPlan } from "../../components/approval-plan-card/approvalPlanTypes";
|
|
3
|
+
|
|
4
|
+
export type ApprovalPlanReviewProps = Omit<HTMLAttributes<HTMLElement>, "children" | "title" | "onChange" | "onSubmit"> & {
|
|
5
|
+
plan: ApprovalPlan;
|
|
6
|
+
requestingChanges?: boolean;
|
|
7
|
+
requestValue: string;
|
|
8
|
+
onRequestValueChange: (value: string) => void;
|
|
9
|
+
onRequestChangesOpen: () => void;
|
|
10
|
+
onRequestChangesCancel: () => void;
|
|
11
|
+
onRequestChangesSubmit: (value: string) => void;
|
|
12
|
+
onApprove: () => void;
|
|
13
|
+
onBack: () => void;
|
|
14
|
+
approving?: boolean;
|
|
15
|
+
submittingRequest?: boolean;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
backLabel?: string;
|
|
18
|
+
requestChangesLabel?: string;
|
|
19
|
+
approveLabel?: string;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Full reading surface for a generated execution plan. Workflow state,
|
|
23
|
+
* navigation, persistence, and accepted transitions remain product-owned.
|
|
24
|
+
*/
|
|
25
|
+
export declare const ApprovalPlanReview: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "children" | "onChange" | "onSubmit" | "title"> & {
|
|
26
|
+
plan: ApprovalPlan;
|
|
27
|
+
requestingChanges?: boolean;
|
|
28
|
+
requestValue: string;
|
|
29
|
+
onRequestValueChange: (value: string) => void;
|
|
30
|
+
onRequestChangesOpen: () => void;
|
|
31
|
+
onRequestChangesCancel: () => void;
|
|
32
|
+
onRequestChangesSubmit: (value: string) => void;
|
|
33
|
+
onApprove: () => void;
|
|
34
|
+
onBack: () => void;
|
|
35
|
+
approving?: boolean;
|
|
36
|
+
submittingRequest?: boolean;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
backLabel?: string;
|
|
39
|
+
requestChangesLabel?: string;
|
|
40
|
+
approveLabel?: string;
|
|
41
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
42
|
+
export type ApprovedPlanDisclosureProps = Omit<HTMLAttributes<HTMLElement>, "children" | "title" | "onChange"> & {
|
|
43
|
+
plan: ApprovalPlan;
|
|
44
|
+
open?: boolean;
|
|
45
|
+
defaultOpen?: boolean;
|
|
46
|
+
onOpenChange?: (open: boolean) => void;
|
|
47
|
+
};
|
|
48
|
+
/** Compact post-approval record. It is deliberately an inline row, not a Card. */
|
|
49
|
+
export declare const ApprovedPlanDisclosure: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<HTMLElement>, "children" | "onChange" | "title"> & {
|
|
50
|
+
plan: ApprovalPlan;
|
|
51
|
+
open?: boolean;
|
|
52
|
+
defaultOpen?: boolean;
|
|
53
|
+
onOpenChange?: (open: boolean) => void;
|
|
54
|
+
} & import("react").RefAttributes<HTMLElement>>;
|
|
55
|
+
export type { ApprovalPlan };
|
|
@@ -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>>;
|