tfy-web-components 0.0.20 → 0.0.22

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 (92) hide show
  1. package/dist/components/atoms/Accordion.d.ts +10 -18
  2. package/dist/components/atoms/Switch.d.ts +1 -5
  3. package/dist/components/atoms/Tooltip.d.ts +3 -5
  4. package/dist/components/molecules/Markdown/ChatFileDownload.d.ts +17 -0
  5. package/dist/components/molecules/Markdown/ExpandableMarkdown.d.ts +13 -0
  6. package/dist/components/molecules/Markdown/LimitedLinesMarkdown.d.ts +10 -0
  7. package/dist/components/molecules/Markdown/Markdown.d.ts +23 -0
  8. package/dist/components/molecules/Markdown/Markdown.utils.d.ts +8 -0
  9. package/dist/components/molecules/Markdown/MarkdownLazy.d.ts +16 -0
  10. package/dist/components/molecules/Markdown/MarkdownWithOpenUI.d.ts +31 -0
  11. package/dist/components/molecules/Markdown/OpenUiFenceBlock.d.ts +9 -0
  12. package/dist/components/molecules/Markdown/SandboxArtifactsFenceBlock.d.ts +9 -0
  13. package/dist/components/molecules/Markdown/codeFencing.d.ts +50 -0
  14. package/dist/components/molecules/Markdown/components.d.ts +59 -0
  15. package/dist/components/molecules/Markdown/index.d.ts +7 -0
  16. package/dist/components/molecules/Markdown/parseSandboxArtifacts.d.ts +15 -0
  17. package/dist/components/molecules/agent-chat/AskUserQuestionCard.d.ts +36 -0
  18. package/dist/components/molecules/agent-chat/AssistantMessage.d.ts +9 -0
  19. package/dist/components/molecules/agent-chat/McpAuthCard.d.ts +16 -0
  20. package/dist/components/molecules/agent-chat/ReasoningCard.d.ts +16 -0
  21. package/dist/components/molecules/agent-chat/SandboxToolCall.d.ts +15 -0
  22. package/dist/components/molecules/agent-chat/StatusDot.d.ts +7 -0
  23. package/dist/components/molecules/agent-chat/SubAgentCard.d.ts +18 -0
  24. package/dist/components/molecules/agent-chat/ToolApprovalBlock.d.ts +36 -0
  25. package/dist/components/molecules/agent-chat/ToolCallCard.d.ts +22 -0
  26. package/dist/components/molecules/agent-chat/ToolCallContentBlock.d.ts +17 -0
  27. package/dist/components/molecules/agent-chat/index.d.ts +22 -0
  28. package/dist/components/molecules/monacoEditorCore/MonacoEditorCore.d.ts +15 -0
  29. package/dist/components/molecules/monacoEditorCore/useFontReady.d.ts +1 -0
  30. package/dist/contexts/RootFontSizeContext.d.ts +7 -0
  31. package/dist/hooks/useContainerDimensions.d.ts +3 -0
  32. package/dist/index.d.ts +6 -0
  33. package/dist/tailwindPreset.d.ts +144 -140
  34. package/dist/types/enum.d.ts +7 -0
  35. package/dist/utils/classNames.d.ts +2 -0
  36. package/dist/utils/conversions.d.ts +1 -0
  37. package/dist/utils/getRootFontSize.d.ts +2 -0
  38. package/dist/utils/index.d.ts +5 -0
  39. package/package.json +1 -1
  40. package/dist/..d.ts +0 -77
  41. package/dist/Accordion.d.ts +0 -57
  42. package/dist/Alert.d.ts +0 -73
  43. package/dist/AudioPlayer.d.ts +0 -10
  44. package/dist/Avatar.d.ts +0 -19
  45. package/dist/Badge.d.ts +0 -47
  46. package/dist/Button.d.ts +0 -64
  47. package/dist/CopyField.d.ts +0 -82
  48. package/dist/CustomDrawer.d.ts +0 -37
  49. package/dist/Dialog.d.ts +0 -18
  50. package/dist/DropdownMenu.d.ts +0 -25
  51. package/dist/IconButton.d.ts +0 -17
  52. package/dist/IconProvider.d.ts +0 -41
  53. package/dist/ImagesPreview.d.ts +0 -12
  54. package/dist/Input.d.ts +0 -27
  55. package/dist/Markdown.d.ts +0 -103
  56. package/dist/Modal.d.ts +0 -12
  57. package/dist/Notification.d.ts +0 -12
  58. package/dist/Notify.d.ts +0 -4
  59. package/dist/OutlinedRadio.d.ts +0 -9
  60. package/dist/SimpleCodeEditor.d.ts +0 -63
  61. package/dist/Skeleton.d.ts +0 -7
  62. package/dist/Spinner.d.ts +0 -15
  63. package/dist/Switch.d.ts +0 -20
  64. package/dist/TabButton.d.ts +0 -20
  65. package/dist/TabPanel.d.ts +0 -14
  66. package/dist/ThumbsFeedback.d.ts +0 -18
  67. package/dist/ToggleButton.d.ts +0 -42
  68. package/dist/Tooltip.d.ts +0 -32
  69. package/dist/UserMessage.d.ts +0 -15
  70. package/dist/UserMessageEdit.d.ts +0 -16
  71. package/dist/agent-chat.d.ts +0 -222
  72. package/dist/animation.d.ts +0 -6
  73. package/dist/backgroundColor.d.ts +0 -5
  74. package/dist/backgroundImage.d.ts +0 -10
  75. package/dist/borderWidth.d.ts +0 -6
  76. package/dist/colors.d.ts +0 -195
  77. package/dist/components/molecules/Markdown.d.ts +0 -1
  78. package/dist/components/molecules/agent-chat.d.ts +0 -1
  79. package/dist/cursor.d.ts +0 -5
  80. package/dist/dropShadow.d.ts +0 -5
  81. package/dist/flexGrow.d.ts +0 -5
  82. package/dist/fontSize.d.ts +0 -8
  83. package/dist/height.d.ts +0 -8
  84. package/dist/keyframes.d.ts +0 -20
  85. package/dist/lightColorPlugin.d.ts +0 -3
  86. package/dist/maxHeight.d.ts +0 -6
  87. package/dist/screens.d.ts +0 -8
  88. package/dist/theme.d.ts +0 -58
  89. package/dist/transitionProperty.d.ts +0 -6
  90. package/dist/useTheme.d.ts +0 -32
  91. package/dist/utils.d.ts +0 -79
  92. package/dist/zIndex.d.ts +0 -5
