@snowcone-app/ui 0.12.2 → 0.13.2

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
@@ -22,8 +22,8 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
22
22
  export { UseRealtimeMockupOptions, useRealtimeMockup } from '@snowcone-app/sdk/react';
23
23
  import * as _meilisearch_instant_meilisearch from '@meilisearch/instant-meilisearch';
24
24
  export { F as FontPairing, T as ThemeConfig, a as ThemePreset } from './types-X8YYkINT.cjs';
25
- import { P as PersonalizationField, a as PersonalizationValues } from './types-CNJT8FUd.cjs';
26
- export { b as PersonalizationColorField, c as PersonalizationImageField, d as PersonalizationTextField } from './types-CNJT8FUd.cjs';
25
+ import { P as PersonalizationField, a as PersonalizationValues, b as PersonalizationTextField } from './types-BObPMwP5.cjs';
26
+ export { c as PersonalizationColorField, d as PersonalizationImageField } from './types-BObPMwP5.cjs';
27
27
 
28
28
  /**
29
29
  * Returns brand data for a language. Throws if the language is missing —
@@ -4469,6 +4469,19 @@ declare function CanvasEditor({ artworkSrc, onOpenImageGallery, onOpenTypography
4469
4469
  children?: ReactNode;
4470
4470
  }): react_jsx_runtime.JSX.Element;
4471
4471
 
4472
+ /**
4473
+ * How a hero picture changes from the one on screen to the next (both already decoded, so never through a blank):
4474
+ * - `instant`: a LIVE frame (a realtime render, a `blob:` URL) replacing a picture. Frames arrive several a second while
4475
+ * a shopper types into a personalization box; a 400 ms crossfade per frame smeared each frame over the last and,
4476
+ * restarted mid-fade, faded the older frame back in (snowcone.app engraved tumbler, 2026-12-01: "flash like crazy").
4477
+ * - `crossfade`: any other change (another design, another size): the old picture fades out over the new.
4478
+ */
4479
+ declare function pictureSwapOf(shownUrl: string | null, nextUrl: string): "instant" | "crossfade";
4480
+ /**
4481
+ * Resolves once `img` is loaded AND decoded (HTMLImageElement.decode), so the swap that follows paints the new picture
4482
+ * in the same frame; rejects when it cannot be shown. Without decode() (old browsers, jsdom) the load event stands in.
4483
+ */
4484
+ declare function decodedPicture(img: HTMLImageElement): Promise<void>;
4472
4485
  interface HeroProductImageProps {
4473
4486
  productId?: string;
4474
4487
  mockupId?: string;
@@ -5999,10 +6012,39 @@ declare function usePersonalizationShimmer(containerRef: RefObject<HTMLElement |
5999
6012
 
6000
6013
  /** Normalize any hex color to uppercase 6-digit form (#RGB → #RRGGBB) */
6001
6014
  declare function normalizeHex(color: string): string;
6015
+ /** Has the buyer typed into any TEXT field of the design (any non-blank text)? */
6016
+ declare function anyTyped(fields: readonly PersonalizationField[], values: PersonalizationValues): boolean;
6017
+ /**
6018
+ * What a text field's elements draw: its box's text, or null = the element's own (designed) text. A `sample` field draws
6019
+ * its sample until anything is typed in any field, then exactly its box (empty = nothing). Any other field draws its
6020
+ * box's text ("" until typed into, which the binder leaves alone).
6021
+ */
6022
+ declare function textValueFor(field: PersonalizationTextField, values: PersonalizationValues, typed?: boolean): string | null;
6023
+ /** The font a text element draws with: the canvas's own CSS font shorthand (canvas TextMetrics buildFontString). */
6024
+ interface TextLineStyle {
6025
+ fontSize: number;
6026
+ fontFamily: string;
6027
+ bold?: boolean;
6028
+ italic?: boolean;
6029
+ /** Extra advance after each character, px (canvas letterSpacing). */
6030
+ letterSpacing?: number;
6031
+ }
6032
+ /** The canvas font shorthand for a style at a size, exactly as the canvas builds it ("italic bold 72px Oswald"). */
6033
+ declare function canvasFontString(style: TextLineStyle, fontSize?: number): string;
6034
+ /** A share of the box kept free when fitting: measurement differs by a hair between renderers (browser, server raster). */
6035
+ declare const FIT_MARGIN = 0.03;
6036
+ /**
6037
+ * The font size one line of `text` is drawn at to fit `maxWidth`: `style.fontSize` when it already fits, else the
6038
+ * largest smaller size that does (text width is linear in the font size, plus a fixed letter spacing per character).
6039
+ * Never larger than the style's size; never below 1 px. `measure(text, fontSize)` is the line's width at a size.
6040
+ */
6041
+ declare function shrinkFontSizeToFit(text: string, style: TextLineStyle, maxWidth: number, measure: (text: string, fontSize: number) => number): number;
6042
+ /** One line's width in a browser, with the canvas's own font shorthand (0 where no 2D canvas exists, e.g. on a server). */
6043
+ declare function measureTextLine(text: string, style: TextLineStyle, fontSize?: number): number;
6002
6044
  /**
6003
6045
  * Scroll an input to sit just above the iOS keyboard after it appears.
6004
6046
  * Uses visualViewport.height to determine the visible area above the keyboard.
6005
6047
  */
6006
6048
  declare function scrollInputAboveKeyboard(input: HTMLElement): void;
6007
6049
 
6008
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AddToCart, type AddToCartProps, type AddToCartStatus, ArtAlignment, type ArtAlignmentProps, ArtSelector, type ArtSelectorProps, type Artwork, ArtworkCustomizer, type ArtworkCustomizerProps, Badge, type BadgeProps, BrandLogo, type BrandLogoProps, BrandName, type BrandNameProps, Button, type ButtonProps, CanvasEditor, type CanvasExportServiceConfig, CanvasIsolationBoundary, CanvasIsolationConfigurator, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CarouselImage, type CarouselRenderProps, Checkbox, Chip, type ClipShape, Collapsible, CollapsibleContent, CollapsibleRoot, CollapsibleTrigger, ColorPalette, ColorPicker, type ColorPickerProps, ColorRow, ColorSwatch, type ColorSwatchChoice, type ColorSwatchProps, ColorTokenSwatch, type ContentRenderProps, CurrentRefinements, CurrentSelectionDisplay, type CurrentSelectionDisplayProps, DEFAULT_HERO_ZOOM_CONFIG, DEFAULT_IMAGE_CONFIG, DEFAULT_VISIBILITY_OPTIONS, DesignSystemPage, type DeviceDetectionResult, Disclosure, DisclosureContent, DisclosureTrigger, DragHintAnimation, type DragHintAnimationProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EdgeBlurBox, type EdgeBlurBoxProps, EdgeSwipeGuards, type EdgeSwipeGuardsProps, EnhancedImageViewer, FACET_SECTIONS, FIRST_VIEW_MARGIN, FIRST_VIEW_PICTURE_ASPECT, type FacetSection, type FacetType, Fieldset, type FieldsetProps, Filters, FiltersButton, type FiltersButtonProps, FiltersDrawer, type FiltersProps, type FirstView, type FirstViewAnchor, type FirstViewPhoneWindow, type FirstViewProductBox, FloatingActionGroup, type FloatingActionGroupProps, type FloatingActionItem, type FormatCurrencyOptions, GallerySkipProvider, type GallerySkipValue, type GallerySkipVerdict, type GallerySkips, HeroCarousel, type HeroCarouselProps, type HeroImage, type HeroImageRenderProps, HeroProductImage, type HeroProductImageProps, type HeroShrinkConfig, HeroShrinkLayout, type HeroShrinkLayoutProps, type HeroZoomConfig, HeroZoomLayout, type HeroZoomLayoutProps, type HeroZoomScales, HorizontalProgressiveBlur, type HorizontalProgressiveBlurProps, Drawer as IOSDrawer, DrawerClose as IOSDrawerClose, DrawerContent as IOSDrawerContent, DrawerDescription as IOSDrawerDescription, DrawerFooter as IOSDrawerFooter, DrawerHeader as IOSDrawerHeader, DrawerTitle as IOSDrawerTitle, DrawerTrigger as IOSDrawerTrigger, ImageBlurExtension, type ImageBlurExtensionProps, ImageEdgeBlur, type ImageEdgeBlurProps, type ImageLayer, type ImageUpdateRequest, Input, type InputProps, Kbd, type KbdProps, Label, Legend, type LegendProps, Lightbox, type LightboxProps, Link, LinkIcon, type LinkProps, LoadingOverlayPrism, LoadingOverlayPrismCandy, LoadingOverlayPrismCandyInline, type LoadingOverlayPrismCandyProps, type LoadingOverlayPrismProps, MasonryGrid, type MasonryGridProps, MobileProductCarousel, type MobileProductCarouselProps, MockupBackground, type MockupBackgroundProps, type MockupPriorityContextValue, MockupPriorityProvider, type MockupPriorityProviderProps, type MockupResult, NO_GALLERY_SKIPS, PDPLayout, type PDPLayoutProps, PersonalizationField, PersonalizationInputs, PersonalizationProvider, PersonalizationValues, PlacementArt, type PlacementArtMap, type PlacementArtProps, PlacementClipShapeSelector, type PlacementConfig, type PlacementDesign, PlacementTabs, type PlacementTabsProps, Popover, PopoverAnchor, PopoverContent, PopoverRoot, PopoverTrigger, type PriorityLevel, Product, ProductCard, type ProductCardProps, ProductContext, type ProductDataMode, ProductGallery, type ProductGalleryProps, ProductGrid, type ProductGridProps, type ProductHit, ProductHitComponent, ProductImage, type Artwork$1 as ProductImageArtwork, type ProductImageProps, ProductList, type ProductListProps, ProductOptions, type ProductPageContext, ProductPageProvider, ProductPageProviderMinimal, type ProductPageProviderMinimalProps, type ProductPageProviderProps, ProductPrice, type ProductPriceProps, type ProductProviderProps, ProgressiveBlur, type ProgressiveBlurProps, type ProviderStatus, Radio, RadioGroup, RadioGroupItem, RadiusScale, type ReactProductContext, type RealtimeContextValue, RealtimeMockup, type RealtimeMockupProps, RealtimeProvider, type RealtimeProviderProps, type RealtimeState, type RegularArtwork$1 as RegularArtwork, type ResponsiveColumns, type ResponsiveImageCapInfo, type ResponsiveImageCapOptions, ResponsiveZoom, RightToLeftProgressiveBlur, type RightToLeftProgressiveBlurProps, SLIDE_FIRST_VIEW_ATTR, SLIDE_FIRST_VIEW_X_VAR, SLIDE_PHONE_WINDOW_ATTR, SLIDE_PRODUCT_BOX_ATTR, SLIDE_PRODUCT_X0_VAR, SLIDE_PRODUCT_X1_VAR, SafeImg, type SafeImgProps, type ScrollDirection, ScrollFade, type ScrollFadeProps, type ScrollState, type SeamlessPattern$1 as SeamlessPattern, SearchBox, SearchProvider, type SearchProviderProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Shop, ShopContext, type ShopContextValue, type ShopProps, SimpleImageBlur, type SimpleImageBlurProps, type SlideFirstViewProps, Slider, SliderFill, SliderOutput, SliderThumb, SliderTrack, Spinner, type SpinnerProps, Surface, SurfaceContext, type SurfaceProps, Switch, Tabs, TabsContent, TabsList, TabsRoot, TabsTrigger, TextArea, TextField, type TextFieldProps, Textarea, type TextareaProps, ThemeSwitcher, ThemeToggle, type ThemeToggleProps, TileCount, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, TypographyScale, type UiRouter, UiRouterProvider, type UseBrandResult, type UseImagePreloaderOptions, type UseImagePreloaderReturn, type UseImageTransitionOptions, type UseImageTransitionReturn, type UsePersonalizationShimmerReturn, type UseProductGalleryOptions, type UseProductGalleryReturn, VISIBILITY_THRESHOLDS, type ViewportDimensions, type ZoomImage, ZoomOverlay, badgeVariants, blockingSessionError, brandAssets, buttonVariants, canvasExportService, checkComponentStyles, checkTailwindConfig, checkThemeTokens, createScrollDirectionTracker, firstView, firstViewAnchorOfSlide, formatCurrency, formatDate, formatDateTime, gallerySkipVerdict, gallerySkippedStamp, galleryWithoutSkipped, getBrand, getObservedElementCount, getObserverCount, hasEdgeBlur, isObserved, isWideMonitor, kbdVariants, linkVariants, linkedPlacementsLabel, normalizeHex, observe, pictureRenderState, placementArtFor, runConfigChecks, scrollInputAboveKeyboard, searchClient, slideFirstViewFields, slideFirstViewProps, spinnerVariants, surfaceVariants, useArtworkAlignment, useBrand, useCanvasContext, useCanvasContextStatic, useCurrentPlacements, useDesign, useDesignOptional, useDeviceDetection, useFocusTrap, useGallerySkipOptional, useGallerySkipState, useHeroZoomScales, useImagePreloader, useImageTransition, useIsolatedCanvas, useLoadingOverlay, useMediaQuery, useMockupBackgroundOptional, useMockupPriority, useMockupPriorityOptional, usePersonalization, usePersonalizationOptional, usePersonalizationShimmer, usePlacementArtOptional, usePlacementClipShape, usePlacementsProcessor, useProduct, useProductGallery, useProductOptional, useProductPage, useProductPageOptional, useProductSelection, useProviderStatus, useRealtime, useRealtimeOptional, useRenderCount, useRenderGuard, useResponsiveImageCap, useScrollDirection, useSelectedArtwork, useSetArtworkAlignment, useShop, useShopOptional, useSurface, useViewportDimensions, useWideMonitorMode };
6050
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AddToCart, type AddToCartProps, type AddToCartStatus, ArtAlignment, type ArtAlignmentProps, ArtSelector, type ArtSelectorProps, type Artwork, ArtworkCustomizer, type ArtworkCustomizerProps, Badge, type BadgeProps, BrandLogo, type BrandLogoProps, BrandName, type BrandNameProps, Button, type ButtonProps, CanvasEditor, type CanvasExportServiceConfig, CanvasIsolationBoundary, CanvasIsolationConfigurator, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CarouselImage, type CarouselRenderProps, Checkbox, Chip, type ClipShape, Collapsible, CollapsibleContent, CollapsibleRoot, CollapsibleTrigger, ColorPalette, ColorPicker, type ColorPickerProps, ColorRow, ColorSwatch, type ColorSwatchChoice, type ColorSwatchProps, ColorTokenSwatch, type ContentRenderProps, CurrentRefinements, CurrentSelectionDisplay, type CurrentSelectionDisplayProps, DEFAULT_HERO_ZOOM_CONFIG, DEFAULT_IMAGE_CONFIG, DEFAULT_VISIBILITY_OPTIONS, DesignSystemPage, type DeviceDetectionResult, Disclosure, DisclosureContent, DisclosureTrigger, DragHintAnimation, type DragHintAnimationProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EdgeBlurBox, type EdgeBlurBoxProps, EdgeSwipeGuards, type EdgeSwipeGuardsProps, EnhancedImageViewer, FACET_SECTIONS, FIRST_VIEW_MARGIN, FIRST_VIEW_PICTURE_ASPECT, FIT_MARGIN, type FacetSection, type FacetType, Fieldset, type FieldsetProps, Filters, FiltersButton, type FiltersButtonProps, FiltersDrawer, type FiltersProps, type FirstView, type FirstViewAnchor, type FirstViewPhoneWindow, type FirstViewProductBox, FloatingActionGroup, type FloatingActionGroupProps, type FloatingActionItem, type FormatCurrencyOptions, GallerySkipProvider, type GallerySkipValue, type GallerySkipVerdict, type GallerySkips, HeroCarousel, type HeroCarouselProps, type HeroImage, type HeroImageRenderProps, HeroProductImage, type HeroProductImageProps, type HeroShrinkConfig, HeroShrinkLayout, type HeroShrinkLayoutProps, type HeroZoomConfig, HeroZoomLayout, type HeroZoomLayoutProps, type HeroZoomScales, HorizontalProgressiveBlur, type HorizontalProgressiveBlurProps, Drawer as IOSDrawer, DrawerClose as IOSDrawerClose, DrawerContent as IOSDrawerContent, DrawerDescription as IOSDrawerDescription, DrawerFooter as IOSDrawerFooter, DrawerHeader as IOSDrawerHeader, DrawerTitle as IOSDrawerTitle, DrawerTrigger as IOSDrawerTrigger, ImageBlurExtension, type ImageBlurExtensionProps, ImageEdgeBlur, type ImageEdgeBlurProps, type ImageLayer, type ImageUpdateRequest, Input, type InputProps, Kbd, type KbdProps, Label, Legend, type LegendProps, Lightbox, type LightboxProps, Link, LinkIcon, type LinkProps, LoadingOverlayPrism, LoadingOverlayPrismCandy, LoadingOverlayPrismCandyInline, type LoadingOverlayPrismCandyProps, type LoadingOverlayPrismProps, MasonryGrid, type MasonryGridProps, MobileProductCarousel, type MobileProductCarouselProps, MockupBackground, type MockupBackgroundProps, type MockupPriorityContextValue, MockupPriorityProvider, type MockupPriorityProviderProps, type MockupResult, NO_GALLERY_SKIPS, PDPLayout, type PDPLayoutProps, PersonalizationField, PersonalizationInputs, PersonalizationProvider, PersonalizationTextField, PersonalizationValues, PlacementArt, type PlacementArtMap, type PlacementArtProps, PlacementClipShapeSelector, type PlacementConfig, type PlacementDesign, PlacementTabs, type PlacementTabsProps, Popover, PopoverAnchor, PopoverContent, PopoverRoot, PopoverTrigger, type PriorityLevel, Product, ProductCard, type ProductCardProps, ProductContext, type ProductDataMode, ProductGallery, type ProductGalleryProps, ProductGrid, type ProductGridProps, type ProductHit, ProductHitComponent, ProductImage, type Artwork$1 as ProductImageArtwork, type ProductImageProps, ProductList, type ProductListProps, ProductOptions, type ProductPageContext, ProductPageProvider, ProductPageProviderMinimal, type ProductPageProviderMinimalProps, type ProductPageProviderProps, ProductPrice, type ProductPriceProps, type ProductProviderProps, ProgressiveBlur, type ProgressiveBlurProps, type ProviderStatus, Radio, RadioGroup, RadioGroupItem, RadiusScale, type ReactProductContext, type RealtimeContextValue, RealtimeMockup, type RealtimeMockupProps, RealtimeProvider, type RealtimeProviderProps, type RealtimeState, type RegularArtwork$1 as RegularArtwork, type ResponsiveColumns, type ResponsiveImageCapInfo, type ResponsiveImageCapOptions, ResponsiveZoom, RightToLeftProgressiveBlur, type RightToLeftProgressiveBlurProps, SLIDE_FIRST_VIEW_ATTR, SLIDE_FIRST_VIEW_X_VAR, SLIDE_PHONE_WINDOW_ATTR, SLIDE_PRODUCT_BOX_ATTR, SLIDE_PRODUCT_X0_VAR, SLIDE_PRODUCT_X1_VAR, SafeImg, type SafeImgProps, type ScrollDirection, ScrollFade, type ScrollFadeProps, type ScrollState, type SeamlessPattern$1 as SeamlessPattern, SearchBox, SearchProvider, type SearchProviderProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Shop, ShopContext, type ShopContextValue, type ShopProps, SimpleImageBlur, type SimpleImageBlurProps, type SlideFirstViewProps, Slider, SliderFill, SliderOutput, SliderThumb, SliderTrack, Spinner, type SpinnerProps, Surface, SurfaceContext, type SurfaceProps, Switch, Tabs, TabsContent, TabsList, TabsRoot, TabsTrigger, TextArea, TextField, type TextFieldProps, type TextLineStyle, Textarea, type TextareaProps, ThemeSwitcher, ThemeToggle, type ThemeToggleProps, TileCount, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, TypographyScale, type UiRouter, UiRouterProvider, type UseBrandResult, type UseImagePreloaderOptions, type UseImagePreloaderReturn, type UseImageTransitionOptions, type UseImageTransitionReturn, type UsePersonalizationShimmerReturn, type UseProductGalleryOptions, type UseProductGalleryReturn, VISIBILITY_THRESHOLDS, type ViewportDimensions, type ZoomImage, ZoomOverlay, anyTyped, badgeVariants, blockingSessionError, brandAssets, buttonVariants, canvasExportService, canvasFontString, checkComponentStyles, checkTailwindConfig, checkThemeTokens, createScrollDirectionTracker, decodedPicture, firstView, firstViewAnchorOfSlide, formatCurrency, formatDate, formatDateTime, gallerySkipVerdict, gallerySkippedStamp, galleryWithoutSkipped, getBrand, getObservedElementCount, getObserverCount, hasEdgeBlur, isObserved, isWideMonitor, kbdVariants, linkVariants, linkedPlacementsLabel, measureTextLine, normalizeHex, observe, pictureRenderState, pictureSwapOf, placementArtFor, runConfigChecks, scrollInputAboveKeyboard, searchClient, shrinkFontSizeToFit, slideFirstViewFields, slideFirstViewProps, spinnerVariants, surfaceVariants, textValueFor, useArtworkAlignment, useBrand, useCanvasContext, useCanvasContextStatic, useCurrentPlacements, useDesign, useDesignOptional, useDeviceDetection, useFocusTrap, useGallerySkipOptional, useGallerySkipState, useHeroZoomScales, useImagePreloader, useImageTransition, useIsolatedCanvas, useLoadingOverlay, useMediaQuery, useMockupBackgroundOptional, useMockupPriority, useMockupPriorityOptional, usePersonalization, usePersonalizationOptional, usePersonalizationShimmer, usePlacementArtOptional, usePlacementClipShape, usePlacementsProcessor, useProduct, useProductGallery, useProductOptional, useProductPage, useProductPageOptional, useProductSelection, useProviderStatus, useRealtime, useRealtimeOptional, useRenderCount, useRenderGuard, useResponsiveImageCap, useScrollDirection, useSelectedArtwork, useSetArtworkAlignment, useShop, useShopOptional, useSurface, useViewportDimensions, useWideMonitorMode };
package/dist/index.d.ts CHANGED
@@ -22,8 +22,8 @@ import * as TooltipPrimitive from '@radix-ui/react-tooltip';
22
22
  export { UseRealtimeMockupOptions, useRealtimeMockup } from '@snowcone-app/sdk/react';
23
23
  import * as _meilisearch_instant_meilisearch from '@meilisearch/instant-meilisearch';
24
24
  export { F as FontPairing, T as ThemeConfig, a as ThemePreset } from './types-X8YYkINT.js';
25
- import { P as PersonalizationField, a as PersonalizationValues } from './types-CNJT8FUd.js';
26
- export { b as PersonalizationColorField, c as PersonalizationImageField, d as PersonalizationTextField } from './types-CNJT8FUd.js';
25
+ import { P as PersonalizationField, a as PersonalizationValues, b as PersonalizationTextField } from './types-BObPMwP5.js';
26
+ export { c as PersonalizationColorField, d as PersonalizationImageField } from './types-BObPMwP5.js';
27
27
 
28
28
  /**
29
29
  * Returns brand data for a language. Throws if the language is missing —
@@ -4469,6 +4469,19 @@ declare function CanvasEditor({ artworkSrc, onOpenImageGallery, onOpenTypography
4469
4469
  children?: ReactNode;
4470
4470
  }): react_jsx_runtime.JSX.Element;
4471
4471
 
4472
+ /**
4473
+ * How a hero picture changes from the one on screen to the next (both already decoded, so never through a blank):
4474
+ * - `instant`: a LIVE frame (a realtime render, a `blob:` URL) replacing a picture. Frames arrive several a second while
4475
+ * a shopper types into a personalization box; a 400 ms crossfade per frame smeared each frame over the last and,
4476
+ * restarted mid-fade, faded the older frame back in (snowcone.app engraved tumbler, 2026-12-01: "flash like crazy").
4477
+ * - `crossfade`: any other change (another design, another size): the old picture fades out over the new.
4478
+ */
4479
+ declare function pictureSwapOf(shownUrl: string | null, nextUrl: string): "instant" | "crossfade";
4480
+ /**
4481
+ * Resolves once `img` is loaded AND decoded (HTMLImageElement.decode), so the swap that follows paints the new picture
4482
+ * in the same frame; rejects when it cannot be shown. Without decode() (old browsers, jsdom) the load event stands in.
4483
+ */
4484
+ declare function decodedPicture(img: HTMLImageElement): Promise<void>;
4472
4485
  interface HeroProductImageProps {
4473
4486
  productId?: string;
4474
4487
  mockupId?: string;
@@ -5999,10 +6012,39 @@ declare function usePersonalizationShimmer(containerRef: RefObject<HTMLElement |
5999
6012
 
6000
6013
  /** Normalize any hex color to uppercase 6-digit form (#RGB → #RRGGBB) */
6001
6014
  declare function normalizeHex(color: string): string;
6015
+ /** Has the buyer typed into any TEXT field of the design (any non-blank text)? */
6016
+ declare function anyTyped(fields: readonly PersonalizationField[], values: PersonalizationValues): boolean;
6017
+ /**
6018
+ * What a text field's elements draw: its box's text, or null = the element's own (designed) text. A `sample` field draws
6019
+ * its sample until anything is typed in any field, then exactly its box (empty = nothing). Any other field draws its
6020
+ * box's text ("" until typed into, which the binder leaves alone).
6021
+ */
6022
+ declare function textValueFor(field: PersonalizationTextField, values: PersonalizationValues, typed?: boolean): string | null;
6023
+ /** The font a text element draws with: the canvas's own CSS font shorthand (canvas TextMetrics buildFontString). */
6024
+ interface TextLineStyle {
6025
+ fontSize: number;
6026
+ fontFamily: string;
6027
+ bold?: boolean;
6028
+ italic?: boolean;
6029
+ /** Extra advance after each character, px (canvas letterSpacing). */
6030
+ letterSpacing?: number;
6031
+ }
6032
+ /** The canvas font shorthand for a style at a size, exactly as the canvas builds it ("italic bold 72px Oswald"). */
6033
+ declare function canvasFontString(style: TextLineStyle, fontSize?: number): string;
6034
+ /** A share of the box kept free when fitting: measurement differs by a hair between renderers (browser, server raster). */
6035
+ declare const FIT_MARGIN = 0.03;
6036
+ /**
6037
+ * The font size one line of `text` is drawn at to fit `maxWidth`: `style.fontSize` when it already fits, else the
6038
+ * largest smaller size that does (text width is linear in the font size, plus a fixed letter spacing per character).
6039
+ * Never larger than the style's size; never below 1 px. `measure(text, fontSize)` is the line's width at a size.
6040
+ */
6041
+ declare function shrinkFontSizeToFit(text: string, style: TextLineStyle, maxWidth: number, measure: (text: string, fontSize: number) => number): number;
6042
+ /** One line's width in a browser, with the canvas's own font shorthand (0 where no 2D canvas exists, e.g. on a server). */
6043
+ declare function measureTextLine(text: string, style: TextLineStyle, fontSize?: number): number;
6002
6044
  /**
6003
6045
  * Scroll an input to sit just above the iOS keyboard after it appears.
6004
6046
  * Uses visualViewport.height to determine the visible area above the keyboard.
6005
6047
  */
6006
6048
  declare function scrollInputAboveKeyboard(input: HTMLElement): void;
6007
6049
 
6008
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AddToCart, type AddToCartProps, type AddToCartStatus, ArtAlignment, type ArtAlignmentProps, ArtSelector, type ArtSelectorProps, type Artwork, ArtworkCustomizer, type ArtworkCustomizerProps, Badge, type BadgeProps, BrandLogo, type BrandLogoProps, BrandName, type BrandNameProps, Button, type ButtonProps, CanvasEditor, type CanvasExportServiceConfig, CanvasIsolationBoundary, CanvasIsolationConfigurator, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CarouselImage, type CarouselRenderProps, Checkbox, Chip, type ClipShape, Collapsible, CollapsibleContent, CollapsibleRoot, CollapsibleTrigger, ColorPalette, ColorPicker, type ColorPickerProps, ColorRow, ColorSwatch, type ColorSwatchChoice, type ColorSwatchProps, ColorTokenSwatch, type ContentRenderProps, CurrentRefinements, CurrentSelectionDisplay, type CurrentSelectionDisplayProps, DEFAULT_HERO_ZOOM_CONFIG, DEFAULT_IMAGE_CONFIG, DEFAULT_VISIBILITY_OPTIONS, DesignSystemPage, type DeviceDetectionResult, Disclosure, DisclosureContent, DisclosureTrigger, DragHintAnimation, type DragHintAnimationProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EdgeBlurBox, type EdgeBlurBoxProps, EdgeSwipeGuards, type EdgeSwipeGuardsProps, EnhancedImageViewer, FACET_SECTIONS, FIRST_VIEW_MARGIN, FIRST_VIEW_PICTURE_ASPECT, type FacetSection, type FacetType, Fieldset, type FieldsetProps, Filters, FiltersButton, type FiltersButtonProps, FiltersDrawer, type FiltersProps, type FirstView, type FirstViewAnchor, type FirstViewPhoneWindow, type FirstViewProductBox, FloatingActionGroup, type FloatingActionGroupProps, type FloatingActionItem, type FormatCurrencyOptions, GallerySkipProvider, type GallerySkipValue, type GallerySkipVerdict, type GallerySkips, HeroCarousel, type HeroCarouselProps, type HeroImage, type HeroImageRenderProps, HeroProductImage, type HeroProductImageProps, type HeroShrinkConfig, HeroShrinkLayout, type HeroShrinkLayoutProps, type HeroZoomConfig, HeroZoomLayout, type HeroZoomLayoutProps, type HeroZoomScales, HorizontalProgressiveBlur, type HorizontalProgressiveBlurProps, Drawer as IOSDrawer, DrawerClose as IOSDrawerClose, DrawerContent as IOSDrawerContent, DrawerDescription as IOSDrawerDescription, DrawerFooter as IOSDrawerFooter, DrawerHeader as IOSDrawerHeader, DrawerTitle as IOSDrawerTitle, DrawerTrigger as IOSDrawerTrigger, ImageBlurExtension, type ImageBlurExtensionProps, ImageEdgeBlur, type ImageEdgeBlurProps, type ImageLayer, type ImageUpdateRequest, Input, type InputProps, Kbd, type KbdProps, Label, Legend, type LegendProps, Lightbox, type LightboxProps, Link, LinkIcon, type LinkProps, LoadingOverlayPrism, LoadingOverlayPrismCandy, LoadingOverlayPrismCandyInline, type LoadingOverlayPrismCandyProps, type LoadingOverlayPrismProps, MasonryGrid, type MasonryGridProps, MobileProductCarousel, type MobileProductCarouselProps, MockupBackground, type MockupBackgroundProps, type MockupPriorityContextValue, MockupPriorityProvider, type MockupPriorityProviderProps, type MockupResult, NO_GALLERY_SKIPS, PDPLayout, type PDPLayoutProps, PersonalizationField, PersonalizationInputs, PersonalizationProvider, PersonalizationValues, PlacementArt, type PlacementArtMap, type PlacementArtProps, PlacementClipShapeSelector, type PlacementConfig, type PlacementDesign, PlacementTabs, type PlacementTabsProps, Popover, PopoverAnchor, PopoverContent, PopoverRoot, PopoverTrigger, type PriorityLevel, Product, ProductCard, type ProductCardProps, ProductContext, type ProductDataMode, ProductGallery, type ProductGalleryProps, ProductGrid, type ProductGridProps, type ProductHit, ProductHitComponent, ProductImage, type Artwork$1 as ProductImageArtwork, type ProductImageProps, ProductList, type ProductListProps, ProductOptions, type ProductPageContext, ProductPageProvider, ProductPageProviderMinimal, type ProductPageProviderMinimalProps, type ProductPageProviderProps, ProductPrice, type ProductPriceProps, type ProductProviderProps, ProgressiveBlur, type ProgressiveBlurProps, type ProviderStatus, Radio, RadioGroup, RadioGroupItem, RadiusScale, type ReactProductContext, type RealtimeContextValue, RealtimeMockup, type RealtimeMockupProps, RealtimeProvider, type RealtimeProviderProps, type RealtimeState, type RegularArtwork$1 as RegularArtwork, type ResponsiveColumns, type ResponsiveImageCapInfo, type ResponsiveImageCapOptions, ResponsiveZoom, RightToLeftProgressiveBlur, type RightToLeftProgressiveBlurProps, SLIDE_FIRST_VIEW_ATTR, SLIDE_FIRST_VIEW_X_VAR, SLIDE_PHONE_WINDOW_ATTR, SLIDE_PRODUCT_BOX_ATTR, SLIDE_PRODUCT_X0_VAR, SLIDE_PRODUCT_X1_VAR, SafeImg, type SafeImgProps, type ScrollDirection, ScrollFade, type ScrollFadeProps, type ScrollState, type SeamlessPattern$1 as SeamlessPattern, SearchBox, SearchProvider, type SearchProviderProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Shop, ShopContext, type ShopContextValue, type ShopProps, SimpleImageBlur, type SimpleImageBlurProps, type SlideFirstViewProps, Slider, SliderFill, SliderOutput, SliderThumb, SliderTrack, Spinner, type SpinnerProps, Surface, SurfaceContext, type SurfaceProps, Switch, Tabs, TabsContent, TabsList, TabsRoot, TabsTrigger, TextArea, TextField, type TextFieldProps, Textarea, type TextareaProps, ThemeSwitcher, ThemeToggle, type ThemeToggleProps, TileCount, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, TypographyScale, type UiRouter, UiRouterProvider, type UseBrandResult, type UseImagePreloaderOptions, type UseImagePreloaderReturn, type UseImageTransitionOptions, type UseImageTransitionReturn, type UsePersonalizationShimmerReturn, type UseProductGalleryOptions, type UseProductGalleryReturn, VISIBILITY_THRESHOLDS, type ViewportDimensions, type ZoomImage, ZoomOverlay, badgeVariants, blockingSessionError, brandAssets, buttonVariants, canvasExportService, checkComponentStyles, checkTailwindConfig, checkThemeTokens, createScrollDirectionTracker, firstView, firstViewAnchorOfSlide, formatCurrency, formatDate, formatDateTime, gallerySkipVerdict, gallerySkippedStamp, galleryWithoutSkipped, getBrand, getObservedElementCount, getObserverCount, hasEdgeBlur, isObserved, isWideMonitor, kbdVariants, linkVariants, linkedPlacementsLabel, normalizeHex, observe, pictureRenderState, placementArtFor, runConfigChecks, scrollInputAboveKeyboard, searchClient, slideFirstViewFields, slideFirstViewProps, spinnerVariants, surfaceVariants, useArtworkAlignment, useBrand, useCanvasContext, useCanvasContextStatic, useCurrentPlacements, useDesign, useDesignOptional, useDeviceDetection, useFocusTrap, useGallerySkipOptional, useGallerySkipState, useHeroZoomScales, useImagePreloader, useImageTransition, useIsolatedCanvas, useLoadingOverlay, useMediaQuery, useMockupBackgroundOptional, useMockupPriority, useMockupPriorityOptional, usePersonalization, usePersonalizationOptional, usePersonalizationShimmer, usePlacementArtOptional, usePlacementClipShape, usePlacementsProcessor, useProduct, useProductGallery, useProductOptional, useProductPage, useProductPageOptional, useProductSelection, useProviderStatus, useRealtime, useRealtimeOptional, useRenderCount, useRenderGuard, useResponsiveImageCap, useScrollDirection, useSelectedArtwork, useSetArtworkAlignment, useShop, useShopOptional, useSurface, useViewportDimensions, useWideMonitorMode };
6050
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AddToCart, type AddToCartProps, type AddToCartStatus, ArtAlignment, type ArtAlignmentProps, ArtSelector, type ArtSelectorProps, type Artwork, ArtworkCustomizer, type ArtworkCustomizerProps, Badge, type BadgeProps, BrandLogo, type BrandLogoProps, BrandName, type BrandNameProps, Button, type ButtonProps, CanvasEditor, type CanvasExportServiceConfig, CanvasIsolationBoundary, CanvasIsolationConfigurator, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, type CarouselImage, type CarouselRenderProps, Checkbox, Chip, type ClipShape, Collapsible, CollapsibleContent, CollapsibleRoot, CollapsibleTrigger, ColorPalette, ColorPicker, type ColorPickerProps, ColorRow, ColorSwatch, type ColorSwatchChoice, type ColorSwatchProps, ColorTokenSwatch, type ContentRenderProps, CurrentRefinements, CurrentSelectionDisplay, type CurrentSelectionDisplayProps, DEFAULT_HERO_ZOOM_CONFIG, DEFAULT_IMAGE_CONFIG, DEFAULT_VISIBILITY_OPTIONS, DesignSystemPage, type DeviceDetectionResult, Disclosure, DisclosureContent, DisclosureTrigger, DragHintAnimation, type DragHintAnimationProps, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EdgeBlurBox, type EdgeBlurBoxProps, EdgeSwipeGuards, type EdgeSwipeGuardsProps, EnhancedImageViewer, FACET_SECTIONS, FIRST_VIEW_MARGIN, FIRST_VIEW_PICTURE_ASPECT, FIT_MARGIN, type FacetSection, type FacetType, Fieldset, type FieldsetProps, Filters, FiltersButton, type FiltersButtonProps, FiltersDrawer, type FiltersProps, type FirstView, type FirstViewAnchor, type FirstViewPhoneWindow, type FirstViewProductBox, FloatingActionGroup, type FloatingActionGroupProps, type FloatingActionItem, type FormatCurrencyOptions, GallerySkipProvider, type GallerySkipValue, type GallerySkipVerdict, type GallerySkips, HeroCarousel, type HeroCarouselProps, type HeroImage, type HeroImageRenderProps, HeroProductImage, type HeroProductImageProps, type HeroShrinkConfig, HeroShrinkLayout, type HeroShrinkLayoutProps, type HeroZoomConfig, HeroZoomLayout, type HeroZoomLayoutProps, type HeroZoomScales, HorizontalProgressiveBlur, type HorizontalProgressiveBlurProps, Drawer as IOSDrawer, DrawerClose as IOSDrawerClose, DrawerContent as IOSDrawerContent, DrawerDescription as IOSDrawerDescription, DrawerFooter as IOSDrawerFooter, DrawerHeader as IOSDrawerHeader, DrawerTitle as IOSDrawerTitle, DrawerTrigger as IOSDrawerTrigger, ImageBlurExtension, type ImageBlurExtensionProps, ImageEdgeBlur, type ImageEdgeBlurProps, type ImageLayer, type ImageUpdateRequest, Input, type InputProps, Kbd, type KbdProps, Label, Legend, type LegendProps, Lightbox, type LightboxProps, Link, LinkIcon, type LinkProps, LoadingOverlayPrism, LoadingOverlayPrismCandy, LoadingOverlayPrismCandyInline, type LoadingOverlayPrismCandyProps, type LoadingOverlayPrismProps, MasonryGrid, type MasonryGridProps, MobileProductCarousel, type MobileProductCarouselProps, MockupBackground, type MockupBackgroundProps, type MockupPriorityContextValue, MockupPriorityProvider, type MockupPriorityProviderProps, type MockupResult, NO_GALLERY_SKIPS, PDPLayout, type PDPLayoutProps, PersonalizationField, PersonalizationInputs, PersonalizationProvider, PersonalizationTextField, PersonalizationValues, PlacementArt, type PlacementArtMap, type PlacementArtProps, PlacementClipShapeSelector, type PlacementConfig, type PlacementDesign, PlacementTabs, type PlacementTabsProps, Popover, PopoverAnchor, PopoverContent, PopoverRoot, PopoverTrigger, type PriorityLevel, Product, ProductCard, type ProductCardProps, ProductContext, type ProductDataMode, ProductGallery, type ProductGalleryProps, ProductGrid, type ProductGridProps, type ProductHit, ProductHitComponent, ProductImage, type Artwork$1 as ProductImageArtwork, type ProductImageProps, ProductList, type ProductListProps, ProductOptions, type ProductPageContext, ProductPageProvider, ProductPageProviderMinimal, type ProductPageProviderMinimalProps, type ProductPageProviderProps, ProductPrice, type ProductPriceProps, type ProductProviderProps, ProgressiveBlur, type ProgressiveBlurProps, type ProviderStatus, Radio, RadioGroup, RadioGroupItem, RadiusScale, type ReactProductContext, type RealtimeContextValue, RealtimeMockup, type RealtimeMockupProps, RealtimeProvider, type RealtimeProviderProps, type RealtimeState, type RegularArtwork$1 as RegularArtwork, type ResponsiveColumns, type ResponsiveImageCapInfo, type ResponsiveImageCapOptions, ResponsiveZoom, RightToLeftProgressiveBlur, type RightToLeftProgressiveBlurProps, SLIDE_FIRST_VIEW_ATTR, SLIDE_FIRST_VIEW_X_VAR, SLIDE_PHONE_WINDOW_ATTR, SLIDE_PRODUCT_BOX_ATTR, SLIDE_PRODUCT_X0_VAR, SLIDE_PRODUCT_X1_VAR, SafeImg, type SafeImgProps, type ScrollDirection, ScrollFade, type ScrollFadeProps, type ScrollState, type SeamlessPattern$1 as SeamlessPattern, SearchBox, SearchProvider, type SearchProviderProps, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Shop, ShopContext, type ShopContextValue, type ShopProps, SimpleImageBlur, type SimpleImageBlurProps, type SlideFirstViewProps, Slider, SliderFill, SliderOutput, SliderThumb, SliderTrack, Spinner, type SpinnerProps, Surface, SurfaceContext, type SurfaceProps, Switch, Tabs, TabsContent, TabsList, TabsRoot, TabsTrigger, TextArea, TextField, type TextFieldProps, type TextLineStyle, Textarea, type TextareaProps, ThemeSwitcher, ThemeToggle, type ThemeToggleProps, TileCount, Tooltip, TooltipContent, TooltipProvider, TooltipRoot, TooltipTrigger, TypographyScale, type UiRouter, UiRouterProvider, type UseBrandResult, type UseImagePreloaderOptions, type UseImagePreloaderReturn, type UseImageTransitionOptions, type UseImageTransitionReturn, type UsePersonalizationShimmerReturn, type UseProductGalleryOptions, type UseProductGalleryReturn, VISIBILITY_THRESHOLDS, type ViewportDimensions, type ZoomImage, ZoomOverlay, anyTyped, badgeVariants, blockingSessionError, brandAssets, buttonVariants, canvasExportService, canvasFontString, checkComponentStyles, checkTailwindConfig, checkThemeTokens, createScrollDirectionTracker, decodedPicture, firstView, firstViewAnchorOfSlide, formatCurrency, formatDate, formatDateTime, gallerySkipVerdict, gallerySkippedStamp, galleryWithoutSkipped, getBrand, getObservedElementCount, getObserverCount, hasEdgeBlur, isObserved, isWideMonitor, kbdVariants, linkVariants, linkedPlacementsLabel, measureTextLine, normalizeHex, observe, pictureRenderState, pictureSwapOf, placementArtFor, runConfigChecks, scrollInputAboveKeyboard, searchClient, shrinkFontSizeToFit, slideFirstViewFields, slideFirstViewProps, spinnerVariants, surfaceVariants, textValueFor, useArtworkAlignment, useBrand, useCanvasContext, useCanvasContextStatic, useCurrentPlacements, useDesign, useDesignOptional, useDeviceDetection, useFocusTrap, useGallerySkipOptional, useGallerySkipState, useHeroZoomScales, useImagePreloader, useImageTransition, useIsolatedCanvas, useLoadingOverlay, useMediaQuery, useMockupBackgroundOptional, useMockupPriority, useMockupPriorityOptional, usePersonalization, usePersonalizationOptional, usePersonalizationShimmer, usePlacementArtOptional, usePlacementClipShape, usePlacementsProcessor, useProduct, useProductGallery, useProductOptional, useProductPage, useProductPageOptional, useProductSelection, useProviderStatus, useRealtime, useRealtimeOptional, useRenderCount, useRenderGuard, useResponsiveImageCap, useScrollDirection, useSelectedArtwork, useSetArtworkAlignment, useShop, useShopOptional, useSurface, useViewportDimensions, useWideMonitorMode };