@proteos/ui 0.46.0 → 0.48.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/dist/index.d.cts CHANGED
@@ -9,6 +9,7 @@ import { Key, BreadcrumbsProps as BreadcrumbsProps$1, ButtonProps as ButtonProps
9
9
  import { ColumnDef, SortingState, OnChangeFn, Row } from '@tanstack/react-table';
10
10
  import * as tailwind_merge from 'tailwind-merge';
11
11
  import { Message, Conversation, UpdateDraftRequest, ContactAddress, ConversationClient, SendRecipient } from '@proteos/sdk';
12
+ import { OrbState, OrbTheme } from 'thinking-orbs';
12
13
  import { ClassValue } from 'clsx';
13
14
 
14
15
  declare const attachmentChipStyles: tailwind_variants.TVReturnType<{
@@ -1012,6 +1013,20 @@ type DataTableProps<TRow> = {
1012
1013
  * at slot='end'. Sits inside the scrollable area below the rows.
1013
1014
  */
1014
1015
  bodyAfter?: ReactNode;
1016
+ /**
1017
+ * Row selection. `none` (default) renders no checkbox column; `multiple`
1018
+ * prepends a sticky leading checkbox column and turns the header checkbox
1019
+ * into a tri-state select-all.
1020
+ *
1021
+ * Selection is CONTROLLED — the owner holds the ids because it is the one
1022
+ * that acts on them (running a batch action, clearing after a save). The
1023
+ * header checkbox covers the rows currently LOADED: an infinite list can't
1024
+ * honestly claim to select rows it has never fetched, so "select everything
1025
+ * matching the filter" belongs to the owner's toolbar, not here.
1026
+ */
1027
+ selectionMode?: 'none' | 'multiple';
1028
+ selectedIds?: Set<string>;
1029
+ onSelectionChange?: (ids: Set<string>) => void;
1015
1030
  /**
1016
1031
  * Draw vertical gridlines between body cells. The header always has them;
1017
1032
  * the body opts in (e.g. inline-edit mode wants the full Excel-style grid).
@@ -1019,7 +1034,9 @@ type DataTableProps<TRow> = {
1019
1034
  */
1020
1035
  columnBorders?: boolean;
1021
1036
  };
1022
- declare function DataTable<TRow>({ query, columns, sorting, onSortingChange, rowHeight, overscan, onRowClick, zebra, emptyState, errorState, loadingState, getRowId, className, ariaLabel, enableColumnReordering, enableColumnRemoval, onReorderColumn, onRemoveColumn, variant, rowWrapper, extraRows, bodyBefore, bodyAfter, columnBorders, }: DataTableProps<TRow>): react_jsx_runtime.JSX.Element;
1037
+ /** Column id of the leading checkbox column added by `selectionMode`. */
1038
+ declare const SELECTION_COLUMN_ID = "__select__";
1039
+ declare function DataTable<TRow>({ query, columns, sorting, onSortingChange, rowHeight, overscan, onRowClick, zebra, emptyState, errorState, loadingState, getRowId, className, ariaLabel, enableColumnReordering, enableColumnRemoval, onReorderColumn, onRemoveColumn, variant, rowWrapper, extraRows, bodyBefore, bodyAfter, selectionMode, selectedIds, onSelectionChange, columnBorders, }: DataTableProps<TRow>): react_jsx_runtime.JSX.Element;
1023
1040
 
1024
1041
  type ActionsColumnOptions<TData> = {
1025
1042
  id?: string;
@@ -1909,6 +1926,23 @@ type NavGroupProps = Omit<DisclosureProps, 'children'> & {
1909
1926
  * vertical guide rule and pick up nested styling automatically. */
1910
1927
  declare function NavGroup({ icon, label, children, className, ...props }: NavGroupProps): react_jsx_runtime.JSX.Element;
1911
1928
 
1929
+ type OrbSizeToken = 'xs' | 'sm' | 'md' | 'lg';
1930
+ interface OrbProps {
1931
+ /** xs 12 · sm 20 (native inline) · md 40 · lg 64 (native avatar). Default `sm`. */
1932
+ size?: OrbSizeToken;
1933
+ /** Animation state; defaults to `solving` (the working indicator). */
1934
+ state?: OrbState;
1935
+ /** Speed multiplier (1 = tuned speed); e.g. 0.2 for a slow idle shimmer. */
1936
+ speed?: number;
1937
+ /** Pin the ink instead of auto-detecting — `dark` renders light dots (for
1938
+ * a dark chip like the launcher's black circle). */
1939
+ theme?: OrbTheme;
1940
+ className?: string;
1941
+ /** Accessible name; omitting it hides the orb from assistive tech. */
1942
+ label?: string;
1943
+ }
1944
+ declare function Orb({ size, state, speed, theme, className, label }: OrbProps): react_jsx_runtime.JSX.Element;
1945
+
1912
1946
  declare function Popover(props: DialogTriggerProps): react_jsx_runtime.JSX.Element;
1913
1947
  type PopoverContentProps = Omit<PopoverProps, 'children'> & {
1914
1948
  /** Dialog children. Supports the render-prop form `({ close }) => …`. */
@@ -2011,7 +2045,8 @@ type FilterFieldOption = {
2011
2045
  type FilterField = {
2012
2046
  /** Dot-path to the attribute, e.g. `'owner.email'`. Stable identifier. */
2013
2047
  path: string;
2014
- /** Full nested label, e.g. `'Owner / Email'`. Used in pickers. */
2048
+ /** Full nested label, e.g. `'Owner · Email'` — parts joined with
2049
+ * `FIELD_LABEL_SEPARATOR`. Used in pickers. */
2015
2050
  label: string;
2016
2051
  /** Leaf label only, e.g. `'Email'`. Used in chips. */
2017
2052
  shortLabel: string;
@@ -2114,6 +2149,20 @@ type AttributePickerProps = {
2114
2149
  };
2115
2150
  declare function AttributePicker({ fields, value, onChange, autoFocus, isDisabled, size, className, }: AttributePickerProps): react_jsx_runtime.JSX.Element;
2116
2151
 
2152
+ /**
2153
+ * U+00B7 MIDDLE DOT, spaced. The same separator the app already uses for
2154
+ * breadcrumb-ish text ("Segment · SaaS decision makers"), and quieter than a
2155
+ * slash at the small type sizes these labels render at — the eye reads the
2156
+ * words, not the punctuation.
2157
+ */
2158
+ declare const FIELD_LABEL_SEPARATOR = " \u00B7 ";
2159
+ /**
2160
+ * Joins breadcrumb parts with {@link FIELD_LABEL_SEPARATOR}, skipping empties
2161
+ * so a field with no parent renders as its own label rather than with a
2162
+ * leading separator.
2163
+ */
2164
+ declare function joinFieldLabel(...parts: ReadonlyArray<string | undefined | null>): string;
2165
+
2117
2166
  /**
2118
2167
  * Per-value-item renderer. Called once per value (twice for arity 'n'
2119
2168
  * with two items, etc.) AFTER arity orchestration. Return `undefined`
@@ -2727,4 +2776,4 @@ declare function Tooltip({ className, offset, ...props }: TooltipProps): react_j
2727
2776
 
2728
2777
  declare function cn(...inputs: ClassValue[]): string;
2729
2778
 
2730
- export { ATTRIBUTE_TYPES, ATTRIBUTE_TYPE_ICONS, type ActionsColumnOptions, AttachmentChip, type AttachmentChipProps, type AttachmentChipVariants, AttributePicker, type AttributePickerProps, AttributeType, AttributeTypeIcon, type AttributeTypeIconProps, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarGroupVariants, type AvatarProps, type AvatarVariants, Badge, BadgeMultiSelect, type BadgeMultiSelectOption, type BadgeMultiSelectProps, type BadgeProps, type BadgeVariants, BooleanCell, type BooleanCellProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, type ButtonVariants, COLUMN_DRAG_KIND, Card, CardBody, CardContent, CardEyebrow, CardFeatureTitle, CardFooter, CardHeader, type CardProps, CardTitle, type CardVariants, ChannelIcon, type ChannelIconProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, ChipValue, type ChipValueItemRenderer, type ChipValueProps, ColorInput, type ColorInputProps, type ColumnDragData, Combobox, type ComboboxOption, type ComboboxProps, Command, CommandHint, type CommandHintProps, type CommandHintTone, type CommandProps, type ComparisonOperator, type ComposerAttachment, type ComposerConnectionPicker, type ComposerSendInput, type ComposerValue, CurrencyInput, type CurrencyInputOption, type CurrencyInputProps, type CurrencyInputValue, DRAFT_OUTCOME_LABEL, DataTable, DataTableEmpty, type DataTableEmptyProps, DataTableError, type DataTableErrorProps, type DataTableProps, DataTableSkeleton, type DataTableSkeletonProps, DateCell, type DateCellProps, DatePicker, type DatePickerProps, DateTimeCell, type DateTimeCellProps, DateTimePicker, type DateTimePickerProps, type DraftMessageActions, DraftMessageCard, type DraftMessageCardProps, type DraftMessageClient, DraftMessageComposer, type DraftMessageComposerProps, type DraftMessageOutcome, DraftMessageReview, type DraftMessageReviewProps, type DraftReviewOutcome, EmptyState, type EmptyStateProps, type EmptyStateVariants, ErrorAnimation, type ErrorAnimationProps, type FieldAppearance, FieldCaret, type FieldControlVariants, type FieldSize, FileField, type FileFieldProps, type FileFieldValue, FileViewer, FileViewerFallbackCard, type FileViewerFallbackCardProps, type FileViewerFallbackCardVariants, type FileViewerKind, type FileViewerProps, type FileViewerVariants, type FilterElement, type FilterField, type FilterFieldOption, type FilterFieldRelation, type FilterFieldType, type FilterGroup, FilterRow, type FilterRowProps, type FilterValue, FilterValueInput, type FilterValueInputProps, type FilterValueInputRenderer, IconPicker, type IconPickerProps, ImageAttachment, type ImageAttachmentProps, type ImageAttachmentVariants, ImageLightbox, type ImageLightboxProps, type ImageLightboxVariants, type InfiniteQueryLike, Input, type InputProps, Kbd, type KbdProps, type KeyCombo, LinkCell, type LinkCellProps, type LogicalOperator, type LucideIconName, MAX_COMPOSER_ATTACHMENT_BYTES, Menu, MenuItem, type MenuItemProps, MenuPopover, type MenuPopoverProps, type MenuProps, MenuTrigger, MessageComposer, type MessageComposerProps, Modal, ModalBody, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, ModalHeader, ModalTitle, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, type NavItemVariants, NavSection, type NavSectionProps, OPERATORS, type OperatorArity, type OperatorDescriptor, OperatorPicker, type OperatorPickerProps, PROTECTED_COMBOS, Popover, PopoverContent, type PopoverContentProps, PopoverPanelBody, PopoverPanelFooter, PopoverPanelHeader, PressableCard, type PressableCardProps, ProgressBar, type ProgressBarProps, type ProgressBarVariants, Radio, RadioGroup, type RadioGroupProps, type RadioProps, RecipientSelect, type RecipientSelectProps, RecordFilterBuilderPanel, type RecordFilterBuilderPanelProps, RecordFilterButton, type RecordFilterButtonProps, RecordFilterChips, type RecordFilterChipsProps, RecordFilterEditor, type RecordFilterEditorProps, RenderChipItemProvider, RenderValueInputProvider, type SearchRecipients, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, type SegmentedControlVariants, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SkeletonVariants, type SortDirection, SubmenuTrigger, SuccessAnimation, type SuccessAnimationProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, TableHeaderSpacer, type TableProps, TableRow, type TableRowProps, TableScroller, type TableVariants, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, type TabsTriggerProps, type TabsVariants, TagInput, type TagInputProps, type TerminalKind, Textarea, type TextareaProps, TimeField, type TimeFieldProps, type ToastContent, type ToastOptions, type ToastQueue, ToastRegion, type ToastRegionProps, type ToastVariant, type ToastVariants, Tooltip, type TooltipProps, TooltipTrigger, TruncateCell, type TruncateCellProps, type UseCommandOptions, type UseEscapeKeyOptions, type UseInfiniteScrollSentinelOptions, __resetDraftMessageActions, __resetDraftMessageOutcomes, addLeaf as addFilterLeaf, addPendingLeaf, addSubgroup, arityOf, attachmentChipStyles, avatarGroupStyles, avatarStyles, badgeStyles, buttonStyles, cardStyles, channelIcon, cn, countLeaves, createDraftMessageClient, createToastQueue, defaultValueFor, draftMessageCardStyles, draftMessageComposerStyles, draftOutcomeFor, emptyStateStyles, fieldControlStyles, fieldErrorStyles, fieldHintStyles, fieldLabelStyles, fileViewerFallbackCardStyles, fileViewerStyles, formatFileSize, formatValue, iconForContentType, imageAttachmentStyles, imageLightboxStyles, isColumnDragData, isDraftReviewOutcome, isEditableTarget, isPreviewableImageName, makeActionsColumn, messageComposerStyles, navItemStyles, normalizeHexColor, operatorById, operatorsForType, parseCombo, progressBarStyles, publishDraftMessageOutcome, rebaseRowOnFieldChange, rebaseRowOnOperatorChange, registerDraftMessageActions, removeLeaf, removeSubgroup, replaceLeaf, resolveLucideIcon, resolveLucideIconName, segmentedControlStyles, setJoiner, skeletonStyles, subscribeDraftMessageOutcome, tableCellStyles, tableHeaderCellStyles, tabsStyles, terminalKindFor, toastStyles, updateLeaf, updateSubgroup, useAttributeTypeIcon, useCommand, useDiscoveryActive, useDraftMessageActions, useDraftMessageOutcome, useEscapeKey, useInfiniteScrollSentinel, useRenderChipItem, useRenderValueInput, useShowDetails, viewerKindForContentType, wrapLeafInGroup };
2779
+ export { ATTRIBUTE_TYPES, ATTRIBUTE_TYPE_ICONS, type ActionsColumnOptions, AttachmentChip, type AttachmentChipProps, type AttachmentChipVariants, AttributePicker, type AttributePickerProps, AttributeType, AttributeTypeIcon, type AttributeTypeIconProps, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarGroupVariants, type AvatarProps, type AvatarVariants, Badge, BadgeMultiSelect, type BadgeMultiSelectOption, type BadgeMultiSelectProps, type BadgeProps, type BadgeVariants, BooleanCell, type BooleanCellProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, type ButtonVariants, COLUMN_DRAG_KIND, Card, CardBody, CardContent, CardEyebrow, CardFeatureTitle, CardFooter, CardHeader, type CardProps, CardTitle, type CardVariants, ChannelIcon, type ChannelIconProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, ChipValue, type ChipValueItemRenderer, type ChipValueProps, ColorInput, type ColorInputProps, type ColumnDragData, Combobox, type ComboboxOption, type ComboboxProps, Command, CommandHint, type CommandHintProps, type CommandHintTone, type CommandProps, type ComparisonOperator, type ComposerAttachment, type ComposerConnectionPicker, type ComposerSendInput, type ComposerValue, CurrencyInput, type CurrencyInputOption, type CurrencyInputProps, type CurrencyInputValue, DRAFT_OUTCOME_LABEL, DataTable, DataTableEmpty, type DataTableEmptyProps, DataTableError, type DataTableErrorProps, type DataTableProps, DataTableSkeleton, type DataTableSkeletonProps, DateCell, type DateCellProps, DatePicker, type DatePickerProps, DateTimeCell, type DateTimeCellProps, DateTimePicker, type DateTimePickerProps, type DraftMessageActions, DraftMessageCard, type DraftMessageCardProps, type DraftMessageClient, DraftMessageComposer, type DraftMessageComposerProps, type DraftMessageOutcome, DraftMessageReview, type DraftMessageReviewProps, type DraftReviewOutcome, EmptyState, type EmptyStateProps, type EmptyStateVariants, ErrorAnimation, type ErrorAnimationProps, FIELD_LABEL_SEPARATOR, type FieldAppearance, FieldCaret, type FieldControlVariants, type FieldSize, FileField, type FileFieldProps, type FileFieldValue, FileViewer, FileViewerFallbackCard, type FileViewerFallbackCardProps, type FileViewerFallbackCardVariants, type FileViewerKind, type FileViewerProps, type FileViewerVariants, type FilterElement, type FilterField, type FilterFieldOption, type FilterFieldRelation, type FilterFieldType, type FilterGroup, FilterRow, type FilterRowProps, type FilterValue, FilterValueInput, type FilterValueInputProps, type FilterValueInputRenderer, IconPicker, type IconPickerProps, ImageAttachment, type ImageAttachmentProps, type ImageAttachmentVariants, ImageLightbox, type ImageLightboxProps, type ImageLightboxVariants, type InfiniteQueryLike, Input, type InputProps, Kbd, type KbdProps, type KeyCombo, LinkCell, type LinkCellProps, type LogicalOperator, type LucideIconName, MAX_COMPOSER_ATTACHMENT_BYTES, Menu, MenuItem, type MenuItemProps, MenuPopover, type MenuPopoverProps, type MenuProps, MenuTrigger, MessageComposer, type MessageComposerProps, Modal, ModalBody, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, ModalHeader, ModalTitle, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, type NavItemVariants, NavSection, type NavSectionProps, OPERATORS, type OperatorArity, type OperatorDescriptor, OperatorPicker, type OperatorPickerProps, Orb, type OrbProps, type OrbSizeToken, PROTECTED_COMBOS, Popover, PopoverContent, type PopoverContentProps, PopoverPanelBody, PopoverPanelFooter, PopoverPanelHeader, PressableCard, type PressableCardProps, ProgressBar, type ProgressBarProps, type ProgressBarVariants, Radio, RadioGroup, type RadioGroupProps, type RadioProps, RecipientSelect, type RecipientSelectProps, RecordFilterBuilderPanel, type RecordFilterBuilderPanelProps, RecordFilterButton, type RecordFilterButtonProps, RecordFilterChips, type RecordFilterChipsProps, RecordFilterEditor, type RecordFilterEditorProps, RenderChipItemProvider, RenderValueInputProvider, SELECTION_COLUMN_ID, type SearchRecipients, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, type SegmentedControlVariants, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SkeletonVariants, type SortDirection, SubmenuTrigger, SuccessAnimation, type SuccessAnimationProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, TableHeaderSpacer, type TableProps, TableRow, type TableRowProps, TableScroller, type TableVariants, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, type TabsTriggerProps, type TabsVariants, TagInput, type TagInputProps, type TerminalKind, Textarea, type TextareaProps, TimeField, type TimeFieldProps, type ToastContent, type ToastOptions, type ToastQueue, ToastRegion, type ToastRegionProps, type ToastVariant, type ToastVariants, Tooltip, type TooltipProps, TooltipTrigger, TruncateCell, type TruncateCellProps, type UseCommandOptions, type UseEscapeKeyOptions, type UseInfiniteScrollSentinelOptions, __resetDraftMessageActions, __resetDraftMessageOutcomes, addLeaf as addFilterLeaf, addPendingLeaf, addSubgroup, arityOf, attachmentChipStyles, avatarGroupStyles, avatarStyles, badgeStyles, buttonStyles, cardStyles, channelIcon, cn, countLeaves, createDraftMessageClient, createToastQueue, defaultValueFor, draftMessageCardStyles, draftMessageComposerStyles, draftOutcomeFor, emptyStateStyles, fieldControlStyles, fieldErrorStyles, fieldHintStyles, fieldLabelStyles, fileViewerFallbackCardStyles, fileViewerStyles, formatFileSize, formatValue, iconForContentType, imageAttachmentStyles, imageLightboxStyles, isColumnDragData, isDraftReviewOutcome, isEditableTarget, isPreviewableImageName, joinFieldLabel, makeActionsColumn, messageComposerStyles, navItemStyles, normalizeHexColor, operatorById, operatorsForType, parseCombo, progressBarStyles, publishDraftMessageOutcome, rebaseRowOnFieldChange, rebaseRowOnOperatorChange, registerDraftMessageActions, removeLeaf, removeSubgroup, replaceLeaf, resolveLucideIcon, resolveLucideIconName, segmentedControlStyles, setJoiner, skeletonStyles, subscribeDraftMessageOutcome, tableCellStyles, tableHeaderCellStyles, tabsStyles, terminalKindFor, toastStyles, updateLeaf, updateSubgroup, useAttributeTypeIcon, useCommand, useDiscoveryActive, useDraftMessageActions, useDraftMessageOutcome, useEscapeKey, useInfiniteScrollSentinel, useRenderChipItem, useRenderValueInput, useShowDetails, viewerKindForContentType, wrapLeafInGroup };
package/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ import { Key, BreadcrumbsProps as BreadcrumbsProps$1, ButtonProps as ButtonProps
9
9
  import { ColumnDef, SortingState, OnChangeFn, Row } from '@tanstack/react-table';
10
10
  import * as tailwind_merge from 'tailwind-merge';
11
11
  import { Message, Conversation, UpdateDraftRequest, ContactAddress, ConversationClient, SendRecipient } from '@proteos/sdk';
12
+ import { OrbState, OrbTheme } from 'thinking-orbs';
12
13
  import { ClassValue } from 'clsx';
13
14
 
14
15
  declare const attachmentChipStyles: tailwind_variants.TVReturnType<{
@@ -1012,6 +1013,20 @@ type DataTableProps<TRow> = {
1012
1013
  * at slot='end'. Sits inside the scrollable area below the rows.
1013
1014
  */
1014
1015
  bodyAfter?: ReactNode;
1016
+ /**
1017
+ * Row selection. `none` (default) renders no checkbox column; `multiple`
1018
+ * prepends a sticky leading checkbox column and turns the header checkbox
1019
+ * into a tri-state select-all.
1020
+ *
1021
+ * Selection is CONTROLLED — the owner holds the ids because it is the one
1022
+ * that acts on them (running a batch action, clearing after a save). The
1023
+ * header checkbox covers the rows currently LOADED: an infinite list can't
1024
+ * honestly claim to select rows it has never fetched, so "select everything
1025
+ * matching the filter" belongs to the owner's toolbar, not here.
1026
+ */
1027
+ selectionMode?: 'none' | 'multiple';
1028
+ selectedIds?: Set<string>;
1029
+ onSelectionChange?: (ids: Set<string>) => void;
1015
1030
  /**
1016
1031
  * Draw vertical gridlines between body cells. The header always has them;
1017
1032
  * the body opts in (e.g. inline-edit mode wants the full Excel-style grid).
@@ -1019,7 +1034,9 @@ type DataTableProps<TRow> = {
1019
1034
  */
1020
1035
  columnBorders?: boolean;
1021
1036
  };
1022
- declare function DataTable<TRow>({ query, columns, sorting, onSortingChange, rowHeight, overscan, onRowClick, zebra, emptyState, errorState, loadingState, getRowId, className, ariaLabel, enableColumnReordering, enableColumnRemoval, onReorderColumn, onRemoveColumn, variant, rowWrapper, extraRows, bodyBefore, bodyAfter, columnBorders, }: DataTableProps<TRow>): react_jsx_runtime.JSX.Element;
1037
+ /** Column id of the leading checkbox column added by `selectionMode`. */
1038
+ declare const SELECTION_COLUMN_ID = "__select__";
1039
+ declare function DataTable<TRow>({ query, columns, sorting, onSortingChange, rowHeight, overscan, onRowClick, zebra, emptyState, errorState, loadingState, getRowId, className, ariaLabel, enableColumnReordering, enableColumnRemoval, onReorderColumn, onRemoveColumn, variant, rowWrapper, extraRows, bodyBefore, bodyAfter, selectionMode, selectedIds, onSelectionChange, columnBorders, }: DataTableProps<TRow>): react_jsx_runtime.JSX.Element;
1023
1040
 
1024
1041
  type ActionsColumnOptions<TData> = {
1025
1042
  id?: string;
@@ -1909,6 +1926,23 @@ type NavGroupProps = Omit<DisclosureProps, 'children'> & {
1909
1926
  * vertical guide rule and pick up nested styling automatically. */
1910
1927
  declare function NavGroup({ icon, label, children, className, ...props }: NavGroupProps): react_jsx_runtime.JSX.Element;
1911
1928
 
1929
+ type OrbSizeToken = 'xs' | 'sm' | 'md' | 'lg';
1930
+ interface OrbProps {
1931
+ /** xs 12 · sm 20 (native inline) · md 40 · lg 64 (native avatar). Default `sm`. */
1932
+ size?: OrbSizeToken;
1933
+ /** Animation state; defaults to `solving` (the working indicator). */
1934
+ state?: OrbState;
1935
+ /** Speed multiplier (1 = tuned speed); e.g. 0.2 for a slow idle shimmer. */
1936
+ speed?: number;
1937
+ /** Pin the ink instead of auto-detecting — `dark` renders light dots (for
1938
+ * a dark chip like the launcher's black circle). */
1939
+ theme?: OrbTheme;
1940
+ className?: string;
1941
+ /** Accessible name; omitting it hides the orb from assistive tech. */
1942
+ label?: string;
1943
+ }
1944
+ declare function Orb({ size, state, speed, theme, className, label }: OrbProps): react_jsx_runtime.JSX.Element;
1945
+
1912
1946
  declare function Popover(props: DialogTriggerProps): react_jsx_runtime.JSX.Element;
1913
1947
  type PopoverContentProps = Omit<PopoverProps, 'children'> & {
1914
1948
  /** Dialog children. Supports the render-prop form `({ close }) => …`. */
@@ -2011,7 +2045,8 @@ type FilterFieldOption = {
2011
2045
  type FilterField = {
2012
2046
  /** Dot-path to the attribute, e.g. `'owner.email'`. Stable identifier. */
2013
2047
  path: string;
2014
- /** Full nested label, e.g. `'Owner / Email'`. Used in pickers. */
2048
+ /** Full nested label, e.g. `'Owner · Email'` — parts joined with
2049
+ * `FIELD_LABEL_SEPARATOR`. Used in pickers. */
2015
2050
  label: string;
2016
2051
  /** Leaf label only, e.g. `'Email'`. Used in chips. */
2017
2052
  shortLabel: string;
@@ -2114,6 +2149,20 @@ type AttributePickerProps = {
2114
2149
  };
2115
2150
  declare function AttributePicker({ fields, value, onChange, autoFocus, isDisabled, size, className, }: AttributePickerProps): react_jsx_runtime.JSX.Element;
2116
2151
 
2152
+ /**
2153
+ * U+00B7 MIDDLE DOT, spaced. The same separator the app already uses for
2154
+ * breadcrumb-ish text ("Segment · SaaS decision makers"), and quieter than a
2155
+ * slash at the small type sizes these labels render at — the eye reads the
2156
+ * words, not the punctuation.
2157
+ */
2158
+ declare const FIELD_LABEL_SEPARATOR = " \u00B7 ";
2159
+ /**
2160
+ * Joins breadcrumb parts with {@link FIELD_LABEL_SEPARATOR}, skipping empties
2161
+ * so a field with no parent renders as its own label rather than with a
2162
+ * leading separator.
2163
+ */
2164
+ declare function joinFieldLabel(...parts: ReadonlyArray<string | undefined | null>): string;
2165
+
2117
2166
  /**
2118
2167
  * Per-value-item renderer. Called once per value (twice for arity 'n'
2119
2168
  * with two items, etc.) AFTER arity orchestration. Return `undefined`
@@ -2727,4 +2776,4 @@ declare function Tooltip({ className, offset, ...props }: TooltipProps): react_j
2727
2776
 
2728
2777
  declare function cn(...inputs: ClassValue[]): string;
2729
2778
 
2730
- export { ATTRIBUTE_TYPES, ATTRIBUTE_TYPE_ICONS, type ActionsColumnOptions, AttachmentChip, type AttachmentChipProps, type AttachmentChipVariants, AttributePicker, type AttributePickerProps, AttributeType, AttributeTypeIcon, type AttributeTypeIconProps, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarGroupVariants, type AvatarProps, type AvatarVariants, Badge, BadgeMultiSelect, type BadgeMultiSelectOption, type BadgeMultiSelectProps, type BadgeProps, type BadgeVariants, BooleanCell, type BooleanCellProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, type ButtonVariants, COLUMN_DRAG_KIND, Card, CardBody, CardContent, CardEyebrow, CardFeatureTitle, CardFooter, CardHeader, type CardProps, CardTitle, type CardVariants, ChannelIcon, type ChannelIconProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, ChipValue, type ChipValueItemRenderer, type ChipValueProps, ColorInput, type ColorInputProps, type ColumnDragData, Combobox, type ComboboxOption, type ComboboxProps, Command, CommandHint, type CommandHintProps, type CommandHintTone, type CommandProps, type ComparisonOperator, type ComposerAttachment, type ComposerConnectionPicker, type ComposerSendInput, type ComposerValue, CurrencyInput, type CurrencyInputOption, type CurrencyInputProps, type CurrencyInputValue, DRAFT_OUTCOME_LABEL, DataTable, DataTableEmpty, type DataTableEmptyProps, DataTableError, type DataTableErrorProps, type DataTableProps, DataTableSkeleton, type DataTableSkeletonProps, DateCell, type DateCellProps, DatePicker, type DatePickerProps, DateTimeCell, type DateTimeCellProps, DateTimePicker, type DateTimePickerProps, type DraftMessageActions, DraftMessageCard, type DraftMessageCardProps, type DraftMessageClient, DraftMessageComposer, type DraftMessageComposerProps, type DraftMessageOutcome, DraftMessageReview, type DraftMessageReviewProps, type DraftReviewOutcome, EmptyState, type EmptyStateProps, type EmptyStateVariants, ErrorAnimation, type ErrorAnimationProps, type FieldAppearance, FieldCaret, type FieldControlVariants, type FieldSize, FileField, type FileFieldProps, type FileFieldValue, FileViewer, FileViewerFallbackCard, type FileViewerFallbackCardProps, type FileViewerFallbackCardVariants, type FileViewerKind, type FileViewerProps, type FileViewerVariants, type FilterElement, type FilterField, type FilterFieldOption, type FilterFieldRelation, type FilterFieldType, type FilterGroup, FilterRow, type FilterRowProps, type FilterValue, FilterValueInput, type FilterValueInputProps, type FilterValueInputRenderer, IconPicker, type IconPickerProps, ImageAttachment, type ImageAttachmentProps, type ImageAttachmentVariants, ImageLightbox, type ImageLightboxProps, type ImageLightboxVariants, type InfiniteQueryLike, Input, type InputProps, Kbd, type KbdProps, type KeyCombo, LinkCell, type LinkCellProps, type LogicalOperator, type LucideIconName, MAX_COMPOSER_ATTACHMENT_BYTES, Menu, MenuItem, type MenuItemProps, MenuPopover, type MenuPopoverProps, type MenuProps, MenuTrigger, MessageComposer, type MessageComposerProps, Modal, ModalBody, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, ModalHeader, ModalTitle, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, type NavItemVariants, NavSection, type NavSectionProps, OPERATORS, type OperatorArity, type OperatorDescriptor, OperatorPicker, type OperatorPickerProps, PROTECTED_COMBOS, Popover, PopoverContent, type PopoverContentProps, PopoverPanelBody, PopoverPanelFooter, PopoverPanelHeader, PressableCard, type PressableCardProps, ProgressBar, type ProgressBarProps, type ProgressBarVariants, Radio, RadioGroup, type RadioGroupProps, type RadioProps, RecipientSelect, type RecipientSelectProps, RecordFilterBuilderPanel, type RecordFilterBuilderPanelProps, RecordFilterButton, type RecordFilterButtonProps, RecordFilterChips, type RecordFilterChipsProps, RecordFilterEditor, type RecordFilterEditorProps, RenderChipItemProvider, RenderValueInputProvider, type SearchRecipients, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, type SegmentedControlVariants, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SkeletonVariants, type SortDirection, SubmenuTrigger, SuccessAnimation, type SuccessAnimationProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, TableHeaderSpacer, type TableProps, TableRow, type TableRowProps, TableScroller, type TableVariants, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, type TabsTriggerProps, type TabsVariants, TagInput, type TagInputProps, type TerminalKind, Textarea, type TextareaProps, TimeField, type TimeFieldProps, type ToastContent, type ToastOptions, type ToastQueue, ToastRegion, type ToastRegionProps, type ToastVariant, type ToastVariants, Tooltip, type TooltipProps, TooltipTrigger, TruncateCell, type TruncateCellProps, type UseCommandOptions, type UseEscapeKeyOptions, type UseInfiniteScrollSentinelOptions, __resetDraftMessageActions, __resetDraftMessageOutcomes, addLeaf as addFilterLeaf, addPendingLeaf, addSubgroup, arityOf, attachmentChipStyles, avatarGroupStyles, avatarStyles, badgeStyles, buttonStyles, cardStyles, channelIcon, cn, countLeaves, createDraftMessageClient, createToastQueue, defaultValueFor, draftMessageCardStyles, draftMessageComposerStyles, draftOutcomeFor, emptyStateStyles, fieldControlStyles, fieldErrorStyles, fieldHintStyles, fieldLabelStyles, fileViewerFallbackCardStyles, fileViewerStyles, formatFileSize, formatValue, iconForContentType, imageAttachmentStyles, imageLightboxStyles, isColumnDragData, isDraftReviewOutcome, isEditableTarget, isPreviewableImageName, makeActionsColumn, messageComposerStyles, navItemStyles, normalizeHexColor, operatorById, operatorsForType, parseCombo, progressBarStyles, publishDraftMessageOutcome, rebaseRowOnFieldChange, rebaseRowOnOperatorChange, registerDraftMessageActions, removeLeaf, removeSubgroup, replaceLeaf, resolveLucideIcon, resolveLucideIconName, segmentedControlStyles, setJoiner, skeletonStyles, subscribeDraftMessageOutcome, tableCellStyles, tableHeaderCellStyles, tabsStyles, terminalKindFor, toastStyles, updateLeaf, updateSubgroup, useAttributeTypeIcon, useCommand, useDiscoveryActive, useDraftMessageActions, useDraftMessageOutcome, useEscapeKey, useInfiniteScrollSentinel, useRenderChipItem, useRenderValueInput, useShowDetails, viewerKindForContentType, wrapLeafInGroup };
2779
+ export { ATTRIBUTE_TYPES, ATTRIBUTE_TYPE_ICONS, type ActionsColumnOptions, AttachmentChip, type AttachmentChipProps, type AttachmentChipVariants, AttributePicker, type AttributePickerProps, AttributeType, AttributeTypeIcon, type AttributeTypeIconProps, Avatar, AvatarGroup, type AvatarGroupItem, type AvatarGroupProps, type AvatarGroupVariants, type AvatarProps, type AvatarVariants, Badge, BadgeMultiSelect, type BadgeMultiSelectOption, type BadgeMultiSelectProps, type BadgeProps, type BadgeVariants, BooleanCell, type BooleanCellProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Button, type ButtonProps, type ButtonVariants, COLUMN_DRAG_KIND, Card, CardBody, CardContent, CardEyebrow, CardFeatureTitle, CardFooter, CardHeader, type CardProps, CardTitle, type CardVariants, ChannelIcon, type ChannelIconProps, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, ChipValue, type ChipValueItemRenderer, type ChipValueProps, ColorInput, type ColorInputProps, type ColumnDragData, Combobox, type ComboboxOption, type ComboboxProps, Command, CommandHint, type CommandHintProps, type CommandHintTone, type CommandProps, type ComparisonOperator, type ComposerAttachment, type ComposerConnectionPicker, type ComposerSendInput, type ComposerValue, CurrencyInput, type CurrencyInputOption, type CurrencyInputProps, type CurrencyInputValue, DRAFT_OUTCOME_LABEL, DataTable, DataTableEmpty, type DataTableEmptyProps, DataTableError, type DataTableErrorProps, type DataTableProps, DataTableSkeleton, type DataTableSkeletonProps, DateCell, type DateCellProps, DatePicker, type DatePickerProps, DateTimeCell, type DateTimeCellProps, DateTimePicker, type DateTimePickerProps, type DraftMessageActions, DraftMessageCard, type DraftMessageCardProps, type DraftMessageClient, DraftMessageComposer, type DraftMessageComposerProps, type DraftMessageOutcome, DraftMessageReview, type DraftMessageReviewProps, type DraftReviewOutcome, EmptyState, type EmptyStateProps, type EmptyStateVariants, ErrorAnimation, type ErrorAnimationProps, FIELD_LABEL_SEPARATOR, type FieldAppearance, FieldCaret, type FieldControlVariants, type FieldSize, FileField, type FileFieldProps, type FileFieldValue, FileViewer, FileViewerFallbackCard, type FileViewerFallbackCardProps, type FileViewerFallbackCardVariants, type FileViewerKind, type FileViewerProps, type FileViewerVariants, type FilterElement, type FilterField, type FilterFieldOption, type FilterFieldRelation, type FilterFieldType, type FilterGroup, FilterRow, type FilterRowProps, type FilterValue, FilterValueInput, type FilterValueInputProps, type FilterValueInputRenderer, IconPicker, type IconPickerProps, ImageAttachment, type ImageAttachmentProps, type ImageAttachmentVariants, ImageLightbox, type ImageLightboxProps, type ImageLightboxVariants, type InfiniteQueryLike, Input, type InputProps, Kbd, type KbdProps, type KeyCombo, LinkCell, type LinkCellProps, type LogicalOperator, type LucideIconName, MAX_COMPOSER_ATTACHMENT_BYTES, Menu, MenuItem, type MenuItemProps, MenuPopover, type MenuPopoverProps, type MenuProps, MenuTrigger, MessageComposer, type MessageComposerProps, Modal, ModalBody, ModalContent, type ModalContentProps, ModalDescription, ModalFooter, ModalHeader, ModalTitle, MultiSelect, type MultiSelectOption, type MultiSelectProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, type NavItemVariants, NavSection, type NavSectionProps, OPERATORS, type OperatorArity, type OperatorDescriptor, OperatorPicker, type OperatorPickerProps, Orb, type OrbProps, type OrbSizeToken, PROTECTED_COMBOS, Popover, PopoverContent, type PopoverContentProps, PopoverPanelBody, PopoverPanelFooter, PopoverPanelHeader, PressableCard, type PressableCardProps, ProgressBar, type ProgressBarProps, type ProgressBarVariants, Radio, RadioGroup, type RadioGroupProps, type RadioProps, RecipientSelect, type RecipientSelectProps, RecordFilterBuilderPanel, type RecordFilterBuilderPanelProps, RecordFilterButton, type RecordFilterButtonProps, RecordFilterChips, type RecordFilterChipsProps, RecordFilterEditor, type RecordFilterEditorProps, RenderChipItemProvider, RenderValueInputProvider, SELECTION_COLUMN_ID, type SearchRecipients, SegmentedControl, type SegmentedControlOption, type SegmentedControlProps, type SegmentedControlVariants, Select, type SelectOption, type SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, type SkeletonVariants, type SortDirection, SubmenuTrigger, SuccessAnimation, type SuccessAnimationProps, Switch, type SwitchProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableHeader, TableHeaderCell, type TableHeaderCellProps, type TableHeaderProps, TableHeaderSpacer, type TableProps, TableRow, type TableRowProps, TableScroller, type TableVariants, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, type TabsTriggerProps, type TabsVariants, TagInput, type TagInputProps, type TerminalKind, Textarea, type TextareaProps, TimeField, type TimeFieldProps, type ToastContent, type ToastOptions, type ToastQueue, ToastRegion, type ToastRegionProps, type ToastVariant, type ToastVariants, Tooltip, type TooltipProps, TooltipTrigger, TruncateCell, type TruncateCellProps, type UseCommandOptions, type UseEscapeKeyOptions, type UseInfiniteScrollSentinelOptions, __resetDraftMessageActions, __resetDraftMessageOutcomes, addLeaf as addFilterLeaf, addPendingLeaf, addSubgroup, arityOf, attachmentChipStyles, avatarGroupStyles, avatarStyles, badgeStyles, buttonStyles, cardStyles, channelIcon, cn, countLeaves, createDraftMessageClient, createToastQueue, defaultValueFor, draftMessageCardStyles, draftMessageComposerStyles, draftOutcomeFor, emptyStateStyles, fieldControlStyles, fieldErrorStyles, fieldHintStyles, fieldLabelStyles, fileViewerFallbackCardStyles, fileViewerStyles, formatFileSize, formatValue, iconForContentType, imageAttachmentStyles, imageLightboxStyles, isColumnDragData, isDraftReviewOutcome, isEditableTarget, isPreviewableImageName, joinFieldLabel, makeActionsColumn, messageComposerStyles, navItemStyles, normalizeHexColor, operatorById, operatorsForType, parseCombo, progressBarStyles, publishDraftMessageOutcome, rebaseRowOnFieldChange, rebaseRowOnOperatorChange, registerDraftMessageActions, removeLeaf, removeSubgroup, replaceLeaf, resolveLucideIcon, resolveLucideIconName, segmentedControlStyles, setJoiner, skeletonStyles, subscribeDraftMessageOutcome, tableCellStyles, tableHeaderCellStyles, tabsStyles, terminalKindFor, toastStyles, updateLeaf, updateSubgroup, useAttributeTypeIcon, useCommand, useDiscoveryActive, useDraftMessageActions, useDraftMessageOutcome, useEscapeKey, useInfiniteScrollSentinel, useRenderChipItem, useRenderValueInput, useShowDetails, viewerKindForContentType, wrapLeafInGroup };
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { cn, Button, Skeleton } from './chunk-IKAX76MB.js';
2
2
  export { Button, Skeleton, buttonStyles, cn, skeletonStyles } from './chunk-IKAX76MB.js';
3
- import { icons, Paperclip, BookText, Banknote, UsersRound, User, Link2, Braces, Brackets, ToggleLeft, CircleDot, Calendar, Hash, Type, File, FileImage, FileText, FileSpreadsheet, FileArchive, Loader2, X, Shapes, Search, AudioLines, Video, Mic, AtSign, MessagesSquare, Camera, Send, Linkedin, MessageCircle, Mail, Pipette, ChevronDown, GripVertical, SendHorizontal, CircleX, Download, ChevronRight as ChevronRight$1, CircleCheck, CircleAlert, Info } from 'lucide-react';
3
+ import { icons, Paperclip, BookText, Banknote, UsersRound, User, Link2, Braces, Brackets, ToggleLeft, CircleDot, Calendar, Hash, Type, File, FileImage, FileText, FileSpreadsheet, FileArchive, Loader2, X, Shapes, Search, Phone, AudioLines, Video, Mic, AtSign, MessagesSquare, Camera, Send, Linkedin, MessageCircle, Mail, Pipette, ChevronDown, GripVertical, SendHorizontal, CircleX, Download, ChevronRight as ChevronRight$1, CircleCheck, CircleAlert, Info } from 'lucide-react';
4
4
  import { tv } from 'tailwind-variants';
5
5
  import { Tabs as Tabs$1, TabPanel, Tab, TabList, MenuTrigger as MenuTrigger$1, SubmenuTrigger as SubmenuTrigger$1, DialogTrigger, Popover as Popover$1, Dialog, DropZone, Text, FileTrigger, Heading, Label, Input as Input$1, ListBox, ListBoxItem, Breadcrumbs as Breadcrumbs$1, Breadcrumb, Link, Button as Button$1, Checkbox as Checkbox$1, CheckboxGroup as CheckboxGroup$1, FieldError, TextField, ComboBox, ComboBoxStateContext, Select as Select$1, DatePicker as DatePicker$1, Group, DateInput, DateSegment, SelectValue, ModalOverlay, Modal as Modal$1, Menu as Menu$1, MenuItem as MenuItem$1, Disclosure, DisclosurePanel, ProgressBar as ProgressBar$1, RadioGroup as RadioGroup$1, Radio as Radio$1, Separator as Separator$1, Switch as Switch$1, TextArea, TimeField as TimeField$1, UNSTABLE_ToastQueue, UNSTABLE_ToastRegion, UNSTABLE_Toast, UNSTABLE_ToastContent, TooltipTrigger as TooltipTrigger$1, Tooltip as Tooltip$1, Calendar as Calendar$1, CalendarGrid, CalendarGridHeader, CalendarHeaderCell, CalendarGridBody, CalendarCell, DatePickerStateContext } from 'react-aria-components';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
@@ -12,6 +12,7 @@ import { reorderWithEdge } from '@atlaskit/pragmatic-drag-and-drop-hitbox/util/r
12
12
  import { useReactTable, getCoreRowModel, flexRender } from '@tanstack/react-table';
13
13
  import { useVirtualizer } from '@tanstack/react-virtual';
14
14
  import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
15
+ import { ThinkingOrb } from 'thinking-orbs';
15
16
  import { parseDate } from '@internationalized/date';
16
17
 
17
18
  function Popover(props) {
@@ -1249,7 +1250,8 @@ var CHANNEL_ICONS = {
1249
1250
  "google-meet": Video,
1250
1251
  "teams-meeting": Video,
1251
1252
  "webex-meeting": Video,
1252
- adhoc: AudioLines
1253
+ adhoc: AudioLines,
1254
+ phone: Phone
1253
1255
  };
1254
1256
  function channelIcon(channel) {
1255
1257
  return CHANNEL_ICONS[channel] ?? MessagesSquare;
@@ -1264,7 +1266,14 @@ function Checkbox({ children, className, ...props }) {
1264
1266
  {
1265
1267
  ...props,
1266
1268
  className: (renderProps) => cn(
1267
- "group inline-flex items-center gap-2.5 cursor-pointer",
1269
+ // `relative` so RAC's visually-hidden <input> — which is absolutely
1270
+ // positioned and is the element that actually receives focus — is
1271
+ // laid out against THIS checkbox. Without a positioned ancestor here
1272
+ // it resolves against a far-away container, ends up outside any
1273
+ // scroll clipping, and focusing it makes the browser scroll a
1274
+ // container the user cannot scroll back (the roles permission
1275
+ // matrix, where toggling a row threw the page off-screen).
1276
+ "group relative inline-flex items-center gap-2.5 cursor-pointer",
1268
1277
  "font-sans text-[14px] text-ink-2 select-none",
1269
1278
  "data-[disabled]:opacity-45 data-[disabled]:cursor-not-allowed",
1270
1279
  typeof className === "function" ? className(renderProps) : className
@@ -2613,6 +2622,7 @@ function useInfiniteScrollSentinel({
2613
2622
  return ref;
2614
2623
  }
2615
2624
  var DEFAULT_ROW_HEIGHT = 32;
2625
+ var SELECTION_COLUMN_ID = "__select__";
2616
2626
  function DataTable({
2617
2627
  query,
2618
2628
  columns,
@@ -2637,6 +2647,9 @@ function DataTable({
2637
2647
  extraRows,
2638
2648
  bodyBefore,
2639
2649
  bodyAfter,
2650
+ selectionMode = "none",
2651
+ selectedIds,
2652
+ onSelectionChange,
2640
2653
  columnBorders = false
2641
2654
  }) {
2642
2655
  const rows = useMemo(() => {
@@ -2647,19 +2660,112 @@ function DataTable({
2647
2660
  if (startExtras.length === 0 && endExtras.length === 0) return dataRows;
2648
2661
  return [...startExtras, ...dataRows, ...endExtras];
2649
2662
  }, [query.data, extraRows]);
2663
+ const resolveRowId = useMemo(
2664
+ () => getRowId ?? ((row, index) => {
2665
+ const r = row;
2666
+ if (typeof r.id === "string" || typeof r.id === "number") return String(r.id);
2667
+ if (typeof r.slug === "string") return r.slug;
2668
+ return String(index);
2669
+ }),
2670
+ [getRowId]
2671
+ );
2672
+ const selectionEnabled = selectionMode === "multiple";
2673
+ const selected = useMemo(() => selectedIds ?? /* @__PURE__ */ new Set(), [selectedIds]);
2674
+ const loadedIds = useMemo(
2675
+ () => selectionEnabled ? rows.map((row, index) => resolveRowId(row, index)) : [],
2676
+ [selectionEnabled, rows, resolveRowId]
2677
+ );
2678
+ const lastToggledIndexRef = useRef(null);
2679
+ const toggleRow = (id, index, isRange) => {
2680
+ if (!onSelectionChange) return;
2681
+ const next = new Set(selected);
2682
+ const anchor = lastToggledIndexRef.current;
2683
+ if (isRange && anchor !== null) {
2684
+ const [from, to] = anchor <= index ? [anchor, index] : [index, anchor];
2685
+ for (let i = from; i <= to; i += 1) {
2686
+ const rangeId = loadedIds[i];
2687
+ if (rangeId !== void 0) next.add(rangeId);
2688
+ }
2689
+ } else if (next.has(id)) {
2690
+ next.delete(id);
2691
+ } else {
2692
+ next.add(id);
2693
+ }
2694
+ lastToggledIndexRef.current = index;
2695
+ onSelectionChange(next);
2696
+ };
2697
+ const loadedSelectedCount = loadedIds.reduce((count, id) => count + (selected.has(id) ? 1 : 0), 0);
2698
+ const allLoadedSelected = loadedIds.length > 0 && loadedSelectedCount === loadedIds.length;
2699
+ const toggleAllLoaded = () => {
2700
+ if (!onSelectionChange) return;
2701
+ const next = new Set(selected);
2702
+ if (allLoadedSelected) {
2703
+ for (const id of loadedIds) next.delete(id);
2704
+ } else {
2705
+ for (const id of loadedIds) next.add(id);
2706
+ }
2707
+ lastToggledIndexRef.current = null;
2708
+ onSelectionChange(next);
2709
+ };
2710
+ const rangeModifierRef = useRef(false);
2711
+ const selectionColumn = useMemo(
2712
+ () => ({
2713
+ id: SELECTION_COLUMN_ID,
2714
+ size: 36,
2715
+ enableSorting: false,
2716
+ meta: { align: "center", sticky: "left", cellClassName: "px-0 justify-center" },
2717
+ header: () => /* @__PURE__ */ jsx("span", { className: "inline-flex items-center justify-center w-full", children: /* @__PURE__ */ jsx(
2718
+ Checkbox,
2719
+ {
2720
+ "aria-label": allLoadedSelected ? "Deselect all rows" : "Select all rows",
2721
+ isSelected: allLoadedSelected,
2722
+ isIndeterminate: loadedSelectedCount > 0 && !allLoadedSelected,
2723
+ isDisabled: loadedIds.length === 0,
2724
+ onChange: toggleAllLoaded
2725
+ }
2726
+ ) }),
2727
+ cell: ({ row }) => (
2728
+ // Stop the click here: selecting a row must never also open it.
2729
+ /* @__PURE__ */ jsx(
2730
+ "span",
2731
+ {
2732
+ className: "inline-flex items-center justify-center w-full",
2733
+ onClick: (event) => event.stopPropagation(),
2734
+ onKeyDown: (event) => {
2735
+ event.stopPropagation();
2736
+ rangeModifierRef.current = event.shiftKey;
2737
+ },
2738
+ onPointerDownCapture: (event) => {
2739
+ rangeModifierRef.current = event.shiftKey;
2740
+ },
2741
+ role: "presentation",
2742
+ children: /* @__PURE__ */ jsx(
2743
+ Checkbox,
2744
+ {
2745
+ "aria-label": `Select row ${row.index + 1}`,
2746
+ isSelected: selected.has(row.id),
2747
+ onChange: () => toggleRow(row.id, row.index, rangeModifierRef.current)
2748
+ }
2749
+ )
2750
+ }
2751
+ )
2752
+ )
2753
+ }),
2754
+ // biome-ignore lint/correctness/useExhaustiveDependencies: handlers read the latest selection via closure recreated on these inputs
2755
+ [selected, loadedIds, allLoadedSelected, loadedSelectedCount]
2756
+ );
2757
+ const tableColumns = useMemo(
2758
+ () => selectionEnabled ? [selectionColumn, ...columns] : columns,
2759
+ [selectionEnabled, selectionColumn, columns]
2760
+ );
2650
2761
  const table = useReactTable({
2651
2762
  data: rows,
2652
- columns,
2763
+ columns: tableColumns,
2653
2764
  state: { sorting: sorting ?? [] },
2654
2765
  ...onSortingChange ? { onSortingChange } : {},
2655
2766
  manualSorting: true,
2656
2767
  getCoreRowModel: getCoreRowModel(),
2657
- getRowId: getRowId ? (row, index) => getRowId(row, index) : (row, index) => {
2658
- const r = row;
2659
- if (typeof r.id === "string" || typeof r.id === "number") return String(r.id);
2660
- if (typeof r.slug === "string") return r.slug;
2661
- return String(index);
2662
- }
2768
+ getRowId: (row, index) => resolveRowId(row, index)
2663
2769
  });
2664
2770
  const tableRows = table.getRowModel().rows;
2665
2771
  const tableRowCount = tableRows.length;
@@ -2691,8 +2797,8 @@ function DataTable({
2691
2797
  enabled: !!query.hasNextPage
2692
2798
  });
2693
2799
  const totalColumnWidth = useMemo(
2694
- () => columns.reduce((sum, c) => sum + (c.size ?? 140), 0),
2695
- [columns]
2800
+ () => tableColumns.reduce((sum, c) => sum + (c.size ?? 140), 0),
2801
+ [tableColumns]
2696
2802
  );
2697
2803
  const columnsRef = useRef(columns);
2698
2804
  columnsRef.current = columns;
@@ -5188,6 +5294,24 @@ function NavGroup({ icon, label, children, className, ...props }) {
5188
5294
  ) })
5189
5295
  ] });
5190
5296
  }
5297
+ var SIZE_PX = { xs: 12, sm: 20, md: 40, lg: 64 };
5298
+ var DESIGN = { xs: 20, sm: 20, md: 64, lg: 64 };
5299
+ function Orb({ size = "sm", state = "solving", speed, theme, className, label }) {
5300
+ const px = SIZE_PX[size];
5301
+ const design = DESIGN[size];
5302
+ return /* @__PURE__ */ jsx(
5303
+ ThinkingOrb,
5304
+ {
5305
+ state,
5306
+ size: design,
5307
+ ...speed !== void 0 ? { speed } : {},
5308
+ ...theme !== void 0 ? { theme } : {},
5309
+ className: cn("inline-block shrink-0", className),
5310
+ ...px !== design ? { style: { width: px, height: px } } : {},
5311
+ ...label ? { "aria-label": label } : { "aria-hidden": true }
5312
+ }
5313
+ );
5314
+ }
5191
5315
  var progressBarStyles = tv({
5192
5316
  slots: {
5193
5317
  track: "relative overflow-hidden rounded-pill bg-surface-2 w-full",
@@ -5322,6 +5446,12 @@ function FieldTypeTag({ children }) {
5322
5446
  return /* @__PURE__ */ jsx("span", { className: "font-mono text-[10px] uppercase tracking-[0.08em] text-ink-4", children });
5323
5447
  }
5324
5448
 
5449
+ // src/components/record-filter/field-label.ts
5450
+ var FIELD_LABEL_SEPARATOR = " \xB7 ";
5451
+ function joinFieldLabel(...parts) {
5452
+ return parts.filter((part) => !!part && part.length > 0).join(FIELD_LABEL_SEPARATOR);
5453
+ }
5454
+
5325
5455
  // src/components/record-filter/operators.ts
5326
5456
  var OPERATORS = [
5327
5457
  {
@@ -5453,7 +5583,7 @@ function ChipItem({
5453
5583
  if (custom !== void 0) return /* @__PURE__ */ jsx(Fragment, { children: custom });
5454
5584
  }
5455
5585
  if (field.type === "enum") {
5456
- const option = field.options?.find((o) => o.value === value);
5586
+ const option = findEnumOption(field, value);
5457
5587
  return /* @__PURE__ */ jsx(
5458
5588
  Badge,
5459
5589
  {
@@ -5469,6 +5599,9 @@ function ChipItem({
5469
5599
  function Em({ children }) {
5470
5600
  return /* @__PURE__ */ jsx("span", { className: "font-mono text-[12px] text-ink-4", children });
5471
5601
  }
5602
+ function findEnumOption(field, value) {
5603
+ return field.options?.find((option) => option.value === value);
5604
+ }
5472
5605
  function formatValue(field, operator, value) {
5473
5606
  const arity = arityOf(operator);
5474
5607
  if (arity === 0) return "";
@@ -5476,13 +5609,16 @@ function formatValue(field, operator, value) {
5476
5609
  const arr = Array.isArray(value) ? value : typeof value === "string" && value.length > 0 ? value.split(",") : [];
5477
5610
  if (arr.length === 0) return "\u2014";
5478
5611
  if (field.type === "enum") {
5479
- const labels = arr.map((v) => field.options?.find((x) => x.value === v)?.label ?? v);
5612
+ const labels = arr.map((v) => findEnumOption(field, v)?.label ?? v);
5480
5613
  return labels.length <= 2 ? labels.join(", ") : `${labels[0]}, ${labels[1]} +${labels.length - 2}`;
5481
5614
  }
5482
5615
  return arr.length <= 2 ? arr.join(", ") : `${arr[0]}, ${arr[1]} +${arr.length - 2}`;
5483
5616
  }
5484
5617
  if (field.type === "boolean") return value === true || value === "true" ? "true" : "false";
5485
5618
  if (value === "" || value == null) return "\u2014";
5619
+ if (field.type === "enum") {
5620
+ return findEnumOption(field, String(value))?.label ?? String(value);
5621
+ }
5486
5622
  if (field.type === "number" || field.type === "integer") {
5487
5623
  const n = Number(value);
5488
5624
  return Number.isFinite(n) ? n.toLocaleString() : String(value);
@@ -7090,7 +7226,7 @@ function Chip2({
7090
7226
  /* @__PURE__ */ jsxs("span", { className: "font-sans text-[12.5px] text-ink-2", children: [
7091
7227
  field.parentLabel ? /* @__PURE__ */ jsxs("span", { className: "text-ink-4", children: [
7092
7228
  field.parentLabel,
7093
- " / "
7229
+ FIELD_LABEL_SEPARATOR
7094
7230
  ] }) : null,
7095
7231
  /* @__PURE__ */ jsx("span", { className: "text-ink", children: field.shortLabel })
7096
7232
  ] }),
@@ -7601,6 +7737,6 @@ function Tooltip({ className, offset = 6, ...props }) {
7601
7737
  );
7602
7738
  }
7603
7739
 
7604
- export { ATTRIBUTE_TYPES, ATTRIBUTE_TYPE_ICONS, AttachmentChip, AttributePicker, AttributeType, AttributeTypeIcon, Avatar, AvatarGroup, Badge, BadgeMultiSelect, BooleanCell, Breadcrumbs, COLUMN_DRAG_KIND, Card, CardBody, CardContent, CardEyebrow, CardFeatureTitle, CardFooter, CardHeader, CardTitle, ChannelIcon, Checkbox, CheckboxGroup, ChipValue, ColorInput, Combobox, Command, CommandHint, CurrencyInput, DRAFT_OUTCOME_LABEL, DataTable, DataTableEmpty, DataTableError, DataTableSkeleton, DateCell, DatePicker, DateTimeCell, DateTimePicker, DraftMessageCard, DraftMessageComposer, DraftMessageReview, EmptyState, ErrorAnimation, FieldCaret, FileField, FileViewer, FileViewerFallbackCard, FilterRow, FilterValueInput, IconPicker, ImageAttachment, ImageLightbox, Input, Kbd, LinkCell, MAX_COMPOSER_ATTACHMENT_BYTES, Menu, MenuItem, MenuPopover, MenuTrigger, MessageComposer, Modal, ModalBody, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalTitle, MultiSelect, NavGroup, NavItem, NavSection, OPERATORS, OperatorPicker, PROTECTED_COMBOS, Popover, PopoverContent, PopoverPanelBody, PopoverPanelFooter, PopoverPanelHeader, PressableCard, ProgressBar, Radio, RadioGroup, RecipientSelect, RecordFilterBuilderPanel, RecordFilterButton, RecordFilterChips, RecordFilterEditor, RenderChipItemProvider, RenderValueInputProvider, SegmentedControl, Select, Separator, SubmenuTrigger, SuccessAnimation, Switch, Table, TableBody, TableCell, TableHeader, TableHeaderCell, TableHeaderSpacer, TableRow, TableScroller, Tabs, TagInput, Textarea, TimeField, ToastRegion, Tooltip, TooltipTrigger, TruncateCell, __resetDraftMessageActions, __resetDraftMessageOutcomes, addLeaf as addFilterLeaf, addPendingLeaf, addSubgroup, arityOf, attachmentChipStyles, avatarGroupStyles, avatarStyles, badgeStyles, cardStyles2 as cardStyles, channelIcon, countLeaves, createDraftMessageClient, createToastQueue, defaultValueFor, draftMessageCardStyles, draftMessageComposerStyles, draftOutcomeFor, emptyStateStyles, fieldControlStyles, fieldErrorStyles, fieldHintStyles, fieldLabelStyles, fileViewerFallbackCardStyles, fileViewerStyles, formatFileSize, formatValue, iconForContentType, imageAttachmentStyles, imageLightboxStyles, isColumnDragData, isDraftReviewOutcome, isEditableTarget, isPreviewableImageName, makeActionsColumn, messageComposerStyles, navItemStyles, normalizeHexColor, operatorById, operatorsForType, parseCombo, progressBarStyles, publishDraftMessageOutcome, rebaseRowOnFieldChange, rebaseRowOnOperatorChange, registerDraftMessageActions, removeLeaf, removeSubgroup, replaceLeaf, resolveLucideIcon, resolveLucideIconName, segmentedControlStyles, setJoiner, subscribeDraftMessageOutcome, tableCellStyles, tableHeaderCellStyles, tabsStyles, terminalKindFor, toastStyles, updateLeaf, updateSubgroup, useAttributeTypeIcon, useCommand, useDiscoveryActive, useDraftMessageActions, useDraftMessageOutcome, useEscapeKey, useInfiniteScrollSentinel, useRenderChipItem, useRenderValueInput, useShowDetails, viewerKindForContentType, wrapLeafInGroup };
7740
+ export { ATTRIBUTE_TYPES, ATTRIBUTE_TYPE_ICONS, AttachmentChip, AttributePicker, AttributeType, AttributeTypeIcon, Avatar, AvatarGroup, Badge, BadgeMultiSelect, BooleanCell, Breadcrumbs, COLUMN_DRAG_KIND, Card, CardBody, CardContent, CardEyebrow, CardFeatureTitle, CardFooter, CardHeader, CardTitle, ChannelIcon, Checkbox, CheckboxGroup, ChipValue, ColorInput, Combobox, Command, CommandHint, CurrencyInput, DRAFT_OUTCOME_LABEL, DataTable, DataTableEmpty, DataTableError, DataTableSkeleton, DateCell, DatePicker, DateTimeCell, DateTimePicker, DraftMessageCard, DraftMessageComposer, DraftMessageReview, EmptyState, ErrorAnimation, FIELD_LABEL_SEPARATOR, FieldCaret, FileField, FileViewer, FileViewerFallbackCard, FilterRow, FilterValueInput, IconPicker, ImageAttachment, ImageLightbox, Input, Kbd, LinkCell, MAX_COMPOSER_ATTACHMENT_BYTES, Menu, MenuItem, MenuPopover, MenuTrigger, MessageComposer, Modal, ModalBody, ModalContent, ModalDescription, ModalFooter, ModalHeader, ModalTitle, MultiSelect, NavGroup, NavItem, NavSection, OPERATORS, OperatorPicker, Orb, PROTECTED_COMBOS, Popover, PopoverContent, PopoverPanelBody, PopoverPanelFooter, PopoverPanelHeader, PressableCard, ProgressBar, Radio, RadioGroup, RecipientSelect, RecordFilterBuilderPanel, RecordFilterButton, RecordFilterChips, RecordFilterEditor, RenderChipItemProvider, RenderValueInputProvider, SELECTION_COLUMN_ID, SegmentedControl, Select, Separator, SubmenuTrigger, SuccessAnimation, Switch, Table, TableBody, TableCell, TableHeader, TableHeaderCell, TableHeaderSpacer, TableRow, TableScroller, Tabs, TagInput, Textarea, TimeField, ToastRegion, Tooltip, TooltipTrigger, TruncateCell, __resetDraftMessageActions, __resetDraftMessageOutcomes, addLeaf as addFilterLeaf, addPendingLeaf, addSubgroup, arityOf, attachmentChipStyles, avatarGroupStyles, avatarStyles, badgeStyles, cardStyles2 as cardStyles, channelIcon, countLeaves, createDraftMessageClient, createToastQueue, defaultValueFor, draftMessageCardStyles, draftMessageComposerStyles, draftOutcomeFor, emptyStateStyles, fieldControlStyles, fieldErrorStyles, fieldHintStyles, fieldLabelStyles, fileViewerFallbackCardStyles, fileViewerStyles, formatFileSize, formatValue, iconForContentType, imageAttachmentStyles, imageLightboxStyles, isColumnDragData, isDraftReviewOutcome, isEditableTarget, isPreviewableImageName, joinFieldLabel, makeActionsColumn, messageComposerStyles, navItemStyles, normalizeHexColor, operatorById, operatorsForType, parseCombo, progressBarStyles, publishDraftMessageOutcome, rebaseRowOnFieldChange, rebaseRowOnOperatorChange, registerDraftMessageActions, removeLeaf, removeSubgroup, replaceLeaf, resolveLucideIcon, resolveLucideIconName, segmentedControlStyles, setJoiner, subscribeDraftMessageOutcome, tableCellStyles, tableHeaderCellStyles, tabsStyles, terminalKindFor, toastStyles, updateLeaf, updateSubgroup, useAttributeTypeIcon, useCommand, useDiscoveryActive, useDraftMessageActions, useDraftMessageOutcome, useEscapeKey, useInfiniteScrollSentinel, useRenderChipItem, useRenderValueInput, useShowDetails, viewerKindForContentType, wrapLeafInGroup };
7605
7741
  //# sourceMappingURL=index.js.map
7606
7742
  //# sourceMappingURL=index.js.map