@vantageos/mosaic-blocks 0.5.1-alpha → 0.5.7-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/dist/index.d.cts CHANGED
@@ -20,7 +20,7 @@ import { Switch } from '@base-ui/react/switch';
20
20
  export { Tooltip } from '@base-ui/react/tooltip';
21
21
  import 'class-variance-authority/types';
22
22
 
23
- declare const version = "0.5.1-alpha";
23
+ declare const version = "0.5.7-alpha";
24
24
 
25
25
  /**
26
26
  * Placeholder component — infra scaffold only.
@@ -5464,4 +5464,211 @@ declare namespace MosaicChatThread {
5464
5464
  var displayName: string;
5465
5465
  }
5466
5466
 
5467
- 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, MosaicAgentCard, type MosaicAgentCardProps, MosaicAgentComposer, MosaicAgentComposerDesktop, MosaicAgentComposerMobile, type MosaicAgentComposerMobileProps, type MosaicAgentComposerProps, type MosaicAgentData, MosaicAgentList, AgentListDesktop as MosaicAgentListDesktop, AgentListMobile as MosaicAgentListMobile, type MosaicAgentListProps, type MosaicAgentPreset, MosaicAgentTeamPreview, type MosaicAgentTeamPreviewProps, MosaicAnimatedList, type MosaicAnimatedListProps, MosaicAppSidebar, type MosaicAppSidebarProps, 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, 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, MosaicDropdownMenu, type MosaicDropdownMenuItem, type MosaicDropdownMenuProps, 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, type MosaicMarketplaceItem, MosaicMarketplaceList, MarketplaceListDesktop as MosaicMarketplaceListDesktop, MarketplaceListMobile as MosaicMarketplaceListMobile, type MosaicMarketplaceListProps, MosaicMemberList, type MosaicMemberListProps, MosaicMemoryCard, type MosaicMemoryCardProps, type MosaicMemoryData, type MosaicMemoryScope, type MosaicMemorySource, type MosaicMessage, MosaicMessageCard, type MosaicMessageCardProps, MosaicMessageList, MessageListDesktop as MosaicMessageListDesktop, MessageListMobile as MosaicMessageListMobile, type MosaicMessageListProps, type MosaicMessageReactions, type MosaicMessageSender, type MosaicMessageSenderType, 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, 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, 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, type MosaicTemplate, type MosaicTemplateAgent, MosaicTemplateCard, type MosaicTemplateCardProps, MosaicTemplateGallery, type MosaicTemplateGalleryProps, type MosaicTemplateMetadata, MosaicTemplatePreview, type MosaicTemplatePreviewProps, MosaicTestimonialsGrid, type MosaicTestimonialsGridProps, MosaicTextarea, type MosaicTextareaProps, MosaicThemeProvider, type MosaicThemeProviderProps, MosaicThemeToggle, type MosaicThemeToggleProps, 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, badgeVariants, buttonVariants, skeletonVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };
5467
+ /**
5468
+ * MosaicChatComposer — presentational, controlled chat input + send/stop button
5469
+ *
5470
+ * Presentational atom. Renders a multi-line, auto-growing textarea plus a
5471
+ * single action button whose ROLE flips between "send" and "stop" depending
5472
+ * on `status` — the STOP button (cancel the in-flight agent response) is the
5473
+ * library's differentiator versus a plain send-only composer. The component
5474
+ * performs no network call and holds no message state: the current text is
5475
+ * fully host-controlled (`value` + `onValueChange`), and both `onSubmit(text)`
5476
+ * (idle) and `onStop()` (responding) are pure prop callbacks.
5477
+ *
5478
+ * Local behaviour (no network involved): Enter (without Shift) submits the
5479
+ * trimmed value while `status === "idle"`; Shift+Enter inserts a newline; the
5480
+ * textarea auto-grows with the content up to a max height, then scrolls.
5481
+ *
5482
+ * Pattern: MosaicUrlScraper.tsx (data-slot, inline cn, React 19 ref prop,
5483
+ * displayName, JSDoc, pure variants module, host-controlled status union as
5484
+ * a discriminated prop type).
5485
+ * No "use client" — prepend-use-client.mjs adds it to dist.
5486
+ * Design tokens: --foreground, --background, --muted-foreground, --border,
5487
+ * --ring, --card.
5488
+ * No icon library — plain glyphs ("↑" send / "■" stop), matching the
5489
+ * document-upload / url-scraper convention (no lucide-react runtime
5490
+ * dependency). Glyphs are `aria-hidden`; the accessible name comes from the
5491
+ * required `sendButtonAriaLabel` / `stopButtonAriaLabel` props.
5492
+ * a11y: the textarea has a required accessible name (`textareaAriaLabel`);
5493
+ * the action button's accessible name flips with `status`; an
5494
+ * `aria-live="polite"` region announces the current action-button label so
5495
+ * an assistive-technology user is told when send becomes stop (and back).
5496
+ * Bilingual: every user-facing string (`textareaAriaLabel`, `placeholder`,
5497
+ * `sendButtonAriaLabel`, `stopButtonAriaLabel`) is a required caller-supplied
5498
+ * prop — zero hardcoded copy, zero default.
5499
+ *
5500
+ * Props are pushed into the `MosaicChatComposerState` discriminated union
5501
+ * exactly where they are read: `onSubmit`/`sendButtonAriaLabel` only exist on
5502
+ * the "idle" variant (the send button, and the only branch Enter submits
5503
+ * from); `onStop`/`stopButtonAriaLabel` only exist on the "responding"
5504
+ * variant (the stop button) — declaring `stopButtonAriaLabel` on the base
5505
+ * props would force every host to supply a label that is never displayed
5506
+ * while idle, which is exactly the "lying prop contract" this library
5507
+ * forbids.
5508
+ *
5509
+ * Ported from any-eve-tpl components/chat/composer.tsx (rewritten from
5510
+ * scratch — no shared code, no license carried over): dropped the
5511
+ * `disabledReason`/`isPreparing`/tooltip-wrapping/character-limit business
5512
+ * logic (app-specific), kept the textarea + auto-submit-on-Enter + send/stop
5513
+ * action shape, and promoted the STOP button from "one branch among three"
5514
+ * to a first-class discriminated state (host-controlled, not a boolean
5515
+ * `isBusy` prop carrying unused fields).
5516
+ *
5517
+ * @example
5518
+ * // idle — can submit
5519
+ * <MosaicChatComposer
5520
+ * status="idle"
5521
+ * value={value}
5522
+ * onValueChange={setValue}
5523
+ * onSubmit={(text) => send(text)}
5524
+ * textareaAriaLabel="Message à eve"
5525
+ * placeholder="Demandez ce que vous voulez à eve..."
5526
+ * sendButtonAriaLabel="Envoyer le message"
5527
+ * />
5528
+ *
5529
+ * @example
5530
+ * // responding — can stop (the differentiator)
5531
+ * <MosaicChatComposer
5532
+ * {...baseProps}
5533
+ * status="responding"
5534
+ * onStop={() => abortResponse()}
5535
+ * stopButtonAriaLabel="Arrêter la réponse"
5536
+ * />
5537
+ */
5538
+
5539
+ /**
5540
+ * Base props required in EVERY status — read unconditionally by the
5541
+ * component regardless of `status` (the textarea itself, reachable from both
5542
+ * "idle" and "responding").
5543
+ */
5544
+ type MosaicChatComposerBaseProps = {
5545
+ /** Host-controlled current textarea value. */
5546
+ value: string;
5547
+ /** Called with the raw textarea value on every keystroke. */
5548
+ onValueChange: (value: string) => void;
5549
+ /** Accessible name for the textarea (`aria-label`). Required, no default. */
5550
+ textareaAriaLabel: string;
5551
+ /** Placeholder text for the textarea. Required, no default. */
5552
+ placeholder: string;
5553
+ /** Disables the textarea (e.g. host-level connectivity loss). */
5554
+ disabled?: boolean;
5555
+ /** Additional Tailwind classes on the root element. */
5556
+ className?: string;
5557
+ /** React 19 ref prop — forwarded to the root element. */
5558
+ ref?: React.Ref<HTMLFormElement>;
5559
+ };
5560
+ /**
5561
+ * Host-controlled composer status. `onSubmit` + `sendButtonAriaLabel` are
5562
+ * required only while the composer CAN send ("idle"); `onStop` +
5563
+ * `stopButtonAriaLabel` are required only while the agent IS responding
5564
+ * ("responding") — each field lives exactly on the branch that renders it.
5565
+ */
5566
+ type MosaicChatComposerState = {
5567
+ status: "idle";
5568
+ /** Called with the trimmed value on Enter (no Shift) or send-button click. */
5569
+ onSubmit: (text: string) => void;
5570
+ /** Accessible name for the send button. Required, no default. */
5571
+ sendButtonAriaLabel: string;
5572
+ } | {
5573
+ status: "responding";
5574
+ /** Called when the stop button is activated — the differentiator. */
5575
+ onStop: () => void;
5576
+ /** Accessible name for the stop button. Required, no default. */
5577
+ stopButtonAriaLabel: string;
5578
+ };
5579
+ type MosaicChatComposerProps = MosaicChatComposerBaseProps & MosaicChatComposerState;
5580
+ /**
5581
+ * MosaicChatComposer — production chat-input atom for
5582
+ * @vantageos/mosaic-blocks.
5583
+ *
5584
+ * Purely presentational: renders a controlled, auto-growing textarea and a
5585
+ * single action button whose role (send/stop) is driven by `status`. No
5586
+ * network call, no message history, no built-in copy.
5587
+ */
5588
+ declare function MosaicChatComposer(props: MosaicChatComposerProps): React.JSX.Element;
5589
+ declare namespace MosaicChatComposer {
5590
+ var displayName: string;
5591
+ }
5592
+
5593
+ /**
5594
+ * MosaicMarkdown — presentational, dependency-free markdown renderer
5595
+ *
5596
+ * Renders a subset of markdown (headings, paragraphs, ordered/unordered
5597
+ * lists, links, bold/italic, inline code, fenced code blocks, tables,
5598
+ * blockquotes, horizontal rules) straight from a `content: string` prop.
5599
+ *
5600
+ * SECURITY — non-negotiable: `content` is assumed to come from an untrusted
5601
+ * source (an LLM's own generated text). This component NEVER parses raw HTML
5602
+ * out of that string and NEVER uses `dangerouslySetInnerHTML`: every markdown
5603
+ * token is turned into React elements built from parsed TEXT, so anything
5604
+ * that looks like an HTML tag (`<script>…</script>`, `<img onerror=…>`) is
5605
+ * rendered as an inert text node, never as an active DOM element. Link
5606
+ * `href`s are scheme-checked (`http:`/`https:`/`mailto:`/relative only), after
5607
+ * every ASCII control character is stripped from the whole string (not just
5608
+ * the edges) so a scheme obfuscated with an internal control character (e.g.
5609
+ * a TAB inserted mid-`javascript:`) cannot slip past as scheme-less —
5610
+ * `javascript:`/`data:` and any other scheme are rejected and the link
5611
+ * degrades to its plain label text. Every external link renders with
5612
+ * `rel="noopener noreferrer"` and `target="_blank"`.
5613
+ *
5614
+ * DEPENDENCY POLICY: this library's `dependencies` are currently limited to
5615
+ * `@base-ui/react` and `class-variance-authority`. A full markdown renderer
5616
+ * (react-markdown, marked, remark, streamdown…) was deliberately NOT added
5617
+ * — none of them are declared here, in `dependencies` or otherwise. Instead
5618
+ * this file implements a minimal, dependency-free block + inline parser
5619
+ * covering the required subset. See this package's PR description for the
5620
+ * explicit statement of this choice.
5621
+ *
5622
+ * Code blocks: no syntax highlighter is bundled (would be a hidden
5623
+ * dependency and/or heavy runtime cost). The optional `renderCodeBlock` prop
5624
+ * is the host's extension point — pass a highlighter of your choice
5625
+ * (Shiki, Prism, etc.) and this component defers to it entirely; omit it and
5626
+ * a plain `<pre><code>` block is rendered.
5627
+ *
5628
+ * No "use client" — prepend-use-client.mjs adds it to dist. Presentational:
5629
+ * zero network calls, zero side effects beyond rendering.
5630
+ *
5631
+ * @example
5632
+ * <MosaicMarkdown content={"# Title\n\nSome **bold** text with a [link](https://example.com)."} />
5633
+ *
5634
+ * @example
5635
+ * // Host-provided syntax highlighting
5636
+ * <MosaicMarkdown
5637
+ * content={agentReply}
5638
+ * renderCodeBlock={({ language, code }) => <MyHighlighter language={language}>{code}</MyHighlighter>}
5639
+ * />
5640
+ */
5641
+
5642
+ interface MosaicMarkdownProps {
5643
+ /**
5644
+ * Markdown source to render. Treated as UNTRUSTED (e.g. straight from an
5645
+ * LLM reply): no raw HTML in this string is ever parsed as active markup.
5646
+ */
5647
+ content: string;
5648
+ /**
5649
+ * Extension point for fenced-code-block rendering (e.g. host-side syntax
5650
+ * highlighting). When omitted, code renders in a plain `<pre><code>` block
5651
+ * with no highlighting and no bundled highlighter dependency.
5652
+ */
5653
+ renderCodeBlock?: (props: {
5654
+ language: string | undefined;
5655
+ code: string;
5656
+ }) => React.ReactNode;
5657
+ /** Additional Tailwind classes on the root element. */
5658
+ className?: string;
5659
+ /** React 19 ref prop — forwarded to the root element. */
5660
+ ref?: React.Ref<HTMLDivElement>;
5661
+ }
5662
+ /**
5663
+ * MosaicMarkdown — production markdown-rendering atom for
5664
+ * @vantageos/mosaic-blocks.
5665
+ *
5666
+ * Purely presentational: parses `content` into a minimal block/inline AST and
5667
+ * renders it as React elements. No network call, no raw-HTML injection.
5668
+ */
5669
+ declare function MosaicMarkdown({ content, renderCodeBlock, className, ref }: MosaicMarkdownProps): React.JSX.Element;
5670
+ declare namespace MosaicMarkdown {
5671
+ var displayName: string;
5672
+ }
5673
+
5674
+ 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, MosaicAgentCard, type MosaicAgentCardProps, MosaicAgentComposer, MosaicAgentComposerDesktop, MosaicAgentComposerMobile, type MosaicAgentComposerMobileProps, type MosaicAgentComposerProps, type MosaicAgentData, MosaicAgentList, AgentListDesktop as MosaicAgentListDesktop, AgentListMobile as MosaicAgentListMobile, type MosaicAgentListProps, type MosaicAgentPreset, MosaicAgentTeamPreview, type MosaicAgentTeamPreviewProps, MosaicAnimatedList, type MosaicAnimatedListProps, MosaicAppSidebar, type MosaicAppSidebarProps, 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, 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, MosaicDropdownMenu, type MosaicDropdownMenuItem, type MosaicDropdownMenuProps, 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, type MosaicMarketplaceItem, MosaicMarketplaceList, MarketplaceListDesktop as MosaicMarketplaceListDesktop, MarketplaceListMobile as MosaicMarketplaceListMobile, type MosaicMarketplaceListProps, MosaicMemberList, type MosaicMemberListProps, MosaicMemoryCard, type MosaicMemoryCardProps, type MosaicMemoryData, type MosaicMemoryScope, type MosaicMemorySource, type MosaicMessage, MosaicMessageCard, type MosaicMessageCardProps, MosaicMessageList, MessageListDesktop as MosaicMessageListDesktop, MessageListMobile as MosaicMessageListMobile, type MosaicMessageListProps, type MosaicMessageReactions, type MosaicMessageSender, type MosaicMessageSenderType, 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, 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, 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, type MosaicTemplate, type MosaicTemplateAgent, MosaicTemplateCard, type MosaicTemplateCardProps, MosaicTemplateGallery, type MosaicTemplateGalleryProps, type MosaicTemplateMetadata, MosaicTemplatePreview, type MosaicTemplatePreviewProps, MosaicTestimonialsGrid, type MosaicTestimonialsGridProps, MosaicTextarea, type MosaicTextareaProps, MosaicThemeProvider, type MosaicThemeProviderProps, MosaicThemeToggle, type MosaicThemeToggleProps, 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, badgeVariants, buttonVariants, skeletonVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };
package/dist/index.d.ts CHANGED
@@ -20,7 +20,7 @@ import { Switch } from '@base-ui/react/switch';
20
20
  export { Tooltip } from '@base-ui/react/tooltip';
