@wix/web5-core 1.63.5 → 1.63.7

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.
Files changed (50) hide show
  1. package/dist/cjs/component/types.js.map +1 -1
  2. package/dist/cjs/entity/defaultExtractor.js +11 -0
  3. package/dist/cjs/entity/defaultExtractor.js.map +1 -1
  4. package/dist/cjs/entity/index.js +9 -3
  5. package/dist/cjs/entity/index.js.map +1 -1
  6. package/dist/cjs/entity/matchedVariant.js +151 -0
  7. package/dist/cjs/entity/matchedVariant.js.map +1 -0
  8. package/dist/cjs/hooks/useResolveSearchSpringEntityData.js +17 -1
  9. package/dist/cjs/hooks/useResolveSearchSpringEntityData.js.map +1 -1
  10. package/dist/cjs/hooks/useResolveShopifyEntityData.js +30 -9
  11. package/dist/cjs/hooks/useResolveShopifyEntityData.js.map +1 -1
  12. package/dist/cjs/index.js +7 -2
  13. package/dist/cjs/index.js.map +1 -1
  14. package/dist/cjs/services/shopify/transformShopifyEntity.js +27 -6
  15. package/dist/cjs/services/shopify/transformShopifyEntity.js.map +1 -1
  16. package/dist/cjs/types/entity.js.map +1 -1
  17. package/dist/esm/component/types.js.map +1 -1
  18. package/dist/esm/entity/defaultExtractor.js +11 -0
  19. package/dist/esm/entity/defaultExtractor.js.map +1 -1
  20. package/dist/esm/entity/index.js +1 -0
  21. package/dist/esm/entity/index.js.map +1 -1
  22. package/dist/esm/entity/matchedVariant.js +146 -0
  23. package/dist/esm/entity/matchedVariant.js.map +1 -0
  24. package/dist/esm/hooks/useResolveSearchSpringEntityData.js +17 -1
  25. package/dist/esm/hooks/useResolveSearchSpringEntityData.js.map +1 -1
  26. package/dist/esm/hooks/useResolveShopifyEntityData.js +30 -9
  27. package/dist/esm/hooks/useResolveShopifyEntityData.js.map +1 -1
  28. package/dist/esm/index.js +1 -1
  29. package/dist/esm/index.js.map +1 -1
  30. package/dist/esm/services/shopify/transformShopifyEntity.js +27 -6
  31. package/dist/esm/services/shopify/transformShopifyEntity.js.map +1 -1
  32. package/dist/esm/types/entity.js.map +1 -1
  33. package/dist/types/component/types.d.ts +22 -0
  34. package/dist/types/component/types.d.ts.map +1 -1
  35. package/dist/types/entity/defaultExtractor.d.ts.map +1 -1
  36. package/dist/types/entity/index.d.ts +1 -0
  37. package/dist/types/entity/index.d.ts.map +1 -1
  38. package/dist/types/entity/matchedVariant.d.ts +79 -0
  39. package/dist/types/entity/matchedVariant.d.ts.map +1 -0
  40. package/dist/types/hooks/useResolveSearchSpringEntityData.d.ts +11 -0
  41. package/dist/types/hooks/useResolveSearchSpringEntityData.d.ts.map +1 -1
  42. package/dist/types/hooks/useResolveShopifyEntityData.d.ts +11 -0
  43. package/dist/types/hooks/useResolveShopifyEntityData.d.ts.map +1 -1
  44. package/dist/types/index.d.ts +2 -2
  45. package/dist/types/index.d.ts.map +1 -1
  46. package/dist/types/services/shopify/transformShopifyEntity.d.ts +2 -2
  47. package/dist/types/services/shopify/transformShopifyEntity.d.ts.map +1 -1
  48. package/dist/types/types/entity.d.ts +16 -0
  49. package/dist/types/types/entity.d.ts.map +1 -1
  50. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"names":["CLIENT_IDS","EXPERIMENT_IDS","createFeatureToggleReader","FeatureToggleProvider","useFeatureToggles","useFeatureToggle","getPartsByType","getPartByRole","getAllByRole","getHeading","getImages","getLinks","extractContent","extractContentMarkdown","deriveRole","DROP_SECTION","DIAGNOSTIC_TYPES","buildImageSearchFilter","ImageSearchFilterToken","backgroundFilter","HeroSectionDefinition","HeroEntitySectionDefinition","KpiSectionDefinition","FeatureCardsSectionDefinition","EntitySectionDefinition","EntityCollectionSectionDefinition","ComparisonSectionDefinition","TextBlockSectionDefinition","CtaBannerSectionDefinition","CalloutSectionDefinition","NextStepsSectionDefinition","FeatureSection9PlusDefinition","ListItemsSectionDefinition","SkipNodesSectionDefinition","HtmlCommentSectionDefinition","SearchSectionDefinition","ErrorSectionDefinition","FallbackSectionDefinition","createSdkRegistry","ComponentRegistry","validatePattern","validatePatternSyntax","validatePatternWithBlocks","convertToBlockElements","convertToBlockElementsWithMapping","Web5UrlType","isWeb5AskUrl","isWeb5EntityUrl","isWeb5ImageUrl","isWeb5IconUrl","isWeb5ActionUrl","isWeb5SearchUrl","isWeb5Url","isNavigableUrl","isValidLinkUrl","isLegacyUrl","parseWeb5Url","isValidWeb5Url","validateLinkUrl","isEntityLink","parseEntityLink","extractProtocol","extractLinkMetadata","findInvalidWeb5Links","hasImage","isHtmlComment","matchMarkdown","matchAllSections","nodesToParts","ComponentDependenciesProvider","useComponentDependencies","UserQueryProvider","useUserQuery","ChipsProvider","useChips","defaultExtractor","enrichEntitiesFromPayload","fetchEntityListData","listEntityItems","LIST_ITEMS_ENDPOINT","getEntityExtractor","registerEntityExtractor","transformToSolutionEntityData","transformToBlogPostEntityData","transformToGenericEntityData","CALLOUT_KINDS","useWeb5Link","useConversation","useDebugImageContext","useResolvedImageSources","useResolveGenericEntityData","useEntityTransforms","useMarkdownUtils","useResolveShopifyEntityData","useResolveSearchSpringEntityData","fetchProductsByHandles","fetchProductsByHandlesMap","transformSSProductToEntityItemData","addToCart","ShopifyStorefrontClient","resolveShopifyConfig","resolveShopifyEntity","transformShopifyProduct","transformShopifyCollection","transformShopifyArticle","transformShopifyEntityToItemData","PRODUCT_BY_HANDLE_QUERY","COLLECTION_BY_HANDLE_QUERY","ARTICLE_BY_HANDLE_QUERY","cn","normalizeImageUrl","getResizedImageUrl","analyzeBackdrop","computeContentBBox","buildProbeUrl","loadImagePixels","loadBackdropAnalysis","stripMarkdown","rgbToHsl","hslToRgb","ensureMinLightness","toRgb","deriveDarkColor","deriveDarkGradient","deriveLightColor","pushEvent","pushPromptSubmit","pushLinkClick","pushError","pushExit","pushEntityFiltered","hasAnalyticsConsent","ERROR_MARKDOWN","getErrorTypeFromStatus","createErrorMarkdown","STREAMING_TIMEOUT_MS","DEFAULT_ERROR_TEMPLATES","resolveErrorTemplate","getForwardStack","setForwardStack","clearForwardStack","pushToForwardStack","popFromForwardStack","UserQuery","PRODUCT_BACK_SESSION_KEY","writeProductBackHandoff","readProductBackHandoff","PromptEntryEmptyState","SearchSection","FeedbackBar","Disclaimer","BottomContainer","MarkdownText","CalloutBlock","OptimizedImage","SectionSkeleton","SmartIcon","Loader","PlacementLoader","UnifiedLink","detectLinkType","LinkType","Table","TableHeader","TableBody","TableFooter","TableHead","TableRow","TableCell","TableCaption","WEB5_USER_QUERY_EVENT","WEB5_ANSWER_UPDATED_EVENT","WEB5_REDIRECT_EVENT","loadClientBundle","getClientBundleOverride","isTrustedBundleHost","TEMPLATES_CDN_BASE","TEMPLATES_MANIFEST_URL","getTemplateOverride","isTemplatePickerRequested","isValidTemplateId","resolveClientBundleUrl","mergeClientConfig","applyThemeOverrides","THEME_OVERRIDE_TOKENS","THEME_TOKEN_CONTRACT","BRAND_TOKENS","EDITABLE_TOKENS","TOKEN_NAME_PATTERN","bucketOf","hostAliasFor","isThemeDebugEnabled","THEME_DEBUG_KEY","THEME_DEBUG_QUERY_PARAM","hexToHslTriplet","hslTripletToHex","isHslTriplet","PlacementResponseRenderer","PlacementSmoothHeight","buildPlacementDependencies","PlacementPayloadProvider","usePlacementPayload","UnifiedMarkdownParser","parseMarkdownToAst","parseAstToMarkdown","escapeWeb5Links","fixMalformedLinks","trimTrailingWhitespace","normalizeIconUrls","decodeLinkText","preprocessMarkdown","ComponentTracking","findKeywordsInContent","getContextualImageFilename","extractIntentFromMarkdown","getIntentFromMarkdown","createPageSection","generateSectionId","generateId","findImageInNode","findImageInChildren","DiagnosticsCollector","REFRESH_PROMPTS_UNTIL_KEY","REFRESH_PROMPTS_WINDOW_MS","getRefreshPromptsExpiry","shouldRefreshPrompts","enableRefreshPrompts","disableRefreshPrompts","BACKEND_ENVIRONMENT_KEY","BACKEND_ENVIRONMENT_QUERY_PARAM","DEFAULT_BACKEND_ENVIRONMENT","getBackendEnvironment","setBackendEnvironment","usesStagingBackend","isSimulationTraffic","MATCH_DEBUG_KEY","MATCH_DEBUG_QUERY_PARAM","isMatchDebugEnabled","setMatchDebug","resetMatchDebugCache","logMatchDebug","createWixAuthFetch","getOrCreateSessionId","getSessionId","getChatId","startNewChatId","setChatId","resetChatIdForTests","parseMarkdownToComponents","tryParseComponent","mergeSectionsWithStableReferences","WEB5_ROOT_ID","WEB5_ROOT_CLASS","WEB5_SCOPES","WEB5_SCOPE","WEB5_GLOBAL_TOKENS"],"sources":["../../src/index.ts"],"sourcesContent":["// Client IDs and experiment IDs\nexport { CLIENT_IDS, EXPERIMENT_IDS } from './clients';\n\nexport {\n type EmbedFeatureToggleResult,\n type FeatureToggleReader,\n createFeatureToggleReader,\n FeatureToggleProvider,\n useFeatureToggles,\n useFeatureToggle,\n} from './featureToggles/FeatureToggleContext';\n\n// Dev-only chrome injection contract for client packages\nexport type { DevEnvironment } from './client/devEnvironment';\n\n// Part types and helpers\nexport {\n type PartType,\n type Part,\n type HeadingPart,\n type ImagePart,\n type LinkPart,\n type ListPart,\n type ListItemPart,\n type KpiItemPart,\n type CardPart,\n type IconPart,\n type CalloutPart,\n type EntityPart,\n getPartsByType,\n getPartByRole,\n getAllByRole,\n getHeading,\n getImages,\n getLinks,\n extractContent,\n extractContentMarkdown,\n deriveRole,\n} from './parts/parts';\n\n// Component types\nexport type {\n BaseCompProps,\n SlotCompProps,\n SectionCompProps,\n SectionCompPropsWithSlot,\n TextCompProps,\n ButtonCompProps,\n ImageCompProps,\n BadgeCompProps,\n HeroButton,\n KpiItemCompProps,\n FeatureItemCompProps,\n FeatureCardCompProps,\n EntityItemData,\n EntityItem,\n GenericEntityData,\n GenericEntityCompProps,\n ComparisonRow,\n ComparisonColumn,\n AiNarrativeCompProps,\n HeroCompProps,\n HeroEntityCompProps,\n KpiCompProps,\n FeatureCardsCompProps,\n EntityCompProps,\n ComparisonCompProps,\n TextBlockCompProps,\n Component,\n BaseComponent,\n SlotComponent,\n SectionComponent,\n TextComponent,\n ButtonComponent,\n ImageComponent,\n BadgeComponent,\n KpiItemComponent,\n FeatureItemComponent,\n FeatureCardComponent,\n GenericEntityComponent,\n AiNarrativeComponent,\n ComparisonSectionComponent,\n TextBlockSectionComponent,\n HeroSectionComponent,\n HeroEntitySectionComponent,\n KpiSectionComponent,\n FeatureCardsSectionComponent,\n EntitySectionComponent,\n PropsOf,\n SectionFixture,\n CtaBannerCompProps,\n CtaBannerSectionComponent,\n CalloutCompProps,\n CalloutSectionComponent,\n NextStepsCompProps,\n NextStepsSectionComponent,\n FeatureSection9PlusCompProps,\n FeatureSection9PlusSectionComponent,\n ListItemsSectionCompProps,\n ListItemsSectionComponent,\n ErrorCompProps,\n ErrorSectionComponent,\n NullCompProps,\n NullSectionComponent,\n SolutionEntityCompProps,\n SolutionEntitySectionComponent,\n SolutionEntityData,\n BlogEntityCompProps,\n BlogEntitySectionComponent,\n BlogEntityData,\n GeneralTextCompProps,\n GeneralTextSectionComponent,\n PersonalizedNarrativeCompProps,\n PersonalizedNarrativeSectionComponent,\n} from './component/types';\n\n// Section definition\nexport type {\n SectionDefinition,\n ParseContext,\n ContextualImageResult,\n DropSection,\n} from './component/section-definition';\nexport { DROP_SECTION } from './component/section-definition';\n\n// Diagnostic types\nexport { DIAGNOSTIC_TYPES } from './component/diagnosticTypes';\nexport type { DiagnosticType } from './component/diagnosticTypes';\n\n// Image search filters\nexport {\n buildImageSearchFilter,\n type ImageSearchFilterString,\n} from './image/imageSearchFilterTypes';\nexport {\n ImageSearchFilterToken,\n backgroundFilter,\n} from './image/imageSearchFilters';\nexport type {\n ContextualImageAsset,\n ImageSourceInput,\n ResolvedImageSource,\n ResolvedImageSourceKind,\n} from './image/contextualImageTypes';\n\n// Section definition classes + createSdkRegistry\nexport {\n HeroSectionDefinition,\n HeroEntitySectionDefinition,\n KpiSectionDefinition,\n FeatureCardsSectionDefinition,\n EntitySectionDefinition,\n EntityCollectionSectionDefinition,\n ComparisonSectionDefinition,\n TextBlockSectionDefinition,\n CtaBannerSectionDefinition,\n CalloutSectionDefinition,\n NextStepsSectionDefinition,\n FeatureSection9PlusDefinition,\n ListItemsSectionDefinition,\n SkipNodesSectionDefinition,\n HtmlCommentSectionDefinition,\n SearchSectionDefinition,\n ErrorSectionDefinition,\n FallbackSectionDefinition,\n createSdkRegistry,\n} from './component/componentDefinitions';\n\n// Registry\nexport { ComponentRegistry } from './registry';\nexport type {\n SlotOptions,\n SectionOptions,\n SectionRegistration,\n SlotNode,\n SlotIntentNode,\n SectionIntentNode,\n SectionNode,\n SlotVariant,\n SectionVariant,\n RegistryCatalog,\n ActionResult,\n ActionHandler,\n} from './registry';\n\n// Pattern validator\nexport {\n validatePattern,\n validatePatternSyntax,\n validatePatternWithBlocks,\n type PatternValidationResult,\n type BlockElement,\n type EnrichedBlockElement,\n type LinkMetadata,\n type LinkAttribute,\n} from './patternValidator';\n\n// Markdown blocks\nexport {\n convertToBlockElements,\n convertToBlockElementsWithMapping,\n type BlockElementsWithMapping,\n} from './markdownBlocks';\n\n// Link types, enum & guards\nexport {\n Web5UrlType,\n type Web5AskUrl,\n type Web5EntityUrl,\n type Web5ImageUrl,\n type Web5IconUrl,\n type Web5ActionUrl,\n type Web5SearchUrl,\n type Web5Url,\n type HttpsUrl,\n type HttpUrl,\n type MailtoUrl,\n type RelativeUrl,\n type NavigableUrl,\n type ValidLinkUrl,\n type AnyKnownUrl,\n type LegacyUrl,\n isWeb5AskUrl,\n isWeb5EntityUrl,\n isWeb5ImageUrl,\n isWeb5IconUrl,\n isWeb5ActionUrl,\n isWeb5SearchUrl,\n isWeb5Url,\n isNavigableUrl,\n isValidLinkUrl,\n isLegacyUrl,\n} from './types/link-types';\n\n// Entity/URL parsing\nexport {\n parseWeb5Url,\n isValidWeb5Url,\n validateLinkUrl,\n type Web5UrlParsed,\n type Web5AskParsed,\n type Web5EntityParsed,\n type Web5ImageParsed,\n type Web5IconParsed,\n type Web5ActionParsed,\n type Web5SearchParsed,\n isEntityLink,\n parseEntityLink,\n extractProtocol,\n extractLinkMetadata,\n} from './utils/entityLinkParser';\n\n// Web5 link validation\nexport {\n findInvalidWeb5Links,\n type InvalidWeb5Link,\n} from './utils/web5LinkValidator';\n\n// Node matchers\nexport { hasImage, isHtmlComment } from './utils/nodeMatchers';\n\n// Match API\nexport {\n matchMarkdown,\n type MarkdownMatchResult,\n matchAllSections,\n type MatchAllSectionsResult,\n nodesToParts,\n} from './match';\n\n// ---------------------------------------------------------------------------\n// DI Infrastructure (moved from @wix/w5-client-circana)\n// ---------------------------------------------------------------------------\n\n// DI context and provider\nexport {\n ComponentDependenciesProvider,\n useComponentDependencies,\n type ComponentDependenciesProviderProps,\n} from './context/ComponentDependenciesContext';\n\n// Raw user query for the current response page\nexport {\n UserQueryProvider,\n useUserQuery,\n type UserQueryProviderProps,\n} from './context/UserQueryContext';\n\n// Chips context (suggestion chips shared between SearchSection and error states)\nexport {\n ChipsProvider,\n useChips,\n type SuggestionChip,\n} from './context/ChipsContext';\n\n// DI types\nexport type {\n ComponentDependencies,\n Web5LinkApi,\n ConversationApi,\n SendMessageTrackingOptions,\n SendMessageOptions,\n ComparisonSubmitPayload,\n ComparisonSelectedProduct,\n ProductComparisonSelectionState,\n ProductComparisonApi,\n EntityTransforms,\n MarkdownUtils,\n ResolveGenericEntityDataOptions,\n} from './types/dependencies';\nexport type {\n ApiPayloadItem,\n EntityTypeConfig,\n EntityConfig,\n EntityExtractionContext,\n} from './types/entity';\nexport {\n defaultExtractor,\n enrichEntitiesFromPayload,\n fetchEntityListData,\n listEntityItems,\n LIST_ITEMS_ENDPOINT,\n getEntityExtractor,\n registerEntityExtractor,\n transformToSolutionEntityData,\n transformToBlogPostEntityData,\n transformToGenericEntityData,\n} from './entity';\nexport type {\n EntityExtractor,\n FetchEntityListDataOptions,\n ListEntityItemsOptions,\n} from './entity';\nexport { CALLOUT_KINDS, type CalloutKind, type Callout } from './types/callout';\n\n// Wrapper hooks\nexport { useWeb5Link } from './hooks/useWeb5Link';\nexport { useConversation } from './hooks/useConversation';\nexport { useDebugImageContext } from './hooks/useDebugImageContext';\nexport { useResolvedImageSources } from './hooks/useResolvedImageSources';\nexport { useResolveGenericEntityData } from './hooks/useResolveGenericEntityData';\nexport { useEntityTransforms } from './hooks/useEntityTransforms';\nexport { useMarkdownUtils } from './hooks/useMarkdownUtils';\nexport { useResolveShopifyEntityData } from './hooks/useResolveShopifyEntityData';\nexport { useResolveSearchSpringEntityData } from './hooks/useResolveSearchSpringEntityData';\n\n// SearchSpring\nexport {\n fetchProductsByHandles,\n fetchProductsByHandlesMap,\n transformSSProductToEntityItemData,\n} from './services/searchspring';\nexport type {\n SearchSpringConfig,\n SSProduct,\n SSSearchResponse,\n SSSizeData,\n} from './services/searchspring';\n\n// Shopify Storefront API\n// Cart actions\nexport { addToCart } from './services/cart';\n\nexport {\n ShopifyStorefrontClient,\n resolveShopifyConfig,\n resolveShopifyEntity,\n transformShopifyProduct,\n transformShopifyCollection,\n transformShopifyArticle,\n transformShopifyEntityToItemData,\n PRODUCT_BY_HANDLE_QUERY,\n COLLECTION_BY_HANDLE_QUERY,\n ARTICLE_BY_HANDLE_QUERY,\n} from './services/shopify';\nexport type {\n ShopifyStorefrontConfig,\n ShopifyProduct,\n ShopifyCollection,\n ShopifyArticle,\n ShopifyImage,\n ShopifyMoneyV2,\n} from './services/shopify';\n\n// Utilities\nexport { cn } from './lib/utils';\nexport { normalizeImageUrl, getResizedImageUrl } from './utils/image-utils';\nexport {\n analyzeBackdrop,\n computeContentBBox,\n buildProbeUrl,\n loadImagePixels,\n loadBackdropAnalysis,\n type BackdropAnalysis,\n type ContentBBox,\n type ImagePixels,\n} from './utils/imageBackdrop';\nexport { stripMarkdown } from './component/componentDefinitions/parse-utils';\n\n// Color utilities\nexport {\n type RGB,\n rgbToHsl,\n hslToRgb,\n ensureMinLightness,\n toRgb,\n deriveDarkColor,\n deriveDarkGradient,\n deriveLightColor,\n} from './color/colorUtils';\n\n// Analytics\nexport {\n pushEvent,\n pushPromptSubmit,\n pushLinkClick,\n pushError,\n pushExit,\n pushEntityFiltered,\n hasAnalyticsConsent,\n type EntityFilteredReason,\n} from './utils/analyticsEvents';\n\n// Error handling types and utilities\nexport {\n type ConversationErrorType,\n ERROR_MARKDOWN,\n getErrorTypeFromStatus,\n createErrorMarkdown,\n STREAMING_TIMEOUT_MS,\n type ErrorActionType,\n type ErrorIconType,\n type ErrorTemplateButton,\n type ErrorTemplate,\n type ErrorTemplateOverrides,\n DEFAULT_ERROR_TEMPLATES,\n resolveErrorTemplate,\n} from './errors';\n\n// Navigation utilities\nexport {\n getForwardStack,\n setForwardStack,\n clearForwardStack,\n pushToForwardStack,\n popFromForwardStack,\n} from './utils/navigationStack';\n\n// UI components\nexport {\n UserQuery,\n type UserQueryProps,\n type ProductBackContext,\n} from './components/ui/UserQuery';\nexport {\n PRODUCT_BACK_SESSION_KEY,\n writeProductBackHandoff,\n readProductBackHandoff,\n type ProductBackHandoff,\n} from './utils/productBackHandoff';\nexport {\n PromptEntryEmptyState,\n type PromptEntryEmptyStateProps,\n} from './components/ui/PromptEntryEmptyState';\nexport {\n SearchSection,\n type SearchSectionProps,\n type SearchSectionHandle,\n type ScrollChip,\n} from './components/ui/SearchSection';\nexport {\n FeedbackBar,\n type FeedbackBarProps,\n type FeedbackCategoryOption,\n type FeedbackSentiment,\n type FeedbackSubmitInput,\n} from './components/ui/FeedbackBar';\nexport {\n Disclaimer,\n type DisclaimerProps,\n} from './components/ui/Disclaimer';\nexport {\n BottomContainer,\n type BottomContainerProps,\n} from './components/ui/BottomContainer';\nexport { MarkdownText } from './components/ui/MarkdownText';\nexport {\n CalloutBlock,\n type CalloutBlockProps,\n} from './components/ui/CalloutBlock';\nexport {\n OptimizedImage,\n type OptimizedImageProps,\n} from './components/ui/OptimizedImage';\nexport {\n SectionSkeleton,\n type SectionSkeletonProps,\n} from './components/ui/SectionSkeleton';\nexport { SmartIcon, type SmartIconProps } from './components/ui/SmartIcon';\nexport { Loader, type LoaderProps } from './components/ui/Loader';\nexport {\n PlacementLoader,\n type PlacementLoaderProps,\n} from './components/ui/PlacementLoader';\nexport {\n UnifiedLink,\n detectLinkType,\n type UnifiedLinkProps,\n LinkType,\n type LinkVariant,\n} from './components/ui/UnifiedLink';\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n} from './components/ui/table';\n\n// Placement (DL #088, DL #102 behavior declarations)\nexport type {\n PlacementBehaviorConfig,\n PlacementConfig,\n PlacementPrompts,\n} from './types/placement';\n\n// Cross-bundle user-query broadcast event (DL #097 D2)\nexport {\n WEB5_USER_QUERY_EVENT,\n type Web5UserQueryEventDetail,\n type Web5UserQueryEvent,\n} from './types/userQueryEvent';\n\n// Cross-bundle answer-updated broadcast event (B2B-4121)\nexport {\n WEB5_ANSWER_UPDATED_EVENT,\n type Web5AnswerUpdatedEventDetail,\n type Web5AnswerUpdatedEvent,\n} from './types/answerUpdatedEvent';\n\n// Cross-bundle redirect broadcast event (DL #098 D3)\nexport {\n WEB5_REDIRECT_EVENT,\n type Web5RedirectEventDetail,\n type Web5RedirectEvent,\n type Web5RedirectReason,\n} from './types/redirectEvent';\n// `placementFilter` was removed — hero/next-steps exclusion is the prompt's job\n// and placement-specific designs belong as `{ placement: true }` registry\n// variants (resolved automatically via `resolveSection(type, { placement: true })`).\n\n// Client bundle loader (DL #088 D3.3)\nexport { loadClientBundle } from './client/loadClientBundle';\n\n// `?clientBundleUrl=` dev override — shared by `web50-server-ui` and\n// `embed-placement` so the trusted-host gate can't drift between them.\nexport {\n getClientBundleOverride,\n isTrustedBundleHost,\n} from './client/clientBundleOverride';\n\n// Client-UMD URL resolution (DL #094 per-msid, DL #129 per-template) and the\n// universal bundle←backend config merge (DL #129 Q3/Q7) — shared by\n// `web50-server-ui` and `embed-placement`, the two client-bundle load sites.\nexport {\n TEMPLATES_CDN_BASE,\n TEMPLATES_MANIFEST_URL,\n getTemplateOverride,\n isTemplatePickerRequested,\n isValidTemplateId,\n resolveClientBundleUrl,\n} from './client/clientBundleUrl';\nexport { mergeClientConfig, type DeepPartial } from './client/mergeClientConfig';\nexport {\n applyThemeOverrides,\n THEME_OVERRIDE_TOKENS,\n type ThemeOverrideKey,\n type ThemeOverrides,\n} from './client/applyThemeOverrides';\nexport {\n THEME_TOKEN_CONTRACT,\n BRAND_TOKENS,\n EDITABLE_TOKENS,\n TOKEN_NAME_PATTERN,\n bucketOf,\n hostAliasFor,\n type TokenBucket,\n type TokenContractEntry,\n type TokenType,\n} from './theme/tokenContract';\nexport {\n isThemeDebugEnabled,\n THEME_DEBUG_KEY,\n THEME_DEBUG_QUERY_PARAM,\n type AppliedToken,\n type ThemeOverrideSource,\n} from './client/themeDebug';\nexport {\n hexToHslTriplet,\n hslTripletToHex,\n isHslTriplet,\n} from './theme/colorFormat';\n\n// Placement renderer + DI helper (DL #088 D3.2, D3.4)\nexport {\n PlacementResponseRenderer,\n PlacementSmoothHeight,\n type PlacementResponseRendererProps,\n type PlacementSection,\n type PlacementVariant,\n} from './components/placement/PlacementResponseRenderer';\nexport {\n buildPlacementDependencies,\n type BuildPlacementDependenciesOptions,\n} from './components/placement/buildPlacementDependencies';\nexport {\n PlacementPayloadProvider,\n usePlacementPayload,\n type PlacementPayloadContextValue,\n} from './components/placement/PlacementPayloadContext';\n\n// Markdown parsing utilities — lifted from web50-server-ui (DL #088 B9.1)\nexport {\n UnifiedMarkdownParser,\n parseMarkdownToAst,\n parseAstToMarkdown,\n} from './utils/unifiedMarkdownParser';\nexport {\n escapeWeb5Links,\n fixMalformedLinks,\n trimTrailingWhitespace,\n normalizeIconUrls,\n decodeLinkText,\n preprocessMarkdown,\n type PreprocessorDiagnostic,\n type PreprocessResult,\n} from './utils/markdownPreprocessor';\nexport {\n ComponentTracking,\n type ComponentNodeRange,\n} from './utils/componentTracking';\nexport {\n findKeywordsInContent,\n getContextualImageFilename,\n} from './utils/contentKeywordMatcher';\nexport {\n extractIntentFromMarkdown,\n getIntentFromMarkdown,\n type IntentInfo,\n type IntentExtractionOptions,\n type ResponseState,\n} from './utils/intentExtractor';\nexport type { PageSection } from './types/page-section';\nexport {\n createPageSection,\n generateSectionId,\n generateId,\n findImageInNode,\n findImageInChildren,\n type Product,\n type ComparisonProduct,\n type ProductComparisonSectionProps,\n} from './utils/propsExtractor';\nexport {\n DiagnosticsCollector,\n type DiagnosticEntry,\n} from './utils/diagnosticsCollector';\nexport {\n REFRESH_PROMPTS_UNTIL_KEY,\n REFRESH_PROMPTS_WINDOW_MS,\n getRefreshPromptsExpiry,\n shouldRefreshPrompts,\n enableRefreshPrompts,\n disableRefreshPrompts,\n} from './utils/refreshPrompts';\nexport {\n type BackendEnvironment,\n BACKEND_ENVIRONMENT_KEY,\n BACKEND_ENVIRONMENT_QUERY_PARAM,\n DEFAULT_BACKEND_ENVIRONMENT,\n getBackendEnvironment,\n setBackendEnvironment,\n usesStagingBackend,\n} from './utils/backendEnvironment';\nexport { isSimulationTraffic } from './utils/simulation';\nexport {\n MATCH_DEBUG_KEY,\n MATCH_DEBUG_QUERY_PARAM,\n isMatchDebugEnabled,\n setMatchDebug,\n resetMatchDebugCache,\n logMatchDebug,\n} from './utils/matchDebug';\nexport { createWixAuthFetch } from './client/wixAuthFetch';\nexport {\n getOrCreateSessionId,\n getSessionId,\n getChatId,\n startNewChatId,\n setChatId,\n resetChatIdForTests,\n} from './utils/sessionManager';\n\n// Component parser orchestrator — lifted from web50-server-ui (DL #088 B9.5)\nexport {\n parseMarkdownToComponents,\n tryParseComponent,\n mergeSectionsWithStableReferences,\n type ParseMarkdownOptions,\n type ParseMarkdownResult,\n type ComponentMatch,\n type ParserContext,\n} from './component/componentParser';\nexport type {\n ParserClientConfig,\n EnrichEntityProps,\n} from './component/parser-types';\n\n// Host-mount scope contract — shared by web50-server-ui (which stamps the\n// class and mounts), embed-placement (which mounts the same bundle elsewhere),\n// and the client CDN build (which compiles every selector against it).\nexport {\n WEB5_ROOT_ID,\n WEB5_ROOT_CLASS,\n WEB5_SCOPES,\n WEB5_SCOPE,\n WEB5_GL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A0B,QACrB,+BAA+B;AACtC,SACEC,yBAAyB,EACzBC,qBAAqB,QAIhB,yBAAyB;AAEhC,SACEC,iBAAiB,EACjBC,iBAAiB,EACjBC,UAAU,EACVC,eAAe,EACfC,mBAAmB,QAId,wBAAwB;AAC/B,SACEC,oBAAoB,QAEf,8BAA8B;AACrC,SACEC,yBAAyB,EACzBC,yBAAyB,EACzBC,uBAAuB,EACvBC,oBAAoB,EACpBC,oBAAoB,EACpBC,qBAAqB,QAChB,wBAAwB;AAC/B,SAEEC,uBAAuB,EACvBC,+BAA+B,EAC/BC,2BAA2B,EAC3BC,qBAAqB,EACrBC,qBAAqB,EACrBC,kBAAkB,QACb,4BAA4B;AACnC,SAASC,mBAAmB,QAAQ,oBAAoB;AACxD,SACEC,eAAe,EACfC,uBAAuB,EACvBC,mBAAmB,EACnBC,aAAa,EACbC,oBAAoB,EACpBC,aAAa,QACR,oBAAoB;AAC3B,SAASC,kBAAkB,QAAQ,uBAAuB;AAC1D,SACEC,oBAAoB,EACpBC,YAAY,EACZC,SAAS,EACTC,cAAc,EACdC,SAAS,EACTC,mBAAmB,QACd,wBAAwB;;AAE/B;AACA,SACEC,yBAAyB,EACzBC,iBAAiB,EACjBC,iCAAiC,QAK5B,6BAA6B;AAMpC;AACA;AACA;AACA,SACEC,YAAY,EACZC,eAAe,EACfC,WAAW,EACXC,UAAU,EACVC,kBAAkB,QAEb,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["CLIENT_IDS","EXPERIMENT_IDS","createFeatureToggleReader","FeatureToggleProvider","useFeatureToggles","useFeatureToggle","getPartsByType","getPartByRole","getAllByRole","getHeading","getImages","getLinks","extractContent","extractContentMarkdown","deriveRole","DROP_SECTION","DIAGNOSTIC_TYPES","buildImageSearchFilter","ImageSearchFilterToken","backgroundFilter","HeroSectionDefinition","HeroEntitySectionDefinition","KpiSectionDefinition","FeatureCardsSectionDefinition","EntitySectionDefinition","EntityCollectionSectionDefinition","ComparisonSectionDefinition","TextBlockSectionDefinition","CtaBannerSectionDefinition","CalloutSectionDefinition","NextStepsSectionDefinition","FeatureSection9PlusDefinition","ListItemsSectionDefinition","SkipNodesSectionDefinition","HtmlCommentSectionDefinition","SearchSectionDefinition","ErrorSectionDefinition","FallbackSectionDefinition","createSdkRegistry","ComponentRegistry","validatePattern","validatePatternSyntax","validatePatternWithBlocks","convertToBlockElements","convertToBlockElementsWithMapping","Web5UrlType","isWeb5AskUrl","isWeb5EntityUrl","isWeb5ImageUrl","isWeb5IconUrl","isWeb5ActionUrl","isWeb5SearchUrl","isWeb5Url","isNavigableUrl","isValidLinkUrl","isLegacyUrl","parseWeb5Url","isValidWeb5Url","validateLinkUrl","isEntityLink","parseEntityLink","extractProtocol","extractLinkMetadata","findInvalidWeb5Links","hasImage","isHtmlComment","matchMarkdown","matchAllSections","nodesToParts","ComponentDependenciesProvider","useComponentDependencies","UserQueryProvider","useUserQuery","ChipsProvider","useChips","defaultExtractor","enrichEntitiesFromPayload","fetchEntityListData","listEntityItems","LIST_ITEMS_ENDPOINT","getEntityExtractor","registerEntityExtractor","transformToSolutionEntityData","transformToBlogPostEntityData","transformToGenericEntityData","toMatchedOptions","formatMoney","readCurrencyCode","formatPriceField","formatProductPriceLabel","CALLOUT_KINDS","useWeb5Link","useConversation","useDebugImageContext","useResolvedImageSources","useResolveGenericEntityData","useEntityTransforms","useMarkdownUtils","useResolveShopifyEntityData","useResolveSearchSpringEntityData","fetchProductsByHandles","fetchProductsByHandlesMap","transformSSProductToEntityItemData","addToCart","ShopifyStorefrontClient","resolveShopifyConfig","resolveShopifyEntity","transformShopifyProduct","transformShopifyCollection","transformShopifyArticle","transformShopifyEntityToItemData","PRODUCT_BY_HANDLE_QUERY","COLLECTION_BY_HANDLE_QUERY","ARTICLE_BY_HANDLE_QUERY","cn","normalizeImageUrl","getResizedImageUrl","analyzeBackdrop","computeContentBBox","buildProbeUrl","loadImagePixels","loadBackdropAnalysis","stripMarkdown","rgbToHsl","hslToRgb","ensureMinLightness","toRgb","deriveDarkColor","deriveDarkGradient","deriveLightColor","pushEvent","pushPromptSubmit","pushLinkClick","pushError","pushExit","pushEntityFiltered","hasAnalyticsConsent","ERROR_MARKDOWN","getErrorTypeFromStatus","createErrorMarkdown","STREAMING_TIMEOUT_MS","DEFAULT_ERROR_TEMPLATES","resolveErrorTemplate","getForwardStack","setForwardStack","clearForwardStack","pushToForwardStack","popFromForwardStack","UserQuery","PRODUCT_BACK_SESSION_KEY","writeProductBackHandoff","readProductBackHandoff","PromptEntryEmptyState","SearchSection","FeedbackBar","Disclaimer","BottomContainer","MarkdownText","CalloutBlock","OptimizedImage","SectionSkeleton","SmartIcon","Loader","PlacementLoader","UnifiedLink","detectLinkType","LinkType","Table","TableHeader","TableBody","TableFooter","TableHead","TableRow","TableCell","TableCaption","WEB5_USER_QUERY_EVENT","WEB5_ANSWER_UPDATED_EVENT","WEB5_REDIRECT_EVENT","loadClientBundle","getClientBundleOverride","isTrustedBundleHost","TEMPLATES_CDN_BASE","TEMPLATES_MANIFEST_URL","getTemplateOverride","isTemplatePickerRequested","isValidTemplateId","resolveClientBundleUrl","mergeClientConfig","applyThemeOverrides","THEME_OVERRIDE_TOKENS","THEME_TOKEN_CONTRACT","BRAND_TOKENS","EDITABLE_TOKENS","TOKEN_NAME_PATTERN","bucketOf","hostAliasFor","isThemeDebugEnabled","THEME_DEBUG_KEY","THEME_DEBUG_QUERY_PARAM","hexToHslTriplet","hslTripletToHex","isHslTriplet","PlacementResponseRenderer","PlacementSmoothHeight","buildPlacementDependencies","PlacementPayloadProvider","usePlacementPayload","UnifiedMarkdownParser","parseMarkdownToAst","parseAstToMarkdown","escapeWeb5Links","fixMalformedLinks","trimTrailingWhitespace","normalizeIconUrls","decodeLinkText","preprocessMarkdown","ComponentTracking","findKeywordsInContent","getContextualImageFilename","extractIntentFromMarkdown","getIntentFromMarkdown","createPageSection","generateSectionId","generateId","findImageInNode","findImageInChildren","DiagnosticsCollector","REFRESH_PROMPTS_UNTIL_KEY","REFRESH_PROMPTS_WINDOW_MS","getRefreshPromptsExpiry","shouldRefreshPrompts","enableRefreshPrompts","disableRefreshPrompts","BACKEND_ENVIRONMENT_KEY","BACKEND_ENVIRONMENT_QUERY_PARAM","DEFAULT_BACKEND_ENVIRONMENT","getBackendEnvironment","setBackendEnvironment","usesStagingBackend","isSimulationTraffic","MATCH_DEBUG_KEY","MATCH_DEBUG_QUERY_PARAM","isMatchDebugEnabled","setMatchDebug","resetMatchDebugCache","logMatchDebug","createWixAuthFetch","getOrCreateSessionId","getSessionId","getChatId","startNewChatId","setChatId","resetChatIdForTests","parseMarkdownToComponents","tryParseComponent","mergeSectionsWithStableReferences","WEB5_ROOT_ID","WEB5_ROOT_CLASS","WEB5_SCOPES","WEB5_SCOPE","WEB5_GLOBAL_TOKENS"],"sources":["../../src/index.ts"],"sourcesContent":["// Client IDs and experiment IDs\nexport { CLIENT_IDS, EXPERIMENT_IDS } from './clients';\n\nexport {\n type EmbedFeatureToggleResult,\n type FeatureToggleReader,\n createFeatureToggleReader,\n FeatureToggleProvider,\n useFeatureToggles,\n useFeatureToggle,\n} from './featureToggles/FeatureToggleContext';\n\n// Dev-only chrome injection contract for client packages\nexport type { DevEnvironment } from './client/devEnvironment';\n\n// Part types and helpers\nexport {\n type PartType,\n type Part,\n type HeadingPart,\n type ImagePart,\n type LinkPart,\n type ListPart,\n type ListItemPart,\n type KpiItemPart,\n type CardPart,\n type IconPart,\n type CalloutPart,\n type EntityPart,\n getPartsByType,\n getPartByRole,\n getAllByRole,\n getHeading,\n getImages,\n getLinks,\n extractContent,\n extractContentMarkdown,\n deriveRole,\n} from './parts/parts';\n\n// Component types\nexport type {\n BaseCompProps,\n SlotCompProps,\n SectionCompProps,\n SectionCompPropsWithSlot,\n TextCompProps,\n ButtonCompProps,\n ImageCompProps,\n BadgeCompProps,\n HeroButton,\n KpiItemCompProps,\n FeatureItemCompProps,\n FeatureCardCompProps,\n EntityItemData,\n EntityItem,\n GenericEntityData,\n GenericEntityCompProps,\n ComparisonRow,\n ComparisonColumn,\n AiNarrativeCompProps,\n HeroCompProps,\n HeroEntityCompProps,\n KpiCompProps,\n FeatureCardsCompProps,\n EntityCompProps,\n ComparisonCompProps,\n TextBlockCompProps,\n Component,\n BaseComponent,\n SlotComponent,\n SectionComponent,\n TextComponent,\n ButtonComponent,\n ImageComponent,\n BadgeComponent,\n KpiItemComponent,\n FeatureItemComponent,\n FeatureCardComponent,\n GenericEntityComponent,\n AiNarrativeComponent,\n ComparisonSectionComponent,\n TextBlockSectionComponent,\n HeroSectionComponent,\n HeroEntitySectionComponent,\n KpiSectionComponent,\n FeatureCardsSectionComponent,\n EntitySectionComponent,\n PropsOf,\n SectionFixture,\n CtaBannerCompProps,\n CtaBannerSectionComponent,\n CalloutCompProps,\n CalloutSectionComponent,\n NextStepsCompProps,\n NextStepsSectionComponent,\n FeatureSection9PlusCompProps,\n FeatureSection9PlusSectionComponent,\n ListItemsSectionCompProps,\n ListItemsSectionComponent,\n ErrorCompProps,\n ErrorSectionComponent,\n NullCompProps,\n NullSectionComponent,\n SolutionEntityCompProps,\n SolutionEntitySectionComponent,\n SolutionEntityData,\n BlogEntityCompProps,\n BlogEntitySectionComponent,\n BlogEntityData,\n GeneralTextCompProps,\n GeneralTextSectionComponent,\n PersonalizedNarrativeCompProps,\n PersonalizedNarrativeSectionComponent,\n} from './component/types';\n\n// Section definition\nexport type {\n SectionDefinition,\n ParseContext,\n ContextualImageResult,\n DropSection,\n} from './component/section-definition';\nexport { DROP_SECTION } from './component/section-definition';\n\n// Diagnostic types\nexport { DIAGNOSTIC_TYPES } from './component/diagnosticTypes';\nexport type { DiagnosticType } from './component/diagnosticTypes';\n\n// Image search filters\nexport {\n buildImageSearchFilter,\n type ImageSearchFilterString,\n} from './image/imageSearchFilterTypes';\nexport {\n ImageSearchFilterToken,\n backgroundFilter,\n} from './image/imageSearchFilters';\nexport type {\n ContextualImageAsset,\n ImageSourceInput,\n ResolvedImageSource,\n ResolvedImageSourceKind,\n} from './image/contextualImageTypes';\n\n// Section definition classes + createSdkRegistry\nexport {\n HeroSectionDefinition,\n HeroEntitySectionDefinition,\n KpiSectionDefinition,\n FeatureCardsSectionDefinition,\n EntitySectionDefinition,\n EntityCollectionSectionDefinition,\n ComparisonSectionDefinition,\n TextBlockSectionDefinition,\n CtaBannerSectionDefinition,\n CalloutSectionDefinition,\n NextStepsSectionDefinition,\n FeatureSection9PlusDefinition,\n ListItemsSectionDefinition,\n SkipNodesSectionDefinition,\n HtmlCommentSectionDefinition,\n SearchSectionDefinition,\n ErrorSectionDefinition,\n FallbackSectionDefinition,\n createSdkRegistry,\n} from './component/componentDefinitions';\n\n// Registry\nexport { ComponentRegistry } from './registry';\nexport type {\n SlotOptions,\n SectionOptions,\n SectionRegistration,\n SlotNode,\n SlotIntentNode,\n SectionIntentNode,\n SectionNode,\n SlotVariant,\n SectionVariant,\n RegistryCatalog,\n ActionResult,\n ActionHandler,\n} from './registry';\n\n// Pattern validator\nexport {\n validatePattern,\n validatePatternSyntax,\n validatePatternWithBlocks,\n type PatternValidationResult,\n type BlockElement,\n type EnrichedBlockElement,\n type LinkMetadata,\n type LinkAttribute,\n} from './patternValidator';\n\n// Markdown blocks\nexport {\n convertToBlockElements,\n convertToBlockElementsWithMapping,\n type BlockElementsWithMapping,\n} from './markdownBlocks';\n\n// Link types, enum & guards\nexport {\n Web5UrlType,\n type Web5AskUrl,\n type Web5EntityUrl,\n type Web5ImageUrl,\n type Web5IconUrl,\n type Web5ActionUrl,\n type Web5SearchUrl,\n type Web5Url,\n type HttpsUrl,\n type HttpUrl,\n type MailtoUrl,\n type RelativeUrl,\n type NavigableUrl,\n type ValidLinkUrl,\n type AnyKnownUrl,\n type LegacyUrl,\n isWeb5AskUrl,\n isWeb5EntityUrl,\n isWeb5ImageUrl,\n isWeb5IconUrl,\n isWeb5ActionUrl,\n isWeb5SearchUrl,\n isWeb5Url,\n isNavigableUrl,\n isValidLinkUrl,\n isLegacyUrl,\n} from './types/link-types';\n\n// Entity/URL parsing\nexport {\n parseWeb5Url,\n isValidWeb5Url,\n validateLinkUrl,\n type Web5UrlParsed,\n type Web5AskParsed,\n type Web5EntityParsed,\n type Web5ImageParsed,\n type Web5IconParsed,\n type Web5ActionParsed,\n type Web5SearchParsed,\n isEntityLink,\n parseEntityLink,\n extractProtocol,\n extractLinkMetadata,\n} from './utils/entityLinkParser';\n\n// Web5 link validation\nexport {\n findInvalidWeb5Links,\n type InvalidWeb5Link,\n} from './utils/web5LinkValidator';\n\n// Node matchers\nexport { hasImage, isHtmlComment } from './utils/nodeMatchers';\n\n// Match API\nexport {\n matchMarkdown,\n type MarkdownMatchResult,\n matchAllSections,\n type MatchAllSectionsResult,\n nodesToParts,\n} from './match';\n\n// ---------------------------------------------------------------------------\n// DI Infrastructure (moved from @wix/w5-client-circana)\n// ---------------------------------------------------------------------------\n\n// DI context and provider\nexport {\n ComponentDependenciesProvider,\n useComponentDependencies,\n type ComponentDependenciesProviderProps,\n} from './context/ComponentDependenciesContext';\n\n// Raw user query for the current response page\nexport {\n UserQueryProvider,\n useUserQuery,\n type UserQueryProviderProps,\n} from './context/UserQueryContext';\n\n// Chips context (suggestion chips shared between SearchSection and error states)\nexport {\n ChipsProvider,\n useChips,\n type SuggestionChip,\n} from './context/ChipsContext';\n\n// DI types\nexport type {\n ComponentDependencies,\n Web5LinkApi,\n ConversationApi,\n SendMessageTrackingOptions,\n SendMessageOptions,\n ComparisonSubmitPayload,\n ComparisonSelectedProduct,\n ProductComparisonSelectionState,\n ProductComparisonApi,\n EntityTransforms,\n MarkdownUtils,\n ResolveGenericEntityDataOptions,\n} from './types/dependencies';\nexport type {\n ApiPayloadItem,\n EntityTypeConfig,\n EntityConfig,\n EntityExtractionContext,\n} from './types/entity';\nexport {\n defaultExtractor,\n enrichEntitiesFromPayload,\n fetchEntityListData,\n listEntityItems,\n LIST_ITEMS_ENDPOINT,\n getEntityExtractor,\n registerEntityExtractor,\n transformToSolutionEntityData,\n transformToBlogPostEntityData,\n transformToGenericEntityData,\n toMatchedOptions,\n formatMoney,\n readCurrencyCode,\n formatPriceField,\n formatProductPriceLabel,\n} from './entity';\nexport type {\n EntityExtractor,\n FetchEntityListDataOptions,\n ListEntityItemsOptions,\n MatchedOption,\n ProductPriceFields,\n} from './entity';\nexport { CALLOUT_KINDS, type CalloutKind, type Callout } from './types/callout';\n\n// Wrapper hooks\nexport { useWeb5Link } from './hooks/useWeb5Link';\nexport { useConversation } from './hooks/useConversation';\nexport { useDebugImageContext } from './hooks/useDebugImageContext';\nexport { useResolvedImageSources } from './hooks/useResolvedImageSources';\nexport { useResolveGenericEntityData } from './hooks/useResolveGenericEntityData';\nexport { useEntityTransforms } from './hooks/useEntityTransforms';\nexport { useMarkdownUtils } from './hooks/useMarkdownUtils';\nexport { useResolveShopifyEntityData } from './hooks/useResolveShopifyEntityData';\nexport { useResolveSearchSpringEntityData } from './hooks/useResolveSearchSpringEntityData';\n\n// SearchSpring\nexport {\n fetchProductsByHandles,\n fetchProductsByHandlesMap,\n transformSSProductToEntityItemData,\n} from './services/searchspring';\nexport type {\n SearchSpringConfig,\n SSProduct,\n SSSearchResponse,\n SSSizeData,\n} from './services/searchspring';\n\n// Shopify Storefront API\n// Cart actions\nexport { addToCart } from './services/cart';\n\nexport {\n ShopifyStorefrontClient,\n resolveShopifyConfig,\n resolveShopifyEntity,\n transformShopifyProduct,\n transformShopifyCollection,\n transformShopifyArticle,\n transformShopifyEntityToItemData,\n PRODUCT_BY_HANDLE_QUERY,\n COLLECTION_BY_HANDLE_QUERY,\n ARTICLE_BY_HANDLE_QUERY,\n} from './services/shopify';\nexport type {\n ShopifyStorefrontConfig,\n ShopifyProduct,\n ShopifyCollection,\n ShopifyArticle,\n ShopifyImage,\n ShopifyMoneyV2,\n} from './services/shopify';\n\n// Utilities\nexport { cn } from './lib/utils';\nexport { normalizeImageUrl, getResizedImageUrl } from './utils/image-utils';\nexport {\n analyzeBackdrop,\n computeContentBBox,\n buildProbeUrl,\n loadImagePixels,\n loadBackdropAnalysis,\n type BackdropAnalysis,\n type ContentBBox,\n type ImagePixels,\n} from './utils/imageBackdrop';\nexport { stripMarkdown } from './component/componentDefinitions/parse-utils';\n\n// Color utilities\nexport {\n type RGB,\n rgbToHsl,\n hslToRgb,\n ensureMinLightness,\n toRgb,\n deriveDarkColor,\n deriveDarkGradient,\n deriveLightColor,\n} from './color/colorUtils';\n\n// Analytics\nexport {\n pushEvent,\n pushPromptSubmit,\n pushLinkClick,\n pushError,\n pushExit,\n pushEntityFiltered,\n hasAnalyticsConsent,\n type EntityFilteredReason,\n} from './utils/analyticsEvents';\n\n// Error handling types and utilities\nexport {\n type ConversationErrorType,\n ERROR_MARKDOWN,\n getErrorTypeFromStatus,\n createErrorMarkdown,\n STREAMING_TIMEOUT_MS,\n type ErrorActionType,\n type ErrorIconType,\n type ErrorTemplateButton,\n type ErrorTemplate,\n type ErrorTemplateOverrides,\n DEFAULT_ERROR_TEMPLATES,\n resolveErrorTemplate,\n} from './errors';\n\n// Navigation utilities\nexport {\n getForwardStack,\n setForwardStack,\n clearForwardStack,\n pushToForwardStack,\n popFromForwardStack,\n} from './utils/navigationStack';\n\n// UI components\nexport {\n UserQuery,\n type UserQueryProps,\n type ProductBackContext,\n} from './components/ui/UserQuery';\nexport {\n PRODUCT_BACK_SESSION_KEY,\n writeProductBackHandoff,\n readProductBackHandoff,\n type ProductBackHandoff,\n} from './utils/productBackHandoff';\nexport {\n PromptEntryEmptyState,\n type PromptEntryEmptyStateProps,\n} from './components/ui/PromptEntryEmptyState';\nexport {\n SearchSection,\n type SearchSectionProps,\n type SearchSectionHandle,\n type ScrollChip,\n} from './components/ui/SearchSection';\nexport {\n FeedbackBar,\n type FeedbackBarProps,\n type FeedbackCategoryOption,\n type FeedbackSentiment,\n type FeedbackSubmitInput,\n} from './components/ui/FeedbackBar';\nexport {\n Disclaimer,\n type DisclaimerProps,\n} from './components/ui/Disclaimer';\nexport {\n BottomContainer,\n type BottomContainerProps,\n} from './components/ui/BottomContainer';\nexport { MarkdownText } from './components/ui/MarkdownText';\nexport {\n CalloutBlock,\n type CalloutBlockProps,\n} from './components/ui/CalloutBlock';\nexport {\n OptimizedImage,\n type OptimizedImageProps,\n} from './components/ui/OptimizedImage';\nexport {\n SectionSkeleton,\n type SectionSkeletonProps,\n} from './components/ui/SectionSkeleton';\nexport { SmartIcon, type SmartIconProps } from './components/ui/SmartIcon';\nexport { Loader, type LoaderProps } from './components/ui/Loader';\nexport {\n PlacementLoader,\n type PlacementLoaderProps,\n} from './components/ui/PlacementLoader';\nexport {\n UnifiedLink,\n detectLinkType,\n type UnifiedLinkProps,\n LinkType,\n type LinkVariant,\n} from './components/ui/UnifiedLink';\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n} from './components/ui/table';\n\n// Placement (DL #088, DL #102 behavior declarations)\nexport type {\n PlacementBehaviorConfig,\n PlacementConfig,\n PlacementPrompts,\n} from './types/placement';\n\n// Cross-bundle user-query broadcast event (DL #097 D2)\nexport {\n WEB5_USER_QUERY_EVENT,\n type Web5UserQueryEventDetail,\n type Web5UserQueryEvent,\n} from './types/userQueryEvent';\n\n// Cross-bundle answer-updated broadcast event (B2B-4121)\nexport {\n WEB5_ANSWER_UPDATED_EVENT,\n type Web5AnswerUpdatedEventDetail,\n type Web5AnswerUpdatedEvent,\n} from './types/answerUpdatedEvent';\n\n// Cross-bundle redirect broadcast event (DL #098 D3)\nexport {\n WEB5_REDIRECT_EVENT,\n type Web5RedirectEventDetail,\n type Web5RedirectEvent,\n type Web5RedirectReason,\n} from './types/redirectEvent';\n// `placementFilter` was removed — hero/next-steps exclusion is the prompt's job\n// and placement-specific designs belong as `{ placement: true }` registry\n// variants (resolved automatically via `resolveSection(type, { placement: true })`).\n\n// Client bundle loader (DL #088 D3.3)\nexport { loadClientBundle } from './client/loadClientBundle';\n\n// `?clientBundleUrl=` dev override — shared by `web50-server-ui` and\n// `embed-placement` so the trusted-host gate can't drift between them.\nexport {\n getClientBundleOverride,\n isTrustedBundleHost,\n} from './client/clientBundleOverride';\n\n// Client-UMD URL resolution (DL #094 per-msid, DL #129 per-template) and the\n// universal bundle←backend config merge (DL #129 Q3/Q7) — shared by\n// `web50-server-ui` and `embed-placement`, the two client-bundle load sites.\nexport {\n TEMPLATES_CDN_BASE,\n TEMPLATES_MANIFEST_URL,\n getTemplateOverride,\n isTemplatePickerRequested,\n isValidTemplateId,\n resolveClientBundleUrl,\n} from './client/clientBundleUrl';\nexport { mergeClientConfig, type DeepPartial } from './client/mergeClientConfig';\nexport {\n applyThemeOverrides,\n THEME_OVERRIDE_TOKENS,\n type ThemeOverrideKey,\n type ThemeOverrides,\n} from './client/applyThemeOverrides';\nexport {\n THEME_TOKEN_CONTRACT,\n BRAND_TOKENS,\n EDITABLE_TOKENS,\n TOKEN_NAME_PATTERN,\n bucketOf,\n hostAliasFor,\n type TokenBucket,\n type TokenContractEntry,\n type TokenType,\n} from './theme/tokenContract';\nexport {\n isThemeDebugEnabled,\n THEME_DEBUG_KEY,\n THEME_DEBUG_QUERY_PARAM,\n type AppliedToken,\n type ThemeOverrideSource,\n} from './client/themeDebug';\nexport {\n hexToHslTriplet,\n hslTripletToHex,\n isHslTriplet,\n} from './theme/colorFormat';\n\n// Placement renderer + DI helper (DL #088 D3.2, D3.4)\nexport {\n PlacementResponseRenderer,\n PlacementSmoothHeight,\n type PlacementResponseRendererProps,\n type PlacementSection,\n type PlacementVariant,\n} from './components/placement/PlacementResponseRenderer';\nexport {\n buildPlacementDependencies,\n type BuildPlacementDependenciesOptions,\n} from './components/placement/buildPlacementDependencies';\nexport {\n PlacementPayloadProvider,\n usePlacementPayload,\n type PlacementPayloadContextValue,\n} from './components/placement/PlacementPayloadContext';\n\n// Markdown parsing utilities — lifted from web50-server-ui (DL #088 B9.1)\nexport {\n UnifiedMarkdownParser,\n parseMarkdownToAst,\n parseAstToMarkdown,\n} from './utils/unifiedMarkdownParser';\nexport {\n escapeWeb5Links,\n fixMalformedLinks,\n trimTrailingWhitespace,\n normalizeIconUrls,\n decodeLinkText,\n preprocessMarkdown,\n type PreprocessorDiagnostic,\n type PreprocessResult,\n} from './utils/markdownPreprocessor';\nexport {\n ComponentTracking,\n type ComponentNodeRange,\n} from './utils/componentTracking';\nexport {\n findKeywordsInContent,\n getContextualImageFilename,\n} from './utils/contentKeywordMatcher';\nexport {\n extractIntentFromMarkdown,\n getIntentFromMarkdown,\n type IntentInfo,\n type IntentExtractionOptions,\n type ResponseState,\n} from './utils/intentExtractor';\nexport type { PageSection } from './types/page-section';\nexport {\n createPageSection,\n generateSectionId,\n generateId,\n findImageInNode,\n findImageInChildren,\n type Product,\n type ComparisonProduct,\n type ProductComparisonSectionProps,\n} from './utils/propsExtractor';\nexport {\n DiagnosticsCollector,\n type DiagnosticEntry,\n} from './utils/diagnosticsCollector';\nexport {\n REFRESH_PROMPTS_UNTIL_KEY,\n REFRESH_PROMPTS_WINDOW_MS,\n getRefreshPromptsExpiry,\n shouldRefreshPrompts,\n enableRefreshPrompts,\n disableRefreshPrompts,\n} from './utils/refreshPrompts';\nexport {\n type BackendEnvironment,\n BACKEND_ENVIRONMENT_KEY,\n BACKEND_ENVIRONMENT_QUERY_PARAM,\n DEFAULT_BACKEND_ENVIRONMENT,\n getBackendEnvironment,\n setBackendEnvironment,\n usesStagingBackend,\n} from './utils/backendEnvironment';\nexport { isSimulationTraffic } from './utils/simulation';\nexport {\n MATCH_DEBUG_KEY,\n MATCH_DEBUG_QUERY_PARAM,\n isMatchDebugEnabled,\n setMatchDebug,\n resetMatchDebugCache,\n logMatchDebug,\n} from './utils/matchDebug';\nexport { createWixAuthFetch } from './client/wixAuthFetch';\nexport {\n getOrCreateSessionId,\n getSessionId,\n getChatId,\n startNewChatId,\n setChatId,\n resetChatIdForTests,\n} from './utils/sessionManager';\n\n// Component parser orchestrator — lifted from web50-server-ui (DL #088 B9.5)\nexport {\n parseMarkdownToComponents,\n tryParseComponent,\n mergeSectionsWithStableReferences,\n type ParseMarkdownOptions,\n type ParseMarkdownResult,\n type ComponentMatch,\n type ParserContext,\n} from './component/componentParser';\nexport type {\n ParserClientConfig,\n EnrichEntityProps,\n} from './component/parser-types';\n\n// Host-mount scope contract — shared by web50-server-ui (which stamps the\n// class and mounts), embed-placement (which mounts the same bundle elsewhere),\n// and the client CDN build (which compiles every selector against it).\nexport {\n WEB5_ROOT_ID,\n WEB5_ROOT_CLASS,\n WEB5_SCOPES,\n WEB5_SCOPE,\n WEB5_GLOBAL_TOKENS,\n type HostFitConfig,\n} from './hostScope';\n"],"mappings":"AAAA;AACA,SAASA,UAAU,EAAEC,cAAc,QAAQ,WAAW;AAEtD,SAGEC,yBAAyB,EACzBC,qBAAqB,EACrBC,iBAAiB,EACjBC,gBAAgB,QACX,uCAAuC;;AAE9C;;AAGA;AACA,SAaEC,cAAc,EACdC,aAAa,EACbC,YAAY,EACZC,UAAU,EACVC,SAAS,EACTC,QAAQ,EACRC,cAAc,EACdC,sBAAsB,EACtBC,UAAU,QACL,eAAe;;AAEtB;;AA4EA;;AAOA,SAASC,YAAY,QAAQ,gCAAgC;;AAE7D;AACA,SAASC,gBAAgB,QAAQ,6BAA6B;AAG9D;AACA,SACEC,sBAAsB,QAEjB,gCAAgC;AACvC,SACEC,sBAAsB,EACtBC,gBAAgB,QACX,4BAA4B;AAQnC;AACA,SACEC,qBAAqB,EACrBC,2BAA2B,EAC3BC,oBAAoB,EACpBC,6BAA6B,EAC7BC,uBAAuB,EACvBC,iCAAiC,EACjCC,2BAA2B,EAC3BC,0BAA0B,EAC1BC,0BAA0B,EAC1BC,wBAAwB,EACxBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,0BAA0B,EAC1BC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,uBAAuB,EACvBC,sBAAsB,EACtBC,yBAAyB,EACzBC,iBAAiB,QACZ,kCAAkC;;AAEzC;AACA,SAASC,iBAAiB,QAAQ,YAAY;AAgB9C;AACA,SACEC,eAAe,EACfC,qBAA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,kBAAkB,QAEb,aAAa","ignoreList":[]}
@@ -64,8 +64,25 @@ function getCompareAtPrice(product) {
64
64
  }
65
65
  return formatPrice(compare);
66
66
  }