@@ -1,42 +1,34 @@
1
- import { AccordionDetailsProps } from '@mui/material/AccordionDetails';
2
- import { MUIStyledCommonProps } from '@mui/system';
3
- import { CommonProps } from '@mui/material/OverridableComponent';
4
- import { PaperOwnProps } from '@mui/material';
5
- import { TransitionProps } from '@mui/material/transitions';
6
- import { SxProps, Theme } from '@mui/material/styles';
7
- import { AccordionClasses, AccordionSlotsAndSlotProps } from '@mui/material/Accordion';
8
- import { StyledComponent } from '@emotion/styled';
9
1
  import React from 'react';
10
2
  import { AccordionSummaryProps as MuiAccordionSummaryProps } from '@mui/material/AccordionSummary';
11
- export declare const Accordion: StyledComponent<{
3
+ export declare const Accordion: import("@emotion/styled").StyledComponent<{
12
4
  children: NonNullable<React.ReactNode>;
13
- classes?: Partial<AccordionClasses> | undefined;
5
+ classes?: Partial<import("@mui/material/Accordion").AccordionClasses> | undefined;
14
6
  defaultExpanded?: boolean | undefined;
15
7
  disabled?: boolean | undefined;
16
8
  disableGutters?: boolean | undefined;
17
9
  expanded?: boolean | undefined;
18
10
  onChange?: ((event: React.SyntheticEvent<Element, Event>, expanded: boolean) => void) | undefined;
19
- sx?: SxProps<Theme> | undefined;
20
- TransitionComponent?: React.JSXElementConstructor<TransitionProps & {
11
+ sx?: import("@mui/material/styles").SxProps<import("@mui/material/styles").Theme> | undefined;
12
+ TransitionComponent?: React.JSXElementConstructor<import("@mui/material/transitions").TransitionProps & {
21
13
  children?: React.ReactElement<unknown, any> | undefined;
22
14
  }> | undefined;
23
- TransitionProps?: TransitionProps | undefined;
24
- } & AccordionSlotsAndSlotProps & Omit<PaperOwnProps, "onChange" | "classes"> & CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
15
+ TransitionProps?: import("@mui/material/transitions").TransitionProps | undefined;
16
+ } & import("@mui/material/Accordion").AccordionSlotsAndSlotProps & Omit<import("@mui/material").PaperOwnProps, "onChange" | "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
25
17
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
26
- }, "children" | "onChange" | keyof CommonProps | "disabled" | "sx" | "square" | "elevation" | "expanded" | "TransitionComponent" | "TransitionProps" | "variant" | "disableGutters" | "defaultExpanded" | keyof AccordionSlotsAndSlotProps> & {
18
+ }, "children" | "onChange" | keyof import("@mui/material/OverridableComponent").CommonProps | "disabled" | "sx" | "square" | "elevation" | "expanded" | "TransitionComponent" | "TransitionProps" | "variant" | "disableGutters" | "defaultExpanded" | keyof import("@mui/material/Accordion").AccordionSlotsAndSlotProps> & {
27
19
  component?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
28
20
  } & {
29
21
  background?: string | undefined;
30
22
  borderColor?: string | undefined;
31
- } & MUIStyledCommonProps<Theme>, {}, {}>;
23
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
32
24
  export interface AccordionSummaryProps extends MuiAccordionSummaryProps {
33
25
  hideIcon?: boolean;
34
26
  chevronDown?: boolean;
35
27
  rightIcon?: boolean;
36
28
  iconClasses?: string;
37
29
  }
