@tangle-network/ui 11.39.0 → 11.40.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/index.d.ts +4 -2
  3. package/dist/index.js +3 -1
  4. package/dist/lib/control-presentation.d.ts +1 -1
  5. package/dist/lib/control-presentation.js +9 -7
  6. package/dist/presentation.d.ts +1 -1
  7. package/dist/presentation.js +9 -8
  8. package/dist/primitives/avatar.d.ts +9 -1
  9. package/dist/primitives/avatar.js +6 -2
  10. package/dist/primitives/button.d.ts +2 -1
  11. package/dist/primitives/field.d.ts +27 -0
  12. package/dist/primitives/field.js +54 -0
  13. package/dist/primitives/info-tip.js +50 -0
  14. package/dist/primitives/page-shell.d.ts +19 -3
  15. package/dist/primitives/page-shell.js +80 -22
  16. package/dist/primitives/segmented-control.js +1 -1
  17. package/dist/primitives/settings.d.ts +125 -0
  18. package/dist/primitives/settings.js +316 -0
  19. package/dist/primitives/switch.js +1 -1
  20. package/dist/primitives/upload-progress.js +11 -6
  21. package/dist/primitives.d.ts +4 -2
  22. package/dist/primitives.js +3 -1
  23. package/package.json +2 -2
  24. package/src/lib/control-presentation.ts +9 -7
  25. package/src/presentation.ts +10 -8
  26. package/src/primitives/avatar.tsx +10 -5
  27. package/src/primitives/button.tsx +2 -1
  28. package/src/primitives/control-presentation.stories.tsx +8 -1
  29. package/src/primitives/field.tsx +63 -0
  30. package/src/primitives/index.ts +16 -0
  31. package/src/primitives/info-tip.tsx +40 -0
  32. package/src/primitives/page-shell.tsx +70 -8
  33. package/src/primitives/settings.stories.tsx +267 -0
  34. package/src/primitives/settings.tsx +404 -0
  35. package/src/primitives/switch.tsx +3 -0
  36. package/src/primitives/upload-progress.stories.tsx +36 -1
  37. package/src/primitives/upload-progress.tsx +13 -8
  38. package/src/styles/compat.css +5 -5
  39. package/src/styles/presentation.css +43 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,32 @@
1
1
  # @tangle-network/ui
2
2
 
3
+ ## 11.40.1
4
+
5
+ ### Patch Changes
6
+
7
+ - af0c788: Give Button, Input and SelectTrigger a shared 44px minimum in both dimensions on coarse primary pointers, including compact density. Icon buttons keep a square 44px touch target. Fine-pointer sizes and the existing field text floor are unchanged.
8
+
9
+ Name UploadProgress retry and remove actions after their file, and render them with the shared ghost icon Button for consistent focus and hit areas. Actions remain non-submitting buttons; retry is available only for failed files.
10
+
11
+ ## 11.40.0
12
+
13
+ ### Minor Changes
14
+
15
+ - 63e1e7e: Add the settings atoms to `@tangle-network/ui/primitives`, so every product's settings page draws from one owner:
16
+
17
+ - `Field` and `fieldMessageId`, promoted from Agent App's profile form with the same API. The info tip is a bare `Button` with a 44px hit area on coarse pointers.
18
+ - `SettingsRow`: `inline`, `compact` and `stacked` layouts; a save status after the label, announced politely; an error (with optional Retry) or a lock reason that replaces the description, describes the control and marks it invalid. No className sizing hooks.
19
+ - `SettingsSection`: a `Card` with a 16px title, an anchor `id`, a `danger` tone, top-right actions and a footer on the muted plane.
20
+ - `SettingsList` and `SettingsListItem`: subgrid-aligned leading, state, action and menu columns. The item's one at-rest `action` is an outline button, so it never reads as the state; with a `disabledReason` it stays focusable, does nothing and shows the reason under the meta. Destructive actions go in the ⋯ menu, where an unavailable item stays focusable with its reason.
21
+
22
+ `Button` gains `variant="destructive-outline"` for a destructive action at rest, such as a danger section's "Delete project…". `Avatar` gains `size` (`sm` 32px, `md` 40px by default). `Switch` keeps its 36 x 20 track and gets a 44px hit area on coarse pointers, like the info tip.
23
+
24
+ Rows and lists answer to their card's width: below 34rem rows stack and list items become two lines with the state under the title.
25
+
26
+ `PageShell` gains `measure="settings"` and a `header` slot. The settings measure is a 48rem column of cards with a sticky 13rem section column once its frame is 60rem wide, and a sticky 56px tab strip below that which keeps the current tab in view by scrolling the strip only, including when the links are replaced or the web font swaps. Without navigation it is the 48rem column alone. Its `className` goes on the frame, so a `max-w-*` bounds the width the layout answers to.
27
+
28
+ The reading layout adds its 13rem navigation track only when it has a navigation, so an article with a header or an outline but no navigation no longer drops into that track. Every existing export is unchanged.
29
+
3
30
  ## 11.39.0
4
31
 
5
32
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -62,7 +62,7 @@ import { Calendar, CalendarDate, CalendarProps, formatCalendarDate, localToday,
62
62
  import { DatePicker, DatePickerProps } from "./primitives/date-picker.js";
63
63
  import { TimeSelect, TimeSelectProps } from "./primitives/time-select.js";
64
64
  import { Badge, BadgeProps, badgeVariants } from "./primitives/badge.js";
65
- import { Avatar, AvatarFallback, AvatarImage } from "./primitives/avatar.js";
65
+ import { Avatar, AvatarFallback, AvatarImage, AvatarProps } from "./primitives/avatar.js";
66
66
  import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./primitives/dropdown-menu.js";
67
67
  import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./primitives/select.js";
68
68
  import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableProps, TableRow } from "./primitives/table.js";
@@ -90,6 +90,8 @@ import { InlineCode, InlineCodeProps } from "./primitives/code-block.js";
90
90
  import { ThemeToggle, useTheme } from "./primitives/theme-toggle.js";
91
91
  import { Heading, HeadingProps, HeadingVariant } from "./primitives/heading.js";
92
92
  import { PageShell, PageShellProps } from "./primitives/page-shell.js";
93
+ import { Field, FieldProps, fieldMessageId } from "./primitives/field.js";
94
+ import { SettingsList, SettingsListAction, SettingsListColumns, SettingsListItem, SettingsListItemProps, SettingsListMenuItem, SettingsListProps, SettingsRow, SettingsRowLayout, SettingsRowProps, SettingsSection, SettingsSectionProps } from "./primitives/settings.js";
93
95
  import { PageHeader, PageHeaderProps } from "./primitives/page-header.js";
