@calliopelabs/ui 0.14.0 → 0.18.0

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 (127) hide show
  1. package/README.md +235 -1
  2. package/dist/agent/AgentChat.d.ts +8 -1
  3. package/dist/agent/AgentChat.js +43 -2
  4. package/dist/agent/WorkflowRenderers.d.ts +61 -0
  5. package/dist/agent/WorkflowRenderers.js +102 -0
  6. package/dist/agent/controller.d.ts +19 -0
  7. package/dist/agent/controller.js +33 -0
  8. package/dist/agent/copilotkit/CopilotKitAgentProvider.js +2 -2
  9. package/dist/agent/index.d.ts +4 -2
  10. package/dist/agent/index.js +3 -1
  11. package/dist/agent/mock.d.ts +26 -4
  12. package/dist/agent/mock.js +68 -37
  13. package/dist/agent/renderers.d.ts +49 -0
  14. package/dist/agent/renderers.js +27 -0
  15. package/dist/appearance/brands.d.ts +17 -0
  16. package/dist/appearance/brands.js +14 -0
  17. package/dist/chat/MessageBubble.js +1 -1
  18. package/dist/chat/MessageList.d.ts +9 -2
  19. package/dist/chat/MessageList.js +11 -8
  20. package/dist/css/appearance.js +1 -1
  21. package/dist/css/calliope.css +5 -0
  22. package/dist/css/tokens.css +5 -0
  23. package/dist/index.d.ts +9 -1
  24. package/dist/index.js +8 -1
  25. package/dist/primitives/Badge.d.ts +14 -0
  26. package/dist/primitives/Badge.js +25 -0
  27. package/dist/primitives/ContextMenu.d.ts +18 -0
  28. package/dist/primitives/ContextMenu.js +34 -0
  29. package/dist/primitives/Menubar.d.ts +21 -0
  30. package/dist/primitives/Menubar.js +43 -0
  31. package/dist/primitives/ScrollArea.d.ts +16 -0
  32. package/dist/primitives/ScrollArea.js +11 -0
  33. package/dist/primitives/Toast.d.ts +37 -0
  34. package/dist/primitives/Toast.js +43 -0
  35. package/dist/primitives/Tooltip.d.ts +16 -0
  36. package/dist/primitives/Tooltip.js +26 -0
  37. package/dist/provider/messages.d.ts +217 -0
  38. package/dist/provider/messages.js +238 -0
  39. package/dist/shell/RailPanel.js +1 -1
  40. package/dist/theme/css-layer.js +2 -1
  41. package/dist/theme/tokens.generated.d.ts +3 -0
  42. package/dist/theme/tokens.generated.js +3 -0
  43. package/dist/workbench/ActivityBar.d.ts +37 -0
  44. package/dist/workbench/ActivityBar.js +57 -0
  45. package/dist/workbench/BottomPanel.d.ts +30 -0
  46. package/dist/workbench/BottomPanel.js +20 -0
  47. package/dist/workbench/CodeEditor.d.ts +48 -0
  48. package/dist/workbench/CodeEditor.js +153 -0
  49. package/dist/workbench/CommandPalette.d.ts +49 -0
  50. package/dist/workbench/CommandPalette.js +114 -0
  51. package/dist/workbench/DataChart.d.ts +45 -0
  52. package/dist/workbench/DataChart.js +146 -0
  53. package/dist/workbench/DataGrid.d.ts +89 -0
  54. package/dist/workbench/DataGrid.js +590 -0
  55. package/dist/workbench/DataProfile.d.ts +17 -0
  56. package/dist/workbench/DataProfile.js +51 -0
  57. package/dist/workbench/EditorTabs.d.ts +62 -0
  58. package/dist/workbench/EditorTabs.js +115 -0
  59. package/dist/workbench/FileBrowser.d.ts +62 -0
  60. package/dist/workbench/FileBrowser.js +117 -0
  61. package/dist/workbench/FileGrid.d.ts +13 -0
  62. package/dist/workbench/FileGrid.js +114 -0
  63. package/dist/workbench/FileIcon.d.ts +10 -0
  64. package/dist/workbench/FileIcon.js +24 -0
  65. package/dist/workbench/FileList.d.ts +35 -0
  66. package/dist/workbench/FileList.js +160 -0
  67. package/dist/workbench/FilePreview.d.ts +66 -0
  68. package/dist/workbench/FilePreview.js +108 -0
  69. package/dist/workbench/FileTree.d.ts +37 -0
  70. package/dist/workbench/FileTree.js +218 -0
  71. package/dist/workbench/GridCell.d.ts +19 -0
  72. package/dist/workbench/GridCell.js +50 -0
  73. package/dist/workbench/GridDetails.d.ts +31 -0
  74. package/dist/workbench/GridDetails.js +78 -0
  75. package/dist/workbench/MenuBar.d.ts +49 -0
  76. package/dist/workbench/MenuBar.js +25 -0
  77. package/dist/workbench/PaneGroup.d.ts +50 -0
  78. package/dist/workbench/PaneGroup.js +146 -0
  79. package/dist/workbench/PendingChangesBar.d.ts +20 -0
  80. package/dist/workbench/PendingChangesBar.js +19 -0
  81. package/dist/workbench/Shortcuts.d.ts +50 -0
  82. package/dist/workbench/Shortcuts.js +109 -0
  83. package/dist/workbench/SqlEditor.d.ts +21 -0
  84. package/dist/workbench/SqlEditor.js +79 -0
  85. package/dist/workbench/StatusBar.d.ts +28 -0
  86. package/dist/workbench/StatusBar.js +26 -0
  87. package/dist/workbench/TruncationBanner.d.ts +11 -0
  88. package/dist/workbench/TruncationBanner.js +12 -0
  89. package/dist/workbench/UploadDropzone.d.ts +52 -0
  90. package/dist/workbench/UploadDropzone.js +115 -0
  91. package/dist/workbench/WorkbenchShell.d.ts +36 -0
  92. package/dist/workbench/WorkbenchShell.js +20 -0
  93. package/dist/workbench/dnd.d.ts +17 -0
  94. package/dist/workbench/dnd.js +77 -0
  95. package/dist/workbench/download.d.ts +11 -0
  96. package/dist/workbench/download.js +28 -0
  97. package/dist/workbench/editor-theme.d.ts +42 -0
  98. package/dist/workbench/editor-theme.js +113 -0
  99. package/dist/workbench/grid-format.d.ts +59 -0
  100. package/dist/workbench/grid-format.js +169 -0
  101. package/dist/workbench/grid-model.d.ts +75 -0
  102. package/dist/workbench/grid-model.js +259 -0
  103. package/dist/workbench/grid-selection.d.ts +69 -0
  104. package/dist/workbench/grid-selection.js +183 -0
  105. package/dist/workbench/grid-stats.d.ts +58 -0
  106. package/dist/workbench/grid-stats.js +185 -0
  107. package/dist/workbench/index.d.ts +44 -0
  108. package/dist/workbench/index.js +47 -0
  109. package/dist/workbench/keys.d.ts +23 -0
  110. package/dist/workbench/keys.js +105 -0
  111. package/dist/workbench/model.d.ts +72 -0
  112. package/dist/workbench/model.js +214 -0
  113. package/dist/workbench/palette.d.ts +17 -0
  114. package/dist/workbench/palette.js +45 -0
  115. package/dist/workbench/pending.d.ts +92 -0
  116. package/dist/workbench/pending.js +207 -0
  117. package/dist/workbench/selection.d.ts +16 -0
  118. package/dist/workbench/selection.js +46 -0
  119. package/dist/workbench/sql-completion.d.ts +107 -0
  120. package/dist/workbench/sql-completion.js +475 -0
  121. package/dist/workbench/typeahead.d.ts +15 -0
  122. package/dist/workbench/typeahead.js +22 -0
  123. package/dist/workflow/WorkflowRuntimeControls.d.ts +21 -0
  124. package/dist/workflow/WorkflowRuntimeControls.js +54 -0
  125. package/dist/workflow/runtime-controls.d.ts +29 -0
  126. package/dist/workflow/runtime-controls.js +10 -0
  127. package/package.json +17 -2
