@speakeasy-api/moonshine 2.0.0-alpha.1 → 2.0.0-alpha.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/LICENSE +21 -0
- package/README.md +49 -23
- package/package.json +33 -50
- package/scripts/generate-utility-docs.js +324 -0
- package/src/assets/icons/external/github.svg +3 -0
- package/src/assets/icons/external/maven.svg +152 -0
- package/src/assets/icons/external/npm.svg +4 -0
- package/src/assets/icons/external/nuget.svg +5 -0
- package/src/assets/icons/external/packagist.svg +1 -0
- package/src/assets/icons/external/pypi.svg +182 -0
- package/src/assets/icons/external/rubygems.svg +14 -0
- package/src/assets/icons/external/terraform.svg +1 -0
- package/src/assets/icons/languages/csharp.svg +1 -0
- package/src/assets/icons/languages/go.svg +1 -0
- package/src/assets/icons/languages/java.svg +1 -0
- package/src/assets/icons/languages/json.svg +2 -0
- package/src/assets/icons/languages/php.svg +1 -0
- package/src/assets/icons/languages/postman.svg +3 -0
- package/src/assets/icons/languages/python.svg +1 -0
- package/src/assets/icons/languages/ruby.svg +1 -0
- package/src/assets/icons/languages/swift.svg +1 -0
- package/src/assets/icons/languages/terraform.svg +1 -0
- package/src/assets/icons/languages/typescript.svg +1 -0
- package/src/assets/icons/languages/unity.svg +1 -0
- package/src/base.css +12 -12
- package/src/components/AIChat/AIChatContainer.tsx +71 -0
- package/src/components/AIChat/AIChatMessage.tsx +135 -0
- package/src/components/AIChat/AIChatMessageComposer.tsx +175 -0
- package/src/components/AIChat/AIChatMessageList.tsx +34 -0
- package/src/components/AIChat/AIChatModelSelector.tsx +159 -0
- package/src/components/AIChat/componentsTypes.ts +36 -0
- package/src/components/AIChat/context.ts +15 -0
- package/src/components/AIChat/index.ts +12 -0
- package/src/components/AIChat/parts/AIChatMessageFilePart.tsx +129 -0
- package/src/components/AIChat/parts/AIChatMessageReasoningPart.tsx +23 -0
- package/src/components/AIChat/parts/AIChatMessageSourcePart.tsx +58 -0
- package/src/components/AIChat/parts/AIChatMessageTextPart.tsx +33 -0
- package/src/components/AIChat/parts/AIChatMessageToolInvocationPart.tsx +53 -0
- package/src/components/AIChat/parts/AIChatMessageToolPart.tsx +395 -0
- package/src/components/AIChat/parts/AIChatMessageToolResultPart.tsx +46 -0
- package/src/components/AIChat/toolCallApproval.ts +61 -0
- package/src/components/AIChat/types.ts +97 -0
- package/src/components/ActionBar/index.tsx +184 -0
- package/src/components/Alert/index.tsx +118 -0
- package/src/components/Alert/types.ts +12 -0
- package/src/components/AppLayout/context.tsx +31 -0
- package/src/components/AppLayout/index.tsx +550 -0
- package/src/components/AppLayout/provider.tsx +40 -0
- package/src/components/AppLayout/useAppLayoutKeys.ts +26 -0
- package/src/components/Badge/index.tsx +227 -0
- package/src/components/Button/index.tsx +531 -0
- package/src/components/Card/index.tsx +193 -0
- package/src/components/CodeEditorLayout/index.tsx +394 -0
- package/src/components/CodeEditorLayout/styles.module.css +8 -0
- package/src/components/CodeHighlight/Pre.tsx +63 -0
- package/src/components/CodePlayground/index.tsx +411 -0
- package/src/components/CodeSnippet/codeSnippet.css +97 -0
- package/src/components/CodeSnippet/index.tsx +224 -0
- package/src/components/Combobox/index.tsx +193 -0
- package/src/components/Command/index.tsx +152 -0
- package/src/components/Container/index.tsx +31 -0
- package/src/components/ContextDropdown/index.tsx +150 -0
- package/src/components/Dialog/index.tsx +123 -0
- package/src/components/DragNDrop/DragNDropArea.tsx +30 -0
- package/src/components/DragNDrop/DragOverlay.tsx +4 -0
- package/src/components/DragNDrop/Draggable.tsx +97 -0
- package/src/components/DragNDrop/Droppable.tsx +51 -0
- package/src/components/Dropdown/index.tsx +201 -0
- package/src/components/ExternalPill/index.tsx +58 -0
- package/src/components/Facepile/index.tsx +309 -0
- package/src/components/GradientCircle/gradientCircle.css +34 -0
- package/src/components/GradientCircle/index.tsx +143 -0
- package/src/components/Grid/index.tsx +150 -0
- package/src/components/Heading/index.tsx +54 -0
- package/src/components/HighlightedText/index.tsx +152 -0
- package/src/components/Icon/customIcons/createCustomLucideIcon.ts +25 -0
- package/src/components/Icon/customIcons/gems.ts +26 -0
- package/{dist/go-CiWl_aXI.mjs → src/components/Icon/customIcons/go.ts} +21 -19
- package/src/components/Icon/customIcons/index.ts +11 -0
- package/{dist/maven-DhmnGXoB.mjs → src/components/Icon/customIcons/maven.ts} +17 -15
- package/src/components/Icon/customIcons/npm.ts +19 -0
- package/{dist/nuget-5a2icRS2.mjs → src/components/Icon/customIcons/nuget.ts} +17 -15
- package/src/components/Icon/customIcons/packagist.ts +124 -0
- package/{dist/pypi-DsuRYjdK.mjs → src/components/Icon/customIcons/pypi.ts} +16 -14
- package/src/components/Icon/index.tsx +83 -0
- package/src/components/Icon/isIconName.ts +10 -0
- package/src/components/Icon/names.ts +14 -0
- package/src/components/IconButton/index.tsx +51 -0
- package/src/components/Input/index.tsx +98 -0
- package/src/components/KeyHint/index.tsx +118 -0
- package/src/components/LanguageIndicator/index.tsx +68 -0
- package/src/components/Link/index.tsx +153 -0
- package/src/components/LoggedInUserMenu/index.tsx +116 -0
- package/src/components/Logo/Animated.tsx +191 -0
- package/src/components/Logo/index.tsx +17 -0
- package/src/components/Logo/speakeasy-logo.riv +0 -0
- package/src/components/Logo/svgs/index.tsx +126 -0
- package/src/components/Modal/index.tsx +104 -0
- package/src/components/PageHeader/index.tsx +227 -0
- package/src/components/PageHeader/styles.module.css +27 -0
- package/src/components/Popover/index.tsx +35 -0
- package/src/components/PromptInput/index.tsx +372 -0
- package/src/components/PullRequestLink/index.tsx +64 -0
- package/src/components/ResizablePanel/index.tsx +119 -0
- package/src/components/Score/index.module.css +32 -0
- package/src/components/Score/index.tsx +268 -0
- package/src/components/ScrollArea/index.tsx +48 -0
- package/src/components/SegmentedButton/index.module.css +19 -0
- package/src/components/SegmentedButton/index.tsx +101 -0
- package/src/components/Select/index.tsx +159 -0
- package/src/components/Separator/index.tsx +23 -0
- package/src/components/Skeleton/index.tsx +61 -0
- package/src/components/Skeleton/skeleton.css +52 -0
- package/src/components/Stack/index.tsx +137 -0
- package/src/components/Subnav/index.tsx +315 -0
- package/src/components/Switch/index.tsx +29 -0
- package/src/components/Table/context/context.tsx +19 -0
- package/src/components/Table/context/tableProvider.tsx +39 -0
- package/src/components/Table/index.tsx +707 -0
- package/src/components/Table/styles.module.css +25 -0
- package/src/components/Tabs/index.tsx +87 -0
- package/src/components/TargetLanguageIcon/index.tsx +84 -0
- package/src/components/Text/index.tsx +59 -0
- package/src/components/ThemeSwitcher/index.tsx +118 -0
- package/src/components/Timeline/index.tsx +290 -0
- package/src/components/Tooltip/index.tsx +41 -0
- package/src/components/UserAvatar/index.tsx +87 -0
- package/src/components/UserAvatar/sizeMap.ts +12 -0
- package/src/components/Wizard/index.tsx +208 -0
- package/src/components/Wizard/types.ts +17 -0
- package/src/components/WorkspaceSelector/CreateOrg.tsx +95 -0
- package/src/components/WorkspaceSelector/CreateWorkspace.tsx +196 -0
- package/src/components/WorkspaceSelector/OrgList.tsx +115 -0
- package/src/components/WorkspaceSelector/OrgSelector.tsx +207 -0
- package/src/components/WorkspaceSelector/RecentWorkspaces.tsx +83 -0
- package/src/components/WorkspaceSelector/ScrollingList.tsx +84 -0
- package/src/components/WorkspaceSelector/SearchBox.tsx +40 -0
- package/src/components/WorkspaceSelector/WorkspaceItem.tsx +37 -0
- package/src/components/WorkspaceSelector/WorkspaceList.tsx +107 -0
- package/src/components/WorkspaceSelector/index.tsx +400 -0
- package/src/components/WorkspaceSelector/styles.css +74 -0
- package/src/components/__beta__/CLIWizard/index.tsx +357 -0
- package/src/components/__beta__/CLIWizard/terminal-command.tsx +108 -0
- package/src/components/__beta__/CLIWizard/terminal.tsx +83 -0
- package/src/components/__beta__/README.md +3 -0
- package/src/components/index.mdx +38 -0
- package/src/context/ConfigContext.tsx +43 -0
- package/src/context/ModalContext.tsx +118 -0
- package/src/context/theme.ts +1 -0
- package/src/hooks/useAppLayout.ts +10 -0
- package/src/hooks/useConfig.ts +10 -0
- package/src/hooks/useIsMounted.ts +13 -0
- package/src/hooks/useModal.tsx +10 -0
- package/src/hooks/useTailwindBreakpoint.ts +47 -0
- package/src/hooks/useTheme.ts +13 -0
- package/src/index.ts +234 -0
- package/src/lib/assert.ts +9 -0
- package/src/lib/codeUtils.ts +177 -0
- package/src/lib/debounce.ts +9 -0
- package/src/lib/responsiveMappers.ts +69 -0
- package/src/lib/responsiveUtils.ts +23 -0
- package/src/lib/storybookUtils.tsx +26 -0
- package/src/lib/typeUtils.ts +109 -0
- package/src/lib/utils.ts +85 -0
- package/src/styles/codeSyntax.css +59 -0
- package/src/styles/globals.css +51 -0
- package/src/types.ts +200 -0
- package/src/utilities.css +347 -6
- package/src/vite-env.d.ts +6 -0
- package/types/utilities.d.ts +43 -1
- package/dist/components/AIChat/AIChatContainer.d.ts +0 -25
- package/dist/components/AIChat/AIChatMessage.d.ts +0 -19
- package/dist/components/AIChat/AIChatMessageComposer.d.ts +0 -22
- package/dist/components/AIChat/AIChatMessageList.d.ts +0 -6
- package/dist/components/AIChat/AIChatModelSelector.d.ts +0 -14
- package/dist/components/AIChat/componentsTypes.d.ts +0 -11
- package/dist/components/AIChat/context.d.ts +0 -3
- package/dist/components/AIChat/index.d.ts +0 -12
- package/dist/components/AIChat/parts/AIChatMessageFilePart.d.ts +0 -7
- package/dist/components/AIChat/parts/AIChatMessageReasoningPart.d.ts +0 -5
- package/dist/components/AIChat/parts/AIChatMessageSourcePart.d.ts +0 -9
- package/dist/components/AIChat/parts/AIChatMessageTextPart.d.ts +0 -5
- package/dist/components/AIChat/parts/AIChatMessageToolInvocationPart.d.ts +0 -6
- package/dist/components/AIChat/parts/AIChatMessageToolPart.d.ts +0 -33
- package/dist/components/AIChat/parts/AIChatMessageToolResultPart.d.ts +0 -5
- package/dist/components/AIChat/toolCallApproval.d.ts +0 -15
- package/dist/components/AIChat/types.d.ts +0 -78
- package/dist/components/ActionBar/index.d.ts +0 -36
- package/dist/components/Alert/index.d.ts +0 -18
- package/dist/components/Alert/types.d.ts +0 -4
- package/dist/components/Badge/index.d.ts +0 -10
- package/dist/components/Button/index.d.ts +0 -11
- package/dist/components/Card/index.d.ts +0 -47
- package/dist/components/CodeEditorLayout/index.d.ts +0 -101
- package/dist/components/CodePlayground/index.d.ts +0 -108
- package/dist/components/CodePlayground/lineNumbers.d.ts +0 -2
- package/dist/components/CodePlayground/tokenTransitions.d.ts +0 -2
- package/dist/components/CodePlayground/wordWrap.d.ts +0 -2
- package/dist/components/CodeSnippet/index.d.ts +0 -50
- package/dist/components/Combobox/index.d.ts +0 -35
- package/dist/components/Command/index.d.ts +0 -80
- package/dist/components/Container/index.d.ts +0 -9
- package/dist/components/ContextDropdown/index.d.ts +0 -7
- package/dist/components/ContextDropdown/provider.d.ts +0 -22
- package/dist/components/ContextDropdown/useModal.d.ts +0 -11
- package/dist/components/Dialog/index.d.ts +0 -19
- package/dist/components/DragNDrop/DragNDropArea.d.ts +0 -8
- package/dist/components/DragNDrop/DragOverlay.d.ts +0 -1
- package/dist/components/DragNDrop/Draggable.d.ts +0 -29
- package/dist/components/DragNDrop/Droppable.d.ts +0 -28
- package/dist/components/Dropdown/index.d.ts +0 -27
- package/dist/components/ExternalPill/index.d.ts +0 -12
- package/dist/components/Facepile/index.d.ts +0 -16
- package/dist/components/GradientCircle/index.d.ts +0 -10
- package/dist/components/Grid/index.d.ts +0 -80
- package/dist/components/Heading/index.d.ts +0 -12
- package/dist/components/HighlightedText/index.d.ts +0 -19
- package/dist/components/Icon/customIcons/createCustomLucideIcon.d.ts +0 -3
- package/dist/components/Icon/customIcons/gems.d.ts +0 -2
- package/dist/components/Icon/customIcons/go.d.ts +0 -2
- package/dist/components/Icon/customIcons/index.d.ts +0 -10
- package/dist/components/Icon/customIcons/maven.d.ts +0 -2
- package/dist/components/Icon/customIcons/npm.d.ts +0 -2
- package/dist/components/Icon/customIcons/nuget.d.ts +0 -2
- package/dist/components/Icon/customIcons/packagist.d.ts +0 -2
- package/dist/components/Icon/customIcons/pypi.d.ts +0 -2
- package/dist/components/Icon/index.d.ts +0 -10
- package/dist/components/Icon/isIconName.d.ts +0 -2
- package/dist/components/Icon/names.d.ts +0 -6
- package/dist/components/Input/index.d.ts +0 -8
- package/dist/components/KeyHint/index.d.ts +0 -16
- package/dist/components/LanguageIndicator/index.d.ts +0 -7
- package/dist/components/Link/index.d.ts +0 -19
- package/dist/components/LoggedInUserMenu/index.d.ts +0 -17
- package/dist/components/Logo/Animated.d.ts +0 -7
- package/dist/components/Logo/index.d.ts +0 -7
- package/dist/components/Logo/svgs/index.d.ts +0 -6
- package/dist/components/Navbar/Slim.d.ts +0 -33
- package/dist/components/Navbar/index.d.ts +0 -15
- package/dist/components/PageHeader/index.d.ts +0 -45
- package/dist/components/Popover/index.d.ts +0 -8
- package/dist/components/PromptInput/index.d.ts +0 -55
- package/dist/components/PullRequestLink/index.d.ts +0 -10
- package/dist/components/ResizablePanel/index.d.ts +0 -26
- package/dist/components/Score/index.d.ts +0 -37
- package/dist/components/ScrollArea/index.d.ts +0 -5
- package/dist/components/Select/index.d.ts +0 -13
- package/dist/components/Separator/index.d.ts +0 -6
- package/dist/components/Skeleton/index.d.ts +0 -27
- package/dist/components/Stack/index.d.ts +0 -33
- package/dist/components/Subnav/index.d.ts +0 -12
- package/dist/components/Switch/index.d.ts +0 -4
- package/dist/components/Table/context/context.d.ts +0 -8
- package/dist/components/Table/context/tableProvider.d.ts +0 -6
- package/dist/components/Table/index.d.ts +0 -94
- package/dist/components/Tabs/index.d.ts +0 -21
- package/dist/components/TargetLanguageIcon/index.d.ts +0 -7
- package/dist/components/Text/index.d.ts +0 -19
- package/dist/components/ThemeSwitcher/index.d.ts +0 -5
- package/dist/components/Tooltip/index.d.ts +0 -8
- package/dist/components/UserAvatar/index.d.ts +0 -9
- package/dist/components/UserAvatar/sizeMap.d.ts +0 -3
- package/dist/components/Wizard/index.d.ts +0 -19
- package/dist/components/Wizard/types.d.ts +0 -15
- package/dist/components/WorkspaceSelector/CreateOrg.d.ts +0 -6
- package/dist/components/WorkspaceSelector/CreateWorkspace.d.ts +0 -17
- package/dist/components/WorkspaceSelector/OrgList.d.ts +0 -11
- package/dist/components/WorkspaceSelector/OrgSelector.d.ts +0 -13
- package/dist/components/WorkspaceSelector/RecentWorkspaces.d.ts +0 -11
- package/dist/components/WorkspaceSelector/ScrollingList.d.ts +0 -21
- package/dist/components/WorkspaceSelector/SearchBox.d.ts +0 -9
- package/dist/components/WorkspaceSelector/WorkspaceItem.d.ts +0 -9
- package/dist/components/WorkspaceSelector/WorkspaceList.d.ts +0 -10
- package/dist/components/WorkspaceSelector/index.d.ts +0 -34
- package/dist/components/__beta__/CLIWizard/index.d.ts +0 -21
- package/dist/components/__beta__/CLIWizard/terminal-command.d.ts +0 -19
- package/dist/components/__beta__/CLIWizard/terminal.d.ts +0 -26
- package/dist/context/ConfigContext.d.ts +0 -18
- package/dist/context/theme.d.ts +0 -1
- package/dist/createCustomLucideIcon-YlrRX5h9.mjs +0 -19
- package/dist/createCustomLucideIcon-YlrRX5h9.mjs.map +0 -1
- package/dist/gems-BcsO9cXq.mjs +0 -24
- package/dist/gems-BcsO9cXq.mjs.map +0 -1
- package/dist/github-kgjMtfE7.mjs +0 -11
- package/dist/github-kgjMtfE7.mjs.map +0 -1
- package/dist/go-CiWl_aXI.mjs.map +0 -1
- package/dist/hooks/useConfig.d.ts +0 -2
- package/dist/hooks/useIsMounted.d.ts +0 -1
- package/dist/hooks/useTailwindBreakpoint.d.ts +0 -3
- package/dist/hooks/useTheme.d.ts +0 -6
- package/dist/index-COXZ9O-g.mjs +0 -50882
- package/dist/index-COXZ9O-g.mjs.map +0 -1
- package/dist/index.d.ts +0 -73
- package/dist/lib/assert.d.ts +0 -2
- package/dist/lib/codeUtils.d.ts +0 -35
- package/dist/lib/debounce.d.ts +0 -1
- package/dist/lib/responsiveMappers.d.ts +0 -10
- package/dist/lib/responsiveUtils.d.ts +0 -3
- package/dist/lib/storybookUtils.d.ts +0 -5
- package/dist/lib/typeUtils.d.ts +0 -24
- package/dist/lib/utils.d.ts +0 -23
- package/dist/lucide-icons-BDw0imyx.mjs +0 -28054
- package/dist/lucide-icons-BDw0imyx.mjs.map +0 -1
- package/dist/maven-DhmnGXoB.mjs.map +0 -1
- package/dist/maven-W_nkSDNW.mjs +0 -107
- package/dist/maven-W_nkSDNW.mjs.map +0 -1
- package/dist/moonshine.es.js +0 -114
- package/dist/moonshine.es.js.map +0 -1
- package/dist/npm-BWTcVvFH.mjs +0 -11
- package/dist/npm-BWTcVvFH.mjs.map +0 -1
- package/dist/npm-CvQ4GKW4.mjs +0 -17
- package/dist/npm-CvQ4GKW4.mjs.map +0 -1
- package/dist/nuget-5a2icRS2.mjs.map +0 -1
- package/dist/nuget-CV5HU1JR.mjs +0 -11
- package/dist/nuget-CV5HU1JR.mjs.map +0 -1
- package/dist/packagist-CET6q9hi.mjs +0 -118
- package/dist/packagist-CET6q9hi.mjs.map +0 -1
- package/dist/packagist-D01fn9N_.mjs +0 -11
- package/dist/packagist-D01fn9N_.mjs.map +0 -1
- package/dist/pypi-DLh6kIJe.mjs +0 -11
- package/dist/pypi-DLh6kIJe.mjs.map +0 -1
- package/dist/pypi-DsuRYjdK.mjs.map +0 -1
- package/dist/rubygems-DeiNjcDV.mjs +0 -11
- package/dist/rubygems-DeiNjcDV.mjs.map +0 -1
- package/dist/speakeasy-logo-ByBTXLWb.mjs +0 -5
- package/dist/speakeasy-logo-ByBTXLWb.mjs.map +0 -1
- package/dist/style.css +0 -1
- package/dist/terraform-C4aktQ0o.mjs +0 -11
- package/dist/terraform-C4aktQ0o.mjs.map +0 -1
- package/dist/types.d.ts +0 -80
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { ToolCall } from 'ai';
|
|
2
|
-
import { ToolCallApprovalProps } from './types';
|
|
3
|
-
type TC = ToolCall<string, any>;
|
|
4
|
-
type ToolCallFn = (t: {
|
|
5
|
-
toolCall: TC;
|
|
6
|
-
}) => Promise<string>;
|
|
7
|
-
export declare const TOOL_CALL_ERROR_MESSAGE = "Tool call error";
|
|
8
|
-
export declare const TOOL_CALL_REJECTED_MESSAGE = "User rejected tool call";
|
|
9
|
-
export declare function useToolCallApproval({ executeToolCall, requiresApproval, }: {
|
|
10
|
-
executeToolCall: (toolCall: TC) => Promise<string>;
|
|
11
|
-
requiresApproval?: (toolCall: TC) => boolean | string;
|
|
12
|
-
}): ToolCallApprovalProps & {
|
|
13
|
-
toolCallFn: ToolCallFn;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { ToolCall } from 'ai';
|
|
2
|
-
export type MessageRole = 'user' | 'assistant' | 'system';
|
|
3
|
-
export type ToolArgs = {
|
|
4
|
-
target_file?: string;
|
|
5
|
-
should_read_entire_file?: boolean;
|
|
6
|
-
query?: string;
|
|
7
|
-
target_directories?: string[];
|
|
8
|
-
instructions?: string;
|
|
9
|
-
code_edit?: string;
|
|
10
|
-
command?: string;
|
|
11
|
-
is_background?: boolean;
|
|
12
|
-
explanation?: string;
|
|
13
|
-
};
|
|
14
|
-
export type ToolInvocation = {
|
|
15
|
-
type: 'tool-invocation';
|
|
16
|
-
toolInvocation: {
|
|
17
|
-
toolName: string;
|
|
18
|
-
toolCallId: string;
|
|
19
|
-
state: 'partial-call' | 'call' | 'result';
|
|
20
|
-
args: ToolArgs;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
export type ToolResult = {
|
|
24
|
-
type: 'tool-result';
|
|
25
|
-
toolCallId: string;
|
|
26
|
-
content: string;
|
|
27
|
-
};
|
|
28
|
-
export type TextPart = {
|
|
29
|
-
type: 'text';
|
|
30
|
-
text: string;
|
|
31
|
-
};
|
|
32
|
-
export type ReasoningPart = {
|
|
33
|
-
type: 'reasoning';
|
|
34
|
-
reasoning: string;
|
|
35
|
-
};
|
|
36
|
-
export type FilePart = {
|
|
37
|
-
type: 'file';
|
|
38
|
-
mimeType: string;
|
|
39
|
-
data: string;
|
|
40
|
-
fileName: string;
|
|
41
|
-
};
|
|
42
|
-
export type SourcePart = {
|
|
43
|
-
type: 'source';
|
|
44
|
-
source: {
|
|
45
|
-
id: string;
|
|
46
|
-
url: string;
|
|
47
|
-
title: string;
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
export type MessagePart = TextPart | ReasoningPart | ToolInvocation | ToolResult | FilePart | SourcePart;
|
|
51
|
-
export type ChatMessage = {
|
|
52
|
-
id: string;
|
|
53
|
-
role: 'user' | 'assistant';
|
|
54
|
-
parts: MessagePart[];
|
|
55
|
-
};
|
|
56
|
-
export interface AIChatContextValue {
|
|
57
|
-
messages: ChatMessage[];
|
|
58
|
-
isLoading?: boolean;
|
|
59
|
-
onSendMessage?: (message: string) => void;
|
|
60
|
-
model?: string;
|
|
61
|
-
onModelChange?: (model: string) => void;
|
|
62
|
-
availableModels?: {
|
|
63
|
-
label: string;
|
|
64
|
-
value: string;
|
|
65
|
-
}[];
|
|
66
|
-
toolCallApproval?: ToolCallApprovalProps;
|
|
67
|
-
}
|
|
68
|
-
export interface BasePartProps {
|
|
69
|
-
className?: string;
|
|
70
|
-
}
|
|
71
|
-
export type ToolCallWithApproval = ToolCall<string, any> & {
|
|
72
|
-
approve: () => void;
|
|
73
|
-
reject: () => void;
|
|
74
|
-
confirmMessage?: string;
|
|
75
|
-
};
|
|
76
|
-
export interface ToolCallApprovalProps {
|
|
77
|
-
pendingToolCall: ToolCallWithApproval | null;
|
|
78
|
-
}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import { IconName } from '../Icon/names';
|
|
2
|
-
import { Translate, DragEndEvent, DragStartEvent, Modifier } from '@dnd-kit/core';
|
|
3
|
-
interface ActionBarProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
id: string;
|
|
6
|
-
initialPosition: Translate;
|
|
7
|
-
onChangePosition?: (position: Translate) => void;
|
|
8
|
-
onDragStart?: (event: DragStartEvent) => void;
|
|
9
|
-
onDragEnd?: (event: DragEndEvent) => void;
|
|
10
|
-
draggable?: boolean;
|
|
11
|
-
/**
|
|
12
|
-
* dnd-kit modifiers (https://docs.dndkit.com/api-documentation/modifiers)
|
|
13
|
-
*/
|
|
14
|
-
modifiers?: Modifier[];
|
|
15
|
-
}
|
|
16
|
-
interface ActionBarItemProps {
|
|
17
|
-
children: React.ReactNode;
|
|
18
|
-
onClick?: () => void;
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
className?: string;
|
|
21
|
-
iconName: IconName;
|
|
22
|
-
}
|
|
23
|
-
export declare const ActionBar: {
|
|
24
|
-
({ children, modifiers, ...props }: ActionBarProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
displayName: string;
|
|
26
|
-
} & {
|
|
27
|
-
Item: {
|
|
28
|
-
({ children, onClick, disabled, className, iconName, }: ActionBarItemProps): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
displayName: string;
|
|
30
|
-
};
|
|
31
|
-
Separator: {
|
|
32
|
-
(): import("react/jsx-runtime").JSX.Element;
|
|
33
|
-
displayName: string;
|
|
34
|
-
};
|
|
35
|
-
};
|
|
36
|
-
export type { ActionBarProps, ActionBarItemProps };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { VariantProps } from 'class-variance-authority';
|
|
2
|
-
import { iconNames } from '../Icon/names';
|
|
3
|
-
declare const alertVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "error" | "info" | "success" | "warning" | "feature" | null | undefined;
|
|
5
|
-
modifiers?: "inline" | null | undefined;
|
|
6
|
-
} & import('class-variance-authority/dist/types').ClassProp) | undefined) => string;
|
|
7
|
-
export type AlertProps = {
|
|
8
|
-
variant: NonNullable<VariantProps<typeof alertVariants>['variant']>;
|
|
9
|
-
children: React.ReactNode;
|
|
10
|
-
inline?: boolean;
|
|
11
|
-
dismissible?: boolean;
|
|
12
|
-
onDismiss?: () => void;
|
|
13
|
-
iconName?: (typeof iconNames)[number];
|
|
14
|
-
useContainer?: boolean;
|
|
15
|
-
className?: string;
|
|
16
|
-
};
|
|
17
|
-
export declare function Alert({ variant, children, inline, dismissible, onDismiss, iconName, useContainer, className, }: AlertProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
type BadgeVariants = 'default' | 'secondary' | 'tertiary' | 'destructive' | 'outline' | 'success' | 'warning' | 'danger';
|
|
2
|
-
type BadgeSizes = 'xs' | 'sm' | 'md' | 'lg';
|
|
3
|
-
export interface BadgeProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
as?: React.ElementType;
|
|
6
|
-
variant?: BadgeVariants;
|
|
7
|
-
size?: BadgeSizes;
|
|
8
|
-
}
|
|
9
|
-
export declare function Badge({ children, variant, size, as, className, }: BadgeProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ButtonSize, ButtonVariant } from '../../types';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
type Attributes = Pick<React.ButtonHTMLAttributes<HTMLButtonElement>, 'disabled' | 'onClick' | 'type' | 'children' | 'role'>;
|
|
4
|
-
export interface ButtonProps extends Attributes {
|
|
5
|
-
asChild?: boolean;
|
|
6
|
-
variant?: ButtonVariant;
|
|
7
|
-
size?: ButtonSize;
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
-
export { Button };
|
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { default as React, PropsWithChildren, ReactNode } from 'react';
|
|
2
|
-
import { iconNames } from '../Icon/names';
|
|
3
|
-
import { Range } from '../../lib/typeUtils';
|
|
4
|
-
type RightElement = {
|
|
5
|
-
type: 'button';
|
|
6
|
-
label: string;
|
|
7
|
-
onClick: () => void;
|
|
8
|
-
} | {
|
|
9
|
-
type: 'gauge';
|
|
10
|
-
value: Range<100>;
|
|
11
|
-
};
|
|
12
|
-
type IconProps = {
|
|
13
|
-
name: (typeof iconNames)[number];
|
|
14
|
-
size?: 'small' | 'medium' | 'large';
|
|
15
|
-
};
|
|
16
|
-
type CardHeaderProps = PropsWithChildren & {
|
|
17
|
-
subheader?: React.ReactNode;
|
|
18
|
-
icon?: IconProps;
|
|
19
|
-
rightElement?: RightElement;
|
|
20
|
-
className?: string;
|
|
21
|
-
};
|
|
22
|
-
interface CardContentProps extends PropsWithChildren {
|
|
23
|
-
className?: string;
|
|
24
|
-
}
|
|
25
|
-
type FooterContent = {
|
|
26
|
-
text: string;
|
|
27
|
-
link?: {
|
|
28
|
-
label: string;
|
|
29
|
-
href: string;
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
type CardFooterProps = {
|
|
33
|
-
content: FooterContent;
|
|
34
|
-
className?: string;
|
|
35
|
-
};
|
|
36
|
-
export type CardProps = {
|
|
37
|
-
children: ReactNode | ReactNode[];
|
|
38
|
-
onClick?: () => void;
|
|
39
|
-
href?: string;
|
|
40
|
-
className?: string;
|
|
41
|
-
};
|
|
42
|
-
declare const CardWithSubcomponents: React.FC<CardProps> & {
|
|
43
|
-
Header: React.FC<CardHeaderProps>;
|
|
44
|
-
Content: React.FC<CardContentProps>;
|
|
45
|
-
Footer: React.FC<CardFooterProps>;
|
|
46
|
-
};
|
|
47
|
-
export { CardWithSubcomponents as Card };
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import { ReactNode, PropsWithChildren, HTMLAttributes } from 'react';
|
|
2
|
-
import { PanelProps } from 'react-resizable-panels';
|
|
3
|
-
export interface CodeEditorLayoutProps {
|
|
4
|
-
children: ReactNode[] | ReactNode;
|
|
5
|
-
className?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface CodeEditorPaneProps extends PanelProps {
|
|
8
|
-
className?: string;
|
|
9
|
-
containerRef?: React.RefObject<HTMLDivElement>;
|
|
10
|
-
/**
|
|
11
|
-
* Optional tabs to display above the scrolling pane
|
|
12
|
-
*/
|
|
13
|
-
tabs?: React.ReactNode;
|
|
14
|
-
}
|
|
15
|
-
export interface CodeEditorTabsProps extends PropsWithChildren, HTMLAttributes<HTMLDivElement> {
|
|
16
|
-
className?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface CodeEditorTabProps extends Omit<HTMLAttributes<HTMLDivElement>, 'onClick' | 'title'> {
|
|
19
|
-
id: string;
|
|
20
|
-
title?: string | ReactNode;
|
|
21
|
-
className?: string;
|
|
22
|
-
active?: boolean;
|
|
23
|
-
closable?: boolean;
|
|
24
|
-
grow?: boolean;
|
|
25
|
-
icon?: ReactNode;
|
|
26
|
-
invalid?: boolean;
|
|
27
|
-
dirty?: boolean;
|
|
28
|
-
saving?: boolean;
|
|
29
|
-
onClick?: (id: string) => void;
|
|
30
|
-
onClose?: (id: string) => void;
|
|
31
|
-
/**
|
|
32
|
-
* If true, the tab will not be interactive
|
|
33
|
-
* Useful for loading states
|
|
34
|
-
*/
|
|
35
|
-
disabled?: boolean;
|
|
36
|
-
/**
|
|
37
|
-
* Custom styles for the tab
|
|
38
|
-
*/
|
|
39
|
-
customStyles?: CodeEditorTabStateCustomStyles;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Allows for custom styles to be applied to the tab based on its state
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* <CodeEditor.Tab
|
|
46
|
-
* customStyles={{
|
|
47
|
-
* active: 'text-foreground bg-background',
|
|
48
|
-
* inactive: 'text-body-muted bg-muted',
|
|
49
|
-
* dirty: 'text-yellow-700/90 italic dark:text-yellow-300/70',
|
|
50
|
-
* invalid: 'text-red-700 dark:text-red-400',
|
|
51
|
-
* disabled: 'cursor-not-allowed opacity-75',
|
|
52
|
-
* }}
|
|
53
|
-
* />
|
|
54
|
-
*/
|
|
55
|
-
type CodeEditorTabStateCustomStyles = {
|
|
56
|
-
active?: string;
|
|
57
|
-
inactive?: string;
|
|
58
|
-
dirty?: string;
|
|
59
|
-
invalid?: string;
|
|
60
|
-
disabled?: string;
|
|
61
|
-
saving?: string;
|
|
62
|
-
};
|
|
63
|
-
export interface CodeEditorCommandBarProps extends PropsWithChildren, HTMLAttributes<HTMLDivElement> {
|
|
64
|
-
className?: string;
|
|
65
|
-
}
|
|
66
|
-
export interface CodeEditorCustomElementProps extends PropsWithChildren, HTMLAttributes<HTMLDivElement> {
|
|
67
|
-
className?: string;
|
|
68
|
-
}
|
|
69
|
-
export interface CodeEditorEmptyProps extends PropsWithChildren, HTMLAttributes<HTMLDivElement> {
|
|
70
|
-
className?: string;
|
|
71
|
-
}
|
|
72
|
-
declare const CodeEditor: {
|
|
73
|
-
({ children, className }: CodeEditorLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
74
|
-
displayName: string;
|
|
75
|
-
} & {
|
|
76
|
-
Pane: {
|
|
77
|
-
({ children, className, minSize, maxSize, containerRef, tabs, ...props }: CodeEditorPaneProps): import("react/jsx-runtime").JSX.Element;
|
|
78
|
-
displayName: string;
|
|
79
|
-
};
|
|
80
|
-
CommandBar: {
|
|
81
|
-
({ children, className, ...props }: CodeEditorCommandBarProps): import("react/jsx-runtime").JSX.Element;
|
|
82
|
-
displayName: string;
|
|
83
|
-
};
|
|
84
|
-
Empty: {
|
|
85
|
-
({ children, className, ...props }: CodeEditorEmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
86
|
-
displayName: string;
|
|
87
|
-
};
|
|
88
|
-
Tabs: {
|
|
89
|
-
({ children, className, ...props }: CodeEditorTabsProps): import("react/jsx-runtime").JSX.Element;
|
|
90
|
-
displayName: string;
|
|
91
|
-
};
|
|
92
|
-
Tab: {
|
|
93
|
-
({ id, title, className, active, closable, grow, dirty, invalid, saving, onClick, onClose, icon, disabled, customStyles, ...props }: CodeEditorTabProps): import("react/jsx-runtime").JSX.Element;
|
|
94
|
-
displayName: string;
|
|
95
|
-
};
|
|
96
|
-
CustomTabElement: {
|
|
97
|
-
({ children, className, ...props }: CodeEditorCustomElementProps): import("react/jsx-runtime").JSX.Element;
|
|
98
|
-
displayName: string;
|
|
99
|
-
};
|
|
100
|
-
};
|
|
101
|
-
export { CodeEditor };
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
import { HTMLAttributes, default as React } from 'react';
|
|
2
|
-
import { SupportedLanguage } from '../../types';
|
|
3
|
-
export interface CodePlaygroundSnippet {
|
|
4
|
-
/**
|
|
5
|
-
* The code to display in the playground.
|
|
6
|
-
*/
|
|
7
|
-
code?: string | undefined;
|
|
8
|
-
/**
|
|
9
|
-
* Whether the code is loading.
|
|
10
|
-
*/
|
|
11
|
-
loading?: boolean | undefined;
|
|
12
|
-
}
|
|
13
|
-
export type CodePlaygroundSnippets = Partial<Record<SupportedLanguage, CodePlaygroundSnippet>>;
|
|
14
|
-
export interface CodePlaygroundProps {
|
|
15
|
-
/**
|
|
16
|
-
* The children of the playground.
|
|
17
|
-
* Accepts a `CodePlayground.Header` and a `CodePlayground.Footer` or a `CodePlayground.Code` component.
|
|
18
|
-
*/
|
|
19
|
-
children: React.ReactNode;
|
|
20
|
-
/**
|
|
21
|
-
* The error to display in the playground if the code could not be loaded.
|
|
22
|
-
*/
|
|
23
|
-
error?: React.ReactNode | undefined;
|
|
24
|
-
/**
|
|
25
|
-
* An object of snippets to display in the playground.
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* <CodePlayground
|
|
29
|
-
* snippets={{
|
|
30
|
-
* javascript: { code: 'console.log("Hello, world!");' },
|
|
31
|
-
* typescript: { code: 'console.log("Hello, world!");' },
|
|
32
|
-
* }}
|
|
33
|
-
* />
|
|
34
|
-
*/
|
|
35
|
-
snippets: CodePlaygroundSnippets;
|
|
36
|
-
/**
|
|
37
|
-
* The language that should be selected when the playground is mounted.
|
|
38
|
-
*/
|
|
39
|
-
selectedLanguage: SupportedLanguage;
|
|
40
|
-
/**
|
|
41
|
-
* Whether the code should be copyable.
|
|
42
|
-
*
|
|
43
|
-
* @default true
|
|
44
|
-
*/
|
|
45
|
-
copyable?: boolean;
|
|
46
|
-
/** Custom class name to apply to the container */
|
|
47
|
-
className?: string;
|
|
48
|
-
/**
|
|
49
|
-
* Whether to wrap the code.
|
|
50
|
-
*
|
|
51
|
-
* @default true
|
|
52
|
-
*/
|
|
53
|
-
wordWrap?: boolean;
|
|
54
|
-
/**
|
|
55
|
-
* A callback to be called when the language is changed.
|
|
56
|
-
*/
|
|
57
|
-
onChangeLanguage?: (language: SupportedLanguage) => void;
|
|
58
|
-
/**
|
|
59
|
-
* Whether to animate the code when the language is changed.
|
|
60
|
-
*
|
|
61
|
-
* @default true
|
|
62
|
-
*/
|
|
63
|
-
animateOnLanguageChange?: boolean;
|
|
64
|
-
/**
|
|
65
|
-
* Whether to show the language selector.
|
|
66
|
-
*/
|
|
67
|
-
showLanguageSelector?: boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Whether to show line numbers.
|
|
70
|
-
*
|
|
71
|
-
* @default true
|
|
72
|
-
*/
|
|
73
|
-
showLineNumbers?: boolean;
|
|
74
|
-
}
|
|
75
|
-
export interface CodePlaygroundCodeProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
76
|
-
className?: string;
|
|
77
|
-
/**
|
|
78
|
-
* internal api for passing children
|
|
79
|
-
*/
|
|
80
|
-
__children__?: React.ReactNode;
|
|
81
|
-
}
|
|
82
|
-
export interface CodePlaygroundHeaderProps extends HTMLAttributes<HTMLDivElement> {
|
|
83
|
-
children: React.ReactNode;
|
|
84
|
-
}
|
|
85
|
-
export interface CodePlaygroundFooterProps extends HTMLAttributes<HTMLDivElement> {
|
|
86
|
-
children: React.ReactNode;
|
|
87
|
-
}
|
|
88
|
-
declare const CodePlaygroundWithSubcomponents: {
|
|
89
|
-
({ children, snippets, copyable, selectedLanguage, className, onChangeLanguage, error, animateOnLanguageChange, showLineNumbers, showLanguageSelector, wordWrap, }: CodePlaygroundProps): import("react/jsx-runtime").JSX.Element;
|
|
90
|
-
displayName: string;
|
|
91
|
-
} & {
|
|
92
|
-
Header: {
|
|
93
|
-
({ children, className, ...props }: CodePlaygroundHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
94
|
-
displayName: string;
|
|
95
|
-
};
|
|
96
|
-
Footer: {
|
|
97
|
-
({ children, className, ...props }: CodePlaygroundFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
98
|
-
displayName: string;
|
|
99
|
-
};
|
|
100
|
-
/**
|
|
101
|
-
* Can be used to manipulate the properties of the code container. You can pass a custom class name to control the maximum height of the code container for example.
|
|
102
|
-
* No children are expected as the parent component will handle that.
|
|
103
|
-
* @example
|
|
104
|
-
* <CodePlayground.Code className="max-h-72 overflow-y-auto" />
|
|
105
|
-
*/
|
|
106
|
-
Code: React.ForwardRefExoticComponent<CodePlaygroundCodeProps & React.RefAttributes<HTMLDivElement>>;
|
|
107
|
-
};
|
|
108
|
-
export { CodePlaygroundWithSubcomponents as CodePlayground };
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import { ProgrammingLanguage, Size } from '../../types';
|
|
2
|
-
import { AnnotationHandler } from 'codehike/code';
|
|
3
|
-
export interface CodeSnippetProps {
|
|
4
|
-
/**
|
|
5
|
-
* The code to display.
|
|
6
|
-
*/
|
|
7
|
-
code: string;
|
|
8
|
-
/**
|
|
9
|
-
* Whether to show a copy button.
|
|
10
|
-
*/
|
|
11
|
-
copyable?: boolean;
|
|
12
|
-
/**
|
|
13
|
-
* One of the known Speakeasy target languages, or a language that Codehike supports.
|
|
14
|
-
* The full list of supported languages is available at https://codehike.org/docs/concepts/code#languages
|
|
15
|
-
*/
|
|
16
|
-
language: ProgrammingLanguage | string;
|
|
17
|
-
/**
|
|
18
|
-
* The symbol to display before the code.
|
|
19
|
-
*/
|
|
20
|
-
promptSymbol?: React.ReactNode;
|
|
21
|
-
/**
|
|
22
|
-
* Whether to display the code snippet inline.
|
|
23
|
-
*/
|
|
24
|
-
inline?: boolean;
|
|
25
|
-
/**
|
|
26
|
-
* The font size of the code snippet.
|
|
27
|
-
*/
|
|
28
|
-
fontSize?: Size;
|
|
29
|
-
/**
|
|
30
|
-
* Whether to show line numbers.
|
|
31
|
-
*/
|
|
32
|
-
showLineNumbers?: boolean;
|
|
33
|
-
/**
|
|
34
|
-
* The callback to call when the code is selected or copied.
|
|
35
|
-
*/
|
|
36
|
-
onSelectOrCopy?: () => void;
|
|
37
|
-
/**
|
|
38
|
-
* Whether to shimmer the code snippet.
|
|
39
|
-
*/
|
|
40
|
-
shimmer?: boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Additional CSS classes to apply to the code snippet.
|
|
43
|
-
*/
|
|
44
|
-
className?: string;
|
|
45
|
-
/**
|
|
46
|
-
* Custom annotation handlers to be added to the default handlers.
|
|
47
|
-
*/
|
|
48
|
-
customHandlers?: AnnotationHandler[];
|
|
49
|
-
}
|
|
50
|
-
export declare function CodeSnippet({ code, copyable, language, promptSymbol, inline, fontSize, onSelectOrCopy, shimmer, className, showLineNumbers, customHandlers, }: CodeSnippetProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { ButtonProps } from '../Button';
|
|
2
|
-
export interface ComboboxOption<T extends string = string> {
|
|
3
|
-
value: T;
|
|
4
|
-
label: string;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface ComboboxGroup<T extends string = string> {
|
|
8
|
-
label: string;
|
|
9
|
-
options: ComboboxOption<T>[];
|
|
10
|
-
}
|
|
11
|
-
type ComboboxDataProps<T extends string = string> = {
|
|
12
|
-
options: ComboboxOption<T>[];
|
|
13
|
-
groups?: never;
|
|
14
|
-
} | {
|
|
15
|
-
options?: never;
|
|
16
|
-
groups: ComboboxGroup<T>[];
|
|
17
|
-
};
|
|
18
|
-
interface ComboboxBaseProps<T extends string = string> {
|
|
19
|
-
value: T;
|
|
20
|
-
onValueChange: (value: T | undefined) => void;
|
|
21
|
-
variant?: Extract<ButtonProps['variant'], 'outline' | 'ghost'>;
|
|
22
|
-
size?: ButtonProps['size'];
|
|
23
|
-
disabled?: boolean;
|
|
24
|
-
loading?: boolean;
|
|
25
|
-
error?: boolean;
|
|
26
|
-
errorText?: string;
|
|
27
|
-
searchable?: boolean;
|
|
28
|
-
placeholder?: string;
|
|
29
|
-
emptyText?: string;
|
|
30
|
-
searchPlaceholder?: string;
|
|
31
|
-
iconOnly?: boolean;
|
|
32
|
-
}
|
|
33
|
-
export type ComboboxProps<T extends string = string> = ComboboxBaseProps<T> & ComboboxDataProps<T>;
|
|
34
|
-
export declare function Combobox<T extends string = string>({ options, groups, value, onValueChange, variant, size, disabled, loading, error, errorText, searchable, placeholder, emptyText, searchPlaceholder, iconOnly, }: ComboboxProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
35
|
-
export {};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { DialogProps } from '@radix-ui/react-dialog';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
declare const Command: React.ForwardRefExoticComponent<Omit<{
|
|
4
|
-
children?: React.ReactNode;
|
|
5
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
6
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
7
|
-
} & {
|
|
8
|
-
asChild?: boolean;
|
|
9
|
-
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
10
|
-
label?: string;
|
|
11
|
-
shouldFilter?: boolean;
|
|
12
|
-
filter?: (value: string, search: string, keywords?: string[]) => number;
|
|
13
|
-
defaultValue?: string;
|
|
14
|
-
value?: string;
|
|
15
|
-
onValueChange?: (value: string) => void;
|
|
16
|
-
loop?: boolean;
|
|
17
|
-
disablePointerSelection?: boolean;
|
|
18
|
-
vimBindings?: boolean;
|
|
19
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
-
declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
21
|
-
ref?: React.Ref<HTMLInputElement>;
|
|
22
|
-
} & {
|
|
23
|
-
asChild?: boolean;
|
|
24
|
-
}, "key" | "asChild" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "type" | "value"> & {
|
|
25
|
-
value?: string;
|
|
26
|
-
onValueChange?: (search: string) => void;
|
|
27
|
-
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
28
|
-
declare const CommandList: React.ForwardRefExoticComponent<Omit<{
|
|
29
|
-
children?: React.ReactNode;
|
|
30
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
31
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
32
|
-
} & {
|
|
33
|
-
asChild?: boolean;
|
|
34
|
-
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
35
|
-
label?: string;
|
|
36
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
-
declare const CommandEmpty: React.ForwardRefExoticComponent<Omit<{
|
|
38
|
-
children?: React.ReactNode;
|
|
39
|
-
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
40
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
41
|
-
} & {
|
|
42
|
-
asChild?: boolean;
|
|
43
|
-
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
44
|
-
declare const CommandGroup: React.ForwardRefExoticComponent<Omit<{
|
|
45
|
-
children?: React.ReactNode;
|
|
46
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
47
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
48
|
-
} & {
|
|
49
|
-
asChild?: boolean;
|
|
50
|
-
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "heading" | "value"> & {
|
|
51
|
-
heading?: React.ReactNode;
|
|
52
|
-
value?: string;
|
|
53
|
-
forceMount?: boolean;
|
|
54
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
55
|
-
declare const CommandDialog: ({ children, ...props }: DialogProps) => import("react/jsx-runtime").JSX.Element;
|
|
56
|
-
declare const CommandSeparator: React.ForwardRefExoticComponent<Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
57
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
58
|
-
} & {
|
|
59
|
-
asChild?: boolean;
|
|
60
|
-
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild"> & {
|
|
61
|
-
alwaysRender?: boolean;
|
|
62
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
63
|
-
declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
64
|
-
children?: React.ReactNode;
|
|
65
|
-
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
66
|
-
ref?: React.Ref<HTMLDivElement>;
|
|
67
|
-
} & {
|
|
68
|
-
asChild?: boolean;
|
|
69
|
-
}, "key" | keyof React.HTMLAttributes<HTMLDivElement> | "asChild">, "onSelect" | "disabled" | "value"> & {
|
|
70
|
-
disabled?: boolean;
|
|
71
|
-
onSelect?: (value: string) => void;
|
|
72
|
-
value?: string;
|
|
73
|
-
keywords?: string[];
|
|
74
|
-
forceMount?: boolean;
|
|
75
|
-
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
76
|
-
declare const CommandShortcut: {
|
|
77
|
-
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
78
|
-
displayName: string;
|
|
79
|
-
};
|
|
80
|
-
export { Command, CommandInput, CommandList, CommandEmpty, CommandGroup, CommandItem, CommandShortcut, CommandSeparator, CommandDialog, };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Padding, ResponsiveValue } from '../../types';
|
|
2
|
-
import { ReactNode } from 'react';
|
|
3
|
-
export interface ContainerProps {
|
|
4
|
-
children: ReactNode;
|
|
5
|
-
flex?: boolean;
|
|
6
|
-
padding?: ResponsiveValue<Padding>;
|
|
7
|
-
className?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare function Container({ children, flex, padding, className, }: ContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { Screen } from './provider';
|
|
2
|
-
import { default as React } from 'react';
|
|
3
|
-
interface ContextDropdownProps {
|
|
4
|
-
renderTitle?: (screen: Screen, index: number) => React.ReactNode;
|
|
5
|
-
}
|
|
6
|
-
export declare function ContextDropdown({ renderTitle }: ContextDropdownProps): import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export type Screen = {
|
|
3
|
-
id: string;
|
|
4
|
-
title: string;
|
|
5
|
-
component: ReactNode;
|
|
6
|
-
};
|
|
7
|
-
type ContextDropdownContextType = {
|
|
8
|
-
screens: Screen[];
|
|
9
|
-
currentIndex: number;
|
|
10
|
-
isOpen: boolean;
|
|
11
|
-
openScreen: (screen: Screen) => void;
|
|
12
|
-
close: () => void;
|
|
13
|
-
navigateTo: (index: number) => void;
|
|
14
|
-
pushScreen: (screen: Screen) => void;
|
|
15
|
-
popScreen: () => void;
|
|
16
|
-
navigationDirection: 'forward' | 'backward';
|
|
17
|
-
};
|
|
18
|
-
export declare const ContextDropdownContext: import('react').Context<ContextDropdownContextType | undefined>;
|
|
19
|
-
export declare function ContextDropdownProvider({ children, }: {
|
|
20
|
-
children: ReactNode | ((props: ContextDropdownContextType) => ReactNode);
|
|
21
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
export declare function useModal(): {
|
|
2
|
-
screens: import('./provider').Screen[];
|
|
3
|
-
currentIndex: number;
|
|
4
|
-
isOpen: boolean;
|
|
5
|
-
openScreen: (screen: import('./provider').Screen) => void;
|
|
6
|
-
close: () => void;
|
|
7
|
-
navigateTo: (index: number) => void;
|
|
8
|
-
pushScreen: (screen: import('./provider').Screen) => void;
|
|
9
|
-
popScreen: () => void;
|
|
10
|
-
navigationDirection: "forward" | "backward";
|
|
11
|
-
};
|