94
96
  import { Alert, AlertDescription, AlertProps, AlertTitle, AlertTone } from "./primitives/alert.js";
95
97
  import { Pagination, PaginationProps } from "./primitives/pagination.js";
@@ -135,4 +137,4 @@ import { QuestionPreview, QuestionPreviewProps } from "./tool-previews/question-
135
137
  import { DiffPreview, DiffPreviewProps } from "./tool-previews/diff-preview.js";
136
138
  import { RedactedDocSegment, RedactedDocument, RedactedDocumentData, RedactedDocumentProps, RevealResult } from "./redaction/redacted-document.js";
137
139
  import "./redaction.js";
138
- export { ActiveProjectActivity, ActiveSessionActivityOptions, ActiveSessionConnectionOptions, ActiveSessionConnectionState, ActiveSessionReconnectState, ActiveSessionRecord, ActiveSessionStatus, ActiveSessionTransportMode, ActiveSessionsState, AgentBranding, AgentStreamEvent, AgentTimeline, type AgentTimelineArtifactItem, type AgentTimelineCustomItem, type AgentTimelineItem, type AgentTimelineMessageItem, type AgentTimelineProps, type AgentTimelineStatusItem, type AgentTimelineTone, type AgentTimelineToolGroupItem, type AgentTimelineToolItem, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTone, ApiSchema, type ApiSchemaProps, AppendUserMessageOptions, ApplySdkEventOptions, ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, ArtifactPane, type ArtifactPaneProps, AuthHeader, type AuthHeaderProps, AuthUser, AutomationStreamEvent, Avatar, AvatarFallback, AvatarImage, Badge, type BadgeProps, BeginAssistantMessageOptions, BotStreamEvent, Button, type ButtonProps, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, type CalendarDate, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardTitleProps, type CategoryTone, ChatAuthor, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, Checkbox, Chip, type ChipProps, CodeBlock, type CodeBlockProps, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, type CommandPreviewProps, CompleteAssistantMessageOptions, ConnectionState, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, CustomToolRenderer, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, type DiffPreviewProps, DisplayVariant, DropZone, type DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, FileArtifactPane, type FileArtifactPaneProps, FileCard, type FileCardProps, type FileDetails, type FileFormat, FileList, type FileListItem, type FileListProps, type FileNode, FilePreview, type FilePreviewKind, type FilePreviewProps, type FileTabData, FileTabs, type FileTabsProps, FileTree, type FileTreeProps, type FileTreeVisibilityOptions, type FileUploader, FilterField, type FilterFieldProps, FinalTextPart, GitHubLoginButton, type GitHubLoginButtonProps, GlobResultsPreview, type GlobResultsPreviewProps, GrepResultsPreview, type GrepResultsPreviewProps, GroupedMessage, Heading, type HeadingProps, type HeadingVariant, HelpText, type HelpTextProps, IconTile, type IconTileProps, InlineCode, type InlineCodeProps, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, Input, type InputProps, Label, LiveDuration, LoginLayout, type LoginLayoutProps, Logo, type LogoProps, Markdown, type MarkdownLinkChip, type MarkdownLinkChipResolver, type MarkdownProps, MessageAuthor, type MessageAuthorProps, MessageList, type MessageListProps, type MessageRole, MessageRun, MessageUser, Metric, type MetricProps, MetricStrip, type MetricStripProps, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, type OpenUIAction, type OpenUIActionsNode, OpenUIArtifactRenderer, type OpenUIArtifactRendererProps, type OpenUIBadgeNode, type OpenUICardNode, type OpenUICodeNode, type OpenUIComponentNode, type OpenUIGridNode, type OpenUIHeadingNode, type OpenUIKeyValueNode, type OpenUIMarkdownNode, type OpenUIPrimitive, type OpenUISchemaIssue, type OpenUISchemaValidation, type OpenUISeparatorNode, type OpenUIStackNode, type OpenUIStatNode, type OpenUITableNode, type OpenUITextNode, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, Pagination, type PaginationProps, PdfViewer, type PdfViewerConfig, type PdfViewerProps, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, type QuestionPreviewProps, RadioGroup, RadioGroupItem, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, ReasoningPart, type RedactedDocSegment, RedactedDocument, type RedactedDocumentData, type RedactedDocumentProps, RegisterActiveSessionOptions, type RevealResult, RichFileTree, type RichFileTreeGitEntry, type RichFileTreeGitStatus, type RichFileTreeProps, type RichFileTreeThemeVars, Run, RunGroup, type RunGroupProps, type RunPhase, RunPhaseList, RunRowShell, type RunRowShellProps, type RunRowStatus, RunRowStatusDot, RunStats, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SessionMessage, SessionPart, SessionProjectKey, type SessionUser, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, type SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, Slider, StatCard, type StatCardProps, StatusPill, type StatusPillProps, type StatusTone, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TangleKnot, TaskList, type TaskListItem, type TaskListProps, type TaskStatus, TaskStreamEvent, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TerminalStreamEvent, TextPart, TextShimmer, type TextShimmerProps, Textarea, type TextareaProps, ThemeToggle, ThinkingIndicator, type ThinkingIndicatorProps, TimeSelect, type TimeSelectProps, type Toast, ToastContainer, ToastProvider, type Tone, type ToneClasses, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, ToolCategory, ToolDisplayMetadata, ToolPart, ToolState, ToolStatus, ToolTime, Toolbar, type ToolbarProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadFile, UploadProgress, type UploadProgressProps, UseAuthOptions, UseAuthResult, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, UserMenu, type UserMenuProps, UserMessage, type UserMessageProps, WebSearchPreview, type WebSearchPreviewProps, Wizard, type WizardProps, WizardStep, type WizardStepProps, WriteFilePreview, type WriteFilePreviewProps, activeSessionsAtom, addMessage, addParts, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, formatBytes, formatCalendarDate, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
140
+ export { ActiveProjectActivity, ActiveSessionActivityOptions, ActiveSessionConnectionOptions, ActiveSessionConnectionState, ActiveSessionReconnectState, ActiveSessionRecord, ActiveSessionStatus, ActiveSessionTransportMode, ActiveSessionsState, AgentBranding, AgentStreamEvent, AgentTimeline, type AgentTimelineArtifactItem, type AgentTimelineCustomItem, type AgentTimelineItem, type AgentTimelineMessageItem, type AgentTimelineProps, type AgentTimelineStatusItem, type AgentTimelineTone, type AgentTimelineToolGroupItem, type AgentTimelineToolItem, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, type AlertTone, ApiSchema, type ApiSchemaProps, AppendUserMessageOptions, ApplySdkEventOptions, ApprovalCard, type ApprovalCardProps, type ApprovalDiffFile, ApprovalDiffSummary, type ApprovalPlanStep, ArtifactPane, type ArtifactPaneProps, AuthHeader, type AuthHeaderProps, AuthUser, AutomationStreamEvent, Avatar, AvatarFallback, AvatarImage, type AvatarProps, Badge, type BadgeProps, BeginAssistantMessageOptions, BotStreamEvent, Button, type ButtonProps, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, type CalendarDate, type CalendarProps, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CardTitleProps, type CategoryTone, ChatAuthor, ChatContainer, type ChatContainerProps, ChatMessage, type ChatMessageProps, Checkbox, Chip, type ChipProps, CodeBlock, type CodeBlockProps, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, type CommandPreviewProps, CompleteAssistantMessageOptions, ConnectionState, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, type CopyButtonProps, CustomToolRenderer, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, type DiffPreviewProps, DisplayVariant, DropZone, type DropZoneProps, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, type EmptyStateProps, ExpandedToolDetail, type ExpandedToolDetailProps, type FeedSegment, Field, type FieldProps, FileArtifactPane, type FileArtifactPaneProps, FileCard, type FileCardProps, type FileDetails, type FileFormat, FileList, type FileListItem, type FileListProps, type FileNode, FilePreview, type FilePreviewKind, type FilePreviewProps, type FileTabData, FileTabs, type FileTabsProps, FileTree, type FileTreeProps, type FileTreeVisibilityOptions, type FileUploader, FilterField, type FilterFieldProps, FinalTextPart, GitHubLoginButton, type GitHubLoginButtonProps, GlobResultsPreview, type GlobResultsPreviewProps, GrepResultsPreview, type GrepResultsPreviewProps, GroupedMessage, Heading, type HeadingProps, type HeadingVariant, HelpText, type HelpTextProps, IconTile, type IconTileProps, InlineCode, type InlineCodeProps, InlineThinkingItem, type InlineThinkingItemProps, InlineToolItem, type InlineToolItemProps, Input, type InputProps, Label, LiveDuration, LoginLayout, type LoginLayoutProps, Logo, type LogoProps, Markdown, type MarkdownLinkChip, type MarkdownLinkChipResolver, type MarkdownProps, MessageAuthor, type MessageAuthorProps, MessageList, type MessageListProps, type MessageRole, MessageRun, MessageUser, Metric, type MetricProps, MetricStrip, type MetricStripProps, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, type OpenUIAction, type OpenUIActionsNode, OpenUIArtifactRenderer, type OpenUIArtifactRendererProps, type OpenUIBadgeNode, type OpenUICardNode, type OpenUICodeNode, type OpenUIComponentNode, type OpenUIGridNode, type OpenUIHeadingNode, type OpenUIKeyValueNode, type OpenUIMarkdownNode, type OpenUIPrimitive, type OpenUISchemaIssue, type OpenUISchemaValidation, type OpenUISeparatorNode, type OpenUIStackNode, type OpenUIStatNode, type OpenUITableNode, type OpenUITextNode, PageHeader, type PageHeaderProps, PageShell, type PageShellProps, Pagination, type PaginationProps, PdfViewer, type PdfViewerConfig, type PdfViewerProps, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, type QuestionPreviewProps, RadioGroup, RadioGroupItem, RealtimeSessionOptions, RealtimeSessionRegistry, RealtimeSessionRegistryProps, RealtimeSessionState, RealtimeSessionTarget, ReasoningPart, type RedactedDocSegment, RedactedDocument, type RedactedDocumentData, type RedactedDocumentProps, RegisterActiveSessionOptions, type RevealResult, RichFileTree, type RichFileTreeGitEntry, type RichFileTreeGitStatus, type RichFileTreeProps, type RichFileTreeThemeVars, Run, RunGroup, type RunGroupProps, type RunPhase, RunPhaseList, RunRowShell, type RunRowShellProps, type RunRowStatus, RunRowStatusDot, RunStats, SSEEvent, SdkSessionAttachment, SdkSessionEvent, SdkSessionSeed, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SessionMessage, SessionPart, SessionProjectKey, type SessionUser, SettingsList, type SettingsListAction, type SettingsListColumns, SettingsListItem, type SettingsListItemProps, type SettingsListMenuItem, type SettingsListProps, SettingsRow, type SettingsRowLayout, type SettingsRowProps, SettingsSection, type SettingsSectionProps, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, type SidebarDropZoneProps, Skeleton, SkeletonCard, SkeletonTable, Slider, StatCard, type StatCardProps, StatusPill, type StatusPillProps, type StatusTone, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, TangleKnot, TaskList, type TaskListItem, type TaskListProps, type TaskStatus, TaskStreamEvent, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TerminalStreamEvent, TextPart, TextShimmer, type TextShimmerProps, Textarea, type TextareaProps, ThemeToggle, ThinkingIndicator, type ThinkingIndicatorProps, TimeSelect, type TimeSelectProps, type Toast, ToastContainer, ToastProvider, type Tone, type ToneClasses, type ToolCallData, ToolCallFeed, type ToolCallFeedProps, type ToolCallStatus, type ToolCallType, ToolCategory, ToolDisplayMetadata, ToolPart, ToolState, ToolStatus, ToolTime, Toolbar, type ToolbarProps, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, type UploadFile, UploadProgress, type UploadProgressProps, UseAuthOptions, UseAuthResult, UseRunGroupsOptions, UseSSEStreamOptions, UseSSEStreamResult, UseSdkSessionOptions, UseSdkSessionReturn, UseToolCallStreamReturn, UserMenu, type UserMenuProps, UserMessage, type UserMessageProps, WebSearchPreview, type WebSearchPreviewProps, Wizard, type WizardProps, WizardStep, type WizardStepProps, WriteFilePreview, type WriteFilePreviewProps, activeSessionsAtom, addMessage, addParts, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fieldMessageId, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, formatBytes, formatCalendarDate, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
package/dist/index.js CHANGED
@@ -46,6 +46,8 @@ import { CodeBlock, CopyButton } from "./markdown/code-block.js";
46
46
  import { InlineCode } from "./primitives/code-block.js";
47
47
  import { ThemeToggle, useTheme } from "./primitives/theme-toggle.js";
48
48
  import { PageShell } from "./primitives/page-shell.js";
49
+ import { Field, fieldMessageId } from "./primitives/field.js";
50
+ import { SettingsList, SettingsListItem, SettingsRow, SettingsSection } from "./primitives/settings.js";
49
51
  import { PageHeader } from "./primitives/page-header.js";
50
52
  import { Alert, AlertDescription, AlertTitle } from "./primitives/alert.js";
51
53
  import { Pagination } from "./primitives/pagination.js";
@@ -119,4 +121,4 @@ import { addMessage, addParts, clearChat, isStreamingAtom, messagesAtom, partMap
119
121
  import { copyText } from "./utils/copy-text.js";
120
122
  import { timeAgo } from "./utils/time-ago.js";
121
123
  import { RedactedDocument } from "./redaction/redacted-document.js";
122
- export { AgentTimeline, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, ApiSchema, ApprovalCard, ApprovalDiffSummary, ArtifactPane, AuthHeader, Avatar, AvatarFallback, AvatarImage, Badge, Button, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatContainer, ChatMessage, Checkbox, Chip, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, DropZone, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ExpandedToolDetail, FileArtifactPane, FileCard, FileList, FilePreview, FileTabs, FileTree, FilterField, GitHubLoginButton, GlobResultsPreview, GrepResultsPreview, Heading, HelpText, IconTile, InlineCode, InlineThinkingItem, InlineToolItem, Input, Label, LiveDuration, LoginLayout, Logo, Markdown, MessageAuthor, MessageList, Metric, MetricStrip, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, PageHeader, PageShell, Pagination, PdfViewer, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, RadioGroup, RadioGroupItem, RealtimeSessionRegistry, RedactedDocument, RichFileTree, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, Skeleton, SkeletonCard, SkeletonTable, Slider, StatCard, StatusPill, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TangleKnot, TaskList, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, Textarea, ThemeToggle, ThinkingIndicator, TimeSelect, ToastContainer, ToastProvider, ToolCallFeed, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UploadProgress, UserMenu, UserMessage, WebSearchPreview, Wizard, WizardStep, WriteFilePreview, activeSessionsAtom, addMessage, addParts, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, formatBytes, formatCalendarDate, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
124
+ export { AgentTimeline, Alert, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AlertTitle, ApiSchema, ApprovalCard, ApprovalDiffSummary, ArtifactPane, AuthHeader, Avatar, AvatarFallback, AvatarImage, Badge, Button, CATEGORY_TONES, CSV_PREVIEW_ROW_LIMIT, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChatContainer, ChatMessage, Checkbox, Chip, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, CommandPreview, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, CopyButton, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DiffPreview, DropZone, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ExpandedToolDetail, Field, FileArtifactPane, FileCard, FileList, FilePreview, FileTabs, FileTree, FilterField, GitHubLoginButton, GlobResultsPreview, GrepResultsPreview, Heading, HelpText, IconTile, InlineCode, InlineThinkingItem, InlineToolItem, Input, Label, LiveDuration, LoginLayout, Logo, Markdown, MessageAuthor, MessageList, Metric, MetricStrip, OPENUI_NODE_JSON_SCHEMA, OPENUI_NODE_TYPES, OpenUIArtifactRenderer, PageHeader, PageShell, Pagination, PdfViewer, Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverTrigger, Progress, QuestionPreview, RadioGroup, RadioGroupItem, RealtimeSessionRegistry, RedactedDocument, RichFileTree, RunGroup, RunPhaseList, RunRowShell, RunRowStatusDot, SegmentedControl, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, SettingsList, SettingsListItem, SettingsRow, SettingsSection, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SidebarDropZone, Skeleton, SkeletonCard, SkeletonTable, Slider, StatCard, StatusPill, Switch, TONE_CLASSES, TOOL_CATEGORY_ICONS, TRANSCRIPT_TEXT, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, TangleKnot, TaskList, TerminalCursor, TerminalDisplay, TerminalInput, TerminalLine, TextShimmer, Textarea, ThemeToggle, ThinkingIndicator, TimeSelect, ToastContainer, ToastProvider, ToolCallFeed, Toolbar, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UploadProgress, UserMenu, UserMessage, WebSearchPreview, Wizard, WizardStep, WriteFilePreview, activeSessionsAtom, addMessage, addParts, badgeVariants, bumpActiveSessionActivity, buttonVariants, clearChat, cn, codeBlockGrammar, configurePdfViewer, copyText, createAuthFetcher, detectFileFormat, fenceInfo, fieldMessageId, fileExtension, filterFileTree, findUnsupportedOpenUINode, focusField, focusFieldInvalid, focusFieldWithin, focusRing, focusRingInset, formatBytes, formatCalendarDate, formatDuration, formatUptime, getActiveSession, getAllActiveSessions, getAllProjectActivity, getCodeLanguage, getFormatLabel, getSanitizedMarkdownHeadingIdFromRawFragment, getSessionsByActivity, getSessionsForNavbar, getSessionsForProject, getSyntaxLanguage, getToolCategory, getToolDisplayMetadata, getToolErrorText, getTotalRunningSessionCount, hasBackgroundRunningSessions, initialsOf, isStreamingAtom, isViewerMessage, ixControl, ixControlAfter, ixControlSoft, ixField, ixRow, ixSelected, ixTabUnderline, localToday, messagesAtom, numericColumns, parseCalendarDate, parseCsv, parseToolEvent, partMapAtom, plainTextFromMarkdown, registerActiveSession, resetActiveSessions, resolveFilePreviewKind, setActiveSessionAttention, setActiveSessionConnection, setActiveSessionError, setActiveSessionRunning, setForegroundActiveSession, showsTaskPriority, tableCsv, taskProgress, taskStatus, timeAgo, toneFor, truncateText, unregisterActiveSession, updateActiveSessionMeta, updatePart, useActiveSession, useActiveSessions, useActiveSessionsState, useApiKey, useAuth, useAutoScroll, useDropdownMenu, useHasBackgroundRunningSessions, useLiveTime, useNavbarSessions, useProjectActivity, useProjectSessions, useRealtimeSession, useRunCollapseState, useRunGroups, useSSEStream, useSdkSession, useSessionsByActivity, useTheme, useToast, useToolCallStream, useTotalRunningSessions, validateOpenUIJsonArtifact, validateOpenUIJsonNode };
@@ -35,7 +35,7 @@ export declare const fieldSizes: {
35
35
  readonly lg: string;
36
36
  };
37
37
  export declare const controlSizes: {
38
- readonly compact: "h-[var(--control-height)] px-3 py-1 text-sm";
38
+ readonly compact: "h-[var(--control-height)] px-3 py-1 text-sm pointer-coarse:min-h-11 pointer-coarse:min-w-11";
39
39
  readonly touch: "h-11 min-h-11 min-w-11 px-4 py-2 text-base";
40
40
  };
41
41
  export declare const fieldPresentation: string;
@@ -30,18 +30,20 @@ const controlSquare = {
30
30
  */
31
31
  const fieldTouchText = "pointer-coarse:text-base";
32
32
  /**
33
- * A control that is shorter than 44px on a fine pointer still gets a 44px hit
34
- * height on a coarse one (WCAG 2.5.5, Apple HIG). Same floor as `touch`.
33
+ * A control smaller than 44px on a fine pointer still gets a 44px target
34
+ * in both dimensions on a coarse one (WCAG 2.5.5, Apple HIG). Same floor as `touch`.
35
+ * Follow the primary pointer, matching SegmentedControl; a secondary touch
36
+ * input alone does not inflate a fine-pointer desktop layout.
35
37
  */
36
- const touchTarget = "pointer-coarse:min-h-11";
38
+ const touchTarget = "pointer-coarse:min-h-11 pointer-coarse:min-w-11";
37
39
  /** Field sizes: the control scale with field padding. */
38
40
  const fieldSizes = {
39
- sm: cn(controlHeight.sm, controlText.sm, controlRadius.sm, "px-2.5"),
40
- md: cn(controlHeight.md, controlText.md, controlRadius.md, "px-3"),
41
- lg: cn(controlHeight.lg, controlText.lg, controlRadius.lg, "px-4")
41
+ sm: cn(controlHeight.sm, controlText.sm, controlRadius.sm, touchTarget, "px-2.5"),
42
+ md: cn(controlHeight.md, controlText.md, controlRadius.md, touchTarget, "px-3"),
43
+ lg: cn(controlHeight.lg, controlText.lg, controlRadius.lg, touchTarget, "px-4")
42
44
  };
43
45
  const controlSizes = {
44
- compact: "h-[var(--control-height)] px-3 py-1 text-sm",
46
+ compact: `h-[var(--control-height)] px-3 py-1 text-sm ${touchTarget}`,
45
47
  touch: "h-11 min-h-11 min-w-11 px-4 py-2 text-base"
46
48
  };
47
49
  const fieldPresentation = cn(focusField, ixField, controlMotion, "min-w-0 text-foreground", "aria-invalid:border-[var(--surface-danger-border)] aria-invalid:hover:border-[var(--surface-danger-border)] aria-invalid:focus:border-[var(--focus-border-danger)] aria-invalid:focus:ring-[var(--focus-halo-danger)]", "autofill:shadow-[inset_0_0_0_1000px_var(--field-surface,var(--well))] autofill:[-webkit-text-fill-color:var(--text-primary)] autofill:caret-[var(--text-primary)]");
@@ -3,7 +3,7 @@ import { controlHeight, controlRadius, controlSizes, controlText, fieldPresentat
3
3
  import { ixControlSoft, ixSelected, ixTabUnderline } from "./lib/interaction.js";
4
4
  //#region src/presentation.d.ts
5
5
  export declare const buttonVariants: (props?: ({
6
- variant?: "default" | "destructive" | "ghost" | "link" | "outline" | "sandbox" | "secondary" | null | undefined;
6
+ variant?: "default" | "destructive" | "destructive-outline" | "ghost" | "link" | "outline" | "sandbox" | "secondary" | null | undefined;
7
7
  size?: "compact" | "default" | "display" | "icon" | "icon-lg" | "icon-sm" | "lg" | "md" | "sm" | "touch" | "xl" | null | undefined;
8
8
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
9
  export declare const inputVariants: (props?: ({
@@ -2,7 +2,7 @@ import { controlMotion, surfaceMotion } from "./lib/motion.js";
2
2
  import { ixControl, ixControlSoft, ixSelected, ixTabUnderline } from "./lib/interaction.js";
3
3
  import { focusFieldInvalid, focusRing } from "./lib/focus.js";
4
4
  import { cn } from "./lib/utils.js";
5
- import { controlHeight, controlRadius, controlSizes, controlSquare, controlText, fieldPresentation, fieldSizes, fieldTouchText } from "./lib/control-presentation.js";
5
+ import { controlHeight, controlRadius, controlSizes, controlSquare, controlText, fieldPresentation, fieldSizes, fieldTouchText, touchTarget } from "./lib/control-presentation.js";
6
6
  import { cva } from "class-variance-authority";
7
7
  //#region src/presentation.ts
8
8
  /** React-free presentation. Consumers scan this published source with Tailwind. */
@@ -12,21 +12,22 @@ const buttonVariants = cva(`inline-flex items-center justify-center gap-2 whites
12
12
  default: `bg-primary text-primary-foreground hover:bg-primary/90 active:scale-[0.97] ${ixControl}`,
13
13
  destructive: `bg-destructive text-destructive-foreground hover:bg-destructive/90 active:scale-[0.97] ${ixControl}`,
14
14
  outline: `border border-border bg-card hover:bg-muted active:scale-[0.97] text-foreground ${ixControl}`,
15
+ "destructive-outline": `border border-[var(--surface-danger-border)] bg-card hover:bg-[var(--surface-danger-bg)] active:scale-[0.97] text-[var(--surface-danger-text)] ${ixControl}`,
15
16
  secondary: `bg-muted border border-border text-foreground hover:bg-muted/80 active:scale-[0.97] ${ixControl}`,
16
17
  ghost: `hover:text-foreground text-muted-foreground border border-transparent ${ixControlSoft}`,
17
18
  link: `text-[var(--accent-text)] underline-offset-4 hover:underline ${ixControlSoft}`,
18
19
  sandbox: `bg-[var(--btn-primary-bg)] text-[var(--btn-primary-text)] border border-[var(--border-accent)] hover:bg-[var(--btn-primary-hover)] active:scale-[0.97] ${ixControl}`
19
20
  },
20
21
  size: {
21
- default: `${controlHeight.md} ${controlText.md} ${controlRadius.md} px-4 py-2`,
22
- md: `${controlHeight.md} ${controlText.md} ${controlRadius.md} px-4 py-2`,
23
- sm: `${controlHeight.sm} ${controlText.sm} ${controlRadius.sm} px-3`,
24
- lg: `${controlHeight.lg} ${controlText.lg} ${controlRadius.lg} px-7`,
22
+ default: `${controlHeight.md} ${controlText.md} ${controlRadius.md} ${touchTarget} px-4 py-2`,
23
+ md: `${controlHeight.md} ${controlText.md} ${controlRadius.md} ${touchTarget} px-4 py-2`,
24
+ sm: `${controlHeight.sm} ${controlText.sm} ${controlRadius.sm} ${touchTarget} px-3`,
25
+ lg: `${controlHeight.lg} ${controlText.lg} ${controlRadius.lg} ${touchTarget} px-7`,
25
26
  display: "tangle-control-display",
26
27
  xl: "h-13 rounded-xl px-9 text-base",
27
- icon: `${controlSquare.md} ${controlText.md} ${controlRadius.md}`,
28
- "icon-sm": `${controlSquare.sm} ${controlText.sm} ${controlRadius.sm}`,
29
- "icon-lg": `${controlSquare.lg} ${controlText.lg} ${controlRadius.lg}`,
28
+ icon: `${controlSquare.md} ${controlText.md} ${controlRadius.md} ${touchTarget}`,
29
+ "icon-sm": `${controlSquare.sm} ${controlText.sm} ${controlRadius.sm} ${touchTarget}`,
30
+ "icon-lg": `${controlSquare.lg} ${controlText.lg} ${controlRadius.lg} ${touchTarget}`,
30
31
  ...controlSizes
31
32
  }
32
33
  },
@@ -1,7 +1,15 @@
1
1
  import * as React from "react";
2
2
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
3
3
  //#region src/primitives/avatar.d.ts
4
- declare const Avatar: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
4
+ declare const AVATAR_SIZES: {
5
+ readonly sm: "h-8 w-8";
6
+ readonly md: "h-10 w-10";
7
+ };
8
+ export interface AvatarProps extends React.ComponentPropsWithoutRef<typeof AvatarPrimitive.Root> {
9
+ /** sm 32px (a list row beside a two-line name), md 40px (default). */
10
+ size?: keyof typeof AVATAR_SIZES;
11
+ }
12
+ declare const Avatar: React.ForwardRefExoticComponent<AvatarProps & React.RefAttributes<HTMLSpanElement>>;
5
13
  declare const AvatarImage: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarImageProps & React.RefAttributes<HTMLImageElement>, "ref"> & React.RefAttributes<HTMLImageElement>>;
6
14
  declare const AvatarFallback: React.ForwardRefExoticComponent<Omit<AvatarPrimitive.AvatarFallbackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
7
15
  //#endregion
@@ -3,9 +3,13 @@ import * as React from "react";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import * as AvatarPrimitive from "@radix-ui/react-avatar";
5
5
  //#region src/primitives/avatar.tsx
6
- const Avatar = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Root, {
6
+ const AVATAR_SIZES = {
7
+ sm: "h-8 w-8",
8
+ md: "h-10 w-10"
9
+ };
10
+ const Avatar = React.forwardRef(({ className, size = "md", ...props }, ref) => /* @__PURE__ */ jsx(AvatarPrimitive.Root, {
7
11
  ref,
8
- className: cn("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full", className),
12
+ className: cn("relative flex shrink-0 overflow-hidden rounded-full", AVATAR_SIZES[size], className),
9
13
  ...props
10
14
  }));
11
15
  Avatar.displayName = AvatarPrimitive.Root.displayName;
@@ -2,7 +2,8 @@ import { buttonVariants } from "../presentation.js";
2
2
  import * as React from "react";
3
3
  //#region src/primitives/button.d.ts
4
4
  export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5
- variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | "sandbox" | "bare" | null;
5
+ /** `destructive-outline` is a destructive action at rest, such as "Delete project…", whose confirmation uses `destructive`. */
6
+ variant?: "default" | "destructive" | "destructive-outline" | "outline" | "secondary" | "ghost" | "link" | "sandbox" | "bare" | null;
6
7
  /** sm 32px, default/md 36px (`--control-height`), lg 44px; icon sizes are squares on the same heights. */
7
8
  size?: "default" | "md" | "sm" | "lg" | "xl" | "display" | "icon" | "icon-sm" | "icon-lg" | "compact" | "touch" | null;
8
9
  asChild?: boolean;
@@ -0,0 +1,27 @@
1
+ import * as React from "react";
2
+ //#region src/primitives/field.d.ts
3
+ export interface FieldProps {
4
+ label: string;
5
+ /** The control's id; the label targets it. */
6
+ htmlFor: string;
7
+ /** Help that explains what the setting does, shown from an info button. */
8
+ info?: React.ReactNode;
9
+ /** One short sentence the person needs to fill the field in. */
10
+ hint?: React.ReactNode;
11
+ /** A validation error. The control should set `aria-invalid` and reference {@link fieldMessageId}. */
12
+ error?: React.ReactNode;
13
+ /** A non-error status, such as a check that passed. */
14
+ status?: React.ReactNode;
15
+ /** Trailing content in the label row, such as a "Use default" action. */
16
+ aside?: React.ReactNode;
17
+ children: React.ReactNode;
18
+ }
19
+ /** The id of a field's hint, error, or status line, for the control's `aria-describedby`. */
20
+ export declare function fieldMessageId(htmlFor: string): string;
21
+ /**
22
+ * A labelled form field: the label (with an optional info tip and a trailing
23
+ * aside) above the control, and one message line under it. Every line is
24
+ * 14px; an error replaces the status and the hint and is announced.
25
+ */
26
+ export declare function Field({ label, htmlFor, info, hint, error, status, aside, children }: FieldProps): React.JSX.Element;
27
+ //#endregion
@@ -0,0 +1,54 @@
1
+ "use client";
2
+ import { cn } from "../lib/utils.js";
3
+ import { Label } from "./label.js";
4
+ import { InfoTip } from "./info-tip.js";
5
+ import "react";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ import { CircleAlert } from "lucide-react";
8
+ //#region src/primitives/field.tsx
9
+ /** The id of a field's hint, error, or status line, for the control's `aria-describedby`. */
10
+ function fieldMessageId(htmlFor) {
11
+ return `${htmlFor}-message`;
12
+ }
13
+ /**
14
+ * A labelled form field: the label (with an optional info tip and a trailing
15
+ * aside) above the control, and one message line under it. Every line is
16
+ * 14px; an error replaces the status and the hint and is announced.
17
+ */
18
+ function Field({ label, htmlFor, info, hint, error, status, aside, children }) {
19
+ const message = error ?? status ?? hint;
20
+ return /* @__PURE__ */ jsxs("div", {
21
+ className: "min-w-0 space-y-2",
22
+ children: [
23
+ /* @__PURE__ */ jsxs("div", {
24
+ className: "flex min-h-6 items-center justify-between gap-2",
25
+ children: [/* @__PURE__ */ jsxs("span", {
26
+ className: "flex min-w-0 items-center gap-1.5",
27
+ children: [/* @__PURE__ */ jsx(Label, {
28
+ htmlFor,
29
+ className: "leading-6 text-foreground",
30
+ children: label
31
+ }), info && /* @__PURE__ */ jsx(InfoTip, {
32
+ label,
33
+ children: info
34
+ })]
35
+ }), aside]
36
+ }),
37
+ children,
38
+ message && /* @__PURE__ */ jsxs("div", {
39
+ id: fieldMessageId(htmlFor),
40
+ role: error ? "alert" : void 0,
41
+ className: cn("text-sm leading-6 [overflow-wrap:anywhere]", error ? "flex items-start gap-1.5 text-[var(--surface-danger-text)]" : "text-muted-foreground"),
42
+ children: [error && /* @__PURE__ */ jsx(CircleAlert, {
43
+ "aria-hidden": "true",
44
+ className: "mt-1 size-4 shrink-0"
45
+ }), error ? /* @__PURE__ */ jsx("span", {
46
+ className: "min-w-0",
47
+ children: message
48
+ }) : message]
49
+ })
50
+ ]
51
+ });
52
+ }
53
+ //#endregion
54
+ export { Field, fieldMessageId };
@@ -0,0 +1,50 @@
1
+ "use client";
2
+ import { Button } from "./button.js";
3
+ import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "./tooltip.js";
4
+ import * as React from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { Info } from "lucide-react";
7
+ //#region src/primitives/info-tip.tsx
8
+ /**
9
+ * An info button beside a label, for help that explains a setting. It opens
10
+ * on hover and keyboard focus and toggles on tap. The glyph stays 20px; on a
11
+ * coarse pointer a transparent 44px hit area surrounds it. It brings its own
12
+ * provider, so a row or field works in an app that never mounted one.
13
+ */
14
+ function InfoTip({ label, children }) {
15
+ const [open, setOpen] = React.useState(false);
16
+ const openAtPress = React.useRef(false);
17
+ return /* @__PURE__ */ jsx(TooltipProvider, {
18
+ delayDuration: 150,
19
+ children: /* @__PURE__ */ jsxs(Tooltip, {
20
+ open,
21
+ onOpenChange: setOpen,
22
+ children: [/* @__PURE__ */ jsx(TooltipTrigger, {
23
+ asChild: true,
24
+ children: /* @__PURE__ */ jsx(Button, {
25
+ type: "button",
26
+ variant: "bare",
27
+ "aria-label": `About ${label}`,
28
+ onPointerDown: () => {
29
+ openAtPress.current = open;
30
+ },
31
+ onClick: (event) => {
32
+ event.preventDefault();
33
+ setOpen(event.detail === 0 ? !open : !openAtPress.current);
34
+ },
35
+ className: "relative inline-flex size-5 shrink-0 items-center justify-center rounded-full text-muted-foreground hover:text-foreground pointer-coarse:before:absolute pointer-coarse:before:-inset-3 pointer-coarse:before:content-['']",
36
+ children: /* @__PURE__ */ jsx(Info, {
37
+ "aria-hidden": "true",
38
+ className: "size-4"
39
+ })
40
+ })
41
+ }), /* @__PURE__ */ jsx(TooltipContent, {
42
+ side: "top",
43
+ className: "max-w-72 text-sm leading-5",
44
+ children
45
+ })]
46
+ })
47
+ });
48
+ }
49
+ //#endregion
50
+ export { InfoTip };
@@ -1,3 +1,4 @@
1
+ import * as React from "react";
1
2
  import { ReactNode } from "react";
2
3
  //#region src/primitives/page-shell.d.ts
3
4
  export interface PageShellProps {
@@ -6,6 +7,18 @@ export interface PageShellProps {
6
7
  navigation?: ReactNode;
7
8
  article?: ReactNode;
8
9
  outline?: ReactNode;
10
+ /** Spans the reading layout above navigation and article, such as the page's `PageHeader`. */
11
+ header?: ReactNode;
12
+ /**
13
+ * The reading layout's measure. `reading` (default) is the 42rem document
14
+ * column. `settings` is a 48rem column of cards whose navigation is a sticky
15
+ * 13rem column of rows when its frame is at least 60rem wide, and a sticky
16
+ * 56px tab strip under the header below that; the current link
17
+ * (`aria-current="page"`) is centred by scrolling the strip only. Put
18
+ * links (or a list of links) in `navigation`; an `svg` in a link shows only
19
+ * in the column, and an element with `data-count` sits at its end.
20
+ */
21
+ measure?: "reading" | "settings";
9
22
  navigationLabel?: string;
10
23
  outlineLabel?: string;
11
24
  className?: string;
@@ -13,8 +26,11 @@ export interface PageShellProps {
13
26
  /**
14
27
  * Ported from sandbox-ui/src/primitives/page-shell.tsx. An optional bounded
15
28
  * width, gutter and vertical rhythm, not an application shell or a card grid.
16
- * The caller owns landmarks, routing, auth, navigation and data state. Use
17
- * className to override the bound/gutters, or omit it for a workbench layout.
29
+ * The caller owns landmarks, routing, auth, navigation and data state.
30
+ * Without slots, className overrides the bound/gutters, or omit it for a
31
+ * workbench layout. With slots it goes on the reading grid. With
32
+ * `measure="settings"` it goes on the frame, the width the layout answers to,
33
+ * so a `max-w-*` there bounds the measure and a narrow frame gets the strip.
18
34
  */
19
- export declare function PageShell({ children, className, navigation, article, outline, navigationLabel, outlineLabel }: PageShellProps): import("react").JSX.Element;
35
+ export declare function PageShell({ children, className, navigation, article, outline, header, measure, navigationLabel, outlineLabel }: PageShellProps): React.JSX.Element;
20
36
  //#endregion
@@ -1,32 +1,90 @@
1
+ "use client";
1
2
  import { cn } from "../lib/utils.js";
3
+ import * as React from "react";
2
4
  import { jsx, jsxs } from "react/jsx-runtime";
3
5
  //#region src/primitives/page-shell.tsx
4
6
  /**
7
+ * Centre the current link of a horizontally scrolling nav, so the links on
8
+ * both sides show that the strip scrolls. It moves the strip, never the page.
9
+ */
10
+ function useCurrentLinkInView(ref, enabled) {
11
+ React.useEffect(() => {
12
+ const nav = ref.current;
13
+ if (!enabled || !nav) return;
14
+ const reveal = () => {
15
+ if (nav.scrollWidth <= nav.clientWidth) return;
16
+ const current = nav.querySelector("[aria-current=\"page\"]");
17
+ if (!current) return;
18
+ const strip = nav.getBoundingClientRect();
19
+ const link = current.getBoundingClientRect();
20
+ nav.scrollLeft += link.left + link.width / 2 - (strip.left + strip.width / 2);
21
+ };
22
+ let live = true;
23
+ reveal();
24
+ document.fonts?.ready.then(() => {
25
+ if (live) reveal();
26
+ });
27
+ const resize = typeof ResizeObserver === "undefined" ? null : new ResizeObserver(reveal);
28
+ resize?.observe(nav);
29
+ const links = new MutationObserver(reveal);
30
+ links.observe(nav, {
31
+ subtree: true,
32
+ childList: true,
33
+ characterData: true,
34
+ attributes: true,
35
+ attributeFilter: ["aria-current"]
36
+ });
37
+ return () => {
38
+ live = false;
39
+ resize?.disconnect();
40
+ links.disconnect();
41
+ };
42
+ }, [ref, enabled]);
43
+ }
44
+ /**
5
45
  * Ported from sandbox-ui/src/primitives/page-shell.tsx. An optional bounded
6
46
  * width, gutter and vertical rhythm, not an application shell or a card grid.
7
- * The caller owns landmarks, routing, auth, navigation and data state. Use
8
- * className to override the bound/gutters, or omit it for a workbench layout.
47
+ * The caller owns landmarks, routing, auth, navigation and data state.
48
+ * Without slots, className overrides the bound/gutters, or omit it for a
49
+ * workbench layout. With slots it goes on the reading grid. With
50
+ * `measure="settings"` it goes on the frame, the width the layout answers to,
51
+ * so a `max-w-*` there bounds the measure and a narrow frame gets the strip.
9
52
  */
10
- function PageShell({ children, className, navigation, article, outline, navigationLabel = "Sections", outlineLabel = "On this page" }) {
11
- if (navigation || article || outline) return /* @__PURE__ */ jsxs("div", {
12
- className: cn("tangle-reading-shell", className),
13
- children: [
14
- navigation && /* @__PURE__ */ jsx("nav", {
15
- "aria-label": navigationLabel,
16
- className: "tangle-reading-nav",
17
- children: navigation
18
- }),
19
- /* @__PURE__ */ jsx("article", {
20
- className: "tangle-reading-article",
21
- children: article ?? children
22
- }),
23
- outline && /* @__PURE__ */ jsx("aside", {
24
- "aria-label": outlineLabel,
25
- className: "tangle-reading-outline",
26
- children: outline
27
- })
28
- ]
29
- });
53
+ function PageShell({ children, className, navigation, article, outline, header, measure = "reading", navigationLabel = "Sections", outlineLabel = "On this page" }) {
54
+ const navRef = React.useRef(null);
55
+ const settings = measure === "settings";
56
+ useCurrentLinkInView(navRef, settings && Boolean(navigation));
57
+ if (navigation || article || outline || header || settings) {
58
+ const shell = /* @__PURE__ */ jsxs("div", {
59
+ className: cn("tangle-reading-shell", !settings && className),
60
+ "data-measure": settings ? "settings" : void 0,
61
+ children: [
62
+ header && /* @__PURE__ */ jsx("div", {
63
+ className: "tangle-reading-header",
64
+ children: header
65
+ }),
66
+ navigation && /* @__PURE__ */ jsx("nav", {
67
+ ref: navRef,
68
+ "aria-label": navigationLabel,
69
+ className: "tangle-reading-nav",
70
+ children: navigation
71
+ }),
72
+ /* @__PURE__ */ jsx("article", {
73
+ className: "tangle-reading-article",
74
+ children: article ?? children
75
+ }),
76
+ outline && /* @__PURE__ */ jsx("aside", {
77
+ "aria-label": outlineLabel,
78
+ className: "tangle-reading-outline",
79
+ children: outline
80
+ })
81
+ ]
82
+ });
83
+ return settings ? /* @__PURE__ */ jsx("div", {
84
+ className: cn("tangle-settings-frame", className),
85
+ children: shell
86
+ }) : shell;
87
+ }
30
88
  return /* @__PURE__ */ jsx("div", {
31
89
  className: cn("mx-auto min-w-0 w-full max-w-6xl space-y-8 px-6 py-8 lg:px-8", className),
32
90
  children
@@ -152,7 +152,7 @@ function SegmentedControl({ value, onValueChange, options, variant = "row", clas
152
152
  "aria-pressed:bg-[var(--ix-sel-bg)] aria-pressed:text-[var(--accent-text)] aria-pressed:shadow-[inset_0_0_0_1px_var(--ix-sel-ring)] aria-checked:bg-[var(--ix-sel-bg)] aria-checked:text-[var(--accent-text)] aria-checked:shadow-[inset_0_0_0_1px_var(--ix-sel-ring)] aria-[current=page]:bg-[var(--ix-sel-bg)] aria-[current=page]:text-[var(--accent-text)] aria-[current=page]:shadow-[inset_0_0_0_1px_var(--ix-sel-ring)] data-[state=on]:bg-[var(--ix-sel-bg)] data-[state=on]:shadow-[inset_0_0_0_1px_var(--ix-sel-ring)] data-[state=active]:bg-[var(--ix-sel-bg)] data-[state=active]:text-[var(--accent-text)] data-[state=active]:shadow-[inset_0_0_0_1px_var(--ix-sel-ring)]"
153
153
  ], variant === "tabs" && [
154
154
  "shrink-0 rounded-none border-b-2 border-transparent -mb-px px-4 py-2",
155
- "pointer-coarse:min-h-11",
155
+ "pointer-coarse:min-h-11 pointer-coarse:min-w-11",
156
156
  focusRingInset,
157
157
  "hover:shadow-[inset_0_-2px_0_hsl(var(--hsl-ring)/0.4)] data-[state=active]:bg-[hsl(var(--hsl-ring)/0.07)] data-[state=active]:text-[var(--accent-text)] data-[state=active]:shadow-[inset_0_-2px_0_var(--ix-sel-ring)] aria-checked:bg-[hsl(var(--hsl-ring)/0.07)] aria-checked:text-[var(--accent-text)] aria-checked:shadow-[inset_0_-2px_0_var(--ix-sel-ring)]"
158
158
  ], active ? "text-[var(--accent-text)]" : "text-muted-foreground hover:text-foreground"),