@@ -0,0 +1,14 @@
1
+ import { type VariantProps } from "class-variance-authority";
2
+ import type * as React from "react";
3
+ export declare const badgeVariants: (props?: ({
4
+ variant?: "neutral" | "outline" | "primary" | null | undefined;
5
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
6
+ export interface BadgeProps extends React.ComponentProps<"span">, VariantProps<typeof badgeVariants> {
7
+ }
8
+ /**
9
+ * A small count or label. Not a status: a state with a meaning (running,
10
+ * failed) is a StatusBadge, whose colours never follow the accent. A badge
11
+ * that is only a number needs words for a screen reader, so give it an
12
+ * `aria-label` ("3 unread") or put the noun beside it.
13
+ */
14
+ export declare function Badge({ className, variant, ...props }: BadgeProps): React.JSX.Element;
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { cva } from "class-variance-authority";
3
+ import { cn } from "../lib/cn.js";
4
+ export const badgeVariants = cva("inline-flex h-5 w-fit min-w-5 shrink-0 items-center justify-center gap-1 overflow-hidden rounded-full border px-1.5 text-xs font-medium whitespace-nowrap tabular-nums [&>svg]:pointer-events-none [&>svg]:size-3", {
5
+ variants: {
6
+ variant: {
7
+ /** Quiet: a count beside a label, a kind ("folder", "beta"). */
8
+ neutral: "border-transparent bg-secondary text-secondary-foreground",
9
+ /** The accent: a new count that wants attention. */
10
+ primary: "border-transparent bg-primary text-primary-foreground",
11
+ /** A hairline only, for dense rows. */
12
+ outline: "border-border bg-transparent text-muted-foreground",
13
+ },
14
+ },
15
+ defaultVariants: { variant: "neutral" },
16
+ });
17
+ /**
18
+ * A small count or label. Not a status: a state with a meaning (running,
19
+ * failed) is a StatusBadge, whose colours never follow the accent. A badge
20
+ * that is only a number needs words for a screen reader, so give it an
21
+ * `aria-label` ("3 unread") or put the noun beside it.
22
+ */
23
+ export function Badge({ className, variant, ...props }) {
24
+ return (_jsx("span", { "data-slot": "badge", "data-variant": variant ?? "neutral", className: cn(badgeVariants({ variant }), className), ...props }));
25
+ }
@@ -0,0 +1,18 @@
1
+ import { ContextMenu as ContextMenuPrimitive } from "radix-ui";
2
+ import type * as React from "react";
3
+ /**
4
+ * The right-click (and Shift+F10, and the context-menu key) menu. Every
5
+ * action in it must also be reachable another way: a toolbar button, a row
6
+ * menu or a shortcut, since touch and many keyboard users never open it.
7
+ */
8
+ export declare function ContextMenu(props: React.ComponentProps<typeof ContextMenuPrimitive.Root>): React.JSX.Element;
9
+ export declare function ContextMenuTrigger(props: React.ComponentProps<typeof ContextMenuPrimitive.Trigger>): React.JSX.Element;
10
+ export declare function ContextMenuContent({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Content>): React.JSX.Element;
11
+ export declare function ContextMenuGroup(props: React.ComponentProps<typeof ContextMenuPrimitive.Group>): React.JSX.Element;
12
+ export declare function ContextMenuItem({ className, variant, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Item> & {
13
+ variant?: "default" | "destructive";
14
+ }): React.JSX.Element;
15
+ export declare function ContextMenuLabel({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Label>): React.JSX.Element;
16
+ export declare function ContextMenuSeparator({ className, ...props }: React.ComponentProps<typeof ContextMenuPrimitive.Separator>): React.JSX.Element;
17
+ /** The item's keyboard shortcut, right-aligned. Decorative: the shortcut itself is the app's. */
18
+ export declare function ContextMenuShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
@@ -0,0 +1,34 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { ContextMenu as ContextMenuPrimitive } from "radix-ui";
4
+ import { cn } from "../lib/cn.js";
5
+ /**
6
+ * The right-click (and Shift+F10, and the context-menu key) menu. Every
7
+ * action in it must also be reachable another way: a toolbar button, a row
8
+ * menu or a shortcut, since touch and many keyboard users never open it.
9
+ */
10
+ export function ContextMenu(props) {
11
+ return _jsx(ContextMenuPrimitive.Root, { "data-slot": "context-menu", ...props });
12
+ }
13
+ export function ContextMenuTrigger(props) {
14
+ return _jsx(ContextMenuPrimitive.Trigger, { "data-slot": "context-menu-trigger", ...props });
15
+ }
16
+ export function ContextMenuContent({ className, ...props }) {
17
+ return (_jsx(ContextMenuPrimitive.Portal, { children: _jsx(ContextMenuPrimitive.Content, { "data-slot": "context-menu-content", className: cn("z-50 max-h-(--radix-context-menu-content-available-height) min-w-40 origin-(--radix-context-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 data-[state=open]:animate-cui-fade-in", className), ...props }) }));
18
+ }
19
+ export function ContextMenuGroup(props) {
20
+ return _jsx(ContextMenuPrimitive.Group, { "data-slot": "context-menu-group", ...props });
21
+ }
22
+ export function ContextMenuItem({ className, variant = "default", ...props }) {
23
+ return (_jsx(ContextMenuPrimitive.Item, { "data-slot": "context-menu-item", "data-variant": variant, className: cn("relative flex cursor-default items-center gap-1.5 rounded-lg px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 data-[variant=destructive]:text-danger-fg data-[variant=destructive]:focus:bg-danger/10 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props }));
24
+ }
25
+ export function ContextMenuLabel({ className, ...props }) {
26
+ return (_jsx(ContextMenuPrimitive.Label, { "data-slot": "context-menu-label", className: cn("px-1.5 py-1 text-xs font-medium text-muted-foreground", className), ...props }));
27
+ }
28
+ export function ContextMenuSeparator({ className, ...props }) {
29
+ return (_jsx(ContextMenuPrimitive.Separator, { "data-slot": "context-menu-separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
30
+ }
31
+ /** The item's keyboard shortcut, right-aligned. Decorative: the shortcut itself is the app's. */
32
+ export function ContextMenuShortcut({ className, ...props }) {
33
+ return (_jsx("span", { "data-slot": "context-menu-shortcut", "aria-hidden": true, className: cn("ml-auto pl-4 font-mono text-xs text-muted-foreground", className), ...props }));
34
+ }
@@ -0,0 +1,21 @@
1
+ import { Menubar as MenubarPrimitive } from "radix-ui";
2
+ import type * as React from "react";
3
+ /**
4
+ * A desktop-style menu bar (File, Edit, View) with the ARIA menubar pattern:
5
+ * one tab stop, Left and Right move between menus, Down or Enter opens one,
6
+ * and an open menu follows the pointer and the arrows to its neighbours.
7
+ * Tools with an IDE layout use it through the workbench's `MenuBar`.
8
+ */
9
+ export declare function Menubar({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Root>): React.JSX.Element;
10
+ export declare function MenubarMenu(props: React.ComponentProps<typeof MenubarPrimitive.Menu>): React.JSX.Element;
11
+ export declare function MenubarTrigger({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Trigger>): React.JSX.Element;
12
+ export declare function MenubarContent({ className, align, sideOffset, ...props }: React.ComponentProps<typeof MenubarPrimitive.Content>): React.JSX.Element;
13
+ export declare function MenubarGroup(props: React.ComponentProps<typeof MenubarPrimitive.Group>): React.JSX.Element;
14
+ export declare function MenubarItem({ className, variant, ...props }: React.ComponentProps<typeof MenubarPrimitive.Item> & {
15
+ variant?: "default" | "destructive";
16
+ }): React.JSX.Element;
17
+ export declare function MenubarCheckboxItem({ className, children, ...props }: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>): React.JSX.Element;
18
+ export declare function MenubarLabel({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Label>): React.JSX.Element;
19
+ export declare function MenubarSeparator({ className, ...props }: React.ComponentProps<typeof MenubarPrimitive.Separator>): React.JSX.Element;
20
+ /** The item's keyboard shortcut, right-aligned. Decorative: the shortcut itself is the app's. */
21
+ export declare function MenubarShortcut({ className, ...props }: React.ComponentProps<"span">): React.JSX.Element;
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { CheckIcon } from "lucide-react";
4
+ import { Menubar as MenubarPrimitive } from "radix-ui";
5
+ import { cn } from "../lib/cn.js";
6
+ /**
7
+ * A desktop-style menu bar (File, Edit, View) with the ARIA menubar pattern:
8
+ * one tab stop, Left and Right move between menus, Down or Enter opens one,
9
+ * and an open menu follows the pointer and the arrows to its neighbours.
10
+ * Tools with an IDE layout use it through the workbench's `MenuBar`.
11
+ */
12
+ export function Menubar({ className, ...props }) {
13
+ return (_jsx(MenubarPrimitive.Root, { "data-slot": "menubar", className: cn("flex items-center gap-0.5", className), ...props }));
14
+ }
15
+ export function MenubarMenu(props) {
16
+ return _jsx(MenubarPrimitive.Menu, { "data-slot": "menubar-menu", ...props });
17
+ }
18
+ export function MenubarTrigger({ className, ...props }) {
19
+ return (_jsx(MenubarPrimitive.Trigger, { "data-slot": "menubar-trigger", className: cn("flex items-center rounded-lg px-2 py-0.5 text-xs text-muted-foreground outline-hidden select-none hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring data-[state=open]:bg-accent data-[state=open]:text-accent-foreground", className), ...props }));
20
+ }
21
+ export function MenubarContent({ className, align = "start", sideOffset = 4, ...props }) {
22
+ return (_jsx(MenubarPrimitive.Portal, { children: _jsx(MenubarPrimitive.Content, { "data-slot": "menubar-content", align: align, sideOffset: sideOffset, className: cn("z-50 max-h-(--radix-menubar-content-available-height) min-w-48 origin-(--radix-menubar-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 data-[state=open]:animate-cui-fade-in", className), ...props }) }));
23
+ }
24
+ export function MenubarGroup(props) {
25
+ return _jsx(MenubarPrimitive.Group, { "data-slot": "menubar-group", ...props });
26
+ }
27
+ const itemClass = "relative flex cursor-default items-center gap-1.5 rounded-lg px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
28
+ export function MenubarItem({ className, variant = "default", ...props }) {
29
+ return (_jsx(MenubarPrimitive.Item, { "data-slot": "menubar-item", "data-variant": variant, className: cn(itemClass, "data-[variant=destructive]:text-danger-fg data-[variant=destructive]:focus:bg-danger/10", className), ...props }));
30
+ }
31
+ export function MenubarCheckboxItem({ className, children, ...props }) {
32
+ return (_jsxs(MenubarPrimitive.CheckboxItem, { "data-slot": "menubar-checkbox-item", className: cn(itemClass, "pr-8", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute right-2 flex items-center justify-center", children: _jsx(MenubarPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { "aria-hidden": true }) }) }), children] }));
33
+ }
34
+ export function MenubarLabel({ className, ...props }) {
35
+ return (_jsx(MenubarPrimitive.Label, { "data-slot": "menubar-label", className: cn("px-1.5 py-1 text-xs font-medium text-muted-foreground", className), ...props }));
36
+ }
37
+ export function MenubarSeparator({ className, ...props }) {
38
+ return (_jsx(MenubarPrimitive.Separator, { "data-slot": "menubar-separator", className: cn("-mx-1 my-1 h-px bg-border", className), ...props }));
39
+ }
40
+ /** The item's keyboard shortcut, right-aligned. Decorative: the shortcut itself is the app's. */
41
+ export function MenubarShortcut({ className, ...props }) {
42
+ return (_jsx("span", { "data-slot": "menubar-shortcut", "aria-hidden": true, className: cn("ml-auto pl-4 font-mono text-xs text-muted-foreground", className), ...props }));
43
+ }
@@ -0,0 +1,16 @@
1
+ import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
2
+ import type * as React from "react";
3
+ export interface ScrollAreaProps extends React.ComponentProps<typeof ScrollAreaPrimitive.Root> {
4
+ /**
5
+ * Names the scrolling region. Given, the viewport is a focusable region so
6
+ * a keyboard can scroll it; leave it out when the content has its own
7
+ * focusable items (a list of links, a tree).
8
+ */
9
+ label?: string;
10
+ /** Which bars to draw. Defaults to vertical. */
11
+ orientation?: "vertical" | "horizontal" | "both";
12
+ viewportClassName?: string;
13
+ }
14
+ /** A scrolling box with thin, token-coloured bars that look the same on every platform. */
15
+ export declare function ScrollArea({ className, viewportClassName, children, label, orientation, ...props }: ScrollAreaProps): React.JSX.Element;
16
+ export declare function ScrollBar({ className, orientation, ...props }: React.ComponentProps<typeof ScrollAreaPrimitive.ScrollAreaScrollbar>): React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { ScrollArea as ScrollAreaPrimitive } from "radix-ui";
4
+ import { cn } from "../lib/cn.js";
5
+ /** A scrolling box with thin, token-coloured bars that look the same on every platform. */
6
+ export function ScrollArea({ className, viewportClassName, children, label, orientation = "vertical", ...props }) {
7
+ return (_jsxs(ScrollAreaPrimitive.Root, { "data-slot": "scroll-area", className: cn("relative overflow-hidden", className), ...props, children: [_jsx(ScrollAreaPrimitive.Viewport, { "data-slot": "scroll-area-viewport", className: cn("size-full rounded-[inherit] outline-none focus-visible:ring-2 focus-visible:ring-ring/50", viewportClassName), ...(label ? { role: "region", "aria-label": label, tabIndex: 0 } : {}), children: children }), orientation !== "horizontal" && _jsx(ScrollBar, { orientation: "vertical" }), orientation !== "vertical" && _jsx(ScrollBar, { orientation: "horizontal" }), _jsx(ScrollAreaPrimitive.Corner, {})] }));
8
+ }
9
+ export function ScrollBar({ className, orientation = "vertical", ...props }) {
10
+ return (_jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, { "data-slot": "scroll-area-scrollbar", orientation: orientation, className: cn("flex touch-none p-px transition-colors select-none", orientation === "vertical" && "h-full w-2 border-l border-l-transparent", orientation === "horizontal" && "h-2 flex-col border-t border-t-transparent", className), ...props, children: _jsx(ScrollAreaPrimitive.ScrollAreaThumb, { "data-slot": "scroll-area-thumb", className: "relative flex-1 rounded-full bg-border hover:bg-muted-foreground/60" }) }));
11
+ }
@@ -0,0 +1,37 @@
1
+ import * as React from "react";
2
+ import type { StatusTone } from "../status/tones.js";
3
+ export interface ToastOptions {
4
+ /** Replaces the toast with the same id (an upload's progress, then its result). */
5
+ id?: string;
6
+ title: string;
7
+ description?: string;
8
+ /** A status tone for the dot beside the title. `error` toasts are announced assertively. */
9
+ tone?: StatusTone;
10
+ /** One follow-up action ("Undo", "View"). `altText` says how to reach it without the toast. */
11
+ action?: {
12
+ label: string;
13
+ altText: string;
14
+ onClick: () => void;
15
+ };
16
+ /** Milliseconds before it closes itself. Defaults to the provider's (5s); `Infinity` keeps it. */
17
+ duration?: number;
18
+ }
19
+ export interface ToastApi {
20
+ /** Shows a toast and returns its id. */
21
+ toast: (options: ToastOptions) => string;
22
+ dismiss: (id: string) => void;
23
+ }
24
+ export interface ToastProviderProps {
25
+ children: React.ReactNode;
26
+ /** Defaults to 5000. */
27
+ duration?: number;
28
+ className?: string;
29
+ }
30
+ /**
31
+ * Transient notices, bottom right, on Radix Toast: they pause on hover and
32
+ * focus, F8 jumps to them, and swiping or Escape closes one. Wrap the app
33
+ * once and call `useToast().toast(...)` anywhere under it.
34
+ */
35
+ export declare function ToastProvider({ children, duration, className }: ToastProviderProps): React.JSX.Element;
36
+ /** The toast API of the nearest ToastProvider. Throws outside one, so a missing provider is loud. */
37
+ export declare function useToast(): ToastApi;
@@ -0,0 +1,43 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { XIcon } from "lucide-react";
4
+ import { Toast as ToastPrimitive } from "radix-ui";
5
+ import * as React from "react";
6
+ import { cn } from "../lib/cn.js";
7
+ import { useUI } from "../provider/UIProvider.js";
8
+ import { StatusDot } from "../status/StatusDot.js";
9
+ const ToastContext = React.createContext(null);
10
+ /**
11
+ * Transient notices, bottom right, on Radix Toast: they pause on hover and
12
+ * focus, F8 jumps to them, and swiping or Escape closes one. Wrap the app
13
+ * once and call `useToast().toast(...)` anywhere under it.
14
+ */
15
+ export function ToastProvider({ children, duration = 5000, className }) {
16
+ const { messages } = useUI();
17
+ const [toasts, setToasts] = React.useState([]);
18
+ const counter = React.useRef(0);
19
+ const api = React.useMemo(() => ({
20
+ toast: (options) => {
21
+ const id = options.id ?? `toast-${++counter.current}`;
22
+ setToasts((list) => {
23
+ const entry = { ...options, id };
24
+ return list.some((t) => t.id === id)
25
+ ? list.map((t) => (t.id === id ? entry : t))
26
+ : [...list, entry];
27
+ });
28
+ return id;
29
+ },
30
+ dismiss: (id) => setToasts((list) => list.filter((t) => t.id !== id)),
31
+ }), []);
32
+ return (_jsx(ToastContext.Provider, { value: api, children: _jsxs(ToastPrimitive.Provider, { duration: duration, label: messages.toast.region, children: [children, toasts.map((t) => (_jsxs(ToastPrimitive.Root, { "data-slot": "toast", "data-tone": t.tone, open: true, duration: t.duration, type: t.tone === "error" ? "foreground" : "background", onOpenChange: (open) => {
33
+ if (!open)
34
+ api.dismiss(t.id);
35
+ }, className: "pointer-events-auto relative flex w-full items-start gap-2.5 rounded-lg bg-popover p-3 pr-9 text-sm text-popover-foreground shadow-md ring-1 ring-foreground/10 data-[state=open]:animate-cui-fade-in data-[swipe=end]:translate-x-(--radix-toast-swipe-end-x) data-[swipe=move]:translate-x-(--radix-toast-swipe-move-x)", children: [t.tone && _jsx(StatusDot, { tone: t.tone, className: "mt-1.5" }), _jsxs("div", { className: "flex min-w-0 flex-1 flex-col gap-0.5", children: [_jsx(ToastPrimitive.Title, { className: "font-medium [overflow-wrap:anywhere]", children: t.title }), t.description && (_jsx(ToastPrimitive.Description, { className: "[overflow-wrap:anywhere] text-muted-foreground", children: t.description })), t.action && (_jsx(ToastPrimitive.Action, { altText: t.action.altText, onClick: t.action.onClick, className: "mt-1 w-fit rounded-lg text-sm font-medium text-primary underline-offset-4 outline-none hover:underline focus-visible:ring-2 focus-visible:ring-ring/50", children: t.action.label }))] }), _jsx(ToastPrimitive.Close, { "aria-label": messages.toast.close, className: "absolute top-2 right-2 inline-flex size-6 items-center justify-center rounded-lg text-muted-foreground outline-none hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring/50", children: _jsx(XIcon, { className: "size-3.5", "aria-hidden": true }) })] }, t.id))), _jsx(ToastPrimitive.Viewport, { "data-slot": "toast-viewport", className: cn("fixed right-0 bottom-0 z-50 m-0 flex w-full max-w-sm list-none flex-col gap-2 p-4 outline-none", className) })] }) }));
36
+ }
37
+ /** The toast API of the nearest ToastProvider. Throws outside one, so a missing provider is loud. */
38
+ export function useToast() {
39
+ const api = React.useContext(ToastContext);
40
+ if (!api)
41
+ throw new Error("useToast needs a ToastProvider above it");
42
+ return api;
43
+ }
@@ -0,0 +1,16 @@
1
+ import { Tooltip as TooltipPrimitive } from "radix-ui";
2
+ import type * as React from "react";
3
+ /**
4
+ * Shares one open delay across the tooltips under it. A Tooltip outside a
5
+ * provider makes its own, so the provider is optional; an app with many
6
+ * icon buttons wraps its shell once.
7
+ */
8
+ export declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): React.JSX.Element;
9
+ /**
10
+ * A short hint on hover and keyboard focus. It names nothing: an icon-only
11
+ * control still needs its own `aria-label`; the tooltip repeats it for
12
+ * sighted pointer users.
13
+ */
14
+ export declare function Tooltip(props: React.ComponentProps<typeof TooltipPrimitive.Root>): React.JSX.Element;
15
+ export declare function TooltipTrigger(props: React.ComponentProps<typeof TooltipPrimitive.Trigger>): React.JSX.Element;
16
+ export declare function TooltipContent({ className, sideOffset, children, ...props }: React.ComponentProps<typeof TooltipPrimitive.Content>): React.JSX.Element;
@@ -0,0 +1,26 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Tooltip as TooltipPrimitive } from "radix-ui";
4
+ import { cn } from "../lib/cn.js";
5
+ /**
6
+ * Shares one open delay across the tooltips under it. A Tooltip outside a
7
+ * provider makes its own, so the provider is optional; an app with many
8
+ * icon buttons wraps its shell once.
9
+ */
10
+ export function TooltipProvider({ delayDuration = 300, ...props }) {
11
+ return (_jsx(TooltipPrimitive.Provider, { "data-slot": "tooltip-provider", delayDuration: delayDuration, ...props }));
12
+ }
13
+ /**
14
+ * A short hint on hover and keyboard focus. It names nothing: an icon-only
15
+ * control still needs its own `aria-label`; the tooltip repeats it for
16
+ * sighted pointer users.
17
+ */
18
+ export function Tooltip(props) {
19
+ return (_jsx(TooltipProvider, { children: _jsx(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) }));
20
+ }
21
+ export function TooltipTrigger(props) {
22
+ return _jsx(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
23
+ }
24
+ export function TooltipContent({ className, sideOffset = 4, children, ...props }) {
25
+ return (_jsx(TooltipPrimitive.Portal, { children: _jsx(TooltipPrimitive.Content, { "data-slot": "tooltip-content", sideOffset: sideOffset, className: cn("z-50 w-fit max-w-xs origin-(--radix-tooltip-content-transform-origin) rounded-lg bg-foreground px-2 py-1 text-xs text-balance text-background data-[state=delayed-open]:animate-cui-fade-in", className), ...props, children: children }) }));
26
+ }
@@ -1,6 +1,10 @@
1
1
  import type { ProductTheme } from "../appearance/product.js";
2
2
  import type { ChatRole, ChatRunStatus, ChatToolCallStatus } from "../chat/model.js";
3
+ import type { CopyFormat as GridCopyFormat, ExportFormat as GridExportFormat } from "../workbench/grid-format.js";
4
+ import type { ColumnType as GridColumnType } from "../workbench/grid-model.js";
5
+ import type { UploadState } from "../workbench/model.js";
3
6
  import type { WorkflowQuestionState } from "../workflow/question.js";
7
+ import type { WorkflowRuntimeState } from "../workflow/runtime-controls.js";
4
8
  import type { WorkflowAction, WorkflowAvailability, WorkflowScope, WorkflowStatus } from "../workflow/model.js";
5
9
  import type { ArtifactStatus, GateStatus, ReviewDecision, ReviewVerdict, RunStageStatus } from "../workflow/run.js";
6
10
  import type { WorkflowConnectReason, WorkflowFlowNameProblem, WorkflowNode, WorkflowNodeKind, WorkflowSelector } from "../workflow/definition.js";
@@ -23,6 +27,21 @@ import type { WorkflowReadError } from "../workflow/portable.js";
23
27
  * it (plurals, numbers, word order).
24
28
  */
25
29
  export interface Messages {
30
+ workflowRuntime: {
31
+ title: string;
32
+ state: (state: WorkflowRuntimeState) => string;
33
+ description: (state: WorkflowRuntimeState) => string;
34
+ loading: string;
35
+ empty: string;
36
+ readOnly: string;
37
+ pause: string;
38
+ resume: string;
39
+ refresh: string;
40
+ steering: string;
41
+ steeringHint: string;
42
+ invalidSteering: string;
43
+ send: string;
44
+ };
26
45
  workflowQuestion: {
27
46
  title: string;
28
47
  worker: (worker: string) => string;
@@ -103,6 +122,196 @@ export interface Messages {
103
122
  dialog: {
104
123
  close: string;
105
124
  };
125
+ workbench: {
126
+ /** The file browser's name. */
127
+ files: string;
128
+ /** The folder tree's name. */
129
+ folders: string;
130
+ /** The root directory in the breadcrumb. */
131
+ root: string;
132
+ /** The breadcrumb's landmark name. */
133
+ location: string;
134
+ /** A listing's accessible name: "Files in reports". */
135
+ filesIn: (folder: string) => string;
136
+ view: string;
137
+ listView: string;
138
+ gridView: string;
139
+ name: string;
140
+ size: string;
141
+ modified: string;
142
+ /** Read for a folder's or an unknown size's dash. */
143
+ noSize: string;
144
+ loading: string;
145
+ loadFailed: string;
146
+ retry: string;
147
+ /** A tree folder whose children failed to load; activating it retries. */
148
+ retryFolder: string;
149
+ empty: string;
150
+ emptyDescription: string;
151
+ noFolders: string;
152
+ itemCount: (count: number) => string;
153
+ selected: (count: number) => string;
154
+ /** The overlay while files from the desktop hover over the browser. */
155
+ dropToUpload: string;
156
+ dropHere: string;
157
+ browse: string;
158
+ maxSize: (size: string) => string;
159
+ /** The upload list's name. */
160
+ uploads: string;
161
+ uploading: (count: number) => string;
162
+ uploadsDone: string;
163
+ uploadState: (state: UploadState) => string;
164
+ cancelUpload: (name: string) => string;
165
+ dismissUpload: (name: string) => string;
166
+ previewOf: (name: string) => string;
167
+ previewLoading: string;
168
+ previewFailed: string;
169
+ noPreview: string;
170
+ closePreview: string;
171
+ /** A text preview's scrolling region. */
172
+ contentsOf: (name: string) => string;
173
+ /** A truncated preview: "Showing 100 of 4,210 rows". */
174
+ showing: (shown: number, total: number | null) => string;
175
+ partial: string;
176
+ /** A CSV column with no header. */
177
+ column: (index: number) => string;
178
+ noRows: string;
179
+ /** The menu bar's name. */
180
+ menuBar: string;
181
+ /** The activity bar's name. */
182
+ activityBar: string;
183
+ /** The editor tab strip's name. */
184
+ openEditors: string;
185
+ /** Spoken after a tab's title when it has unsaved changes. */
186
+ unsaved: string;
187
+ closeTab: (title: string) => string;
188
+ /** The overflow menu that lists every open tab. */
189
+ allTabs: (count: number) => string;
190
+ /** A resize handle's name: "Resize Explorer". */
191
+ resize: (pane: string) => string;
192
+ maximizePanel: string;
193
+ restorePanel: string;
194
+ closePanel: string;
195
+ /** The status bar's landmark name. */
196
+ statusBar: string;
197
+ commandPalette: string;
198
+ searchCommands: string;
199
+ noCommands: string;
200
+ commandsLoading: string;
201
+ /** The palette's group for entries the person ran lately. */
202
+ recent: string;
203
+ keyboardShortcuts: string;
204
+ keyboardShortcutsDescription: string;
205
+ /** Spoken between the keys of a chord: "Control plus K". */
206
+ keyJoin: string;
207
+ /** The shell's panes, for their resize handles. */
208
+ sideBar: string;
209
+ editor: string;
210
+ panel: string;
211
+ secondarySideBar: string;
212
+ /** The grid's name when the host gives none. */
213
+ gridLabel: string;
214
+ /** "1,204 rows", or "12 of 1,204 rows" while a filter is on. */
215
+ gridRows: (shown: number, total: number) => string;
216
+ gridColumns: (count: number) => string;
217
+ gridFilter: string;
218
+ gridClearFilter: string;
219
+ /** The button that shows hidden columns again. */
220
+ gridHidden: (count: number) => string;
221
+ gridSelected: (count: number) => string;
222
+ gridSelectAll: string;
223
+ gridExport: string;
224
+ gridExportScope: (rows: number, columns: number) => string;
225
+ gridExportFormat: (format: GridExportFormat) => string;
226
+ gridSortBy: (column: string) => string;
227
+ gridSortAscending: string;
228
+ gridSortDescending: string;
229
+ gridClearSort: string;
230
+ gridColumnMenu: (column: string) => string;
231
+ /** Null while no cell of the column is active. */
232
+ gridFilterByValue: (value: string | null) => string;
233
+ gridHideColumn: string;
234
+ gridShowAllColumns: (hidden: number) => string;
235
+ gridCopyColumnName: string;
236
+ gridResizeColumn: (column: string) => string;
237
+ gridType: (type: GridColumnType) => string;
238
+ gridPrimaryKey: string;
239
+ gridForeignKey: (references: string | null) => string;
240
+ gridNullable: string;
241
+ gridNotNull: string;
242
+ gridNull: string;
243
+ gridEmptyText: string;
244
+ gridBinary: (bytes: number) => string;
245
+ gridNoRows: string;
246
+ gridNoMatches: string;
247
+ gridLoading: string;
248
+ gridLoadFailed: string;
249
+ gridCopy: string;
250
+ gridCopyWithHeaders: string;
251
+ gridCopyAs: string;
252
+ gridCopyFormat: (format: GridCopyFormat) => string;
253
+ gridRowDetail: string;
254
+ gridCellDetail: string;
255
+ gridClearSelection: string;
256
+ /** The statistics bar's name. */
257
+ gridStatistics: string;
258
+ gridStat: (stat: "rows" | "nulls" | "distinct" | "min" | "max" | "avg" | "sum") => string;
259
+ gridNoNumeric: string;
260
+ /** A result the server capped: total known, or only that more exist. */
261
+ gridTruncated: (shown: number, total: number | null) => string;
262
+ gridCharacters: (count: number) => string;
263
+ gridBytes: (count: number, truncated: boolean) => string;
264
+ gridDownload: string;
265
+ gridCopied: string;
266
+ gridCopyValue: string;
267
+ gridRowOf: (row: number, total: number) => string;
268
+ gridPreviousRow: string;
269
+ gridNextRow: string;
270
+ gridCopyRow: string;
271
+ gridAddRow: string;
272
+ gridDeleteRows: (count: number) => string;
273
+ gridDuplicateRow: string;
274
+ gridRevertRow: string;
275
+ gridEditCell: (column: string) => string;
276
+ /** Spoken with a changed row's number. */
277
+ gridRowState: (state: "added" | "modified" | "deleted") => string;
278
+ /** The pending changes bar's name. */
279
+ gridPendingChanges: string;
280
+ gridPendingSummary: (inserts: number, updates: number, deletes: number) => string;
281
+ gridCommit: string;
282
+ gridCommitting: string;
283
+ gridDiscard: string;
284
+ /** Nothing was written; `row` is the 1-based row the host reported, when it did. */
285
+ gridCommitFailed: (message: string, row: number | null) => string;
286
+ gridNoPrimaryKey: string;
287
+ profileLabel: string;
288
+ profileSummary: (rows: number, columns: number, nulls: number) => string;
289
+ profileKind: (kind: "numeric" | "text" | "boolean" | "date" | "null") => string;
290
+ profileComplete: (share: number) => string;
291
+ profileMean: string;
292
+ profileMedian: string;
293
+ profileTopValues: string;
294
+ profileNoData: string;
295
+ /** The client capped what it profiled or charted: "Profiling the first 10,000 of 50,000 rows". */
296
+ profileCap: (cap: number, fetched: number) => string;
297
+ chartLabel: string;
298
+ chartType: string;
299
+ chartKind: (kind: "bar" | "line" | "area" | "scatter" | "pie") => string;
300
+ chartX: string;
301
+ chartY: string;
302
+ chartPickY: string;
303
+ chartNoData: string;
304
+ chartLoading: string;
305
+ chartLoadFailed: string;
306
+ chartCap: (cap: number, fetched: number) => string;
307
+ /** The code editor while Monaco loads. */
308
+ editorLoading: string;
309
+ };
310
+ toast: {
311
+ /** The notifications region; Radix fills `{hotkey}` with the shortcut that focuses it. */
312
+ region: string;
313
+ close: string;
314
+ };
106
315
  confirm: {
107
316
  confirm: string;
108
317
  cancel: string;
@@ -615,6 +824,14 @@ export interface Messages {
615
824
  waitingOnYou: string;
616
825
  /** The shortcut as people read it, from the key list ("⌘/", "Ctrl+/"). */
617
826
  shortcut: (keys: string) => string;
827
+ /** A question from the agent that is not a tool call. */
828
+ interrupt: string;
829
+ decline: string;
830
+ back: string;
831
+ /** Answers an artifact's form review. */
832
+ sendReview: string;
833
+ /** The shared state's section. */
834
+ sharedState: string;
618
835
  };
619
836
  }
620
837
  export declare const defaultMessages: Messages;