@app-studio/web 0.9.36 → 0.9.38

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 (125) hide show
  1. package/dist/components/ChatInput/ChatInput/ChatInput.style.d.ts +31 -0
  2. package/dist/components/Drawer/Drawer/Drawer.props.d.ts +61 -0
  3. package/dist/components/Drawer/Drawer/Drawer.style.d.ts +4 -0
  4. package/dist/components/Drawer/Drawer/Drawer.view.d.ts +7 -0
  5. package/dist/components/Drawer/Drawer.d.ts +2 -0
  6. package/dist/components/index.d.ts +2 -22
  7. package/dist/pages/drawer.page.d.ts +3 -0
  8. package/dist/utils/apiConfig.d.ts +2 -2
  9. package/dist/utils/typography.d.ts +3 -4
  10. package/dist/web.cjs.development.js +2321 -12073
  11. package/dist/web.cjs.development.js.map +1 -1
  12. package/dist/web.cjs.production.min.js +1 -1
  13. package/dist/web.cjs.production.min.js.map +1 -1
  14. package/dist/web.esm.js +2114 -11857
  15. package/dist/web.esm.js.map +1 -1
  16. package/dist/web.umd.development.js +3019 -12768
  17. package/dist/web.umd.development.js.map +1 -1
  18. package/dist/web.umd.production.min.js +1 -1
  19. package/dist/web.umd.production.min.js.map +1 -1
  20. package/docs/components/Accordion.mdx +4 -4
  21. package/docs/components/Alert.mdx +1 -1
  22. package/docs/components/Background.mdx +5 -5
  23. package/docs/components/Badge.mdx +1 -1
  24. package/docs/components/Calendar.mdx +3 -0
  25. package/docs/components/Card.mdx +8 -8
  26. package/docs/components/Carousel.mdx +6 -6
  27. package/docs/components/ColorInput.mdx +1 -1
  28. package/docs/components/Drawer.mdx +164 -0
  29. package/docs/components/Gradient.mdx +6 -6
  30. package/docs/components/HoverCard.mdx +5 -5
  31. package/docs/components/KanbanBoard.mdx +132 -2
  32. package/docs/components/Link.mdx +2 -2
  33. package/docs/components/Menubar.mdx +1 -1
  34. package/docs/components/Message.mdx +4 -4
  35. package/docs/components/Modal.mdx +4 -4
  36. package/docs/components/OKR.mdx +40 -63
  37. package/docs/components/Tabs.mdx +1 -1
  38. package/docs/components/ToggleGroup.mdx +4 -4
  39. package/docs/components/Tooltip.mdx +2 -2
  40. package/docs/conventions.md +1 -1
  41. package/package.json +2 -2
  42. package/dist/components/Calendar/Calendar/Calendar.props.d.ts +0 -74
  43. package/dist/components/Calendar/Calendar/Calendar.style.d.ts +0 -107
  44. package/dist/components/Calendar/Calendar/Calendar.utils.d.ts +0 -91
  45. package/dist/components/Calendar/Calendar/Calendar.view.d.ts +0 -3
  46. package/dist/components/Calendar/Calendar.d.ts +0 -1
  47. package/dist/components/Flow/Flow/Flow.props.d.ts +0 -144
  48. package/dist/components/Flow/Flow/Flow.state.d.ts +0 -95
  49. package/dist/components/Flow/Flow/Flow.style.d.ts +0 -40
  50. package/dist/components/Flow/Flow/Flow.type.d.ts +0 -181
  51. package/dist/components/Flow/Flow/Flow.view.d.ts +0 -28
  52. package/dist/components/Flow/Flow.d.ts +0 -2
  53. package/dist/components/Flow/index.d.ts +0 -2
  54. package/dist/components/KanbanBoard/KanbanBoard/KanbanBoard.props.d.ts +0 -47
  55. package/dist/components/KanbanBoard/KanbanBoard/KanbanBoard.state.d.ts +0 -13
  56. package/dist/components/KanbanBoard/KanbanBoard/KanbanBoard.view.d.ts +0 -3
  57. package/dist/components/KanbanBoard/KanbanBoard.d.ts +0 -3
  58. package/dist/components/OKR/OKR/OKR.props.d.ts +0 -72
  59. package/dist/components/OKR/OKR/OKR.style.d.ts +0 -19
  60. package/dist/components/OKR/OKR/OKR.view.d.ts +0 -4
  61. package/dist/components/OKR/OKR.d.ts +0 -4
  62. package/dist/components/Text/Text/Text.props.d.ts +0 -29
  63. package/dist/components/Text/Text/Text.style.d.ts +0 -27
  64. package/dist/components/Text/Text/Text.utils.d.ts +0 -2
  65. package/dist/components/Text/Text/Text.view.d.ts +0 -19
  66. package/dist/components/Text/Text.d.ts +0 -5
  67. package/dist/components/Tree/Tree/Tree.props.d.ts +0 -106
  68. package/dist/components/Tree/Tree/Tree.state.d.ts +0 -38
  69. package/dist/components/Tree/Tree/Tree.style.d.ts +0 -41
  70. package/dist/components/Tree/Tree/Tree.type.d.ts +0 -133
  71. package/dist/components/Tree/Tree/Tree.view.d.ts +0 -36
  72. package/dist/components/Tree/Tree.d.ts +0 -2
  73. package/dist/components/adk/AgentChat/AgentChat/AgentChat.props.d.ts +0 -180
  74. package/dist/components/adk/AgentChat/AgentChat/AgentChat.state.d.ts +0 -24
  75. package/dist/components/adk/AgentChat/AgentChat/AgentChat.style.d.ts +0 -132
  76. package/dist/components/adk/AgentChat/AgentChat/AgentChat.view.d.ts +0 -12
  77. package/dist/components/adk/AgentChat/AgentChat/AgentMessage.d.ts +0 -21
  78. package/dist/components/adk/AgentChat/AgentChat/AgentRunProgress.d.ts +0 -11
  79. package/dist/components/adk/AgentChat/AgentChat/AgentTypingIndicator.d.ts +0 -7
  80. package/dist/components/adk/AgentChat/AgentChat/MessageAttachmentPreview.d.ts +0 -12
  81. package/dist/components/adk/AgentChat/AgentChat.d.ts +0 -41
  82. package/dist/components/adk/AgentEval/AgentEval/AgentEval.props.d.ts +0 -213
  83. package/dist/components/adk/AgentEval/AgentEval/AgentEval.state.d.ts +0 -27
  84. package/dist/components/adk/AgentEval/AgentEval/AgentEval.style.d.ts +0 -144
  85. package/dist/components/adk/AgentEval/AgentEval/AgentEval.view.d.ts +0 -12
  86. package/dist/components/adk/AgentEval/AgentEval/EvaluationCreator.d.ts +0 -17
  87. package/dist/components/adk/AgentEval/AgentEval/EvaluationList.d.ts +0 -23
  88. package/dist/components/adk/AgentEval/AgentEval/EvaluationMetrics.d.ts +0 -15
  89. package/dist/components/adk/AgentEval/AgentEval/EvaluationResults.d.ts +0 -19
  90. package/dist/components/adk/AgentEval/AgentEval.d.ts +0 -41
  91. package/dist/components/adk/AgentSession/AgentSession/AgentSession.props.d.ts +0 -170
  92. package/dist/components/adk/AgentSession/AgentSession/AgentSession.state.d.ts +0 -32
  93. package/dist/components/adk/AgentSession/AgentSession/AgentSession.style.d.ts +0 -105
  94. package/dist/components/adk/AgentSession/AgentSession/AgentSession.view.d.ts +0 -12
  95. package/dist/components/adk/AgentSession/AgentSession/SessionActions.d.ts +0 -20
  96. package/dist/components/adk/AgentSession/AgentSession/SessionFilters.d.ts +0 -14
  97. package/dist/components/adk/AgentSession/AgentSession/SessionListItem.d.ts +0 -26
  98. package/dist/components/adk/AgentSession/AgentSession.d.ts +0 -42
  99. package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.props.d.ts +0 -194
  100. package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.state.d.ts +0 -27
  101. package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.style.d.ts +0 -146
  102. package/dist/components/adk/AgentTrace/AgentTrace/AgentTrace.view.d.ts +0 -12
  103. package/dist/components/adk/AgentTrace/AgentTrace/TraceEventList.d.ts +0 -20
  104. package/dist/components/adk/AgentTrace/AgentTrace/TraceFilters.d.ts +0 -13
  105. package/dist/components/adk/AgentTrace/AgentTrace/TraceMetrics.d.ts +0 -16
  106. package/dist/components/adk/AgentTrace/AgentTrace/TraceTimeline.d.ts +0 -19
  107. package/dist/components/adk/AgentTrace/AgentTrace/TraceVisualization.d.ts +0 -19
  108. package/dist/components/adk/AgentTrace/AgentTrace.d.ts +0 -44
  109. package/dist/components/adk/useAdk.d.ts +0 -42
  110. package/dist/pages/adk/CompleteAgentApp.d.ts +0 -30
  111. package/dist/pages/adk/adkComponents.page.d.ts +0 -8
  112. package/dist/pages/adk/adkIntegration.page.d.ts +0 -6
  113. package/dist/pages/adk/agentChat.page.d.ts +0 -8
  114. package/dist/pages/adk/providers/AdkProvider.d.ts +0 -83
  115. package/dist/pages/adk/providers/index.d.ts +0 -1
  116. package/dist/pages/adk/services/AgentService.d.ts +0 -167
  117. package/dist/pages/adk/services/AgentServiceProvider.d.ts +0 -83
  118. package/dist/pages/adk/services/AgentServiceUtils.d.ts +0 -176
  119. package/dist/pages/adk/services/index.d.ts +0 -50
  120. package/dist/pages/calendar.page.d.ts +0 -3
  121. package/dist/pages/flow.page.d.ts +0 -3
  122. package/dist/pages/kanbanBoard.page.d.ts +0 -3
  123. package/dist/pages/okr.page.d.ts +0 -3
  124. package/dist/pages/text.page.d.ts +0 -3
  125. package/dist/pages/tree.page.d.ts +0 -3
