@tangle-network/ui 11.44.0 → 11.45.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.
- package/CHANGELOG.md +43 -0
- package/dist/_virtual/_rolldown/runtime.js +1 -2
- package/dist/auth/auth.d.ts +1 -3
- package/dist/auth/auth.js +1 -2
- package/dist/auth/login-layout.d.ts +1 -3
- package/dist/auth/login-layout.js +1 -2
- package/dist/chat/agent-timeline.d.ts +1 -3
- package/dist/chat/agent-timeline.js +1 -2
- package/dist/chat/chat-container.d.ts +1 -3
- package/dist/chat/chat-container.js +3 -4
- package/dist/chat/chat-message.d.ts +1 -3
- package/dist/chat/chat-message.js +1 -2
- package/dist/chat/message-author.d.ts +1 -3
- package/dist/chat/message-author.js +1 -2
- package/dist/chat/message-list.d.ts +1 -3
- package/dist/chat/message-list.js +1 -2
- package/dist/chat/synthetic-text.js +1 -2
- package/dist/chat/thinking-indicator.d.ts +1 -3
- package/dist/chat/thinking-indicator.js +1 -2
- package/dist/chat/transcript-text.d.ts +1 -3
- package/dist/chat/transcript-text.js +1 -2
- package/dist/chat/user-message.d.ts +1 -3
- package/dist/chat/user-message.js +1 -2
- package/dist/code-presentation.js +1 -2
- package/dist/editor/document-editor-pane.d.ts +1 -3
- package/dist/editor/document-editor-pane.js +3 -4
- package/dist/editor/editor-lazy.js +1 -2
- package/dist/editor/editor-loading.js +1 -2
- package/dist/editor/editor-peers.js +1 -2
- package/dist/editor/editor-provider.d.ts +1 -3
- package/dist/editor/editor-provider.js +1 -2
- package/dist/editor/editor-toolbar.d.ts +1 -3
- package/dist/editor/editor-toolbar.js +1 -2
- package/dist/editor/markdown-conversion.js +1 -2
- package/dist/editor/markdown-document-editor.js +1 -2
- package/dist/editor/source-markdown-editor.js +1 -2
- package/dist/editor/source-markdown.js +1 -2
- package/dist/editor/tiptap-editor.d.ts +0 -2
- package/dist/editor/tiptap-editor.js +1 -2
- package/dist/editor/use-editor.d.ts +1 -3
- package/dist/editor/use-editor.js +1 -2
- package/dist/files/file-artifact-pane.d.ts +1 -3
- package/dist/files/file-artifact-pane.js +6 -6
- package/dist/files/file-card.d.ts +1 -3
- package/dist/files/file-card.js +1 -2
- package/dist/files/file-format.d.ts +1 -3
- package/dist/files/file-format.js +1 -2
- package/dist/files/file-list.d.ts +1 -3
- package/dist/files/file-list.js +1 -2
- package/dist/files/file-preview.d.ts +1 -3
- package/dist/files/file-preview.js +1 -2
- package/dist/files/file-tabs.d.ts +8 -4
- package/dist/files/file-tabs.js +79 -15
- package/dist/files/file-tree.d.ts +1 -3
- package/dist/files/file-tree.js +1 -2
- package/dist/files/pdf-loader.d.ts +1 -3
- package/dist/files/pdf-loader.js +1 -2
- package/dist/files/pdf-viewer.d.ts +1 -3
- package/dist/files/pdf-viewer.js +1 -2
- package/dist/files/rich-file-tree.d.ts +1 -3
- package/dist/files/rich-file-tree.js +1 -2
- package/dist/hooks/use-auth.d.ts +1 -3
- package/dist/hooks/use-auth.js +1 -2
- package/dist/hooks/use-auto-scroll.d.ts +1 -3
- package/dist/hooks/use-auto-scroll.js +1 -2
- package/dist/hooks/use-dropdown-menu.d.ts +1 -2
- package/dist/hooks/use-dropdown-menu.js +1 -2
- package/dist/hooks/use-live-time.d.ts +1 -3
- package/dist/hooks/use-live-time.js +1 -2
- package/dist/hooks/use-realtime-session.d.ts +1 -3
- package/dist/hooks/use-realtime-session.js +1 -2
- package/dist/hooks/use-run-collapse-state.d.ts +1 -3
- package/dist/hooks/use-run-collapse-state.js +1 -2
- package/dist/hooks/use-run-groups.d.ts +1 -3
- package/dist/hooks/use-run-groups.js +1 -2
- package/dist/hooks/use-sdk-session.d.ts +1 -3
- package/dist/hooks/use-sdk-session.js +1 -2
- package/dist/hooks/use-sse-stream.d.ts +1 -3
- package/dist/hooks/use-sse-stream.js +1 -2
- package/dist/hooks/use-tool-call-stream.d.ts +1 -3
- package/dist/hooks/use-tool-call-stream.js +1 -2
- package/dist/lib/code-presentation.d.ts +1 -3
- package/dist/lib/code-presentation.js +1 -2
- package/dist/lib/control-presentation.d.ts +0 -2
- package/dist/lib/control-presentation.js +1 -2
- package/dist/lib/focus.d.ts +1 -3
- package/dist/lib/focus.js +1 -2
- package/dist/lib/interaction.d.ts +1 -3
- package/dist/lib/interaction.js +1 -2
- package/dist/lib/motion.d.ts +1 -3
- package/dist/lib/motion.js +1 -2
- package/dist/lib/optional-peer.js +1 -2
- package/dist/lib/series.d.ts +1 -3
- package/dist/lib/series.js +1 -2
- package/dist/lib/surface-motion.js +1 -2
- package/dist/lib/utils.d.ts +1 -3
- package/dist/lib/utils.js +1 -2
- package/dist/markdown/api-schema.d.ts +1 -3
- package/dist/markdown/api-schema.js +1 -2
- package/dist/markdown/code-block.d.ts +0 -2
- package/dist/markdown/code-block.js +1 -2
- package/dist/markdown/code-meta.d.ts +1 -3
- package/dist/markdown/code-meta.js +1 -2
- package/dist/markdown/markdown-table.d.ts +1 -3
- package/dist/markdown/markdown-table.js +1 -2
- package/dist/markdown/markdown.d.ts +1 -3
- package/dist/markdown/markdown.js +1 -2
- package/dist/nav.d.ts +0 -2
- package/dist/nav.js +1 -2
- package/dist/openui/openui-artifact-renderer.d.ts +1 -2
- package/dist/openui/openui-artifact-renderer.js +1 -2
- package/dist/openui/schema-compiled.js +1 -2
- package/dist/openui/schema-data.d.ts +1 -3
- package/dist/openui/schema-data.js +1 -2
- package/dist/openui-schema.d.ts +0 -2
- package/dist/openui-schema.js +1 -2
- package/dist/presentation.d.ts +0 -2
- package/dist/presentation.js +1 -2
- package/dist/primitives/alert-dialog.d.ts +0 -2
- package/dist/primitives/alert-dialog.js +1 -2
- package/dist/primitives/alert.d.ts +1 -3
- package/dist/primitives/alert.js +1 -2
- package/dist/primitives/artifact-pane.d.ts +1 -3
- package/dist/primitives/artifact-pane.js +1 -2
- package/dist/primitives/avatar.d.ts +0 -2
- package/dist/primitives/avatar.js +1 -2
- package/dist/primitives/badge.d.ts +0 -2
- package/dist/primitives/badge.js +1 -2
- package/dist/primitives/breadcrumb.d.ts +0 -2
- package/dist/primitives/breadcrumb.js +1 -2
- package/dist/primitives/button.d.ts +0 -2
- package/dist/primitives/button.js +1 -2
- package/dist/primitives/calendar.d.ts +0 -2
- package/dist/primitives/calendar.js +1 -2
- package/dist/primitives/card.d.ts +0 -2
- package/dist/primitives/card.js +1 -2
- package/dist/primitives/checkbox.d.ts +0 -2
- package/dist/primitives/checkbox.js +1 -2
- package/dist/primitives/chip.d.ts +0 -2
- package/dist/primitives/chip.js +1 -2
- package/dist/primitives/code-block.d.ts +0 -2
- package/dist/primitives/code-block.js +1 -2
- package/dist/primitives/collapsible.d.ts +0 -2
- package/dist/primitives/collapsible.js +1 -2
- package/dist/primitives/compliance-badge.d.ts +0 -2
- package/dist/primitives/compliance-badge.js +3 -4
- package/dist/primitives/context-menu.d.ts +0 -2
- package/dist/primitives/context-menu.js +1 -2
- package/dist/primitives/date-picker.d.ts +0 -2
- package/dist/primitives/date-picker.js +1 -2
- package/dist/primitives/dialog.d.ts +0 -2
- package/dist/primitives/dialog.js +3 -4
- package/dist/primitives/drop-zone.d.ts +1 -3
- package/dist/primitives/drop-zone.js +1 -2
- package/dist/primitives/dropdown-menu.d.ts +0 -2
- package/dist/primitives/dropdown-menu.js +1 -2
- package/dist/primitives/empty-state.d.ts +0 -2
- package/dist/primitives/empty-state.js +1 -2
- package/dist/primitives/field.d.ts +1 -3
- package/dist/primitives/field.js +1 -2
- package/dist/primitives/heading.d.ts +0 -2
- package/dist/primitives/heading.js +3 -4
- package/dist/primitives/help-text.d.ts +0 -2
- package/dist/primitives/help-text.js +1 -2
- package/dist/primitives/hover-card.d.ts +0 -2
- package/dist/primitives/hover-card.js +1 -2
- package/dist/primitives/icon-tile.d.ts +0 -2
- package/dist/primitives/icon-tile.js +1 -2
- package/dist/primitives/info-tip.js +1 -2
- package/dist/primitives/input.d.ts +0 -2
- package/dist/primitives/input.js +1 -2
- package/dist/primitives/label.d.ts +0 -2
- package/dist/primitives/label.js +1 -2
- package/dist/primitives/metric-chart.d.ts +0 -2
- package/dist/primitives/metric-chart.js +1 -2
- package/dist/primitives/metric-strip.d.ts +0 -2
- package/dist/primitives/metric-strip.js +1 -2
- package/dist/primitives/page-header.d.ts +0 -2
- package/dist/primitives/page-header.js +1 -2
- package/dist/primitives/page-shell.d.ts +1 -3
- package/dist/primitives/page-shell.js +1 -2
- package/dist/primitives/pagination.d.ts +1 -2
- package/dist/primitives/pagination.js +1 -2
- package/dist/primitives/popover.d.ts +0 -2
- package/dist/primitives/popover.js +1 -2
- package/dist/primitives/progress.d.ts +0 -2
- package/dist/primitives/progress.js +1 -2
- package/dist/primitives/radio-group.d.ts +0 -2
- package/dist/primitives/radio-group.js +1 -2
- package/dist/primitives/segmented-control.d.ts +1 -3
- package/dist/primitives/segmented-control.js +4 -5
- package/dist/primitives/select.d.ts +0 -2
- package/dist/primitives/select.js +1 -2
- package/dist/primitives/separator.d.ts +0 -2
- package/dist/primitives/separator.js +1 -2
- package/dist/primitives/series-sparkline.d.ts +0 -2
- package/dist/primitives/series-sparkline.js +1 -2
- package/dist/primitives/settings.d.ts +1 -3
- package/dist/primitives/settings.js +1 -2
- package/dist/primitives/sheet.d.ts +0 -2
- package/dist/primitives/sheet.js +3 -4
- package/dist/primitives/sidebar-drop-zone.d.ts +1 -3
- package/dist/primitives/sidebar-drop-zone.js +2 -3
- package/dist/primitives/skeleton.d.ts +0 -2
- package/dist/primitives/skeleton.js +1 -2
- package/dist/primitives/slider.d.ts +0 -2
- package/dist/primitives/slider.js +1 -2
- package/dist/primitives/stat-card.d.ts +0 -2
- package/dist/primitives/stat-card.js +1 -2
- package/dist/primitives/status-pill.d.ts +0 -2
- package/dist/primitives/status-pill.js +1 -2
- package/dist/primitives/switch.d.ts +0 -2
- package/dist/primitives/switch.js +1 -2
- package/dist/primitives/table.d.ts +0 -2
- package/dist/primitives/table.js +1 -2
- package/dist/primitives/tabs.d.ts +0 -2
- package/dist/primitives/tabs.js +1 -2
- package/dist/primitives/tag.d.ts +0 -2
- package/dist/primitives/tag.js +1 -2
- package/dist/primitives/terminal-display.d.ts +0 -2
- package/dist/primitives/terminal-display.js +1 -2
- package/dist/primitives/text-shimmer.d.ts +1 -3
- package/dist/primitives/text-shimmer.js +1 -2
- package/dist/primitives/theme-toggle.d.ts +1 -2
- package/dist/primitives/theme-toggle.js +1 -2
- package/dist/primitives/time-select.d.ts +0 -2
- package/dist/primitives/time-select.js +1 -2
- package/dist/primitives/toast.d.ts +1 -2
- package/dist/primitives/toast.js +1 -2
- package/dist/primitives/tone.d.ts +1 -3
- package/dist/primitives/tone.js +1 -2
- package/dist/primitives/toolbar.d.ts +0 -2
- package/dist/primitives/toolbar.js +1 -2
- package/dist/primitives/tooltip.d.ts +0 -2
- package/dist/primitives/tooltip.js +1 -2
- package/dist/primitives/upload-progress.d.ts +1 -3
- package/dist/primitives/upload-progress.js +1 -2
- package/dist/primitives/wizard.d.ts +1 -3
- package/dist/primitives/wizard.js +1 -2
- package/dist/redaction/redacted-document.d.ts +1 -3
- package/dist/redaction/redacted-document.js +1 -2
- package/dist/redaction.js +1 -2
- package/dist/run/approval-card.d.ts +1 -3
- package/dist/run/approval-card.js +1 -2
- package/dist/run/expandable-content.js +1 -2
- package/dist/run/expanded-tool-detail.d.ts +1 -3
- package/dist/run/expanded-tool-detail.js +1 -2
- package/dist/run/inline-thinking-item.d.ts +1 -3
- package/dist/run/inline-thinking-item.js +1 -2
- package/dist/run/inline-tool-item.d.ts +1 -3
- package/dist/run/inline-tool-item.js +1 -2
- package/dist/run/run-group.d.ts +1 -3
- package/dist/run/run-group.js +1 -2
- package/dist/run/run-item-primitives.d.ts +1 -3
- package/dist/run/run-item-primitives.js +1 -2
- package/dist/run/run-phase-list.d.ts +1 -3
- package/dist/run/run-phase-list.js +1 -2
- package/dist/run/run-row-shell.d.ts +1 -3
- package/dist/run/run-row-shell.js +1 -2
- package/dist/run/task-list.d.ts +1 -3
- package/dist/run/task-list.js +1 -2
- package/dist/run/tool-call-feed.d.ts +1 -3
- package/dist/run/tool-call-feed.js +1 -2
- package/dist/run/tool-call-step.d.ts +1 -3
- package/dist/run/tool-call-step.js +1 -2
- package/dist/stores/active-sessions-store.d.ts +1 -3
- package/dist/stores/active-sessions-store.js +1 -2
- package/dist/stores/chat-store.d.ts +1 -3
- package/dist/stores/chat-store.js +1 -2
- package/dist/tool-previews/command-preview.d.ts +1 -3
- package/dist/tool-previews/command-preview.js +1 -2
- package/dist/tool-previews/diff-preview.d.ts +1 -3
- package/dist/tool-previews/diff-preview.js +1 -2
- package/dist/tool-previews/glob-results-preview.d.ts +1 -3
- package/dist/tool-previews/glob-results-preview.js +1 -2
- package/dist/tool-previews/grep-results-preview.d.ts +1 -3
- package/dist/tool-previews/grep-results-preview.js +1 -2
- package/dist/tool-previews/preview-primitives.js +1 -2
- package/dist/tool-previews/question-preview.d.ts +1 -3
- package/dist/tool-previews/question-preview.js +1 -2
- package/dist/tool-previews/web-search-preview.d.ts +1 -3
- package/dist/tool-previews/web-search-preview.js +1 -2
- package/dist/tool-previews/write-file-preview.d.ts +1 -3
- package/dist/tool-previews/write-file-preview.js +1 -2
- package/dist/types/branding.d.ts +1 -3
- package/dist/types/message.d.ts +1 -3
- package/dist/types/parts.d.ts +1 -3
- package/dist/types/run.d.ts +1 -3
- package/dist/types/tool-display.d.ts +1 -3
- package/dist/utils/copy-text.d.ts +1 -3
- package/dist/utils/copy-text.js +1 -2
- package/dist/utils/format.d.ts +1 -3
- package/dist/utils/format.js +1 -2
- package/dist/utils/time-ago.d.ts +1 -3
- package/dist/utils/time-ago.js +1 -2
- package/dist/utils/tool-display.d.ts +1 -3
- package/dist/utils/tool-display.js +1 -2
- package/package.json +38 -38
- package/src/files/file-artifact-pane.tsx +1 -0
- package/src/files/file-tabs.test.tsx +66 -0
- package/src/files/file-tabs.tsx +77 -17
- package/src/primitives/heading.tsx +2 -2
- package/src/primitives/sidebar-drop-zone.tsx +1 -1
- package/src/styles/presentation.css +3 -3
package/dist/primitives/sheet.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { surfaceMotion } from "../lib/motion.js";
|
|
3
|
-
import
|
|
3
|
+
import "../lib/focus.js";
|
|
4
4
|
import { cn } from "../lib/utils.js";
|
|
5
5
|
import { SurfaceMotion } from "../lib/surface-motion.js";
|
|
6
6
|
import { cva } from "class-variance-authority";
|
|
@@ -8,7 +8,7 @@ import * as React from "react";
|
|
|
8
8
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
10
10
|
import { X } from "lucide-react";
|
|
11
|
-
|
|
11
|
+
// src/primitives/sheet.tsx
|
|
12
12
|
/** A dialog that slides in from an edge: a mobile nav drawer or a side panel. */
|
|
13
13
|
const Sheet = SheetPrimitive.Root;
|
|
14
14
|
const SheetTrigger = SheetPrimitive.Trigger;
|
|
@@ -45,7 +45,7 @@ const SheetContent = React.forwardRef(({ className, children, side = "right", hi
|
|
|
45
45
|
side: side ?? "right",
|
|
46
46
|
asChild,
|
|
47
47
|
children: [children, !hideCloseButton && /* @__PURE__ */ jsxs(SheetPrimitive.Close, {
|
|
48
|
-
className: cn("absolute top-4 right-4 rounded-sm text-muted-foreground opacity-70 transition-[opacity,box-shadow] hover:opacity-100 focus-visible:opacity-100 disabled:pointer-events-none", "[transition:color_var(--motion-control),background-color_var(--motion-control),border-color_var(--motion-control),box-shadow_var(--motion-control),transform_var(--motion-control),scale_var(--motion-control),opacity_var(--motion-control)] motion-reduce:transition-none",
|
|
48
|
+
className: cn("absolute top-4 right-4 rounded-sm text-muted-foreground opacity-70 transition-[opacity,box-shadow] hover:opacity-100 focus-visible:opacity-100 disabled:pointer-events-none", "[transition:color_var(--motion-control),background-color_var(--motion-control),border-color_var(--motion-control),box-shadow_var(--motion-control),transform_var(--motion-control),scale_var(--motion-control),opacity_var(--motion-control)] motion-reduce:transition-none", "focus-visible:outline-1 focus-visible:outline-[var(--focus-border)] focus-visible:ring-4 focus-visible:ring-[var(--focus-halo)] focus-visible:outline-offset-0"),
|
|
49
49
|
children: [/* @__PURE__ */ jsx(X, { className: "size-4" }), /* @__PURE__ */ jsx("span", {
|
|
50
50
|
className: "sr-only",
|
|
51
51
|
children: "Close"
|
|
@@ -76,5 +76,4 @@ const SheetDescription = React.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
76
76
|
...props
|
|
77
77
|
}));
|
|
78
78
|
SheetDescription.displayName = SheetPrimitive.Description.displayName;
|
|
79
|
-
//#endregion
|
|
80
79
|
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
//#region src/primitives/sidebar-drop-zone.d.ts
|
|
3
2
|
export interface SidebarDropZoneProps {
|
|
4
3
|
/** Called with dropped files */
|
|
5
4
|
onDrop: (files: File[]) => void;
|
|
@@ -17,5 +16,4 @@ export interface SidebarDropZoneProps {
|
|
|
17
16
|
persistent?: boolean;
|
|
18
17
|
className?: string;
|
|
19
18
|
}
|
|
20
|
-
export declare function SidebarDropZone({ onDrop, accept, disabled, title, description, icon, persistent, className }: SidebarDropZoneProps): import("react").JSX.Element;
|
|
21
|
-
//#endregion
|
|
19
|
+
export declare function SidebarDropZone({ onDrop, accept, disabled, title, description, icon, persistent, className }: SidebarDropZoneProps): import("react").JSX.Element;
|
|
@@ -2,7 +2,7 @@ import { cn } from "../lib/utils.js";
|
|
|
2
2
|
import { useCallback, useRef, useState } from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Upload } from "lucide-react";
|
|
5
|
-
|
|
5
|
+
// src/primitives/sidebar-drop-zone.tsx
|
|
6
6
|
/**
|
|
7
7
|
* SidebarDropZone — compact scoped drop zone for sidebar panels and narrow containers.
|
|
8
8
|
*
|
|
@@ -64,7 +64,7 @@ function SidebarDropZone({ onDrop, accept, disabled, title = "Drop files here",
|
|
|
64
64
|
onDragLeave: handleDragLeave,
|
|
65
65
|
onDragOver: handleDragOver,
|
|
66
66
|
onDrop: handleDrop,
|
|
67
|
-
className: cn("rounded-lg border-2 border-dashed transition-all duration-150", isVisible ? "p-4" : "p-0 border-transparent", dragOver ? "border-[var(--brand-cool,hsl(var(--ring)))] bg-[var(--accent-surface-soft)]" : persistent ? "border-[var(--border-subtle,hsl(var(--border)))] bg-transparent hover:border-[var(--border-
|
|
67
|
+
className: cn("rounded-lg border-2 border-dashed transition-all duration-150", isVisible ? "p-4" : "p-0 border-transparent", dragOver ? "border-[var(--brand-cool,hsl(var(--ring)))] bg-[var(--accent-surface-soft)]" : persistent ? "border-[var(--border-subtle,hsl(var(--border)))] bg-transparent hover:border-[var(--border-strong)] hover:bg-[var(--bg-hover,hsl(var(--accent)))]" : "", disabled && "opacity-50 pointer-events-none", className),
|
|
68
68
|
children: isVisible && /* @__PURE__ */ jsxs("div", {
|
|
69
69
|
className: "flex flex-col items-center gap-2 text-center",
|
|
70
70
|
children: [
|
|
@@ -84,5 +84,4 @@ function SidebarDropZone({ onDrop, accept, disabled, title = "Drop files here",
|
|
|
84
84
|
})
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
-
//#endregion
|
|
88
87
|
export { SidebarDropZone };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/primitives/skeleton.d.ts
|
|
2
1
|
declare function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>): import("react").JSX.Element;
|
|
3
2
|
declare function SkeletonCard({ className }: {
|
|
4
3
|
className?: string;
|
|
@@ -6,5 +5,4 @@ declare function SkeletonCard({ className }: {
|
|
|
6
5
|
declare function SkeletonTable({ rows }: {
|
|
7
6
|
rows?: number;
|
|
8
7
|
}): import("react").JSX.Element;
|
|
9
|
-
//#endregion
|
|
10
8
|
export { Skeleton, SkeletonCard, SkeletonTable };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/primitives/skeleton.tsx
|
|
4
4
|
function Skeleton({ className, ...props }) {
|
|
5
5
|
return /* @__PURE__ */ jsx("div", {
|
|
6
6
|
className: cn("animate-pulse motion-reduce:animate-none rounded-lg bg-muted/50", className),
|
|
@@ -46,5 +46,4 @@ function SkeletonTable({ rows = 5 }) {
|
|
|
46
46
|
}, i))]
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
//#endregion
|
|
50
49
|
export { Skeleton, SkeletonCard, SkeletonTable };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
3
|
-
//#region src/primitives/slider.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Range input with one thumb per value. A single value renders one thumb; an
|
|
6
5
|
* array of two renders a range. The thumbs are what assistive technology
|
|
@@ -10,5 +9,4 @@ import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
|
10
9
|
declare const Slider: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & {
|
|
11
10
|
thumbLabels?: string[];
|
|
12
11
|
} & React.RefAttributes<HTMLSpanElement>>;
|
|
13
|
-
//#endregion
|
|
14
12
|
export { Slider };
|
|
@@ -4,7 +4,7 @@ import { cn } from "../lib/utils.js";
|
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import * as SliderPrimitive from "@radix-ui/react-slider";
|
|
7
|
-
|
|
7
|
+
// src/primitives/slider.tsx
|
|
8
8
|
/**
|
|
9
9
|
* Range input with one thumb per value. A single value renders one thumb; an
|
|
10
10
|
* array of two renders a range. The thumbs are what assistive technology
|
|
@@ -33,5 +33,4 @@ const Slider = React.forwardRef(({ className, defaultValue, value, min = 0, max
|
|
|
33
33
|
});
|
|
34
34
|
});
|
|
35
35
|
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
36
|
-
//#endregion
|
|
37
36
|
export { Slider };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
//#region src/primitives/stat-card.d.ts
|
|
3
2
|
export interface StatCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
3
|
variant?: "default" | "sandbox";
|
|
5
4
|
title: string;
|
|
@@ -12,5 +11,4 @@ export interface StatCardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
12
11
|
};
|
|
13
12
|
}
|
|
14
13
|
declare const StatCard: React.ForwardRefExoticComponent<StatCardProps & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
-
//#endregion
|
|
16
14
|
export { StatCard };
|
|
@@ -2,7 +2,7 @@ import { cn } from "../lib/utils.js";
|
|
|
2
2
|
import { Card } from "./card.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/primitives/stat-card.tsx
|
|
6
6
|
const StatCard = React.forwardRef(({ className, variant = "default", title, value, subtitle, icon, trend, ...props }, ref) => {
|
|
7
7
|
const iconColors = {
|
|
8
8
|
default: "text-muted-foreground",
|
|
@@ -56,5 +56,4 @@ const StatCard = React.forwardRef(({ className, variant = "default", title, valu
|
|
|
56
56
|
});
|
|
57
57
|
});
|
|
58
58
|
StatCard.displayName = "StatCard";
|
|
59
|
-
//#endregion
|
|
60
59
|
export { StatCard };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
//#region src/primitives/status-pill.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* A run/resource state, told three ways at once.
|
|
5
4
|
*
|
|
@@ -42,5 +41,4 @@ export interface StatusPillProps extends Omit<React.HTMLAttributes<HTMLSpanEleme
|
|
|
42
41
|
size?: "sm" | "md";
|
|
43
42
|
}
|
|
44
43
|
declare const StatusPill: React.ForwardRefExoticComponent<StatusPillProps & React.RefAttributes<HTMLSpanElement>>;
|
|
45
|
-
//#endregion
|
|
46
44
|
export { StatusPill };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/primitives/status-pill.tsx
|
|
5
5
|
const TONE_SURFACE = {
|
|
6
6
|
violet: "bg-[var(--surface-violet-bg)] text-[var(--surface-violet-text)] border-[var(--surface-violet-border)]",
|
|
7
7
|
success: "bg-[var(--surface-success-bg)] text-[var(--surface-success-text)] border-[var(--surface-success-border)]",
|
|
@@ -118,5 +118,4 @@ const StatusPill = React.forwardRef(({ className, tone, children, icon, bare = f
|
|
|
118
118
|
}), children]
|
|
119
119
|
}));
|
|
120
120
|
StatusPill.displayName = "StatusPill";
|
|
121
|
-
//#endregion
|
|
122
121
|
export { StatusPill };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
3
|
-
//#region src/primitives/switch.d.ts
|
|
4
3
|
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
//#endregion
|
|
6
4
|
export { Switch };
|
|
@@ -4,7 +4,7 @@ import { cn } from "../lib/utils.js";
|
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import * as SwitchPrimitives from "@radix-ui/react-switch";
|
|
7
|
-
|
|
7
|
+
// src/primitives/switch.tsx
|
|
8
8
|
const Switch = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SwitchPrimitives.Root, {
|
|
9
9
|
className: cn("relative pointer-coarse:before:absolute pointer-coarse:before:-inset-x-1.5 pointer-coarse:before:-inset-y-3.5 pointer-coarse:before:content-['']", "peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 shadow-sm transition-[background-color,border-color,box-shadow] disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-transparent data-[state=checked]:bg-[var(--accent-text)] data-[state=unchecked]:border-muted-foreground data-[state=unchecked]:bg-transparent", focusRing, className),
|
|
10
10
|
...props,
|
|
@@ -12,5 +12,4 @@ const Switch = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
12
12
|
children: /* @__PURE__ */ jsx(SwitchPrimitives.Thumb, { className: cn("pointer-events-none block h-4 w-4 rounded-full shadow-lg ring-0 transition-[translate,background-color] data-[state=checked]:translate-x-4 data-[state=checked]:bg-card data-[state=unchecked]:translate-x-0 data-[state=unchecked]:bg-muted-foreground") })
|
|
13
13
|
}));
|
|
14
14
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
15
|
-
//#endregion
|
|
16
15
|
export { Switch };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
//#region src/primitives/table.d.ts
|
|
3
2
|
export interface TableProps extends React.TableHTMLAttributes<HTMLTableElement> {
|
|
4
3
|
/** Keep the existing scroll wrapper by default; false returns only the native table. */
|
|
5
4
|
wrapper?: boolean;
|
|
@@ -18,5 +17,4 @@ declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTM
|
|
|
18
17
|
declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
19
18
|
declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
20
19
|
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
21
|
-
//#endregion
|
|
22
20
|
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
package/dist/primitives/table.js
CHANGED
|
@@ -2,7 +2,7 @@ import { cn } from "../lib/utils.js";
|
|
|
2
2
|
import { tablePresentation } from "../presentation.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/primitives/table.tsx
|
|
6
6
|
const Table = React.forwardRef(({ className, wrapper = true, wrapperProps, ...props }, ref) => {
|
|
7
7
|
const table = /* @__PURE__ */ jsx("table", {
|
|
8
8
|
ref,
|
|
@@ -60,5 +60,4 @@ const TableCaption = React.forwardRef(({ className, ...props }, ref) => /* @__PU
|
|
|
60
60
|
...props
|
|
61
61
|
}));
|
|
62
62
|
TableCaption.displayName = "TableCaption";
|
|
63
|
-
//#endregion
|
|
64
63
|
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
|
-
//#region src/primitives/tabs.d.ts
|
|
4
3
|
declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
5
4
|
declare const TabsList: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
6
5
|
variant?: "default" | "pills" | "underline";
|
|
@@ -9,5 +8,4 @@ declare const TabsTrigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.Ta
|
|
|
9
8
|
variant?: "default" | "pills" | "underline";
|
|
10
9
|
} & React.RefAttributes<HTMLButtonElement>>;
|
|
11
10
|
declare const TabsContent: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
-
//#endregion
|
|
13
11
|
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
package/dist/primitives/tabs.js
CHANGED
|
@@ -4,7 +4,7 @@ import { tabsPresentation } from "../presentation.js";
|
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { jsx } from "react/jsx-runtime";
|
|
6
6
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
7
|
-
|
|
7
|
+
// src/primitives/tabs.tsx
|
|
8
8
|
const Tabs = TabsPrimitive.Root;
|
|
9
9
|
const TabsList = React.forwardRef(({ className, variant = "default", ...props }, ref) => {
|
|
10
10
|
return /* @__PURE__ */ jsx(TabsPrimitive.List, {
|
|
@@ -28,5 +28,4 @@ const TabsContent = React.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
28
28
|
...props
|
|
29
29
|
}));
|
|
30
30
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
31
|
-
//#endregion
|
|
32
31
|
export { Tabs, TabsContent, TabsList, TabsTrigger };
|
package/dist/primitives/tag.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { Tone } from "./tone.js";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
//#region src/primitives/tag.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* A static label for what something IS: a category, a kind, a named value.
|
|
6
5
|
*
|
|
@@ -38,5 +37,4 @@ export interface TagProps extends Omit<React.HTMLAttributes<HTMLSpanElement>, "c
|
|
|
38
37
|
wrap?: boolean;
|
|
39
38
|
}
|
|
40
39
|
declare const Tag: React.ForwardRefExoticComponent<TagProps & React.RefAttributes<HTMLSpanElement>>;
|
|
41
|
-
//#endregion
|
|
42
40
|
export { Tag };
|
package/dist/primitives/tag.js
CHANGED
|
@@ -4,7 +4,7 @@ import { TONE_CLASSES } from "./tone.js";
|
|
|
4
4
|
import * as React from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
6
|
import { X } from "lucide-react";
|
|
7
|
-
|
|
7
|
+
// src/primitives/tag.tsx
|
|
8
8
|
const SIZE = {
|
|
9
9
|
sm: "gap-1 px-2 text-xs [&_svg]:size-3",
|
|
10
10
|
md: "gap-1.5 px-2.5 text-sm [&_svg]:size-3.5"
|
|
@@ -53,5 +53,4 @@ const Tag = React.forwardRef(({ className, children, tone = "neutral", emphasis
|
|
|
53
53
|
});
|
|
54
54
|
});
|
|
55
55
|
Tag.displayName = "Tag";
|
|
56
|
-
//#endregion
|
|
57
56
|
export { Tag };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
//#region src/primitives/terminal-display.d.ts
|
|
3
2
|
export interface TerminalDisplayProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
3
|
variant?: "default" | "sandbox";
|
|
5
4
|
title?: string;
|
|
@@ -21,5 +20,4 @@ export interface TerminalInputProps extends Omit<React.InputHTMLAttributes<HTMLI
|
|
|
21
20
|
variant?: "default" | "sandbox";
|
|
22
21
|
}
|
|
23
22
|
declare const TerminalInput: React.ForwardRefExoticComponent<TerminalInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
24
|
-
//#endregion
|
|
25
23
|
export { TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine };
|
|
@@ -3,7 +3,7 @@ import { cn } from "../lib/utils.js";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { useEffect, useRef } from "react";
|
|
5
5
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
-
|
|
6
|
+
// src/primitives/terminal-display.tsx
|
|
7
7
|
const TerminalDisplay = React.forwardRef(({ className, variant = "default", title = "Terminal", showHeader = true, autoScroll = true, maxHeight = "400px", children, ...props }, ref) => {
|
|
8
8
|
const containerRef = useRef(null);
|
|
9
9
|
useEffect(() => {
|
|
@@ -105,5 +105,4 @@ const TerminalInput = React.forwardRef(({ className, onSubmit, variant: _variant
|
|
|
105
105
|
});
|
|
106
106
|
});
|
|
107
107
|
TerminalInput.displayName = "TerminalInput";
|
|
108
|
-
//#endregion
|
|
109
108
|
export { TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
//#region src/primitives/text-shimmer.d.ts
|
|
3
2
|
export interface TextShimmerProps {
|
|
4
3
|
children: ReactNode;
|
|
5
4
|
className?: string;
|
|
@@ -12,5 +11,4 @@ export interface TextShimmerProps {
|
|
|
12
11
|
* styles it needs, so a consumer that only scans this package for Tailwind
|
|
13
12
|
* classes still gets the animation.
|
|
14
13
|
*/
|
|
15
|
-
export declare function TextShimmer({ children, className, durationMs }: TextShimmerProps): import("react").JSX.Element;
|
|
16
|
-
//#endregion
|
|
14
|
+
export declare function TextShimmer({ children, className, durationMs }: TextShimmerProps): import("react").JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import { useEffect, useLayoutEffect } from "react";
|
|
3
3
|
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/primitives/text-shimmer.tsx
|
|
5
5
|
const CLASS_NAME = "tangle-text-shimmer";
|
|
6
6
|
const STYLE_ID = "tangle-text-shimmer-styles";
|
|
7
7
|
/**
|
|
@@ -60,5 +60,4 @@ function TextShimmer({ children, className, durationMs = 1400 }) {
|
|
|
60
60
|
children
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
//#endregion
|
|
64
63
|
export { TextShimmer };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/primitives/theme-toggle.d.ts
|
|
2
1
|
type Theme = "light" | "dark" | "system";
|
|
3
2
|
type Mode = Exclude<Theme, "system">;
|
|
4
3
|
declare function setTheme(next: Theme): void;
|
|
@@ -8,4 +7,4 @@ export declare function useTheme(): {
|
|
|
8
7
|
resolvedTheme: Mode;
|
|
9
8
|
};
|
|
10
9
|
export declare function ThemeToggle(): import("react").JSX.Element;
|
|
11
|
-
|
|
10
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useEffect, useSyncExternalStore } from "react";
|
|
2
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
|
|
3
|
+
// src/primitives/theme-toggle.tsx
|
|
4
4
|
const preferenceEvent = "tangle:theme-preference";
|
|
5
5
|
const systemQuery = "(prefers-color-scheme: dark)";
|
|
6
6
|
const namedModes = [
|
|
@@ -158,5 +158,4 @@ function ThemeToggle() {
|
|
|
158
158
|
children: resolvedTheme === "dark" ? /* @__PURE__ */ jsx(SunIcon, {}) : /* @__PURE__ */ jsx(MoonIcon, {})
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
|
-
//#endregion
|
|
162
161
|
export { ThemeToggle, useTheme };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { ControlSize } from "../lib/control-presentation.js";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
//#region src/primitives/time-select.d.ts
|
|
4
3
|
export interface TimeSelectProps {
|
|
5
4
|
/** `HH:MM`, 24-hour, the value a native time input reports. */
|
|
6
5
|
value?: string;
|
|
@@ -23,5 +22,4 @@ export interface TimeSelectProps {
|
|
|
23
22
|
* slots stays listed so the current time is never lost.
|
|
24
23
|
*/
|
|
25
24
|
declare const TimeSelect: React.ForwardRefExoticComponent<TimeSelectProps & React.RefAttributes<HTMLButtonElement>>;
|
|
26
|
-
//#endregion
|
|
27
25
|
export { TimeSelect };
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "./select.js";
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
|
|
5
|
+
// src/primitives/time-select.tsx
|
|
6
6
|
const TIME_PATTERN = /^([01]\d|2[0-3]):([0-5]\d)$/;
|
|
7
7
|
/**
|
|
8
8
|
* A time of day as a Select on the control scale: the day in `step`-minute
|
|
@@ -47,5 +47,4 @@ const TimeSelect = React.forwardRef(({ value, onChange, step = 15, placeholder =
|
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
TimeSelect.displayName = "TimeSelect";
|
|
50
|
-
//#endregion
|
|
51
50
|
export { TimeSelect };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
//#region src/primitives/toast.d.ts
|
|
3
2
|
export interface Toast {
|
|
4
3
|
id: string;
|
|
5
4
|
title: string;
|
|
@@ -26,4 +25,4 @@ export declare function ToastProvider({ children }: {
|
|
|
26
25
|
children: React.ReactNode;
|
|
27
26
|
}): React.JSX.Element;
|
|
28
27
|
export declare function useToast(): ToastContextValue;
|
|
29
|
-
|
|
28
|
+
export {};
|
package/dist/primitives/toast.js
CHANGED
|
@@ -5,7 +5,7 @@ import { cva } from "class-variance-authority";
|
|
|
5
5
|
import * as React from "react";
|
|
6
6
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
7
|
import { AlertCircle, AlertTriangle, CheckCircle2, Info, X } from "lucide-react";
|
|
8
|
-
|
|
8
|
+
// src/primitives/toast.tsx
|
|
9
9
|
const toastVariants = cva("pointer-events-auto relative flex w-full items-center justify-between gap-3 overflow-hidden rounded-lg border p-4 shadow-lg transition-all", {
|
|
10
10
|
variants: { variant: {
|
|
11
11
|
default: "border-border bg-background text-foreground",
|
|
@@ -151,5 +151,4 @@ function useToast() {
|
|
|
151
151
|
if (!context) throw new Error("useToast must be used within a ToastProvider");
|
|
152
152
|
return context;
|
|
153
153
|
}
|
|
154
|
-
//#endregion
|
|
155
154
|
export { ToastContainer, ToastProvider, useToast };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/primitives/tone.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Categorical tones: the colours that tell KINDS of things apart — an entity,
|
|
4
3
|
* a file type, a channel, a capability. A category never reports a state; that
|
|
@@ -36,5 +35,4 @@ export declare const TONE_CLASSES: Record<Tone, ToneClasses>;
|
|
|
36
35
|
* The same key always gets the same tone, in every product and session.
|
|
37
36
|
* Distinct keys can share a tone, so the label or glyph must still name it.
|
|
38
37
|
*/
|
|
39
|
-
export declare function toneFor(key: string): CategoryTone;
|
|
40
|
-
//#endregion
|
|
38
|
+
export declare function toneFor(key: string): CategoryTone;
|
package/dist/primitives/tone.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/primitives/tone.ts
|
|
2
2
|
/**
|
|
3
3
|
* Categorical tones: the colours that tell KINDS of things apart — an entity,
|
|
4
4
|
* a file type, a channel, a capability. A category never reports a state; that
|
|
@@ -102,5 +102,4 @@ function toneFor(key) {
|
|
|
102
102
|
}
|
|
103
103
|
return CATEGORY_TONES[(hash >>> 0) % CATEGORY_TONES.length];
|
|
104
104
|
}
|
|
105
|
-
//#endregion
|
|
106
105
|
export { CATEGORY_TONES, TONE_CLASSES, toneFor };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
//#region src/primitives/toolbar.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* The control row above a table or list: search, filters, then the view switch.
|
|
5
4
|
*
|
|
@@ -53,5 +52,4 @@ export interface FilterFieldProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
53
52
|
htmlFor?: string;
|
|
54
53
|
}
|
|
55
54
|
declare const FilterField: React.ForwardRefExoticComponent<FilterFieldProps & React.RefAttributes<HTMLDivElement>>;
|
|
56
|
-
//#endregion
|
|
57
55
|
export { FilterField, Toolbar };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { cn } from "../lib/utils.js";
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
-
|
|
4
|
+
// src/primitives/toolbar.tsx
|
|
5
5
|
const Toolbar = React.forwardRef(({ className, search, filters, actions, ...props }, ref) => /* @__PURE__ */ jsxs("div", {
|
|
6
6
|
ref,
|
|
7
7
|
className: cn("mb-4 flex flex-col gap-3 lg:flex-row lg:items-center [--field-surface:hsl(var(--card))]", className),
|
|
@@ -33,5 +33,4 @@ const FilterField = React.forwardRef(({ className, label, htmlFor, children, ...
|
|
|
33
33
|
}), children]
|
|
34
34
|
}));
|
|
35
35
|
FilterField.displayName = "FilterField";
|
|
36
|
-
//#endregion
|
|
37
36
|
export { FilterField, Toolbar };
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
3
|
-
//#region src/primitives/tooltip.d.ts
|
|
4
3
|
declare function TooltipProvider({ delayDuration, skipDelayDuration, ...props }: React.ComponentProps<typeof TooltipPrimitive.Provider>): React.JSX.Element;
|
|
5
4
|
declare namespace TooltipProvider {
|
|
6
5
|
var displayName: string;
|
|
@@ -18,5 +17,4 @@ declare const TooltipContent: React.ForwardRefExoticComponent<Omit<TooltipPrimit
|
|
|
18
17
|
/** Render through a portal; use false to keep content in its local owner. */
|
|
19
18
|
portal?: boolean;
|
|
20
19
|
} & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
-
//#endregion
|
|
22
20
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -6,7 +6,7 @@ import { Slottable } from "@radix-ui/react-slot";
|
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
import { jsx } from "react/jsx-runtime";
|
|
8
8
|
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
9
|
-
|
|
9
|
+
// src/primitives/tooltip.tsx
|
|
10
10
|
/**
|
|
11
11
|
* Wrap an app (or a toolbar) once. The open delay applies to the first tooltip;
|
|
12
12
|
* moving between triggers inside `skipDelayDuration` opens the next one at
|
|
@@ -51,5 +51,4 @@ const TooltipContent = React.forwardRef(({ className, sideOffset = 6, asChild, c
|
|
|
51
51
|
return portal ? /* @__PURE__ */ jsx(TooltipPrimitive.Portal, { children: content }) : content;
|
|
52
52
|
});
|
|
53
53
|
TooltipContent.displayName = TooltipPrimitive.Content.displayName;
|
|
54
|
-
//#endregion
|
|
55
54
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/primitives/upload-progress.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* UploadProgress — file upload status indicators.
|
|
4
3
|
*
|
|
@@ -19,5 +18,4 @@ export interface UploadProgressProps {
|
|
|
19
18
|
onRetry?: (id: string) => void;
|
|
20
19
|
className?: string;
|
|
21
20
|
}
|
|
22
|
-
export declare function UploadProgress({ files, onRemove, onRetry, className }: UploadProgressProps): import("react").JSX.Element | null;
|
|
23
|
-
//#endregion
|
|
21
|
+
export declare function UploadProgress({ files, onRemove, onRetry, className }: UploadProgressProps): import("react").JSX.Element | null;
|
|
@@ -2,7 +2,7 @@ import { cn } from "../lib/utils.js";
|
|
|
2
2
|
import { Button } from "./button.js";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { AlertCircle, CheckCircle2, FileText, Loader2, RefreshCw, X } from "lucide-react";
|
|
5
|
-
|
|
5
|
+
// src/primitives/upload-progress.tsx
|
|
6
6
|
/**
|
|
7
7
|
* UploadProgress — file upload status indicators.
|
|
8
8
|
*
|
|
@@ -73,5 +73,4 @@ function UploadProgress({ files, onRemove, onRetry, className }) {
|
|
|
73
73
|
}, file.id))
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
//#endregion
|
|
77
76
|
export { UploadProgress };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
//#region src/primitives/wizard.d.ts
|
|
3
2
|
export interface WizardProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
4
3
|
children: React.ReactNode;
|
|
5
4
|
/** Drives the active step; omit for uncontrolled with `defaultStep`. */
|
|
@@ -26,5 +25,4 @@ export interface WizardStepProps {
|
|
|
26
25
|
export declare function WizardStep({ title, children, nextLabel, onNext, nextDisabled, hideBack }: WizardStepProps): React.JSX.Element;
|
|
27
26
|
export interface Wizard extends React.FC<WizardProps> {
|
|
28
27
|
Step: typeof WizardStep;
|
|
29
|
-
}
|
|
30
|
-
//#endregion
|
|
28
|
+
}
|
|
@@ -3,7 +3,7 @@ import { Button } from "./button.js";
|
|
|
3
3
|
import * as React from "react";
|
|
4
4
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { Check, ChevronLeft } from "lucide-react";
|
|
6
|
-
|
|
6
|
+
// src/primitives/wizard.tsx
|
|
7
7
|
const WizardContext = React.createContext(null);
|
|
8
8
|
function useWizardContext(component) {
|
|
9
9
|
const context = React.useContext(WizardContext);
|
|
@@ -154,5 +154,4 @@ function WizardStep({ title, children, nextLabel, onNext, nextDisabled, hideBack
|
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
156
|
Wizard.Step = WizardStep;
|
|
157
|
-
//#endregion
|
|
158
157
|
export { Wizard, WizardStep };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ReactNode } from "react";
|
|
2
|
-
//#region src/redaction/redacted-document.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Viewer for a server-produced redacted document. Renders text inline and each
|
|
5
4
|
* redacted span as a masked chip; clicking a chip asks the server to reveal that
|
|
@@ -37,5 +36,4 @@ export interface RedactedDocumentProps {
|
|
|
37
36
|
labelForKind?: (kind: string) => string;
|
|
38
37
|
className?: string;
|
|
39
38
|
}
|
|
40
|
-
export declare function RedactedDocument({ document, onReveal, labelForKind, className }: RedactedDocumentProps): ReactNode;
|
|
41
|
-
//#endregion
|
|
39
|
+
export declare function RedactedDocument({ document, onReveal, labelForKind, className }: RedactedDocumentProps): ReactNode;
|
|
@@ -2,7 +2,7 @@ import { cn } from "../lib/utils.js";
|
|
|
2
2
|
import { useCallback, useState } from "react";
|
|
3
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
4
|
import { Eye, EyeOff, Loader2, ShieldAlert } from "lucide-react";
|
|
5
|
-
|
|
5
|
+
// src/redaction/redacted-document.tsx
|
|
6
6
|
const defaultLabel = (kind) => kind.replace(/[-_]/g, " ").toUpperCase();
|
|
7
7
|
function RedactedChip({ kind, label, onReveal }) {
|
|
8
8
|
const [state, setState] = useState({ status: "masked" });
|
|
@@ -70,5 +70,4 @@ function RedactedDocument({ document, onReveal, labelForKind = defaultLabel, cla
|
|
|
70
70
|
}, seg.id))
|
|
71
71
|
});
|
|
72
72
|
}
|
|
73
|
-
//#endregion
|
|
74
73
|
export { RedactedDocument };
|
package/dist/redaction.js
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export { RedactedDocument };
|
|
1
|
+
export { RedactedDocument } from "./redaction/redacted-document.js";
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from "react";
|
|
2
|
-
//#region src/run/approval-card.d.ts
|
|
3
2
|
export interface ApprovalDiffFile {
|
|
4
3
|
path: string;
|
|
5
4
|
change?: "added" | "modified" | "deleted";
|
|
@@ -42,5 +41,4 @@ export declare function ApprovalDiffSummary({ files, note }: {
|
|
|
42
41
|
* where, its step in a plan, the files it writes, and the raw request behind
|
|
43
42
|
* a Details toggle. The caller owns the decision and supplies the actions.
|
|
44
43
|
*/
|
|
45
|
-
export declare function ApprovalCard({ title, context, step, plan, diff, diffNote, details, status, actions, className, ...props }: ApprovalCardProps): import("react").JSX.Element;
|
|
46
|
-
//#endregion
|
|
44
|
+
export declare function ApprovalCard({ title, context, step, plan, diff, diffNote, details, status, actions, className, ...props }: ApprovalCardProps): import("react").JSX.Element;
|