38
- export declare const AccordionSummary: StyledComponent<AccordionSummaryProps & MUIStyledCommonProps<Theme>, {}, {}>;
39
- export declare const AccordionDetails: StyledComponent<AccordionDetailsProps & MUIStyledCommonProps<Theme>, {}, {}>;
30
+ export declare const AccordionSummary: import("@emotion/styled").StyledComponent<AccordionSummaryProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
31
+ export declare const AccordionDetails: import("@emotion/styled").StyledComponent<import("@mui/material/AccordionDetails").AccordionDetailsProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material/styles").Theme>, {}, {}>;
40
32
  export default function CustomizedAccordions({ children, btn, id, discription, sx, tools, }: {
41
33
  children: React.ReactNode | JSX.Element | string;
42
34
  btn: React.ReactNode | JSX.Element | string;
@@ -1,7 +1,3 @@
1
- import { Theme } from '@mui/material';
2
- import { MUIStyledCommonProps } from '@mui/system';
3
- import { SwitchProps } from '@mui/material/Switch';
4
- import { StyledComponent } from '@emotion/styled';
5
1
  /// <reference types="react" />
6
2
  interface InputHTMLAttributesExtended extends React.InputHTMLAttributes<HTMLInputElement> {
7
3
  'data-test'?: string;
@@ -12,5 +8,5 @@ export interface StyledSwitchProps {
12
8
  heightMultiple?: number;
13
9
  thumbWidthMultiple?: number;
14
10
  }
15
- declare const Switch: StyledComponent<SwitchProps & MUIStyledCommonProps<Theme> & StyledSwitchProps, {}, {}>;
11
+ declare const Switch: import("@emotion/styled").StyledComponent<import("@mui/material/Switch").SwitchProps & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme> & StyledSwitchProps, {}, {}>;
16
12
  export default Switch;
@@ -1,5 +1,3 @@
1
- import { Theme } from '@mui/material';
2
- import { MUIStyledCommonProps } from '@mui/system';
3
1
  import * as React from 'react';
4
2
  import { type TooltipProps as MuiTooltipProps } from '@mui/material/Tooltip';
5
3
  export type Sizes = 'large' | 'variable' | 'medium' | 'fit';
@@ -13,12 +11,12 @@ export type TooltipProps = Partial<Pick<CustomTooltipProps, 'title' | 'placement
13
11
  export declare const LightTooltip: React.NamedExoticComponent<MuiTooltipProps & {
14
12
  size?: Sizes | undefined;
15
13
  border?: boolean | undefined;
16
- } & MUIStyledCommonProps<Theme>>;
14
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>>;
17
15
  export declare const DarkTooltip: React.NamedExoticComponent<MuiTooltipProps & {
18
16
  size?: Sizes | undefined;
19
17
  border?: boolean | undefined;
20
- } & MUIStyledCommonProps<Theme>>;
18
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>>;
21
19
  export declare const UnstyledTooltip: React.NamedExoticComponent<MuiTooltipProps & {
22
20
  size?: Sizes | undefined;
23
21
  border?: boolean | undefined;
24
- } & MUIStyledCommonProps<Theme>>;
22
+ } & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>>;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ import type { SandboxArtifactFile } from './parseSandboxArtifacts';
3
+ export type ChatFileDownloadProps = {
4
+ files: SandboxArtifactFile[];
5
+ /** When set, artifact `path` is resolved against this base (unless `path` is already an absolute URL). */
6
+ fileDownloadBaseUrl?: string;
7
+ readOnly?: boolean;
8
+ /** Custom download handler that receives the original sandbox artifact path. */
9
+ onDownloadArtifact?: (path: string, filename: string) => Promise<void>;
10
+ /**
11
+ * Custom download handler. Receives the resolved URL and suggested filename.
12
+ * When omitted, a basic fetch-and-save fallback is used.
13
+ */
14
+ onDownloadFile?: (url: string, filename: string) => Promise<void>;
15
+ };
16
+ declare const ChatFileDownload: React.FC<ChatFileDownloadProps>;
17
+ export default ChatFileDownload;
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ declare const ExpandableMarkdown: ({ title, children, markdownClasses, buttonWrapperClasses, minimisedButtonWrapperClasses, bodyClass, fullscreen: externalFullscreen, onFullscreenChange, showExpandButton, }: {
3
+ title?: string | undefined;
4
+ children: string;
5
+ markdownClasses?: string | undefined;
6
+ buttonWrapperClasses?: string | undefined;
7
+ minimisedButtonWrapperClasses?: string | undefined;
8
+ bodyClass?: string | undefined;
9
+ fullscreen?: boolean | undefined;
10
+ onFullscreenChange?: ((fullscreen: boolean) => void) | undefined;
11
+ showExpandButton?: boolean | undefined;
12
+ }) => React.JSX.Element;
13
+ export default ExpandableMarkdown;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ interface LimitedLinesMarkdownProps {
3
+ title?: string;
4
+ children: React.ReactNode | string;
5
+ maxLines?: number;
6
+ markdownClasses?: string;
7
+ bodyClass?: string;
8
+ }
9
+ declare const LimitedLinesMarkdown: React.FC<LimitedLinesMarkdownProps>;
10
+ export default LimitedLinesMarkdown;
@@ -0,0 +1,23 @@
1
+ import React from 'react';
2
+ import ReactMarkdown from 'react-markdown';
3
+ import { InfoType } from '../../../types/enum';
4
+ import { type CodeFencingConfig } from './codeFencing';
5
+ export type { CodeFenceBlockDefinition, CodeFencingConfig, FencedCodeBlockProps } from './codeFencing';
6
+ export type MarkdownProps = Omit<React.ComponentProps<typeof ReactMarkdown>, 'components'> & {
7
+ className?: string;
8
+ type?: InfoType;
9
+ codeFileName?: string;
10
+ darkTheme?: boolean;
11
+ bodyClass?: string;
12
+ skipLanguageMatch?: boolean;
13
+ isReadme?: boolean;
14
+ isMathPluginEnabled?: boolean;
15
+ codeStyle?: React.CSSProperties;
16
+ showCopyLabel?: boolean;
17
+ showCopyOutside?: boolean;
18
+ customStyles?: Record<string, any>;
19
+ enableCopy?: boolean;
20
+ codeFencingConfig?: CodeFencingConfig;
21
+ };
22
+ declare const Markdown: React.FC<MarkdownProps>;
23
+ export default Markdown;
@@ -0,0 +1,8 @@
1
+ import { ComponentType, LazyExoticComponent } from 'react';
2
+ export declare function lazyWithPreload<T extends ComponentType<any>>(factory: () => Promise<{
3
+ default: T;
4
+ }>): LazyExoticComponent<T> & {
5
+ preload: () => Promise<{
6
+ default: T;
7
+ }>;
8
+ };
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { type SpinnerProps } from '../../../components/atoms/Spinner';
3
+ import { type FencedCodeBlockProps, type MarkdownProps } from './Markdown';
4
+ export type { FencedCodeBlockProps, MarkdownProps };
5
+ declare const Markdown: React.LazyExoticComponent<React.FC<MarkdownProps>> & {
6
+ preload: () => Promise<{
7
+ default: React.FC<MarkdownProps>;
8
+ }>;
9
+ };
10
+ interface MarkdownLazyProps extends MarkdownProps {
11
+ spinnerProps?: SpinnerProps;
12
+ }
13
+ declare const MarkdownLazy: React.FC<MarkdownLazyProps> & {
14
+ preload?: typeof Markdown.preload;
15
+ };
16
+ export default MarkdownLazy;
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import { type MarkdownProps } from './MarkdownLazy';
3
+ export type MarkdownWithOpenUIProps = Omit<MarkdownProps, 'codeFencingConfig'> & {
4
+ /** Forwarded into the OpenUI fence block (e.g. streaming assistant output). */
5
+ isStreaming?: boolean;
6
+ /** Base URL for resolving sandbox artifact download paths (e.g. gateway file endpoint). */
7
+ fileDownloadBaseUrl?: string;
8
+ /** When true, download actions in sandbox artifact blocks are hidden/disabled. */
9
+ readOnly?: boolean;
10
+ /** Custom download handler that receives the original sandbox artifact path. */
11
+ onDownloadArtifact?: (path: string, filename: string) => Promise<void>;
12
+ /**
13
+ * Custom download handler forwarded to sandbox artifact blocks.
14
+ * Receives the resolved URL and suggested filename.
15
+ */
16
+ onDownloadFile?: (url: string, filename: string) => Promise<void>;
17
+ };
18
+ /**
19
+ * Same module as the lazy OpenUI fence block; call to preload OpenUI (react-lang, react-ui, CSS)
20
+ * before markdown is known to contain ```openui fences — e.g. when opening the playground chat.
21
+ */
22
+ export declare const preloadMarkdownOpenUI: () => Promise<{
23
+ default: React.ComponentType<any>;
24
+ }>;
25
+ /**
26
+ * Markdown with optional OpenUI fenced blocks (` ```openui `).
27
+ * OpenUI dependencies load only when the markdown string contains such a fence, or when
28
+ * {@link preloadMarkdownOpenUI} has been called earlier.
29
+ */
30
+ export declare const MarkdownWithOpenUI: React.FC<MarkdownWithOpenUIProps>;
31
+ export default MarkdownWithOpenUI;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { FencedCodeBlockProps } from './codeFencing';
3
+ /**
4
+ * Renders ```openui … ``` using the official OpenUI component library and theme.
5
+ * Loaded only via dynamic import (see MarkdownWithOpenUI).
6
+ * @see https://www.openui.com/docs/openui-lang
7
+ */
8
+ declare const OpenUiFenceBlock: React.FC<FencedCodeBlockProps>;
9
+ export default OpenUiFenceBlock;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { FencedCodeBlockProps } from './codeFencing';
3
+ /**
4
+ * Renders ```sandbox_artifacts ... ``` fences as a `ChatFileDownload` list.
5
+ * Fence body: one `[filename](path)` markdown-link pair per line (or inline), e.g. `[add.py](/tmp/add.py)`.
6
+ * Parsing is memoised on `content` so streaming updates only re-parse when content changes.
7
+ */
8
+ declare const SandboxArtifactsFenceBlock: React.FC<FencedCodeBlockProps>;
9
+ export default SandboxArtifactsFenceBlock;
@@ -0,0 +1,50 @@
1
+ import React from 'react';
2
+ import { type Components } from 'react-markdown';
3
+ /** Minimal HAST shape for `pre` → `code` (react-markdown passes `node` with `passNode`). */
4
+ type HastElementLike = {
5
+ type?: string;
6
+ tagName?: string;
7
+ children?: unknown[];
8
+ properties?: {
9
+ className?: string | string[];
10
+ };
11
+ };
12
+ /**
13
+ * Reads fenced block language from the HAST `pre` node (child `code` `className` / `language-*`).
14
+ */
15
+ export declare function fenceLangFromPreHastNode(node: HastElementLike | undefined): string | undefined;
16
+ export type FencedCodeBlockProps = {
17
+ isStreaming?: boolean;
18
+ /** Optional base URL for fenced blocks that expose downloads (e.g. sandbox artifacts). */
19
+ fileDownloadBaseUrl?: string;
20
+ /** When true, download actions inside fenced blocks are hidden/disabled. */
21
+ readOnly?: boolean;
22
+ /** Custom download handler that receives the original sandbox artifact path. */
23
+ onDownloadArtifact?: (path: string, filename: string) => Promise<void>;
24
+ /** Custom download handler for fenced blocks that expose file downloads. */
25
+ onDownloadFile?: (url: string, filename: string) => Promise<void>;
26
+ content: string;
27
+ darkTheme?: boolean;
28
+ };
29
+ /**
30
+ * Registers a fenced-code renderer for a language id. `content` and `darkTheme` are always
31
+ * supplied by the markdown layer; `componentProps` are merged first so the fence wins for those keys.
32
+ */
33
+ export type CodeFenceBlockDefinition = {
34
+ Component: React.ComponentType<FencedCodeBlockProps>;
35
+ componentProps?: Partial<Omit<FencedCodeBlockProps, 'content' | 'darkTheme'>>;
36
+ };
37
+ /** Maps language ids (e.g. `openui` from `language-openui`) to a block definition. */
38
+ export type CodeFencingConfig = Partial<Record<string, CodeFenceBlockDefinition>>;
39
+ export declare function isCodeFencingActive(config: CodeFencingConfig | undefined): config is CodeFencingConfig;
40
+ export type ConditionalPreOptions = {
41
+ codeFencingConfig: CodeFencingConfig | undefined;
42
+ defaultComponent: NonNullable<Components['pre']> | undefined;
43
+ };
44
+ /**
45
+ * Renders `<pre>` for normal fenced code, but `<>` for languages
46
+ * registered in `codeFencingConfig`, using HAST `node` on `pre` to detect language per block.
47
+ */
48
+ export declare function createConditionalPreComponent({ codeFencingConfig, defaultComponent, }: ConditionalPreOptions): NonNullable<Components['pre']>;
49
+ export declare function createFencingCodeComponent(DefaultCode: NonNullable<Components['code']>, config: CodeFencingConfig, darkTheme: boolean | undefined): NonNullable<Components['code']>;
50
+ export {};
@@ -0,0 +1,59 @@
1
+ import React, { CSSProperties, FC, LiHTMLAttributes, ReactNode } from 'react';
2
+ interface CodeProps {
3
+ children: ReactNode;
4
+ className?: string;
5
+ showCopyOutside?: boolean;
6
+ codeFileName?: string;
7
+ darkTheme?: boolean;
8
+ skipLanguageMatch?: boolean;
9
+ style?: CSSProperties;
10
+ showCopyLabel?: boolean;
11
+ node?: unknown;
12
+ inline?: boolean;
13
+ enableCopy: boolean;
14
+ }
15
+ export declare const Code: FC<CodeProps>;
16
+ export declare const PreComponent: ({ children }: {
17
+ children: ReactNode;
18
+ }) => React.JSX.Element;
19
+ export declare const LiComponent: ({ index, ordered, className: componentClasses, children: componentChildren, node, ...args }: {
20
+ ordered: boolean;
21
+ index: number;
22
+ className: string;
23
+ children: React.ReactNode;
24
+ node?: unknown;
25
+ } & React.LiHTMLAttributes<HTMLLIElement>) => React.JSX.Element;
26
+ export declare const GetOlComponent: ({ customStyles }: {
27
+ customStyles?: Partial<{
28
+ ol: CSSProperties;
29
+ }> | undefined;
30
+ }) => ({ children: olChildren, node, ...args }: {
31
+ children: ReactNode;
32
+ node?: unknown;
33
+ }) => React.JSX.Element;
34
+ export declare const GetUlComponent: ({ customStyles }: {
35
+ customStyles?: Partial<{
36
+ ul: CSSProperties;
37
+ }> | undefined;
38
+ }) => ({ children: ulChildren, node, ...args }: {
39
+ children: ReactNode;
40
+ node?: unknown;
41
+ }) => React.JSX.Element;
42
+ export declare const GetAnchorComponent: ({ customStyles }: {
43
+ customStyles?: Partial<{
44
+ a: CSSProperties;
45
+ }> | undefined;
46
+ }) => ({ children: linkChildren, node, ...props }: {
47
+ children: ReactNode;
48
+ node?: any;
49
+ }) => React.JSX.Element;
50
+ export declare const GetCodeComponent: ({ showCopyLabel, showCopyOutside, codeFileName, darkTheme, skipLanguageMatch, codeStyle, enableCopy, }: {
51
+ showCopyLabel?: boolean | undefined;
52
+ showCopyOutside?: boolean | undefined;
53
+ codeFileName?: string | undefined;
54
+ darkTheme?: boolean | undefined;
55
+ skipLanguageMatch?: boolean | undefined;
56
+ codeStyle?: React.CSSProperties | undefined;
57
+ enableCopy: boolean;
58
+ }) => (props: any) => React.JSX.Element;
59
+ export {};
@@ -0,0 +1,7 @@
1
+ export type { CodeFenceBlockDefinition, CodeFencingConfig } from './codeFencing';
2
+ export type { FencedCodeBlockProps, MarkdownProps } from './MarkdownLazy';
3
+ export { default } from './MarkdownLazy';
4
+ export type { MarkdownWithOpenUIProps } from './MarkdownWithOpenUI';
5
+ export { MarkdownWithOpenUI, preloadMarkdownOpenUI } from './MarkdownWithOpenUI';
6
+ export type { SandboxArtifactFile } from './parseSandboxArtifacts';
7
+ export { parseSandboxArtifacts } from './parseSandboxArtifacts';
@@ -0,0 +1,15 @@
1
+ export type SandboxArtifactFile = {
2
+ name: string;
3
+ path: string;
4
+ };
5
+ /**
6
+ * Parses a `sandbox_artifacts` fence body into an ordered list of `{ name, path }` files.
7
+ *
8
+ * Expected lines look like `[add.py](/tmp/add.py)`; multiple entries may be separated by newlines.
9
+ * The optional leading `sandbox_artifacts` literal is stripped before pair extraction for
10
+ * backwards compatibility with inline `sandbox_artifacts[...](...)...` bodies.
11
+ *
12
+ * Pairs with empty `name` or empty `path` are dropped, which also ignores incomplete trailing
13
+ * tokens like `[a]` without a following `(...)`.
14
+ */
15
+ export declare function parseSandboxArtifacts(content: string): SandboxArtifactFile[];
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ export interface Question {
3
+ id: string;
4
+ question: string;
5
+ options: string[];
6
+ }
7
+ export interface AnsweredQuestion extends Question {
8
+ answer: string;
9
+ isCustom: boolean;
10
+ }
11
+ export interface AskUserAnswerDraft {
12
+ radioValue: string;
13
+ custom: string;
14
+ }
15
+ export interface AskUserQuestionCardProps {
16
+ questions: Question[];
17
+ answeredQuestions?: AnsweredQuestion[];
18
+ onSubmit: () => void;
19
+ currentQuestion?: Question;
20
+ currentQuestionIndex?: number;
21
+ currentAnswer?: AskUserAnswerDraft;
22
+ totalQuestions?: number;
23
+ isMultiQuestion?: boolean;
24
+ isLastQuestion?: boolean;
25
+ allQuestionsAnswered?: boolean;
26
+ isSubmitDisabled?: boolean;
27
+ isSubmitAllDisabled?: boolean;
28
+ onCurrentQuestionIndexChange?: (index: number) => void;
29
+ onCurrentAnswerChange?: (questionId: string, update: Partial<AskUserAnswerDraft>) => void;
30
+ readOnly?: boolean;
31
+ dataTestPrefix?: string;
32
+ className?: string;
33
+ }
34
+ export declare const ASK_USER_CUSTOM_OPTION = "__tfy_ask_user_question_custom__";
35
+ declare const AskUserQuestionCard: React.FC<AskUserQuestionCardProps>;
36
+ export default AskUserQuestionCard;
@@ -0,0 +1,9 @@
1
+ import type { ReactNode } from 'react';
2
+ export interface AssistantMessageProps {
3
+ children: ReactNode;
4
+ error?: ReactNode;
5
+ actionBar?: ReactNode;
6
+ className?: string;
7
+ }
8
+ declare const AssistantMessage: ({ children, error, actionBar, className }: AssistantMessageProps) => import("react").JSX.Element;
9
+ export default AssistantMessage;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ export interface McpServer {
3
+ id: string;
4
+ name: string;
5
+ }
6
+ export interface McpAuthCardProps {
7
+ servers: McpServer[];
8
+ onConnect: (serverId: string) => void;
9
+ onContinue?: () => void;
10
+ readOnly?: boolean;
11
+ title?: string;
12
+ dataTestPrefix?: string;
13
+ className?: string;
14
+ }
15
+ declare const McpAuthCard: React.FC<McpAuthCardProps>;
16
+ export default McpAuthCard;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ export interface ReasoningCardProps {
3
+ content: string;
4
+ isStreaming?: boolean;
5
+ expanded?: boolean;
6
+ onToggle?: () => void;
7
+ isMultiLine?: boolean;
8
+ reasoningTimeText?: string | null;
9
+ previewText?: string;
10
+ headingText?: string;
11
+ contentRef?: (node: HTMLDivElement | null) => void;
12
+ dataTestPrefix?: string;
13
+ className?: string;
14
+ }
15
+ declare const ReasoningCard: React.FC<ReasoningCardProps>;
16
+ export default ReasoningCard;
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ export interface SandboxToolCallProps {
3
+ command?: string;
4
+ exitCode?: number | null;
5
+ argsJson?: string;
6
+ resultText?: string;
7
+ resultJson?: string;
8
+ viewMode?: 'terminal' | 'code';
9
+ hasContent?: boolean;
10
+ onViewModeChange?: (viewMode: 'terminal' | 'code') => void;
11
+ dataTestPrefix?: string;
12
+ className?: string;
13
+ }
14
+ declare const SandboxToolCall: React.FC<SandboxToolCallProps>;
15
+ export default SandboxToolCall;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ type StatusDotProps = {
3
+ className?: string;
4
+ colorClassName?: string;
5
+ };
6
+ declare const StatusDot: React.FC<StatusDotProps>;
7
+ export default StatusDot;
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+ export type SubAgentStatus = 'running' | 'success' | 'error';
3
+ export interface SubAgentCardProps {
4
+ agentName: string;
5
+ instruction?: string;
6
+ stepCount?: number;
7
+ status?: SubAgentStatus;
8
+ expanded?: boolean;
9
+ onToggle?: () => void;
10
+ durationText?: string;
11
+ children?: React.ReactNode;
12
+ /** Optional markdown renderer override (defaults to tfy Markdown). */
13
+ renderInstruction?: (instruction: string) => React.ReactNode;
14
+ dataTestPrefix?: string;
15
+ className?: string;
16
+ }
17
+ declare const SubAgentCard: React.FC<SubAgentCardProps>;
18
+ export default SubAgentCard;
@@ -0,0 +1,36 @@
1
+ import React from 'react';
2
+ export interface ApprovalOption {
3
+ id: string;
4
+ label: string;
5
+ variant?: 'primary' | 'secondary' | 'destructive';
6
+ requiresReason?: boolean;
7
+ grants?: readonly string[];
8
+ confirm?: {
9
+ title?: string;
10
+ description?: string;
11
+ };
12
+ }
13
+ export interface ToolApprovalBlockProps {
14
+ toolName: string;
15
+ approveOptions?: ApprovalOption[];
16
+ denyOptions?: ApprovalOption[];
17
+ onSelect: (optionId: string, reason?: string) => void;
18
+ status?: {
19
+ type: 'approved' | 'denied';
20
+ label?: string;
21
+ reason?: string;
22
+ };
23
+ selectedDenyOption?: ApprovalOption;
24
+ denialReason?: string;
25
+ showReasonError?: boolean;
26
+ onDenyOptionChange?: (optionId: string | null) => void;
27
+ onDenialReasonChange?: (reason: string) => void;
28
+ onReasonSubmit?: () => void;
29
+ disabled?: boolean;
30
+ readOnly?: boolean;
31
+ showLineBelow?: boolean;
32
+ dataTestPrefix?: string;
33
+ className?: string;
34
+ }
35
+ declare const ToolApprovalBlock: React.FC<ToolApprovalBlockProps>;
36
+ export default ToolApprovalBlock;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { IconProp } from '../../atoms/IconProvider';
3
+ export interface ToolCallCardProps {
4
+ icon?: IconProp;
5
+ iconClassName?: string;
6
+ toolName: string;
7
+ expanded?: boolean;
8
+ onToggle?: () => void;
9
+ awaiting?: boolean;
10
+ awaitingText?: string;
11
+ showExpandChevron?: boolean;
12
+ showResponseLine?: boolean;
13
+ responseIcon?: any;
14
+ approvalSlot?: React.ReactNode;
15
+ requestSlot?: React.ReactNode;
16
+ responseSlot?: React.ReactNode;
17
+ dataTestPrefix?: string;
18
+ className?: string;
19
+ highlightCard?: boolean;
20
+ }
21
+ declare const ToolCallCard: React.FC<ToolCallCardProps>;
22
+ export default ToolCallCard;
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ export interface ToolCallContentBlockProps {
3
+ title: string;
4
+ content: string;
5
+ isJson?: boolean;
6
+ copyValue?: string;
7
+ maxHeight?: string;
8
+ resizable?: boolean;
9
+ fullscreen?: boolean;
10
+ onFullscreenChange?: (fullscreen: boolean) => void;
11
+ contentHeightRem?: number;
12
+ contentRef?: (node: HTMLDivElement | null) => void;
13
+ dataTestPrefix?: string;
14
+ className?: string;
15
+ }
16
+ declare const ToolCallContentBlock: React.FC<ToolCallContentBlockProps>;
17
+ export default ToolCallContentBlock;
@@ -0,0 +1,22 @@
1
+ export type { AnsweredQuestion, AskUserAnswerDraft, AskUserQuestionCardProps, Question } from './AskUserQuestionCard';
2
+ export { ASK_USER_CUSTOM_OPTION, default as AskUserQuestionCard } from './AskUserQuestionCard';
3
+ export type { AssistantMessageProps } from './AssistantMessage';
4
+ export { default as AssistantMessage } from './AssistantMessage';
5
+ export type { McpAuthCardProps, McpServer } from './McpAuthCard';
6
+ export { default as McpAuthCard } from './McpAuthCard';
7
+ export type { ReasoningCardProps } from './ReasoningCard';
8
+ export { default as ReasoningCard } from './ReasoningCard';
9
+ export type { SandboxToolCallProps } from './SandboxToolCall';
10
+ export { default as SandboxToolCall } from './SandboxToolCall';
11
+ export type { SubAgentCardProps, SubAgentStatus } from './SubAgentCard';
12
+ export { default as SubAgentCard } from './SubAgentCard';
13
+ export type { ApprovalOption, ToolApprovalBlockProps } from './ToolApprovalBlock';
14
+ export { default as ToolApprovalBlock } from './ToolApprovalBlock';
15
+ export type { ToolCallCardProps } from './ToolCallCard';
16
+ export { default as ToolCallCard } from './ToolCallCard';
17
+ export type { ToolCallContentBlockProps } from './ToolCallContentBlock';
18
+ export { default as ToolCallContentBlock } from './ToolCallContentBlock';
19
+ export type { UserMessageProps } from './UserMessage';
20
+ export { default as UserMessage } from './UserMessage';
21
+ export type { UserMessageEditProps } from './UserMessageEdit';
22
+ export { default as UserMessageEdit } from './UserMessageEdit';
@@ -0,0 +1,15 @@
1
+ /// <reference types="react" />
2
+ import * as monaco from 'monaco-editor';
3
+ export interface MonacoEditorCoreProps {
4
+ defaultLanguage: string;
5
+ defaultValue?: string;
6
+ value?: string;
7
+ className?: string;
8
+ onChange?: (value: string | undefined) => void;
9
+ onMount: (editor: monaco.editor.IStandaloneCodeEditor, monacoInstance: typeof monaco) => void;
10
+ beforeMount: (monacoInstance: typeof monaco) => void;
11
+ theme: string;
12
+ options: monaco.editor.IStandaloneEditorConstructionOptions;
13
+ onValidate?: (errors: unknown) => void;
14
+ }
15
+ export default function MonacoEditorCore({ defaultLanguage, defaultValue, value, className, onChange, onMount, beforeMount, theme, options, onValidate, }: MonacoEditorCoreProps): import("react").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare function useFontReady(spec: string): void;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ interface RootFontSizeContextType {
3
+ rootFontSize: number;
4
+ }
5
+ export declare const useRootFontSize: () => RootFontSizeContextType;
6
+ export declare const RootFontSizeProvider: React.FC<React.PropsWithChildren>;
7
+ export {};
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ declare const useContainerDimensions: <T extends HTMLElement>(target: React.MutableRefObject<T | null>) => DOMRect | undefined;
3
+ export default useContainerDimensions;