67
- export function transformShopifyProduct(product) {
67
+
68
+ /**
69
+ * The live entry for the variant the turn resolved, if the store still has it.
70
+ * Both sides carry the bare numeric id — `extractVariants` strips the
71
+ * `gid://shopify/ProductVariant/` prefix, and the turn never adds one.
72
+ */
73
+ function findLiveVariant(variants, variantId) {
74
+ if (!variantId) {
75
+ return undefined;
76
+ }
77
+ return variants == null ? void 0 : variants.find(variant => variant.variantId === variantId);
78
+ }
79
+ export function transformShopifyProduct(product, variantId) {
68
80
  var _product$featuredImag, _product$options;
81
+ const variants = extractVariants(product);
82
+ // The turn decided WHICH variant to show; the live fetch is here for what is
83
+ // true about it right now. With no matched variant — or one the store has
84
+ // since dropped — the product-level range is still the only answer we have.
85
+ const matchedVariant = findLiveVariant(variants, variantId);
69
86
  return {
70
87
  url: product.onlineStoreUrl || '',
71
88
  title: product.title,
@@ -74,10 +91,14 @@ export function transformShopifyProduct(product) {
74
91
  imageUrl: (_product$featuredImag = product.featuredImage) == null ? void 0 : _product$featuredImag.url,
75
92
  secondaryImageUrl: getSecondaryImage(product),
76
93
  vendor: product.vendor,
77
- price: formatPrice(product.priceRange.minVariantPrice),
78
- compareAtPrice: getCompareAtPrice(product),
94
+ price: (matchedVariant == null ? void 0 : matchedVariant.price) || formatPrice(product.priceRange.minVariantPrice),
95
+ // Keyed on the variant, not on its value: an unmatched product falls back
96
+ // to the product-level compare-at, but a matched variant that is simply
97
+ // not on sale must not inherit one and print a false strikethrough.
98
+ compareAtPrice: matchedVariant ? matchedVariant.compareAtPrice : getCompareAtPrice(product),
99
+ available: matchedVariant == null ? void 0 : matchedVariant.available,
79
100
  sizes: extractSizes(product),
80
- variants: extractVariants(product),
101
+ variants,
81
102
  allImages: getAllImages(product),
82
103
  options: (_product$options = product.options) != null && _product$options.length ? product.options : undefined,
83
104
  tags: product.tags.length ? product.tags : undefined
@@ -111,10 +132,10 @@ export function transformShopifyArticle(article) {
111
132
  * Transform any resolved Shopify entity to the standard EntityItemData shape.
112
133
  * Detects the entity type by checking for type-specific fields.
113
134
  */
114
- export function transformShopifyEntityToItemData(entity, entityType) {
135
+ export function transformShopifyEntityToItemData(entity, entityType, variantId) {
115
136
  switch (entityType.toLowerCase()) {
116
137
  case 'product':
117
- return transformShopifyProduct(entity);
138
+ return transformShopifyProduct(entity, variantId);
118
139
  case 'collection':
119
140
  return transformShopifyCollection(entity);
120
141
  case 'article':
@@ -1 +1 @@
1
- {"version":3,"names":["formatShopifyDate","isoDate","date","Date","isNaN","getTime","undefined","day","getDate","month","toLocaleString","year","getFullYear","formatPrice","money","amount","parseFloat","formatted","toFixed","currencyCode","extractSizes","product","sizes","variants","edges","flatMap","e","node","selectedOptions","filter","o","name","toLowerCase","map","value","unique","Set","length","extractVariants","sizeOption","find","numericId","id","replace","label","title","variantId","available","availableForSale","price","compareAtPrice","getSecondaryImage","images","url","getAllImages","getCompareAtPrice","_product$compareAtPri","compare","compareAtPriceRange","minVariantPrice","min","priceRange","transformShopifyProduct","_product$featuredImag","_product$options","onlineStoreUrl","type","description","imageUrl","featuredImage","secondaryImageUrl","vendor","allImages","options","tags","transformShopifyCollection","collection","_collection$image","image","transformShopifyArticle","article","_article$image","_article$authorV","excerpt","publishDate","publishedAt","author","authorV2","transformShopifyEntityToItemData","entity","entityType"],"sources":["../../../../src/services/shopify/transformShopifyEntity.ts"],"sourcesContent":["import type { EntityItemData } from '../../component/types';\nimport type {\n ShopifyProduct,\n ShopifyCollection,\n ShopifyArticle,\n} from './types';\n\nfunction formatShopifyDate(isoDate: string): string | undefined {\n const date = new Date(isoDate);\n if (isNaN(date.getTime())) {\n return undefined;\n }\n const day = date.getDate();\n const month = date.toLocaleString('en-US', { month: 'short' });\n const year = date.getFullYear();\n return `${day} ${month} ${year}`;\n}\n\nfunction formatPrice(\n money: ShopifyProduct['priceRange']['minVariantPrice'],\n): string {\n const amount = parseFloat(money.amount);\n const formatted = amount.toFixed(2);\n return `${formatted} ${money.currencyCode}`;\n}\n\nfunction extractSizes(product: ShopifyProduct): string[] | undefined {\n const sizes = product.variants.edges.flatMap((e) =>\n e.node.selectedOptions\n .filter((o) => o.name.toLowerCase() === 'size')\n .map((o) => o.value),\n );\n const unique = [...new Set(sizes)];\n return unique.length > 0 ? unique : undefined;\n}\n\n/**\n * Extract variant ID → size label mapping for add-to-cart.\n * Shopify global IDs look like \"gid://shopify/ProductVariant/12345\" —\n * we extract just the numeric part for the Ajax API.\n */\nfunction extractVariants(product: ShopifyProduct): EntityItemData['variants'] {\n const variants = product.variants.edges.map((e) => {\n const sizeOption = e.node.selectedOptions.find(\n (o) => o.name.toLowerCase() === 'size',\n );\n const numericId = e.node.id.replace(\n /^gid:\\/\\/shopify\\/ProductVariant\\//,\n '',\n );\n return {\n label: sizeOption?.value || e.node.title,\n variantId: numericId,\n available: e.node.availableForSale,\n selectedOptions: e.node.selectedOptions.map((o) => ({\n name: o.name,\n value: o.value,\n })),\n price: formatPrice(e.node.price),\n compareAtPrice: e.node.compareAtPrice\n ? formatPrice(e.node.compareAtPrice)\n : undefined,\n };\n });\n return variants.length > 0 ? variants : undefined;\n}\n\nfunction getSecondaryImage(product: ShopifyProduct): string | undefined {\n const images = product.images.edges.map((e) => e.node.url);\n return images.length > 1 ? images[1] : undefined;\n}\n\nfunction getAllImages(product: ShopifyProduct): string[] | undefined {\n const images = product.images.edges.map((e) => e.node.url);\n return images.length > 0 ? images : undefined;\n}\n\nfunction getCompareAtPrice(product: ShopifyProduct): string | undefined {\n const compare = product.compareAtPriceRange?.minVariantPrice;\n if (!compare) {\n return undefined;\n }\n const min = product.priceRange.minVariantPrice;\n if (parseFloat(compare.amount) <= parseFloat(min.amount)) {\n return undefined;\n }\n return formatPrice(compare);\n}\n\nexport function transformShopifyProduct(\n product: ShopifyProduct,\n): EntityItemData {\n return {\n url: product.onlineStoreUrl || '',\n title: product.title,\n type: 'product',\n description: product.description,\n imageUrl: product.featuredImage?.url,\n secondaryImageUrl: getSecondaryImage(product),\n vendor: product.vendor,\n price: formatPrice(product.priceRange.minVariantPrice),\n compareAtPrice: getCompareAtPrice(product),\n sizes: extractSizes(product),\n variants: extractVariants(product),\n allImages: getAllImages(product),\n options: product.options?.length ? product.options : undefined,\n tags: product.tags.length ? product.tags : undefined,\n };\n}\n\nexport function transformShopifyCollection(\n collection: ShopifyCollection,\n): EntityItemData {\n return {\n url: collection.onlineStoreUrl || '',\n title: collection.title,\n type: 'collection',\n description: collection.description,\n imageUrl: collection.image?.url,\n };\n}\n\nexport function transformShopifyArticle(\n article: ShopifyArticle,\n): EntityItemData {\n return {\n url: article.onlineStoreUrl || '',\n title: article.title,\n type: 'article',\n description: article.excerpt || undefined,\n imageUrl: article.image?.url,\n publishDate: formatShopifyDate(article.publishedAt),\n author: article.authorV2?.name || undefined,\n tags: article.tags.length ? article.tags : undefined,\n };\n}\n\n/**\n * Transform any resolved Shopify entity to the standard EntityItemData shape.\n * Detects the entity type by checking for type-specific fields.\n */\nexport function transformShopifyEntityToItemData(\n entity: ShopifyProduct | ShopifyCollection | ShopifyArticle,\n entityType: string,\n): EntityItemData {\n switch (entityType.toLowerCase()) {\n case 'product':\n return transformShopifyProduct(entity as ShopifyProduct);\n case 'collection':\n return transformShopifyCollection(entity as ShopifyCollection);\n case 'article':\n return transformShopifyArticle(entity as ShopifyArticle);\n default:\n return {\n url: '',\n title: (entity as { title?: string }).title || '',\n type: entityType,\n };\n }\n}\n"],"mappings":"AAOA,SAASA,iBAAiBA,CAACC,OAAe,EAAsB;EAC9D,MAAMC,IAAI,GAAG,IAAIC,IAAI,CAACF,OAAO,CAAC;EAC9B,IAAIG,KAAK,CAACF,IAAI,CAACG,OAAO,CAAC,CAAC,CAAC,EAAE;IACzB,OAAOC,SAAS;EAClB;EACA,MAAMC,GAAG,GAAGL,IAAI,CAACM,OAAO,CAAC,CAAC;EAC1B,MAAMC,KAAK,GAAGP,I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,EAC3DC,UAAkB,EACF;EAChB,QAAQA,UAAU,CAAC1D,WAAW,CAAC,CAAC;IAC9B,KAAK,SAAS;MACZ,OAAO8B,uBAAuB,CAAC2B,MAAwB,CAAC;IAC1D,KAAK,YAAY;MACf,OAAOd,0BAA0B,CAACc,MAA2B,CAAC;IAChE,KAAK,SAAS;MACZ,OAAOV,uBAAuB,CAACU,MAAwB,CAAC;IAC1D;MACE,OAAO;QACLpC,GAAG,EAAE,EAAE;QACPR,KAAK,EAAG4C,MAAM,CAAwB5C,KAAK,IAAI,EAAE;QACjDqB,IAAI,EAAEwB;MACR,CAAC;EACL;AACF","ignoreList":[]}
1
+ {"version":3,"names":["formatShopifyDate","isoDate","date","Date","isNaN","getTime","undefined","day","getDate","month","toLocaleString","year","getFullYear","formatPrice","money","amount","parseFloat","formatted","toFixed","currencyCode","extractSizes","product","sizes","variants","edges","flatMap","e","node","selectedOptions","filter","o","name","toLowerCase","map","value","unique","Set","length","extractVariants","sizeOption","find","numericId","id","replace","label","title","variantId","available","availableForSale","price","compareAtPrice","getSecondaryImage","images","url","getAllImages","getCompareAtPrice","_product$compareAtPri","compare","compareAtPriceRange","minVariantPrice","min","priceRange","findLiveVariant","variant","transformShopifyProduct","_product$featuredImag","_product$options","matchedVariant","onlineStoreUrl","type","description","imageUrl","featuredImage","secondaryImageUrl","vendor","allImages","options","tags","transformShopifyCollection","collection","_collection$image","image","transformShopifyArticle","article","_article$image","_article$authorV","excerpt","publishDate","publishedAt","author","authorV2","transformShopifyEntityToItemData","entity","entityType"],"sources":["../../../../src/services/shopify/transformShopifyEntity.ts"],"sourcesContent":["import type { EntityItemData } from '../../component/types';\nimport type {\n ShopifyProduct,\n ShopifyCollection,\n ShopifyArticle,\n} from './types';\n\nfunction formatShopifyDate(isoDate: string): string | undefined {\n const date = new Date(isoDate);\n if (isNaN(date.getTime())) {\n return undefined;\n }\n const day = date.getDate();\n const month = date.toLocaleString('en-US', { month: 'short' });\n const year = date.getFullYear();\n return `${day} ${month} ${year}`;\n}\n\nfunction formatPrice(\n money: ShopifyProduct['priceRange']['minVariantPrice'],\n): string {\n const amount = parseFloat(money.amount);\n const formatted = amount.toFixed(2);\n return `${formatted} ${money.currencyCode}`;\n}\n\nfunction extractSizes(product: ShopifyProduct): string[] | undefined {\n const sizes = product.variants.edges.flatMap((e) =>\n e.node.selectedOptions\n .filter((o) => o.name.toLowerCase() === 'size')\n .map((o) => o.value),\n );\n const unique = [...new Set(sizes)];\n return unique.length > 0 ? unique : undefined;\n}\n\n/**\n * Extract variant ID → size label mapping for add-to-cart.\n * Shopify global IDs look like \"gid://shopify/ProductVariant/12345\" —\n * we extract just the numeric part for the Ajax API.\n */\nfunction extractVariants(product: ShopifyProduct): EntityItemData['variants'] {\n const variants = product.variants.edges.map((e) => {\n const sizeOption = e.node.selectedOptions.find(\n (o) => o.name.toLowerCase() === 'size',\n );\n const numericId = e.node.id.replace(\n /^gid:\\/\\/shopify\\/ProductVariant\\//,\n '',\n );\n return {\n label: sizeOption?.value || e.node.title,\n variantId: numericId,\n available: e.node.availableForSale,\n selectedOptions: e.node.selectedOptions.map((o) => ({\n name: o.name,\n value: o.value,\n })),\n price: formatPrice(e.node.price),\n compareAtPrice: e.node.compareAtPrice\n ? formatPrice(e.node.compareAtPrice)\n : undefined,\n };\n });\n return variants.length > 0 ? variants : undefined;\n}\n\nfunction getSecondaryImage(product: ShopifyProduct): string | undefined {\n const images = product.images.edges.map((e) => e.node.url);\n return images.length > 1 ? images[1] : undefined;\n}\n\nfunction getAllImages(product: ShopifyProduct): string[] | undefined {\n const images = product.images.edges.map((e) => e.node.url);\n return images.length > 0 ? images : undefined;\n}\n\nfunction getCompareAtPrice(product: ShopifyProduct): string | undefined {\n const compare = product.compareAtPriceRange?.minVariantPrice;\n if (!compare) {\n return undefined;\n }\n const min = product.priceRange.minVariantPrice;\n if (parseFloat(compare.amount) <= parseFloat(min.amount)) {\n return undefined;\n }\n return formatPrice(compare);\n}\n\n/**\n * The live entry for the variant the turn resolved, if the store still has it.\n * Both sides carry the bare numeric id — `extractVariants` strips the\n * `gid://shopify/ProductVariant/` prefix, and the turn never adds one.\n */\nfunction findLiveVariant(\n variants: EntityItemData['variants'],\n variantId: string | undefined,\n): NonNullable<EntityItemData['variants']>[number] | undefined {\n if (!variantId) {\n return undefined;\n }\n return variants?.find((variant) => variant.variantId === variantId);\n}\n\nexport function transformShopifyProduct(\n product: ShopifyProduct,\n variantId?: string,\n): EntityItemData {\n const variants = extractVariants(product);\n // The turn decided WHICH variant to show; the live fetch is here for what is\n // true about it right now. With no matched variant — or one the store has\n // since dropped — the product-level range is still the only answer we have.\n const matchedVariant = findLiveVariant(variants, variantId);\n\n return {\n url: product.onlineStoreUrl || '',\n title: product.title,\n type: 'product',\n description: product.description,\n imageUrl: product.featuredImage?.url,\n secondaryImageUrl: getSecondaryImage(product),\n vendor: product.vendor,\n price:\n matchedVariant?.price || formatPrice(product.priceRange.minVariantPrice),\n // Keyed on the variant, not on its value: an unmatched product falls back\n // to the product-level compare-at, but a matched variant that is simply\n // not on sale must not inherit one and print a false strikethrough.\n compareAtPrice: matchedVariant\n ? matchedVariant.compareAtPrice\n : getCompareAtPrice(product),\n available: matchedVariant?.available,\n sizes: extractSizes(product),\n variants,\n allImages: getAllImages(product),\n options: product.options?.length ? product.options : undefined,\n tags: product.tags.length ? product.tags : undefined,\n };\n}\n\nexport function transformShopifyCollection(\n collection: ShopifyCollection,\n): EntityItemData {\n return {\n url: collection.onlineStoreUrl || '',\n title: collection.title,\n type: 'collection',\n description: collection.description,\n imageUrl: collection.image?.url,\n };\n}\n\nexport function transformShopifyArticle(\n article: ShopifyArticle,\n): EntityItemData {\n return {\n url: article.onlineStoreUrl || '',\n title: article.title,\n type: 'article',\n description: article.excerpt || undefined,\n imageUrl: article.image?.url,\n publishDate: formatShopifyDate(article.publishedAt),\n author: article.authorV2?.name || undefined,\n tags: article.tags.length ? article.tags : undefined,\n };\n}\n\n/**\n * Transform any resolved Shopify entity to the standard EntityItemData shape.\n * Detects the entity type by checking for type-specific fields.\n */\nexport function transformShopifyEntityToItemData(\n entity: ShopifyProduct | ShopifyCollection | ShopifyArticle,\n entityType: string,\n variantId?: string,\n): EntityItemData {\n switch (entityType.toLowerCase()) {\n case 'product':\n return transformShopifyProduct(entity as ShopifyProduct, variantId);\n case 'collection':\n return transformShopifyCollection(entity as ShopifyCollection);\n case 'article':\n return transformShopifyArticle(entity as ShopifyArticle);\n default:\n return {\n url: '',\n title: (entity as { title?: string }).title || '',\n type: entityType,\n };\n }\n}\n"],"mappings":"AAOA,SAASA,iBAAiBA,CAACC,OAAe,EAAsB;EAC9D,MAAMC,IAAI,GAAG,IAAIC,IAAI,CAACF,OAAO,CAAC;EAC9B,IAAIG,KAAK,CAACF,IAAI,CAACG,OAAO,CAAC,CAAC,CAAC,EAAE;IACzB,OAAOC,SAAS;EAClB;EACA,MAAMC,GAAG,GAAGL,IAAI,CAACM,OAAO,CAAC,CAAC;EAC1B,MAAMC,KAAK,GAAGP,IAAI,CAACQ,cAAc,CAAC,OAAO,EAAE;IAAED,KAAK,EAAE;EAAQ,CAAC,CAAC;EAC9D,MAAME,IAAI,GAAGT,IAAI,CAACU,WAAW,CAAC,CAAC;EAC/B,OAAO,GAAGL,GAAG,IAAIE,KAAK,IAAIE,IAAI,EAAE;AAClC;AAEA,SAASE,WAAWA,CAClBC,KAAsD,EAC9C;EACR,MAAMC,MAAM,GAAGC,UAAU,CAACF,KAAK,CAACC,MAAM,CAAC;EACvC,MAAME,SAAS,GAAGF,MAAM,CAACG,OAAO,CAAC,CAAC,CAAC;EACnC,OAAO,GAAGD,SAAS,IAAIH,KAAK,CAACK,YAAY,EAAE;AAC7C;AAEA,SAASC,YAAYA,CAACC,OAAuB,EAAwB;EACnE,MAAMC,KAAK,GAAGD,OAAO,CAACE,QAAQ,CAACC,KAAK,CAACC,OAAO,CAAEC,CAAC,IAC7CA,CAAC,CAACC,IAAI,CAACC,eAAe,CACnBC,MAAM,CAAEC,CAAC,I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CAAC,CAAC;IAC9B,KAAK,SAAS;MACZ,OAAOgC,uBAAuB,CAAC4B,MAAM,EAAoB9C,SAAS,CAAC;IACrE,KAAK,YAAY;MACf,OAAOgC,0BAA0B,CAACc,MAA2B,CAAC;IAChE,KAAK,SAAS;MACZ,OAAOV,uBAAuB,CAACU,MAAwB,CAAC;IAC1D;MACE,OAAO;QACLvC,GAAG,EAAE,EAAE;QACPR,KAAK,EAAG+C,MAAM,CAAwB/C,KAAK,IAAI,EAAE;QACjDwB,IAAI,EAAEwB;MACR,CAAC;EACL;AACF","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/types/entity.ts"],"sourcesContent":["export interface ApiPayloadItem {\n url: string;\n features: { feature: string; value: string }[];\n img?: string;\n id: string;\n title: string;\n type: string;\n update_ts?: string;\n publishDate?: string;\n published_at?: string;\n cms_item_id?: string;\n usage?: number;\n author?: string;\n authorName?: string;\n description?: string;\n excerpt?: string;\n labels?: string[];\n tags?: string[];\n categories?: string[];\n}\n\nexport interface EntityTypeConfig {\n payloadType: string;\n urlMatchProperty: string;\n urlMatchPattern?: 'endsWith' | 'contains' | 'equals';\n imageBaseUrl?: string;\n}\n\nexport interface EntityConfig {\n enabled: boolean;\n entityTypes: Record<string, EntityTypeConfig>;\n}\n\nexport interface EntityExtractionContext {\n payload?: ApiPayloadItem[];\n entityConfig?: EntityConfig;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../src/types/entity.ts"],"sourcesContent":["export interface ApiPayloadItem {\n url: string;\n features: { feature: string; value: string }[];\n img?: string;\n id: string;\n title: string;\n type: string;\n update_ts?: string;\n publishDate?: string;\n published_at?: string;\n cms_item_id?: string;\n usage?: number;\n author?: string;\n authorName?: string;\n description?: string;\n excerpt?: string;\n labels?: string[];\n tags?: string[];\n categories?: string[];\n /**\n * When retrieval resolved this document down to one of its children, the\n * child's own `{ name: value }` pairs. The keys are whatever the store\n * defines — read the map by iterating it, never by name.\n */\n options?: Record<string, string | number>;\n /** Price of the matched child. Raw number, or an already-formatted string. */\n price?: number | string;\n /** Lowest price across the whole document's children. */\n priceMin?: number | string;\n /** Highest price across the whole document's children. */\n priceMax?: number | string;\n /** ISO-4217 code the numeric price fields are denominated in. */\n currency?: string;\n /** Alias some feeds emit instead of `currency`. */\n priceCurrency?: string;\n}\n\nexport interface EntityTypeConfig {\n payloadType: string;\n urlMatchProperty: string;\n urlMatchPattern?: 'endsWith' | 'contains' | 'equals';\n imageBaseUrl?: string;\n}\n\nexport interface EntityConfig {\n enabled: boolean;\n entityTypes: Record<string, EntityTypeConfig>;\n}\n\nexport interface EntityExtractionContext {\n payload?: ApiPayloadItem[];\n entityConfig?: EntityConfig;\n}\n"],"mappings":"","ignoreList":[]}
@@ -74,6 +74,28 @@ export interface EntityItemData {
74
74
  tags?: string[];
75
75
  /** Product vendor / brand name (e.g. "HOKA") */
76
76
  vendor?: string;
77
+ /**
78
+ * The `{ name, value }` pairs of the one variant a search matched, in the
79
+ * store's own order. Present only when retrieval resolved the product down
80
+ * to a single variant. The names are the store's own, so read this by
81
+ * iterating it — never by looking a name up.
82
+ */
83
+ matchedOptions?: {
84
+ name: string;
85
+ value: string;
86
+ }[];
87
+ /**
88
+ * Id of the one variant a search matched — the same variant `imageUrl`,
89
+ * `url` and `matchedOptions` describe. Bare store id, no `gid://` prefix.
90
+ * A live enricher reads this to price that variant rather than the product.
91
+ */
92
+ variantId?: string;
93
+ /** Whether the matched variant is in stock, as of the last live fetch */
94
+ available?: boolean;
95
+ /** Formatted lowest price across the product's variants (e.g. "$107.95") */
96
+ priceMin?: string;
97
+ /** Formatted highest price across the product's variants */
98
+ priceMax?: string;
77
99
  /** Formatted price string (e.g. "542.00 NIS") */
78
100
  price?: string;
79
101
  /** Secondary product image URL — shown on hover */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/component/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EA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B;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,eAG9B,CAAC"}
1
+ {"version":3,"file":"defaultExtractor.d.ts","sourceRoot":"","sources":["../../../src/entity/defaultExtractor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC7F,OAAO,KAAK,EACV,cAAc,EAEd,gBAAgB,EACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA+E/C,mDAAmD;AACnD,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,cAAc,EAC3B,MAAM,EAAE,gBAAgB,GACvB,kBAAkB,CAEpB;AAyBD,mDAAmD;AACnD,wBAAgB,6BAA6B,CAC3C,WAAW,EAAE,cAAc,EAC3B,MAAM,EAAE,gBAAgB,GACvB,cAAc,CAEhB;AAED,wBAAgB,4BAA4B,CAC1C,WAAW,EAAE,cAAc,EAC3B,MAAM,EAAE,gBAAgB,GACvB,cAAc,CA8ChB;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,eAG9B,CAAC"}
@@ -1,6 +1,7 @@
1
1
  import type { EntityExtractor } from './types';
2
2
  export { defaultExtractor, transformToSolutionEntityData, transformToBlogPostEntityData, transformToGenericEntityData, } from './defaultExtractor';
3
3
  export { enrichEntitiesFromPayload } from './enrichEntitiesFromPayload';
4
+ export { toMatchedOptions, formatMoney, readCurrencyCode, formatPriceField, formatProductPriceLabel, type MatchedOption, type ProductPriceFields, } from './matchedVariant';
4
5
  export { fetchEntityListData, type FetchEntityListDataOptions, } from './fetchEntityListData';
5
6
  export { listEntityItems, LIST_ITEMS_ENDPOINT, type ListEntityItemsOptions, } from './listEntityItems';
6
7
  export type { EntityExtractor } from './types';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/entity/index.ts"],"names":[],"mappings":"AAAA,OA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AAQ/C;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,eAAe,CAKrE;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,eAAe,GACzB,IAAI,CAEN"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Presentation helpers for a document that retrieval resolved down to one
3
+ * child.
4
+ *
5
+ * When a query filters on an attribute that lives on the child rather than on
6
+ * the parent, retrieval overlays the matching child's presentation fields onto
7
+ * the parent document before it reaches us: `url`, `img` and `price` already
8
+ * describe the child, while `title`, `description` and `doc_id` stay the
9
+ * parent's. Two fields need shaping before a card can print them, and both
10
+ * live here:
11
+ *
12
+ * - `options` — the child's own `{ name: value }` pairs.
13
+ * - `priceMin` / `priceMax` — the parent's span, against which the child's
14
+ * single `price` has to be read.
15
+ *
16
+ * The overlay itself is done server-side and is deliberately NOT repeated
17
+ * here.
18
+ */
19
+ /** One `{ name: value }` pair, exactly as the store named it. */
20
+ export interface MatchedOption {
21
+ name: string;
22
+ value: string;
23
+ }
24
+ /**
25
+ * Turn a document's raw `options` map into an ordered list of pairs.
26
+ *
27
+ * Every entry the store put in the map is kept, under the store's own name and
28
+ * in the store's own order. Nothing here knows — or may learn — what any
29
+ * particular name means: one catalogue's pairs describe a garment, the next
30
+ * one's a power tool, and both have to come out identical. Entries with an
31
+ * empty name or an empty/non-printable value are dropped, since a card can do
32
+ * nothing with them.
33
+ *
34
+ * Returns `undefined` (not `[]`) when there is nothing to show, so callers can
35
+ * treat it like every other optional field on the entity.
36
+ */
37
+ export declare function toMatchedOptions(raw: unknown): MatchedOption[] | undefined;
38
+ /**
39
+ * Render one amount in the document's currency.
40
+ *
41
+ * With no currency code on the document the amount is printed bare: assuming
42
+ * "$" prints a false fact on every store that doesn't sell in dollars. Whole
43
+ * amounts stay whole ("107" not "107.00"); a real fractional amount keeps its
44
+ * minor units.
45
+ */
46
+ export declare function formatMoney(amount: number, currency?: string): string;
47
+ /** Normalize a document currency to an ISO-4217 code, or drop it. */
48
+ export declare function readCurrencyCode(...candidates: unknown[]): string | undefined;
49
+ /**
50
+ * Format one of a document's price fields for display. Numbers are rendered in
51
+ * the document's currency; an already-formatted string is passed through
52
+ * untouched; anything else yields `undefined`.
53
+ */
54
+ export declare function formatPriceField(value: unknown, currency?: string): string | undefined;
55
+ /** The already-formatted price fields a card reads. */
56
+ export interface ProductPriceFields {
57
+ /** Price of the one variant this result matched. */
58
+ price?: string;
59
+ /** Lowest price across the whole product's variants. */
60
+ priceMin?: string;
61
+ /** Highest price across the whole product's variants. */
62
+ priceMax?: string;
63
+ }
64
+ /**
65
+ * What a product card should print as its price.
66
+ *
67
+ * `price` belongs to the single variant the search matched — the same variant
68
+ * the card's image and link point at. `priceMin`/`priceMax` describe the whole
69
+ * product. When those two differ the product has no one price, and printing
70
+ * the matched variant's number on its own would pass it off as the product's;
71
+ * printing it after "from" would be worse still, because "from" is a claim
72
+ * about the floor of the span and the matched variant is not always the
73
+ * cheapest one. So a span prints its own floor, prefixed.
74
+ *
75
+ * With no span — the two ends equal, or only one of them known — nothing
76
+ * changes: the matched variant's price is printed as it always was.
77
+ */
78
+ export declare function formatProductPriceLabel(fields: ProductPriceFields): string | undefined;
79
+ //# sourceMappingURL=matchedVariant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"matchedVariant.d.ts","sourceRoot":"","sources":["../../../src/entity/matchedVariant.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,iEAAiE;AACjE,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAYD;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,aAAa,EAAE,GAAG,SAAS,CAiB1E;AAED;;;;;;;GAOG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAcrE;AAED,qEAAqE;AACrE,wBAAgB,gBAAgB,CAAC,GAAG,UAAU,EAAE,OAAO,EAAE,GAAG,MAAM,GAAG,SAAS,CAW7E;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAC9B,KAAK,EAAE,OAAO,EACd,QAAQ,CAAC,EAAE,MAAM,GAChB,MAAM,GAAG,SAAS,CAQpB;AAED,uDAAuD;AACvD,MAAM,WAAW,kBAAkB;IACjC,oDAAoD;IACpD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,kBAAkB,GACzB,MAAM,GAAG,SAAS,CAMpB"}
@@ -1,5 +1,16 @@
1
1
  import type { SearchSpringConfig } from '../services/searchspring/types';
2
2
  import type { EntityItemData } from '../component/types';
3
+ /**
4
+ * The turn owns WHICH thing to show; the live fetch owns VOLATILE FACTS about
5
+ * it.
6
+ *
7
+ * Only the turn saw the shopper's question, so only it knows that the brown
8
+ * variant was the one asked for — its `title`, `imageUrl`, `url`,
9
+ * `matchedOptions` and `variantId` all describe that one variant and must
10
+ * survive enrichment. Everything SearchSpring answers with that can go stale
11
+ * between the turn and the render — `price`, `compareAtPrice`, `available`,
12
+ * `priceMin`, `priceMax` — comes from `resolved`.
13
+ */
3
14
  export declare function mergeSearchSpringEntityData(existing: EntityItemData | undefined, resolved: EntityItemData): EntityItemData;
4
15
  /**
5
16
  * SearchSpring-backed entity resolution hook.
@@ -1 +1 @@
1
- {"version":3,"file":"useResolveSearchSpringEntityData.d.ts","sourceRoot":"","sources":["../../../src/hooks/useResolveSearchSpringEntityData.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAsCzD,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,cAAc,GAAG,SAAS,EACpC,QAAQ,EAAE,cAAc,GACvB,cAAc,CAgBhB;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,SAAS;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,EAED,QAAQ,EAAE,OAAO,EAAE,EACnB,MAAM,EAAE,kBAAkB,GACzB;IAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAyGnD"}
1
+ {"version":3,"file":"useResolveSearchSpringEntityData.d.ts","sourceRoot":"","sources":["../../../src/hooks/useResolveSearchSpringEntityData.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAsCzD;;;;;;;;;;GAUG;AACH,wBAAgB,2BAA2B,CACzC,QAAQ,EAAE,cAAc,GAAG,SAAS,EACpC,QAAQ,EAAE,cAAc,GACvB,cAAc,CAsBhB;AAED;;;;;;GAMG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,SAAS;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,EAED,QAAQ,EAAE,OAAO,EAAE,EACnB,MAAM,EAAE,kBAAkB,GACzB;IAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAyGnD"}
@@ -1,5 +1,16 @@
1
1
  import type { ShopifyStorefrontConfig } from '../services/shopify/types';
2
2
  import type { EntityItemData } from '../component/types';
3
+ /**
4
+ * The turn owns WHICH thing to show; the live fetch owns VOLATILE FACTS about
5
+ * it.
6
+ *
7
+ * Only the turn saw the shopper's question, so only it knows that the brown
8
+ * variant was the one asked for — its `title`, `imageUrl`, `url`,
9
+ * `matchedOptions` and `variantId` all describe that one variant and must
10
+ * survive enrichment. Everything the Storefront answers with that can go stale
11
+ * between the turn and the render — `price`, `compareAtPrice`, `available`,
12
+ * `priceMin`, `priceMax` — comes from `resolved`.
13
+ */
3
14
  export declare function mergeShopifyEntityData(existing: EntityItemData | undefined, resolved: EntityItemData): EntityItemData;
4
15
  /**
5
16
  * Shopify-specific implementation of the entity resolution pattern.
@@ -1 +1 @@
1
- {"version":3,"file":"useResolveShopifyEntityData.d.ts","sourceRoot":"","sources":["../../../src/hooks/useResolveShopifyEntityData.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAqEzD,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,cAAc,GAAG,SAAS,EACpC,QAAQ,EAAE,cAAc,GACvB,cAAc,CAUhB;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,SAAS;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,EAED,QAAQ,EAAE,OAAO,EAAE,EACnB,aAAa,EAAE,uBAAuB,GACrC;IAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAgInD"}
1
+ {"version":3,"file":"useResolveShopifyEntityData.d.ts","sourceRoot":"","sources":["../../../src/hooks/useResolveShopifyEntityData.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACzE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAyEzD;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,cAAc,GAAG,SAAS,EACpC,QAAQ,EAAE,cAAc,GACvB,cAAc,CAgBhB;AAED;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CACzC,OAAO,SAAS;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,cAAc,CAAC;CACvB,EAED,QAAQ,EAAE,OAAO,EAAE,EACnB,aAAa,EAAE,uBAAuB,GACrC;IAAE,gBAAgB,EAAE,OAAO,EAAE,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAwInD"}
@@ -25,8 +25,8 @@ export { UserQueryProvider, useUserQuery, type UserQueryProviderProps, } from '.
25
25
  export { ChipsProvider, useChips, type SuggestionChip, } from './context/ChipsContext';
26
26
  export type { ComponentDependencies, Web5LinkApi, ConversationApi, SendMessageTrackingOptions, SendMessageOptions, ComparisonSubmitPayload, ComparisonSelectedProduct, ProductComparisonSelectionState, ProductComparisonApi, EntityTransforms, MarkdownUtils, ResolveGenericEntityDataOptions, } from './types/dependencies';
27
27
  export type { ApiPayloadItem, EntityTypeConfig, EntityConfig, EntityExtractionContext, } from './types/entity';
28
- export { defaultExtractor, enrichEntitiesFromPayload, fetchEntityListData, listEntityItems, LIST_ITEMS_ENDPOINT, getEntityExtractor, registerEntityExtractor, transformToSolutionEntityData, transformToBlogPostEntityData, transformToGenericEntityData, } from './entity';
29
- export type { EntityExtractor, FetchEntityListDataOptions, ListEntityItemsOptions, } from './entity';
28
+ export { defaultExtractor, enrichEntitiesFromPayload, fetchEntityListData, listEntityItems, LIST_ITEMS_ENDPOINT, getEntityExtractor, registerEntityExtractor, transformToSolutionEntityData, transformToBlogPostEntityData, transformToGenericEntityData, toMatchedOptions, formatMoney, readCurrencyCode, formatPriceField, formatProductPriceLabel, } from './entity';
29
+ export type { EntityExtractor, FetchEntityListDataOptions, ListEntityItemsOptions, MatchedOption, ProductPriceFields, } from './entity';
30
30
  export { CALLOUT_KINDS, type CalloutKind, type Callout } from './types/callout';
31
31
  export { useWeb5Link } from './hooks/useWeb5Link';
32
32
  export { useConversation } from './hooks/useConversation';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,uCAAuC,CAAC;AAG/C,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,IAAI,EACT,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,cAAc,EACd,aAAa,EACb,YAAY,EACZ,UAAU,EACV,SAAS,EACT,QAAQ,EACR,cAAc,EACd,sBAAsB,EACtB,UAAU,GACX,MAAM,eAAe,CAAC;AAGvB,YAAY,EACV,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,cAAc,EACd,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB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B,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,SAAS,EACT,cAAc,EACd,SAAS,EACT,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,iCAAiC,EACjC,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,uCAAuC,CAAC;AAG/C,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,IAAI,EACT,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,cAAc,EACd,aAAa,EACb,YAAY,EACZ,UAAU,EACV,SAAS,EACT,QAAQ,EACR,cAAc,EACd,sBAAsB,EACtB,UAAU,GACX,MAAM,eAAe,CAAC;AAGvB,YAAY,EACV,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,wBAAwB,EACxB,aAAa,EACb,eAA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2B,EAC3B,qBAAqB,EACrB,qBAAqB,EACrB,kBAAkB,GACnB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AACzD,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,aAAa,GACd,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EACL,oBAAoB,EACpB,YAAY,EACZ,SAAS,EACT,cAAc,EACd,SAAS,EACT,mBAAmB,GACpB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,yBAAyB,EACzB,iBAAiB,EACjB,iCAAiC,EACjC,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC"}
@@ -1,11 +1,11 @@
1
1
  import type { EntityItemData } from '../../component/types';
2
2
  import type { ShopifyProduct, ShopifyCollection, ShopifyArticle } from './types';
3
- export declare function transformShopifyProduct(product: ShopifyProduct): EntityItemData;
3
+ export declare function transformShopifyProduct(product: ShopifyProduct, variantId?: string): EntityItemData;
4
4
  export declare function transformShopifyCollection(collection: ShopifyCollection): EntityItemData;
5
5
  export declare function transformShopifyArticle(article: ShopifyArticle): EntityItemData;
6
6
  /**
7
7
  * Transform any resolved Shopify entity to the standard EntityItemData shape.
8
8
  * Detects the entity type by checking for type-specific fields.
9
9
  */
10
- export declare function transformShopifyEntityToItemData(entity: ShopifyProduct | ShopifyCollection | ShopifyArticle, entityType: string): EntityItemData;
10
+ export declare function transformShopifyEntityToItemData(entity: ShopifyProduct | ShopifyCollection | ShopifyArticle, entityType: string, variantId?: string): EntityItemData;
11
11
  //# sourceMappingURL=transformShopifyEntity.d.ts.map