21
21
  import 'class-variance-authority/types';
22
22
 
23
- declare const version = "0.5.1-alpha";
23
+ declare const version = "0.5.7-alpha";
24
24
 
25
25
  /**
26
26
  * Placeholder component — infra scaffold only.
@@ -5464,4 +5464,211 @@ declare namespace MosaicChatThread {
5464
5464
  var displayName: string;
5465
5465
  }
5466
5466
 
5467
- 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, MosaicAgentCard, type MosaicAgentCardProps, MosaicAgentComposer, MosaicAgentComposerDesktop, MosaicAgentComposerMobile, type MosaicAgentComposerMobileProps, type MosaicAgentComposerProps, type MosaicAgentData, MosaicAgentList, AgentListDesktop as MosaicAgentListDesktop, AgentListMobile as MosaicAgentListMobile, type MosaicAgentListProps, type MosaicAgentPreset, MosaicAgentTeamPreview, type MosaicAgentTeamPreviewProps, MosaicAnimatedList, type MosaicAnimatedListProps, MosaicAppSidebar, type MosaicAppSidebarProps, 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, 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, MosaicDropdownMenu, type MosaicDropdownMenuItem, type MosaicDropdownMenuProps, 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, type MosaicMarketplaceItem, MosaicMarketplaceList, MarketplaceListDesktop as MosaicMarketplaceListDesktop, MarketplaceListMobile as MosaicMarketplaceListMobile, type MosaicMarketplaceListProps, MosaicMemberList, type MosaicMemberListProps, MosaicMemoryCard, type MosaicMemoryCardProps, type MosaicMemoryData, type MosaicMemoryScope, type MosaicMemorySource, type MosaicMessage, MosaicMessageCard, type MosaicMessageCardProps, MosaicMessageList, MessageListDesktop as MosaicMessageListDesktop, MessageListMobile as MosaicMessageListMobile, type MosaicMessageListProps, type MosaicMessageReactions, type MosaicMessageSender, type MosaicMessageSenderType, 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, 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, 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, type MosaicTemplate, type MosaicTemplateAgent, MosaicTemplateCard, type MosaicTemplateCardProps, MosaicTemplateGallery, type MosaicTemplateGalleryProps, type MosaicTemplateMetadata, MosaicTemplatePreview, type MosaicTemplatePreviewProps, MosaicTestimonialsGrid, type MosaicTestimonialsGridProps, MosaicTextarea, type MosaicTextareaProps, MosaicThemeProvider, type MosaicThemeProviderProps, MosaicThemeToggle, type MosaicThemeToggleProps, 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, badgeVariants, buttonVariants, skeletonVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };
5467
+ /**
5468
+ * MosaicChatComposer — presentational, controlled chat input + send/stop button
5469
+ *
5470
+ * Presentational atom. Renders a multi-line, auto-growing textarea plus a
5471
+ * single action button whose ROLE flips between "send" and "stop" depending
5472
+ * on `status` — the STOP button (cancel the in-flight agent response) is the
5473
+ * library's differentiator versus a plain send-only composer. The component
5474
+ * performs no network call and holds no message state: the current text is
5475
+ * fully host-controlled (`value` + `onValueChange`), and both `onSubmit(text)`
5476
+ * (idle) and `onStop()` (responding) are pure prop callbacks.
5477
+ *
5478
+ * Local behaviour (no network involved): Enter (without Shift) submits the
5479
+ * trimmed value while `status === "idle"`; Shift+Enter inserts a newline; the
5480
+ * textarea auto-grows with the content up to a max height, then scrolls.
5481
+ *
5482
+ * Pattern: MosaicUrlScraper.tsx (data-slot, inline cn, React 19 ref prop,
5483
+ * displayName, JSDoc, pure variants module, host-controlled status union as
5484
+ * a discriminated prop type).
5485
+ * No "use client" — prepend-use-client.mjs adds it to dist.
5486
+ * Design tokens: --foreground, --background, --muted-foreground, --border,
5487
+ * --ring, --card.
5488
+ * No icon library — plain glyphs ("↑" send / "■" stop), matching the
5489
+ * document-upload / url-scraper convention (no lucide-react runtime
5490
+ * dependency). Glyphs are `aria-hidden`; the accessible name comes from the
5491
+ * required `sendButtonAriaLabel` / `stopButtonAriaLabel` props.
5492
+ * a11y: the textarea has a required accessible name (`textareaAriaLabel`);
5493
+ * the action button's accessible name flips with `status`; an
5494
+ * `aria-live="polite"` region announces the current action-button label so
5495
+ * an assistive-technology user is told when send becomes stop (and back).
5496
+ * Bilingual: every user-facing string (`textareaAriaLabel`, `placeholder`,
5497
+ * `sendButtonAriaLabel`, `stopButtonAriaLabel`) is a required caller-supplied
5498
+ * prop — zero hardcoded copy, zero default.
5499
+ *
5500
+ * Props are pushed into the `MosaicChatComposerState` discriminated union
5501
+ * exactly where they are read: `onSubmit`/`sendButtonAriaLabel` only exist on
5502
+ * the "idle" variant (the send button, and the only branch Enter submits
5503
+ * from); `onStop`/`stopButtonAriaLabel` only exist on the "responding"
5504
+ * variant (the stop button) — declaring `stopButtonAriaLabel` on the base
5505
+ * props would force every host to supply a label that is never displayed
5506
+ * while idle, which is exactly the "lying prop contract" this library
5507
+ * forbids.
5508
+ *
5509
+ * Ported from any-eve-tpl components/chat/composer.tsx (rewritten from
5510
+ * scratch — no shared code, no license carried over): dropped the
5511
+ * `disabledReason`/`isPreparing`/tooltip-wrapping/character-limit business
5512
+ * logic (app-specific), kept the textarea + auto-submit-on-Enter + send/stop
5513
+ * action shape, and promoted the STOP button from "one branch among three"
5514
+ * to a first-class discriminated state (host-controlled, not a boolean
5515
+ * `isBusy` prop carrying unused fields).
5516
+ *
5517
+ * @example
5518
+ * // idle — can submit
5519
+ * <MosaicChatComposer
5520
+ * status="idle"
5521
+ * value={value}
5522
+ * onValueChange={setValue}
5523
+ * onSubmit={(text) => send(text)}
5524
+ * textareaAriaLabel="Message à eve"
5525
+ * placeholder="Demandez ce que vous voulez à eve..."
5526
+ * sendButtonAriaLabel="Envoyer le message"
5527
+ * />
5528
+ *
5529
+ * @example
5530
+ * // responding — can stop (the differentiator)
5531
+ * <MosaicChatComposer
5532
+ * {...baseProps}
5533
+ * status="responding"
5534
+ * onStop={() => abortResponse()}
5535
+ * stopButtonAriaLabel="Arrêter la réponse"
5536
+ * />
5537
+ */
5538
+
5539
+ /**
5540
+ * Base props required in EVERY status — read unconditionally by the
5541
+ * component regardless of `status` (the textarea itself, reachable from both
5542
+ * "idle" and "responding").
5543
+ */
5544
+ type MosaicChatComposerBaseProps = {
5545
+ /** Host-controlled current textarea value. */
5546
+ value: string;
5547
+ /** Called with the raw textarea value on every keystroke. */
5548
+ onValueChange: (value: string) => void;
5549
+ /** Accessible name for the textarea (`aria-label`). Required, no default. */
5550
+ textareaAriaLabel: string;
5551
+ /** Placeholder text for the textarea. Required, no default. */
5552
+ placeholder: string;
5553
+ /** Disables the textarea (e.g. host-level connectivity loss). */
5554
+ disabled?: boolean;
5555
+ /** Additional Tailwind classes on the root element. */
5556
+ className?: string;
5557
+ /** React 19 ref prop — forwarded to the root element. */
5558
+ ref?: React.Ref<HTMLFormElement>;
5559
+ };
5560
+ /**
5561
+ * Host-controlled composer status. `onSubmit` + `sendButtonAriaLabel` are
5562
+ * required only while the composer CAN send ("idle"); `onStop` +
5563
+ * `stopButtonAriaLabel` are required only while the agent IS responding
5564
+ * ("responding") — each field lives exactly on the branch that renders it.
5565
+ */
5566
+ type MosaicChatComposerState = {
5567
+ status: "idle";
5568
+ /** Called with the trimmed value on Enter (no Shift) or send-button click. */
5569
+ onSubmit: (text: string) => void;
5570
+ /** Accessible name for the send button. Required, no default. */
5571
+ sendButtonAriaLabel: string;
5572
+ } | {
5573
+ status: "responding";
5574
+ /** Called when the stop button is activated — the differentiator. */
5575
+ onStop: () => void;
5576
+ /** Accessible name for the stop button. Required, no default. */
5577
+ stopButtonAriaLabel: string;
5578
+ };
5579
+ type MosaicChatComposerProps = MosaicChatComposerBaseProps & MosaicChatComposerState;
5580
+ /**
5581
+ * MosaicChatComposer — production chat-input atom for
5582
+ * @vantageos/mosaic-blocks.
5583
+ *
5584
+ * Purely presentational: renders a controlled, auto-growing textarea and a
5585
+ * single action button whose role (send/stop) is driven by `status`. No
5586
+ * network call, no message history, no built-in copy.
5587
+ */
5588
+ declare function MosaicChatComposer(props: MosaicChatComposerProps): React.JSX.Element;
5589
+ declare namespace MosaicChatComposer {
5590
+ var displayName: string;
5591
+ }
5592
+
5593
+ /**
5594
+ * MosaicMarkdown — presentational, dependency-free markdown renderer
5595
+ *
5596
+ * Renders a subset of markdown (headings, paragraphs, ordered/unordered
5597
+ * lists, links, bold/italic, inline code, fenced code blocks, tables,
5598
+ * blockquotes, horizontal rules) straight from a `content: string` prop.
5599
+ *
5600
+ * SECURITY — non-negotiable: `content` is assumed to come from an untrusted
5601
+ * source (an LLM's own generated text). This component NEVER parses raw HTML
5602
+ * out of that string and NEVER uses `dangerouslySetInnerHTML`: every markdown
5603
+ * token is turned into React elements built from parsed TEXT, so anything
5604
+ * that looks like an HTML tag (`<script>…</script>`, `<img onerror=…>`) is
5605
+ * rendered as an inert text node, never as an active DOM element. Link
5606
+ * `href`s are scheme-checked (`http:`/`https:`/`mailto:`/relative only), after
5607
+ * every ASCII control character is stripped from the whole string (not just
5608
+ * the edges) so a scheme obfuscated with an internal control character (e.g.
5609
+ * a TAB inserted mid-`javascript:`) cannot slip past as scheme-less —
5610
+ * `javascript:`/`data:` and any other scheme are rejected and the link
5611
+ * degrades to its plain label text. Every external link renders with
5612
+ * `rel="noopener noreferrer"` and `target="_blank"`.
5613
+ *
5614
+ * DEPENDENCY POLICY: this library's `dependencies` are currently limited to
5615
+ * `@base-ui/react` and `class-variance-authority`. A full markdown renderer
5616
+ * (react-markdown, marked, remark, streamdown…) was deliberately NOT added
5617
+ * — none of them are declared here, in `dependencies` or otherwise. Instead
5618
+ * this file implements a minimal, dependency-free block + inline parser
5619
+ * covering the required subset. See this package's PR description for the
5620
+ * explicit statement of this choice.
5621
+ *
5622
+ * Code blocks: no syntax highlighter is bundled (would be a hidden
5623
+ * dependency and/or heavy runtime cost). The optional `renderCodeBlock` prop
5624
+ * is the host's extension point — pass a highlighter of your choice
5625
+ * (Shiki, Prism, etc.) and this component defers to it entirely; omit it and
5626
+ * a plain `<pre><code>` block is rendered.
5627
+ *
5628
+ * No "use client" — prepend-use-client.mjs adds it to dist. Presentational:
5629
+ * zero network calls, zero side effects beyond rendering.
5630
+ *
5631
+ * @example
5632
+ * <MosaicMarkdown content={"# Title\n\nSome **bold** text with a [link](https://example.com)."} />
5633
+ *
5634
+ * @example
5635
+ * // Host-provided syntax highlighting
5636
+ * <MosaicMarkdown
5637
+ * content={agentReply}
5638
+ * renderCodeBlock={({ language, code }) => <MyHighlighter language={language}>{code}</MyHighlighter>}
5639
+ * />
5640
+ */
5641
+
5642
+ interface MosaicMarkdownProps {
5643
+ /**
5644
+ * Markdown source to render. Treated as UNTRUSTED (e.g. straight from an
5645
+ * LLM reply): no raw HTML in this string is ever parsed as active markup.
5646
+ */
5647
+ content: string;
5648
+ /**
5649
+ * Extension point for fenced-code-block rendering (e.g. host-side syntax
5650
+ * highlighting). When omitted, code renders in a plain `<pre><code>` block
5651
+ * with no highlighting and no bundled highlighter dependency.
5652
+ */
5653
+ renderCodeBlock?: (props: {
5654
+ language: string | undefined;
5655
+ code: string;
5656
+ }) => React.ReactNode;
5657
+ /** Additional Tailwind classes on the root element. */
5658
+ className?: string;
5659
+ /** React 19 ref prop — forwarded to the root element. */
5660
+ ref?: React.Ref<HTMLDivElement>;
5661
+ }
5662
+ /**
5663
+ * MosaicMarkdown — production markdown-rendering atom for
5664
+ * @vantageos/mosaic-blocks.
5665
+ *
5666
+ * Purely presentational: parses `content` into a minimal block/inline AST and
5667
+ * renders it as React elements. No network call, no raw-HTML injection.
5668
+ */
5669
+ declare function MosaicMarkdown({ content, renderCodeBlock, className, ref }: MosaicMarkdownProps): React.JSX.Element;
5670
+ declare namespace MosaicMarkdown {
5671
+ var displayName: string;
5672
+ }
5673
+
5674
+ 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, MosaicAgentCard, type MosaicAgentCardProps, MosaicAgentComposer, MosaicAgentComposerDesktop, MosaicAgentComposerMobile, type MosaicAgentComposerMobileProps, type MosaicAgentComposerProps, type MosaicAgentData, MosaicAgentList, AgentListDesktop as MosaicAgentListDesktop, AgentListMobile as MosaicAgentListMobile, type MosaicAgentListProps, type MosaicAgentPreset, MosaicAgentTeamPreview, type MosaicAgentTeamPreviewProps, MosaicAnimatedList, type MosaicAnimatedListProps, MosaicAppSidebar, type MosaicAppSidebarProps, 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, 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, MosaicDropdownMenu, type MosaicDropdownMenuItem, type MosaicDropdownMenuProps, 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, type MosaicMarketplaceItem, MosaicMarketplaceList, MarketplaceListDesktop as MosaicMarketplaceListDesktop, MarketplaceListMobile as MosaicMarketplaceListMobile, type MosaicMarketplaceListProps, MosaicMemberList, type MosaicMemberListProps, MosaicMemoryCard, type MosaicMemoryCardProps, type MosaicMemoryData, type MosaicMemoryScope, type MosaicMemorySource, type MosaicMessage, MosaicMessageCard, type MosaicMessageCardProps, MosaicMessageList, MessageListDesktop as MosaicMessageListDesktop, MessageListMobile as MosaicMessageListMobile, type MosaicMessageListProps, type MosaicMessageReactions, type MosaicMessageSender, type MosaicMessageSenderType, 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, 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, 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, type MosaicTemplate, type MosaicTemplateAgent, MosaicTemplateCard, type MosaicTemplateCardProps, MosaicTemplateGallery, type MosaicTemplateGalleryProps, type MosaicTemplateMetadata, MosaicTemplatePreview, type MosaicTemplatePreviewProps, MosaicTestimonialsGrid, type MosaicTestimonialsGridProps, MosaicTextarea, type MosaicTextareaProps, MosaicThemeProvider, type MosaicThemeProviderProps, MosaicThemeToggle, type MosaicThemeToggleProps, 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, badgeVariants, buttonVariants, skeletonVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };