@vantageos/mosaic-blocks 0.5.9-alpha → 0.5.12-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
  import * as class_variance_authority_types from 'class-variance-authority/types';
21
21
  export { Tooltip } from '@base-ui/react/tooltip';
22
22
 
23
- declare const version = "0.5.9-alpha";
23
+ declare const version = "0.5.12-alpha";
24
24
 
25
25
  /**
26
26
  * Placeholder component — infra scaffold only.
@@ -6035,4 +6035,337 @@ declare namespace MosaicApprovalPrompt {
6035
6035
  var displayName: string;
6036
6036
  }
6037
6037
 
6038
- 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, 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 MosaicChatMessagePart, type MosaicChatMessageProps, type MosaicChatMessageReasoningPart, type MosaicChatMessageSenderRole, type MosaicChatMessageTextPart, type MosaicChatMessageToolPart, type MosaicChatMessageToolState, type MosaicChatMessageToolStatusLabels, 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, chatMessageBubbleVariants, chatMessageContainerVariants, chatMessageToolStatusVariants, skeletonVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };
6038
+ /**
6039
+ * MosaicToolToggleList — presentational per-tool enable switch + approval
6040
+ * level selector, grouped into host-supplied sections.
6041
+ *
6042
+ * Differentiator (this is the whole point of the component): the tool
6043
+ * catalogue is DATA, not code. adam's `AgentForm.svelte` (builder-web)
6044
+ * hardcodes six tool checkboxes with zero approval concept
6045
+ * (`~/AgentForm.svelte:49-56,177-190`); this library has never heard of a
6046
+ * single tool name. `tools`, `approvalLevels` and `sections` are all
6047
+ * required props supplied by the host — a new tool, a renamed approval
6048
+ * level, or a reshuffled "Teamwork" section ships without touching this
6049
+ * package.
6050
+ *
6051
+ * One row per tool: name + description + enable/disable MosaicSwitch +
6052
+ * approval-level MosaicSelect-style combobox (built directly on
6053
+ * @base-ui/react/select here, same primitive as MosaicSelect, to keep the
6054
+ * per-row aria-label wiring local). Rows are grouped under host-supplied
6055
+ * section headings (`sections[].title`), each section listing the
6056
+ * `toolIds` it owns — the grouping shape itself (e.g. a "Teamwork" section
6057
+ * bundling the four VantagePeers tools) is a hosting decision, not a
6058
+ * library concept.
6059
+ *
6060
+ * Controlled component: no internal persisted state beyond the CHANGE
6061
+ * event flowing straight to `onToggleTool` / `onChangeApproval`. The host
6062
+ * owns `tools` and re-renders with the updated `enabled` /
6063
+ * `approvalLevelId` after handling the callback.
6064
+ *
6065
+ * No "use client" — prepend-use-client.mjs adds it to dist.
6066
+ * Design tokens: --foreground, --muted, --muted-foreground, --border,
6067
+ * --card, --background, --popover, --popover-foreground, --accent,
6068
+ * --accent-foreground, --ring.
6069
+ * a11y: each switch's accessible name is a required per-tool callback
6070
+ * prop (`toggleAriaLabel`); each approval selector's accessible name is
6071
+ * likewise a required per-tool callback prop (`approvalSelectAriaLabel`).
6072
+ * Approval options render with role="option" (base-ui Select.Item), the
6073
+ * trigger with role="combobox" — both managed by @base-ui/react/select.
6074
+ * Bilingual: every user-facing string (section titles, tool names/
6075
+ * descriptions, approval-level labels, aria-labels) is host-supplied data
6076
+ * or a required prop — zero hardcoded copy, zero default.
6077
+ *
6078
+ * @example
6079
+ * <MosaicToolToggleList
6080
+ * sections={[
6081
+ * { id: "teamwork", title: "Travail d'équipe", toolIds: ["send_message", "check_messages"] },
6082
+ * ]}
6083
+ * tools={[
6084
+ * { id: "send_message", name: "send_message", description: "Envoyer un message", enabled: true, approvalLevelId: "never" },
6085
+ * { id: "check_messages", name: "check_messages", description: "Vérifier les messages", enabled: false, approvalLevelId: "always" },
6086
+ * ]}
6087
+ * approvalLevels={[
6088
+ * { id: "never", label: "Ne jamais demander" },
6089
+ * { id: "always", label: "Demander à chaque appel" },
6090
+ * { id: "first", label: "Demander la première fois" },
6091
+ * ]}
6092
+ * onToggleTool={(toolId, enabled) => updateTool(toolId, { enabled })}
6093
+ * onChangeApproval={(toolId, levelId) => updateTool(toolId, { approvalLevelId: levelId })}
6094
+ * toggleAriaLabel={(toolName) => `Activer/désactiver ${toolName}`}
6095
+ * approvalSelectAriaLabel={(toolName) => `Niveau d'approbation pour ${toolName}`}
6096
+ * />
6097
+ */
6098
+
6099
+ /** One selectable approval level. Labels are host copy — no built-in set. */
6100
+ interface MosaicToolToggleListApprovalLevel {
6101
+ /** Stable identifier, matched against `tool.approvalLevelId`. */
6102
+ id: string;
6103
+ /** Host-supplied, host-localized display label. */
6104
+ label: string;
6105
+ }
6106
+ /** One tool row's data. The library knows nothing about any tool by name. */
6107
+ interface MosaicToolToggleListTool {
6108
+ /** Stable identifier, also referenced by `sections[].toolIds`. */
6109
+ id: string;
6110
+ /** Host-supplied display name (e.g. an MCP tool name). */
6111
+ name: string;
6112
+ /** Host-supplied short description of what the tool does. */
6113
+ description: string;
6114
+ /** Whether the tool is currently enabled. */
6115
+ enabled: boolean;
6116
+ /** Current approval level, matched against `approvalLevels[].id`. */
6117
+ approvalLevelId: string;
6118
+ }
6119
+ /**
6120
+ * A host-defined grouping of tools (e.g. "Teamwork" bundling the
6121
+ * VantagePeers tools). The section title and the grouping itself are
6122
+ * data — the library renders whatever grouping it is given.
6123
+ */
6124
+ interface MosaicToolToggleListSection {
6125
+ /** Stable identifier for the section. */
6126
+ id: string;
6127
+ /** Host-supplied, host-localized section heading. */
6128
+ title: string;
6129
+ /** Ordered ids of the tools that belong to this section. */
6130
+ toolIds: string[];
6131
+ }
6132
+ interface MosaicToolToggleListProps {
6133
+ /** Host-defined groupings of tools, rendered in order. */
6134
+ sections: MosaicToolToggleListSection[];
6135
+ /** Full open catalogue of tools — a PROP, never a library constant. */
6136
+ tools: MosaicToolToggleListTool[];
6137
+ /** Open catalogue of approval levels — a PROP, never a library constant. */
6138
+ approvalLevels: MosaicToolToggleListApprovalLevel[];
6139
+ /** Called when a tool's enable switch is toggled. */
6140
+ onToggleTool: (toolId: string, enabled: boolean) => void;
6141
+ /** Called when a tool's approval level is changed. */
6142
+ onChangeApproval: (toolId: string, approvalLevelId: string) => void;
6143
+ /** Per-tool accessible name for the enable/disable switch. Required, no default. */
6144
+ toggleAriaLabel: (toolName: string) => string;
6145
+ /** Per-tool accessible name for the approval-level selector. Required, no default. */
6146
+ approvalSelectAriaLabel: (toolName: string) => string;
6147
+ /** Additional Tailwind classes on the root element. */
6148
+ className?: string;
6149
+ /** React 19 ref prop — forwarded to the root element. */
6150
+ ref?: React.Ref<HTMLDivElement>;
6151
+ }
6152
+ /**
6153
+ * MosaicToolToggleList — production tool-permissions atom for
6154
+ * @vantageos/mosaic-blocks.
6155
+ *
6156
+ * Purely presentational: renders one row per tool (switch + approval
6157
+ * selector), grouped under host-supplied section headings, and reports
6158
+ * every change via callbacks. No network call, no internal persisted
6159
+ * state, no hardcoded tool catalogue.
6160
+ */
6161
+ declare function MosaicToolToggleList({ sections, tools, approvalLevels, onToggleTool, onChangeApproval, toggleAriaLabel, approvalSelectAriaLabel, className, ref, }: MosaicToolToggleListProps): React.JSX.Element;
6162
+ declare namespace MosaicToolToggleList {
6163
+ var displayName: string;
6164
+ }
6165
+
6166
+ /**
6167
+ * toolToggleListVariants — pure CVA variant functions for MosaicToolToggleList.
6168
+ *
6169
+ * Isolated in their own module so they can be re-exported from the
6170
+ * `@vantageos/mosaic-blocks/server` subpath without pulling in React.
6171
+ *
6172
+ * Zero browser / React runtime dependencies — safe in RSC / Node.js.
6173
+ */
6174
+ /** Section header container. */
6175
+ declare const toolToggleListSectionVariants: (props?: ({} & class_variance_authority_types.ClassProp) | undefined) => string;
6176
+ /** One tool row — enabled vs. disabled tone. */
6177
+ declare const toolToggleListRowVariants: (props?: ({
6178
+ enabled?: boolean | null | undefined;
6179
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
6180
+
6181
+ /**
6182
+ * MosaicApiKeyPanel — presentational "bring your own key" (BYOK) panel.
6183
+ *
6184
+ * Presentational atom. Renders per-provider tabs (data-driven — the host
6185
+ * supplies the provider list, never a hardcoded set), a masked
6186
+ * (`type="password"`) key input, a validate button, and one of four
6187
+ * host-controlled statuses: at rest (idle), validating, valid (with a
6188
+ * masked hint of the last 4 characters of an already-saved key), or
6189
+ * invalid (with a host-supplied error message). The component never
6190
+ * contacts any server or SDK: submitting the form calls the host callback
6191
+ * `onValidate(providerId, key)` — the host owns how the key is checked
6192
+ * against its provider (Vercel AI Gateway, OpenRouter, or anything else it
6193
+ * lists) and how long it takes.
6194
+ *
6195
+ * Security (non-negotiable, see JSDoc on each prop below): the raw key is
6196
+ * never logged, never written to storage by this library, and never
6197
+ * placed in any DOM attribute other than the password input's own
6198
+ * `value` (the same place any host-controlled `<input type="password">`
6199
+ * necessarily holds it while the user types). No `console.*` call touches
6200
+ * the key. Only the last 4 characters of an *already-saved* key are ever
6201
+ * displayed, and only because the host explicitly supplies them via
6202
+ * `savedKeyLastFour` on the "valid" branch — this component computes
6203
+ * nothing from a live key itself.
6204
+ *
6205
+ * Pattern: MosaicUrlScraper.tsx (data-slot, inline cn, React 19 ref prop,
6206
+ * displayName, JSDoc, pure variants module, host-controlled status union
6207
+ * as a discriminated prop type, per-branch required props).
6208
+ * No "use client" — prepend-use-client.mjs adds it to dist.
6209
+ * Design tokens: --foreground, --muted-foreground, --border, --destructive,
6210
+ * --ring, --accent, --card, --background.
6211
+ * No icon library.
6212
+ * a11y: the provider selector is a `role="radiogroup"` with a required
6213
+ * `tabsAriaLabel`; each tab is a `role="radio"` with `aria-checked`; the
6214
+ * key input has a required accessible name; the validating region uses
6215
+ * `role="status"`.
6216
+ * Bilingual: every user-facing string (tab labels/tabs aria-label/input
6217
+ * aria-label/validate button label/validating label/saved-key hint
6218
+ * label/remove button label/error message) is a required caller-supplied
6219
+ * prop — zero hardcoded copy, zero default.
6220
+ *
6221
+ * Ported from any-debate-ai (Eve) apps/web/src/lib/components/
6222
+ * ApiKeyDialog.svelte + apiKey.svelte.ts (rewritten from scratch — no
6223
+ * shared code, no license carried over): dropped the modal-dialog chrome,
6224
+ * the localStorage persistence (`modelKey` store — presentational
6225
+ * libraries never own storage, the host does), the hardcoded gateway/
6226
+ * openrouter provider table (now host-supplied `providers` data), and the
6227
+ * direct Convex `action` call (now the `onValidate` callback — this
6228
+ * library talks to no server). Kept: per-provider tab toggle, masked
6229
+ * input, validate/checking/error states, and the "last 4 characters of a
6230
+ * saved key" hint pattern.
6231
+ *
6232
+ * Props are pushed into the `MosaicApiKeyPanelState` discriminated union
6233
+ * exactly where they are read — no prop is required in a status branch
6234
+ * that never renders it (e.g. `validatingLabel` only exists on the
6235
+ * "validating" variant; `savedKeyLastFour`/`savedKeyHintLabel`/
6236
+ * `removeButtonLabel`/`onRemove` only on "valid"; `errorMessage` only on
6237
+ * "invalid").
6238
+ *
6239
+ * @example
6240
+ * // idle
6241
+ * <MosaicApiKeyPanel
6242
+ * status="idle"
6243
+ * providers={[
6244
+ * { id: "gateway", label: "Vercel AI Gateway", placeholder: "vck_…" },
6245
+ * { id: "openrouter", label: "OpenRouter", placeholder: "sk-or-v1-…" },
6246
+ * ]}
6247
+ * activeProviderId="gateway"
6248
+ * onProviderChange={setActiveProviderId}
6249
+ * tabsAriaLabel="Fournisseur de clé"
6250
+ * keyValue={draft}
6251
+ * onKeyChange={setDraft}
6252
+ * onValidate={(providerId, key) => validate(providerId, key)}
6253
+ * inputAriaLabel="Clé API"
6254
+ * validateButtonLabel="Valider et entrer"
6255
+ * />
6256
+ *
6257
+ * @example
6258
+ * // valid (a key is already saved)
6259
+ * <MosaicApiKeyPanel
6260
+ * {...baseProps}
6261
+ * status="valid"
6262
+ * savedKeyLastFour="a1b2"
6263
+ * savedKeyHintLabel={(lastFour) => `Une clé se terminant par …${lastFour} est enregistrée.`}
6264
+ * removeButtonLabel="Retirer"
6265
+ * onRemove={() => removeKey()}
6266
+ * />
6267
+ */
6268
+
6269
+ /** Host-supplied model-key provider (tab), e.g. Vercel AI Gateway / OpenRouter. */
6270
+ interface MosaicApiKeyPanelProvider {
6271
+ /** Stable provider identifier, e.g. "gateway" / "openrouter". */
6272
+ id: string;
6273
+ /** Tab label, displayed as-is. */
6274
+ label: string;
6275
+ /** Placeholder for the key input when this provider is active. */
6276
+ placeholder: string;
6277
+ }
6278
+ /**
6279
+ * Base props required in EVERY status — read unconditionally by the
6280
+ * component regardless of `status` (provider tabs + key input + submit
6281
+ * row, all reachable from "idle").
6282
+ */
6283
+ type MosaicApiKeyPanelBaseProps = {
6284
+ /** Host-supplied provider list. Data, never a hardcoded set. */
6285
+ providers: MosaicApiKeyPanelProvider[];
6286
+ /** `id` of the currently-selected provider (must match a `providers[].id`). */
6287
+ activeProviderId: string;
6288
+ /** Called with the provider `id` when a tab is activated. */
6289
+ onProviderChange: (providerId: string) => void;
6290
+ /** Accessible name for the provider tab group (`aria-label`). Required, no default. */
6291
+ tabsAriaLabel: string;
6292
+ /**
6293
+ * Host-controlled current key input value. Never persisted by this
6294
+ * library (no localStorage) — the host owns where, if anywhere, this
6295
+ * value is kept.
6296
+ */
6297
+ keyValue: string;
6298
+ /** Called with the raw input value on every keystroke. */
6299
+ onKeyChange: (key: string) => void;
6300
+ /**
6301
+ * Called with the active provider id and the trimmed key on submit.
6302
+ * The component performs no validation itself — the host decides how
6303
+ * the key is checked and how `status`/`errorMessage` are updated
6304
+ * afterward. Never call this with an empty key.
6305
+ */
6306
+ onValidate: (providerId: string, key: string) => void;
6307
+ /** Accessible name for the key input (`aria-label`). Required, no default. */
6308
+ inputAriaLabel: string;
6309
+ /** Label for the submit button when idle/ready. Required, no default. */
6310
+ validateButtonLabel: string;
6311
+ /** Additional Tailwind classes on the root element. */
6312
+ className?: string;
6313
+ /** React 19 ref prop — forwarded to the root element. */
6314
+ ref?: React.Ref<HTMLDivElement>;
6315
+ };
6316
+ /**
6317
+ * Host-controlled key-validation status. Every prop that is only ever
6318
+ * rendered in ONE status branch lives on that branch's variant — not on
6319
+ * the base props — so the type contract matches exactly what the
6320
+ * component reads.
6321
+ */
6322
+ type MosaicApiKeyPanelState = {
6323
+ status: "idle";
6324
+ } | {
6325
+ status: "validating";
6326
+ /** Message/label shown while status === "validating". Required, no default. */
6327
+ validatingLabel: string;
6328
+ } | {
6329
+ status: "valid";
6330
+ /**
6331
+ * Last 4 characters of an already-saved key, supplied by the host
6332
+ * (this library never derives this from a live key value itself —
6333
+ * it only ever displays what the host explicitly hands it).
6334
+ */
6335
+ savedKeyLastFour: string;
6336
+ /**
6337
+ * Host-localized hint text, e.g.
6338
+ * `(lastFour) => \`Key ending in …${lastFour} is saved.\``.
6339
+ * Required — no hardcoded string.
6340
+ */
6341
+ savedKeyHintLabel: (lastFour: string) => string;
6342
+ /** Label for the "remove saved key" button. Required, no default. */
6343
+ removeButtonLabel: string;
6344
+ /** Called when the "remove saved key" button is activated. */
6345
+ onRemove: () => void;
6346
+ } | {
6347
+ status: "invalid";
6348
+ /**
6349
+ * Host-provided, host-localized error message. The library never
6350
+ * generates its own error strings, and never derives one from the
6351
+ * rejected key — every occurrence is a distinct required value
6352
+ * supplied by the caller.
6353
+ */
6354
+ errorMessage: string;
6355
+ };
6356
+ type MosaicApiKeyPanelProps = MosaicApiKeyPanelBaseProps & MosaicApiKeyPanelState;
6357
+ /**
6358
+ * MosaicApiKeyPanel — production BYOK ("bring your own key") atom for
6359
+ * @vantageos/mosaic-blocks.
6360
+ *
6361
+ * Purely presentational: renders provider tabs, a masked key input, and
6362
+ * the current status (idle/validating/valid/invalid), and reports a
6363
+ * provider change / validate request / remove request via callbacks. No
6364
+ * network call, no storage, no key logging.
6365
+ */
6366
+ declare function MosaicApiKeyPanel(props: MosaicApiKeyPanelProps): React.JSX.Element;
6367
+ declare namespace MosaicApiKeyPanel {
6368
+ var displayName: string;
6369
+ }
6370
+
6371
+ 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, 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 MosaicChatMessagePart, type MosaicChatMessageProps, type MosaicChatMessageReasoningPart, type MosaicChatMessageSenderRole, type MosaicChatMessageTextPart, type MosaicChatMessageToolPart, type MosaicChatMessageToolState, type MosaicChatMessageToolStatusLabels, 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, 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, badgeVariants, buttonVariants, chatMessageBubbleVariants, chatMessageContainerVariants, chatMessageToolStatusVariants, skeletonVariants, toolToggleListRowVariants, toolToggleListSectionVariants, useBreakpoint, useDevice, useMosaicWorkspace as useEffectiveWorkspaceId, useIsDesktop, useIsMobile, useIsTablet, useMediaQuery, useMosaicWorkspace, useOrientation, useViewport, version };