@flanksource/clicky-ui 0.2.21 → 0.3.1
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/dist/components/Combobox.cjs +5 -2
- package/dist/components/Combobox.cjs.map +1 -1
- package/dist/components/Combobox.d.ts.map +1 -1
- package/dist/components/Combobox.js +5 -2
- package/dist/components/Combobox.js.map +1 -1
- package/dist/components/FilterBar.cjs +280 -253
- package/dist/components/FilterBar.cjs.map +1 -1
- package/dist/components/FilterBar.d.ts.map +1 -1
- package/dist/components/FilterBar.js +280 -253
- package/dist/components/FilterBar.js.map +1 -1
- package/dist/components/JsonSchemaForm.cjs +3 -1
- package/dist/components/JsonSchemaForm.cjs.map +1 -1
- package/dist/components/JsonSchemaForm.d.ts.map +1 -1
- package/dist/components/JsonSchemaForm.js +4 -2
- package/dist/components/JsonSchemaForm.js.map +1 -1
- package/dist/components/MultiSelect.cjs +29 -32
- package/dist/components/MultiSelect.cjs.map +1 -1
- package/dist/components/MultiSelect.d.ts.map +1 -1
- package/dist/components/MultiSelect.js +30 -33
- package/dist/components/MultiSelect.js.map +1 -1
- package/dist/components/TimeRange.cjs +29 -37
- package/dist/components/TimeRange.cjs.map +1 -1
- package/dist/components/TimeRange.d.ts.map +1 -1
- package/dist/components/TimeRange.js +30 -38
- package/dist/components/TimeRange.js.map +1 -1
- package/dist/components/TreePickerField.cjs +6 -3
- package/dist/components/TreePickerField.cjs.map +1 -1
- package/dist/components/TreePickerField.d.ts.map +1 -1
- package/dist/components/TreePickerField.js +6 -3
- package/dist/components/TreePickerField.js.map +1 -1
- package/dist/components/icon-menu-picker.cjs +9 -3
- package/dist/components/icon-menu-picker.cjs.map +1 -1
- package/dist/components/icon-menu-picker.d.ts.map +1 -1
- package/dist/components/icon-menu-picker.js +9 -3
- package/dist/components/icon-menu-picker.js.map +1 -1
- package/dist/components/json-schema-form-fields.cjs +80 -2
- package/dist/components/json-schema-form-fields.cjs.map +1 -1
- package/dist/components/json-schema-form-fields.d.ts +15 -0
- package/dist/components/json-schema-form-fields.d.ts.map +1 -1
- package/dist/components/json-schema-form-fields.js +81 -3
- package/dist/components/json-schema-form-fields.js.map +1 -1
- package/dist/components/json-schema-form-refs.cjs +60 -0
- package/dist/components/json-schema-form-refs.cjs.map +1 -0
- package/dist/components/json-schema-form-refs.d.ts +3 -0
- package/dist/components/json-schema-form-refs.d.ts.map +1 -0
- package/dist/components/json-schema-form-refs.js +60 -0
- package/dist/components/json-schema-form-refs.js.map +1 -0
- package/dist/components/json-schema-form-render.cjs +14 -2
- package/dist/components/json-schema-form-render.cjs.map +1 -1
- package/dist/components/json-schema-form-render.d.ts.map +1 -1
- package/dist/components/json-schema-form-render.js +15 -3
- package/dist/components/json-schema-form-render.js.map +1 -1
- package/dist/components/json-schema-form-resolve.cjs +5 -0
- package/dist/components/json-schema-form-resolve.cjs.map +1 -1
- package/dist/components/json-schema-form-resolve.d.ts.map +1 -1
- package/dist/components/json-schema-form-resolve.js +5 -0
- package/dist/components/json-schema-form-resolve.js.map +1 -1
- package/dist/components/json-schema-form-template-menu.cjs +83 -0
- package/dist/components/json-schema-form-template-menu.cjs.map +1 -0
- package/dist/components/json-schema-form-template-menu.d.ts +15 -0
- package/dist/components/json-schema-form-template-menu.d.ts.map +1 -0
- package/dist/components/json-schema-form-template-menu.js +83 -0
- package/dist/components/json-schema-form-template-menu.js.map +1 -0
- package/dist/components/json-schema-form-template.cjs +18 -0
- package/dist/components/json-schema-form-template.cjs.map +1 -0
- package/dist/components/json-schema-form-template.d.ts +13 -0
- package/dist/components/json-schema-form-template.d.ts.map +1 -0
- package/dist/components/json-schema-form-template.js +18 -0
- package/dist/components/json-schema-form-template.js.map +1 -0
- package/dist/components/json-schema-form-types.d.ts +5 -1
- package/dist/components/json-schema-form-types.d.ts.map +1 -1
- package/dist/components.cjs +4 -0
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.ts +3 -0
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +4 -0
- package/dist/components.js.map +1 -1
- package/dist/data/Clicky.cjs +6 -9
- package/dist/data/Clicky.cjs.map +1 -1
- package/dist/data/Clicky.d.ts.map +1 -1
- package/dist/data/Clicky.js +6 -9
- package/dist/data/Clicky.js.map +1 -1
- package/dist/data/DataTable.cjs +23 -17
- package/dist/data/DataTable.cjs.map +1 -1
- package/dist/data/DataTable.d.ts +7 -1
- package/dist/data/DataTable.d.ts.map +1 -1
- package/dist/data/DataTable.js +24 -18
- package/dist/data/DataTable.js.map +1 -1
- package/dist/data/Gauge.cjs +37 -4
- package/dist/data/Gauge.cjs.map +1 -1
- package/dist/data/Gauge.d.ts +6 -1
- package/dist/data/Gauge.d.ts.map +1 -1
- package/dist/data/Gauge.js +37 -4
- package/dist/data/Gauge.js.map +1 -1
- package/dist/data/TimeseriesCoreBars.cjs +127 -29
- package/dist/data/TimeseriesCoreBars.cjs.map +1 -1
- package/dist/data/TimeseriesCoreBars.d.ts +11 -1
- package/dist/data/TimeseriesCoreBars.d.ts.map +1 -1
- package/dist/data/TimeseriesCoreBars.js +128 -30
- package/dist/data/TimeseriesCoreBars.js.map +1 -1
- package/dist/data/TimeseriesGauge.cjs +105 -47
- package/dist/data/TimeseriesGauge.cjs.map +1 -1
- package/dist/data/TimeseriesGauge.d.ts +6 -1
- package/dist/data/TimeseriesGauge.d.ts.map +1 -1
- package/dist/data/TimeseriesGauge.js +105 -47
- package/dist/data/TimeseriesGauge.js.map +1 -1
- package/dist/data/WorkloadCard.cjs +371 -0
- package/dist/data/WorkloadCard.cjs.map +1 -0
- package/dist/data/WorkloadCard.d.ts +24 -0
- package/dist/data/WorkloadCard.d.ts.map +1 -0
- package/dist/data/WorkloadCard.js +371 -0
- package/dist/data/WorkloadCard.js.map +1 -0
- package/dist/data/WorkloadCard.model.cjs +51 -0
- package/dist/data/WorkloadCard.model.cjs.map +1 -0
- package/dist/data/WorkloadCard.model.d.ts +53 -0
- package/dist/data/WorkloadCard.model.d.ts.map +1 -0
- package/dist/data/WorkloadCard.model.js +51 -0
- package/dist/data/WorkloadCard.model.js.map +1 -0
- package/dist/data/ai/ChatFab.cjs +3 -1
- package/dist/data/ai/ChatFab.cjs.map +1 -1
- package/dist/data/ai/ChatFab.d.ts.map +1 -1
- package/dist/data/ai/ChatFab.js +3 -1
- package/dist/data/ai/ChatFab.js.map +1 -1
- package/dist/data/ai/ChatWindow.cjs +25 -7
- package/dist/data/ai/ChatWindow.cjs.map +1 -1
- package/dist/data/ai/ChatWindow.d.ts +11 -3
- package/dist/data/ai/ChatWindow.d.ts.map +1 -1
- package/dist/data/ai/ChatWindow.js +26 -8
- package/dist/data/ai/ChatWindow.js.map +1 -1
- package/dist/data/ai/chat-window-context.cjs +2 -1
- package/dist/data/ai/chat-window-context.cjs.map +1 -1
- package/dist/data/ai/chat-window-context.d.ts +1 -1
- package/dist/data/ai/chat-window-context.d.ts.map +1 -1
- package/dist/data/ai/chat-window-context.js +2 -1
- package/dist/data/ai/chat-window-context.js.map +1 -1
- package/dist/data/ai/context.cjs.map +1 -1
- package/dist/data/ai/context.d.ts +3 -0
- package/dist/data/ai/context.d.ts.map +1 -1
- package/dist/data/ai/context.js.map +1 -1
- package/dist/data/chat/Chat.cjs +9 -1
- package/dist/data/chat/Chat.cjs.map +1 -1
- package/dist/data/chat/Chat.d.ts +4 -2
- package/dist/data/chat/Chat.d.ts.map +1 -1
- package/dist/data/chat/Chat.js +10 -2
- package/dist/data/chat/Chat.js.map +1 -1
- package/dist/data/chat/Message.cjs +13 -4
- package/dist/data/chat/Message.cjs.map +1 -1
- package/dist/data/chat/Message.d.ts +4 -2
- package/dist/data/chat/Message.d.ts.map +1 -1
- package/dist/data/chat/Message.js +13 -4
- package/dist/data/chat/Message.js.map +1 -1
- package/dist/data/chat/ToolCall.cjs +9 -4
- package/dist/data/chat/ToolCall.cjs.map +1 -1
- package/dist/data/chat/ToolCall.d.ts +3 -2
- package/dist/data/chat/ToolCall.d.ts.map +1 -1
- package/dist/data/chat/ToolCall.js +9 -4
- package/dist/data/chat/ToolCall.js.map +1 -1
- package/dist/data/chat/index.d.ts +1 -1
- package/dist/data/chat/index.d.ts.map +1 -1
- package/dist/data/chat/types.cjs.map +1 -1
- package/dist/data/chat/types.d.ts +7 -0
- package/dist/data/chat/types.d.ts.map +1 -1
- package/dist/data/chat/types.js.map +1 -1
- package/dist/data/version-info.cjs +2 -2
- package/dist/data/version-info.js +2 -2
- package/dist/data.cjs +7 -0
- package/dist/data.cjs.map +1 -1
- package/dist/data.d.ts +5 -3
- package/dist/data.d.ts.map +1 -1
- package/dist/data.js +8 -1
- package/dist/data.js.map +1 -1
- package/dist/hooks/use-sort.cjs +19 -10
- package/dist/hooks/use-sort.cjs.map +1 -1
- package/dist/hooks/use-sort.d.ts +3 -0
- package/dist/hooks/use-sort.d.ts.map +1 -1
- package/dist/hooks/use-sort.js +19 -10
- package/dist/hooks/use-sort.js.map +1 -1
- package/dist/index.cjs +11 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/layout/AppShell.cjs +6 -10
- package/dist/layout/AppShell.cjs.map +1 -1
- package/dist/layout/AppShell.d.ts +2 -0
- package/dist/layout/AppShell.d.ts.map +1 -1
- package/dist/layout/AppShell.js +6 -10
- package/dist/layout/AppShell.js.map +1 -1
- package/dist/overlay/DropdownMenu.cjs +50 -38
- package/dist/overlay/DropdownMenu.cjs.map +1 -1
- package/dist/overlay/DropdownMenu.d.ts +5 -1
- package/dist/overlay/DropdownMenu.d.ts.map +1 -1
- package/dist/overlay/DropdownMenu.js +50 -38
- package/dist/overlay/DropdownMenu.js.map +1 -1
- package/dist/overlay/HoverCard.cjs +7 -2
- package/dist/overlay/HoverCard.cjs.map +1 -1
- package/dist/overlay/HoverCard.d.ts.map +1 -1
- package/dist/overlay/HoverCard.js +7 -2
- package/dist/overlay/HoverCard.js.map +1 -1
- package/dist/overlay/Modal.cjs +20 -17
- package/dist/overlay/Modal.cjs.map +1 -1
- package/dist/overlay/Modal.d.ts.map +1 -1
- package/dist/overlay/Modal.js +21 -18
- package/dist/overlay/Modal.js.map +1 -1
- package/dist/overlay/Toast.cjs +9 -1
- package/dist/overlay/Toast.cjs.map +1 -1
- package/dist/overlay/Toast.d.ts.map +1 -1
- package/dist/overlay/Toast.js +9 -1
- package/dist/overlay/Toast.js.map +1 -1
- package/dist/overlay/modalStack.cjs +53 -1
- package/dist/overlay/modalStack.cjs.map +1 -1
- package/dist/overlay/modalStack.d.ts +12 -0
- package/dist/overlay/modalStack.d.ts.map +1 -1
- package/dist/overlay/modalStack.js +54 -2
- package/dist/overlay/modalStack.js.map +1 -1
- package/dist/overlay/zIndex.cjs +20 -0
- package/dist/overlay/zIndex.cjs.map +1 -0
- package/dist/overlay/zIndex.d.ts +39 -0
- package/dist/overlay/zIndex.d.ts.map +1 -0
- package/dist/overlay/zIndex.js +20 -0
- package/dist/overlay/zIndex.js.map +1 -0
- package/dist/rpc/AcceptPicker.cjs +28 -26
- package/dist/rpc/AcceptPicker.cjs.map +1 -1
- package/dist/rpc/AcceptPicker.d.ts.map +1 -1
- package/dist/rpc/AcceptPicker.js +29 -27
- package/dist/rpc/AcceptPicker.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -29,7 +29,7 @@ const STATUS_ICON = {
|
|
|
29
29
|
"output-denied": { icon: UiCircleX, className: "text-orange-600" },
|
|
30
30
|
"output-error": { icon: UiCircleX, className: "text-destructive" }
|
|
31
31
|
};
|
|
32
|
-
function ToolCall({ part, defaultOpen = false, onApprove, className }) {
|
|
32
|
+
function ToolCall({ part, defaultOpen = false, onApprove, renderToolResult, className }) {
|
|
33
33
|
const needsApproval = part.state === "approval-requested";
|
|
34
34
|
const [open, setOpen] = useState(defaultOpen || needsApproval);
|
|
35
35
|
const status = STATUS_ICON[part.state];
|
|
@@ -67,7 +67,7 @@ function ToolCall({ part, defaultOpen = false, onApprove, className }) {
|
|
|
67
67
|
),
|
|
68
68
|
open && /* @__PURE__ */ jsxs("div", { className: "space-y-1 pl-4 pt-0.5", children: [
|
|
69
69
|
/* @__PURE__ */ jsx(ToolInput, { input: part.input }),
|
|
70
|
-
/* @__PURE__ */ jsx(ToolOutput, { part })
|
|
70
|
+
/* @__PURE__ */ jsx(ToolOutput, { part, ...renderToolResult ? { renderToolResult } : {} })
|
|
71
71
|
] }),
|
|
72
72
|
needsApproval && /* @__PURE__ */ jsx(ApprovalControls, { part, onApprove })
|
|
73
73
|
] });
|
|
@@ -98,15 +98,20 @@ function ToolInput({ input }) {
|
|
|
98
98
|
}
|
|
99
99
|
return /* @__PURE__ */ jsx("div", { className: "overflow-hidden text-xs", children: /* @__PURE__ */ jsx(CodeBlock, { language: "json", source: JSON.stringify(input, null, 2) }) });
|
|
100
100
|
}
|
|
101
|
-
function ToolOutput({
|
|
101
|
+
function ToolOutput({
|
|
102
|
+
part,
|
|
103
|
+
renderToolResult
|
|
104
|
+
}) {
|
|
102
105
|
const errorText = part.state === "output-error" ? part.errorText : void 0;
|
|
103
106
|
const output = part.state === "output-available" ? part.output : void 0;
|
|
104
107
|
if (output === void 0 && errorText === void 0) {
|
|
105
108
|
return null;
|
|
106
109
|
}
|
|
110
|
+
const name = toolPartName(part);
|
|
111
|
+
const custom = output !== void 0 ? renderToolResult == null ? void 0 : renderToolResult({ part, toolName: name, output }) : null;
|
|
107
112
|
return /* @__PURE__ */ jsxs("div", { className: cn("overflow-x-auto text-xs", errorText ? "text-destructive" : "text-muted-foreground"), children: [
|
|
108
113
|
errorText !== void 0 && /* @__PURE__ */ jsx("div", { children: errorText }),
|
|
109
|
-
output !== void 0 && /* @__PURE__ */ jsx(CodeBlock, { language: "json", source: typeof output === "string" ? output : JSON.stringify(output, null, 2) })
|
|
114
|
+
custom ?? (output !== void 0 && /* @__PURE__ */ jsx(CodeBlock, { language: "json", source: typeof output === "string" ? output : JSON.stringify(output, null, 2) }))
|
|
110
115
|
] });
|
|
111
116
|
}
|
|
112
117
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolCall.js","sources":["../../../src/data/chat/ToolCall.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"../../components/button\";\nimport { Icon, type StaticIconComponent } from \"../Icon\";\nimport { CodeBlock } from \"../CodeBlock\";\nimport {\n UiCheck,\n UiChevronDown,\n UiCircleOutline,\n UiCircleX,\n UiClock,\n UiWrench,\n} from \"../../icons\";\nimport type { AnyToolPart } from \"./types\";\nimport { toolPartName } from \"./types\";\n\nexport type ToolCallProps = {\n /** The tool part from an assistant message (typed or dynamic). */\n part: AnyToolPart;\n /** Whether the call body starts expanded. Defaults to false. */\n defaultOpen?: boolean;\n /** Respond to an approval request (only used when state is\n * `approval-requested`). Receives the approval id, the decision, and an\n * optional reason. */\n onApprove?: ((approvalId: string, approved: boolean, reason?: string) => void) | undefined;\n className?: string;\n};\n\ntype ToolState = AnyToolPart[\"state\"];\n\nconst STATUS_LABEL: Record<ToolState, string> = {\n \"approval-requested\": \"Awaiting approval\",\n \"approval-responded\": \"Responded\",\n \"input-streaming\": \"Pending\",\n \"input-available\": \"Running\",\n \"output-available\": \"Completed\",\n \"output-denied\": \"Denied\",\n \"output-error\": \"Error\",\n};\n\nconst STATUS_ICON: Record<ToolState, { icon: StaticIconComponent; className: string }> = {\n \"approval-requested\": { icon: UiClock, className: \"text-amber-600\" },\n \"approval-responded\": { icon: UiCheck, className: \"text-sky-600\" },\n \"input-streaming\": { icon: UiCircleOutline, className: \"text-muted-foreground\" },\n \"input-available\": { icon: UiClock, className: \"text-muted-foreground animate-pulse\" },\n \"output-available\": { icon: UiCheck, className: \"text-emerald-600\" },\n \"output-denied\": { icon: UiCircleX, className: \"text-orange-600\" },\n \"output-error\": { icon: UiCircleX, className: \"text-destructive\" },\n};\n\n/** Generic display of a single AI tool call: a collapsible header showing the\n * tool name + status, expanding to its JSON input and (once available) output\n * or error. Renders both clicky `dynamic-tool` parts and typed `tool-<name>`\n * parts, keyed off `part.state`. */\nexport function ToolCall({ part, defaultOpen = false, onApprove, className }: ToolCallProps) {\n const needsApproval = part.state === \"approval-requested\";\n const [open, setOpen] = useState(defaultOpen || needsApproval);\n const status = STATUS_ICON[part.state];\n const name = toolPartName(part);\n\n return (\n <div className={cn(\"not-prose mb-1 w-full\", className)}>\n <button\n type=\"button\"\n aria-expanded={open}\n onClick={() => setOpen((v) => !v)}\n className=\"flex w-full items-center justify-between gap-2 py-0.5 text-muted-foreground hover:text-foreground\"\n >\n <span className=\"flex min-w-0 items-center gap-1.5\">\n <Icon icon={UiWrench} className=\"size-3 shrink-0\" />\n <span className=\"truncate font-mono text-xs\">{name}</span>\n <Icon\n icon={status.icon}\n title={STATUS_LABEL[part.state]}\n className={cn(\"size-3 shrink-0\", status.className)}\n />\n </span>\n <Icon\n icon={UiChevronDown}\n className={cn(\"size-3 shrink-0 transition-transform\", open && \"rotate-180\")}\n />\n </button>\n\n {open && (\n <div className=\"space-y-1 pl-4 pt-0.5\">\n <ToolInput input={part.input} />\n <ToolOutput part={part} />\n </div>\n )}\n\n {needsApproval && <ApprovalControls part={part} onApprove={onApprove} />}\n </div>\n );\n}\n\n/** Approve/Deny controls shown while a tool call awaits human approval. The\n * approval id comes from the part's `approval` envelope (AI SDK v6). */\nfunction ApprovalControls({\n part,\n onApprove,\n}: {\n part: AnyToolPart;\n onApprove: ToolCallProps[\"onApprove\"];\n}) {\n const approval = \"approval\" in part ? part.approval : undefined;\n if (!approval || !onApprove) return null;\n return (\n <div className=\"mt-1.5 flex items-center gap-2 pl-4\">\n <Button type=\"button\" size=\"sm\" onClick={() => onApprove(approval.id, true)}>\n Approve\n </Button>\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n onClick={() => onApprove(approval.id, false)}\n >\n Deny\n </Button>\n </div>\n );\n}\n\nfunction ToolInput({ input }: { input: AnyToolPart[\"input\"] }) {\n if (input === undefined || input === null) {\n return null;\n }\n return (\n <div className=\"overflow-hidden text-xs\">\n <CodeBlock language=\"json\" source={JSON.stringify(input, null, 2)} />\n </div>\n );\n}\n\nfunction ToolOutput({
|
|
1
|
+
{"version":3,"file":"ToolCall.js","sources":["../../../src/data/chat/ToolCall.tsx"],"sourcesContent":["import { useState } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { Button } from \"../../components/button\";\nimport { Icon, type StaticIconComponent } from \"../Icon\";\nimport { CodeBlock } from \"../CodeBlock\";\nimport {\n UiCheck,\n UiChevronDown,\n UiCircleOutline,\n UiCircleX,\n UiClock,\n UiWrench,\n} from \"../../icons\";\nimport type { AnyToolPart, ToolResultRenderer } from \"./types\";\nimport { toolPartName } from \"./types\";\n\nexport type ToolCallProps = {\n /** The tool part from an assistant message (typed or dynamic). */\n part: AnyToolPart;\n /** Whether the call body starts expanded. Defaults to false. */\n defaultOpen?: boolean;\n /** Respond to an approval request (only used when state is\n * `approval-requested`). Receives the approval id, the decision, and an\n * optional reason. */\n onApprove?: ((approvalId: string, approved: boolean, reason?: string) => void) | undefined;\n renderToolResult?: ToolResultRenderer;\n className?: string;\n};\n\ntype ToolState = AnyToolPart[\"state\"];\n\nconst STATUS_LABEL: Record<ToolState, string> = {\n \"approval-requested\": \"Awaiting approval\",\n \"approval-responded\": \"Responded\",\n \"input-streaming\": \"Pending\",\n \"input-available\": \"Running\",\n \"output-available\": \"Completed\",\n \"output-denied\": \"Denied\",\n \"output-error\": \"Error\",\n};\n\nconst STATUS_ICON: Record<ToolState, { icon: StaticIconComponent; className: string }> = {\n \"approval-requested\": { icon: UiClock, className: \"text-amber-600\" },\n \"approval-responded\": { icon: UiCheck, className: \"text-sky-600\" },\n \"input-streaming\": { icon: UiCircleOutline, className: \"text-muted-foreground\" },\n \"input-available\": { icon: UiClock, className: \"text-muted-foreground animate-pulse\" },\n \"output-available\": { icon: UiCheck, className: \"text-emerald-600\" },\n \"output-denied\": { icon: UiCircleX, className: \"text-orange-600\" },\n \"output-error\": { icon: UiCircleX, className: \"text-destructive\" },\n};\n\n/** Generic display of a single AI tool call: a collapsible header showing the\n * tool name + status, expanding to its JSON input and (once available) output\n * or error. Renders both clicky `dynamic-tool` parts and typed `tool-<name>`\n * parts, keyed off `part.state`. */\nexport function ToolCall({ part, defaultOpen = false, onApprove, renderToolResult, className }: ToolCallProps) {\n const needsApproval = part.state === \"approval-requested\";\n const [open, setOpen] = useState(defaultOpen || needsApproval);\n const status = STATUS_ICON[part.state];\n const name = toolPartName(part);\n\n return (\n <div className={cn(\"not-prose mb-1 w-full\", className)}>\n <button\n type=\"button\"\n aria-expanded={open}\n onClick={() => setOpen((v) => !v)}\n className=\"flex w-full items-center justify-between gap-2 py-0.5 text-muted-foreground hover:text-foreground\"\n >\n <span className=\"flex min-w-0 items-center gap-1.5\">\n <Icon icon={UiWrench} className=\"size-3 shrink-0\" />\n <span className=\"truncate font-mono text-xs\">{name}</span>\n <Icon\n icon={status.icon}\n title={STATUS_LABEL[part.state]}\n className={cn(\"size-3 shrink-0\", status.className)}\n />\n </span>\n <Icon\n icon={UiChevronDown}\n className={cn(\"size-3 shrink-0 transition-transform\", open && \"rotate-180\")}\n />\n </button>\n\n {open && (\n <div className=\"space-y-1 pl-4 pt-0.5\">\n <ToolInput input={part.input} />\n <ToolOutput part={part} {...(renderToolResult ? { renderToolResult } : {})} />\n </div>\n )}\n\n {needsApproval && <ApprovalControls part={part} onApprove={onApprove} />}\n </div>\n );\n}\n\n/** Approve/Deny controls shown while a tool call awaits human approval. The\n * approval id comes from the part's `approval` envelope (AI SDK v6). */\nfunction ApprovalControls({\n part,\n onApprove,\n}: {\n part: AnyToolPart;\n onApprove: ToolCallProps[\"onApprove\"];\n}) {\n const approval = \"approval\" in part ? part.approval : undefined;\n if (!approval || !onApprove) return null;\n return (\n <div className=\"mt-1.5 flex items-center gap-2 pl-4\">\n <Button type=\"button\" size=\"sm\" onClick={() => onApprove(approval.id, true)}>\n Approve\n </Button>\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"outline\"\n onClick={() => onApprove(approval.id, false)}\n >\n Deny\n </Button>\n </div>\n );\n}\n\nfunction ToolInput({ input }: { input: AnyToolPart[\"input\"] }) {\n if (input === undefined || input === null) {\n return null;\n }\n return (\n <div className=\"overflow-hidden text-xs\">\n <CodeBlock language=\"json\" source={JSON.stringify(input, null, 2)} />\n </div>\n );\n}\n\nfunction ToolOutput({\n part,\n renderToolResult,\n}: {\n part: AnyToolPart;\n renderToolResult?: ToolResultRenderer | undefined;\n}) {\n const errorText = part.state === \"output-error\" ? part.errorText : undefined;\n const output = part.state === \"output-available\" ? part.output : undefined;\n if (output === undefined && errorText === undefined) {\n return null;\n }\n const name = toolPartName(part);\n const custom = output !== undefined ? renderToolResult?.({ part, toolName: name, output }) : null;\n return (\n <div className={cn(\"overflow-x-auto text-xs\", errorText ? \"text-destructive\" : \"text-muted-foreground\")}>\n {errorText !== undefined && <div>{errorText}</div>}\n {custom ?? (output !== undefined && (\n <CodeBlock language=\"json\" source={typeof output === \"string\" ? output : JSON.stringify(output, null, 2)} />\n ))}\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;AA+BA,MAAM,eAA0C;AAAA,EAC9C,sBAAsB;AAAA,EACtB,sBAAsB;AAAA,EACtB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EACnB,oBAAoB;AAAA,EACpB,iBAAiB;AAAA,EACjB,gBAAgB;AAClB;AAEA,MAAM,cAAmF;AAAA,EACvF,sBAAsB,EAAE,MAAM,SAAS,WAAW,iBAAA;AAAA,EAClD,sBAAsB,EAAE,MAAM,SAAS,WAAW,eAAA;AAAA,EAClD,mBAAmB,EAAE,MAAM,iBAAiB,WAAW,wBAAA;AAAA,EACvD,mBAAmB,EAAE,MAAM,SAAS,WAAW,sCAAA;AAAA,EAC/C,oBAAoB,EAAE,MAAM,SAAS,WAAW,mBAAA;AAAA,EAChD,iBAAiB,EAAE,MAAM,WAAW,WAAW,kBAAA;AAAA,EAC/C,gBAAgB,EAAE,MAAM,WAAW,WAAW,mBAAA;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AAU,UAAS,QAAO,QAAQ,OAAO,WAAW,WAAW,SAAS,KAAK,UAAU,QAAQ,MAAM,CAAC,GAAG;AAAA,EAAA,GAE9G;AAEJ;"}
|
|
@@ -12,5 +12,5 @@ export { ContextUsage, type ContextUsageProps } from './ContextUsage';
|
|
|
12
12
|
export { AttachmentButton, type AttachmentButtonProps, AttachmentList, type AttachmentListProps, } from './Attachment';
|
|
13
13
|
export { clickyOperationsToTools, operationToTool, } from './clickyOperationsToTools';
|
|
14
14
|
export { mockChatTransport, MOCK_MODELS } from './Chat.fixtures';
|
|
15
|
-
export { isDynamicToolPart, isTypedToolPart, isReasoningPart, isFilePart, toolPartName, suggestionLabel, suggestionPrompt, type AnyToolPart, type ChatModel, type ChatMessageMetadata, type ChatUsageSummary, type ChatStatus, type ChatToolInputSchema, type ToolMeta, type DynamicToolUIPart, type FileUIPart, type JSONSchemaProperty, type ReasoningUIPart, type Suggestion, type ToolUIPart, type UIMessage, } from './types';
|
|
15
|
+
export { isDynamicToolPart, isTypedToolPart, isReasoningPart, isFilePart, toolPartName, suggestionLabel, suggestionPrompt, type AnyToolPart, type ChatModel, type ChatMessageMetadata, type ChatUsageSummary, type ChatStatus, type ChatToolInputSchema, type ToolResultRenderArgs, type ToolResultRenderer, type ToolMeta, type DynamicToolUIPart, type FileUIPart, type JSONSchemaProperty, type ReasoningUIPart, type Suggestion, type ToolUIPart, type UIMessage, } from './types';
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/data/chat/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,KAAK,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACtE,OAAO,EAAE,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,qBAAqB,EAAE,MAAM,WA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ACd,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,QAAQ,EACb,KAAK,iBAAiB,EACtB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,SAAS,GACf,MAAM,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","sources":["../../../src/data/chat/types.ts"],"sourcesContent":["import type {\n UIMessage,\n ToolUIPart,\n DynamicToolUIPart,\n ChatStatus,\n ReasoningUIPart,\n FileUIPart,\n} from \"ai\";\n\nexport type { UIMessage, ToolUIPart, DynamicToolUIPart, ChatStatus, ReasoningUIPart, FileUIPart };\n\n/** A selectable chat model, as served by the backend's GET /api/chat/models.\n * `configured` is false for catalogued models whose provider has no API key. */\nexport interface ChatModel {\n id: string;\n provider: string;\n label: string;\n reasoning: boolean;\n configured?: boolean;\n /** Max context tokens — the denominator for a usage gauge. */\n contextWindow?: number;\n}\n\n/** Per-message metadata the backend rides on the SSE `finish` part\n * (`messageMetadata`), applied by the AI SDK to the assistant `UIMessage`. */\nexport interface ChatMessageMetadata {\n usage?: {\n inputTokens?: number;\n outputTokens?: number;\n totalTokens?: number;\n };\n /** This turn's cost in USD. */\n cost?: number;\n /** Cumulative thread cost in USD (when the turn is persisted to a thread). */\n threadCostUsd?: number;\n /** This turn's input-token count, ≈ current context-window occupancy. */\n contextTokens?: number;\n}\n\n/** A flattened usage snapshot a chat surfaces for a gauge: tokens used out of the\n * model's context window, plus cumulative cost. */\nexport interface ChatUsageSummary {\n usedTokens: number;\n maxTokens: number;\n cost?: number;\n messageCount: number;\n modelLabel?: string;\n}\n\n/** A suggested prompt shown on the empty state. A bare string is both the label\n * and the submitted text; the object form separates them. */\nexport type Suggestion = string | { label: string; prompt: string };\n\n/** The label shown for a suggestion. */\nexport function suggestionLabel(s: Suggestion): string {\n return typeof s === \"string\" ? s : s.label;\n}\n\n/** The text submitted when a suggestion is clicked. */\nexport function suggestionPrompt(s: Suggestion): string {\n return typeof s === \"string\" ? s : s.prompt;\n}\n\n/** Returns true for an assistant reasoning (\"thinking\") part. */\nexport function isReasoningPart(part: { type: string }): part is ReasoningUIPart {\n return part.type === \"reasoning\";\n}\n\n/** Returns true for a file/attachment part. */\nexport function isFilePart(part: { type: string }): part is FileUIPart {\n return part.type === \"file\";\n}\n\n/** A tool part as it appears in an assistant UIMessage — either a typed\n * `tool-<name>` part or the generic `dynamic-tool` part. clicky operations\n * surface as dynamic tools, so the chat UI renders both shapes. */\nexport type AnyToolPart = ToolUIPart | DynamicToolUIPart;\n\n/** Tool metadata shared by the chat shell. It both configures the\n * tool-preferences popover (`name`/`label`/`group`) and carries the schema\n * derived from a clicky RPC operation (`description`/`inputSchema`). The Go\n * backend owns execution; the client uses this only for display and to scope\n * which tools a request may call (passed in the transport `body`). */\nexport interface ToolMeta {\n /** Stable tool name sent to the model (the operation id). */\n name: string;\n /** Human-readable label shown in the tool-preferences popover. */\n label: string;\n /** Bucket heading in the popover — the clicky surface for RPC operations. */\n group?: string;\n /** Description shown in tool pickers / tool-call headers. */\n description?: string;\n /** JSON-Schema for the tool's input, assembled from an operation's\n * parameters + request body. Omitted for hand-authored tools. */\n inputSchema?: ChatToolInputSchema;\n}\n\nexport interface ChatToolInputSchema {\n type: \"object\";\n properties: Record<string, JSONSchemaProperty>;\n required: string[];\n}\n\nexport interface JSONSchemaProperty {\n type?: string;\n description?: string;\n enum?: unknown[];\n default?: unknown;\n}\n\n/** Returns true for a `dynamic-tool` part (clicky operations surface this way). */\nexport function isDynamicToolPart(part: { type: string }): part is DynamicToolUIPart {\n return part.type === \"dynamic-tool\";\n}\n\n/** Returns true for a typed `tool-<name>` part. */\nexport function isTypedToolPart(part: { type: string }): part is ToolUIPart {\n return part.type.startsWith(\"tool-\");\n}\n\n/** The display name of a tool part: the explicit `toolName` for dynamic tools,\n * otherwise the suffix after `tool-`. */\nexport function toolPartName(part: AnyToolPart): string {\n if (isDynamicToolPart(part)) {\n return part.toolName;\n }\n return part.type.slice(\"tool-\".length);\n}\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"types.cjs","sources":["../../../src/data/chat/types.ts"],"sourcesContent":["import type {\n UIMessage,\n ToolUIPart,\n DynamicToolUIPart,\n ChatStatus,\n ReasoningUIPart,\n FileUIPart,\n} from \"ai\";\nimport type { ReactNode } from \"react\";\n\nexport type { UIMessage, ToolUIPart, DynamicToolUIPart, ChatStatus, ReasoningUIPart, FileUIPart };\n\n/** A selectable chat model, as served by the backend's GET /api/chat/models.\n * `configured` is false for catalogued models whose provider has no API key. */\nexport interface ChatModel {\n id: string;\n provider: string;\n label: string;\n reasoning: boolean;\n configured?: boolean;\n /** Max context tokens — the denominator for a usage gauge. */\n contextWindow?: number;\n}\n\n/** Per-message metadata the backend rides on the SSE `finish` part\n * (`messageMetadata`), applied by the AI SDK to the assistant `UIMessage`. */\nexport interface ChatMessageMetadata {\n usage?: {\n inputTokens?: number;\n outputTokens?: number;\n totalTokens?: number;\n };\n /** This turn's cost in USD. */\n cost?: number;\n /** Cumulative thread cost in USD (when the turn is persisted to a thread). */\n threadCostUsd?: number;\n /** This turn's input-token count, ≈ current context-window occupancy. */\n contextTokens?: number;\n}\n\n/** A flattened usage snapshot a chat surfaces for a gauge: tokens used out of the\n * model's context window, plus cumulative cost. */\nexport interface ChatUsageSummary {\n usedTokens: number;\n maxTokens: number;\n cost?: number;\n messageCount: number;\n modelLabel?: string;\n}\n\n/** A suggested prompt shown on the empty state. A bare string is both the label\n * and the submitted text; the object form separates them. */\nexport type Suggestion = string | { label: string; prompt: string };\n\n/** The label shown for a suggestion. */\nexport function suggestionLabel(s: Suggestion): string {\n return typeof s === \"string\" ? s : s.label;\n}\n\n/** The text submitted when a suggestion is clicked. */\nexport function suggestionPrompt(s: Suggestion): string {\n return typeof s === \"string\" ? s : s.prompt;\n}\n\n/** Returns true for an assistant reasoning (\"thinking\") part. */\nexport function isReasoningPart(part: { type: string }): part is ReasoningUIPart {\n return part.type === \"reasoning\";\n}\n\n/** Returns true for a file/attachment part. */\nexport function isFilePart(part: { type: string }): part is FileUIPart {\n return part.type === \"file\";\n}\n\n/** A tool part as it appears in an assistant UIMessage — either a typed\n * `tool-<name>` part or the generic `dynamic-tool` part. clicky operations\n * surface as dynamic tools, so the chat UI renders both shapes. */\nexport type AnyToolPart = ToolUIPart | DynamicToolUIPart;\n\n/** Tool metadata shared by the chat shell. It both configures the\n * tool-preferences popover (`name`/`label`/`group`) and carries the schema\n * derived from a clicky RPC operation (`description`/`inputSchema`). The Go\n * backend owns execution; the client uses this only for display and to scope\n * which tools a request may call (passed in the transport `body`). */\nexport interface ToolMeta {\n /** Stable tool name sent to the model (the operation id). */\n name: string;\n /** Human-readable label shown in the tool-preferences popover. */\n label: string;\n /** Bucket heading in the popover — the clicky surface for RPC operations. */\n group?: string;\n /** Description shown in tool pickers / tool-call headers. */\n description?: string;\n /** JSON-Schema for the tool's input, assembled from an operation's\n * parameters + request body. Omitted for hand-authored tools. */\n inputSchema?: ChatToolInputSchema;\n}\n\nexport interface ChatToolInputSchema {\n type: \"object\";\n properties: Record<string, JSONSchemaProperty>;\n required: string[];\n}\n\nexport interface JSONSchemaProperty {\n type?: string;\n description?: string;\n enum?: unknown[];\n default?: unknown;\n}\n\n/** Returns true for a `dynamic-tool` part (clicky operations surface this way). */\nexport function isDynamicToolPart(part: { type: string }): part is DynamicToolUIPart {\n return part.type === \"dynamic-tool\";\n}\n\n/** Returns true for a typed `tool-<name>` part. */\nexport function isTypedToolPart(part: { type: string }): part is ToolUIPart {\n return part.type.startsWith(\"tool-\");\n}\n\n/** The display name of a tool part: the explicit `toolName` for dynamic tools,\n * otherwise the suffix after `tool-`. */\nexport function toolPartName(part: AnyToolPart): string {\n if (isDynamicToolPart(part)) {\n return part.toolName;\n }\n return part.type.slice(\"tool-\".length);\n}\n\nexport interface ToolResultRenderArgs {\n part: AnyToolPart;\n toolName: string;\n output: unknown;\n}\n\nexport type ToolResultRenderer = (args: ToolResultRenderArgs) => ReactNode;\n"],"names":[],"mappings":";;AAuDO,SAAS,gBAAgB,GAAuB;AACrD,SAAO,OAAO,MAAM,WAAW,IAAI,EAAE;AACvC;AAGO,SAAS,iBAAiB,GAAuB;AACtD,SAAO,OAAO,MAAM,WAAW,IAAI,EAAE;AACvC;AAGO,SAAS,gBAAgB,MAAiD;AAC/E,SAAO,KAAK,SAAS;AACvB;AAGO,SAAS,WAAW,MAA4C;AACrE,SAAO,KAAK,SAAS;AACvB;AAwCO,SAAS,kBAAkB,MAAmD;AACnF,SAAO,KAAK,SAAS;AACvB;AAGO,SAAS,gBAAgB,MAA4C;AAC1E,SAAO,KAAK,KAAK,WAAW,OAAO;AACrC;AAIO,SAAS,aAAa,MAA2B;AACtD,MAAI,kBAAkB,IAAI,GAAG;AAC3B,WAAO,KAAK;AAAA,EACd;AACA,SAAO,KAAK,KAAK,MAAM,QAAQ,MAAM;AACvC;;;;;;;;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { UIMessage, ToolUIPart, DynamicToolUIPart, ChatStatus, ReasoningUIPart, FileUIPart } from 'ai';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
2
3
|
export type { UIMessage, ToolUIPart, DynamicToolUIPart, ChatStatus, ReasoningUIPart, FileUIPart };
|
|
3
4
|
/** A selectable chat model, as served by the backend's GET /api/chat/models.
|
|
4
5
|
* `configured` is false for catalogued models whose provider has no API key. */
|
|
@@ -97,4 +98,10 @@ export declare function isTypedToolPart(part: {
|
|
|
97
98
|
/** The display name of a tool part: the explicit `toolName` for dynamic tools,
|
|
98
99
|
* otherwise the suffix after `tool-`. */
|
|
99
100
|
export declare function toolPartName(part: AnyToolPart): string;
|
|
101
|
+
export interface ToolResultRenderArgs {
|
|
102
|
+
part: AnyToolPart;
|
|
103
|
+
toolName: string;
|
|
104
|
+
output: unknown;
|
|
105
|
+
}
|
|
106
|
+
export type ToolResultRenderer = (args: ToolResultRenderArgs) => ReactNode;
|
|
100
107
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/data/chat/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,UAAU,EACX,MAAM,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/data/chat/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,UAAU,EACX,MAAM,IAAI,CAAC;AACZ,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,iBAAiB,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,CAAC;AAElG;iFACiF;AACjF,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8DAA8D;IAC9D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;+EAC+E;AAC/E,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,EAAE;QACN,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,+BAA+B;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yE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M,EAAE,kBAAkB,CAAC,CAAC;IAC/C,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,OAAO,EAAE,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,mFAAmF;AACnF,wBAAgB,iBAAiB,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,IAAI,iBAAiB,CAEnF;AAED,mDAAmD;AACnD,wBAAgB,eAAe,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,IAAI,UAAU,CAE1E;AAED;0CAC0C;AAC1C,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAKtD;AAED,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,WAAW,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,MAAM,kBAAkB,GAAG,CAAC,IAAI,EAAE,oBAAoB,KAAK,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../src/data/chat/types.ts"],"sourcesContent":["import type {\n UIMessage,\n ToolUIPart,\n DynamicToolUIPart,\n ChatStatus,\n ReasoningUIPart,\n FileUIPart,\n} from \"ai\";\n\nexport type { UIMessage, ToolUIPart, DynamicToolUIPart, ChatStatus, ReasoningUIPart, FileUIPart };\n\n/** A selectable chat model, as served by the backend's GET /api/chat/models.\n * `configured` is false for catalogued models whose provider has no API key. */\nexport interface ChatModel {\n id: string;\n provider: string;\n label: string;\n reasoning: boolean;\n configured?: boolean;\n /** Max context tokens — the denominator for a usage gauge. */\n contextWindow?: number;\n}\n\n/** Per-message metadata the backend rides on the SSE `finish` part\n * (`messageMetadata`), applied by the AI SDK to the assistant `UIMessage`. */\nexport interface ChatMessageMetadata {\n usage?: {\n inputTokens?: number;\n outputTokens?: number;\n totalTokens?: number;\n };\n /** This turn's cost in USD. */\n cost?: number;\n /** Cumulative thread cost in USD (when the turn is persisted to a thread). */\n threadCostUsd?: number;\n /** This turn's input-token count, ≈ current context-window occupancy. */\n contextTokens?: number;\n}\n\n/** A flattened usage snapshot a chat surfaces for a gauge: tokens used out of the\n * model's context window, plus cumulative cost. */\nexport interface ChatUsageSummary {\n usedTokens: number;\n maxTokens: number;\n cost?: number;\n messageCount: number;\n modelLabel?: string;\n}\n\n/** A suggested prompt shown on the empty state. A bare string is both the label\n * and the submitted text; the object form separates them. */\nexport type Suggestion = string | { label: string; prompt: string };\n\n/** The label shown for a suggestion. */\nexport function suggestionLabel(s: Suggestion): string {\n return typeof s === \"string\" ? s : s.label;\n}\n\n/** The text submitted when a suggestion is clicked. */\nexport function suggestionPrompt(s: Suggestion): string {\n return typeof s === \"string\" ? s : s.prompt;\n}\n\n/** Returns true for an assistant reasoning (\"thinking\") part. */\nexport function isReasoningPart(part: { type: string }): part is ReasoningUIPart {\n return part.type === \"reasoning\";\n}\n\n/** Returns true for a file/attachment part. */\nexport function isFilePart(part: { type: string }): part is FileUIPart {\n return part.type === \"file\";\n}\n\n/** A tool part as it appears in an assistant UIMessage — either a typed\n * `tool-<name>` part or the generic `dynamic-tool` part. clicky operations\n * surface as dynamic tools, so the chat UI renders both shapes. */\nexport type AnyToolPart = ToolUIPart | DynamicToolUIPart;\n\n/** Tool metadata shared by the chat shell. It both configures the\n * tool-preferences popover (`name`/`label`/`group`) and carries the schema\n * derived from a clicky RPC operation (`description`/`inputSchema`). The Go\n * backend owns execution; the client uses this only for display and to scope\n * which tools a request may call (passed in the transport `body`). */\nexport interface ToolMeta {\n /** Stable tool name sent to the model (the operation id). */\n name: string;\n /** Human-readable label shown in the tool-preferences popover. */\n label: string;\n /** Bucket heading in the popover — the clicky surface for RPC operations. */\n group?: string;\n /** Description shown in tool pickers / tool-call headers. */\n description?: string;\n /** JSON-Schema for the tool's input, assembled from an operation's\n * parameters + request body. Omitted for hand-authored tools. */\n inputSchema?: ChatToolInputSchema;\n}\n\nexport interface ChatToolInputSchema {\n type: \"object\";\n properties: Record<string, JSONSchemaProperty>;\n required: string[];\n}\n\nexport interface JSONSchemaProperty {\n type?: string;\n description?: string;\n enum?: unknown[];\n default?: unknown;\n}\n\n/** Returns true for a `dynamic-tool` part (clicky operations surface this way). */\nexport function isDynamicToolPart(part: { type: string }): part is DynamicToolUIPart {\n return part.type === \"dynamic-tool\";\n}\n\n/** Returns true for a typed `tool-<name>` part. */\nexport function isTypedToolPart(part: { type: string }): part is ToolUIPart {\n return part.type.startsWith(\"tool-\");\n}\n\n/** The display name of a tool part: the explicit `toolName` for dynamic tools,\n * otherwise the suffix after `tool-`. */\nexport function toolPartName(part: AnyToolPart): string {\n if (isDynamicToolPart(part)) {\n return part.toolName;\n }\n return part.type.slice(\"tool-\".length);\n}\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../src/data/chat/types.ts"],"sourcesContent":["import type {\n UIMessage,\n ToolUIPart,\n DynamicToolUIPart,\n ChatStatus,\n ReasoningUIPart,\n FileUIPart,\n} from \"ai\";\nimport type { ReactNode } from \"react\";\n\nexport type { UIMessage, ToolUIPart, DynamicToolUIPart, ChatStatus, ReasoningUIPart, FileUIPart };\n\n/** A selectable chat model, as served by the backend's GET /api/chat/models.\n * `configured` is false for catalogued models whose provider has no API key. */\nexport interface ChatModel {\n id: string;\n provider: string;\n label: string;\n reasoning: boolean;\n configured?: boolean;\n /** Max context tokens — the denominator for a usage gauge. */\n contextWindow?: number;\n}\n\n/** Per-message metadata the backend rides on the SSE `finish` part\n * (`messageMetadata`), applied by the AI SDK to the assistant `UIMessage`. */\nexport interface ChatMessageMetadata {\n usage?: {\n inputTokens?: number;\n outputTokens?: number;\n totalTokens?: number;\n };\n /** This turn's cost in USD. */\n cost?: number;\n /** Cumulative thread cost in USD (when the turn is persisted to a thread). */\n threadCostUsd?: number;\n /** This turn's input-token count, ≈ current context-window occupancy. */\n contextTokens?: number;\n}\n\n/** A flattened usage snapshot a chat surfaces for a gauge: tokens used out of the\n * model's context window, plus cumulative cost. */\nexport interface ChatUsageSummary {\n usedTokens: number;\n maxTokens: number;\n cost?: number;\n messageCount: number;\n modelLabel?: string;\n}\n\n/** A suggested prompt shown on the empty state. A bare string is both the label\n * and the submitted text; the object form separates them. */\nexport type Suggestion = string | { label: string; prompt: string };\n\n/** The label shown for a suggestion. */\nexport function suggestionLabel(s: Suggestion): string {\n return typeof s === \"string\" ? s : s.label;\n}\n\n/** The text submitted when a suggestion is clicked. */\nexport function suggestionPrompt(s: Suggestion): string {\n return typeof s === \"string\" ? s : s.prompt;\n}\n\n/** Returns true for an assistant reasoning (\"thinking\") part. */\nexport function isReasoningPart(part: { type: string }): part is ReasoningUIPart {\n return part.type === \"reasoning\";\n}\n\n/** Returns true for a file/attachment part. */\nexport function isFilePart(part: { type: string }): part is FileUIPart {\n return part.type === \"file\";\n}\n\n/** A tool part as it appears in an assistant UIMessage — either a typed\n * `tool-<name>` part or the generic `dynamic-tool` part. clicky operations\n * surface as dynamic tools, so the chat UI renders both shapes. */\nexport type AnyToolPart = ToolUIPart | DynamicToolUIPart;\n\n/** Tool metadata shared by the chat shell. It both configures the\n * tool-preferences popover (`name`/`label`/`group`) and carries the schema\n * derived from a clicky RPC operation (`description`/`inputSchema`). The Go\n * backend owns execution; the client uses this only for display and to scope\n * which tools a request may call (passed in the transport `body`). */\nexport interface ToolMeta {\n /** Stable tool name sent to the model (the operation id). */\n name: string;\n /** Human-readable label shown in the tool-preferences popover. */\n label: string;\n /** Bucket heading in the popover — the clicky surface for RPC operations. */\n group?: string;\n /** Description shown in tool pickers / tool-call headers. */\n description?: string;\n /** JSON-Schema for the tool's input, assembled from an operation's\n * parameters + request body. Omitted for hand-authored tools. */\n inputSchema?: ChatToolInputSchema;\n}\n\nexport interface ChatToolInputSchema {\n type: \"object\";\n properties: Record<string, JSONSchemaProperty>;\n required: string[];\n}\n\nexport interface JSONSchemaProperty {\n type?: string;\n description?: string;\n enum?: unknown[];\n default?: unknown;\n}\n\n/** Returns true for a `dynamic-tool` part (clicky operations surface this way). */\nexport function isDynamicToolPart(part: { type: string }): part is DynamicToolUIPart {\n return part.type === \"dynamic-tool\";\n}\n\n/** Returns true for a typed `tool-<name>` part. */\nexport function isTypedToolPart(part: { type: string }): part is ToolUIPart {\n return part.type.startsWith(\"tool-\");\n}\n\n/** The display name of a tool part: the explicit `toolName` for dynamic tools,\n * otherwise the suffix after `tool-`. */\nexport function toolPartName(part: AnyToolPart): string {\n if (isDynamicToolPart(part)) {\n return part.toolName;\n }\n return part.type.slice(\"tool-\".length);\n}\n\nexport interface ToolResultRenderArgs {\n part: AnyToolPart;\n toolName: string;\n output: unknown;\n}\n\nexport type ToolResultRenderer = (args: ToolResultRenderArgs) => ReactNode;\n"],"names":[],"mappings":"AAuDO,SAAS,gBAAgB,GAAuB;AACrD,SAAO,OAAO,MAAM,WAAW,IAAI,EAAE;AACvC;AAGO,SAAS,iBAAiB,GAAuB;AACtD,SAAO,OAAO,MAAM,WAAW,IAAI,EAAE;AACvC;AAGO,SAAS,gBAAgB,MAAiD;AAC/E,SAAO,KAAK,SAAS;AACvB;AAGO,SAAS,WAAW,MAA4C;AACrE,SAAO,KAAK,SAAS;AACvB;AAwCO,SAAS,kBAAkB,MAAmD;AACnF,SAAO,KAAK,SAAS;AACvB;AAGO,SAAS,gBAAgB,MAA4C;AAC1E,SAAO,KAAK,KAAK,WAAW,OAAO;AACrC;AAIO,SAAS,aAAa,MAA2B;AACtD,MAAI,kBAAkB,IAAI,GAAG;AAC3B,WAAO,KAAK;AAAA,EACd;AACA,SAAO,KAAK,KAAK,MAAM,QAAQ,MAAM;AACvC;"}
|
|
@@ -15,9 +15,9 @@ function detectMode() {
|
|
|
15
15
|
}
|
|
16
16
|
function getVersionInfo() {
|
|
17
17
|
return {
|
|
18
|
-
commit: read(() => "
|
|
18
|
+
commit: read(() => "ec308d4", ""),
|
|
19
19
|
tag: read(() => "clicky-ui@0.2.20", ""),
|
|
20
|
-
date: read(() => "2026-06-
|
|
20
|
+
date: read(() => "2026-06-19T10:18:00.784Z", ""),
|
|
21
21
|
dirty: read(() => true, false),
|
|
22
22
|
mode: detectMode()
|
|
23
23
|
};
|
|
@@ -13,9 +13,9 @@ function detectMode() {
|
|
|
13
13
|
}
|
|
14
14
|
function getVersionInfo() {
|
|
15
15
|
return {
|
|
16
|
-
commit: read(() => "
|
|
16
|
+
commit: read(() => "ec308d4", ""),
|
|
17
17
|
tag: read(() => "clicky-ui@0.2.20", ""),
|
|
18
|
-
date: read(() => "2026-06-
|
|
18
|
+
date: read(() => "2026-06-19T10:17:47.980Z", ""),
|
|
19
19
|
dirty: read(() => true, false),
|
|
20
20
|
mode: detectMode()
|
|
21
21
|
};
|
package/dist/data.cjs
CHANGED
|
@@ -38,6 +38,8 @@ const TimeseriesPanel_model = require("./data/TimeseriesPanel.model.cjs");
|
|
|
38
38
|
const TimeseriesPanel_axes = require("./data/TimeseriesPanel.axes.cjs");
|
|
39
39
|
const TimeseriesGauge = require("./data/TimeseriesGauge.cjs");
|
|
40
40
|
const TimeseriesCoreBars = require("./data/TimeseriesCoreBars.cjs");
|
|
41
|
+
const WorkloadCard = require("./data/WorkloadCard.cjs");
|
|
42
|
+
const WorkloadCard_model = require("./data/WorkloadCard.model.cjs");
|
|
41
43
|
const TimeseriesCoreBars_model = require("./data/TimeseriesCoreBars.model.cjs");
|
|
42
44
|
const StatusBreakdown = require("./data/StatusBreakdown.cjs");
|
|
43
45
|
const statusBreakdownUtils = require("./data/status-breakdown-utils.cjs");
|
|
@@ -401,6 +403,11 @@ exports.assignAxes = TimeseriesPanel_axes.assignAxes;
|
|
|
401
403
|
exports.latestOf = TimeseriesPanel_axes.latestOf;
|
|
402
404
|
exports.TimeseriesGauge = TimeseriesGauge.TimeseriesGauge;
|
|
403
405
|
exports.TimeseriesCoreBars = TimeseriesCoreBars.TimeseriesCoreBars;
|
|
406
|
+
exports.WorkloadCard = WorkloadCard.WorkloadCard;
|
|
407
|
+
exports.formatReplicaCounts = WorkloadCard_model.formatReplicaCounts;
|
|
408
|
+
exports.workloadKindLabel = WorkloadCard_model.workloadKindLabel;
|
|
409
|
+
exports.workloadStatusLabel = WorkloadCard_model.workloadStatusLabel;
|
|
410
|
+
exports.workloadStatusTone = WorkloadCard_model.workloadStatusTone;
|
|
404
411
|
exports.deriveCoreBars = TimeseriesCoreBars_model.deriveCoreBars;
|
|
405
412
|
exports.StackedStatusBar = StatusBreakdown.StackedStatusBar;
|
|
406
413
|
exports.StatusRows = StatusBreakdown.StatusRows;
|
package/dist/data.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"data.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/data.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export { normalizeTags, splitTagToken, tagActionsFromRecord, tagFilterTokens, us
|
|
|
13
13
|
export { StatusDot, type StatusDotProps, type StatusDotSize } from './data/cells/StatusDot';
|
|
14
14
|
export { normalizeStatus, STATUS_TOKEN_GROUPS } from './data/cells/status-mapping';
|
|
15
15
|
export { FilterPill, FilterPillGroup, FilterSeparator, type FilterPillProps, type FilterPillGroupProps, type FilterMode, } from './data/FilterPill';
|
|
16
|
-
export { Gauge, type GaugeProps, type GaugeTone } from './data/Gauge';
|
|
16
|
+
export { Gauge, type GaugeProps, type GaugeTone, type GaugeVariant } from './data/Gauge';
|
|
17
17
|
export { RadialGauge, type RadialGaugeProps } from './data/RadialGauge';
|
|
18
18
|
export { Icon, LabelIcon, type IconProps, type IconStyle, type IconTone, type LabelIconSpec, type StaticIconComponent, } from './data/Icon';
|
|
19
19
|
export { setFallbackIconProvider, type FallbackIconProps, } from './data/icon-fallback';
|
|
@@ -35,8 +35,10 @@ export { TabButton, type TabButtonProps, type TabButtonVariant } from './data/Ta
|
|
|
35
35
|
export { TimeseriesPanel, type TimeseriesPanelProps, } from './data/TimeseriesPanel';
|
|
36
36
|
export { resolveSeries, resolveBreakdown, mergeSeries, type BreakdownItem, type MergedRow, type ResolvedSeries, type TimeseriesPoint, type TimeseriesResponse, type TimeseriesSeries, } from './data/TimeseriesPanel.model';
|
|
37
37
|
export { assignAxes, latestOf, type AxisAssignment, type AxisOrientation, type AxisSpec, } from './data/TimeseriesPanel.axes';
|
|
38
|
-
export { TimeseriesGauge, type GaugeSeries, type TimeseriesGaugeProps, } from './data/TimeseriesGauge';
|
|
39
|
-
export { TimeseriesCoreBars, type TimeseriesCoreBarsProps, } from './data/TimeseriesCoreBars';
|
|
38
|
+
export { TimeseriesGauge, type GaugeSeries, type TimeseriesGaugeProps, type TimeseriesGaugeVariant, } from './data/TimeseriesGauge';
|
|
39
|
+
export { TimeseriesCoreBars, type TimeseriesCoreBarsOrientation, type TimeseriesCoreBarsProps, type TimeseriesCoreBarsVariant, } from './data/TimeseriesCoreBars';
|
|
40
|
+
export { WorkloadCard, type WorkloadCardProps, type WorkloadCardSize, type WorkloadCardVariant } from './data/WorkloadCard';
|
|
41
|
+
export { formatReplicaCounts, workloadKindLabel, workloadStatusLabel, workloadStatusTone, type WorkloadCardCpuMetric, type WorkloadCardIcon, type WorkloadCardKind, type WorkloadCardMetrics, type WorkloadCardReplicas, type WorkloadCardResourceMetric, type WorkloadCardStatus, type WorkloadCardWorkload, } from './data/WorkloadCard.model';
|
|
40
42
|
export { deriveCoreBars, type CoreBar, type CoreBarsModel, } from './data/TimeseriesCoreBars.model';
|
|
41
43
|
export { StatusRows, StackedStatusBar, type StatusSegment, type StatusRenderLink, } from './data/StatusBreakdown';
|
|
42
44
|
export { segment } from './data/status-breakdown-utils';
|
package/dist/data.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.d.ts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Ae,EACpB,KAAK,oBAAoB,EACzB,KAAK,WAAW,EAChB,KAAK,UAAU,GAChB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,YAAY,EACjB,KAAK,iBAAiB,GACvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACL,aAAa,EACb,gBAAgB,EAChB,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,GAC5B,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,iBAAiB,GAClB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EACL,cAAc,EACd,KAAK,WAAW,GACjB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,UAAU,EACV,KAAK,eAAe,EACpB,KAAK,wBAAwB,GAC9B,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EACL,mBAAmB,EACnB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,SAAS,EACT,KAAK,iBAAiB,GACvB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,2BAA2B,EAC3B,gBAAgB,EAChB,uBAAuB,EACvB,KAAK,gBAAgB,EACrB,KAAK,eAAe,EACpB,KAAK,qBAAqB,GAC3B,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACnE,YAAY,EACV,QAAQ,EACR,UAAU,EACV,WAAW,EACX,UAAU,EACV,SAAS,EACT,WAAW,GACZ,MAAM,kBAAkB,CAAC"}
|
package/dist/data.js
CHANGED
|
@@ -36,6 +36,8 @@ import { mergeSeries, resolveBreakdown, resolveSeries } from "./data/TimeseriesP
|
|
|
36
36
|
import { assignAxes, latestOf } from "./data/TimeseriesPanel.axes.js";
|
|
37
37
|
import { TimeseriesGauge } from "./data/TimeseriesGauge.js";
|
|
38
38
|
import { TimeseriesCoreBars } from "./data/TimeseriesCoreBars.js";
|
|
39
|
+
import { WorkloadCard } from "./data/WorkloadCard.js";
|
|
40
|
+
import { formatReplicaCounts, workloadKindLabel, workloadStatusLabel, workloadStatusTone } from "./data/WorkloadCard.model.js";
|
|
39
41
|
import { deriveCoreBars } from "./data/TimeseriesCoreBars.model.js";
|
|
40
42
|
import { StackedStatusBar, StatusRows } from "./data/StatusBreakdown.js";
|
|
41
43
|
import { segment } from "./data/status-breakdown-utils.js";
|
|
@@ -903,6 +905,7 @@ export {
|
|
|
903
905
|
UiZoomOut,
|
|
904
906
|
UiZoomOutFilled,
|
|
905
907
|
Version,
|
|
908
|
+
WorkloadCard,
|
|
906
909
|
allGroupsTerminal,
|
|
907
910
|
annotateRoutePaths,
|
|
908
911
|
assignAxes,
|
|
@@ -934,6 +937,7 @@ export {
|
|
|
934
937
|
formatDateTimeRelative,
|
|
935
938
|
formatPropertyLabel,
|
|
936
939
|
formatRelativeTime,
|
|
940
|
+
formatReplicaCounts,
|
|
937
941
|
formatTestDuration,
|
|
938
942
|
formatTimestamp,
|
|
939
943
|
frameHasSource,
|
|
@@ -987,6 +991,9 @@ export {
|
|
|
987
991
|
totalDuration,
|
|
988
992
|
useTagActions,
|
|
989
993
|
useTagActionsValue,
|
|
990
|
-
useTestRunner
|
|
994
|
+
useTestRunner,
|
|
995
|
+
workloadKindLabel,
|
|
996
|
+
workloadStatusLabel,
|
|
997
|
+
workloadStatusTone
|
|
991
998
|
};
|
|
992
999
|
//# sourceMappingURL=data.js.map
|
package/dist/data.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"data.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"data.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/hooks/use-sort.cjs
CHANGED
|
@@ -8,21 +8,30 @@ function resolvePath(obj, path) {
|
|
|
8
8
|
}, obj);
|
|
9
9
|
}
|
|
10
10
|
function useSort(items, options = {}) {
|
|
11
|
-
const {
|
|
12
|
-
|
|
11
|
+
const {
|
|
12
|
+
defaultKey,
|
|
13
|
+
defaultDir = "asc",
|
|
14
|
+
sort: controlledSort,
|
|
15
|
+
onSortChange,
|
|
16
|
+
manual = false,
|
|
17
|
+
resolvers
|
|
18
|
+
} = options;
|
|
19
|
+
const [localSort, setLocalSort] = react.useState(
|
|
13
20
|
defaultKey ? { key: defaultKey, dir: defaultDir } : null
|
|
14
21
|
);
|
|
22
|
+
const isControlled = controlledSort !== void 0;
|
|
23
|
+
const sort = isControlled ? controlledSort : localSort;
|
|
15
24
|
function toggle(key) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
25
|
+
const next = (sort == null ? void 0 : sort.key) === key ? sort.dir === "asc" ? { key, dir: "desc" } : null : { key, dir: "asc" };
|
|
26
|
+
if (isControlled) {
|
|
27
|
+
onSortChange == null ? void 0 : onSortChange(next);
|
|
28
|
+
} else {
|
|
29
|
+
setLocalSort(next);
|
|
30
|
+
}
|
|
22
31
|
}
|
|
23
32
|
const sorted = react.useMemo(() => {
|
|
24
33
|
if (!items) return [];
|
|
25
|
-
if (!sort) return items;
|
|
34
|
+
if (manual || !sort) return items;
|
|
26
35
|
const { key, dir } = sort;
|
|
27
36
|
const resolver = resolvers == null ? void 0 : resolvers[key];
|
|
28
37
|
const get = (item) => resolver ? resolver(item) : resolvePath(item, key);
|
|
@@ -35,7 +44,7 @@ function useSort(items, options = {}) {
|
|
|
35
44
|
const cmp = typeof av === "number" && typeof bv === "number" ? av - bv : String(av).localeCompare(String(bv));
|
|
36
45
|
return dir === "asc" ? cmp : -cmp;
|
|
37
46
|
});
|
|
38
|
-
}, [items, sort, resolvers]);
|
|
47
|
+
}, [items, manual, sort, resolvers]);
|
|
39
48
|
return { sorted, sort, toggle };
|
|
40
49
|
}
|
|
41
50
|
exports.useSort = useSort;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-sort.cjs","sources":["../../src/hooks/use-sort.ts"],"sourcesContent":["import { useMemo, useState } from \"react\";\n\nexport type SortDir = \"asc\" | \"desc\";\n\nexport type SortState = {\n key: string;\n dir: SortDir;\n};\n\nexport type UseSortOptions<T> = {\n defaultKey?: string;\n defaultDir?: SortDir;\n resolvers?: Record<string, (item: T) => unknown>;\n};\n\nexport type UseSortReturn<T> = {\n sorted: T[];\n sort: SortState | null;\n toggle: (key: string) => void;\n};\n\nfunction resolvePath(obj: unknown, path: string): unknown {\n return path.split(\".\").reduce<unknown>((o, k) => {\n if (o && typeof o === \"object\") return (o as Record<string, unknown>)[k];\n return undefined;\n }, obj);\n}\n\nexport function useSort<T>(items: T[]
|
|
1
|
+
{"version":3,"file":"use-sort.cjs","sources":["../../src/hooks/use-sort.ts"],"sourcesContent":["import { useMemo, useState } from \"react\";\n\nexport type SortDir = \"asc\" | \"desc\";\n\nexport type SortState = {\n key: string;\n dir: SortDir;\n};\n\nexport type UseSortOptions<T> = {\n defaultKey?: string;\n defaultDir?: SortDir;\n sort?: SortState | null;\n onSortChange?: (sort: SortState | null) => void;\n manual?: boolean;\n resolvers?: Record<string, (item: T) => unknown>;\n};\n\nexport type UseSortReturn<T> = {\n sorted: T[];\n sort: SortState | null;\n toggle: (key: string) => void;\n};\n\nfunction resolvePath(obj: unknown, path: string): unknown {\n return path.split(\".\").reduce<unknown>((o, k) => {\n if (o && typeof o === \"object\") return (o as Record<string, unknown>)[k];\n return undefined;\n }, obj);\n}\n\nexport function useSort<T>(\n items: T[],\n options: UseSortOptions<T> = {},\n): UseSortReturn<T> {\n const {\n defaultKey,\n defaultDir = \"asc\",\n sort: controlledSort,\n onSortChange,\n manual = false,\n resolvers,\n } = options;\n\n const [localSort, setLocalSort] = useState<SortState | null>(\n defaultKey ? { key: defaultKey, dir: defaultDir } : null,\n );\n const isControlled = controlledSort !== undefined;\n const sort = isControlled ? controlledSort : localSort;\n\n function toggle(key: string) {\n const next =\n sort?.key === key\n ? sort.dir === \"asc\"\n ? { key, dir: \"desc\" as const }\n : null\n : { key, dir: \"asc\" as const };\n if (isControlled) {\n onSortChange?.(next);\n } else {\n setLocalSort(next);\n }\n }\n\n const sorted = useMemo(() => {\n if (!items) return [];\n if (manual || !sort) return items;\n const { key, dir } = sort;\n const resolver = resolvers?.[key];\n const get = (item: T) =>\n resolver ? resolver(item) : resolvePath(item, key);\n return [...items].sort((a, b) => {\n const av = get(a);\n const bv = get(b);\n if (av == null && bv == null) return 0;\n if (av == null) return 1;\n if (bv == null) return -1;\n const cmp =\n typeof av === \"number\" && typeof bv === \"number\"\n ? av - bv\n : String(av).localeCompare(String(bv));\n return dir === \"asc\" ? cmp : -cmp;\n });\n }, [items, manual, sort, resolvers]);\n\n return { sorted, sort, toggle };\n}\n"],"names":["useState","useMemo"],"mappings":";;;AAwBA,SAAS,YAAY,KAAc,MAAuB;AACxD,SAAO,KAAK,MAAM,GAAG,EAAE,OAAgB,CAAC,GAAG,MAAM;AAC/C,QAAI,KAAK,OAAO,MAAM,SAAU,QAAQ,EAA8B,CAAC;AACvE,WAAO;AAAA,EACT,GAAG,GAAG;AACR;AAEO,SAAS,QACd,OACA,UAA6B,IACX;AAClB,QAAM;AAAA,IACJ;AAAA,IACA,a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ts
CHANGED
|
@@ -6,6 +6,9 @@ export type SortState = {
|
|
|
6
6
|
export type UseSortOptions<T> = {
|
|
7
7
|
defaultKey?: string;
|
|
8
8
|
defaultDir?: SortDir;
|
|
9
|
+
sort?: SortState | null;
|
|
10
|
+
onSortChange?: (sort: SortState | null) => void;
|
|
11
|
+
manual?: boolean;
|
|
9
12
|
resolvers?: Record<string, (item: T) => unknown>;
|
|
10
13
|
};
|
|
11
14
|
export type UseSortReturn<T> = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-sort.d.ts","sourceRoot":"","sources":["../../src/hooks/use-sort.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AAErC,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC;CAClD,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;IAC7B,MAAM,EAAE,CAAC,EAAE,CAAC;IACZ,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B,CAAC;AASF,wBAAgB,OAAO,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"use-sort.d.ts","sourceRoot":"","sources":["../../src/hooks/use-sort.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;AAErC,MAAM,MAAM,SAAS,GAAG;IACtB,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,OAAO,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,cAAc,CAAC,CAAC,IAAI;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IACxB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,KAAK,IAAI,CAAC;IAChD,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,CAAC;CAClD,CAAC;AAEF,MAAM,MAAM,aAAa,CAAC,CAAC,IAAI;IAC7B,MAAM,EAAE,CAAC,EAAE,CAAC;IACZ,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B,CAAC;AASF,wBAAgB,OAAO,CAAC,CAAC,EACvB,KAAK,EAAE,CAAC,EAAE,EACV,OAAO,GAAE,cAAc,CAAC,CAAC,CAAM,GAC9B,aAAa,CAAC,CAAC,CAAC,CAoDlB"}
|
package/dist/hooks/use-sort.js
CHANGED
|
@@ -6,21 +6,30 @@ function resolvePath(obj, path) {
|
|
|
6
6
|
}, obj);
|
|
7
7
|
}
|
|
8
8
|
function useSort(items, options = {}) {
|
|
9
|
-
const {
|
|
10
|
-
|
|
9
|
+
const {
|
|
10
|
+
defaultKey,
|
|
11
|
+
defaultDir = "asc",
|
|
12
|
+
sort: controlledSort,
|
|
13
|
+
onSortChange,
|
|
14
|
+
manual = false,
|
|
15
|
+
resolvers
|
|
16
|
+
} = options;
|
|
17
|
+
const [localSort, setLocalSort] = useState(
|
|
11
18
|
defaultKey ? { key: defaultKey, dir: defaultDir } : null
|
|
12
19
|
);
|
|
20
|
+
const isControlled = controlledSort !== void 0;
|
|
21
|
+
const sort = isControlled ? controlledSort : localSort;
|
|
13
22
|
function toggle(key) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
23
|
+
const next = (sort == null ? void 0 : sort.key) === key ? sort.dir === "asc" ? { key, dir: "desc" } : null : { key, dir: "asc" };
|
|
24
|
+
if (isControlled) {
|
|
25
|
+
onSortChange == null ? void 0 : onSortChange(next);
|
|
26
|
+
} else {
|
|
27
|
+
setLocalSort(next);
|
|
28
|
+
}
|
|
20
29
|
}
|
|
21
30
|
const sorted = useMemo(() => {
|
|
22
31
|
if (!items) return [];
|
|
23
|
-
if (!sort) return items;
|
|
32
|
+
if (manual || !sort) return items;
|
|
24
33
|
const { key, dir } = sort;
|
|
25
34
|
const resolver = resolvers == null ? void 0 : resolvers[key];
|
|
26
35
|
const get = (item) => resolver ? resolver(item) : resolvePath(item, key);
|
|
@@ -33,7 +42,7 @@ function useSort(items, options = {}) {
|
|
|
33
42
|
const cmp = typeof av === "number" && typeof bv === "number" ? av - bv : String(av).localeCompare(String(bv));
|
|
34
43
|
return dir === "asc" ? cmp : -cmp;
|
|
35
44
|
});
|
|
36
|
-
}, [items, sort, resolvers]);
|
|
45
|
+
}, [items, manual, sort, resolvers]);
|
|
37
46
|
return { sorted, sort, toggle };
|
|
38
47
|
}
|
|
39
48
|
export {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-sort.js","sources":["../../src/hooks/use-sort.ts"],"sourcesContent":["import { useMemo, useState } from \"react\";\n\nexport type SortDir = \"asc\" | \"desc\";\n\nexport type SortState = {\n key: string;\n dir: SortDir;\n};\n\nexport type UseSortOptions<T> = {\n defaultKey?: string;\n defaultDir?: SortDir;\n resolvers?: Record<string, (item: T) => unknown>;\n};\n\nexport type UseSortReturn<T> = {\n sorted: T[];\n sort: SortState | null;\n toggle: (key: string) => void;\n};\n\nfunction resolvePath(obj: unknown, path: string): unknown {\n return path.split(\".\").reduce<unknown>((o, k) => {\n if (o && typeof o === \"object\") return (o as Record<string, unknown>)[k];\n return undefined;\n }, obj);\n}\n\nexport function useSort<T>(items: T[]
|
|
1
|
+
{"version":3,"file":"use-sort.js","sources":["../../src/hooks/use-sort.ts"],"sourcesContent":["import { useMemo, useState } from \"react\";\n\nexport type SortDir = \"asc\" | \"desc\";\n\nexport type SortState = {\n key: string;\n dir: SortDir;\n};\n\nexport type UseSortOptions<T> = {\n defaultKey?: string;\n defaultDir?: SortDir;\n sort?: SortState | null;\n onSortChange?: (sort: SortState | null) => void;\n manual?: boolean;\n resolvers?: Record<string, (item: T) => unknown>;\n};\n\nexport type UseSortReturn<T> = {\n sorted: T[];\n sort: SortState | null;\n toggle: (key: string) => void;\n};\n\nfunction resolvePath(obj: unknown, path: string): unknown {\n return path.split(\".\").reduce<unknown>((o, k) => {\n if (o && typeof o === \"object\") return (o as Record<string, unknown>)[k];\n return undefined;\n }, obj);\n}\n\nexport function useSort<T>(\n items: T[],\n options: UseSortOptions<T> = {},\n): UseSortReturn<T> {\n const {\n defaultKey,\n defaultDir = \"asc\",\n sort: controlledSort,\n onSortChange,\n manual = false,\n resolvers,\n } = options;\n\n const [localSort, setLocalSort] = useState<SortState | null>(\n defaultKey ? { key: defaultKey, dir: defaultDir } : null,\n );\n const isControlled = controlledSort !== undefined;\n const sort = isControlled ? controlledSort : localSort;\n\n function toggle(key: string) {\n const next =\n sort?.key === key\n ? sort.dir === \"asc\"\n ? { key, dir: \"desc\" as const }\n : null\n : { key, dir: \"asc\" as const };\n if (isControlled) {\n onSortChange?.(next);\n } else {\n setLocalSort(next);\n }\n }\n\n const sorted = useMemo(() => {\n if (!items) return [];\n if (manual || !sort) return items;\n const { key, dir } = sort;\n const resolver = resolvers?.[key];\n const get = (item: T) =>\n resolver ? resolver(item) : resolvePath(item, key);\n return [...items].sort((a, b) => {\n const av = get(a);\n const bv = get(b);\n if (av == null && bv == null) return 0;\n if (av == null) return 1;\n if (bv == null) return -1;\n const cmp =\n typeof av === \"number\" && typeof bv === \"number\"\n ? av - bv\n : String(av).localeCompare(String(bv));\n return dir === \"asc\" ? cmp : -cmp;\n });\n }, [items, manual, sort, resolvers]);\n\n return { sorted, sort, toggle };\n}\n"],"names":[],"mappings":";AAwBA,SAAS,YAAY,KAAc,MAAuB;AACxD,SAAO,KAAK,MAAM,GAAG,EAAE,OAAgB,CAAC,GAAG,MAAM;AAC/C,QAAI,KAAK,OAAO,MAAM,SAAU,QAAQ,EAA8B,CAAC;AACvE,WAAO;AAAA,EACT,GAAG,GAAG;AACR;AAEO,SAAS,QACd,OACA,UAA6B,IACX;AAClB,QAAM;AAAA,IACJ;AAAA,IACA,aAAa;AAAA,IACb,MAAM;AAAA,IACN;AAAA,IACA,SAAS;AAAA,IACT;AAAA,EAAA,IACE;AAEJ,QAAM,CAAC,WAAW,YAAY,IAAI;AAAA,IAChC,aAAa,EAAE,KAAK,YAAY,KAAK,eAAe;AAAA,EAAA;AAEtD,QAAM,eAAe,mBAAmB;AACxC,QAAM,OAAO,eAAe,iBAAiB;AAE7C,WAAS,OAAO,KAAa;AAC3B,UAAM,QACJ,6BAAM,SAAQ,MACV,KAAK,QAAQ,QACX,EAAE,KAAK,KAAK,WACZ,OACF,EAAE,KAAK,KAAK,MAAA;AAClB,QAAI,cAAc;AAChB,mDAAe;AAAA,IACjB,OAAO;AACL,mBAAa,IAAI;AAAA,IACnB;AAAA,EACF;AAEA,QAAM,SAAS,QAAQ,MAAM;AAC3B,QAAI,CAAC,MAAO,QAAO,CAAA;AACnB,QAAI,UAAU,CAAC,KAAM,QAAO;AAC5B,UAAM,EAAE,KAAK,IAAA,IAAQ;AACrB,UAAM,WAAW,uCAAY;AAC7B,UAAM,MAAM,CAAC,SACX,WAAW,SAAS,IAAI,IAAI,YAAY,MAAM,GAAG;AACnD,WAAO,CAAC,GAAG,KAAK,EAAE,KAAK,CAAC,GAAG,MAAM;AAC/B,YAAM,KAAK,IAAI,CAAC;AAChB,YAAM,KAAK,IAAI,CAAC;AAChB,UAAI,MAAM,QAAQ,MAAM,KAAM,QAAO;AACrC,UAAI,MAAM,KAAM,QAAO;AACvB,UAAI,MAAM,KAAM,QAAO;AACvB,YAAM,MACJ,OAAO,OAAO,YAAY,OAAO,OAAO,WACpC,KAAK,KACL,OAAO,EAAE,EAAE,cAAc,OAAO,EAAE,CAAC;AACzC,aAAO,QAAQ,QAAQ,MAAM,CAAC;AAAA,IAChC,CAAC;AAAA,EACH,GAAG,CAAC,OAAO,QAAQ,MAAM,SAAS,CAAC;AAEnC,SAAO,EAAE,QAAQ,MAAM,OAAA;AACzB;"}
|
package/dist/index.cjs
CHANGED
|
@@ -44,6 +44,8 @@ const JsonSchemaForm = require("./components/JsonSchemaForm.cjs");
|
|
|
44
44
|
const jsonSchemaFormSize = require("./components/json-schema-form-size.cjs");
|
|
45
45
|
const jsonSchemaFormPreferences = require("./components/json-schema-form-preferences.cjs");
|
|
46
46
|
const jsonSchemaFormResolve = require("./components/json-schema-form-resolve.cjs");
|
|
47
|
+
const jsonSchemaFormRefs = require("./components/json-schema-form-refs.cjs");
|
|
48
|
+
const jsonSchemaFormTemplate = require("./components/json-schema-form-template.cjs");
|
|
47
49
|
const SplitPane = require("./layout/SplitPane.cjs");
|
|
48
50
|
const AppShell = require("./layout/AppShell.cjs");
|
|
49
51
|
const AppSidebar = require("./layout/AppSidebar.cjs");
|
|
@@ -94,6 +96,8 @@ const TimeseriesPanel_model = require("./data/TimeseriesPanel.model.cjs");
|
|
|
94
96
|
const TimeseriesPanel_axes = require("./data/TimeseriesPanel.axes.cjs");
|
|
95
97
|
const TimeseriesGauge = require("./data/TimeseriesGauge.cjs");
|
|
96
98
|
const TimeseriesCoreBars = require("./data/TimeseriesCoreBars.cjs");
|
|
99
|
+
const WorkloadCard = require("./data/WorkloadCard.cjs");
|
|
100
|
+
const WorkloadCard_model = require("./data/WorkloadCard.model.cjs");
|
|
97
101
|
const TimeseriesCoreBars_model = require("./data/TimeseriesCoreBars.model.cjs");
|
|
98
102
|
const StatusBreakdown = require("./data/StatusBreakdown.cjs");
|
|
99
103
|
const statusBreakdownUtils = require("./data/status-breakdown-utils.cjs");
|
|
@@ -489,6 +493,8 @@ exports.effectiveProperties = jsonSchemaFormResolve.effectiveProperties;
|
|
|
489
493
|
exports.isOpenStringMap = jsonSchemaFormResolve.isOpenStringMap;
|
|
490
494
|
exports.matchesIf = jsonSchemaFormResolve.matchesIf;
|
|
491
495
|
exports.resolveControl = jsonSchemaFormResolve.resolveControl;
|
|
496
|
+
exports.rehydrateRefs = jsonSchemaFormRefs.rehydrateRefs;
|
|
497
|
+
exports.templateValuePre = jsonSchemaFormTemplate.templateValuePre;
|
|
492
498
|
exports.SplitPane = SplitPane.SplitPane;
|
|
493
499
|
exports.AppShell = AppShell.AppShell;
|
|
494
500
|
exports.AppLayout = AppSidebar.AppLayout;
|
|
@@ -559,6 +565,11 @@ exports.assignAxes = TimeseriesPanel_axes.assignAxes;
|
|
|
559
565
|
exports.latestOf = TimeseriesPanel_axes.latestOf;
|
|
560
566
|
exports.TimeseriesGauge = TimeseriesGauge.TimeseriesGauge;
|
|
561
567
|
exports.TimeseriesCoreBars = TimeseriesCoreBars.TimeseriesCoreBars;
|
|
568
|
+
exports.WorkloadCard = WorkloadCard.WorkloadCard;
|
|
569
|
+
exports.formatReplicaCounts = WorkloadCard_model.formatReplicaCounts;
|
|
570
|
+
exports.workloadKindLabel = WorkloadCard_model.workloadKindLabel;
|
|
571
|
+
exports.workloadStatusLabel = WorkloadCard_model.workloadStatusLabel;
|
|
572
|
+
exports.workloadStatusTone = WorkloadCard_model.workloadStatusTone;
|
|
562
573
|
exports.deriveCoreBars = TimeseriesCoreBars_model.deriveCoreBars;
|
|
563
574
|
exports.StackedStatusBar = StatusBreakdown.StackedStatusBar;
|
|
564
575
|
exports.StatusRows = StatusBreakdown.StatusRows;
|
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+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