@wix/web5-core 1.63.20 → 1.63.21

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.
@@ -0,0 +1 @@
1
+ {"version":3,"names":["MAX_IMAGE_SLOTS_PER_SET","DEFAULT_RENDER_WIDTH_PX","MAX_RENDER_WIDTH_PX","hasSlotImage","slot","Boolean","imageUrl","isSubjectMatch","match","backdropColorOf","_meta$palette","meta","visualMetadata","undefined","backgroundColor","palette","dominant","renderRatioOf","requestedRatio","crop","contained","ratio"],"sources":["../../../src/image/imageSetTypes.ts"],"sourcesContent":["/**\n * The `ResolveImageSet` contract, as the client sees it.\n *\n * Mirrors `wix.enterprise.web_five.v1.ImageService/ResolveImageSet` (ADR 0143,\n * 0148, 0187, 0197, 0220). Declared here rather than imported from the\n * ambassador package so core carries no transport dependency: the host supplies\n * `ComponentDependencies.resolveImageSet` and owns the wire mapping, including\n * the fact that responses come back `preserving_proto_field_name`.\n *\n * String unions rather than enums so the values are exactly the wire's and no\n * runtime object ships with them.\n */\n\n/** How an image sits on its background. */\nexport type ImageBackground =\n | 'IMAGE_BACKGROUND_UNSPECIFIED'\n /** Cut out — no background of its own. */\n | 'IMAGE_BACKGROUND_TRANSPARENT'\n /** One flat colour behind the subject; `backgroundColor` is then non-empty. */\n | 'IMAGE_BACKGROUND_SOLID'\n /** A scene: the background is part of the picture, and has no one colour. */\n | 'IMAGE_BACKGROUND_MIXED';\n\n/** What a slot is for, which decides what it may name and how it is scored. */\nexport type ImageSlotKind =\n | 'IMAGE_SLOT_KIND_UNSPECIFIED'\n /** Presents one entity — names it via `entityId`. */\n | 'IMAGE_SLOT_KIND_ENTITY'\n /** Illustrates a section — names what it is about via `semantic`. */\n | 'IMAGE_SLOT_KIND_EDITORIAL';\n\n/**\n * How honestly a slot's image answers what the slot asked for.\n *\n * Measured, and load-bearing: this is the ONLY field that separates a hit from\n * a miss. `score` cannot do it — a FALLBACK has been observed at 0.995 against\n * a correct EXACT at 0.86 in the same response — and neither field may be\n * compared across responses, because both are properties of the page-wide\n * assignment rather than of the slot. The same entity slot resolving to the\n * same image with a byte-identical crop has come back DEGRADED in one request\n * and EXACT in another, differing only in what else shared the page.\n */\nexport type ImageMatchQuality =\n | 'IMAGE_MATCH_QUALITY_UNSPECIFIED'\n /** The slot's own image, and one it would have chosen. */\n | 'IMAGE_MATCH_QUALITY_EXACT'\n /** The slot's own subject, but a compromise on fit, framing or mode. */\n | 'IMAGE_MATCH_QUALITY_DEGRADED'\n /** Not the slot's subject — something rather than a hole. */\n | 'IMAGE_MATCH_QUALITY_FALLBACK';\n\n/** A crop in source pixels of the image the slot was given. */\nexport interface ImageCrop {\n x: number;\n y: number;\n width: number;\n height: number;\n /** Fraction of the detected subject the crop discards, 0..1. */\n subjectLoss: number;\n /**\n * This crop's own aspect ratio. Equal to the slot's requested `ratio` unless\n * `contained` is true.\n */\n ratio?: number;\n /**\n * True when the crop deliberately does not match the requested ratio, to keep\n * the whole subject in frame rather than cut it (ADR 0220). Only possible on\n * a SOLID image, so `backgroundColor` is guaranteed non-empty alongside it.\n * Render at `crop.ratio`, centred, and pad the rest with `backgroundColor`.\n */\n contained?: boolean;\n}\n\n/** A box in normalised [0,1] coordinates — a fraction of the image's own size. */\nexport interface ImageRect {\n x: number;\n y: number;\n width: number;\n height: number;\n}\n\nexport interface ImagePalette {\n dominant: string;\n swatches: string[];\n}\n\n/** A square grid of per-cell values, `edge` on a side. */\nexport interface ImageStatGrid {\n edge: number;\n cells: number[];\n}\n\n/**\n * The feature record the resolver already decoded for its own scoring, returned\n * rather than discarded (ADR 0187).\n */\nexport interface ImageVisualMetadata {\n width: number;\n height: number;\n background: ImageBackground;\n /**\n * Flat backdrop colour. Non-empty exactly when `background` is SOLID — a\n * scene has no one backdrop colour, so a MIXED image carries `''` here and a\n * renderer wanting a colour should fall back to `palette.dominant`.\n */\n backgroundColor: string;\n subject?: ImageRect;\n palette?: ImagePalette;\n luma?: ImageStatGrid;\n variance?: ImageStatGrid;\n /** Reserved for the VLM label tier; empty until it ships. */\n labels: string[];\n}\n\n/** One slot a section declares. */\nexport interface ImageSlot {\n /** Caller's name for this slot, echoed back as `slotId`. Unique per request. */\n id: string;\n kind: ImageSlotKind;\n /** Width divided by height of the hole to fill. Must be positive. */\n ratio: number;\n /** EDITORIAL slots name what the section is about. */\n semantic?: string;\n /**\n * ENTITY slots name the entity. This is the row's **bare external id** (e.g.\n * `gid://shopify/Product/123`), never the prefixed `doc_id` (`product:...`) —\n * an image's `parent_id` is stamped with the former. Getting it wrong does\n * not error; the slot silently returns an unrelated image at FALLBACK.\n */\n entityId?: string;\n /**\n * Width the slot renders at. Omitted, the server substitutes 800. A value\n * ABOVE 5000 is the dangerous one: the crop is then dropped from the URL and\n * the uncropped original comes back with a `crop` beside it that nothing\n * applied, with no error.\n */\n renderWidthPx?: number;\n}\n\nexport interface ResolvedImageSlot {\n slotId: string;\n /** Empty when the set could fill no image for this slot. */\n imageUrl?: string;\n /** How to crop `imageUrl` — already composed into the URL by the server. */\n crop?: ImageCrop;\n match?: ImageMatchQuality;\n score?: number;\n visualMetadata?: ImageVisualMetadata;\n}\n\nexport interface ResolveImageSetInput {\n /**\n * The mode the page would prefer. A term, never a gate (ADR 0197): the set\n * settles on whichever mode its best assignment uses. Measured returning\n * MIXED for an explicit SOLID, and SOLID when unset.\n */\n preferredMode?: ImageBackground;\n images: ImageSlot[];\n}\n\nexport interface ResolveImageSetResult {\n mode?: ImageBackground;\n /** Same length and order as the request's `images`; never a hole. */\n slots: ResolvedImageSlot[];\n}\n\n/** The set's own cap — 24 slots per request, per the proto's `maxSize`. */\nexport const MAX_IMAGE_SLOTS_PER_SET = 24;\n\n/** What the server substitutes for an absent or zero `renderWidthPx`. */\nexport const DEFAULT_RENDER_WIDTH_PX = 800;\n\n/**\n * Above this, `MediaTransformUrl` refuses to compose the crop and returns the\n * uncropped original. Callers should clamp rather than let a device-pixel-ratio\n * multiplication carry them past it.\n */\nexport const MAX_RENDER_WIDTH_PX = 5000;\n\n/** True when the slot carries a usable image (as opposed to a hole). */\nexport function hasSlotImage(slot: ResolvedImageSlot | undefined): boolean {\n return Boolean(slot?.imageUrl);\n}\n\n/**\n * True when the slot's image actually depicts what the slot asked for.\n *\n * FALLBACK means the resolver had nothing for this subject and returned\n * something rather than a hole — legitimate for a decorative slot, wrong for\n * one captioned as a particular product.\n */\nexport function isSubjectMatch(slot: ResolvedImageSlot | undefined): boolean {\n return (\n slot?.match === 'IMAGE_MATCH_QUALITY_EXACT' ||\n slot?.match === 'IMAGE_MATCH_QUALITY_DEGRADED'\n );\n}\n\n/**\n * The colour to paint behind a `contain`-fitted image so its own backdrop does\n * not read as a rectangle against the surface. `backgroundColor` when the image\n * is SOLID, the dominant palette swatch otherwise, and `undefined` when neither\n * is known.\n */\nexport function backdropColorOf(\n slot: ResolvedImageSlot | undefined,\n): string | undefined {\n const meta = slot?.visualMetadata;\n if (!meta) {\n return undefined;\n }\n return meta.backgroundColor || meta.palette?.dominant || undefined;\n}\n\n/**\n * The aspect ratio to render `imageUrl` at. Normally the slot's requested\n * ratio, but a contained crop (ADR 0220) deliberately returns another, and the\n * URL's own `fill/w_,h_` carries that one — so honouring `crop.ratio` is what\n * keeps the picture undistorted.\n */\nexport function renderRatioOf(\n slot: ResolvedImageSlot | undefined,\n requestedRatio: number,\n): number {\n const crop = slot?.crop;\n if (crop?.contained && crop.ratio && crop.ratio > 0) {\n return crop.ratio;\n }\n return requestedRatio;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAUA;;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA;;AAsBA;;AAaA;;AAMA;AACA;AACA;AACA;;AAmBA;;AAoDA;AACA,OAAO,MAAMA,uBAAuB,GAAG,EAAE;;AAEzC;AACA,OAAO,MAAMC,uBAAuB,GAAG,GAAG;;AAE1C;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,mBAAmB,GAAG,IAAI;;AAEvC;AACA,OAAO,SAASC,YAAYA,CAACC,IAAmC,EAAW;EACzE,OAAOC,OAAO,CAACD,IAAI,oBAAJA,IAAI,CAAEE,QAAQ,CAAC;AAChC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAACH,IAAmC,EAAW;EAC3E,OACE,CAAAA,IAAI,oBAAJA,IAAI,CAAEI,KAAK,MAAK,2BAA2B,IAC3C,CAAAJ,IAAI,oBAAJA,IAAI,CAAEI,KAAK,MAAK,8BAA8B;AAElD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAC7BL,IAAmC,EACf;EAAA,IAAAM,aAAA;EACpB,MAAMC,IAAI,GAAGP,IAAI,oBAAJA,IAAI,CAAEQ,cAAc;EACjC,IAAI,CAACD,IAAI,EAAE;IACT,OAAOE,SAAS;EAClB;EACA,OAAOF,IAAI,CAACG,eAAe,MAAAJ,aAAA,GAAIC,IAAI,CAACI,OAAO,qBAAZL,aAAA,CAAcM,QAAQ,KAAIH,SAAS;AACpE;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASI,aAAaA,CAC3Bb,IAAmC,EACnCc,cAAsB,EACd;EACR,MAAMC,IAAI,GAAGf,IAAI,oBAAJA,IAAI,CAAEe,IAAI;EACvB,IAAIA,IAAI,YAAJA,IAAI,CAAEC,SAAS,IAAID,IAAI,CAACE,KAAK,IAAIF,IAAI,CAACE,KAAK,GAAG,CAAC,EAAE;IACnD,OAAOF,IAAI,CAACE,KAAK;EACnB;EACA,OAAOH,cAAc;AACvB","ignoreList":[]}
package/dist/esm/index.js CHANGED
@@ -18,6 +18,11 @@ export { DIAGNOSTIC_TYPES } from './component/diagnosticTypes.js';
18
18
  // Image search filters
19
19
  export { buildImageSearchFilter } from './image/imageSearchFilterTypes.js';
20
20
  export { ImageSearchFilterToken, backgroundFilter } from './image/imageSearchFilters.js';
21
+
22
+ // Image sets — the page-level slot contract (ADR 0221)
23
+
24
+ export { MAX_IMAGE_SLOTS_PER_SET, DEFAULT_RENDER_WIDTH_PX, MAX_RENDER_WIDTH_PX, hasSlotImage, isSubjectMatch, backdropColorOf, renderRatioOf } from './image/imageSetTypes.js';
25
+
21
26
  // Section definition classes + createSdkRegistry
22
27
  export { HeroSectionDefinition, HeroEntitySectionDefinition, KpiSectionDefinition, FeatureCardsSectionDefinition, EntitySectionDefinition, EntityCollectionSectionDefinition, ComparisonSectionDefinition, TextBlockSectionDefinition, CtaBannerSectionDefinition, CalloutSectionDefinition, NextStepsSectionDefinition, FeatureSection9PlusDefinition, ListItemsSectionDefinition, SkipNodesSectionDefinition, HtmlCommentSectionDefinition, SearchSectionDefinition, ErrorSectionDefinition, FallbackSectionDefinition, createSdkRegistry } from './component/componentDefinitions/index.js';
23
28
 
@@ -54,6 +59,9 @@ export { ComponentDependenciesProvider, useComponentDependencies } from './conte
54
59
  // Raw user query for the current response page
55
60
  export { UserQueryProvider, useUserQuery } from './context/UserQueryContext.js';
56
61
 
62
+ // Page-level image slot collector
63
+ export { ImageSetProvider, useImageSlot, useImageSetEnabled } from './context/ImageSetContext.js';
64
+
57
65
  // Chips context (suggestion chips shared between SearchSection and error states)
58
66
  export { ChipsProvider, useChips } from './context/ChipsContext.js';
59
67
 
@@ -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","normalizeEntityItem","entityPayloadFromItems","mergeEntityData","fetchEntityListData","listEntityItems","LIST_ITEMS_ENDPOINT","getEntityExtractor","registerEntityExtractor","transformToSolutionEntityData","transformToBlogPostEntityData","transformToGenericEntityData","toMatchedOptions","formatMoney","readCurrencyCode","formatPriceField","formatProductPriceLabel","isProductFamilyEntityType","CALLOUT_KINDS","CALLOUT_SEMANTICS","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","UNKNOWN_CONSENT","HOST_CONSENT_GLOBAL","transmit","mayTransmit","unlockOnUserAction","isUserEngaged","mayPersistIdentity","getConsentSnapshot","getGateView","subscribeToConsent","installConsentProvider","getInstalledProviderName","setConsentBufferLimit","getConsentGateStats","resetConsentGateForTests","detectConsentProvider","initConsentGate","CONSENT_OVERRIDE_KEY","CONSENT_OVERRIDE_QUERY_PARAM","getConsentOverride","setConsentOverride","createShopifyConsentProvider","isShopifyHost","createOneTrustConsentProvider","isOneTrustHost","createHostSuppliedConsentProvider","hasHostSuppliedConsent","publishHostConsent","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_ANSWER_SETTLED_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 normalizeEntityItem,\n entityPayloadFromItems,\n mergeEntityData,\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 isProductFamilyEntityType,\n} from './entity';\nexport type {\n EntityExtractor,\n FetchEntityListDataOptions,\n ListEntityItemsOptions,\n MatchedOption,\n ProductPriceFields,\n} from './entity';\nexport {\n CALLOUT_KINDS,\n CALLOUT_SEMANTICS,\n type CalloutKind,\n type CalloutSemantic,\n type Callout,\n} 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// Consent gate (DL #218)\nexport {\n type ConsentState,\n type ConsentPurpose,\n type GatedPurpose,\n type ConsentSnapshot,\n type ConsentProvider,\n type GateView,\n type HostConsentInput,\n UNKNOWN_CONSENT,\n HOST_CONSENT_GLOBAL,\n transmit,\n mayTransmit,\n unlockOnUserAction,\n isUserEngaged,\n mayPersistIdentity,\n getConsentSnapshot,\n getGateView,\n subscribeToConsent,\n installConsentProvider,\n getInstalledProviderName,\n setConsentBufferLimit,\n getConsentGateStats,\n resetConsentGateForTests,\n detectConsentProvider,\n initConsentGate,\n CONSENT_OVERRIDE_KEY,\n CONSENT_OVERRIDE_QUERY_PARAM,\n getConsentOverride,\n setConsentOverride,\n createShopifyConsentProvider,\n isShopifyHost,\n createOneTrustConsentProvider,\n isOneTrustHost,\n createHostSuppliedConsentProvider,\n hasHostSuppliedConsent,\n publishHostConsent,\n} from './privacy';\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 { Disclaimer, type DisclaimerProps } 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';\nexport {\n WEB5_ANSWER_SETTLED_EVENT,\n type Web5AnswerSettledStatus,\n type Web5AnswerSettledEventDetail,\n type Web5AnswerSettledEvent,\n} from './types/answerSettledEvent';\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 {\n mergeClientConfig,\n type DeepPartial,\n} 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,qBAAqB,EACrBC,yBAAyB,QAMpB,oBAAoB;;AAE3B;AACA,SACE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C,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","MAX_IMAGE_SLOTS_PER_SET","DEFAULT_RENDER_WIDTH_PX","MAX_RENDER_WIDTH_PX","hasSlotImage","isSubjectMatch","backdropColorOf","renderRatioOf","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","ImageSetProvider","useImageSlot","useImageSetEnabled","ChipsProvider","useChips","defaultExtractor","enrichEntitiesFromPayload","normalizeEntityItem","entityPayloadFromItems","mergeEntityData","fetchEntityListData","listEntityItems","LIST_ITEMS_ENDPOINT","getEntityExtractor","registerEntityExtractor","transformToSolutionEntityData","transformToBlogPostEntityData","transformToGenericEntityData","toMatchedOptions","formatMoney","readCurrencyCode","formatPriceField","formatProductPriceLabel","isProductFamilyEntityType","CALLOUT_KINDS","CALLOUT_SEMANTICS","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","UNKNOWN_CONSENT","HOST_CONSENT_GLOBAL","transmit","mayTransmit","unlockOnUserAction","isUserEngaged","mayPersistIdentity","getConsentSnapshot","getGateView","subscribeToConsent","installConsentProvider","getInstalledProviderName","setConsentBufferLimit","getConsentGateStats","resetConsentGateForTests","detectConsentProvider","initConsentGate","CONSENT_OVERRIDE_KEY","CONSENT_OVERRIDE_QUERY_PARAM","getConsentOverride","setConsentOverride","createShopifyConsentProvider","isShopifyHost","createOneTrustConsentProvider","isOneTrustHost","createHostSuppliedConsentProvider","hasHostSuppliedConsent","publishHostConsent","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_ANSWER_SETTLED_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// Image sets — the page-level slot contract (ADR 0221)\nexport type {\n ImageBackground,\n ImageSlotKind,\n ImageMatchQuality,\n ImageCrop,\n ImageRect,\n ImagePalette,\n ImageStatGrid,\n ImageVisualMetadata,\n ImageSlot,\n ResolvedImageSlot,\n ResolveImageSetInput,\n ResolveImageSetResult,\n} from './image/imageSetTypes';\nexport {\n MAX_IMAGE_SLOTS_PER_SET,\n DEFAULT_RENDER_WIDTH_PX,\n MAX_RENDER_WIDTH_PX,\n hasSlotImage,\n isSubjectMatch,\n backdropColorOf,\n renderRatioOf,\n} from './image/imageSetTypes';\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// Page-level image slot collector\nexport {\n ImageSetProvider,\n useImageSlot,\n useImageSetEnabled,\n type ImageSetProviderProps,\n type ImageSlotState,\n} from './context/ImageSetContext';\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 normalizeEntityItem,\n entityPayloadFromItems,\n mergeEntityData,\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 isProductFamilyEntityType,\n} from './entity';\nexport type {\n EntityExtractor,\n FetchEntityListDataOptions,\n ListEntityItemsOptions,\n MatchedOption,\n ProductPriceFields,\n} from './entity';\nexport {\n CALLOUT_KINDS,\n CALLOUT_SEMANTICS,\n type CalloutKind,\n type CalloutSemantic,\n type Callout,\n} 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// Consent gate (DL #218)\nexport {\n type ConsentState,\n type ConsentPurpose,\n type GatedPurpose,\n type ConsentSnapshot,\n type ConsentProvider,\n type GateView,\n type HostConsentInput,\n UNKNOWN_CONSENT,\n HOST_CONSENT_GLOBAL,\n transmit,\n mayTransmit,\n unlockOnUserAction,\n isUserEngaged,\n mayPersistIdentity,\n getConsentSnapshot,\n getGateView,\n subscribeToConsent,\n installConsentProvider,\n getInstalledProviderName,\n setConsentBufferLimit,\n getConsentGateStats,\n resetConsentGateForTests,\n detectConsentProvider,\n initConsentGate,\n CONSENT_OVERRIDE_KEY,\n CONSENT_OVERRIDE_QUERY_PARAM,\n getConsentOverride,\n setConsentOverride,\n createShopifyConsentProvider,\n isShopifyHost,\n createOneTrustConsentProvider,\n isOneTrustHost,\n createHostSuppliedConsentProvider,\n hasHostSuppliedConsent,\n publishHostConsent,\n} from './privacy';\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 { Disclaimer, type DisclaimerProps } 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';\nexport {\n WEB5_ANSWER_SETTLED_EVENT,\n type Web5AnswerSettledStatus,\n type Web5AnswerSettledEventDetail,\n type Web5AnswerSettledEvent,\n} from './types/answerSettledEvent';\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 {\n mergeClientConfig,\n type DeepPartial,\n} 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;;AAeA,SACEC,uBAAuB,EACvBC,uBAAuB,EACvBC,mBAAmB,EACnBC,YAAY,EACZC,cAAc,EACdC,eAAe,EACfC,aAAa,QACR,uBAAuB;;AAE9B;AACA,SACEC,qBAAqB,EACrBC,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B,EACjBC,sBAAsB,EACtBC,iBAAiB,EACjBC,cAAc,EACdC,kBAAkB,QAGb,8BAA8B;AACrC,SACEC,iBAAiB,QAEZ,2BAA2B;AAClC,SACEC,qBAAqB,EACrBC,0BAA0B,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 +1 @@
1
- {"version":3,"names":[],"sources":["../../../src/types/dependencies.ts"],"sourcesContent":["import type React from 'react';\nimport type { ApiPayloadItem, EntityTypeConfig } from './entity';\nimport type {\n EntityItem,\n EntityItemData,\n SolutionEntityData,\n BlogEntityData,\n} from '../component/types';\nimport type { RGB } from '../color/colorUtils';\nimport type { DiagnosticType } from '../component/diagnosticTypes';\nimport type { ImageSearchFilterString } from '../image/imageSearchFilterTypes';\nimport type { ContextualImageAsset } from '../image/contextualImageTypes';\n\n/**\n * Return type of useWeb5Link hook.\n */\nexport interface Web5LinkApi {\n handleLinkClick: (\n e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>,\n url: string | undefined,\n ) => void;\n sendWeb5Message: (url: string) => void;\n navigateToUrl: (url: string) => void;\n transformUrl: (url: string) => string | null;\n resolveUrl: (url: string | undefined) => string | undefined;\n isExternalUrl: (url: string) => boolean;\n isActionRegistered: (name: string) => boolean;\n executeAction: (\n name: string,\n params: Record<string, string>,\n ) => Promise<void>;\n}\n\n/**\n * Optional tracking parameters for sendMessage.\n * When provided, analytics events are automatically dispatched.\n */\nexport interface SendMessageTrackingOptions {\n /** Button/link text — fires web5_link_click with type 'web5' */\n source?: string;\n /** Prompt type — fires web5_prompt_submit instead of link_click */\n promptType?: 'text' | 'chip';\n}\n\nexport interface ComparisonSubmitPayload {\n intent: 'comparison';\n entityIds: string[];\n userPrompt?: string;\n selectedItems?: ComparisonSelectedProduct[];\n}\n\nexport interface SendMessageOptions extends SendMessageTrackingOptions {\n structuredPayload?: ComparisonSubmitPayload;\n}\n\n/**\n * Return type of useConversation hook.\n */\nexport interface ConversationApi {\n sendMessage: (\n message: string,\n options?: SendMessageOptions,\n ) => Promise<void>;\n loadConversationByTriggerId: (triggerId: string) => Promise<void>;\n}\n\nexport interface ComparisonSelectedProduct {\n entityId: string;\n entityType: string;\n title: string;\n description?: string;\n imageUrl?: string;\n url?: string;\n vendor?: string;\n price?: string;\n compareAtPrice?: string;\n sizes?: string[];\n variants?: EntityItemData['variants'];\n options?: EntityItemData['options'];\n}\n\nexport interface ProductComparisonSelectionState {\n sectionId: string | null;\n entityIds: string[];\n itemsById: Record<string, ComparisonSelectedProduct>;\n maxSelectable: number;\n submitting: boolean;\n}\n\nexport interface ProductComparisonApi {\n state: ProductComparisonSelectionState;\n maxSelectable: number;\n enterComparisonMode: (input: {\n sectionId: string;\n maxSelectable?: number;\n }) => void;\n exitComparisonMode: (sectionId?: string) => void;\n toggleComparisonProduct: (input: {\n sectionId: string;\n item: EntityItem;\n }) => void;\n removeComparisonProduct: (entityId: string) => void;\n clearComparisonSelection: () => void;\n setComparisonSubmitting: (submitting: boolean) => void;\n}\n\n/**\n * Entity transform functions provided by the host app.\n */\nexport interface EntityTransforms {\n /** @deprecated Use transformToGenericEntityData */\n transformToSolutionEntityData: (\n payloadItem: ApiPayloadItem,\n config: EntityTypeConfig,\n ) => SolutionEntityData;\n /** @deprecated Use transformToGenericEntityData */\n transformToBlogPostEntityData: (\n payloadItem: ApiPayloadItem,\n config: EntityTypeConfig,\n ) => BlogEntityData;\n transformToGenericEntityData: (\n payloadItem: ApiPayloadItem,\n config: EntityTypeConfig,\n ) => EntityItemData;\n}\n\n// SolutionEntityData, BlogEntityData, GenericEntityData are defined in component/types (single source of truth)\nexport type {\n GenericEntityData,\n SolutionEntityData,\n BlogEntityData,\n} from '../component/types';\n\n/**\n * Markdown utility functions provided by the host app.\n */\nexport interface MarkdownUtils {\n parseMarkdownToAst: (markdown: string) => any;\n extractLinks: (ast: any) => { url: string; text: string }[];\n extractText: (node: any) => string;\n}\n\n/**\n * Options for useResolveGenericEntityData hook.\n */\nexport interface ResolveGenericEntityDataOptions<TEntityData> {\n transform: (raw: ApiPayloadItem, config: EntityTypeConfig) => TEntityData;\n}\n\n/**\n * Contract for all dependencies that section components need from the host app.\n * The host app provides implementations via React context.\n *\n * Each field is a hook function reference — components call them to get the actual values.\n */\nexport interface ComponentDependencies {\n /** Hook returning Web5 link handling API */\n useWeb5Link: () => Web5LinkApi;\n\n /** Hook returning conversation API (sendMessage, loadConversationByTriggerId) */\n useConversation: () => ConversationApi;\n\n /** Hook returning product comparison selection API */\n useProductComparison?: () => ProductComparisonApi;\n\n /** Hook returning whether debug image mode is enabled */\n useDebugImageContext: () => boolean;\n\n /** Hook for resolving entity data (mixed entity types) */\n useResolveGenericEntityData: <\n TEntity extends {\n entityId: string;\n entityUrl: string;\n entityType: string;\n data?: TEntityData;\n },\n TEntityData,\n >(\n entities: TEntity[],\n options: ResolveGenericEntityDataOptions<TEntityData>,\n ) => { enrichedEntities: TEntity[]; loading: boolean };\n\n /** Entity transform functions */\n entityTransforms: EntityTransforms;\n\n /** Markdown utility functions */\n markdownUtils: MarkdownUtils;\n\n /** Image resolver for contextual images (image:// protocol) */\n resolveContextualImageUrl?: (\n client: any,\n imageKey: string,\n options?: {\n filter?: ImageSearchFilterString | null;\n },\n ) => Promise<string | null>;\n\n /** Rich contextual image resolver used by self-resolving image components */\n resolveContextualImageAsset?: (\n client: any,\n imageKey: string,\n options?: {\n filter?: ImageSearchFilterString | null;\n },\n ) => Promise<ContextualImageAsset | null>;\n\n /** Batch resolver for contextual image searches used by collage-style UIs */\n resolveContextualImageUrls?: (\n client: any,\n imageKey: string,\n options?: {\n count?: number;\n threshold?: number;\n filter?: ImageSearchFilterString | null;\n },\n ) => Promise<string[]>;\n\n /** App store client accessor (for OptimizedImage) */\n useAppClient?: () => any;\n\n /** Hook returning a ref to the scroll container element (for parallax effects) */\n useScrollContainerRef?: () => React.RefObject<HTMLElement | null>;\n\n /** Bulk icon resolution: hints → SVG URL map */\n resolveIcons?: (hints: string[]) => Promise<Record<string, string>>;\n\n /** Set the page-level mesh gradient palette colors */\n setMeshBackground?: (colors: RGB[]) => void;\n\n /** Get the current mesh gradient palette colors */\n getMeshBackground?: () => RGB[];\n\n /** Report a markdown diagnostic at render time (e.g. broken link, filtered card) */\n reportDiagnostic?: (\n diagnosticType: DiagnosticType,\n sectionType: string,\n details: string,\n ) => void;\n\n /** BI logger for contextual image events (event 914) */\n logContextualImage?: (params: {\n imageUrl: string;\n contextualTerm: string;\n imageEventType: string;\n isImageResolved: boolean;\n isFallbackImage: boolean;\n }) => void;\n\n /** Conversation context for BI tracking */\n useConversationContext?: () => {\n conversationId?: string;\n messageId?: string;\n sessionId?: string;\n };\n\n /** Fallback image URLs used when a contextual image search returns no results */\n fallbackImages?: string[];\n\n /** Client-provided loader component (replaces default CSS spinner) */\n LoaderComponent?: React.FC<{\n className?: string;\n size?: 'sm' | 'md' | 'lg';\n message?: string;\n showMessage?: boolean;\n }>;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["../../../src/types/dependencies.ts"],"sourcesContent":["import type React from 'react';\nimport type { ApiPayloadItem, EntityTypeConfig } from './entity';\nimport type {\n EntityItem,\n EntityItemData,\n SolutionEntityData,\n BlogEntityData,\n} from '../component/types';\nimport type { RGB } from '../color/colorUtils';\nimport type { DiagnosticType } from '../component/diagnosticTypes';\nimport type { ImageSearchFilterString } from '../image/imageSearchFilterTypes';\nimport type { ContextualImageAsset } from '../image/contextualImageTypes';\nimport type {\n ResolveImageSetInput,\n ResolveImageSetResult,\n} from '../image/imageSetTypes';\n\n/**\n * Return type of useWeb5Link hook.\n */\nexport interface Web5LinkApi {\n handleLinkClick: (\n e: React.MouseEvent<HTMLAnchorElement | HTMLButtonElement>,\n url: string | undefined,\n ) => void;\n sendWeb5Message: (url: string) => void;\n navigateToUrl: (url: string) => void;\n transformUrl: (url: string) => string | null;\n resolveUrl: (url: string | undefined) => string | undefined;\n isExternalUrl: (url: string) => boolean;\n isActionRegistered: (name: string) => boolean;\n executeAction: (\n name: string,\n params: Record<string, string>,\n ) => Promise<void>;\n}\n\n/**\n * Optional tracking parameters for sendMessage.\n * When provided, analytics events are automatically dispatched.\n */\nexport interface SendMessageTrackingOptions {\n /** Button/link text — fires web5_link_click with type 'web5' */\n source?: string;\n /** Prompt type — fires web5_prompt_submit instead of link_click */\n promptType?: 'text' | 'chip';\n}\n\nexport interface ComparisonSubmitPayload {\n intent: 'comparison';\n entityIds: string[];\n userPrompt?: string;\n selectedItems?: ComparisonSelectedProduct[];\n}\n\nexport interface SendMessageOptions extends SendMessageTrackingOptions {\n structuredPayload?: ComparisonSubmitPayload;\n}\n\n/**\n * Return type of useConversation hook.\n */\nexport interface ConversationApi {\n sendMessage: (message: string, options?: SendMessageOptions) => Promise<void>;\n loadConversationByTriggerId: (triggerId: string) => Promise<void>;\n}\n\nexport interface ComparisonSelectedProduct {\n entityId: string;\n entityType: string;\n title: string;\n description?: string;\n imageUrl?: string;\n url?: string;\n vendor?: string;\n price?: string;\n compareAtPrice?: string;\n sizes?: string[];\n variants?: EntityItemData['variants'];\n options?: EntityItemData['options'];\n}\n\nexport interface ProductComparisonSelectionState {\n sectionId: string | null;\n entityIds: string[];\n itemsById: Record<string, ComparisonSelectedProduct>;\n maxSelectable: number;\n submitting: boolean;\n}\n\nexport interface ProductComparisonApi {\n state: ProductComparisonSelectionState;\n maxSelectable: number;\n enterComparisonMode: (input: {\n sectionId: string;\n maxSelectable?: number;\n }) => void;\n exitComparisonMode: (sectionId?: string) => void;\n toggleComparisonProduct: (input: {\n sectionId: string;\n item: EntityItem;\n }) => void;\n removeComparisonProduct: (entityId: string) => void;\n clearComparisonSelection: () => void;\n setComparisonSubmitting: (submitting: boolean) => void;\n}\n\n/**\n * Entity transform functions provided by the host app.\n */\nexport interface EntityTransforms {\n /** @deprecated Use transformToGenericEntityData */\n transformToSolutionEntityData: (\n payloadItem: ApiPayloadItem,\n config: EntityTypeConfig,\n ) => SolutionEntityData;\n /** @deprecated Use transformToGenericEntityData */\n transformToBlogPostEntityData: (\n payloadItem: ApiPayloadItem,\n config: EntityTypeConfig,\n ) => BlogEntityData;\n transformToGenericEntityData: (\n payloadItem: ApiPayloadItem,\n config: EntityTypeConfig,\n ) => EntityItemData;\n}\n\n// SolutionEntityData, BlogEntityData, GenericEntityData are defined in component/types (single source of truth)\nexport type {\n GenericEntityData,\n SolutionEntityData,\n BlogEntityData,\n} from '../component/types';\n\n/**\n * Markdown utility functions provided by the host app.\n */\nexport interface MarkdownUtils {\n parseMarkdownToAst: (markdown: string) => any;\n extractLinks: (ast: any) => { url: string; text: string }[];\n extractText: (node: any) => string;\n}\n\n/**\n * Options for useResolveGenericEntityData hook.\n */\nexport interface ResolveGenericEntityDataOptions<TEntityData> {\n transform: (raw: ApiPayloadItem, config: EntityTypeConfig) => TEntityData;\n}\n\n/**\n * Contract for all dependencies that section components need from the host app.\n * The host app provides implementations via React context.\n *\n * Each field is a hook function reference — components call them to get the actual values.\n */\nexport interface ComponentDependencies {\n /** Hook returning Web5 link handling API */\n useWeb5Link: () => Web5LinkApi;\n\n /** Hook returning conversation API (sendMessage, loadConversationByTriggerId) */\n useConversation: () => ConversationApi;\n\n /** Hook returning product comparison selection API */\n useProductComparison?: () => ProductComparisonApi;\n\n /** Hook returning whether debug image mode is enabled */\n useDebugImageContext: () => boolean;\n\n /** Hook for resolving entity data (mixed entity types) */\n useResolveGenericEntityData: <\n TEntity extends {\n entityId: string;\n entityUrl: string;\n entityType: string;\n data?: TEntityData;\n },\n TEntityData,\n >(\n entities: TEntity[],\n options: ResolveGenericEntityDataOptions<TEntityData>,\n ) => { enrichedEntities: TEntity[]; loading: boolean };\n\n /** Entity transform functions */\n entityTransforms: EntityTransforms;\n\n /** Markdown utility functions */\n markdownUtils: MarkdownUtils;\n\n /** Image resolver for contextual images (image:// protocol) */\n resolveContextualImageUrl?: (\n client: any,\n imageKey: string,\n options?: {\n filter?: ImageSearchFilterString | null;\n },\n ) => Promise<string | null>;\n\n /** Rich contextual image resolver used by self-resolving image components */\n resolveContextualImageAsset?: (\n client: any,\n imageKey: string,\n options?: {\n filter?: ImageSearchFilterString | null;\n },\n ) => Promise<ContextualImageAsset | null>;\n\n /** Batch resolver for contextual image searches used by collage-style UIs */\n resolveContextualImageUrls?: (\n client: any,\n imageKey: string,\n options?: {\n count?: number;\n threshold?: number;\n filter?: ImageSearchFilterString | null;\n },\n ) => Promise<string[]>;\n\n /**\n * Resolves one page's image slots together (ADR 0221).\n *\n * The transport for `ResolveImageSet`. Optional: where it is absent,\n * `ImageSetProvider` reports every slot `unavailable` and sections keep their\n * existing `web5://image/` path, so this can be rolled out per host.\n *\n * The host owns the wire mapping — responses come back\n * `preserving_proto_field_name` — and owns reaching the endpoint at all,\n * which is not trivial: `ResolveImageSet` is INTERNAL, SITE tenancy, with\n * `uou` and `anonymous` NOT_ALLOWED, so an embed cannot call it directly the\n * way it calls `Images`.\n */\n resolveImageSet?: (\n input: ResolveImageSetInput,\n ) => Promise<ResolveImageSetResult>;\n\n /** App store client accessor (for OptimizedImage) */\n useAppClient?: () => any;\n\n /** Hook returning a ref to the scroll container element (for parallax effects) */\n useScrollContainerRef?: () => React.RefObject<HTMLElement | null>;\n\n /** Bulk icon resolution: hints → SVG URL map */\n resolveIcons?: (hints: string[]) => Promise<Record<string, string>>;\n\n /** Set the page-level mesh gradient palette colors */\n setMeshBackground?: (colors: RGB[]) => void;\n\n /** Get the current mesh gradient palette colors */\n getMeshBackground?: () => RGB[];\n\n /** Report a markdown diagnostic at render time (e.g. broken link, filtered card) */\n reportDiagnostic?: (\n diagnosticType: DiagnosticType,\n sectionType: string,\n details: string,\n ) => void;\n\n /** BI logger for contextual image events (event 914) */\n logContextualImage?: (params: {\n imageUrl: string;\n contextualTerm: string;\n imageEventType: string;\n isImageResolved: boolean;\n isFallbackImage: boolean;\n }) => void;\n\n /** Conversation context for BI tracking */\n useConversationContext?: () => {\n conversationId?: string;\n messageId?: string;\n sessionId?: string;\n };\n\n /** Fallback image URLs used when a contextual image search returns no results */\n fallbackImages?: string[];\n\n /** Client-provided loader component (replaces default CSS spinner) */\n LoaderComponent?: React.FC<{\n className?: string;\n size?: 'sm' | 'md' | 'lg';\n message?: string;\n showMessage?: boolean;\n }>;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { ImageSearchFilterString } from '../../image/imageSearchFilterTypes';
3
+ import { type ResolvedImageSlot } from '../../image/imageSetTypes';
3
4
  interface OptimizedImageBaseProps {
4
5
  /** Accessible alternative text for the rendered image. */
5
6
  alt: string;
@@ -41,6 +42,17 @@ interface OptimizedImageBaseProps {
41
42
  * then, and on any probe/CORS failure, the passed `objectFit`/`imageMode`
42
43
  * apply. No effect for `layout="intrinsic"`. */
43
44
  adaptiveBackdrop?: boolean;
45
+ /**
46
+ * A slot resolved by `ResolveImageSet` (ADR 0221). Supplying it makes the
47
+ * server's own decode authoritative over `adaptiveBackdrop`'s canvas probe:
48
+ * fit comes from `visualMetadata.background` and the backdrop colour from
49
+ * `backgroundColor` (falling back to the dominant swatch for a scene), so no
50
+ * pixel is read back, no CORS is needed and nothing is guessed.
51
+ *
52
+ * Pair it with `resolvedUrl={slot.imageUrl}` and `disableResize` — the URL
53
+ * already carries the crop and the render size.
54
+ */
55
+ slot?: ResolvedImageSlot;
44
56
  /** Full URL to a fallback image used when the primary image is considered low resolution. */
45
57
  fallbackOnLowRes?: string;
46
58
  /** Minimum acceptable width or height before low-resolution fallback is triggered. */
@@ -1 +1 @@
1
- {"version":3,"file":"OptimizedImage.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/OptimizedImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAqD,MAAM,OAAO,CAAC;AAQ1E,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,oCAAoC,CAAC;AAKlF,UAAU,uBAAuB;IAC/B,0DAA0D;IAC1D,GAAG,EAAE,MAAM,CAAC;IACZ,mEAAmE;IACnE,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2DAA2D;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uEAAuE;IACvE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,CAAC;IACzC,iFAAiF;IACjF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iEAAiE;IACjE,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,+DAA+D;IAC/D,SAAS,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,YAAY,CAAC;IACjE,+CAA+C;IAC/C,MAAM,CAAC,EAAE,MAAM,GAAG,W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,MAAM,CAAC;IAC1B,sFAAsF;IACtF,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,UAAU,+BAA+B;IACvC,iGAAiG;IACjG,QAAQ,EAAE,MAAM,CAAC;IACjB,8FAA8F;IAC9F,MAAM,CAAC,EAAE,uBAAuB,CAAC;IACjC,oGAAoG;IACpG,WAAW,CAAC,EAAE,KAAK,CAAC;CACrB;AAED,UAAU,kCAAkC;IAC1C,6FAA6F;IAC7F,WAAW,EAAE,MAAM,CAAC;IACpB,mGAAmG;IACnG,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,sDAAsD;IACtD,MAAM,CAAC,EAAE,KAAK,CAAC;CAChB;AAED,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,GACvD,CAAC,+BAA+B,GAAG,kCAAkC,CAAC,CAAC;AAEzE,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAspBvD,CAAC"}
@@ -0,0 +1,74 @@
1
+ import { type FC, type PropsWithChildren } from 'react';
2
+ import { type ImageBackground, type ImageSlot, type ResolveImageSetResult, type ResolvedImageSlot } from '../image/imageSetTypes';
3
+ /**
4
+ * The page-level image collector (ADR 0221).
5
+ *
6
+ * Sections declare slots; this provider resolves them together. That is the
7
+ * whole point: a per-component call to a set-level endpoint is a one-slot
8
+ * request, which throws away the page-wide assignment, the per-kind mode
9
+ * negotiation and the cohesion that are the only reasons the endpoint takes a
10
+ * list at all.
11
+ *
12
+ * The shape is deliberately one-shot per turn. Slots register during the
13
+ * commit that renders them, the provider flushes once on the next microtask,
14
+ * and a slot that registers after that flush does NOT trigger a second
15
+ * request — it reports `late` and the caller falls back. A page that asks
16
+ * twice cannot be coherent, so asking twice is not offered.
17
+ */
18
+ type SlotStatus =
19
+ /** No resolver available — the host did not supply one. */
20
+ 'unavailable'
21
+ /** Registered, waiting for the flush or the response. */
22
+ | 'pending'
23
+ /** The response arrived and carried this slot. */
24
+ | 'resolved'
25
+ /** Registered after the set had already been sent; take the old path. */
26
+ | 'late'
27
+ /** The request failed. */
28
+ | 'failed';
29
+ export interface ImageSlotState {
30
+ status: SlotStatus;
31
+ slot?: ResolvedImageSlot;
32
+ /** The mode the whole set settled on, once known. */
33
+ mode?: ImageBackground;
34
+ }
35
+ export interface ImageSetProviderProps extends PropsWithChildren {
36
+ /**
37
+ * Resolves one set. Supplied by the host rather than called directly, so core
38
+ * carries no transport: see `ComponentDependencies.resolveImageSet`.
39
+ */
40
+ resolveImageSet?: (input: {
41
+ images: ImageSlot[];
42
+ preferredMode?: ImageBackground;
43
+ }) => Promise<ResolveImageSetResult>;
44
+ /** Passed through as a tie-break term; never a gate (ADR 0197). */
45
+ preferredMode?: ImageBackground;
46
+ /**
47
+ * Identifies the turn. Changing it starts a new set — the previous turn's
48
+ * results are dropped and slots re-register. Without it the provider resolves
49
+ * exactly once for its lifetime.
50
+ */
51
+ turnId?: string;
52
+ /**
53
+ * Slots beyond this many are refused with `late` rather than silently
54
+ * dropped by the server. Defaults to the contract's own cap of 24.
55
+ */
56
+ maxSlots?: number;
57
+ }
58
+ export declare const ImageSetProvider: FC<ImageSetProviderProps>;
59
+ /**
60
+ * Declare one image slot and read back what the page-wide resolution gave it.
61
+ *
62
+ * Returns `{ status: 'unavailable' }` when no provider or no resolver is
63
+ * present — storybook, tests, a host that has not adopted this yet — so a
64
+ * caller can render its existing image path unchanged in that case rather than
65
+ * guard on the provider's existence.
66
+ *
67
+ * `request` is read on every render but only its identity matters for
68
+ * re-registration, so callers should memoise it (or let its fields be stable).
69
+ */
70
+ export declare function useImageSlot(request: ImageSlot | undefined): ImageSlotState;
71
+ /** True when a host has wired a resolver — i.e. slots will actually resolve. */
72
+ export declare function useImageSetEnabled(): boolean;
73
+ export {};
74
+ //# sourceMappingURL=ImageSetContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageSetContext.d.ts","sourceRoot":"","sources":["../../../src/context/ImageSetContext.tsx"],"names":[],"mappings":"AAAA,OAAc,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
+ * 0148, 0187, 0197, 0220). Declared here rather than imported from the
6
+ * ambassador package so core carries no transport dependency: the host supplies
7
+ * `ComponentDependencies.resolveImageSet` and owns the wire mapping, including
8
+ * the fact that responses come back `preserving_proto_field_name`.
9
+ *
10
+ * String unions rather than enums so the values are exactly the wire's and no
11
+ * runtime object ships with them.
12
+ */
13
+ /** How an image sits on its background. */
14
+ export type ImageBackground = 'IMAGE_BACKGROUND_UNSPECIFIED'
15
+ /** Cut out — no background of its own. */
16
+ | 'IMAGE_BACKGROUND_TRANSPARENT'
17
+ /** One flat colour behind the subject; `backgroundColor` is then non-empty. */
18
+ | 'IMAGE_BACKGROUND_SOLID'
19
+ /** A scene: the background is part of the picture, and has no one colour. */
20
+ | 'IMAGE_BACKGROUND_MIXED';
21
+ /** What a slot is for, which decides what it may name and how it is scored. */
22
+ export type ImageSlotKind = 'IMAGE_SLOT_KIND_UNSPECIFIED'
23
+ /** Presents one entity — names it via `entityId`. */
24
+ | 'IMAGE_SLOT_KIND_ENTITY'
25
+ /** Illustrates a section — names what it is about via `semantic`. */
26
+ | 'IMAGE_SLOT_KIND_EDITORIAL';
27
+ /**
28
+ * How honestly a slot's image answers what the slot asked for.
29
+ *
30
+ * Measured, and load-bearing: this is the ONLY field that separates a hit from
31
+ * a miss. `score` cannot do it — a FALLBACK has been observed at 0.995 against
32
+ * a correct EXACT at 0.86 in the same response — and neither field may be
33
+ * compared across responses, because both are properties of the page-wide
34
+ * assignment rather than of the slot. The same entity slot resolving to the
35
+ * same image with a byte-identical crop has come back DEGRADED in one request
36
+ * and EXACT in another, differing only in what else shared the page.
37
+ */
38
+ export type ImageMatchQuality = 'IMAGE_MATCH_QUALITY_UNSPECIFIED'
39
+ /** The slot's own image, and one it would have chosen. */
40
+ | 'IMAGE_MATCH_QUALITY_EXACT'
41
+ /** The slot's own subject, but a compromise on fit, framing or mode. */
42
+ | 'IMAGE_MATCH_QUALITY_DEGRADED'
43
+ /** Not the slot's subject — something rather than a hole. */
44
+ | 'IMAGE_MATCH_QUALITY_FALLBACK';
45
+ /** A crop in source pixels of the image the slot was given. */
46
+ export interface ImageCrop {
47
+ x: number;
48
+ y: number;
49
+ width: number;
50
+ height: number;
51
+ /** Fraction of the detected subject the crop discards, 0..1. */
52
+ subjectLoss: number;
53
+ /**
54
+ * This crop's own aspect ratio. Equal to the slot's requested `ratio` unless
55
+ * `contained` is true.
56
+ */
57
+ ratio?: number;
58
+ /**
59
+ * True when the crop deliberately does not match the requested ratio, to keep
60
+ * the whole subject in frame rather than cut it (ADR 0220). Only possible on
61
+ * a SOLID image, so `backgroundColor` is guaranteed non-empty alongside it.
62
+ * Render at `crop.ratio`, centred, and pad the rest with `backgroundColor`.
63
+ */
64
+ contained?: boolean;
65
+ }
66
+ /** A box in normalised [0,1] coordinates — a fraction of the image's own size. */
67
+ export interface ImageRect {
68
+ x: number;
69
+ y: number;
70
+ width: number;
71
+ height: number;
72
+ }
73
+ export interface ImagePalette {
74
+ dominant: string;
75
+ swatches: string[];
76
+ }
77
+ /** A square grid of per-cell values, `edge` on a side. */
78
+ export interface ImageStatGrid {
79
+ edge: number;
80
+ cells: number[];
81
+ }
82
+ /**
83
+ * The feature record the resolver already decoded for its own scoring, returned
84
+ * rather than discarded (ADR 0187).
85
+ */
86
+ export interface ImageVisualMetadata {
87
+ width: number;
88
+ height: number;
89
+ background: ImageBackground;
90
+ /**
91
+ * Flat backdrop colour. Non-empty exactly when `background` is SOLID — a
92
+ * scene has no one backdrop colour, so a MIXED image carries `''` here and a
93
+ * renderer wanting a colour should fall back to `palette.dominant`.
94
+ */
95
+ backgroundColor: string;
96
+ subject?: ImageRect;
97
+ palette?: ImagePalette;
98
+ luma?: ImageStatGrid;
99
+ variance?: ImageStatGrid;
100
+ /** Reserved for the VLM label tier; empty until it ships. */
101
+ labels: string[];
102
+ }
103
+ /** One slot a section declares. */
104
+ export interface ImageSlot {
105
+ /** Caller's name for this slot, echoed back as `slotId`. Unique per request. */
106
+ id: string;
107
+ kind: ImageSlotKind;
108
+ /** Width divided by height of the hole to fill. Must be positive. */
109
+ ratio: number;
110
+ /** EDITORIAL slots name what the section is about. */
111
+ semantic?: string;
112
+ /**
113
+ * ENTITY slots name the entity. This is the row's **bare external id** (e.g.
114
+ * `gid://shopify/Product/123`), never the prefixed `doc_id` (`product:...`) —
115
+ * an image's `parent_id` is stamped with the former. Getting it wrong does
116
+ * not error; the slot silently returns an unrelated image at FALLBACK.
117
+ */
118
+ entityId?: string;
119
+ /**
120
+ * Width the slot renders at. Omitted, the server substitutes 800. A value
121
+ * ABOVE 5000 is the dangerous one: the crop is then dropped from the URL and
122
+ * the uncropped original comes back with a `crop` beside it that nothing
123
+ * applied, with no error.
124
+ */
125
+ renderWidthPx?: number;
126
+ }
127
+ export interface ResolvedImageSlot {
128
+ slotId: string;
129
+ /** Empty when the set could fill no image for this slot. */
130
+ imageUrl?: string;
131
+ /** How to crop `imageUrl` — already composed into the URL by the server. */
132
+ crop?: ImageCrop;
133
+ match?: ImageMatchQuality;
134
+ score?: number;
135
+ visualMetadata?: ImageVisualMetadata;
136
+ }
137
+ export interface ResolveImageSetInput {
138
+ /**
139
+ * The mode the page would prefer. A term, never a gate (ADR 0197): the set
140
+ * settles on whichever mode its best assignment uses. Measured returning
141
+ * MIXED for an explicit SOLID, and SOLID when unset.
142
+ */
143
+ preferredMode?: ImageBackground;
144
+ images: ImageSlot[];
145
+ }
146
+ export interface ResolveImageSetResult {
147
+ mode?: ImageBackground;
148
+ /** Same length and order as the request's `images`; never a hole. */
149
+ slots: ResolvedImageSlot[];
150
+ }
151
+ /** The set's own cap — 24 slots per request, per the proto's `maxSize`. */
152
+ export declare const MAX_IMAGE_SLOTS_PER_SET = 24;
153
+ /** What the server substitutes for an absent or zero `renderWidthPx`. */
154
+ export declare const DEFAULT_RENDER_WIDTH_PX = 800;
155
+ /**
156
+ * Above this, `MediaTransformUrl` refuses to compose the crop and returns the
157
+ * uncropped original. Callers should clamp rather than let a device-pixel-ratio
158
+ * multiplication carry them past it.
159
+ */
160
+ export declare const MAX_RENDER_WIDTH_PX = 5000;
161
+ /** True when the slot carries a usable image (as opposed to a hole). */
162
+ export declare function hasSlotImage(slot: ResolvedImageSlot | undefined): boolean;
163
+ /**
164
+ * True when the slot's image actually depicts what the slot asked for.
165
+ *
166
+ * FALLBACK means the resolver had nothing for this subject and returned
167
+ * something rather than a hole — legitimate for a decorative slot, wrong for
168
+ * one captioned as a particular product.
169
+ */
170
+ export declare function isSubjectMatch(slot: ResolvedImageSlot | undefined): boolean;
171
+ /**
172
+ * The colour to paint behind a `contain`-fitted image so its own backdrop does
173
+ * not read as a rectangle against the surface. `backgroundColor` when the image
174
+ * is SOLID, the dominant palette swatch otherwise, and `undefined` when neither
175
+ * is known.
176
+ */
177
+ export declare function backdropColorOf(slot: ResolvedImageSlot | undefined): string | undefined;
178
+ /**
179
+ * The aspect ratio to render `imageUrl` at. Normally the slot's requested
180
+ * ratio, but a contained crop (ADR 0220) deliberately returns another, and the
181
+ * URL's own `fill/w_,h_` carries that one — so honouring `crop.ratio` is what
182
+ * keeps the picture undistorted.
183
+ */
184
+ export declare function renderRatioOf(slot: ResolvedImageSlot | undefined, requestedRatio: number): number;
185
+ //# sourceMappingURL=imageSetTypes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imageSetTypes.d.ts","sourceRoot":"","sources":["../../../src/image/imageSetTypes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,2CAA2C;AAC3C,MAAM,MAAM,eAAe,GACvB,8BAA8B;AAChC,0CAA0C;GACxC,8BAA8B;AAChC,+EAA+E;GAC7E,wBAAwB;AAC1B,6EAA6E;GAC3E,wBAAwB,CAAC;AAE7B,+EAA+E;AAC/E,MAAM,MAAM,aAAa,GACrB,6BAA6B;AAC/B,qDAAqD;GACnD,wBAAwB;AAC1B,qEAAqE;GACnE,2BAA2B,CAAC;AAEhC;;;;;;;;;;GAUG;AACH,MAAM,MAAM,iBAAiB,GACzB,iCAAiC;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AAa,CAC3B,IAAI,EAAE,iBAAiB,GAAG,SAAS,EACnC,cAAc,EAAE,MAAM,GACrB,MAAM,CAMR"}
@@ -10,6 +10,8 @@ export type { DiagnosticType } from './component/diagnosticTypes';
10
10
  export { buildImageSearchFilter, type ImageSearchFilterString, } from './image/imageSearchFilterTypes';
11
11
  export { ImageSearchFilterToken, backgroundFilter, } from './image/imageSearchFilters';
12
12
  export type { ContextualImageAsset, ImageSourceInput, ResolvedImageSource, ResolvedImageSourceKind, } from './image/contextualImageTypes';
13
+ export type { ImageBackground, ImageSlotKind, ImageMatchQuality, ImageCrop, ImageRect, ImagePalette, ImageStatGrid, ImageVisualMetadata, ImageSlot, ResolvedImageSlot, ResolveImageSetInput, ResolveImageSetResult, } from './image/imageSetTypes';
14
+ export { MAX_IMAGE_SLOTS_PER_SET, DEFAULT_RENDER_WIDTH_PX, MAX_RENDER_WIDTH_PX, hasSlotImage, isSubjectMatch, backdropColorOf, renderRatioOf, } from './image/imageSetTypes';
13
15
  export { HeroSectionDefinition, HeroEntitySectionDefinition, KpiSectionDefinition, FeatureCardsSectionDefinition, EntitySectionDefinition, EntityCollectionSectionDefinition, ComparisonSectionDefinition, TextBlockSectionDefinition, CtaBannerSectionDefinition, CalloutSectionDefinition, NextStepsSectionDefinition, FeatureSection9PlusDefinition, ListItemsSectionDefinition, SkipNodesSectionDefinition, HtmlCommentSectionDefinition, SearchSectionDefinition, ErrorSectionDefinition, FallbackSectionDefinition, createSdkRegistry, } from './component/componentDefinitions';
14
16
  export { ComponentRegistry } from './registry';
15
17
  export type { SlotOptions, SectionOptions, SectionRegistration, SlotNode, SlotIntentNode, SectionIntentNode, SectionNode, SlotVariant, SectionVariant, RegistryCatalog, ActionResult, ActionHandler, } from './registry';
@@ -22,6 +24,7 @@ export { hasImage, isHtmlComment } from './utils/nodeMatchers';
22
24
  export { matchMarkdown, type MarkdownMatchResult, matchAllSections, type MatchAllSectionsResult, nodesToParts, } from './match';
23
25
  export { ComponentDependenciesProvider, useComponentDependencies, type ComponentDependenciesProviderProps, } from './context/ComponentDependenciesContext';
24
26
  export { UserQueryProvider, useUserQuery, type UserQueryProviderProps, } from './context/UserQueryContext';
27
+ export { ImageSetProvider, useImageSlot, useImageSetEnabled, type ImageSetProviderProps, type ImageSlotState, } from './context/ImageSetContext';
25
28
  export { ChipsProvider, useChips, type SuggestionChip, } from './context/ChipsContext';
26
29
  export type { ComponentDependencies, Web5LinkApi, ConversationApi, SendMessageTrackingOptions, SendMessageOptions, ComparisonSubmitPayload, ComparisonSelectedProduct, ProductComparisonSelectionState, ProductComparisonApi, EntityTransforms, MarkdownUtils, ResolveGenericEntityDataOptions, } from './types/dependencies';
27
30
  export type { ApiPayloadItem, EntityTypeConfig, EntityConfig, EntityExtractionContext, } from './types/entity';