@vantageos/mosaic-blocks 0.4.7-alpha → 0.4.9-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.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.4.7-alpha";
23
+ declare const version = "0.4.9-alpha";
24
24
 
25
25
  /**
26
26
  * Placeholder component — infra scaffold only.
@@ -2675,7 +2675,6 @@ interface MosaicAgentComposerProps {
2675
2675
  previewConfigLabel: string;
2676
2676
  customInstructionsPreviewLabel: string;
2677
2677
  selectAllModulesLabel: string;
2678
- requiredLabel: string;
2679
2678
  /** Fallback name shown in the preview when `agentName` is empty. Required, no default. */
2680
2679
  unnamedAgentLabel: string;
2681
2680
  }
@@ -2712,6 +2711,13 @@ declare namespace MosaicAgentComposerDesktop {
2712
2711
  interface MosaicAgentComposerMobileProps extends MosaicAgentComposerProps {
2713
2712
  /** Show loading state on submit button */
2714
2713
  isLoading?: boolean;
2714
+ /**
2715
+ * "Required" marker shown on a mandatory module slot. Declared HERE, not on
2716
+ * the shared MosaicAgentComposerProps, because only the mobile composer
2717
+ * renders it — the desktop one never does. (Moved by the
2718
+ * no-lying-prop-contract guard: a prop is required exactly where it is read.)
2719
+ */
2720
+ requiredLabel: string;
2715
2721
  /**
2716
2722
  * Required host-owned strings (mobile-only extras) — no default,
2717
2723
  * no fallback. The host owns the language (e.g. next-intl `t()`).
@@ -2881,10 +2887,6 @@ interface MosaicDeleteConfirmationDialogProps {
2881
2887
  onOpenChange: (open: boolean) => void;
2882
2888
  /** Called when the user confirms deletion */
2883
2889
  onConfirm: () => void;
2884
- /** Human-readable name of the item to be deleted */
2885
- itemName: string;
2886
- /** Type label shown in the title and button ("agent", "template", etc.). Required, no default. */
2887
- itemType: string;
2888
2890
  /** Dialog title. Required — the host owns the language, no default. */
2889
2891
  title: string;
2890
2892
  /** Dialog description. Required — the host owns the language, no default. */
@@ -3212,6 +3214,15 @@ declare namespace MosaicQuickAgentSelector {
3212
3214
  * required prop or a required formatter function — no optional prop with an
3213
3215
  * English default anywhere in this file.
3214
3216
  *
3217
+ * Props are pushed into the `MosaicMemoryCardVariantProps` discriminated
3218
+ * union exactly where they are read — no prop is required on a variant that
3219
+ * never renders it. `formatMoreTags` is required only on the `"detailed"`
3220
+ * (default) member: the `"compact"` variant drops the tags row entirely and
3221
+ * never calls it, so it is not part of `"compact"`'s member of the union
3222
+ * (fixed after being flagged as a "lying prop contract" by the
3223
+ * `no-lying-prop-contract` guard test — see that file and the memory-card's
3224
+ * own type definitions below).
3225
+ *
3215
3226
  * Closes T1 (bu-mcp memory wave) — mosaic-memory-card.
3216
3227
  *
3217
3228
  * @example
@@ -3258,15 +3269,12 @@ interface MosaicMemoryData {
3258
3269
  createdAt: number;
3259
3270
  usageCount: number;
3260
3271
  }
3261
- interface MosaicMemoryCardProps {
3272
+ /**
3273
+ * Props shared by both variants — read unconditionally regardless of
3274
+ * `variant`.
3275
+ */
3276
+ interface MosaicMemoryCardBaseProps {
3262
3277
  memory: MosaicMemoryData;
3263
- /**
3264
- * Layout density.
3265
- * - `"detailed"` (default): icon chip + tags row + labelled usage footer.
3266
- * - `"compact"`: condensed header row, no tags row, raw usage number.
3267
- * @default "detailed"
3268
- */
3269
- variant?: "detailed" | "compact";
3270
3278
  onEdit?: (memory: MosaicMemoryData) => void;
3271
3279
  onDelete?: (memoryId: string) => void;
3272
3280
  /** Label for the "edit" menu item. Required — host-owned, no default. */
@@ -3295,16 +3303,38 @@ interface MosaicMemoryCardProps {
3295
3303
  * Required — host-owned (e.g. `(count) => t("memory.usageCount", { count })`).
3296
3304
  */
3297
3305
  formatUsageCount: (count: number) => React.ReactNode;
3298
- /**
3299
- * Formatter producing the "+N" overflow caption when a memory has more
3300
- * than 3 tags. Only rendered in the detailed variant. Required —
3301
- * host-owned (e.g. `(count) => \`+\${count}\`` or a pluralized `t()` call).
3302
- */
3303
- formatMoreTags: (count: number) => React.ReactNode;
3304
3306
  className?: string;
3305
3307
  /** React 19 ref prop — forwarded to the root element. */
3306
3308
  ref?: React.Ref<HTMLDivElement>;
3307
3309
  }
3310
+ /**
3311
+ * Discriminated union on `variant` — the sole property that differs between
3312
+ * variants (`formatMoreTags`) is required EXACTLY on the branch that reads
3313
+ * it (`"detailed"`, the default), not on the shared base. The `"compact"`
3314
+ * variant never renders a tags row and therefore never calls
3315
+ * `formatMoreTags` — requiring it there would force every host to supply a
3316
+ * value the library never displays (a "lying prop contract"; see the
3317
+ * `no-lying-prop-contract` guard test and the file's changelog note below).
3318
+ */
3319
+ type MosaicMemoryCardVariantProps = {
3320
+ /**
3321
+ * Full-density layout: icon chip + tags row + labelled usage footer.
3322
+ * Default when omitted.
3323
+ * @default "detailed"
3324
+ */
3325
+ variant?: "detailed";
3326
+ /**
3327
+ * Formatter producing the "+N" overflow caption when a memory has more
3328
+ * than 3 tags. Only ever rendered in the detailed variant — required
3329
+ * here, not on `"compact"`. Host-owned (e.g. `(count) => \`+\${count}\``
3330
+ * or a pluralized `t()` call).
3331
+ */
3332
+ formatMoreTags: (count: number) => React.ReactNode;
3333
+ } | {
3334
+ /** Condensed list row, no tags row, no `formatMoreTags` call. */
3335
+ variant: "compact";
3336
+ };
3337
+ type MosaicMemoryCardProps = MosaicMemoryCardBaseProps & MosaicMemoryCardVariantProps;
3308
3338
  /**
3309
3339
  * MosaicMemoryCard — production memory-item card for @vantageos/mosaic-blocks.
3310
3340
  *
@@ -3312,7 +3342,7 @@ interface MosaicMemoryCardProps {
3312
3342
  * see file JSDoc for the exact desktop/mobile differences and how they were
3313
3343
  * modeled as `variant` + CVA compound variants rather than as two components.
3314
3344
  */
3315
- declare function MosaicMemoryCard({ memory, variant, onEdit, onDelete, editLabel, deleteLabel, moreActionsLabel, formatScope, formatTimeAgo, formatUsageCount, formatMoreTags, className, ref, }: MosaicMemoryCardProps): React.JSX.Element;
3345
+ declare function MosaicMemoryCard(props: MosaicMemoryCardProps): React.JSX.Element;
3316
3346
  declare namespace MosaicMemoryCard {
3317
3347
  var displayName: string;
3318
3348
  }
@@ -3934,9 +3964,9 @@ interface MosaicModuleLibraryProps {
3934
3964
  tagListAddPlaceholder: string;
3935
3965
  className?: string;
3936
3966
  }
3937
- interface MosaicModuleFormProps {
3967
+ /** Props shared by both form modes — read unconditionally. */
3968
+ interface MosaicModuleFormBaseProps {
3938
3969
  item?: MosaicModuleItem;
3939
- mode: "create" | "edit";
3940
3970
  formFields?: MosaicModuleFormField[];
3941
3971
  onSave: (data: Omit<MosaicModuleItem, "id"> | MosaicModuleItem) => void;
3942
3972
  onCancel: () => void;
@@ -3949,8 +3979,6 @@ interface MosaicModuleFormProps {
3949
3979
  namePlaceholder: string;
3950
3980
  descriptionPlaceholder: string;
3951
3981
  cancelLabel: string;
3952
- saveChangesLabel: string;
3953
- createItemLabel: string;
3954
3982
  /**
3955
3983
  * Placeholder for the "add a tag" input in `tag-list` fields (used only
3956
3984
  * when the field itself doesn't set its own `placeholder`). Required,
@@ -3958,7 +3986,25 @@ interface MosaicModuleFormProps {
3958
3986
  */
3959
3987
  tagListAddPlaceholder: string;
3960
3988
  }
3961
- declare function MosaicModuleForm({ item, mode, formFields, onSave, onCancel, nameFieldLabel, descriptionFieldLabel, namePlaceholder, descriptionPlaceholder, cancelLabel, saveChangesLabel, createItemLabel, tagListAddPlaceholder, }: MosaicModuleFormProps): React.JSX.Element;
3989
+ /**
3990
+ * Discriminated union on `mode`. The submit button renders EXACTLY ONE label:
3991
+ * `createItemLabel` in "create", `saveChangesLabel` in "edit". Requiring both
3992
+ * in both modes forced every host to supply a string the form never displays —
3993
+ * a "lying prop contract", found by the `no-lying-prop-contract` guard (the
3994
+ * same defect class as MosaicMemoryCard's `formatMoreTags`). Each label now
3995
+ * lives on the branch that actually renders it.
3996
+ */
3997
+ type MosaicModuleFormModeProps = {
3998
+ mode: "create";
3999
+ /** Submit-button label in create mode. Required here — not in "edit". */
4000
+ createItemLabel: string;
4001
+ } | {
4002
+ mode: "edit";
4003
+ /** Submit-button label in edit mode. Required here — not in "create". */
4004
+ saveChangesLabel: string;
4005
+ };
4006
+ type MosaicModuleFormProps = MosaicModuleFormBaseProps & MosaicModuleFormModeProps;
4007
+ declare function MosaicModuleForm(props: MosaicModuleFormProps): React.JSX.Element;
3962
4008
  declare namespace MosaicModuleForm {
3963
4009
  var displayName: string;
3964
4010
  }
@@ -5153,4 +5199,188 @@ declare namespace MosaicDocumentUpload {
5153
5199
  var displayName: string;
5154
5200
  }
5155
5201
 
5156
- 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, 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, 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 };
5202
+ /**
5203
+ * MosaicUrlScraper — presentational URL-input + scraped-content preview
5204
+ *
5205
+ * Presentational atom. Renders a URL input + submit button and, below it,
5206
+ * one of three host-controlled states: a loading indicator, a scraped
5207
+ * content preview (title/description/optional image/link), or an error
5208
+ * message. The component never performs a network call: submitting a
5209
+ * syntactically-valid URL is surfaced via `onScrape(url: string)` — the
5210
+ * host owns how the page is actually fetched/scraped, how long it takes,
5211
+ * and what counts as an error (invalid URL, unreachable page, empty
5212
+ * content are all just different host-supplied `errorMessage` values).
5213
+ *
5214
+ * Local behaviour (no network involved): a client-side URL-syntax check via
5215
+ * `new URL()` runs on submit so a malformed URL is caught immediately
5216
+ * without a host round-trip. This mirrors the source app's own
5217
+ * `isValidUrl` check — it is UI validation, not a scrape.
5218
+ *
5219
+ * Pattern: MosaicDocumentUpload.tsx (data-slot, inline cn, React 19 ref
5220
+ * prop, displayName, JSDoc, pure variants module, host-controlled status
5221
+ * union as a discriminated prop type).
5222
+ * No "use client" — prepend-use-client.mjs adds it to dist.
5223
+ * Design tokens: --foreground, --muted, --muted-foreground, --border,
5224
+ * --destructive, --ring, --accent, --card, --background.
5225
+ * No icon library — uses a plain "↗" glyph for the external link, matching
5226
+ * the document-upload convention (no lucide-react runtime dependency).
5227
+ * a11y: input has a required accessible name; the external link has a
5228
+ * required per-content accessible name; the loading region uses
5229
+ * role="status".
5230
+ * Bilingual: every user-facing string (placeholder/button labels/loading
5231
+ * message/invalid-URL message/error message/reset label/link+image
5232
+ * accessible names) is a required caller-supplied prop — zero hardcoded
5233
+ * copy, zero default.
5234
+ *
5235
+ * Ported from any-debate-ai components/memory/url-scraper.tsx (rewritten
5236
+ * from scratch — no shared code, no license carried over): dropped the
5237
+ * embedded mock "AI-extracted memories" review UI (app-specific business
5238
+ * logic, same call as document-upload's dropped mock-extraction review)
5239
+ * and the network/simulation logic (violates presentational-component
5240
+ * rule), kept the URL input + scrape action + scraped-content preview +
5241
+ * error-state shape.
5242
+ *
5243
+ * Props are pushed into the `MosaicUrlScraperState` discriminated union
5244
+ * exactly where they are read — no prop is required in a status branch
5245
+ * that never renders it (e.g. `loadingMessage` only exists on the
5246
+ * "loading" variant, `content`/`resetButtonLabel`/`onReset` only on
5247
+ * "success", etc.). Known, documented exception: `imageAlt` is required
5248
+ * on the whole "success" branch, not narrowed further by
5249
+ * `content.image` presence — see the prop's own JSDoc.
5250
+ *
5251
+ * @example
5252
+ * // idle
5253
+ * <MosaicUrlScraper
5254
+ * status="idle"
5255
+ * url={url}
5256
+ * onUrlChange={setUrl}
5257
+ * onScrape={(scrapedUrl) => scrapePage(scrapedUrl)}
5258
+ * inputAriaLabel="URL de la page à aspirer"
5259
+ * inputPlaceholder="https://exemple.com/article"
5260
+ * scrapeButtonLabel="Aspirer"
5261
+ * invalidUrlMessage="Veuillez saisir une URL valide"
5262
+ * />
5263
+ *
5264
+ * @example
5265
+ * // success
5266
+ * <MosaicUrlScraper
5267
+ * {...baseProps}
5268
+ * status="success"
5269
+ * content={content}
5270
+ * openLinkAriaLabel={(pageUrl) => `Ouvrir ${pageUrl} dans un nouvel onglet`}
5271
+ * imageAlt={(title) => `Aperçu de ${title}`}
5272
+ * resetButtonLabel="Aspirer une autre page"
5273
+ * onReset={() => reset()}
5274
+ * />
5275
+ */
5276
+
5277
+ /** Host-supplied scraped page content, shown once status === "success". */
5278
+ interface MosaicUrlScraperContent {
5279
+ /** Scraped page title, displayed as-is. */
5280
+ title: string;
5281
+ /** Scraped page description/summary, displayed as-is. */
5282
+ description: string;
5283
+ /** Optional preview image URL — the image is rendered only when present. */
5284
+ image?: string;
5285
+ /** The scraped page's canonical URL, used as the external-link href. */
5286
+ url: string;
5287
+ }
5288
+ /**
5289
+ * Base props required in EVERY status — read unconditionally by the
5290
+ * component regardless of `status` (input row + local URL-syntax
5291
+ * validation, both reachable from "idle").
5292
+ */
5293
+ type MosaicUrlScraperBaseProps = {
5294
+ /** Host-controlled current input value. */
5295
+ url: string;
5296
+ /** Called with the raw input value on every keystroke. */
5297
+ onUrlChange: (url: string) => void;
5298
+ /**
5299
+ * Called with the trimmed URL once it passes local syntax validation.
5300
+ * The component performs no scrape itself — the host decides how the
5301
+ * page is fetched and how `status`/`content`/`errorMessage` are updated
5302
+ * afterward.
5303
+ */
5304
+ onScrape: (url: string) => void;
5305
+ /** Accessible name for the URL input (`aria-label`). Required, no default. */
5306
+ inputAriaLabel: string;
5307
+ /** Placeholder text for the URL input. Required, no default. */
5308
+ inputPlaceholder: string;
5309
+ /** Label for the submit button when idle/ready. Required, no default. */
5310
+ scrapeButtonLabel: string;
5311
+ /**
5312
+ * Message shown when the local `new URL()` syntax check fails on submit.
5313
+ * Required, no default — this is host copy, not an English fallback.
5314
+ * Reachable from "idle": the local check runs on the first submit,
5315
+ * before the host ever sets `status` to "loading".
5316
+ */
5317
+ invalidUrlMessage: string;
5318
+ /** Additional Tailwind classes on the root element. */
5319
+ className?: string;
5320
+ /** React 19 ref prop — forwarded to the root element. */
5321
+ ref?: React.Ref<HTMLDivElement>;
5322
+ };
5323
+ /**
5324
+ * Host-controlled scrape status. Every prop that is only ever rendered in
5325
+ * ONE status branch lives on that branch's variant — not on the base
5326
+ * props — so the type contract matches exactly what the component reads
5327
+ * (mirrors MosaicDocumentUploadFile's status-driven shape, and the
5328
+ * memory-card "a required prop must be used exactly where it's declared"
5329
+ * rule).
5330
+ */
5331
+ type MosaicUrlScraperState = {
5332
+ status: "idle";
5333
+ } | {
5334
+ status: "loading";
5335
+ /** Label for the submit button while status === "loading". Required, no default. */
5336
+ scrapingLabel: string;
5337
+ /** Message shown inside the loading region while status === "loading". Required, no default. */
5338
+ loadingMessage: string;
5339
+ } | {
5340
+ status: "success";
5341
+ content: MosaicUrlScraperContent;
5342
+ /**
5343
+ * Per-content accessible name for the external "open" link, e.g.
5344
+ * `(pageUrl) => \`Open ${pageUrl}\``. Required — no hardcoded string.
5345
+ */
5346
+ openLinkAriaLabel: (pageUrl: string) => string;
5347
+ /**
5348
+ * Per-content alt text for the preview image. Required on this
5349
+ * branch (not narrowed further by `content.image` presence — see
5350
+ * MosaicUrlScraper.tsx JSDoc for why); invoked only when
5351
+ * `content.image` is actually present.
5352
+ */
5353
+ imageAlt: (title: string) => string;
5354
+ /** Label for the reset/"scrape another" button. Required, no default. */
5355
+ resetButtonLabel: string;
5356
+ /** Called when the reset/"scrape another" button is activated. */
5357
+ onReset: () => void;
5358
+ } | {
5359
+ status: "error";
5360
+ /**
5361
+ * Host-provided, host-localized error message (e.g. "Invalid URL",
5362
+ * "Page unreachable", "Empty content"). The library never generates
5363
+ * its own error strings — every occurrence is a distinct required
5364
+ * value supplied by the caller.
5365
+ */
5366
+ errorMessage: string;
5367
+ /** Label for the reset/"scrape another" button. Required, no default. */
5368
+ resetButtonLabel: string;
5369
+ /** Called when the reset/"scrape another" button is activated. */
5370
+ onReset: () => void;
5371
+ };
5372
+ type MosaicUrlScraperProps = MosaicUrlScraperBaseProps & MosaicUrlScraperState;
5373
+ /**
5374
+ * MosaicUrlScraper — production URL-scraper atom for
5375
+ * @vantageos/mosaic-blocks.
5376
+ *
5377
+ * Purely presentational: renders the URL input, the current status
5378
+ * (loading/success/error), and reports a validated scrape request / reset
5379
+ * via callbacks. No network call, no scraping simulation, no built-in copy.
5380
+ */
5381
+ declare function MosaicUrlScraper(props: MosaicUrlScraperProps): React.JSX.Element;
5382
+ declare namespace MosaicUrlScraper {
5383
+ var displayName: string;
5384
+ }
5385
+
5386
+ 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, 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 };