@vantageos/mosaic-blocks 0.5.28-alpha → 0.5.30-alpha
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/README.md +3 -3
- package/dist/index.cjs +1145 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1169 -7
- package/dist/index.d.ts +1169 -7
- package/dist/index.js +1108 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
- package/registry.json +1400 -308
package/dist/index.d.ts
CHANGED
|
@@ -21,7 +21,7 @@ import * as class_variance_authority_types from 'class-variance-authority/types'
|
|
|
21
21
|
import { AlertDialog } from '@base-ui/react/alert-dialog';
|
|
22
22
|
export { Tooltip } from '@base-ui/react/tooltip';
|
|
23
23
|
|
|
24
|
-
declare const version = "0.5.
|
|
24
|
+
declare const version = "0.5.30-alpha";
|
|
25
25
|
|
|
26
26
|
/**
|
|
27
27
|
* Placeholder component — infra scaffold only.
|
|
@@ -4121,9 +4121,21 @@ interface MosaicMessageCardProps {
|
|
|
4121
4121
|
* library carries no English/French word of its own for this UI state.
|
|
4122
4122
|
*/
|
|
4123
4123
|
aiSenderLabel?: string;
|
|
4124
|
+
/** Label for the "view thread" button, shown when the message has a parent. Required, no default. */
|
|
4125
|
+
viewThreadLabel: string;
|
|
4126
|
+
/**
|
|
4127
|
+
* aria-label for the like button, shown for AI-sender messages. Required —
|
|
4128
|
+
* the host formats/pluralizes the count, the library owns no word.
|
|
4129
|
+
*/
|
|
4130
|
+
likeAriaLabel: (count: number) => string;
|
|
4131
|
+
/**
|
|
4132
|
+
* aria-label for the dislike button, shown for AI-sender messages. Required —
|
|
4133
|
+
* the host formats/pluralizes the count, the library owns no word.
|
|
4134
|
+
*/
|
|
4135
|
+
dislikeAriaLabel: (count: number) => string;
|
|
4124
4136
|
className?: string;
|
|
4125
4137
|
}
|
|
4126
|
-
declare function MosaicMessageCard({ message, onReply, onReaction, onBookmark, onCopy, showThread, compact, replyLabel, moreOptionsAriaLabel, removeBookmarkAriaLabel, bookmarkAriaLabel, removeBookmarkLabel, bookmarkLabel, copyMessageLabel, aiSenderLabel, className, }: MosaicMessageCardProps): React.JSX.Element;
|
|
4138
|
+
declare function MosaicMessageCard({ message, onReply, onReaction, onBookmark, onCopy, showThread, compact, replyLabel, moreOptionsAriaLabel, removeBookmarkAriaLabel, bookmarkAriaLabel, removeBookmarkLabel, bookmarkLabel, copyMessageLabel, aiSenderLabel, viewThreadLabel, likeAriaLabel, dislikeAriaLabel, className, }: MosaicMessageCardProps): React.JSX.Element;
|
|
4127
4139
|
declare namespace MosaicMessageCard {
|
|
4128
4140
|
var displayName: string;
|
|
4129
4141
|
}
|
|
@@ -4169,10 +4181,13 @@ interface MosaicMessageListProps {
|
|
|
4169
4181
|
removeBookmarkLabel: string;
|
|
4170
4182
|
bookmarkLabel: string;
|
|
4171
4183
|
copyMessageLabel: string;
|
|
4184
|
+
viewThreadLabel: string;
|
|
4185
|
+
likeAriaLabel: (count: number) => string;
|
|
4186
|
+
dislikeAriaLabel: (count: number) => string;
|
|
4172
4187
|
className?: string;
|
|
4173
4188
|
}
|
|
4174
|
-
declare function MessageListDesktop({ messages, onReply, onReaction, onBookmark, onCopy, onLoadMore, hasMore, title, isLoading, searchPlaceholder, emptyMessage, loadMoreLabel, replyLabel, moreOptionsAriaLabel, removeBookmarkAriaLabel, bookmarkAriaLabel, removeBookmarkLabel, bookmarkLabel, copyMessageLabel, className, }: MosaicMessageListProps): React.JSX.Element;
|
|
4175
|
-
declare function MessageListMobile({ messages, onReply, onReaction, onBookmark, onCopy, onLoadMore, hasMore, title, isLoading, emptyMessage, loadMoreLabel, replyLabel, moreOptionsAriaLabel, removeBookmarkAriaLabel, bookmarkAriaLabel, removeBookmarkLabel, bookmarkLabel, copyMessageLabel, className, }: MosaicMessageListProps): React.JSX.Element;
|
|
4189
|
+
declare function MessageListDesktop({ messages, onReply, onReaction, onBookmark, onCopy, onLoadMore, hasMore, title, isLoading, searchPlaceholder, emptyMessage, loadMoreLabel, replyLabel, moreOptionsAriaLabel, removeBookmarkAriaLabel, bookmarkAriaLabel, removeBookmarkLabel, bookmarkLabel, copyMessageLabel, viewThreadLabel, likeAriaLabel, dislikeAriaLabel, className, }: MosaicMessageListProps): React.JSX.Element;
|
|
4190
|
+
declare function MessageListMobile({ messages, onReply, onReaction, onBookmark, onCopy, onLoadMore, hasMore, title, isLoading, emptyMessage, loadMoreLabel, replyLabel, moreOptionsAriaLabel, removeBookmarkAriaLabel, bookmarkAriaLabel, removeBookmarkLabel, bookmarkLabel, copyMessageLabel, viewThreadLabel, likeAriaLabel, dislikeAriaLabel, className, }: MosaicMessageListProps): React.JSX.Element;
|
|
4176
4191
|
declare function MosaicMessageList(props: MosaicMessageListProps): React.JSX.Element;
|
|
4177
4192
|
declare namespace MosaicMessageList {
|
|
4178
4193
|
var displayName: string;
|
|
@@ -4833,13 +4848,14 @@ interface MosaicCreateOrgDialogProps {
|
|
|
4833
4848
|
orgNameFieldLabel: string;
|
|
4834
4849
|
orgNamePlaceholder: string;
|
|
4835
4850
|
slugFieldLabel: string;
|
|
4851
|
+
slugPlaceholder: string;
|
|
4836
4852
|
descriptionFieldLabel: string;
|
|
4837
4853
|
descriptionPlaceholder: string;
|
|
4838
4854
|
cancelLabel: string;
|
|
4839
4855
|
creatingLabel: string;
|
|
4840
4856
|
createLabel: string;
|
|
4841
4857
|
}
|
|
4842
|
-
declare function MosaicCreateOrgDialog({ open, onOpenChange, onCreateOrg, isLoading, title, closeAriaLabel, orgNameFieldLabel, orgNamePlaceholder, slugFieldLabel, descriptionFieldLabel, descriptionPlaceholder, cancelLabel, creatingLabel, createLabel, }: MosaicCreateOrgDialogProps): React.JSX.Element;
|
|
4858
|
+
declare function MosaicCreateOrgDialog({ open, onOpenChange, onCreateOrg, isLoading, title, closeAriaLabel, orgNameFieldLabel, orgNamePlaceholder, slugFieldLabel, slugPlaceholder, descriptionFieldLabel, descriptionPlaceholder, cancelLabel, creatingLabel, createLabel, }: MosaicCreateOrgDialogProps): React.JSX.Element;
|
|
4843
4859
|
declare namespace MosaicCreateOrgDialog {
|
|
4844
4860
|
var displayName: string;
|
|
4845
4861
|
}
|
|
@@ -4943,9 +4959,15 @@ interface MosaicDashboardContentProps {
|
|
|
4943
4959
|
views: MosaicDashboardView[];
|
|
4944
4960
|
/** Currently active view id */
|
|
4945
4961
|
currentView: string;
|
|
4962
|
+
/**
|
|
4963
|
+
* Label shown when `currentView` matches no entry in `views`. Rendered to
|
|
4964
|
+
* the end user — required host-owned string, no default. The component
|
|
4965
|
+
* appends `currentView` after it (a data value, not library-owned prose).
|
|
4966
|
+
*/
|
|
4967
|
+
viewNotFoundLabel: string;
|
|
4946
4968
|
className?: string;
|
|
4947
4969
|
}
|
|
4948
|
-
declare function MosaicDashboardContent({ views, currentView, className, }: MosaicDashboardContentProps): React.JSX.Element;
|
|
4970
|
+
declare function MosaicDashboardContent({ views, currentView, viewNotFoundLabel, className, }: MosaicDashboardContentProps): React.JSX.Element;
|
|
4949
4971
|
declare namespace MosaicDashboardContent {
|
|
4950
4972
|
var displayName: string;
|
|
4951
4973
|
}
|
|
@@ -8941,4 +8963,1144 @@ declare const memoryListItemVariants: (props?: ({
|
|
|
8941
8963
|
density?: "compact" | "comfortable" | null | undefined;
|
|
8942
8964
|
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
8943
8965
|
|
|
8944
|
-
export { type Breakpoint, type DeviceContextValue, type Feature3ColItem, type FeatureItem, type FooterColumn, type FooterLink, type HeroCta, type LogoItem, MosaicAccordion, MosaicAccordionItem, type MosaicAccordionItemProps, MosaicAccordionPanel, type MosaicAccordionPanelProps, type MosaicAccordionProps, MosaicAccordionTrigger, type MosaicAccordionTriggerProps, type MosaicActionAccent, type MosaicActivity, MosaicActivityFeed, type MosaicActivityFeedProps, MosaicActivityItem, type MosaicActivityItemProps, type MosaicActivityStatus, MosaicAdaptiveGrid, type MosaicAdaptiveGridProps, MosaicAdaptiveModal, type MosaicAdaptiveModalProps, MosaicAdaptiveNavigation, type MosaicAdaptiveNavigationProps, MosaicAddMemoryForm, type MosaicAddMemoryFormProps, MosaicAgentBuilderModal, type MosaicAgentBuilderModalProps, MosaicAgentCard, type MosaicAgentCardProps, MosaicAgentChat, type MosaicAgentChatApprovalLabels, type MosaicAgentChatApprovalRequest, type MosaicAgentChatApprovalResponsePayload, type MosaicAgentChatMessage, type MosaicAgentChatMessagePart, type MosaicAgentChatProps, type MosaicAgentChatState, type MosaicAgentChatToolPart, type MosaicAgentChatToolPartState, MosaicAgentComposer, MosaicAgentComposerDesktop, MosaicAgentComposerMobile, type MosaicAgentComposerMobileProps, type MosaicAgentComposerProps, type MosaicAgentData, MosaicAgentEditor, type MosaicAgentEditorProps, MosaicAgentList, AgentListDesktop as MosaicAgentListDesktop, AgentListMobile as MosaicAgentListMobile, type MosaicAgentListProps, type MosaicAgentPreset, MosaicAgentPreview, type MosaicAgentPreviewAttribute, type MosaicAgentPreviewDetailedProps, type MosaicAgentPreviewProps, type MosaicAgentPreviewSummaryProps, MosaicAgentTeamPreview, type MosaicAgentTeamPreviewProps, MosaicAlertDialog, MosaicAlertDialogAction, type MosaicAlertDialogActionProps, MosaicAlertDialogCancel, type MosaicAlertDialogCancelProps, MosaicAlertDialogContent, type MosaicAlertDialogContentProps, MosaicAlertDialogDescription, type MosaicAlertDialogDescriptionProps, MosaicAlertDialogFooter, MosaicAlertDialogHeader, MosaicAlertDialogOverlay, type MosaicAlertDialogOverlayProps, MosaicAlertDialogPortal, MosaicAlertDialogTitle, type MosaicAlertDialogTitleProps, MosaicAlertDialogTrigger, MosaicAnimatedList, type MosaicAnimatedListProps, MosaicApiKeyPanel, type MosaicApiKeyPanelProps, type MosaicApiKeyPanelProvider, type MosaicApiKeyPanelState, MosaicAppSidebar, type MosaicAppSidebarProps, MosaicApprovalPrompt, type MosaicApprovalPromptProps, type MosaicApprovalPromptState, MosaicAvatar, type MosaicAvatarProps, MosaicBadge, type MosaicBadgeProps, MosaicBlurredOrb, type MosaicBlurredOrbProps, type MosaicBreadcrumb, MosaicButton, type MosaicButtonProps, MosaicCard, MosaicCardContent, type MosaicCardContentProps, MosaicCardDescription, type MosaicCardDescriptionProps, MosaicCardFooter, type MosaicCardFooterProps, MosaicCardHeader, type MosaicCardHeaderProps, type MosaicCardProps, MosaicCardTitle, type MosaicCardTitleProps, MosaicChatComposer, type MosaicChatComposerProps, type MosaicChatComposerState, MosaicChatMessage, type MosaicChatMessageAttachmentPart, type MosaicChatMessagePart, type MosaicChatMessageProps, type MosaicChatMessageReasoningPart, type MosaicChatMessageSenderRole, type MosaicChatMessageTextPart, type MosaicChatMessageToolPart, type MosaicChatMessageToolState, type MosaicChatMessageToolStatusLabels, MosaicChatSidebar, type MosaicChatSidebarProps, MosaicChatThread, type MosaicChatThreadProps, MosaicCheckbox, type MosaicCheckboxProps, type MosaicClerkMembership, MosaicClerkOrgSwitcher, type MosaicClerkOrgSwitcherProps, type MosaicClerkOrganization, MosaicClerkWebhookHandler, type MosaicClerkWebhookHandlerOptions, MosaicCollapsible, MosaicCollapsiblePanel, type MosaicCollapsiblePanelProps, type MosaicCollapsibleProps, MosaicCollapsibleTrigger, type MosaicCollapsibleTriggerProps, MosaicCombobox, type MosaicComboboxItem, type MosaicComboboxProps, type MosaicComposerModel, type MosaicComposerModule, MosaicCounter, type MosaicCounterProps, MosaicCreateOrgDialog, type MosaicCreateOrgDialogProps, MosaicDashboardContent, type MosaicDashboardContentProps, MosaicDashboardHeader, type MosaicDashboardHeaderProps, MosaicDashboardLayout, type MosaicDashboardLayoutProps, type MosaicDashboardView, MosaicDataTable, type MosaicDataTableColumn, type MosaicDataTablePagination, type MosaicDataTableProps, MosaicDeleteConfirmationDialog, type MosaicDeleteConfirmationDialogProps, MosaicDeviceProvider, type MosaicDeviceProviderProps, MosaicDocumentUpload, type MosaicDocumentUploadFile, type MosaicDocumentUploadFileStatus, type MosaicDocumentUploadProps, MosaicDrawer, type MosaicDrawerProps, MosaicDropdownMenu, type MosaicDropdownMenuItem, type MosaicDropdownMenuProps, MosaicEditMemoryDialog, type MosaicEditMemoryDialogProps, MosaicEmptyState, type MosaicEmptyStateProps, MosaicFallingPattern, type MosaicFallingPatternProps, MosaicFeature3Col, type MosaicFeature3ColProps, MosaicFeatureCenteredMedia, type MosaicFeatureCenteredMediaProps, MosaicField, MosaicFieldControl, type MosaicFieldControlProps, MosaicFieldDescription, type MosaicFieldDescriptionProps, MosaicFieldError, type MosaicFieldErrorProps, MosaicFieldLabel, type MosaicFieldLabelProps, type MosaicFieldProps, MosaicFilterBar, type MosaicFilterBarProps, type MosaicFilterOption, MosaicFilterSidebar, type MosaicFilterSidebarProps, MosaicFooterSimple, type MosaicFooterSimpleProps, MosaicHeroSplit, type MosaicHeroSplitProps, MosaicInput, MosaicInputGroup, type MosaicInputGroupProps, type MosaicInputProps, MosaicIntegrationsBadge, type MosaicIntegrationsBadgeProps, MosaicInviteMemberDialog, type MosaicInviteMemberDialogProps, MosaicKanbanBoard, type MosaicKanbanBoardProps, MosaicKanbanColumn, type MosaicKanbanColumnProps, MosaicLogosGrid, type MosaicLogosGridProps, MosaicMainNav, type MosaicMainNavProps, MosaicMarkdown, type MosaicMarkdownProps, MosaicMarketplaceCard, type MosaicMarketplaceCardProps, type MosaicMarketplaceItem, MosaicMarketplaceList, MarketplaceListDesktop as MosaicMarketplaceListDesktop, MarketplaceListMobile as MosaicMarketplaceListMobile, type MosaicMarketplaceListProps, MosaicMemberList, type MosaicMemberListProps, MosaicMemoryCard, type MosaicMemoryCardProps, MosaicMemoryDashboard, type MosaicMemoryDashboardProps, type MosaicMemoryDashboardStat, type MosaicMemoryDashboardViewMode, type MosaicMemoryData, MosaicMemoryGrid, type MosaicMemoryGridProps, MosaicMemoryList, type MosaicMemoryListProps, type MosaicMemoryScope, type MosaicMemorySource, type MosaicMessage, MosaicMessageCard, type MosaicMessageCardProps, MosaicMessageList, MessageListDesktop as MosaicMessageListDesktop, MessageListMobile as MosaicMessageListMobile, type MosaicMessageListProps, type MosaicMessageReactions, type MosaicMessageSender, type MosaicMessageSenderType, type MosaicModelOption, MosaicModelSelector, type MosaicModelSelectorProps, MosaicModuleCard, type MosaicModuleCardProps, type MosaicModuleData, MosaicModuleForm, type MosaicModuleFormField, type MosaicModuleFormProps, type MosaicModuleItem, MosaicModuleLibrary, type MosaicModuleLibraryProps, type MosaicModuleType, MosaicMultiOrgIndicator, type MosaicMultiOrgIndicatorProps, MosaicMultiTenantProvider, type MosaicMultiTenantProviderProps, type MosaicNavItem, MosaicNavbar, type MosaicNavbarProps, type MosaicNavigationItem, type MosaicOrg, type MosaicOrgInfo, type MosaicOrgMember, MosaicOrgPanel, type MosaicOrgPanelProps, type MosaicOrgPanelTab, MosaicOrgProfilePage, type MosaicOrgProfilePageProps, type MosaicOrgRole, MosaicOrgRoleBadge, type MosaicOrgRoleBadgeProps, type MosaicOrgStats, MosaicOrgSwitcher, type MosaicOrgSwitcherProps, MosaicPdfViewer, type MosaicPdfViewerProps, MosaicPopover, type MosaicPopoverProps, type MosaicSelectItem as MosaicPrefSelectItem, type MosaicPreference, type MosaicPreferenceGroup, MosaicPreferencesPanel, type MosaicPreferencesPanelProps, MosaicPricingCard, type MosaicPricingCardProps, type MosaicProfileField, MosaicProfilePanel, type MosaicProfilePanelProps, MosaicProgress, type MosaicProgressProps, type MosaicQuickAction$1 as MosaicQuickAction, MosaicQuickActionCard, type MosaicQuickActionCardProps, MosaicQuickActionsMenu, type MosaicQuickAction as MosaicQuickActionsMenuItem, type MosaicQuickActionsMenuProps, type MosaicQuickAgent, MosaicQuickAgentSelector, type MosaicQuickAgentSelectorProps, MosaicQuickStartPanel, type MosaicQuickStartPanelProps, MosaicRadioGroup, MosaicRadioGroupItem, type MosaicRadioGroupItemProps, type MosaicRadioGroupProps, MosaicResizableSplitPane, type MosaicResizableSplitPaneProps, MosaicSaveTemplateModal, type MosaicSaveTemplateModalProps, type MosaicScenario, MosaicScrollArea, type MosaicScrollAreaProps, MosaicSelect, type MosaicSelectItem$1 as MosaicSelectItem, type MosaicSelectProps, type MosaicSelectorCategory, type MosaicSelectorItem, MosaicSelectorModal, type MosaicSelectorModalProps, MosaicSeparator, type MosaicSeparatorProps, type MosaicSidebarFooterStatus, type MosaicSidebarNavItem, type MosaicSidebarQuickAction, type MosaicSidebarRecentItem, MosaicSignInLayout, type MosaicSignInLayoutProps, MosaicSignUpLayout, type MosaicSignUpLayoutProps, MosaicSkeleton, type MosaicSkeletonProps, MosaicSlider, type MosaicSliderProps, type MosaicStatItem, MosaicStatsGrid, type MosaicStatsGridProps, type MosaicStep, MosaicStepPipeline, type MosaicStepPipelineDotsProps, type MosaicStepPipelineProps, type MosaicStepPipelineSegmentsProps, type MosaicStepStatus, MosaicSwitch, type MosaicSwitchProps, MosaicTabs, MosaicTabsList, type MosaicTabsListProps, MosaicTabsPanel, type MosaicTabsPanelProps, type MosaicTabsProps, MosaicTabsTrigger, type MosaicTabsTriggerProps, MosaicTagInput, type MosaicTagInputProps, type MosaicTemplate, type MosaicTemplateAgent, MosaicTemplateAgentCard, type MosaicTemplateAgentCardProps, type MosaicTemplateAgentData, MosaicTemplateCard, type MosaicTemplateCardProps, type MosaicTemplateCategory, MosaicTemplateCategoryChips, type MosaicTemplateCategoryChipsProps, MosaicTemplateGallery, type MosaicTemplateGalleryProps, MosaicTemplateList, type MosaicTemplateListProps, type MosaicTemplateManagementItem, MosaicTemplateManagementPanel, type MosaicTemplateManagementPanelProps, type MosaicTemplateMetadata, MosaicTemplatePreview, type MosaicTemplatePreviewProps, MosaicTestimonialsGrid, type MosaicTestimonialsGridProps, MosaicTextarea, type MosaicTextareaProps, MosaicThemeProvider, type MosaicThemeProviderProps, MosaicThemeToggle, type MosaicThemeToggleProps, MosaicToast, type MosaicToastProps, MosaicToastProvider, type MosaicToastProviderPosition, type MosaicToastProviderProps, type MosaicToastVariant, MosaicToolToggleList, type MosaicToolToggleListApprovalLevel, type MosaicToolToggleListProps, type MosaicToolToggleListSection, type MosaicToolToggleListTool, MosaicTooltip, MosaicTooltipContent, type MosaicTooltipContentProps, type MosaicTooltipProps, MosaicTooltipProvider, type MosaicTooltipProviderProps, MosaicTooltipRoot, type MosaicTooltipRootProps, MosaicTooltipTrigger, type MosaicTooltipTriggerProps, MosaicUrlScraper, type MosaicUrlScraperContent, type MosaicUrlScraperProps, type MosaicUrlScraperState, MosaicUserButton, type MosaicUserButtonProps, type MosaicWorkspaceContext, type NavCta, type NavLink, type OrbPosition, type Orientation, Placeholder, type PricingCta, type SocialLink, type StatItem, type TestimonialItem, type Theme, addMemoryFormButtonVariants, addMemoryFormErrorVariants, addMemoryFormFieldVariants, addMemoryFormFooterVariants, addMemoryFormRootVariants, agentBuilderModalBackdropVariants, agentBuilderModalPopupVariants, agentChatRootVariants, agentEditorVariants, agentPreviewVariants, alertDialogContentVariants, alertDialogOverlayVariants, badgeVariants, buttonVariants, chatMessageBubbleVariants, chatMessageContainerVariants, chatMessageToolStatusVariants, chatSidebarThreadVariants, drawerBackdropVariants, drawerPopupVariants, editMemoryDialogBackdropVariants, editMemoryDialogErrorVariants, editMemoryDialogFieldVariants, editMemoryDialogPopupVariants, marketplaceCardVariants, memoryDashboardViewToggleButtonVariants, memoryGridVariants, memoryListItemVariants, memoryListVariants, pdfViewerFrameVariants, pdfViewerStatusVariants, pdfViewerToolbarButtonVariants, popoverPopupVariants, saveTemplateModalBodyVariants, saveTemplateModalButtonVariants, saveTemplateModalErrorVariants, saveTemplateModalFieldVariants, saveTemplateModalFooterVariants, skeletonVariants, splitPaneCollapseButtonVariants, splitPaneHandleVariants, splitPaneRootVariants, tagInputFieldVariants, tagInputRemoveButtonVariants, tagInputRootVariants, tagInputTagVariants, templateAgentCardBadgeVariants, templateAgentCardTagVariants, templateAgentCardVariants, templateCategoryChipVariants, templateListVariants, templateManagementRowVariants, toastCardVariants, toastDismissButtonVariants, toastProviderPositionVariants, toastTitleVariants, toolToggleListRowVariants, toolToggleListSectionVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };
|
|
8966
|
+
/**
|
|
8967
|
+
* MosaicMemorySearch — search bar over a host-supplied knowledge base: a
|
|
8968
|
+
* query input, optional filter chips (by type/tag), a clear action, and a
|
|
8969
|
+
* result-count indication.
|
|
8970
|
+
*
|
|
8971
|
+
* Fully controlled, presentational atom: `query` + `onQueryChange` own the
|
|
8972
|
+
* text; the component never searches anything itself. It has no idea what
|
|
8973
|
+
* "type" or "tag" means — the entire filter catalogue (`filters`) is
|
|
8974
|
+
* host-supplied DATA, exactly like `MosaicTemplateCategoryChips`. A client
|
|
8975
|
+
* with a different taxonomy (legal, healthcare, e-commerce) supplies its own
|
|
8976
|
+
* filter list without touching this package.
|
|
8977
|
+
*
|
|
8978
|
+
* The result count is never assembled by this component: `resultCount` is a
|
|
8979
|
+
* number, and `formatResultCount` is a host-supplied function that turns it
|
|
8980
|
+
* into a localized, pluralized string (e.g. `(n) => n === 1 ? "1 result" :
|
|
8981
|
+
* \`${n} results\`` or the FR equivalent). Pluralisation is a language; this
|
|
8982
|
+
* library speaks none (SIN-01).
|
|
8983
|
+
*
|
|
8984
|
+
* The clear action only appears once `query` is non-empty — that switch is
|
|
8985
|
+
* genuinely presentation state, not a missing word, so `clearButtonLabel`
|
|
8986
|
+
* remains a required prop with no default (the host always supplies it, the
|
|
8987
|
+
* button simply isn't rendered until there is something to clear).
|
|
8988
|
+
*
|
|
8989
|
+
* `filters` / `selectedFilterIds` / `onFilterToggle` are optional as a GROUP:
|
|
8990
|
+
* a host that has no filter feature at all renders the search bar with none
|
|
8991
|
+
* of the three, and no filter chip row is rendered. That optionality encodes
|
|
8992
|
+
* the absence of the whole filter FEATURE, not a missing word — every label
|
|
8993
|
+
* that IS rendered (each `filter.label`) is still host-owned data, required
|
|
8994
|
+
* on the filter object itself.
|
|
8995
|
+
*
|
|
8996
|
+
* No "use client" — prepend-use-client.mjs adds it to dist.
|
|
8997
|
+
* Design tokens: --primary, --primary-foreground, --background, --foreground,
|
|
8998
|
+
* --border, --muted, --muted-foreground, --input, --ring.
|
|
8999
|
+
* a11y: the query input is `type="search"` with an explicit `aria-label`
|
|
9000
|
+
* (`searchLabel`, host-owned — no host is forced to also render a visible
|
|
9001
|
+
* `<label>`). Each filter chip is a real `<button>` with `aria-pressed` so
|
|
9002
|
+
* the selection state reaches screen-reader users without relying on color.
|
|
9003
|
+
* The clear button carries its own required `aria-label` for the same
|
|
9004
|
+
* reason.
|
|
9005
|
+
*
|
|
9006
|
+
* Deps: @base-ui/react (via MosaicInput) + class-variance-authority only.
|
|
9007
|
+
*
|
|
9008
|
+
* @example
|
|
9009
|
+
* <MosaicMemorySearch
|
|
9010
|
+
* query={query}
|
|
9011
|
+
* onQueryChange={setQuery}
|
|
9012
|
+
* searchLabel="Search knowledge base"
|
|
9013
|
+
* searchPlaceholder="Search…"
|
|
9014
|
+
* clearButtonLabel="Clear search"
|
|
9015
|
+
* resultCount={results.length}
|
|
9016
|
+
* formatResultCount={(n) => (n === 1 ? "1 result" : `${n} results`)}
|
|
9017
|
+
* filters={[
|
|
9018
|
+
* { id: "type-note", label: "Note" },
|
|
9019
|
+
* { id: "type-decision", label: "Decision" },
|
|
9020
|
+
* ]}
|
|
9021
|
+
* selectedFilterIds={selectedFilterIds}
|
|
9022
|
+
* onFilterToggle={toggleFilter}
|
|
9023
|
+
* />
|
|
9024
|
+
*/
|
|
9025
|
+
|
|
9026
|
+
/**
|
|
9027
|
+
* One selectable filter (type, tag, or any other host-defined facet). The
|
|
9028
|
+
* library knows nothing about any filter by name — the whole catalogue is
|
|
9029
|
+
* host-supplied DATA.
|
|
9030
|
+
*/
|
|
9031
|
+
interface MosaicMemorySearchFilter {
|
|
9032
|
+
/** Stable identifier, matched against `selectedFilterIds` and passed to `onFilterToggle`. */
|
|
9033
|
+
id: string;
|
|
9034
|
+
/** Host-supplied, host-localized display label. No built-in taxonomy. */
|
|
9035
|
+
label: string;
|
|
9036
|
+
}
|
|
9037
|
+
interface MosaicMemorySearchProps {
|
|
9038
|
+
/** Current query text. Controlled by the host. */
|
|
9039
|
+
query: string;
|
|
9040
|
+
/** Called with the new query text on every keystroke. */
|
|
9041
|
+
onQueryChange: (query: string) => void;
|
|
9042
|
+
/** aria-label for the query input. Required, no default. */
|
|
9043
|
+
searchLabel: string;
|
|
9044
|
+
/** Placeholder for the query input. Required, no default. */
|
|
9045
|
+
searchPlaceholder: string;
|
|
9046
|
+
/** aria-label for the clear button. Required, no default — rendered only once `query` is non-empty. */
|
|
9047
|
+
clearButtonLabel: string;
|
|
9048
|
+
/** Total number of results for the current query/filters. Pure data — never computed here. */
|
|
9049
|
+
resultCount: number;
|
|
9050
|
+
/**
|
|
9051
|
+
* Derives the displayed result-count string from `resultCount`. Required —
|
|
9052
|
+
* the host owns pluralisation and language, this component never
|
|
9053
|
+
* assembles a count string itself.
|
|
9054
|
+
*/
|
|
9055
|
+
formatResultCount: (count: number) => string;
|
|
9056
|
+
/**
|
|
9057
|
+
* Full open catalogue of filters — a PROP, never a library constant. Omit
|
|
9058
|
+
* entirely (with `selectedFilterIds` and `onFilterToggle`) when the host
|
|
9059
|
+
* has no filter feature; no filter chip row is then rendered.
|
|
9060
|
+
*/
|
|
9061
|
+
filters?: MosaicMemorySearchFilter[];
|
|
9062
|
+
/** Ids of the currently selected filters. Controlled by the host. */
|
|
9063
|
+
selectedFilterIds?: string[];
|
|
9064
|
+
/** Called with the filter id when a chip is activated. */
|
|
9065
|
+
onFilterToggle?: (id: string) => void;
|
|
9066
|
+
/** Additional Tailwind classes on the root element. */
|
|
9067
|
+
className?: string;
|
|
9068
|
+
/** React 19 ref prop — forwarded to the root element. */
|
|
9069
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
9070
|
+
}
|
|
9071
|
+
/**
|
|
9072
|
+
* MosaicMemorySearch — production search bar for @vantageos/mosaic-blocks.
|
|
9073
|
+
*
|
|
9074
|
+
* Purely presentational + controlled: renders the query input, an optional
|
|
9075
|
+
* host-supplied filter-chip row, a clear action, and a host-formatted
|
|
9076
|
+
* result-count string. No network call, no internal query state, no
|
|
9077
|
+
* hardcoded filter catalogue.
|
|
9078
|
+
*/
|
|
9079
|
+
declare function MosaicMemorySearch({ query, onQueryChange, searchLabel, searchPlaceholder, clearButtonLabel, resultCount, formatResultCount, filters, selectedFilterIds, onFilterToggle, className, ref, }: MosaicMemorySearchProps): React.JSX.Element;
|
|
9080
|
+
declare namespace MosaicMemorySearch {
|
|
9081
|
+
var displayName: string;
|
|
9082
|
+
}
|
|
9083
|
+
|
|
9084
|
+
/**
|
|
9085
|
+
* memorySearchFilterChipVariants — pure CVA variant function for the
|
|
9086
|
+
* optional filter chips rendered by MosaicMemorySearch.
|
|
9087
|
+
*
|
|
9088
|
+
* Isolated in its own module so it can be re-exported from the
|
|
9089
|
+
* `@vantageos/mosaic-blocks/server` subpath without pulling in React.
|
|
9090
|
+
*
|
|
9091
|
+
* Zero browser / React runtime dependencies — safe in RSC / Node.js.
|
|
9092
|
+
*/
|
|
9093
|
+
/** One filter chip button — selected vs. unselected tone. */
|
|
9094
|
+
declare const memorySearchFilterChipVariants: (props?: ({
|
|
9095
|
+
selected?: boolean | null | undefined;
|
|
9096
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9097
|
+
|
|
9098
|
+
/**
|
|
9099
|
+
* MosaicReplyInput — presentational, controlled reply input scoped to one thread
|
|
9100
|
+
*
|
|
9101
|
+
* Presentational atom. Gives follow-up to a single agent/thread without
|
|
9102
|
+
* mixing it into the general flow: it renders a host-supplied thread-context
|
|
9103
|
+
* node above a multi-line, auto-growing textarea, plus Send and Cancel
|
|
9104
|
+
* buttons. The component performs no network call and holds no message
|
|
9105
|
+
* state: the current text is fully host-controlled (`value` +
|
|
9106
|
+
* `onValueChange`), the thread it replies into is a host-supplied node
|
|
9107
|
+
* (`context`), and `onSubmit(text)` / `onCancel()` are pure prop callbacks.
|
|
9108
|
+
*
|
|
9109
|
+
* Local behaviour (no network involved): Enter (without Shift) submits the
|
|
9110
|
+
* trimmed value; Shift+Enter inserts a newline; the textarea auto-grows with
|
|
9111
|
+
* the content up to a max height, then scrolls.
|
|
9112
|
+
*
|
|
9113
|
+
* Pattern: MosaicChatComposer.tsx (data-slot, inline cn, React 19 ref prop,
|
|
9114
|
+
* displayName, JSDoc, pure variants module).
|
|
9115
|
+
* No "use client" — prepend-use-client.mjs adds it to dist.
|
|
9116
|
+
* Design tokens: --foreground, --background, --muted-foreground, --border,
|
|
9117
|
+
* --ring, --card.
|
|
9118
|
+
* No icon library dependency — plain glyphs ("↑" send / "×" cancel), matching
|
|
9119
|
+
* the chat-composer / url-scraper convention. Glyphs are `aria-hidden`; the
|
|
9120
|
+
* accessible name comes from the required `sendButtonAriaLabel` /
|
|
9121
|
+
* `cancelButtonAriaLabel` props.
|
|
9122
|
+
* a11y: the textarea has a required accessible name (`textareaAriaLabel`);
|
|
9123
|
+
* the thread-context region has a required accessible name
|
|
9124
|
+
* (`contextAriaLabel`) distinguishing it, for assistive technology, from the
|
|
9125
|
+
* general conversation flow.
|
|
9126
|
+
* Bilingual: every user-facing string (`textareaAriaLabel`, `placeholder`,
|
|
9127
|
+
* `contextAriaLabel`, `sendButtonAriaLabel`, `cancelButtonAriaLabel`) is a
|
|
9128
|
+
* required caller-supplied prop — zero hardcoded copy, zero default. The
|
|
9129
|
+
* thread context itself is a host-supplied `React.ReactNode` (`context`):
|
|
9130
|
+
* the library never invents the wording that identifies which thread a
|
|
9131
|
+
* reply targets.
|
|
9132
|
+
*
|
|
9133
|
+
* @example
|
|
9134
|
+
* <MosaicReplyInput
|
|
9135
|
+
* value={value}
|
|
9136
|
+
* onValueChange={setValue}
|
|
9137
|
+
* onSubmit={(text) => postReply(threadId, text)}
|
|
9138
|
+
* onCancel={() => closeReplyBox()}
|
|
9139
|
+
* context={<span>Replying to {agentName}</span>}
|
|
9140
|
+
* contextAriaLabel="Thread this reply targets"
|
|
9141
|
+
* textareaAriaLabel="Reply in this thread"
|
|
9142
|
+
* placeholder="Write your reply..."
|
|
9143
|
+
* sendButtonAriaLabel="Send reply"
|
|
9144
|
+
* cancelButtonAriaLabel="Cancel reply"
|
|
9145
|
+
* />
|
|
9146
|
+
*/
|
|
9147
|
+
|
|
9148
|
+
type MosaicReplyInputProps = {
|
|
9149
|
+
/** Host-controlled current textarea value. */
|
|
9150
|
+
value: string;
|
|
9151
|
+
/** Called with the raw textarea value on every keystroke. */
|
|
9152
|
+
onValueChange: (value: string) => void;
|
|
9153
|
+
/** Called with the trimmed value on Enter (no Shift) or send-button click. */
|
|
9154
|
+
onSubmit: (text: string) => void;
|
|
9155
|
+
/** Called when the cancel button is activated. */
|
|
9156
|
+
onCancel: () => void;
|
|
9157
|
+
/**
|
|
9158
|
+
* Host-supplied node identifying the thread this reply targets (e.g. the
|
|
9159
|
+
* agent/message it replies to). The library never invents this wording.
|
|
9160
|
+
*/
|
|
9161
|
+
context: React.ReactNode;
|
|
9162
|
+
/** Accessible name for the thread-context region. Required, no default. */
|
|
9163
|
+
contextAriaLabel: string;
|
|
9164
|
+
/** Accessible name for the textarea (`aria-label`). Required, no default. */
|
|
9165
|
+
textareaAriaLabel: string;
|
|
9166
|
+
/** Placeholder text for the textarea. Required, no default. */
|
|
9167
|
+
placeholder: string;
|
|
9168
|
+
/** Accessible name for the send button. Required, no default. */
|
|
9169
|
+
sendButtonAriaLabel: string;
|
|
9170
|
+
/** Accessible name for the cancel button. Required, no default. */
|
|
9171
|
+
cancelButtonAriaLabel: string;
|
|
9172
|
+
/** Disables every control (e.g. host-level connectivity loss). */
|
|
9173
|
+
disabled?: boolean;
|
|
9174
|
+
/** Additional Tailwind classes on the root element. */
|
|
9175
|
+
className?: string;
|
|
9176
|
+
/** React 19 ref prop — forwarded to the root element. */
|
|
9177
|
+
ref?: React.Ref<HTMLFormElement>;
|
|
9178
|
+
};
|
|
9179
|
+
/**
|
|
9180
|
+
* MosaicReplyInput — production reply-input atom for
|
|
9181
|
+
* @vantageos/mosaic-blocks.
|
|
9182
|
+
*
|
|
9183
|
+
* Purely presentational: renders a host-supplied thread-context node, a
|
|
9184
|
+
* controlled auto-growing textarea, and Send/Cancel buttons. No network
|
|
9185
|
+
* call, no message history, no built-in copy.
|
|
9186
|
+
*/
|
|
9187
|
+
declare function MosaicReplyInput(props: MosaicReplyInputProps): React.JSX.Element;
|
|
9188
|
+
declare namespace MosaicReplyInput {
|
|
9189
|
+
var displayName: string;
|
|
9190
|
+
}
|
|
9191
|
+
|
|
9192
|
+
/**
|
|
9193
|
+
* replyInputVariants — pure CVA variant functions for MosaicReplyInput.
|
|
9194
|
+
*
|
|
9195
|
+
* Isolated in their own module so they can be re-exported from the
|
|
9196
|
+
* `@vantageos/mosaic-blocks/server` subpath without pulling in React.
|
|
9197
|
+
*
|
|
9198
|
+
* Zero browser / React runtime dependencies — safe in RSC / Node.js.
|
|
9199
|
+
*/
|
|
9200
|
+
/** Root form container. */
|
|
9201
|
+
declare const replyInputRootVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9202
|
+
/** Host-supplied thread-context region, shown above the textarea. */
|
|
9203
|
+
declare const replyInputContextVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9204
|
+
/** Textarea input. */
|
|
9205
|
+
declare const replyInputTextareaVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9206
|
+
/** Send / cancel action button, by tone. */
|
|
9207
|
+
declare const replyInputActionButtonVariants: (props?: ({
|
|
9208
|
+
tone?: "send" | "cancel" | null | undefined;
|
|
9209
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9210
|
+
|
|
9211
|
+
/**
|
|
9212
|
+
* MosaicThreadView — one client request, several agents replying beneath it
|
|
9213
|
+
*
|
|
9214
|
+
* Presentational atom. Makes agent collaboration readable: renders a single
|
|
9215
|
+
* root message, then every host-supplied reply nested beneath it, in
|
|
9216
|
+
* document order, inside its own labelled region — distinguishing "the
|
|
9217
|
+
* question" from "the agents answering it" for assistive technology and
|
|
9218
|
+
* sighted users alike.
|
|
9219
|
+
*
|
|
9220
|
+
* The root message and every reply's author/content are host-supplied
|
|
9221
|
+
* `React.ReactNode`s (`root.author`, `root.content`, `replies[].author`,
|
|
9222
|
+
* `replies[].content`): the library never invents sender names, avatars, or
|
|
9223
|
+
* message copy. Zero I/O, zero fetch, zero server-side filtering — the
|
|
9224
|
+
* thread data is fully host-supplied and host-controlled.
|
|
9225
|
+
*
|
|
9226
|
+
* Pattern: MosaicReplyInput.tsx (data-slot, inline cn, React 19 ref prop,
|
|
9227
|
+
* displayName, JSDoc, pure variants module).
|
|
9228
|
+
* No "use client" — prepend-use-client.mjs adds it to dist.
|
|
9229
|
+
* Design tokens: --border, --card, --muted, --muted-foreground.
|
|
9230
|
+
* a11y: the root message and the replies list are each their own labelled
|
|
9231
|
+
* region (`rootAriaLabel`, `repliesAriaLabel`), required props with no
|
|
9232
|
+
* default, so assistive technology can navigate directly to either.
|
|
9233
|
+
* Bilingual: `rootAriaLabel`, `repliesAriaLabel` and `emptyRepliesLabel` are
|
|
9234
|
+
* required caller-supplied strings — zero hardcoded copy, zero default. An
|
|
9235
|
+
* empty `replies` array is a named, host-worded state (`emptyRepliesLabel`);
|
|
9236
|
+
* the library invents no "No replies yet" text of its own.
|
|
9237
|
+
*
|
|
9238
|
+
* @example
|
|
9239
|
+
* <MosaicThreadView
|
|
9240
|
+
* root={{ id: root.id, author: <SenderName sender={root.sender} />, content: <p>{root.text}</p> }}
|
|
9241
|
+
* replies={replies.map((r) => ({
|
|
9242
|
+
* id: r.id,
|
|
9243
|
+
* author: <SenderName sender={r.sender} />,
|
|
9244
|
+
* content: <p>{r.text}</p>,
|
|
9245
|
+
* }))}
|
|
9246
|
+
* rootAriaLabel="Original request"
|
|
9247
|
+
* repliesAriaLabel="Agent replies"
|
|
9248
|
+
* emptyRepliesLabel="No replies yet"
|
|
9249
|
+
* />
|
|
9250
|
+
*/
|
|
9251
|
+
|
|
9252
|
+
/** Host-supplied message entry — author and content are fully host-owned nodes. */
|
|
9253
|
+
type MosaicThreadViewMessage = {
|
|
9254
|
+
/** Stable identity for the message (used as list key for replies). */
|
|
9255
|
+
id: string;
|
|
9256
|
+
/** Host-supplied node rendering the sender (name, avatar, badge, ...). */
|
|
9257
|
+
author: React.ReactNode;
|
|
9258
|
+
/** Host-supplied node rendering the message body. */
|
|
9259
|
+
content: React.ReactNode;
|
|
9260
|
+
};
|
|
9261
|
+
type MosaicThreadViewProps = {
|
|
9262
|
+
/** The single client request every reply is nested beneath. */
|
|
9263
|
+
root: MosaicThreadViewMessage;
|
|
9264
|
+
/** Every agent reply, nested beneath the root, rendered in array order. */
|
|
9265
|
+
replies: MosaicThreadViewMessage[];
|
|
9266
|
+
/** Accessible name for the root-message region. Required, no default. */
|
|
9267
|
+
rootAriaLabel: string;
|
|
9268
|
+
/** Accessible name for the nested-replies region. Required, no default. */
|
|
9269
|
+
repliesAriaLabel: string;
|
|
9270
|
+
/**
|
|
9271
|
+
* Host-worded text shown when `replies` is empty. Required — this is a
|
|
9272
|
+
* named absence-of-state, and the library carries no fallback word of its
|
|
9273
|
+
* own for "no replies yet".
|
|
9274
|
+
*/
|
|
9275
|
+
emptyRepliesLabel: string;
|
|
9276
|
+
/** Additional Tailwind classes on the root element. */
|
|
9277
|
+
className?: string;
|
|
9278
|
+
/** React 19 ref prop — forwarded to the root element. */
|
|
9279
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
9280
|
+
};
|
|
9281
|
+
/**
|
|
9282
|
+
* MosaicThreadView — production thread-view atom for @vantageos/mosaic-blocks.
|
|
9283
|
+
*
|
|
9284
|
+
* Purely presentational: renders one root message and every host-supplied
|
|
9285
|
+
* reply nested beneath it inside a distinct labelled region. No network
|
|
9286
|
+
* call, no message state, no invented copy.
|
|
9287
|
+
*/
|
|
9288
|
+
declare function MosaicThreadView(props: MosaicThreadViewProps): React.JSX.Element;
|
|
9289
|
+
declare namespace MosaicThreadView {
|
|
9290
|
+
var displayName: string;
|
|
9291
|
+
}
|
|
9292
|
+
|
|
9293
|
+
/**
|
|
9294
|
+
* threadViewVariants — pure CVA variant functions for MosaicThreadView.
|
|
9295
|
+
*
|
|
9296
|
+
* Isolated in their own module so they can be re-exported from the
|
|
9297
|
+
* `@vantageos/mosaic-blocks/server` subpath without pulling in React.
|
|
9298
|
+
*
|
|
9299
|
+
* Zero browser / React runtime dependencies — safe in RSC / Node.js.
|
|
9300
|
+
*/
|
|
9301
|
+
/** Root container for the whole thread (root message + nested replies). */
|
|
9302
|
+
declare const threadViewRootVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9303
|
+
/** Root-message region. */
|
|
9304
|
+
declare const threadViewRootMessageVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9305
|
+
/** Nested-replies list region. */
|
|
9306
|
+
declare const threadViewRepliesVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9307
|
+
/** A single nested reply entry. */
|
|
9308
|
+
declare const threadViewReplyVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9309
|
+
/** Named empty-state paragraph, shown only when the host has zero replies to show. */
|
|
9310
|
+
declare const threadViewEmptyVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9311
|
+
|
|
9312
|
+
/**
|
|
9313
|
+
* MosaicThreadIndicator — signals a thread has UNREAD replies
|
|
9314
|
+
*
|
|
9315
|
+
* Presentational atom. Without it a thread with new agent replies is
|
|
9316
|
+
* invisible from the surrounding flow — this renders the trigger that makes
|
|
9317
|
+
* that state legible and clickable.
|
|
9318
|
+
*
|
|
9319
|
+
* The unread count is NEVER typed by the library: it is DERIVED, on every
|
|
9320
|
+
* render, from the host-supplied `replies` array (`replies.filter((r) =>
|
|
9321
|
+
* r.unread).length`). Mutating the array mutates what is shown — the
|
|
9322
|
+
* component holds no count state of its own. When the derived count is zero
|
|
9323
|
+
* (including an empty `replies` array), the count pill does not render at
|
|
9324
|
+
* all: that is a named absence-of-state, not a library-authored "0" or word.
|
|
9325
|
+
*
|
|
9326
|
+
* Pattern: MosaicReplyInput.tsx (data-slot, inline cn, React 19 ref prop,
|
|
9327
|
+
* displayName, JSDoc, pure variants module).
|
|
9328
|
+
* No "use client" — prepend-use-client.mjs adds it to dist.
|
|
9329
|
+
* Design tokens: --accent, --accent-foreground, --ring, --primary,
|
|
9330
|
+
* --primary-foreground.
|
|
9331
|
+
* a11y: the trigger is a native `<button>`; its accessible name is computed
|
|
9332
|
+
* by the host-supplied `ariaLabel(count)` from the same derived count shown
|
|
9333
|
+
* visually — assistive technology and sighted users read the same number.
|
|
9334
|
+
* Bilingual: `label` and `ariaLabel` are required caller-supplied props —
|
|
9335
|
+
* zero hardcoded copy, zero default. The library owns no word for "unread",
|
|
9336
|
+
* "replies", or the zero-state; the host's `ariaLabel` formatter carries all
|
|
9337
|
+
* of that wording.
|
|
9338
|
+
*
|
|
9339
|
+
* @example
|
|
9340
|
+
* <MosaicThreadIndicator
|
|
9341
|
+
* replies={thread.replies}
|
|
9342
|
+
* label="Thread"
|
|
9343
|
+
* ariaLabel={(count) => `Thread, ${count} unread replies`}
|
|
9344
|
+
* onActivate={() => openThread(thread.id)}
|
|
9345
|
+
* />
|
|
9346
|
+
*/
|
|
9347
|
+
|
|
9348
|
+
/** Minimal host-supplied reply-status shape the unread count is derived from. */
|
|
9349
|
+
type MosaicThreadIndicatorReplyStatus = {
|
|
9350
|
+
/** Stable identity for the reply. */
|
|
9351
|
+
id: string;
|
|
9352
|
+
/** Whether this specific reply is unread, per the host's own state. */
|
|
9353
|
+
unread: boolean;
|
|
9354
|
+
};
|
|
9355
|
+
type MosaicThreadIndicatorProps = {
|
|
9356
|
+
/**
|
|
9357
|
+
* Host-supplied replies for this thread. The rendered unread count is
|
|
9358
|
+
* DERIVED from this array (`replies.filter((r) => r.unread).length`) —
|
|
9359
|
+
* the library never receives or stores a pre-computed count.
|
|
9360
|
+
*/
|
|
9361
|
+
replies: MosaicThreadIndicatorReplyStatus[];
|
|
9362
|
+
/** Visible label for the trigger (e.g. "Thread"). Required, no default. */
|
|
9363
|
+
label: string;
|
|
9364
|
+
/**
|
|
9365
|
+
* Accessible-name formatter, called with the derived unread count.
|
|
9366
|
+
* Required — the host owns pluralization/wording, the library owns none.
|
|
9367
|
+
*/
|
|
9368
|
+
ariaLabel: (unreadCount: number) => string;
|
|
9369
|
+
/** Called when the trigger is activated (click). */
|
|
9370
|
+
onActivate: () => void;
|
|
9371
|
+
/** Disables the trigger (e.g. host-level connectivity loss). */
|
|
9372
|
+
disabled?: boolean;
|
|
9373
|
+
/** Additional Tailwind classes on the root element. */
|
|
9374
|
+
className?: string;
|
|
9375
|
+
/** React 19 ref prop — forwarded to the root element. */
|
|
9376
|
+
ref?: React.Ref<HTMLButtonElement>;
|
|
9377
|
+
};
|
|
9378
|
+
/**
|
|
9379
|
+
* MosaicThreadIndicator — production unread-thread-indicator atom for
|
|
9380
|
+
* @vantageos/mosaic-blocks.
|
|
9381
|
+
*
|
|
9382
|
+
* Purely presentational: derives an unread count from host-supplied data and
|
|
9383
|
+
* renders a labelled, clickable trigger. No network call, no stored count.
|
|
9384
|
+
*/
|
|
9385
|
+
declare function MosaicThreadIndicator(props: MosaicThreadIndicatorProps): React.JSX.Element;
|
|
9386
|
+
declare namespace MosaicThreadIndicator {
|
|
9387
|
+
var displayName: string;
|
|
9388
|
+
}
|
|
9389
|
+
|
|
9390
|
+
/**
|
|
9391
|
+
* threadIndicatorVariants — pure CVA variant functions for MosaicThreadIndicator.
|
|
9392
|
+
*
|
|
9393
|
+
* Isolated in their own module so they can be re-exported from the
|
|
9394
|
+
* `@vantageos/mosaic-blocks/server` subpath without pulling in React.
|
|
9395
|
+
*
|
|
9396
|
+
* Zero browser / React runtime dependencies — safe in RSC / Node.js.
|
|
9397
|
+
*/
|
|
9398
|
+
/** Root button/trigger for the thread indicator. */
|
|
9399
|
+
declare const threadIndicatorRootVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9400
|
+
/** Unread-count pill, shown only when the derived unread count is greater than zero. */
|
|
9401
|
+
declare const threadIndicatorCountVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9402
|
+
|
|
9403
|
+
/**
|
|
9404
|
+
* MosaicMentionInput — text input that opens an anchored, host-owned list of
|
|
9405
|
+
* mentionable entries when the host-chosen trigger character is typed.
|
|
9406
|
+
*
|
|
9407
|
+
* Built on `MosaicPopover` for anchoring and dismissal (Escape, outside
|
|
9408
|
+
* click) — this component does not re-implement either. It owns exactly
|
|
9409
|
+
* three things:
|
|
9410
|
+
* 1. Detecting the trigger character and the query fragment typed after it,
|
|
9411
|
+
* reported to the host via `onQueryChange` — the host decides what
|
|
9412
|
+
* "matches" means, this component never filters.
|
|
9413
|
+
* 2. Roving keyboard navigation (ArrowUp/ArrowDown, wrap-free, clamped) over
|
|
9414
|
+
* whichever entries the host currently supplies via `entries`.
|
|
9415
|
+
* 3. Inserting the host-chosen text for the selected entry back into the
|
|
9416
|
+
* input value and reporting the selection via `onSelectEntry`.
|
|
9417
|
+
*
|
|
9418
|
+
* The mentionable entries themselves — their data, their rendering, and the
|
|
9419
|
+
* decision of which ones currently match the typed query — belong entirely
|
|
9420
|
+
* to the host, exactly like `MosaicTemplateList`'s `renderItem` idiom: this
|
|
9421
|
+
* component never hardcodes, invents, fetches, or filters an entry.
|
|
9422
|
+
*
|
|
9423
|
+
* SIN-01: the component carries zero visible strings. `inputAriaLabel`,
|
|
9424
|
+
* `listAriaLabel`, and `emptyMessage` are all required props with no
|
|
9425
|
+
* default — the host supplies every word.
|
|
9426
|
+
*
|
|
9427
|
+
* Trigger-detection note: scans backward from the caret for the trigger
|
|
9428
|
+
* character, stopping at the first whitespace. This models a single-glyph
|
|
9429
|
+
* trigger (e.g. "@") — the common case; a multi-character trigger is not a
|
|
9430
|
+
* supported shape here.
|
|
9431
|
+
*/
|
|
9432
|
+
|
|
9433
|
+
interface MosaicMentionInputProps<T extends {
|
|
9434
|
+
id: string;
|
|
9435
|
+
}> {
|
|
9436
|
+
/** Controlled input value — the host owns the truth. */
|
|
9437
|
+
value: string;
|
|
9438
|
+
/** Called with the next value on every keystroke and on mention insertion. */
|
|
9439
|
+
onValueChange: (value: string) => void;
|
|
9440
|
+
/** The character that opens the mention list (e.g. "@"). Single glyph. */
|
|
9441
|
+
triggerCharacter: string;
|
|
9442
|
+
/**
|
|
9443
|
+
* The entries to show in the list. Host-owned and, when the host is
|
|
9444
|
+
* filtering as the user types, already filtered — this component never
|
|
9445
|
+
* inspects or narrows this array itself.
|
|
9446
|
+
*/
|
|
9447
|
+
entries: T[];
|
|
9448
|
+
/** Host-owned renderer for a single entry; `active` marks the roving selection. */
|
|
9449
|
+
renderEntry: (entry: T, index: number, active: boolean) => React.ReactNode;
|
|
9450
|
+
/** Host-owned mapping from an entry to the plain text inserted on selection. */
|
|
9451
|
+
getEntryText: (entry: T) => string;
|
|
9452
|
+
/**
|
|
9453
|
+
* Called with the fragment typed after the trigger character (may be an
|
|
9454
|
+
* empty string right after the trigger), or `null` when the caret is not
|
|
9455
|
+
* inside a mention context (list closed).
|
|
9456
|
+
*/
|
|
9457
|
+
onQueryChange: (query: string | null) => void;
|
|
9458
|
+
/** Called with the chosen entry when the host or user picks one. */
|
|
9459
|
+
onSelectEntry?: (entry: T) => void;
|
|
9460
|
+
/** Required accessible name for the text input — no default (SIN-01). */
|
|
9461
|
+
inputAriaLabel: string;
|
|
9462
|
+
/** Required accessible name for the entries list — no default (SIN-01). */
|
|
9463
|
+
listAriaLabel: string;
|
|
9464
|
+
/** Required message shown when `entries` is empty while the list is open. */
|
|
9465
|
+
emptyMessage: string;
|
|
9466
|
+
className?: string;
|
|
9467
|
+
inputClassName?: string;
|
|
9468
|
+
}
|
|
9469
|
+
/**
|
|
9470
|
+
* MosaicMentionInput — production mention-input atom for
|
|
9471
|
+
* @vantageos/mosaic-blocks.
|
|
9472
|
+
*
|
|
9473
|
+
* @example
|
|
9474
|
+
* <MosaicMentionInput
|
|
9475
|
+
* value={draft}
|
|
9476
|
+
* onValueChange={setDraft}
|
|
9477
|
+
* triggerCharacter="@"
|
|
9478
|
+
* entries={filteredPeople}
|
|
9479
|
+
* getEntryText={(person) => person.name}
|
|
9480
|
+
* renderEntry={(person, _i, active) => (
|
|
9481
|
+
* <PersonRow person={person} active={active} />
|
|
9482
|
+
* )}
|
|
9483
|
+
* onQueryChange={(query) => setFragment(query)}
|
|
9484
|
+
* onSelectEntry={(person) => trackMention(person)}
|
|
9485
|
+
* inputAriaLabel={t('Composer.inputLabel')}
|
|
9486
|
+
* listAriaLabel={t('Composer.mentionListLabel')}
|
|
9487
|
+
* emptyMessage={t('Composer.noMatches')}
|
|
9488
|
+
* />
|
|
9489
|
+
*/
|
|
9490
|
+
declare function MosaicMentionInput<T extends {
|
|
9491
|
+
id: string;
|
|
9492
|
+
}>({ value, onValueChange, triggerCharacter, entries, renderEntry, getEntryText, onQueryChange, onSelectEntry, inputAriaLabel, listAriaLabel, emptyMessage, className, inputClassName, }: MosaicMentionInputProps<T>): React.JSX.Element;
|
|
9493
|
+
declare namespace MosaicMentionInput {
|
|
9494
|
+
var displayName: string;
|
|
9495
|
+
}
|
|
9496
|
+
|
|
9497
|
+
/**
|
|
9498
|
+
* mentionInputVariants — pure CVA variant functions for MosaicMentionInput.
|
|
9499
|
+
*
|
|
9500
|
+
* Isolated in its own module so it can be re-exported from the
|
|
9501
|
+
* `@vantageos/mosaic-blocks/server` subpath without pulling in React or
|
|
9502
|
+
* @base-ui/react.
|
|
9503
|
+
*
|
|
9504
|
+
* Zero browser / React runtime dependencies — safe in RSC / Node.js.
|
|
9505
|
+
*/
|
|
9506
|
+
/** The text input itself. */
|
|
9507
|
+
declare const mentionInputFieldVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9508
|
+
/** The mentionable-entries list surface. */
|
|
9509
|
+
declare const mentionListVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9510
|
+
/** A single entry row inside the list — active variant highlights the roving selection. */
|
|
9511
|
+
declare const mentionListItemVariants: (props?: ({
|
|
9512
|
+
active?: boolean | null | undefined;
|
|
9513
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9514
|
+
|
|
9515
|
+
/**
|
|
9516
|
+
* MosaicMessageSearch — search bar over the messages of a single, already-open
|
|
9517
|
+
* conversation: a query input and a clear action, with the matching results
|
|
9518
|
+
* rendered entirely by the host.
|
|
9519
|
+
*
|
|
9520
|
+
* Distinct from `MosaicMemorySearch` (which searches a host-supplied
|
|
9521
|
+
* knowledge base): this component searches WITHIN a conversation's message
|
|
9522
|
+
* history so an agent (or a human) can recall a past instruction without
|
|
9523
|
+
* re-reading the whole thread.
|
|
9524
|
+
*
|
|
9525
|
+
* Fully controlled, presentational atom: `query` + `onQueryChange` own the
|
|
9526
|
+
* text; the component never searches anything, filters anything, counts
|
|
9527
|
+
* anything, or performs any network I/O. It has no idea what a "message" or a
|
|
9528
|
+
* "match" looks like — the entire results area is a host-owned slot
|
|
9529
|
+
* (`resultsSlot`), exactly like `MosaicMemorySearch`'s `filters` catalogue.
|
|
9530
|
+
*
|
|
9531
|
+
* The clear action only appears once `query` is non-empty — that switch is
|
|
9532
|
+
* genuinely presentation state, not a missing word, so `clearButtonLabel`
|
|
9533
|
+
* remains a required prop with no default (the host always supplies it, the
|
|
9534
|
+
* button simply isn't rendered until there is something to clear).
|
|
9535
|
+
*
|
|
9536
|
+
* `resultsSlot` and `emptyResultsLabel` are optional as a GROUP, but for two
|
|
9537
|
+
* different reasons:
|
|
9538
|
+
* - `resultsSlot` omitted encodes "the host has not rendered a results view
|
|
9539
|
+
* yet" (e.g. the query is empty, or results are still being gathered) —
|
|
9540
|
+
* absence of a whole feature, not a missing word.
|
|
9541
|
+
* - `emptyResultsLabel` is the one SIN-01 exception: a NAMED, host-worded
|
|
9542
|
+
* zero-results state. It is rendered only when `resultsSlot` is absent, so
|
|
9543
|
+
* the host signals "I searched and found nothing" by supplying this label
|
|
9544
|
+
* without a results node. When both are supplied, `resultsSlot` wins — the
|
|
9545
|
+
* host is trusted to omit `emptyResultsLabel` once it has real results.
|
|
9546
|
+
*
|
|
9547
|
+
* No "use client" — prepend-use-client.mjs adds it to dist.
|
|
9548
|
+
* Design tokens: --primary, --primary-foreground, --background, --foreground,
|
|
9549
|
+
* --border, --muted, --muted-foreground, --input, --ring.
|
|
9550
|
+
* a11y: the query input is `type="search"` with an explicit `aria-label`
|
|
9551
|
+
* (`searchLabel`, host-owned — no host is forced to also render a visible
|
|
9552
|
+
* `<label>`). The clear button carries its own required `aria-label` for the
|
|
9553
|
+
* same reason.
|
|
9554
|
+
*
|
|
9555
|
+
* Deps: @base-ui/react (via MosaicInput) + class-variance-authority only.
|
|
9556
|
+
*
|
|
9557
|
+
* @example
|
|
9558
|
+
* <MosaicMessageSearch
|
|
9559
|
+
* query={query}
|
|
9560
|
+
* onQueryChange={setQuery}
|
|
9561
|
+
* searchLabel="Search this conversation"
|
|
9562
|
+
* searchPlaceholder="Search messages…"
|
|
9563
|
+
* clearButtonLabel="Clear search"
|
|
9564
|
+
* resultsSlot={matches.length > 0 ? <MatchList matches={matches} /> : undefined}
|
|
9565
|
+
* emptyResultsLabel="No messages match your search"
|
|
9566
|
+
* />
|
|
9567
|
+
*/
|
|
9568
|
+
|
|
9569
|
+
interface MosaicMessageSearchProps {
|
|
9570
|
+
/** Current query text. Controlled by the host. */
|
|
9571
|
+
query: string;
|
|
9572
|
+
/** Called with the new query text on every keystroke. */
|
|
9573
|
+
onQueryChange: (query: string) => void;
|
|
9574
|
+
/** aria-label for the query input. Required, no default. */
|
|
9575
|
+
searchLabel: string;
|
|
9576
|
+
/** Placeholder for the query input. Required, no default. */
|
|
9577
|
+
searchPlaceholder: string;
|
|
9578
|
+
/** aria-label for the clear button. Required, no default — rendered only once `query` is non-empty. */
|
|
9579
|
+
clearButtonLabel: string;
|
|
9580
|
+
/**
|
|
9581
|
+
* Host-owned results view for the current query — a node, never data the
|
|
9582
|
+
* component would render itself. The host performs the search; this
|
|
9583
|
+
* component never sees a single message.
|
|
9584
|
+
*/
|
|
9585
|
+
resultsSlot?: React.ReactNode;
|
|
9586
|
+
/**
|
|
9587
|
+
* Host-worded zero-results state. Rendered only when `resultsSlot` is
|
|
9588
|
+
* absent — the host signals "I searched and found nothing" by supplying
|
|
9589
|
+
* this label without a results node. Absence (with `resultsSlot` also
|
|
9590
|
+
* absent) encodes a neutral state (e.g. no search performed yet).
|
|
9591
|
+
*/
|
|
9592
|
+
emptyResultsLabel?: string;
|
|
9593
|
+
/** Additional Tailwind classes on the root element. */
|
|
9594
|
+
className?: string;
|
|
9595
|
+
/** React 19 ref prop — forwarded to the root element. */
|
|
9596
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
9597
|
+
}
|
|
9598
|
+
/**
|
|
9599
|
+
* MosaicMessageSearch — production in-thread message search bar for
|
|
9600
|
+
* @vantageos/mosaic-blocks.
|
|
9601
|
+
*
|
|
9602
|
+
* Purely presentational + controlled: renders the query input, a clear
|
|
9603
|
+
* action, and whatever host-owned results view is passed in. No network
|
|
9604
|
+
* call, no internal query state, no message model of any kind.
|
|
9605
|
+
*/
|
|
9606
|
+
declare function MosaicMessageSearch({ query, onQueryChange, searchLabel, searchPlaceholder, clearButtonLabel, resultsSlot, emptyResultsLabel, className, ref, }: MosaicMessageSearchProps): React.JSX.Element;
|
|
9607
|
+
declare namespace MosaicMessageSearch {
|
|
9608
|
+
var displayName: string;
|
|
9609
|
+
}
|
|
9610
|
+
|
|
9611
|
+
/**
|
|
9612
|
+
* MosaicSessionCard — a single work-in-progress session at a glance
|
|
9613
|
+
* (default / compact variants)
|
|
9614
|
+
*
|
|
9615
|
+
* A "session" is host data: a piece of work in progress (e.g. a mandate),
|
|
9616
|
+
* carrying an id, a title, a host-defined status, and a last-updated
|
|
9617
|
+
* timestamp. The card renders exactly that state — it never fetches,
|
|
9618
|
+
* derives, or infers anything of its own.
|
|
9619
|
+
*
|
|
9620
|
+
* Two density variants, modeled as ONE component with a `variant` prop
|
|
9621
|
+
* (not two components) — same doctrine as MosaicMemoryCard:
|
|
9622
|
+
* - `"default"` (default): full card, includes a labelled "last updated"
|
|
9623
|
+
* footer caption, produced by `formatUpdatedAt`.
|
|
9624
|
+
* - `"compact"`: single dense row, drops the "last updated" footer
|
|
9625
|
+
* entirely and never calls `formatUpdatedAt` — so it is NOT required on
|
|
9626
|
+
* this variant (no-lying-prop-contract: a prop is required exactly on
|
|
9627
|
+
* the branch that reads it).
|
|
9628
|
+
*
|
|
9629
|
+
* Selection is opt-in and travels as a pair: `onSelect` and `selectLabel`
|
|
9630
|
+
* are either both present or both absent. Absent (default) — the root is
|
|
9631
|
+
* a plain, non-interactive container: no `role="button"`, no
|
|
9632
|
+
* `aria-label`. Present — the root becomes a keyboard-operable
|
|
9633
|
+
* button-role element (Enter/Space activate it, same as a native
|
|
9634
|
+
* `<button>`), with `aria-label={selectLabel}` required and host-owned
|
|
9635
|
+
* (SIN-01 — no fallback word).
|
|
9636
|
+
*
|
|
9637
|
+
* Composed from this repo's own primitives: `MosaicCard` (root/header/
|
|
9638
|
+
* content/footer) + `MosaicBadge` (status chip) — not re-implemented.
|
|
9639
|
+
*
|
|
9640
|
+
* Pattern: MosaicMemoryCard.tsx (data-slot, inline utility `cn`, React 19
|
|
9641
|
+
* ref prop, displayName, JSDoc, discriminated-union variant props).
|
|
9642
|
+
* Design tokens: --card, --card-foreground, --border, --muted-foreground,
|
|
9643
|
+
* --ring (via MosaicCard / MosaicBadge — no ad-hoc colors here).
|
|
9644
|
+
* Bilingual (SIN-01): zero user-facing strings hardcoded. `formatStatus` /
|
|
9645
|
+
* `formatUpdatedAt` / `selectLabel` are all host-owned, no default.
|
|
9646
|
+
* Zero I/O — the card never fetches; all state is host-supplied.
|
|
9647
|
+
*
|
|
9648
|
+
* @example
|
|
9649
|
+
* // Default variant — full card, "last updated" footer
|
|
9650
|
+
* <MosaicSessionCard
|
|
9651
|
+
* session={session}
|
|
9652
|
+
* formatStatus={(status) => t(`session.status.${status}`)}
|
|
9653
|
+
* formatUpdatedAt={(updatedAt) => t("session.updatedAt", { value: formatRelative(updatedAt) })}
|
|
9654
|
+
* />
|
|
9655
|
+
*
|
|
9656
|
+
* @example
|
|
9657
|
+
* // Compact variant — no footer, no formatUpdatedAt call at all
|
|
9658
|
+
* <MosaicSessionCard
|
|
9659
|
+
* session={session}
|
|
9660
|
+
* variant="compact"
|
|
9661
|
+
* formatStatus={(status) => t(`session.status.${status}`)}
|
|
9662
|
+
* />
|
|
9663
|
+
*
|
|
9664
|
+
* @example
|
|
9665
|
+
* // Selectable — onSelect + selectLabel travel together
|
|
9666
|
+
* <MosaicSessionCard
|
|
9667
|
+
* session={session}
|
|
9668
|
+
* formatStatus={(status) => t(`session.status.${status}`)}
|
|
9669
|
+
* formatUpdatedAt={(updatedAt) => formatRelative(updatedAt)}
|
|
9670
|
+
* onSelect={(id) => openSession(id)}
|
|
9671
|
+
* selectLabel={t("session.open", { title: session.title })}
|
|
9672
|
+
* />
|
|
9673
|
+
*/
|
|
9674
|
+
|
|
9675
|
+
type MosaicSessionStatus = "active" | "waiting" | "blocked" | "done";
|
|
9676
|
+
interface MosaicSessionData {
|
|
9677
|
+
id: string;
|
|
9678
|
+
title: string;
|
|
9679
|
+
status: MosaicSessionStatus;
|
|
9680
|
+
/** Epoch milliseconds. */
|
|
9681
|
+
updatedAt: number;
|
|
9682
|
+
}
|
|
9683
|
+
/** Props read unconditionally regardless of `variant` or selectability. */
|
|
9684
|
+
interface MosaicSessionCardBaseProps {
|
|
9685
|
+
session: MosaicSessionData;
|
|
9686
|
+
/**
|
|
9687
|
+
* Formatter mapping `session.status` to its displayed label. Required —
|
|
9688
|
+
* the host owns the language (e.g. `(status) => t(\`session.status.\${status}\`)`).
|
|
9689
|
+
*/
|
|
9690
|
+
formatStatus: (status: MosaicSessionStatus) => React.ReactNode;
|
|
9691
|
+
className?: string;
|
|
9692
|
+
/** React 19 ref prop — forwarded to the root element. */
|
|
9693
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
9694
|
+
}
|
|
9695
|
+
/**
|
|
9696
|
+
* Discriminated union on `variant` — `formatUpdatedAt` is required EXACTLY
|
|
9697
|
+
* on the `"default"` member (the only one that renders a "last updated"
|
|
9698
|
+
* footer). The `"compact"` member never renders that footer and never
|
|
9699
|
+
* calls `formatUpdatedAt` — requiring it there would force every host to
|
|
9700
|
+
* supply a value the library never displays (a "lying prop contract").
|
|
9701
|
+
*/
|
|
9702
|
+
type MosaicSessionCardVariantProps = {
|
|
9703
|
+
/**
|
|
9704
|
+
* Full card layout with a labelled "last updated" footer.
|
|
9705
|
+
* Default when omitted.
|
|
9706
|
+
* @default "default"
|
|
9707
|
+
*/
|
|
9708
|
+
variant?: "default";
|
|
9709
|
+
/**
|
|
9710
|
+
* Formatter producing the "last updated" caption from
|
|
9711
|
+
* `session.updatedAt`. Only ever rendered in the `"default"`
|
|
9712
|
+
* variant — required here, not on `"compact"`. Host-owned.
|
|
9713
|
+
*/
|
|
9714
|
+
formatUpdatedAt: (updatedAt: number) => React.ReactNode;
|
|
9715
|
+
} | {
|
|
9716
|
+
/** Dense single-row layout — no "last updated" footer, no call. */
|
|
9717
|
+
variant: "compact";
|
|
9718
|
+
};
|
|
9719
|
+
/**
|
|
9720
|
+
* Discriminated union on selectability — `onSelect` and `selectLabel`
|
|
9721
|
+
* travel together. Absent by default: the root stays a plain,
|
|
9722
|
+
* non-interactive container. Present: the root becomes a keyboard-operable
|
|
9723
|
+
* `role="button"` element and `selectLabel` (required, host-owned, no
|
|
9724
|
+
* default) becomes its `aria-label`.
|
|
9725
|
+
*/
|
|
9726
|
+
type MosaicSessionCardInteractionProps = {
|
|
9727
|
+
onSelect?: undefined;
|
|
9728
|
+
selectLabel?: undefined;
|
|
9729
|
+
} | {
|
|
9730
|
+
/** Called with `session.id` on click / Enter / Space. */
|
|
9731
|
+
onSelect: (sessionId: string) => void;
|
|
9732
|
+
/** aria-label for the selectable root. Required — host-owned, no default. */
|
|
9733
|
+
selectLabel: string;
|
|
9734
|
+
};
|
|
9735
|
+
type MosaicSessionCardProps = MosaicSessionCardBaseProps & MosaicSessionCardVariantProps & MosaicSessionCardInteractionProps;
|
|
9736
|
+
/**
|
|
9737
|
+
* MosaicSessionCard — production single-session card for
|
|
9738
|
+
* @vantageos/mosaic-blocks.
|
|
9739
|
+
*
|
|
9740
|
+
* One component, two density variants (`default` default / `compact`),
|
|
9741
|
+
* opt-in selectability — see file JSDoc for the exact prop contract.
|
|
9742
|
+
*/
|
|
9743
|
+
declare function MosaicSessionCard(props: MosaicSessionCardProps): React.JSX.Element;
|
|
9744
|
+
declare namespace MosaicSessionCard {
|
|
9745
|
+
var displayName: string;
|
|
9746
|
+
}
|
|
9747
|
+
|
|
9748
|
+
/**
|
|
9749
|
+
* sessionCardVariants — pure CVA variant functions for MosaicSessionCard.
|
|
9750
|
+
*
|
|
9751
|
+
* Isolated in its own module so it can be re-exported from the
|
|
9752
|
+
* `@vantageos/mosaic-blocks/server` subpath without pulling in React.
|
|
9753
|
+
*
|
|
9754
|
+
* Zero browser / React runtime dependencies — safe in RSC / Node.js.
|
|
9755
|
+
*/
|
|
9756
|
+
/** Root card container variants */
|
|
9757
|
+
declare const sessionCardVariants: (props?: ({
|
|
9758
|
+
variant?: "default" | "compact" | null | undefined;
|
|
9759
|
+
selectable?: boolean | null | undefined;
|
|
9760
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9761
|
+
|
|
9762
|
+
/**
|
|
9763
|
+
* MosaicSessionList — presentational, layout-disposition-only list of the
|
|
9764
|
+
* workstation's in-progress sessions
|
|
9765
|
+
*
|
|
9766
|
+
* The source implementation shipped as FOUR separate list components
|
|
9767
|
+
* ("stack", "grid", "compact", "inline" dispositions). Merged here into
|
|
9768
|
+
* ONE variant-driven component — the list does not exist without the
|
|
9769
|
+
* card, and it does not exist four times over either: same doctrine as
|
|
9770
|
+
* MosaicMemoryList, applied to the `layout` axis instead of `density`.
|
|
9771
|
+
*
|
|
9772
|
+
* The list owns disposition ONLY:
|
|
9773
|
+
* - `items`: the host's array of sessions, each requiring only an `id`.
|
|
9774
|
+
* - `renderItem`: the host-supplied per-session renderer (typically a
|
|
9775
|
+
* `MosaicSessionCard`) — the list never renders a row of its own and
|
|
9776
|
+
* never hardcodes a status, a sort order, or any domain content
|
|
9777
|
+
* (no-hardcoded-business-knowledge). It never fetches its own data.
|
|
9778
|
+
* - `emptyMessage`: required, no default (SIN-01) — the host owns the
|
|
9779
|
+
* language, e.g. `t('SessionList.empty')`.
|
|
9780
|
+
*
|
|
9781
|
+
* Keyboard: roving tabindex across items (native `<ul>` / `<li>` —
|
|
9782
|
+
* semantic list roles come from the elements themselves) — ArrowDown/
|
|
9783
|
+
* ArrowRight moves focus to the next row, ArrowUp/ArrowLeft to the
|
|
9784
|
+
* previous, Home/End jump to the first/last. Exactly one item is
|
|
9785
|
+
* `tabIndex={0}` at a time; the rest are `tabIndex={-1}`. Behavior is the
|
|
9786
|
+
* same across all four `layout` values — only the container/item Tailwind
|
|
9787
|
+
* classes differ.
|
|
9788
|
+
*
|
|
9789
|
+
* Pattern: MosaicMemoryList.tsx (data-slot, inline utility `cn`, roving
|
|
9790
|
+
* tabindex, React 19 ref prop, displayName, JSDoc).
|
|
9791
|
+
*/
|
|
9792
|
+
|
|
9793
|
+
/** The four merged source dispositions, as ONE variant prop. */
|
|
9794
|
+
type MosaicSessionListLayout = "stack" | "grid" | "compact" | "inline";
|
|
9795
|
+
interface MosaicSessionListProps<T extends {
|
|
9796
|
+
id: string;
|
|
9797
|
+
}> {
|
|
9798
|
+
/** The sessions to lay out. The list never inspects their shape beyond `id`. */
|
|
9799
|
+
items: T[];
|
|
9800
|
+
/** Host-owned renderer for a single session — the list owns disposition only. */
|
|
9801
|
+
renderItem: (item: T, index: number) => React.ReactNode;
|
|
9802
|
+
/**
|
|
9803
|
+
* Container disposition — the four merged source variants.
|
|
9804
|
+
* @default "stack"
|
|
9805
|
+
*/
|
|
9806
|
+
layout?: MosaicSessionListLayout;
|
|
9807
|
+
/**
|
|
9808
|
+
* Message shown when `items` is empty. Required, no default — the host
|
|
9809
|
+
* owns the language (e.g. `t('SessionList.empty')`).
|
|
9810
|
+
*/
|
|
9811
|
+
emptyMessage: string;
|
|
9812
|
+
/** Additional Tailwind classes on the root container. */
|
|
9813
|
+
className?: string;
|
|
9814
|
+
/** Additional Tailwind classes on each item wrapper. */
|
|
9815
|
+
itemClassName?: string;
|
|
9816
|
+
/** React 19 ref prop — forwarded to the root container. */
|
|
9817
|
+
ref?: React.Ref<HTMLDivElement | HTMLUListElement>;
|
|
9818
|
+
}
|
|
9819
|
+
/**
|
|
9820
|
+
* MosaicSessionList — production layout-disposition atom for
|
|
9821
|
+
* @vantageos/mosaic-blocks.
|
|
9822
|
+
*
|
|
9823
|
+
* Purely presentational: no filtering, no sorting, no item rendering, no
|
|
9824
|
+
* I/O — the host owns the session content via `renderItem`; this
|
|
9825
|
+
* component only owns the four merged layout dispositions and keyboard
|
|
9826
|
+
* roving-tabindex navigation.
|
|
9827
|
+
*/
|
|
9828
|
+
declare function MosaicSessionList<T extends {
|
|
9829
|
+
id: string;
|
|
9830
|
+
}>({ items, renderItem, layout, emptyMessage, className, itemClassName, ref, }: MosaicSessionListProps<T>): React.JSX.Element;
|
|
9831
|
+
declare namespace MosaicSessionList {
|
|
9832
|
+
var displayName: string;
|
|
9833
|
+
}
|
|
9834
|
+
|
|
9835
|
+
/**
|
|
9836
|
+
* sessionListVariants — pure CVA variant function for MosaicSessionList.
|
|
9837
|
+
*
|
|
9838
|
+
* The source implementation shipped as FOUR separate list components, one
|
|
9839
|
+
* per disposition. Merged here into ONE component with a `layout` variant
|
|
9840
|
+
* prop — the doctrine used throughout this repo (see MosaicMemoryCard,
|
|
9841
|
+
* MosaicMemoryList): one component, variants, never N components for what
|
|
9842
|
+
* is really the same `items` + `renderItem` + `emptyMessage` contract with
|
|
9843
|
+
* a different container layout.
|
|
9844
|
+
*
|
|
9845
|
+
* Isolated in its own module so it can be re-exported from the
|
|
9846
|
+
* `@vantageos/mosaic-blocks/server` subpath without pulling in React.
|
|
9847
|
+
*
|
|
9848
|
+
* Zero browser / React runtime dependencies — safe in RSC / Node.js.
|
|
9849
|
+
*/
|
|
9850
|
+
/**
|
|
9851
|
+
* Root container layout — owns disposition ONLY; item content is entirely
|
|
9852
|
+
* host-supplied via `renderItem`.
|
|
9853
|
+
*/
|
|
9854
|
+
declare const sessionListVariants: (props?: ({
|
|
9855
|
+
layout?: "grid" | "inline" | "compact" | "stack" | null | undefined;
|
|
9856
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9857
|
+
/** Per-item wrapper — spacing depends on the container layout. */
|
|
9858
|
+
declare const sessionListItemVariants: (props?: ({
|
|
9859
|
+
layout?: "grid" | "inline" | "compact" | "stack" | null | undefined;
|
|
9860
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9861
|
+
|
|
9862
|
+
interface MosaicEditSessionDialogProps {
|
|
9863
|
+
/** Controlled open state — the host owns the source of truth. */
|
|
9864
|
+
open: boolean;
|
|
9865
|
+
/** Called whenever the modal wants to change its open state (save, cancel, Escape, backdrop click). */
|
|
9866
|
+
onOpenChange: (open: boolean) => void;
|
|
9867
|
+
/** Modal heading. Required, no default. */
|
|
9868
|
+
title: string;
|
|
9869
|
+
/** Optional modal subheading. */
|
|
9870
|
+
description?: string;
|
|
9871
|
+
/** Accessible name for the desktop close button, forwarded to MosaicAdaptiveModal. */
|
|
9872
|
+
closeAriaLabel: string;
|
|
9873
|
+
/** Current session name value — controlled, pre-filled from the host's current session. */
|
|
9874
|
+
name: string;
|
|
9875
|
+
/** Called on every keystroke in the name field. */
|
|
9876
|
+
onNameChange: (value: string) => void;
|
|
9877
|
+
/** Label for the name field. Required, no default. */
|
|
9878
|
+
nameLabel: string;
|
|
9879
|
+
/** Placeholder for the name field. */
|
|
9880
|
+
namePlaceholder?: string;
|
|
9881
|
+
/** Host-computed validation message for the name field, or absent when valid. */
|
|
9882
|
+
nameError?: string;
|
|
9883
|
+
/** Host-supplied classification taxonomy — never hardcoded in the library. */
|
|
9884
|
+
classifications: MosaicSelectItem$1[];
|
|
9885
|
+
/** Currently selected classification value — controlled, pre-filled from the host's current session. */
|
|
9886
|
+
classification: string;
|
|
9887
|
+
/** Called when the host user picks a different classification. */
|
|
9888
|
+
onClassificationChange: (value: string) => void;
|
|
9889
|
+
/** Label for the classification field. Required, no default. */
|
|
9890
|
+
classificationLabel: string;
|
|
9891
|
+
/** True while a save request is in flight — announced via aria-busy, disables both actions. */
|
|
9892
|
+
isSaving: boolean;
|
|
9893
|
+
/**
|
|
9894
|
+
* Host-computed form validity gating the save button. This component
|
|
9895
|
+
* never decides validation itself — it only reflects the host's verdict.
|
|
9896
|
+
*/
|
|
9897
|
+
canSave: boolean;
|
|
9898
|
+
/** Called when the host user submits the form. Never called on Escape/backdrop close. */
|
|
9899
|
+
onSave: () => void;
|
|
9900
|
+
/** Called when the host user clicks Cancel. Does not mutate anything by itself. */
|
|
9901
|
+
onCancel: () => void;
|
|
9902
|
+
/** Label for the save button while idle. Required, no default. */
|
|
9903
|
+
saveButtonLabel: string;
|
|
9904
|
+
/** Label for the save button while isSaving=true. Required, no default. */
|
|
9905
|
+
savingLabel: string;
|
|
9906
|
+
/** Label for the cancel button. Required, no default. */
|
|
9907
|
+
cancelButtonLabel: string;
|
|
9908
|
+
/** Additional Tailwind classes on the modal body. */
|
|
9909
|
+
className?: string;
|
|
9910
|
+
}
|
|
9911
|
+
/**
|
|
9912
|
+
* MosaicEditSessionDialog — production "rename / reclassify a session"
|
|
9913
|
+
* form modal for @vantageos/mosaic-blocks.
|
|
9914
|
+
*
|
|
9915
|
+
* Purely presentational and fully controlled: composes MosaicAdaptiveModal +
|
|
9916
|
+
* MosaicInput + MosaicSelect. No network call, no built-in taxonomy, no
|
|
9917
|
+
* built-in validation, no built-in copy.
|
|
9918
|
+
*/
|
|
9919
|
+
declare function MosaicEditSessionDialog({ open, onOpenChange, title, description, closeAriaLabel, name, onNameChange, nameLabel, namePlaceholder, nameError, classifications, classification, onClassificationChange, classificationLabel, isSaving, canSave, onSave, onCancel, saveButtonLabel, savingLabel, cancelButtonLabel, className, }: MosaicEditSessionDialogProps): React.JSX.Element | null;
|
|
9920
|
+
declare namespace MosaicEditSessionDialog {
|
|
9921
|
+
var displayName: string;
|
|
9922
|
+
}
|
|
9923
|
+
|
|
9924
|
+
/**
|
|
9925
|
+
* editSessionDialogVariants — pure CVA variant functions for
|
|
9926
|
+
* MosaicEditSessionDialog.
|
|
9927
|
+
*
|
|
9928
|
+
* Isolated in their own module so they can be re-exported from the
|
|
9929
|
+
* `@vantageos/mosaic-blocks/server` subpath without pulling in React.
|
|
9930
|
+
*
|
|
9931
|
+
* Zero browser / React runtime dependencies — safe in RSC / Node.js.
|
|
9932
|
+
*/
|
|
9933
|
+
/** Form body vertical layout. */
|
|
9934
|
+
declare const editSessionDialogBodyVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9935
|
+
/** Field group (label + control + helper/error) vertical layout. */
|
|
9936
|
+
declare const editSessionDialogFieldVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9937
|
+
/** Field error text. */
|
|
9938
|
+
declare const editSessionDialogErrorVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9939
|
+
/** Footer action row. */
|
|
9940
|
+
declare const editSessionDialogFooterVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
9941
|
+
/** Submit / cancel button variants by intent. */
|
|
9942
|
+
declare const editSessionDialogButtonVariants: (props?: ({
|
|
9943
|
+
intent?: "cancel" | "save" | null | undefined;
|
|
9944
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
9945
|
+
|
|
9946
|
+
/**
|
|
9947
|
+
* MosaicSaveChatAsMemoryForm — presentational "turn this thread into agency
|
|
9948
|
+
* knowledge" form: the chat → memory bridge.
|
|
9949
|
+
*
|
|
9950
|
+
* Presentational atom composed from existing mosaic-blocks primitives:
|
|
9951
|
+
* MosaicInput, MosaicTextarea and MosaicTagInput. This component never
|
|
9952
|
+
* invents a new form field or tag chip — it assembles the ones the library
|
|
9953
|
+
* already ships (same doctrine as MosaicAddMemoryForm / MosaicEditMemoryDialog).
|
|
9954
|
+
*
|
|
9955
|
+
* Zero extraction, zero I/O: the component does NOT read the chat, does NOT
|
|
9956
|
+
* summarize it and does NOT decide what is worth remembering — it renders
|
|
9957
|
+
* whatever the host already extracted as a fully controlled `content` value,
|
|
9958
|
+
* lets the host user title/tag it, and routes save/cancel through host
|
|
9959
|
+
* callbacks. No network call of any kind lives in this component.
|
|
9960
|
+
*
|
|
9961
|
+
* Fully controlled: `title`/`content`/`tags` are single-source-of-truth
|
|
9962
|
+
* values supplied by the host, every change is reported via a callback. The
|
|
9963
|
+
* component keeps no internal form state.
|
|
9964
|
+
*
|
|
9965
|
+
* Validation belongs to the host (SIN-01 + doctrine "the host decides"):
|
|
9966
|
+
* `canSave` is a host-computed boolean gating the save button, and
|
|
9967
|
+
* `titleError`/`contentError` are host-computed strings — this component
|
|
9968
|
+
* only *displays* an error, it never decides whether one exists. When an
|
|
9969
|
+
* error string is supplied, the matching field gets `aria-invalid="true"`
|
|
9970
|
+
* and `aria-describedby` pointing at the rendered error text; the field is
|
|
9971
|
+
* `aria-invalid="false"` otherwise, so the absence of an error is never
|
|
9972
|
+
* ambiguous.
|
|
9973
|
+
*
|
|
9974
|
+
* isSaving sets `aria-busy="true"` on the save button and disables both
|
|
9975
|
+
* actions — a save-in-progress is announced, never silent.
|
|
9976
|
+
*
|
|
9977
|
+
* data-slot="save-chat-as-memory-form" on the form root.
|
|
9978
|
+
* Bilingual: every user-facing string (labels/placeholders/errors/button
|
|
9979
|
+
* labels) is a required host-supplied prop — zero hardcoded copy, zero
|
|
9980
|
+
* default (SIN-01).
|
|
9981
|
+
*
|
|
9982
|
+
* No "use client" in source — prepend-use-client.mjs adds it to dist.
|
|
9983
|
+
* Design tokens: --border, --destructive, --foreground.
|
|
9984
|
+
*
|
|
9985
|
+
* @example
|
|
9986
|
+
* <MosaicSaveChatAsMemoryForm
|
|
9987
|
+
* title={title}
|
|
9988
|
+
* onTitleChange={setTitle}
|
|
9989
|
+
* titleLabel="Title"
|
|
9990
|
+
* titleError={titleError}
|
|
9991
|
+
* content={extractedContent}
|
|
9992
|
+
* onContentChange={setContent}
|
|
9993
|
+
* contentLabel="Content"
|
|
9994
|
+
* contentError={contentError}
|
|
9995
|
+
* tags={tags}
|
|
9996
|
+
* onAddTag={(t) => setTags((prev) => [...prev, t])}
|
|
9997
|
+
* onRemoveTag={(t) => setTags((prev) => prev.filter((x) => x !== t))}
|
|
9998
|
+
* tagsLabel="Tags"
|
|
9999
|
+
* tagInputPlaceholder="Add a tag…"
|
|
10000
|
+
* removeTagAriaLabel={(t) => `Remove ${t}`}
|
|
10001
|
+
* isSaving={isSaving}
|
|
10002
|
+
* canSave={canSave}
|
|
10003
|
+
* onSave={handleSave}
|
|
10004
|
+
* onCancel={() => setOpen(false)}
|
|
10005
|
+
* saveLabel="Save Memory"
|
|
10006
|
+
* savingLabel="Saving…"
|
|
10007
|
+
* cancelLabel="Cancel"
|
|
10008
|
+
* />
|
|
10009
|
+
*/
|
|
10010
|
+
interface MosaicSaveChatAsMemoryFormProps {
|
|
10011
|
+
/** Current memory title value — controlled. */
|
|
10012
|
+
title: string;
|
|
10013
|
+
/** Called on every keystroke in the title field. */
|
|
10014
|
+
onTitleChange: (value: string) => void;
|
|
10015
|
+
/** Label for the title field. Required, no default. */
|
|
10016
|
+
titleLabel: string;
|
|
10017
|
+
/** Placeholder for the title field. */
|
|
10018
|
+
titlePlaceholder?: string;
|
|
10019
|
+
/** Host-computed validation message for the title field, or absent when valid. */
|
|
10020
|
+
titleError?: string;
|
|
10021
|
+
/**
|
|
10022
|
+
* Host-supplied, pre-extracted content value — controlled. This component
|
|
10023
|
+
* never reads or summarizes the source thread; the host is the sole
|
|
10024
|
+
* source of the extracted text.
|
|
10025
|
+
*/
|
|
10026
|
+
content: string;
|
|
10027
|
+
/** Called on every keystroke in the content field. */
|
|
10028
|
+
onContentChange: (value: string) => void;
|
|
10029
|
+
/** Label for the content field. Required, no default. */
|
|
10030
|
+
contentLabel: string;
|
|
10031
|
+
/** Placeholder for the content field. */
|
|
10032
|
+
contentPlaceholder?: string;
|
|
10033
|
+
/** Host-computed validation message for the content field, or absent when valid. */
|
|
10034
|
+
contentError?: string;
|
|
10035
|
+
/** Current tag list — controlled, single source of truth owned by the host. */
|
|
10036
|
+
tags: string[];
|
|
10037
|
+
/** Called when a tag should be added. */
|
|
10038
|
+
onAddTag: (tag: string) => void;
|
|
10039
|
+
/** Called when a tag should be removed. */
|
|
10040
|
+
onRemoveTag: (tag: string) => void;
|
|
10041
|
+
/** Label for the tags field. Required, no default. */
|
|
10042
|
+
tagsLabel: string;
|
|
10043
|
+
/** Placeholder for the tag input. Required, no default. */
|
|
10044
|
+
tagInputPlaceholder: string;
|
|
10045
|
+
/** Per-tag accessible name for the remove button. Required, no default. */
|
|
10046
|
+
removeTagAriaLabel: (tag: string) => string;
|
|
10047
|
+
/** Optional host-supplied suggested tags. */
|
|
10048
|
+
suggestedTags?: string[];
|
|
10049
|
+
/** Optional maximum number of tags. */
|
|
10050
|
+
maxTags?: number;
|
|
10051
|
+
/** True while a save request is in flight — announced via aria-busy, disables both actions. */
|
|
10052
|
+
isSaving: boolean;
|
|
10053
|
+
/**
|
|
10054
|
+
* Host-computed form validity gating the save button. This component
|
|
10055
|
+
* never decides validation itself — it only reflects the host's verdict.
|
|
10056
|
+
*/
|
|
10057
|
+
canSave: boolean;
|
|
10058
|
+
/** Called when the host user saves the form. */
|
|
10059
|
+
onSave: () => void;
|
|
10060
|
+
/** Called when the host user clicks Cancel. */
|
|
10061
|
+
onCancel: () => void;
|
|
10062
|
+
/** Label for the save button while idle. Required, no default. */
|
|
10063
|
+
saveLabel: string;
|
|
10064
|
+
/** Label for the save button while isSaving=true. Required, no default. */
|
|
10065
|
+
savingLabel: string;
|
|
10066
|
+
/** Label for the cancel button. Required, no default. */
|
|
10067
|
+
cancelLabel: string;
|
|
10068
|
+
/** Additional Tailwind classes on the form root. */
|
|
10069
|
+
className?: string;
|
|
10070
|
+
}
|
|
10071
|
+
/**
|
|
10072
|
+
* MosaicSaveChatAsMemoryForm — production "save this thread as a memory"
|
|
10073
|
+
* form for @vantageos/mosaic-blocks.
|
|
10074
|
+
*
|
|
10075
|
+
* Purely presentational and fully controlled: composes MosaicInput +
|
|
10076
|
+
* MosaicTextarea + MosaicTagInput. No network call, no extraction logic, no
|
|
10077
|
+
* built-in validation, no built-in copy.
|
|
10078
|
+
*/
|
|
10079
|
+
declare function MosaicSaveChatAsMemoryForm({ title, onTitleChange, titleLabel, titlePlaceholder, titleError, content, onContentChange, contentLabel, contentPlaceholder, contentError, tags, onAddTag, onRemoveTag, tagsLabel, tagInputPlaceholder, removeTagAriaLabel, suggestedTags, maxTags, isSaving, canSave, onSave, onCancel, saveLabel, savingLabel, cancelLabel, className, }: MosaicSaveChatAsMemoryFormProps): React.JSX.Element;
|
|
10080
|
+
declare namespace MosaicSaveChatAsMemoryForm {
|
|
10081
|
+
var displayName: string;
|
|
10082
|
+
}
|
|
10083
|
+
|
|
10084
|
+
/**
|
|
10085
|
+
* saveChatAsMemoryFormVariants — pure CVA variant functions for
|
|
10086
|
+
* MosaicSaveChatAsMemoryForm.
|
|
10087
|
+
*
|
|
10088
|
+
* Isolated in their own module so they can be re-exported from the
|
|
10089
|
+
* `@vantageos/mosaic-blocks/server` subpath without pulling in React.
|
|
10090
|
+
*
|
|
10091
|
+
* Zero browser / React runtime dependencies — safe in RSC / Node.js.
|
|
10092
|
+
*/
|
|
10093
|
+
/** Form vertical layout. */
|
|
10094
|
+
declare const saveChatAsMemoryFormRootVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
10095
|
+
/** Field group (label + control + helper/error) vertical layout. */
|
|
10096
|
+
declare const saveChatAsMemoryFormFieldVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
10097
|
+
/** Field error text. */
|
|
10098
|
+
declare const saveChatAsMemoryFormErrorVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
10099
|
+
/** Footer action row. */
|
|
10100
|
+
declare const saveChatAsMemoryFormFooterVariants: (props?: class_variance_authority_types.ClassProp | undefined) => string;
|
|
10101
|
+
/** Save / cancel button variants by intent. */
|
|
10102
|
+
declare const saveChatAsMemoryFormButtonVariants: (props?: ({
|
|
10103
|
+
intent?: "cancel" | "save" | null | undefined;
|
|
10104
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
10105
|
+
|
|
10106
|
+
export { type Breakpoint, type DeviceContextValue, type Feature3ColItem, type FeatureItem, type FooterColumn, type FooterLink, type HeroCta, type LogoItem, MosaicAccordion, MosaicAccordionItem, type MosaicAccordionItemProps, MosaicAccordionPanel, type MosaicAccordionPanelProps, type MosaicAccordionProps, MosaicAccordionTrigger, type MosaicAccordionTriggerProps, type MosaicActionAccent, type MosaicActivity, MosaicActivityFeed, type MosaicActivityFeedProps, MosaicActivityItem, type MosaicActivityItemProps, type MosaicActivityStatus, MosaicAdaptiveGrid, type MosaicAdaptiveGridProps, MosaicAdaptiveModal, type MosaicAdaptiveModalProps, MosaicAdaptiveNavigation, type MosaicAdaptiveNavigationProps, MosaicAddMemoryForm, type MosaicAddMemoryFormProps, MosaicAgentBuilderModal, type MosaicAgentBuilderModalProps, MosaicAgentCard, type MosaicAgentCardProps, MosaicAgentChat, type MosaicAgentChatApprovalLabels, type MosaicAgentChatApprovalRequest, type MosaicAgentChatApprovalResponsePayload, type MosaicAgentChatMessage, type MosaicAgentChatMessagePart, type MosaicAgentChatProps, type MosaicAgentChatState, type MosaicAgentChatToolPart, type MosaicAgentChatToolPartState, MosaicAgentComposer, MosaicAgentComposerDesktop, MosaicAgentComposerMobile, type MosaicAgentComposerMobileProps, type MosaicAgentComposerProps, type MosaicAgentData, MosaicAgentEditor, type MosaicAgentEditorProps, MosaicAgentList, AgentListDesktop as MosaicAgentListDesktop, AgentListMobile as MosaicAgentListMobile, type MosaicAgentListProps, type MosaicAgentPreset, MosaicAgentPreview, type MosaicAgentPreviewAttribute, type MosaicAgentPreviewDetailedProps, type MosaicAgentPreviewProps, type MosaicAgentPreviewSummaryProps, MosaicAgentTeamPreview, type MosaicAgentTeamPreviewProps, MosaicAlertDialog, MosaicAlertDialogAction, type MosaicAlertDialogActionProps, MosaicAlertDialogCancel, type MosaicAlertDialogCancelProps, MosaicAlertDialogContent, type MosaicAlertDialogContentProps, MosaicAlertDialogDescription, type MosaicAlertDialogDescriptionProps, MosaicAlertDialogFooter, MosaicAlertDialogHeader, MosaicAlertDialogOverlay, type MosaicAlertDialogOverlayProps, MosaicAlertDialogPortal, MosaicAlertDialogTitle, type MosaicAlertDialogTitleProps, MosaicAlertDialogTrigger, MosaicAnimatedList, type MosaicAnimatedListProps, MosaicApiKeyPanel, type MosaicApiKeyPanelProps, type MosaicApiKeyPanelProvider, type MosaicApiKeyPanelState, MosaicAppSidebar, type MosaicAppSidebarProps, MosaicApprovalPrompt, type MosaicApprovalPromptProps, type MosaicApprovalPromptState, MosaicAvatar, type MosaicAvatarProps, MosaicBadge, type MosaicBadgeProps, MosaicBlurredOrb, type MosaicBlurredOrbProps, type MosaicBreadcrumb, MosaicButton, type MosaicButtonProps, MosaicCard, MosaicCardContent, type MosaicCardContentProps, MosaicCardDescription, type MosaicCardDescriptionProps, MosaicCardFooter, type MosaicCardFooterProps, MosaicCardHeader, type MosaicCardHeaderProps, type MosaicCardProps, MosaicCardTitle, type MosaicCardTitleProps, MosaicChatComposer, type MosaicChatComposerProps, type MosaicChatComposerState, MosaicChatMessage, type MosaicChatMessageAttachmentPart, type MosaicChatMessagePart, type MosaicChatMessageProps, type MosaicChatMessageReasoningPart, type MosaicChatMessageSenderRole, type MosaicChatMessageTextPart, type MosaicChatMessageToolPart, type MosaicChatMessageToolState, type MosaicChatMessageToolStatusLabels, MosaicChatSidebar, type MosaicChatSidebarProps, MosaicChatThread, type MosaicChatThreadProps, MosaicCheckbox, type MosaicCheckboxProps, type MosaicClerkMembership, MosaicClerkOrgSwitcher, type MosaicClerkOrgSwitcherProps, type MosaicClerkOrganization, MosaicClerkWebhookHandler, type MosaicClerkWebhookHandlerOptions, MosaicCollapsible, MosaicCollapsiblePanel, type MosaicCollapsiblePanelProps, type MosaicCollapsibleProps, MosaicCollapsibleTrigger, type MosaicCollapsibleTriggerProps, MosaicCombobox, type MosaicComboboxItem, type MosaicComboboxProps, type MosaicComposerModel, type MosaicComposerModule, MosaicCounter, type MosaicCounterProps, MosaicCreateOrgDialog, type MosaicCreateOrgDialogProps, MosaicDashboardContent, type MosaicDashboardContentProps, MosaicDashboardHeader, type MosaicDashboardHeaderProps, MosaicDashboardLayout, type MosaicDashboardLayoutProps, type MosaicDashboardView, MosaicDataTable, type MosaicDataTableColumn, type MosaicDataTablePagination, type MosaicDataTableProps, MosaicDeleteConfirmationDialog, type MosaicDeleteConfirmationDialogProps, MosaicDeviceProvider, type MosaicDeviceProviderProps, MosaicDocumentUpload, type MosaicDocumentUploadFile, type MosaicDocumentUploadFileStatus, type MosaicDocumentUploadProps, MosaicDrawer, type MosaicDrawerProps, MosaicDropdownMenu, type MosaicDropdownMenuItem, type MosaicDropdownMenuProps, MosaicEditMemoryDialog, type MosaicEditMemoryDialogProps, MosaicEditSessionDialog, type MosaicEditSessionDialogProps, MosaicEmptyState, type MosaicEmptyStateProps, MosaicFallingPattern, type MosaicFallingPatternProps, MosaicFeature3Col, type MosaicFeature3ColProps, MosaicFeatureCenteredMedia, type MosaicFeatureCenteredMediaProps, MosaicField, MosaicFieldControl, type MosaicFieldControlProps, MosaicFieldDescription, type MosaicFieldDescriptionProps, MosaicFieldError, type MosaicFieldErrorProps, MosaicFieldLabel, type MosaicFieldLabelProps, type MosaicFieldProps, MosaicFilterBar, type MosaicFilterBarProps, type MosaicFilterOption, MosaicFilterSidebar, type MosaicFilterSidebarProps, MosaicFooterSimple, type MosaicFooterSimpleProps, MosaicHeroSplit, type MosaicHeroSplitProps, MosaicInput, MosaicInputGroup, type MosaicInputGroupProps, type MosaicInputProps, MosaicIntegrationsBadge, type MosaicIntegrationsBadgeProps, MosaicInviteMemberDialog, type MosaicInviteMemberDialogProps, MosaicKanbanBoard, type MosaicKanbanBoardProps, MosaicKanbanColumn, type MosaicKanbanColumnProps, MosaicLogosGrid, type MosaicLogosGridProps, MosaicMainNav, type MosaicMainNavProps, MosaicMarkdown, type MosaicMarkdownProps, MosaicMarketplaceCard, type MosaicMarketplaceCardProps, type MosaicMarketplaceItem, MosaicMarketplaceList, MarketplaceListDesktop as MosaicMarketplaceListDesktop, MarketplaceListMobile as MosaicMarketplaceListMobile, type MosaicMarketplaceListProps, MosaicMemberList, type MosaicMemberListProps, MosaicMemoryCard, type MosaicMemoryCardProps, MosaicMemoryDashboard, type MosaicMemoryDashboardProps, type MosaicMemoryDashboardStat, type MosaicMemoryDashboardViewMode, type MosaicMemoryData, MosaicMemoryGrid, type MosaicMemoryGridProps, MosaicMemoryList, type MosaicMemoryListProps, type MosaicMemoryScope, MosaicMemorySearch, type MosaicMemorySearchFilter, type MosaicMemorySearchProps, type MosaicMemorySource, MosaicMentionInput, type MosaicMentionInputProps, type MosaicMessage, MosaicMessageCard, type MosaicMessageCardProps, MosaicMessageList, MessageListDesktop as MosaicMessageListDesktop, MessageListMobile as MosaicMessageListMobile, type MosaicMessageListProps, type MosaicMessageReactions, MosaicMessageSearch, type MosaicMessageSearchProps, type MosaicMessageSender, type MosaicMessageSenderType, type MosaicModelOption, MosaicModelSelector, type MosaicModelSelectorProps, MosaicModuleCard, type MosaicModuleCardProps, type MosaicModuleData, MosaicModuleForm, type MosaicModuleFormField, type MosaicModuleFormProps, type MosaicModuleItem, MosaicModuleLibrary, type MosaicModuleLibraryProps, type MosaicModuleType, MosaicMultiOrgIndicator, type MosaicMultiOrgIndicatorProps, MosaicMultiTenantProvider, type MosaicMultiTenantProviderProps, type MosaicNavItem, MosaicNavbar, type MosaicNavbarProps, type MosaicNavigationItem, type MosaicOrg, type MosaicOrgInfo, type MosaicOrgMember, MosaicOrgPanel, type MosaicOrgPanelProps, type MosaicOrgPanelTab, MosaicOrgProfilePage, type MosaicOrgProfilePageProps, type MosaicOrgRole, MosaicOrgRoleBadge, type MosaicOrgRoleBadgeProps, type MosaicOrgStats, MosaicOrgSwitcher, type MosaicOrgSwitcherProps, MosaicPdfViewer, type MosaicPdfViewerProps, MosaicPopover, type MosaicPopoverProps, type MosaicSelectItem as MosaicPrefSelectItem, type MosaicPreference, type MosaicPreferenceGroup, MosaicPreferencesPanel, type MosaicPreferencesPanelProps, MosaicPricingCard, type MosaicPricingCardProps, type MosaicProfileField, MosaicProfilePanel, type MosaicProfilePanelProps, MosaicProgress, type MosaicProgressProps, type MosaicQuickAction$1 as MosaicQuickAction, MosaicQuickActionCard, type MosaicQuickActionCardProps, MosaicQuickActionsMenu, type MosaicQuickAction as MosaicQuickActionsMenuItem, type MosaicQuickActionsMenuProps, type MosaicQuickAgent, MosaicQuickAgentSelector, type MosaicQuickAgentSelectorProps, MosaicQuickStartPanel, type MosaicQuickStartPanelProps, MosaicRadioGroup, MosaicRadioGroupItem, type MosaicRadioGroupItemProps, type MosaicRadioGroupProps, MosaicReplyInput, type MosaicReplyInputProps, MosaicResizableSplitPane, type MosaicResizableSplitPaneProps, MosaicSaveChatAsMemoryForm, type MosaicSaveChatAsMemoryFormProps, MosaicSaveTemplateModal, type MosaicSaveTemplateModalProps, type MosaicScenario, MosaicScrollArea, type MosaicScrollAreaProps, MosaicSelect, type MosaicSelectItem$1 as MosaicSelectItem, type MosaicSelectProps, type MosaicSelectorCategory, type MosaicSelectorItem, MosaicSelectorModal, type MosaicSelectorModalProps, MosaicSeparator, type MosaicSeparatorProps, MosaicSessionCard, type MosaicSessionCardInteractionProps, type MosaicSessionCardProps, type MosaicSessionCardVariantProps, type MosaicSessionData, MosaicSessionList, type MosaicSessionListLayout, type MosaicSessionListProps, type MosaicSessionStatus, type MosaicSidebarFooterStatus, type MosaicSidebarNavItem, type MosaicSidebarQuickAction, type MosaicSidebarRecentItem, MosaicSignInLayout, type MosaicSignInLayoutProps, MosaicSignUpLayout, type MosaicSignUpLayoutProps, MosaicSkeleton, type MosaicSkeletonProps, MosaicSlider, type MosaicSliderProps, type MosaicStatItem, MosaicStatsGrid, type MosaicStatsGridProps, type MosaicStep, MosaicStepPipeline, type MosaicStepPipelineDotsProps, type MosaicStepPipelineProps, type MosaicStepPipelineSegmentsProps, type MosaicStepStatus, MosaicSwitch, type MosaicSwitchProps, MosaicTabs, MosaicTabsList, type MosaicTabsListProps, MosaicTabsPanel, type MosaicTabsPanelProps, type MosaicTabsProps, MosaicTabsTrigger, type MosaicTabsTriggerProps, MosaicTagInput, type MosaicTagInputProps, type MosaicTemplate, type MosaicTemplateAgent, MosaicTemplateAgentCard, type MosaicTemplateAgentCardProps, type MosaicTemplateAgentData, MosaicTemplateCard, type MosaicTemplateCardProps, type MosaicTemplateCategory, MosaicTemplateCategoryChips, type MosaicTemplateCategoryChipsProps, MosaicTemplateGallery, type MosaicTemplateGalleryProps, MosaicTemplateList, type MosaicTemplateListProps, type MosaicTemplateManagementItem, MosaicTemplateManagementPanel, type MosaicTemplateManagementPanelProps, type MosaicTemplateMetadata, MosaicTemplatePreview, type MosaicTemplatePreviewProps, MosaicTestimonialsGrid, type MosaicTestimonialsGridProps, MosaicTextarea, type MosaicTextareaProps, MosaicThemeProvider, type MosaicThemeProviderProps, MosaicThemeToggle, type MosaicThemeToggleProps, MosaicThreadIndicator, type MosaicThreadIndicatorProps, type MosaicThreadIndicatorReplyStatus, MosaicThreadView, type MosaicThreadViewMessage, type MosaicThreadViewProps, MosaicToast, type MosaicToastProps, MosaicToastProvider, type MosaicToastProviderPosition, type MosaicToastProviderProps, type MosaicToastVariant, MosaicToolToggleList, type MosaicToolToggleListApprovalLevel, type MosaicToolToggleListProps, type MosaicToolToggleListSection, type MosaicToolToggleListTool, MosaicTooltip, MosaicTooltipContent, type MosaicTooltipContentProps, type MosaicTooltipProps, MosaicTooltipProvider, type MosaicTooltipProviderProps, MosaicTooltipRoot, type MosaicTooltipRootProps, MosaicTooltipTrigger, type MosaicTooltipTriggerProps, MosaicUrlScraper, type MosaicUrlScraperContent, type MosaicUrlScraperProps, type MosaicUrlScraperState, MosaicUserButton, type MosaicUserButtonProps, type MosaicWorkspaceContext, type NavCta, type NavLink, type OrbPosition, type Orientation, Placeholder, type PricingCta, type SocialLink, type StatItem, type TestimonialItem, type Theme, addMemoryFormButtonVariants, addMemoryFormErrorVariants, addMemoryFormFieldVariants, addMemoryFormFooterVariants, addMemoryFormRootVariants, agentBuilderModalBackdropVariants, agentBuilderModalPopupVariants, agentChatRootVariants, agentEditorVariants, agentPreviewVariants, alertDialogContentVariants, alertDialogOverlayVariants, badgeVariants, buttonVariants, chatMessageBubbleVariants, chatMessageContainerVariants, chatMessageToolStatusVariants, chatSidebarThreadVariants, drawerBackdropVariants, drawerPopupVariants, editMemoryDialogBackdropVariants, editMemoryDialogErrorVariants, editMemoryDialogFieldVariants, editMemoryDialogPopupVariants, editSessionDialogBodyVariants, editSessionDialogButtonVariants, editSessionDialogErrorVariants, editSessionDialogFieldVariants, editSessionDialogFooterVariants, marketplaceCardVariants, memoryDashboardViewToggleButtonVariants, memoryGridVariants, memoryListItemVariants, memoryListVariants, memorySearchFilterChipVariants, mentionInputFieldVariants, mentionListItemVariants, mentionListVariants, pdfViewerFrameVariants, pdfViewerStatusVariants, pdfViewerToolbarButtonVariants, popoverPopupVariants, replyInputActionButtonVariants, replyInputContextVariants, replyInputRootVariants, replyInputTextareaVariants, saveChatAsMemoryFormButtonVariants, saveChatAsMemoryFormErrorVariants, saveChatAsMemoryFormFieldVariants, saveChatAsMemoryFormFooterVariants, saveChatAsMemoryFormRootVariants, saveTemplateModalBodyVariants, saveTemplateModalButtonVariants, saveTemplateModalErrorVariants, saveTemplateModalFieldVariants, saveTemplateModalFooterVariants, sessionCardVariants, sessionListItemVariants, sessionListVariants, skeletonVariants, splitPaneCollapseButtonVariants, splitPaneHandleVariants, splitPaneRootVariants, tagInputFieldVariants, tagInputRemoveButtonVariants, tagInputRootVariants, tagInputTagVariants, templateAgentCardBadgeVariants, templateAgentCardTagVariants, templateAgentCardVariants, templateCategoryChipVariants, templateListVariants, templateManagementRowVariants, threadIndicatorCountVariants, threadIndicatorRootVariants, threadViewEmptyVariants, threadViewRepliesVariants, threadViewReplyVariants, threadViewRootMessageVariants, threadViewRootVariants, toastCardVariants, toastDismissButtonVariants, toastProviderPositionVariants, toastTitleVariants, toolToggleListRowVariants, toolToggleListSectionVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };
|