@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
package/src/utilities.css
CHANGED
|
@@ -312,7 +312,7 @@
|
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
@utility text-muted {
|
|
315
|
-
color: var(--text-muted)!important;
|
|
315
|
+
color: var(--text-muted) !important;
|
|
316
316
|
}
|
|
317
317
|
|
|
318
318
|
@utility text-placeholder {
|
|
@@ -362,7 +362,6 @@
|
|
|
362
362
|
color: var(--text-muted-inverse);
|
|
363
363
|
}
|
|
364
364
|
|
|
365
|
-
|
|
366
365
|
/* Link colors */
|
|
367
366
|
@utility text-link-primary {
|
|
368
367
|
color: var(--text-link-primary);
|
|
@@ -412,11 +411,207 @@
|
|
|
412
411
|
color: var(--text-link-warning);
|
|
413
412
|
}
|
|
414
413
|
|
|
414
|
+
/* Button Text Colors */
|
|
415
|
+
@utility text-btn-brand {
|
|
416
|
+
color: var(--color-neutral-900);
|
|
417
|
+
|
|
418
|
+
@variant dark {
|
|
419
|
+
color: var(--color-neutral-100);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
@utility text-btn-brand-hover {
|
|
424
|
+
color: var(--color-base-black);
|
|
425
|
+
|
|
426
|
+
@variant dark {
|
|
427
|
+
color: var(--color-base-white);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
@utility text-btn-brand-active {
|
|
432
|
+
color: var(--color-base-black);
|
|
433
|
+
|
|
434
|
+
@variant dark {
|
|
435
|
+
color: var(--color-base-white);
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
@utility text-btn-brand-disabled {
|
|
440
|
+
color: var(--color-neutral-900);
|
|
441
|
+
opacity: 0.4;
|
|
442
|
+
|
|
443
|
+
@variant dark {
|
|
444
|
+
color: var(--color-neutral-100);
|
|
445
|
+
opacity: 0.4;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
@utility text-btn-primary {
|
|
450
|
+
color: var(--color-neutral-100);
|
|
451
|
+
|
|
452
|
+
@variant dark {
|
|
453
|
+
color: var(--color-neutral-900);
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
@utility text-btn-primary-hover {
|
|
458
|
+
color: var(--color-base-white);
|
|
459
|
+
|
|
460
|
+
@variant dark {
|
|
461
|
+
color: var(--color-base-black);
|
|
462
|
+
}
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
@utility text-btn-primary-active {
|
|
466
|
+
color: var(--color-base-white);
|
|
467
|
+
|
|
468
|
+
@variant dark {
|
|
469
|
+
color: var(--color-base-black);
|
|
470
|
+
}
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
@utility text-btn-primary-disabled {
|
|
474
|
+
color: var(--color-neutral-100);
|
|
475
|
+
opacity: 0.4;
|
|
476
|
+
|
|
477
|
+
@variant dark {
|
|
478
|
+
color: var(--color-neutral-900);
|
|
479
|
+
opacity: 0.4;
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
@utility text-btn-secondary {
|
|
484
|
+
color: var(--color-neutral-900);
|
|
485
|
+
|
|
486
|
+
@variant dark {
|
|
487
|
+
color: var(--color-neutral-100);
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
@utility text-btn-secondary-hover {
|
|
492
|
+
color: var(--color-base-black);
|
|
493
|
+
|
|
494
|
+
@variant dark {
|
|
495
|
+
color: var(--color-base-white);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
@utility text-btn-secondary-active {
|
|
500
|
+
color: var(--color-base-black);
|
|
501
|
+
|
|
502
|
+
@variant dark {
|
|
503
|
+
color: var(--color-base-white);
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
@utility text-btn-secondary-disabled {
|
|
508
|
+
color: var(--color-neutral-900);
|
|
509
|
+
opacity: 0.4;
|
|
510
|
+
|
|
511
|
+
@variant dark {
|
|
512
|
+
color: var(--color-neutral-100);
|
|
513
|
+
opacity: 0.4;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
@utility text-btn-tertiary {
|
|
518
|
+
color: var(--color-neutral-900);
|
|
519
|
+
|
|
520
|
+
@variant dark {
|
|
521
|
+
color: var(--color-neutral-100);
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
@utility text-btn-tertiary-hover {
|
|
526
|
+
color: var(--color-base-black);
|
|
527
|
+
|
|
528
|
+
@variant dark {
|
|
529
|
+
color: var(--color-base-white);
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
@utility text-btn-tertiary-active {
|
|
534
|
+
color: var(--color-base-black);
|
|
535
|
+
|
|
536
|
+
@variant dark {
|
|
537
|
+
color: var(--color-base-white);
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
@utility text-btn-tertiary-disabled {
|
|
542
|
+
color: var(--color-neutral-900);
|
|
543
|
+
opacity: 0.4;
|
|
544
|
+
|
|
545
|
+
@variant dark {
|
|
546
|
+
color: var(--color-neutral-100);
|
|
547
|
+
opacity: 0.4;
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
@utility text-btn-destructive-primary {
|
|
552
|
+
color: var(--color-base-white);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
@utility text-btn-destructive-primary-hover {
|
|
556
|
+
color: var(--color-base-white);
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
@utility text-btn-destructive-primary-active {
|
|
560
|
+
color: var(--color-base-white);
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
@utility text-btn-destructive-primary-disabled {
|
|
564
|
+
color: var(--color-base-white);
|
|
565
|
+
opacity: 0.4;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
@utility text-btn-destructive-secondary {
|
|
569
|
+
color: var(--color-feedback-red-600);
|
|
570
|
+
|
|
571
|
+
@variant dark {
|
|
572
|
+
color: var(--color-feedback-red-400);
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
@utility text-btn-destructive-secondary-hover {
|
|
577
|
+
color: var(--color-feedback-red-700);
|
|
578
|
+
|
|
579
|
+
@variant dark {
|
|
580
|
+
color: var(--color-feedback-red-500);
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
|
|
584
|
+
@utility text-btn-destructive-secondary-active {
|
|
585
|
+
color: var(--color-feedback-red-800);
|
|
586
|
+
|
|
587
|
+
@variant dark {
|
|
588
|
+
color: var(--color-feedback-red-600);
|
|
589
|
+
}
|
|
590
|
+
}
|
|
591
|
+
|
|
592
|
+
@utility text-btn-destructive-secondary-disabled {
|
|
593
|
+
color: var(--color-feedback-red-600);
|
|
594
|
+
opacity: 0.4;
|
|
595
|
+
|
|
596
|
+
@variant dark {
|
|
597
|
+
color: var(--color-feedback-red-400);
|
|
598
|
+
opacity: 0.4;
|
|
599
|
+
}
|
|
600
|
+
}
|
|
415
601
|
|
|
416
602
|
@utility bg-gradient-primary {
|
|
417
603
|
background: var(--gradient-brand-primary);
|
|
418
604
|
}
|
|
419
605
|
|
|
606
|
+
/* TODO: check with others on the naming convention for brand gradient utilities */
|
|
607
|
+
@utility bg-gradient-green {
|
|
608
|
+
background: var(--gradient-brand-green);
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
@utility bg-gradient-red {
|
|
612
|
+
background: var(--gradient-brand-red);
|
|
613
|
+
}
|
|
614
|
+
|
|
420
615
|
@utility border-gradient-primary {
|
|
421
616
|
border-image: var(--gradient-brand-primary) 1;
|
|
422
617
|
}
|
|
@@ -431,6 +626,10 @@
|
|
|
431
626
|
|
|
432
627
|
@utility bg-surface-secondary {
|
|
433
628
|
background-color: var(--color-neutral-100);
|
|
629
|
+
|
|
630
|
+
@variant dark {
|
|
631
|
+
background-color: var(--color-neutral-900);
|
|
632
|
+
}
|
|
434
633
|
}
|
|
435
634
|
|
|
436
635
|
@utility bg-warning {
|
|
@@ -447,7 +646,6 @@
|
|
|
447
646
|
border-style: solid;
|
|
448
647
|
}
|
|
449
648
|
|
|
450
|
-
|
|
451
649
|
/* Link underline utilities */
|
|
452
650
|
@utility underline-link-primary {
|
|
453
651
|
color: var(--underline-link-primary);
|
|
@@ -827,6 +1025,152 @@
|
|
|
827
1025
|
/* ============================================
|
|
828
1026
|
* BACKGROUNDS
|
|
829
1027
|
* ============================================ */
|
|
1028
|
+
|
|
1029
|
+
/* Button Background utilities
|
|
1030
|
+
* Figma: Surface/Button/{Variant}/bg-{state} → Code: bg-btn-{variant}-{state}
|
|
1031
|
+
* Follows Tailwind conventions: bg-*, rest state has no suffix */
|
|
1032
|
+
@utility bg-btn-brand {
|
|
1033
|
+
background-color: var(--color-base-white);
|
|
1034
|
+
|
|
1035
|
+
@variant dark {
|
|
1036
|
+
background-color: var(--color-base-black);
|
|
1037
|
+
}
|
|
1038
|
+
}
|
|
1039
|
+
|
|
1040
|
+
@utility bg-btn-brand-hover {
|
|
1041
|
+
background-color: var(--color-neutral-100);
|
|
1042
|
+
|
|
1043
|
+
@variant dark {
|
|
1044
|
+
background-color: var(--color-neutral-900);
|
|
1045
|
+
}
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
@utility bg-btn-brand-active {
|
|
1049
|
+
background-color: var(--color-neutral-200);
|
|
1050
|
+
|
|
1051
|
+
@variant dark {
|
|
1052
|
+
background-color: var(--color-neutral-800);
|
|
1053
|
+
}
|
|
1054
|
+
}
|
|
1055
|
+
|
|
1056
|
+
@utility bg-btn-brand-disabled {
|
|
1057
|
+
background-color: var(--color-base-white);
|
|
1058
|
+
opacity: 1 !important;
|
|
1059
|
+
color: var(--text-muted) !important;
|
|
1060
|
+
|
|
1061
|
+
&:before {
|
|
1062
|
+
opacity: 0.4;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
|
|
1066
|
+
@variant dark {
|
|
1067
|
+
background-color: var(--color-base-black);
|
|
1068
|
+
}
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
@utility bg-btn-primary {
|
|
1072
|
+
background-color: var(--color-neutral-800);
|
|
1073
|
+
|
|
1074
|
+
@variant dark {
|
|
1075
|
+
background-color: var(--color-neutral-200);
|
|
1076
|
+
}
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
@utility bg-btn-primary-hover {
|
|
1080
|
+
background-color: var(--color-neutral-900);
|
|
1081
|
+
|
|
1082
|
+
@variant dark {
|
|
1083
|
+
background-color: var(--color-neutral-100);
|
|
1084
|
+
}
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
@utility bg-btn-primary-active {
|
|
1088
|
+
background-color: var(--color-base-black);
|
|
1089
|
+
|
|
1090
|
+
@variant dark {
|
|
1091
|
+
background-color: var(--color-base-white);
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
|
|
1095
|
+
@utility bg-btn-primary-disabled {
|
|
1096
|
+
background-color: var(--color-neutral-800);
|
|
1097
|
+
opacity: 0.4;
|
|
1098
|
+
|
|
1099
|
+
@variant dark {
|
|
1100
|
+
background-color: var(--color-neutral-200);
|
|
1101
|
+
opacity: 0.4;
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
@utility bg-btn-secondary {
|
|
1106
|
+
background-color: var(--color-neutral-200);
|
|
1107
|
+
|
|
1108
|
+
@variant dark {
|
|
1109
|
+
background-color: var(--color-neutral-800);
|
|
1110
|
+
}
|
|
1111
|
+
}
|
|
1112
|
+
|
|
1113
|
+
@utility bg-btn-secondary-hover {
|
|
1114
|
+
background-color: var(--color-neutral-300);
|
|
1115
|
+
|
|
1116
|
+
@variant dark {
|
|
1117
|
+
background-color: var(--color-neutral-700);
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
@utility bg-btn-secondary-active {
|
|
1122
|
+
background-color: var(--color-neutral-400);
|
|
1123
|
+
|
|
1124
|
+
@variant dark {
|
|
1125
|
+
background-color: var(--color-neutral-600);
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
@utility bg-btn-secondary-disabled {
|
|
1130
|
+
background-color: var(--color-neutral-200);
|
|
1131
|
+
opacity: 0.4;
|
|
1132
|
+
|
|
1133
|
+
@variant dark {
|
|
1134
|
+
background-color: var(--color-neutral-800);
|
|
1135
|
+
opacity: 0.4;
|
|
1136
|
+
}
|
|
1137
|
+
}
|
|
1138
|
+
|
|
1139
|
+
@utility bg-btn-destructive {
|
|
1140
|
+
background-color: var(--color-feedback-red-600);
|
|
1141
|
+
|
|
1142
|
+
@variant dark {
|
|
1143
|
+
background-color: var(--color-feedback-red-400);
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
|
|
1147
|
+
@utility bg-btn-destructive-hover {
|
|
1148
|
+
background-color: var(--color-feedback-red-700);
|
|
1149
|
+
|
|
1150
|
+
@variant dark {
|
|
1151
|
+
background-color: var(--color-feedback-red-500);
|
|
1152
|
+
}
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
@utility bg-btn-destructive-active {
|
|
1156
|
+
background-color: var(--color-feedback-red-800);
|
|
1157
|
+
|
|
1158
|
+
@variant dark {
|
|
1159
|
+
background-color: var(--color-feedback-red-600);
|
|
1160
|
+
}
|
|
1161
|
+
}
|
|
1162
|
+
|
|
1163
|
+
@utility bg-btn-destructive-disabled {
|
|
1164
|
+
background-color: var(--color-feedback-red-600);
|
|
1165
|
+
opacity: 0.4;
|
|
1166
|
+
|
|
1167
|
+
@variant dark {
|
|
1168
|
+
background-color: var(--color-feedback-red-400);
|
|
1169
|
+
opacity: 0.4;
|
|
1170
|
+
}
|
|
1171
|
+
}
|
|
1172
|
+
|
|
1173
|
+
/* Surface Background utilities */
|
|
830
1174
|
@utility bg-surface-primary-default {
|
|
831
1175
|
background-color: var(--bg-surface-primary-default);
|
|
832
1176
|
}
|
|
@@ -966,7 +1310,6 @@
|
|
|
966
1310
|
background-color: var(--bg-warning-softest);
|
|
967
1311
|
}
|
|
968
1312
|
|
|
969
|
-
|
|
970
1313
|
@layer utilities {
|
|
971
1314
|
.devicon-devicon-plain {
|
|
972
1315
|
max-width: 2em;
|
|
@@ -1110,5 +1453,3 @@
|
|
|
1110
1453
|
--ease-out-expo: var(--ease-out-expo);
|
|
1111
1454
|
--ease-out-circ: var(--ease-out-circ);
|
|
1112
1455
|
}
|
|
1113
|
-
|
|
1114
|
-
|
package/types/utilities.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-generated TypeScript definitions for Moonshine utilities
|
|
3
|
-
* Generated on: 2025-
|
|
3
|
+
* Generated on: 2025-10-31T13:56:37.127Z
|
|
4
4
|
*
|
|
5
5
|
* DO NOT EDIT THIS FILE DIRECTLY
|
|
6
6
|
* Run 'pnpm generate:docs' to update
|
|
@@ -68,7 +68,33 @@ export type MoonshineUtilities =
|
|
|
68
68
|
| 'text-link-success'
|
|
69
69
|
| 'text-default-warning'
|
|
70
70
|
| 'text-link-warning'
|
|
71
|
+
| 'text-btn-brand'
|
|
72
|
+
| 'text-btn-brand-hover'
|
|
73
|
+
| 'text-btn-brand-active'
|
|
74
|
+
| 'text-btn-brand-disabled'
|
|
75
|
+
| 'text-btn-primary'
|
|
76
|
+
| 'text-btn-primary-hover'
|
|
77
|
+
| 'text-btn-primary-active'
|
|
78
|
+
| 'text-btn-primary-disabled'
|
|
79
|
+
| 'text-btn-secondary'
|
|
80
|
+
| 'text-btn-secondary-hover'
|
|
81
|
+
| 'text-btn-secondary-active'
|
|
82
|
+
| 'text-btn-secondary-disabled'
|
|
83
|
+
| 'text-btn-tertiary'
|
|
84
|
+
| 'text-btn-tertiary-hover'
|
|
85
|
+
| 'text-btn-tertiary-active'
|
|
86
|
+
| 'text-btn-tertiary-disabled'
|
|
87
|
+
| 'text-btn-destructive-primary'
|
|
88
|
+
| 'text-btn-destructive-primary-hover'
|
|
89
|
+
| 'text-btn-destructive-primary-active'
|
|
90
|
+
| 'text-btn-destructive-primary-disabled'
|
|
91
|
+
| 'text-btn-destructive-secondary'
|
|
92
|
+
| 'text-btn-destructive-secondary-hover'
|
|
93
|
+
| 'text-btn-destructive-secondary-active'
|
|
94
|
+
| 'text-btn-destructive-secondary-disabled'
|
|
71
95
|
| 'bg-gradient-primary'
|
|
96
|
+
| 'bg-gradient-green'
|
|
97
|
+
| 'bg-gradient-red'
|
|
72
98
|
| 'border-gradient-primary'
|
|
73
99
|
| 'bg-surface-primary'
|
|
74
100
|
| 'bg-surface-secondary'
|
|
@@ -158,6 +184,22 @@ export type MoonshineUtilities =
|
|
|
158
184
|
| 'stroke-warning-highlight'
|
|
159
185
|
| 'stroke-warning-default'
|
|
160
186
|
| 'stroke-warning-muted'
|
|
187
|
+
| 'bg-btn-brand'
|
|
188
|
+
| 'bg-btn-brand-hover'
|
|
189
|
+
| 'bg-btn-brand-active'
|
|
190
|
+
| 'bg-btn-brand-disabled'
|
|
191
|
+
| 'bg-btn-primary'
|
|
192
|
+
| 'bg-btn-primary-hover'
|
|
193
|
+
| 'bg-btn-primary-active'
|
|
194
|
+
| 'bg-btn-primary-disabled'
|
|
195
|
+
| 'bg-btn-secondary'
|
|
196
|
+
| 'bg-btn-secondary-hover'
|
|
197
|
+
| 'bg-btn-secondary-active'
|
|
198
|
+
| 'bg-btn-secondary-disabled'
|
|
199
|
+
| 'bg-btn-destructive'
|
|
200
|
+
| 'bg-btn-destructive-hover'
|
|
201
|
+
| 'bg-btn-destructive-active'
|
|
202
|
+
| 'bg-btn-destructive-disabled'
|
|
161
203
|
| 'bg-surface-primary-default'
|
|
162
204
|
| 'bg-surface-primary-inverse'
|
|
163
205
|
| 'bg-surface-secondary-default'
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { AIChatMessageComponents } from './AIChatMessage';
|
|
3
|
-
import { AIChatMessageComposerComponents } from './AIChatMessageComposer';
|
|
4
|
-
import { AIChatContextValue, ToolCallApprovalProps } from './types';
|
|
5
|
-
export interface ModelSelectorConfig {
|
|
6
|
-
model: string;
|
|
7
|
-
onModelChange: (v: string) => void;
|
|
8
|
-
availableModels: {
|
|
9
|
-
label: string;
|
|
10
|
-
value: string;
|
|
11
|
-
}[];
|
|
12
|
-
}
|
|
13
|
-
export interface AIChatContainerProps extends Omit<AIChatContextValue, 'model' | 'onModelChange' | 'availableModels' | 'toolCallApproval'> {
|
|
14
|
-
modelSelector?: ModelSelectorConfig;
|
|
15
|
-
className?: string;
|
|
16
|
-
components?: Partial<AIChatComponents>;
|
|
17
|
-
toolCallApproval?: ToolCallApprovalProps;
|
|
18
|
-
children?: ReactNode;
|
|
19
|
-
}
|
|
20
|
-
interface AIChatComponents {
|
|
21
|
-
composer: Partial<AIChatMessageComposerComponents>;
|
|
22
|
-
message: Partial<AIChatMessageComponents>;
|
|
23
|
-
}
|
|
24
|
-
export declare function AIChatContainer({ messages, isLoading, onSendMessage, modelSelector, className, components, toolCallApproval, children, }: AIChatContainerProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export {};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { BaseComponents, FcOrClassName } from './componentsTypes';
|
|
2
|
-
import { AIChatMessageToolPartComponents } from './parts/AIChatMessageToolPart';
|
|
3
|
-
import { ChatMessage } from './types';
|
|
4
|
-
export interface AIChatMessageProps {
|
|
5
|
-
message: ChatMessage;
|
|
6
|
-
className?: string;
|
|
7
|
-
components?: Partial<AIChatMessageComponents>;
|
|
8
|
-
}
|
|
9
|
-
interface AvatarComponents extends BaseComponents {
|
|
10
|
-
user: FcOrClassName<unknown>;
|
|
11
|
-
assistant: FcOrClassName<unknown>;
|
|
12
|
-
system: FcOrClassName<unknown>;
|
|
13
|
-
}
|
|
14
|
-
export interface AIChatMessageComponents {
|
|
15
|
-
toolCall: Partial<AIChatMessageToolPartComponents>;
|
|
16
|
-
avatar: Partial<AvatarComponents>;
|
|
17
|
-
}
|
|
18
|
-
export declare function AIChatMessage({ message, className, components, }: AIChatMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { FcOrClassName } from './componentsTypes';
|
|
3
|
-
export interface AIChatMessageComposerProps {
|
|
4
|
-
className?: string;
|
|
5
|
-
components?: Partial<AIChatMessageComposerComponents>;
|
|
6
|
-
}
|
|
7
|
-
export type AIChatMessageComposerComponents = {
|
|
8
|
-
submitButton: FcOrClassName<{
|
|
9
|
-
disabled?: boolean;
|
|
10
|
-
type: 'submit';
|
|
11
|
-
}>;
|
|
12
|
-
modelSelector: FcOrClassName<{
|
|
13
|
-
model: string;
|
|
14
|
-
onModelChange: (model: string) => void;
|
|
15
|
-
availableModels: {
|
|
16
|
-
label: string;
|
|
17
|
-
value: string;
|
|
18
|
-
}[];
|
|
19
|
-
}>;
|
|
20
|
-
additionalActions: ReactNode;
|
|
21
|
-
};
|
|
22
|
-
export declare function AIChatMessageComposer({ className, components, }: AIChatMessageComposerProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { AIChatMessageComponents } from './AIChatMessage';
|
|
2
|
-
export interface AIChatMessageListProps {
|
|
3
|
-
components?: Partial<AIChatMessageComponents>;
|
|
4
|
-
className?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function AIChatMessageList({ components, className, }: AIChatMessageListProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
interface ModelSelectorConfig {
|
|
2
|
-
model: string;
|
|
3
|
-
onModelChange: (v: string) => void;
|
|
4
|
-
availableModels: {
|
|
5
|
-
label: string;
|
|
6
|
-
value: string;
|
|
7
|
-
}[];
|
|
8
|
-
}
|
|
9
|
-
interface AIChatModelSelectorProps {
|
|
10
|
-
modelSelector?: ModelSelectorConfig;
|
|
11
|
-
className?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare function AIChatModelSelector({ modelSelector, className, }: AIChatModelSelectorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
14
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { FunctionComponent, ReactNode } from 'react';
|
|
2
|
-
type ClassName = string;
|
|
3
|
-
export type FcOrClassName<P> = FunctionComponent<P> | ClassName;
|
|
4
|
-
export type BaseComponents = Record<string, FcOrClassName<any> | ReactNode>;
|
|
5
|
-
export type DefaultComponents<T extends BaseComponents> = {
|
|
6
|
-
[key in keyof T]: T[key] extends FcOrClassName<infer P> ? FunctionComponent<P & {
|
|
7
|
-
className: string;
|
|
8
|
-
}> : T[key];
|
|
9
|
-
};
|
|
10
|
-
export declare const renderComponent: <T extends BaseComponents, K extends keyof T>(defaultComponents: DefaultComponents<T>, userComponents: Partial<T> | undefined, key: K, props: T[K] extends FcOrClassName<infer P> ? P : never) => ReactNode;
|
|
11
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from './AIChatContainer';
|
|
2
|
-
export * from './AIChatMessageList';
|
|
3
|
-
export * from './AIChatMessage';
|
|
4
|
-
export * from './AIChatMessageComposer';
|
|
5
|
-
export * from './parts/AIChatMessageTextPart';
|
|
6
|
-
export * from './parts/AIChatMessageReasoningPart';
|
|
7
|
-
export * from './parts/AIChatMessageToolInvocationPart';
|
|
8
|
-
export * from './parts/AIChatMessageToolResultPart';
|
|
9
|
-
export * from './parts/AIChatMessageFilePart';
|
|
10
|
-
export * from './parts/AIChatMessageSourcePart';
|
|
11
|
-
export * from './types';
|
|
12
|
-
export * from './context';
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { BasePartProps } from '../types';
|
|
2
|
-
export interface AIChatMessageFilePartProps extends BasePartProps {
|
|
3
|
-
mimeType: string;
|
|
4
|
-
data: string;
|
|
5
|
-
fileName?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function AIChatMessageFilePart({ mimeType, data, fileName, className, }: AIChatMessageFilePartProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { BasePartProps } from '../types';
|
|
2
|
-
export interface AIChatMessageReasoningPartProps extends BasePartProps {
|
|
3
|
-
reasoning: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function AIChatMessageReasoningPart({ reasoning, className, }: AIChatMessageReasoningPartProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { BasePartProps } from '../types';
|
|
2
|
-
export interface AIChatMessageSourcePartProps extends BasePartProps {
|
|
3
|
-
source: {
|
|
4
|
-
id: string;
|
|
5
|
-
url: string;
|
|
6
|
-
title?: string;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
export declare function AIChatMessageSourcePart({ source, className, }: AIChatMessageSourcePartProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { BasePartProps } from '../types';
|
|
2
|
-
export interface AIChatMessageToolInvocationPartProps extends BasePartProps {
|
|
3
|
-
toolName: string;
|
|
4
|
-
toolInput?: Record<string, unknown>;
|
|
5
|
-
}
|
|
6
|
-
export declare function AIChatMessageToolInvocationPart({ toolName, toolInput, className, }: AIChatMessageToolInvocationPartProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { BaseComponents, FcOrClassName } from '../componentsTypes';
|
|
2
|
-
import { BasePartProps } from '../types';
|
|
3
|
-
type ToolInvocationState = 'partial-call' | 'call' | 'result';
|
|
4
|
-
type ToolInvocationStatus = 'pending' | 'in-progress' | 'success' | 'error';
|
|
5
|
-
interface ToolInvocation {
|
|
6
|
-
state: ToolInvocationState;
|
|
7
|
-
toolCallId: string;
|
|
8
|
-
toolName: string;
|
|
9
|
-
args: Record<string, unknown>;
|
|
10
|
-
result?: unknown;
|
|
11
|
-
}
|
|
12
|
-
export interface AIChatMessageToolPartProps extends BasePartProps {
|
|
13
|
-
toolInvocation: ToolInvocation;
|
|
14
|
-
components?: Partial<AIChatMessageToolPartComponents>;
|
|
15
|
-
onAccept?: () => void;
|
|
16
|
-
onReject?: () => void;
|
|
17
|
-
}
|
|
18
|
-
export interface AIChatMessageToolPartComponents extends BaseComponents {
|
|
19
|
-
toolName: FcOrClassName<ToolInvocation & {
|
|
20
|
-
confirmMessage?: string;
|
|
21
|
-
}>;
|
|
22
|
-
statusIndicator: FcOrClassName<{
|
|
23
|
-
status: ToolInvocationStatus;
|
|
24
|
-
}>;
|
|
25
|
-
input: FcOrClassName<Omit<ToolInvocation, 'args'> & {
|
|
26
|
-
args: string;
|
|
27
|
-
}>;
|
|
28
|
-
result: FcOrClassName<Omit<ToolInvocation, 'result'> & {
|
|
29
|
-
result: string;
|
|
30
|
-
}>;
|
|
31
|
-
}
|
|
32
|
-
export declare function AIChatMessageToolPart({ toolInvocation, className, components, }: AIChatMessageToolPartProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { BasePartProps } from '../types';
|
|
2
|
-
export interface AIChatMessageToolResultPartProps extends BasePartProps {
|
|
3
|
-
content: string;
|
|
4
|
-
}
|
|
5
|
-
export declare function AIChatMessageToolResultPart({ content, className, }: AIChatMessageToolResultPartProps): import("react/jsx-runtime").JSX.Element;
|