@@ -1,29 +0,0 @@
1
- /// <reference types="react" />
2
- import type { TextProps as TextAppProps } from 'app-studio';
3
- import { Headings, Size, TextWeights } from './Text.type';
4
- export interface TextProps extends Omit<TextAppProps, 'children' | 'style' | 'pointerEvents'> {
5
- children?: React.ReactNode;
6
- backgroundColor?: string;
7
- /**
8
- * Background color used to automatically compute a readable text color
9
- */
10
- bgColor?: string;
11
- heading?: Headings;
12
- isItalic?: boolean;
13
- isStriked?: boolean;
14
- isUnderlined?: boolean;
15
- isSub?: boolean;
16
- isSup?: boolean;
17
- maxLines?: number;
18
- size?: Size;
19
- weight?: TextWeights;
20
- }
21
- export interface ContentProps {
22
- children: React.ReactNode | string;
23
- isSub?: boolean;
24
- isSup?: boolean;
25
- }
26
- export interface TruncateTextProps {
27
- text: string;
28
- maxLines?: number;
29
- }
@@ -1,27 +0,0 @@
1
- /**
2
- * Text Styles
3
- *
4
- * Defines the styles for the Text component following the design guidelines:
5
- * - Typography: Inter/Geist font, specific sizes/weights
6
- * - Spacing: 4px grid system
7
- * - Colors: Neutral palette with semantic colors
8
- */
9
- import { Headings, Size, TextWeights } from './Text.type';
10
- import { ViewProps } from 'app-studio';
11
- /**
12
- * Heading sizes following typography guidelines
13
- * Matching shadcn/ui typography patterns
14
- */
15
- export declare const HeadingSizes: Record<Headings, ViewProps>;
16
- /**
17
- * Font sizes following typography guidelines
18
- */
19
- export declare const FontSizes: Record<Size, string>;
20
- /**
21
- * Line heights following typography guidelines
22
- */
23
- export declare const LineHeights: Record<Size, string>;
24
- /**
25
- * Font weights following typography guidelines
26
- */
27
- export declare const FontWeights: Record<TextWeights, string>;
@@ -1,2 +0,0 @@
1
- export declare const getTextColorHex: (backgroundColor: string) => "black" | "white";
2
- export declare const getTextColor: (backgroundColor: string) => "black" | "white";
@@ -1,19 +0,0 @@
1
- /**
2
- * Text View Component
3
- *
4
- * Renders text with various styles and states according to the design guidelines.
5
- */
6
- import React from 'react';
7
- import { ViewProps } from 'app-studio';
8
- import { TextProps } from './Text.props';
9
- interface Props extends TextProps {
10
- views?: {
11
- container?: ViewProps;
12
- };
13
- bgColor?: string;
14
- }
15
- /**
16
- * Main Text component that renders text with various styles and states
17
- */
18
- declare const TextView: React.FC<Props>;
19
- export default TextView;
@@ -1,5 +0,0 @@
1
- import React from 'react';
2
- /**
3
- * The Text component is a simple component that renders a text string or paragraphs as a DOM element in the UI. It is a <p> tag by default.
4
- */
5
- export declare const Text: React.FC<any>;
@@ -1,106 +0,0 @@
1
- /// <reference types="react" />
2
- import { ViewProps } from 'app-studio';
3
- import { Size, Variant, TreeNode, TreeComponentType } from './Tree.type';
4
- /**
5
- * Props for the Tree component
6
- */
7
- export interface TreeProps extends ViewProps {
8
- /**
9
- * Child elements for compound component pattern (e.g., <Tree.Item />).
10
- * Used if `items` prop is not provided.
11
- */
12
- children?: React.ReactNode;
13
- /**
14
- * Data-driven approach: array of tree nodes.
15
- * If provided, `children` will be ignored for rendering tree items.
16
- */
17
- items?: TreeNode[];
18
- /**
19
- * Size of the tree items (affects padding and font size primarily).
20
- * @default 'md'
21
- */
22
- size?: Size;
23
- /**
24
- * Visual variant of the tree items (affects background, borders).
25
- * @default 'default'
26
- */
27
- variant?: Variant;
28
- /**
29
- * IDs of initially expanded items (uncontrolled mode).
30
- */
31
- defaultExpandedItems?: string[];
32
- /**
33
- * IDs of expanded items (controlled mode).
34
- * If provided, component is controlled; `onExpandedItemsChange` must be used to update.
35
- */
36
- expandedItems?: string[];
37
- /**
38
- * Callback when expanded items change.
39
- * Receives an array of currently expanded item IDs.
40
- */
41
- onExpandedItemsChange?: (expandedItems: string[]) => void;
42
- /**
43
- * Callback when an item is selected (clicked).
44
- * Receives the `itemId` and the full `TreeNode` object if available (from data-driven mode).
45
- */
46
- onItemSelect?: (itemId: string, item?: TreeNode) => void;
47
- /**
48
- * ID of the currently selected item (controlled mode).
49
- */
50
- selectedItem?: string;
51
- /**
52
- * ID of the initially selected item (uncontrolled mode).
53
- */
54
- defaultSelectedItem?: string;
55
- /**
56
- * Whether to allow multiple selection.
57
- * Note: Multi-select state management (tracking multiple selected items) is not fully implemented in `useTreeState` provided.
58
- * This prop is a placeholder for future enhancement.
59
- * @default false
60
- */
61
- multiSelect?: boolean;
62
- /**
63
- * Whether to enable drag and drop functionality for tree items.
64
- * @default false
65
- */
66
- allowDragAndDrop?: boolean;
67
- /**
68
- * Custom icon to use for the drag handle.
69
- * If not provided, a default drag handle icon will be used.
70
- */
71
- dragHandleIcon?: React.ReactNode;
72
- /**
73
- * Callback when items are reordered via drag and drop.
74
- * Receives the updated array of tree nodes.
75
- */
76
- onItemsReorder?: (items: TreeNode[]) => void;
77
- /**
78
- * Callback when drag starts on an item.
79
- * Receives the item ID and the event.
80
- */
81
- onDragStart?: (itemId: string, event: React.DragEvent) => void;
82
- /**
83
- * Callback when drag ends.
84
- * Receives the item ID.
85
- */
86
- onDragEnd?: (itemId: string) => void;
87
- /**
88
- * Custom views for styling different parts of the component.
89
- * Allows overriding default styles for sub-components.
90
- */
91
- views?: {
92
- container?: ViewProps;
93
- item?: ViewProps;
94
- itemLabel?: ViewProps;
95
- itemContent?: ViewProps;
96
- icon?: ViewProps;
97
- expandIcon?: ViewProps;
98
- draggedItem?: ViewProps;
99
- dragHandle?: ViewProps;
100
- };
101
- }
102
- /**
103
- * Type for the Tree component with sub-components.
104
- * Makes `Tree.Item`, `Tree.ItemLabel`, `Tree.ItemContent` available.
105
- */
106
- export declare type TreeType = TreeComponentType<TreeProps>;
@@ -1,38 +0,0 @@
1
- /// <reference types="react" />
2
- import { TreeNode } from './Tree.type';
3
- interface UseTreeStateProps {
4
- defaultExpandedItems?: string[];
5
- expandedItems?: string[];
6
- onExpandedItemsChange?: (expandedItems: string[]) => void;
7
- defaultSelectedItem?: string;
8
- selectedItem?: string;
9
- onItemSelect?: (itemId: string, itemData?: TreeNode) => void;
10
- multiSelect?: boolean;
11
- items?: TreeNode[];
12
- allowDragAndDrop?: boolean;
13
- onItemsReorder?: (items: TreeNode[]) => void;
14
- onDragStart?: (itemId: string, event: React.DragEvent) => void;
15
- onDragEnd?: (itemId: string) => void;
16
- }
17
- export declare const useTreeState: ({ defaultExpandedItems, expandedItems: controlledExpandedItems, onExpandedItemsChange, defaultSelectedItem, selectedItem: controlledSelectedItem, onItemSelect, multiSelect, items, allowDragAndDrop, onItemsReorder, onDragStart, onDragEnd, }: UseTreeStateProps) => {
18
- baseId: string;
19
- expandedItems: string[] | undefined;
20
- toggleItem: (itemId: string) => void;
21
- isItemExpanded: (itemId: string) => boolean | undefined;
22
- selectedItem: any;
23
- selectItem: (itemId: string) => void;
24
- multiSelect: boolean;
25
- allowDragAndDrop: boolean;
26
- draggedItemId: string | null;
27
- dropTarget: {
28
- itemId: string;
29
- position: 'before' | 'after' | 'inside';
30
- } | null;
31
- handleDragStart: (e: React.DragEvent, itemId: string) => void;
32
- handleDragOver: (e: React.DragEvent, itemId: string) => void;
33
- handleDrop: (e: React.DragEvent) => void;
34
- handleDragEnd: (_: React.DragEvent) => void;
35
- getDraggedItem: () => TreeNode | undefined;
36
- items: TreeNode[] | undefined;
37
- };
38
- export {};
@@ -1,41 +0,0 @@
1
- import { ViewProps } from 'app-studio';
2
- import { Size, Variant } from './Tree.type';
3
- /**
4
- * Default styles for the Tree component and its parts
5
- */
6
- export declare const DefaultTreeStyles: {
7
- container: ViewProps;
8
- item: ViewProps;
9
- itemLabel: ViewProps;
10
- itemContent: ViewProps;
11
- icon: ViewProps;
12
- expandIcon: ViewProps;
13
- };
14
- /**
15
- * Size variations for the Tree component (primarily affects TreeItemLabel padding and font size)
16
- */
17
- export declare const TreeSizes: Record<Size, ViewProps>;
18
- /**
19
- * Variant styles for the Tree component (applied to TreeItemLabel for visual feedback)
20
- */
21
- export declare const TreeItemLabelVariants: Record<Variant, ViewProps>;
22
- /**
23
- * States for tree items (typically applied to TreeItemLabel)
24
- */
25
- export declare const TreeItemStates: {
26
- selected: {
27
- backgroundColor: string;
28
- color: string;
29
- fontWeight: string;
30
- };
31
- hover: {
32
- backgroundColor: string;
33
- };
34
- disabled: {
35
- opacity: number;
36
- cursor: string;
37
- _hover: {
38
- backgroundColor: string;
39
- };
40
- };
41
- };
@@ -1,133 +0,0 @@
1
- /// <reference types="react" />
2
- import { ViewProps } from 'app-studio';
3
- import { TreeProps } from './Tree.props';
4
- interface TreePropsPlaceholder {
5
- }
6
- /**
7
- * Size options for the Tree component (affects item padding/font)
8
- */
9
- export declare type Size = 'sm' | 'md' | 'lg';
10
- /**
11
- * Variant options for the Tree component (affects item appearance)
12
- */
13
- export declare type Variant = 'default' | 'outline' | 'filled';
14
- /**
15
- * Tree node data structure for data-driven approach
16
- */
17
- export interface TreeNode {
18
- /** Unique identifier for the node */
19
- id: string;
20
- /** Label text for the node */
21
- label: string;
22
- /** Optional icon to display next to the label */
23
- icon?: React.ReactNode;
24
- /** Child nodes for hierarchical structure */
25
- children?: TreeNode[];
26
- /** Whether the node is disabled (unclickable, deemphasized) */
27
- disabled?: boolean;
28
- /** Custom data to associate with the node (e.g., for onItemSelect callback) */
29
- data?: any;
30
- /** Optional custom styles for this specific node (applied to TreeItem) */
31
- style?: ViewProps;
32
- /** Whether the node is currently being dragged */
33
- isDragging?: boolean;
34
- /** Whether the node can be dragged */
35
- draggable?: boolean;
36
- }
37
- /**
38
- * Props for the TreeItem component (compound pattern)
39
- */
40
- export interface TreeItemProps extends ViewProps {
41
- /** Unique identifier for the item, used for expansion state and selection */
42
- value: string;
43
- /** Whether the item is disabled */
44
- disabled?: boolean;
45
- /** Custom icon to display for this item */
46
- icon?: React.ReactNode;
47
- /** Children elements: typically TreeItemLabel and TreeItemContent */
48
- children?: React.ReactNode;
49
- /** Custom views for styling parts of this specific item */
50
- views?: {
51
- container?: ViewProps;
52
- label?: ViewProps;
53
- content?: ViewProps;
54
- icon?: ViewProps;
55
- expandIcon?: ViewProps;
56
- };
57
- }
58
- /**
59
- * Props for the TreeItemLabel component (compound pattern)
60
- */
61
- export interface TreeItemLabelProps extends ViewProps {
62
- /** Content of the label, typically text or other inline elements */
63
- children?: React.ReactNode;
64
- /** Custom views (rarely needed here, usually styled via TreeItem or global views) */
65
- views?: {
66
- container?: ViewProps;
67
- };
68
- }
69
- /**
70
- * Props for the TreeItemContent component (compound pattern)
71
- */
72
- export interface TreeItemContentProps extends ViewProps {
73
- /** Child elements, typically more TreeItem components for nesting */
74
- children?: React.ReactNode;
75
- /** Custom views (rarely needed here, usually styled via TreeItem or global views) */
76
- views?: {
77
- container?: ViewProps;
78
- };
79
- }
80
- /**
81
- * Context type for the Tree component, passed via React Context
82
- */
83
- export interface TreeContextType {
84
- /** List of expanded item IDs */
85
- expandedItems: string[];
86
- /** Function to toggle an item's expanded state */
87
- toggleItem: (itemId: string) => void;
88
- /** Function to check if an item is expanded */
89
- isItemExpanded: (itemId: string) => boolean;
90
- /** Base ID for generating accessible unique IDs for tree parts */
91
- baseId: string;
92
- /** Currently selected item ID */
93
- selectedItem?: string;
94
- /** Function to handle item selection */
95
- selectItem: (itemId: string) => void;
96
- /** Global size for tree items */
97
- size: Size;
98
- /** Global variant for tree items */
99
- variant: Variant;
100
- /** Global views configuration */
101
- views?: TreeProps['views'];
102
- /** Whether drag and drop is enabled */
103
- allowDragAndDrop?: boolean;
104
- /** Custom icon to use for the drag handle */
105
- dragHandleIcon?: React.ReactNode;
106
- /** Currently dragged item ID */
107
- draggedItemId?: string | null;
108
- /** Current drop target information */
109
- dropTarget?: {
110
- itemId: string;
111
- position: 'before' | 'after' | 'inside';
112
- } | null;
113
- /** Function to handle drag start */
114
- handleDragStart?: (e: React.DragEvent, itemId: string) => void;
115
- /** Function to handle drag over */
116
- handleDragOver?: (e: React.DragEvent, itemId: string) => void;
117
- /** Function to handle drop */
118
- handleDrop?: (e: React.DragEvent) => void;
119
- /** Function to handle drag end */
120
- handleDragEnd?: (e: React.DragEvent) => void;
121
- /** Function to get the dragged item's data */
122
- getDraggedItem?: () => TreeNode | undefined;
123
- }
124
- /**
125
- * Tree component type with sub-components.
126
- * P represents the props of the main Tree component (e.g., TreeProps).
127
- */
128
- export interface TreeComponentType<P = TreePropsPlaceholder> extends React.FC<P> {
129
- Item: React.FC<TreeItemProps>;
130
- ItemLabel: React.FC<TreeItemLabelProps>;
131
- ItemContent: React.FC<TreeItemContentProps>;
132
- }
133
- export {};
@@ -1,36 +0,0 @@
1
- import React from 'react';
2
- import { ViewProps } from 'app-studio';
3
- import { TreeContextType, TreeNode, Size, Variant, TreeItemProps, TreeItemLabelProps, TreeItemContentProps } from './Tree.type';
4
- import { TreeProps } from './Tree.props';
5
- export declare const TreeProvider: React.FC<{
6
- value: TreeContextType;
7
- children: React.ReactNode;
8
- }>;
9
- export declare const useTreeContext: () => TreeContextType;
10
- interface TreeViewProps extends Pick<TreeProps, 'size' | 'variant' | 'views' | 'children'>, Omit<ViewProps, keyof Pick<TreeProps, 'size' | 'variant' | 'views' | 'children'>> {
11
- baseId: string;
12
- }
13
- export declare const TreeView: React.FC<TreeViewProps>;
14
- export declare const TreeItem: React.FC<TreeItemProps>;
15
- interface InternalTreeItemLabelProps extends TreeItemLabelProps {
16
- onClick?: (e: React.MouseEvent) => void;
17
- onToggleExpand?: (e: React.MouseEvent) => void;
18
- hasChildren?: boolean;
19
- expanded?: boolean;
20
- icon?: React.ReactNode;
21
- disabled?: boolean;
22
- isSelected?: boolean;
23
- isDragging?: boolean;
24
- size?: Size;
25
- variant?: Variant;
26
- views?: TreeProps['views'];
27
- }
28
- export declare const TreeItemLabel: React.FC<InternalTreeItemLabelProps>;
29
- interface InternalTreeItemContentProps extends TreeItemContentProps {
30
- views?: TreeProps['views'];
31
- }
32
- export declare const TreeItemContent: React.FC<InternalTreeItemContentProps>;
33
- export declare const DataDrivenTreeView: React.FC<{
34
- items: TreeNode[];
35
- }>;
36
- export {};
@@ -1,2 +0,0 @@
1
- import { TreeType } from './Tree/Tree.props';
2
- export declare const Tree: TreeType;
@@ -1,180 +0,0 @@
1
- import { ViewProps } from 'app-studio';
2
- /**
3
- * Core ADK Agent Types
4
- */
5
- export interface AgentRunRequest {
6
- appName: string;
7
- userId: string;
8
- sessionId: string;
9
- newMessage: {
10
- role: string;
11
- parts: MessagePart[];
12
- };
13
- functionCallEventId?: string;
14
- streaming?: boolean;
15
- }
16
- export interface MessagePart {
17
- text?: string;
18
- inlineData?: {
19
- displayName: string;
20
- data: string | ArrayBuffer;
21
- mimeType: string;
22
- };
23
- functionCall?: {
24
- id: string;
25
- name: string;
26
- args: any;
27
- };
28
- functionResponse?: {
29
- id: string;
30
- name: string;
31
- response: any;
32
- };
33
- executableCode?: {
34
- language: string;
35
- code: string;
36
- };
37
- codeExecutionResult?: {
38
- outcome: string;
39
- output?: string;
40
- };
41
- thought?: boolean;
42
- }
43
- export interface AgentMessage {
44
- id: string;
45
- role: 'user' | 'bot';
46
- text?: string;
47
- parts?: MessagePart[];
48
- timestamp: number;
49
- isLoading?: boolean;
50
- thought?: boolean;
51
- eventId?: string;
52
- attachments?: MessageAttachment[];
53
- inlineData?: {
54
- displayName?: string;
55
- data: string;
56
- mimeType: string;
57
- mediaType?: 'image' | 'video' | 'audio' | 'document';
58
- };
59
- functionCall?: any;
60
- functionResponse?: any;
61
- executableCode?: any;
62
- codeExecutionResult?: any;
63
- renderedContent?: string;
64
- evalStatus?: string;
65
- failedMetric?: string;
66
- evalScore?: number;
67
- evalThreshold?: number;
68
- }
69
- export interface MessageAttachment {
70
- file: File;
71
- url: string;
72
- type: string;
73
- }
74
- export interface AgentSession {
75
- id: string;
76
- userId: string;
77
- appName: string;
78
- state: any;
79
- events: any[];
80
- createdAt: number;
81
- updatedAt: number;
82
- }
83
- export interface AgentEvent {
84
- id: string;
85
- sessionId: string;
86
- type: string;
87
- data: any;
88
- timestamp: number;
89
- title?: string;
90
- }
91
- /**
92
- * Component View Customization
93
- */
94
- export interface AgentChatViews {
95
- container?: ViewProps;
96
- header?: ViewProps;
97
- messageList?: ViewProps;
98
- inputArea?: ViewProps;
99
- attachmentArea?: ViewProps;
100
- message?: ViewProps;
101
- userMessage?: ViewProps;
102
- botMessage?: ViewProps;
103
- systemMessage?: ViewProps;
104
- messageContent?: ViewProps;
105
- messageTimestamp?: ViewProps;
106
- messageAvatar?: ViewProps;
107
- messageActions?: ViewProps;
108
- inputField?: ViewProps;
109
- sendButton?: ViewProps;
110
- attachButton?: ViewProps;
111
- recordButton?: ViewProps;
112
- inputToolbar?: ViewProps;
113
- loadingIndicator?: ViewProps;
114
- typingIndicator?: ViewProps;
115
- errorMessage?: ViewProps;
116
- emptyState?: ViewProps;
117
- functionCall?: ViewProps;
118
- functionResponse?: ViewProps;
119
- functionArgs?: ViewProps;
120
- codeBlock?: ViewProps;
121
- codeOutput?: ViewProps;
122
- attachmentPreview?: ViewProps;
123
- attachmentItem?: ViewProps;
124
- attachmentRemoveButton?: ViewProps;
125
- thoughtBubble?: ViewProps;
126
- thoughtContent?: ViewProps;
127
- }
128
- /**
129
- * Event Handlers
130
- */
131
- export interface AgentChatEventHandlers {
132
- onSessionCreate?: (session: AgentSession) => void;
133
- onSessionUpdate?: (session: AgentSession) => void;
134
- onMessageSent?: (message: AgentMessage) => void;
135
- onMessageReceived?: (message: AgentMessage) => void;
136
- onError?: (error: Error) => void;
137
- onFileUpload?: (files: File[]) => void;
138
- onTypingStart?: () => void;
139
- onTypingStop?: () => void;
140
- onAudioRecordingStart?: () => void;
141
- onAudioRecordingStop?: (audioData: Blob) => void;
142
- onVideoRecordingStart?: () => void;
143
- onVideoRecordingStop?: (videoData: Blob) => void;
144
- }
145
- /**
146
- * Main AgentChat Props Interface
147
- */
148
- export interface AgentChatProps extends ViewProps, AgentChatEventHandlers {
149
- appName: string;
150
- userId: string;
151
- sessionId?: string;
152
- apiBaseUrl?: string;
153
- wsBaseUrl?: string;
154
- enableFileUpload?: boolean;
155
- enableAudioRecording?: boolean;
156
- enableVideoRecording?: boolean;
157
- enableStreaming?: boolean;
158
- enableThoughts?: boolean;
159
- maxFileSize?: number;
160
- maxFiles?: number;
161
- allowedFileTypes?: string[];
162
- maxMessageLength?: number;
163
- placeholder?: string;
164
- showTimestamps?: boolean;
165
- showAvatars?: boolean;
166
- showTypingIndicator?: boolean;
167
- autoScroll?: boolean;
168
- views?: AgentChatViews;
169
- containerProps?: ViewProps;
170
- initialMessages?: AgentMessage[];
171
- initialSession?: AgentSession;
172
- enableFunctionCalls?: boolean;
173
- enableCodeExecution?: boolean;
174
- enableEvaluation?: boolean;
175
- colorScheme?: 'blue' | 'purple' | 'green' | 'orange' | 'red' | 'gray';
176
- compact?: boolean;
177
- rounded?: boolean;
178
- ariaLabel?: string;
179
- ariaDescribedBy?: string;
180
- }
@@ -1,24 +0,0 @@
1
- /// <reference types="react" />
2
- import { AgentChatProps, AgentMessage, AgentSession, MessageAttachment } from './AgentChat.props';
3
- /**
4
- * Custom hook for managing AgentChat state and interactions
5
- */
6
- export declare const useAgentChat: (props: AgentChatProps) => {
7
- messages: AgentMessage[];
8
- currentSession: AgentSession | null;
9
- isLoading: boolean;
10
- isTyping: boolean;
11
- error: string | null;
12
- inputValue: string;
13
- selectedFiles: MessageAttachment[];
14
- isConnected: boolean;
15
- sessionId: string;
16
- sendMessage: (text: string, attachments?: MessageAttachment[]) => Promise<void>;
17
- setInputValue: import("react").Dispatch<import("react").SetStateAction<string>>;
18
- handleFileSelect: (files: FileList | File[]) => void;
19
- removeFile: (index: number) => void;
20
- createSession: () => Promise<AgentSession>;
21
- messagesEndRef: import("react").RefObject<HTMLDivElement>;
22
- setError: import("react").Dispatch<import("react").SetStateAction<string | null>>;
23
- setSelectedFiles: import("react").Dispatch<import("react").SetStateAction<MessageAttachment[]>>;
24
- };