@wix/web5-core 1.63.26 → 1.63.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/cjs/context/ComponentDependenciesContext.js +15 -1
  2. package/dist/cjs/context/ComponentDependenciesContext.js.map +1 -1
  3. package/dist/cjs/context/ImageSlotContext.js +210 -0
  4. package/dist/cjs/context/ImageSlotContext.js.map +1 -0
  5. package/dist/cjs/hooks/useImageSlot.js +182 -0
  6. package/dist/cjs/hooks/useImageSlot.js.map +1 -0
  7. package/dist/cjs/image/composeSemantic.js +94 -0
  8. package/dist/cjs/image/composeSemantic.js.map +1 -0
  9. package/dist/cjs/image/imageSlotTypes.js +4 -0
  10. package/dist/cjs/image/imageSlotTypes.js.map +1 -0
  11. package/dist/cjs/index.js +11 -3
  12. package/dist/cjs/index.js.map +1 -1
  13. package/dist/cjs/types/dependencies.js.map +1 -1
  14. package/dist/esm/context/ComponentDependenciesContext.js +13 -0
  15. package/dist/esm/context/ComponentDependenciesContext.js.map +1 -1
  16. package/dist/esm/context/ImageSlotContext.js +197 -0
  17. package/dist/esm/context/ImageSlotContext.js.map +1 -0
  18. package/dist/esm/hooks/useImageSlot.js +177 -0
  19. package/dist/esm/hooks/useImageSlot.js.map +1 -0
  20. package/dist/esm/image/composeSemantic.js +91 -0
  21. package/dist/esm/image/composeSemantic.js.map +1 -0
  22. package/dist/esm/image/imageSlotTypes.js +2 -0
  23. package/dist/esm/image/imageSlotTypes.js.map +1 -0
  24. package/dist/esm/index.js +7 -0
  25. package/dist/esm/index.js.map +1 -1
  26. package/dist/esm/types/dependencies.js.map +1 -1
  27. package/dist/types/context/ComponentDependenciesContext.d.ts +10 -0
  28. package/dist/types/context/ComponentDependenciesContext.d.ts.map +1 -1
  29. package/dist/types/context/ImageSlotContext.d.ts +63 -0
  30. package/dist/types/context/ImageSlotContext.d.ts.map +1 -0
  31. package/dist/types/hooks/useImageSlot.d.ts +35 -0
  32. package/dist/types/hooks/useImageSlot.d.ts.map +1 -0
  33. package/dist/types/image/composeSemantic.d.ts +37 -0
  34. package/dist/types/image/composeSemantic.d.ts.map +1 -0
  35. package/dist/types/image/imageSlotTypes.d.ts +112 -0
  36. package/dist/types/image/imageSlotTypes.d.ts.map +1 -0
  37. package/dist/types/index.d.ts +7 -0
  38. package/dist/types/index.d.ts.map +1 -1
  39. package/dist/types/types/dependencies.d.ts +11 -0
  40. package/dist/types/types/dependencies.d.ts.map +1 -1
  41. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../../src/image/imageSlotTypes.ts"],"sourcesContent":["/**\n * The image-slot vocabulary: what a section declares, and what it gets back.\n *\n * A section describes the hole in its layout and what the picture should be\n * about. It does not name a request, a batch, or a set boundary — that omission\n * is deliberate and load-bearing, because it is what lets the boundary widen\n * from the section to the page later without touching a single component.\n *\n * These mirror `wix.enterprise.web_five.v1.ImageService/ResolveImageSet`. The\n * wire is `preserving_proto_field_name` (`slot_id`, `image_url`,\n * `visual_metadata`, `background_color`) — confirmed against a live response,\n * not assumed — and normalising that is the transport's job, so nothing behind\n * the port ever sees snake_case.\n */\n\nexport type ImageSlotKind =\n | 'IMAGE_SLOT_KIND_ENTITY'\n | 'IMAGE_SLOT_KIND_EDITORIAL';\n\n/**\n * How well the resolver thinks it did. Read THIS rather than the presence of a\n * url: a `FALLBACK` is a real image the resolver is not proud of, so a card may\n * reasonably prefer its own payload picture over one, while a hero may prefer\n * no picture at all.\n */\nexport type ImageMatchQuality =\n | 'IMAGE_MATCH_QUALITY_EXACT'\n | 'IMAGE_MATCH_QUALITY_DEGRADED'\n | 'IMAGE_MATCH_QUALITY_FALLBACK';\n\nexport type ImageBackground =\n | 'IMAGE_BACKGROUND_TRANSPARENT'\n | 'IMAGE_BACKGROUND_SOLID'\n | 'IMAGE_BACKGROUND_MIXED';\n\n/** One hole in a layout, as sent. */\nexport interface ImageSlotRequest {\n /** Echoed back as `slotId` — the ONLY way to match a result to a slot. */\n id: string;\n kind: ImageSlotKind;\n /** width / height of the hole. Drives both the crop and the fit score. */\n ratio: number;\n /** Delivered pixel width. Server default is 800 when omitted. */\n renderWidthPx?: number;\n /** ENTITY slots only — scopes candidates to that entity's own pictures. */\n entityId?: string;\n /** EDITORIAL slots only — free text, semantically retrieved over labels. */\n semantic?: string;\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\nexport interface ImageVisualMetadata {\n width: number;\n height: number;\n background?: ImageBackground;\n /** Paint the letterbox with this — a product shot on a seamless backdrop\n * needs that backdrop's colour, and only the response knows it. */\n backgroundColor: string;\n palette?: ImagePalette;\n /** Per-cell luma. Enough to compute a scrim that belongs to the photograph\n * rather than washing every hero with one blanket alpha. */\n luma?: ImageStatGrid;\n labels: string[];\n}\n\nexport interface ResolvedImageSlot {\n slotId: string;\n /** Already cropped and resized to the slot — there is no client-side\n * windowing to do. Null when the resolver could not fill the slot. */\n imageUrl: string | null;\n match?: ImageMatchQuality;\n score?: number;\n visualMetadata?: ImageVisualMetadata;\n}\n\nexport interface ResolveImageSetResponse {\n mode?: ImageBackground;\n slots: ResolvedImageSlot[];\n}\n\n/**\n * The port a host fills. Declared here, provided by `web50-server-ui` through\n * `AppDependenciesProvider` — the same split `resolveContextualImage*` already\n * uses, where core owns the hook and the host owns the adapter.\n */\nexport type ResolveImageSetPort = (\n images: ImageSlotRequest[],\n) => Promise<ResolveImageSetResponse>;\n\n/** What a declaration gets back. `pending` is the first paint, always. */\nexport type SlotState =\n | { status: 'pending' }\n | { status: 'resolved'; slot: ResolvedImageSlot }\n | { status: 'unavailable' };\n\n/**\n * Where a slot's subject comes from. Evaluated per slot, first hit wins:\n * an explicit token outranks an entity ref, which outranks the section's own\n * words. The precedence is what keeps the three cases free of each other — a\n * section written for one becomes another the day an author writes a token,\n * with no branch in section code.\n */\nexport type ImageSubject =\n /** A `web5://image/...` token an author wrote, or a bare phrase. */\n | { from: 'token'; token: string }\n /** A catalog entity — the resolver scopes candidates to its own pictures. */\n | { from: 'entity'; entityId: string }\n /** The section's own words. Hand over raw props; composing is core's job. */\n | { from: 'text'; title?: string; lead?: string };\n"],"mappings":"","ignoreList":[]}
package/dist/cjs/index.js CHANGED
@@ -1,9 +1,10 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.addToCart = exports.Web5UrlType = exports.WEB5_USER_QUERY_EVENT = exports.WEB5_SCOPES = exports.WEB5_SCOPE = exports.WEB5_ROOT_ID = exports.WEB5_ROOT_CLASS = exports.WEB5_REDIRECT_EVENT = exports.WEB5_GLOBAL_TOKENS = exports.WEB5_ANSWER_UPDATED_EVENT = exports.WEB5_ANSWER_SETTLED_EVENT = exports.UserQueryProvider = exports.UserQuery = exports.UnifiedMarkdownParser = exports.UnifiedLink = exports.UNKNOWN_CONSENT = exports.TextBlockSectionDefinition = exports.TableRow = exports.TableHeader = exports.TableHead = exports.TableFooter = exports.TableCell = exports.TableCaption = exports.TableBody = exports.Table = exports.TOKEN_NAME_PATTERN = exports.THEME_TOKEN_CONTRACT = exports.THEME_OVERRIDE_TOKENS = exports.THEME_DEBUG_QUERY_PARAM = exports.THEME_DEBUG_KEY = exports.TEMPLATES_MANIFEST_URL = exports.TEMPLATES_CDN_BASE = exports.SmartIcon = exports.SkipNodesSectionDefinition = exports.ShopifyStorefrontClient = exports.SectionSkeleton = exports.SearchSectionDefinition = exports.SearchSection = exports.STREAMING_TIMEOUT_MS = exports.REFRESH_PROMPTS_WINDOW_MS = exports.REFRESH_PROMPTS_UNTIL_KEY = exports.PromptEntryEmptyState = exports.PlacementSmoothHeight = exports.PlacementResponseRenderer = exports.PlacementPayloadProvider = exports.PlacementLoader = exports.PRODUCT_BY_HANDLE_QUERY = exports.PRODUCT_BACK_SESSION_KEY = exports.OptimizedImage = exports.NextStepsSectionDefinition = exports.MetricsSectionDefinition = exports.MarkdownText = exports.MATCH_DEBUG_QUERY_PARAM = exports.MATCH_DEBUG_KEY = exports.Loader = exports.ListItemsSectionDefinition = exports.LinkType = exports.LIST_ITEMS_ENDPOINT = exports.KpiSectionDefinition = exports.ImageSearchFilterToken = exports.HtmlCommentSectionDefinition = exports.HeroSectionDefinition = exports.HeroEntitySectionDefinition = exports.HOST_CONSENT_GLOBAL = exports.FeedbackBar = exports.FeatureToggleProvider = exports.FeatureSection9PlusDefinition = exports.FeatureCardsSectionDefinition = exports.FallbackSectionDefinition = exports.ErrorSectionDefinition = exports.EntitySectionDefinition = exports.EntityCollectionSectionDefinition = exports.EXPERIMENT_IDS = exports.ERROR_MARKDOWN = exports.EDITABLE_TOKENS = exports.Disclaimer = exports.DiagnosticsCollector = exports.DROP_SECTION = exports.DIAGNOSTIC_TYPES = exports.DEFAULT_ERROR_TEMPLATES = exports.DEFAULT_BACKEND_ENVIRONMENT = exports.CtaBannerSectionDefinition = exports.ComponentTracking = exports.ComponentRegistry = exports.ComponentDependenciesProvider = exports.ComparisonSectionDefinition = exports.ChipsProvider = exports.CalloutSectionDefinition = exports.CalloutBlock = exports.CONSENT_OVERRIDE_QUERY_PARAM = exports.CONSENT_OVERRIDE_KEY = exports.COLLECTION_BY_HANDLE_QUERY = exports.CLIENT_IDS = exports.CALLOUT_SEMANTICS = exports.CALLOUT_KINDS = exports.BottomContainer = exports.BRAND_TOKENS = exports.BACKEND_ENVIRONMENT_QUERY_PARAM = exports.BACKEND_ENVIRONMENT_KEY = exports.ARTICLE_BY_HANDLE_QUERY = void 0;
5
- exports.isUserEngaged = exports.isTrustedBundleHost = exports.isThemeDebugEnabled = exports.isTemplatePickerRequested = exports.isSimulationTraffic = exports.isShopifyHost = exports.isProductFamilyEntityType = exports.isOneTrustHost = exports.isNavigableUrl = exports.isMatchDebugEnabled = exports.isLegacyUrl = exports.isHtmlComment = exports.isHslTriplet = exports.isEntityLink = exports.installConsentProvider = exports.initConsentGate = exports.hslTripletToHex = exports.hslToRgb = exports.hostAliasFor = exports.hexToHslTriplet = exports.hasImage = exports.hasHostSuppliedConsent = exports.hasAnalyticsConsent = exports.getTemplateOverride = exports.getSessionId = exports.getResizedImageUrl = exports.getRefreshPromptsExpiry = exports.getPartsByType = exports.getPartByRole = exports.getOrCreateSessionId = exports.getLinks = exports.getIntentFromMarkdown = exports.getInstalledProviderName = exports.getImages = exports.getHeading = exports.getGateView = exports.getForwardStack = exports.getErrorTypeFromStatus = exports.getEntityExtractor = exports.getContextualImageFilename = exports.getConsentSnapshot = exports.getConsentOverride = exports.getConsentGateStats = exports.getClientBundleOverride = exports.getChatId = exports.getBackendEnvironment = exports.getAllByRole = exports.generateSectionId = exports.generateId = exports.formatProductPriceLabel = exports.formatPriceField = exports.formatMoney = exports.fixMalformedLinks = exports.findKeywordsInContent = exports.findInvalidWeb5Links = exports.findImageInNode = exports.findImageInChildren = exports.fetchProductsByHandlesMap = exports.fetchProductsByHandles = exports.fetchEntityListData = exports.extractProtocol = exports.extractLinkMetadata = exports.extractIntentFromMarkdown = exports.extractContentMarkdown = exports.extractContent = exports.escapeWeb5Links = exports.entityPayloadFromItems = exports.entityHref = exports.ensureMinLightness = exports.enrichEntitiesFromPayload = exports.enableRefreshPrompts = exports.disableRefreshPrompts = exports.detectLinkType = exports.detectConsentProvider = exports.deriveRole = exports.deriveLightColor = exports.deriveDarkGradient = exports.deriveDarkColor = exports.defaultExtractor = exports.decodeLinkText = exports.createWixAuthFetch = exports.createShopifyConsentProvider = exports.createSdkRegistry = exports.createPageSection = exports.createOneTrustConsentProvider = exports.createHostSuppliedConsentProvider = exports.createFeatureToggleReader = exports.createErrorMarkdown = exports.convertToBlockElementsWithMapping = exports.convertToBlockElements = exports.computeContentBBox = exports.cn = exports.clearForwardStack = exports.buildProbeUrl = exports.buildPlacementDependencies = exports.buildImageSearchFilter = exports.bucketOf = exports.backgroundFilter = exports.applyThemeOverrides = exports.analyzeBackdrop = void 0;
6
- exports.writeProductBackHandoff = exports.validatePatternWithBlocks = exports.validatePatternSyntax = exports.validatePattern = exports.validateLinkUrl = exports.usesStagingBackend = exports.useWeb5Link = exports.useUserQuery = exports.useResolvedImageSources = exports.useResolveShopifyEntityData = exports.useResolveSearchSpringEntityData = exports.useResolveGenericEntityData = exports.usePlacementPayload = exports.useMarkdownUtils = exports.useFeatureToggles = exports.useFeatureToggle = exports.useEntityTransforms = exports.useDebugImageContext = exports.useConversation = exports.useComponentDependencies = exports.useChips = exports.unlockOnUserAction = exports.tryParseComponent = exports.trimTrailingWhitespace = exports.transmit = exports.transformToSolutionEntityData = exports.transformToGenericEntityData = exports.transformToBlogPostEntityData = exports.transformShopifyProduct = exports.transformShopifyEntityToItemData = exports.transformShopifyCollection = exports.transformShopifyArticle = exports.transformSSProductToEntityItemData = exports.toRgb = exports.toMatchedOptions = exports.toCatalogPath = exports.subscribeToConsent = exports.stripMarkdown = exports.startNewChatId = exports.shouldRefreshPrompts = exports.setMatchDebug = exports.setForwardStack = exports.setConsentOverride = exports.setConsentBufferLimit = exports.setChatId = exports.setBackendEnvironment = exports.rgbToHsl = exports.resolveShopifyEntity = exports.resolveShopifyConfig = exports.resolveErrorTemplate = exports.resolveClientBundleUrl = exports.resetMatchDebugCache = exports.resetConsentGateForTests = exports.resetChatIdForTests = exports.registerEntityExtractor = exports.readProductBackHandoff = exports.readCurrencyCode = exports.pushToForwardStack = exports.pushPromptSubmit = exports.pushLinkClick = exports.pushExit = exports.pushEvent = exports.pushError = exports.pushEntityFiltered = exports.publishHostConsent = exports.preprocessMarkdown = exports.popFromForwardStack = exports.parseWeb5Url = exports.parseMarkdownToComponents = exports.parseMarkdownToAst = exports.parseEntityLink = exports.parseAstToMarkdown = exports.normalizeImageUrl = exports.normalizeIconUrls = exports.normalizeEntityItem = exports.nodesToParts = exports.mergeSectionsWithStableReferences = exports.mergeEntityData = exports.mergeClientConfig = exports.mayTransmit = exports.mayPersistIdentity = exports.matchMarkdown = exports.matchAllSections = exports.logMatchDebug = exports.loadImagePixels = exports.loadClientBundle = exports.loadBackdropAnalysis = exports.listEntityItems = exports.isWeb5Url = exports.isWeb5SearchUrl = exports.isWeb5ImageUrl = exports.isWeb5IconUrl = exports.isWeb5EntityUrl = exports.isWeb5AskUrl = exports.isWeb5ActionUrl = exports.isValidWeb5Url = exports.isValidTemplateId = exports.isValidLinkUrl = void 0;
4
+ exports.Web5UrlType = exports.WEB5_USER_QUERY_EVENT = exports.WEB5_SCOPES = exports.WEB5_SCOPE = exports.WEB5_ROOT_ID = exports.WEB5_ROOT_CLASS = exports.WEB5_REDIRECT_EVENT = exports.WEB5_GLOBAL_TOKENS = exports.WEB5_ANSWER_UPDATED_EVENT = exports.WEB5_ANSWER_SETTLED_EVENT = exports.UserQueryProvider = exports.UserQuery = exports.UnifiedMarkdownParser = exports.UnifiedLink = exports.UNKNOWN_CONSENT = exports.TextBlockSectionDefinition = exports.TableRow = exports.TableHeader = exports.TableHead = exports.TableFooter = exports.TableCell = exports.TableCaption = exports.TableBody = exports.Table = exports.TOKEN_NAME_PATTERN = exports.THEME_TOKEN_CONTRACT = exports.THEME_OVERRIDE_TOKENS = exports.THEME_DEBUG_QUERY_PARAM = exports.THEME_DEBUG_KEY = exports.TEMPLATES_MANIFEST_URL = exports.TEMPLATES_CDN_BASE = exports.SmartIcon = exports.SkipNodesSectionDefinition = exports.ShopifyStorefrontClient = exports.SectionSkeleton = exports.SearchSectionDefinition = exports.SearchSection = exports.STREAMING_TIMEOUT_MS = exports.REFRESH_PROMPTS_WINDOW_MS = exports.REFRESH_PROMPTS_UNTIL_KEY = exports.PromptEntryEmptyState = exports.PlacementSmoothHeight = exports.PlacementResponseRenderer = exports.PlacementPayloadProvider = exports.PlacementLoader = exports.PRODUCT_BY_HANDLE_QUERY = exports.PRODUCT_BACK_SESSION_KEY = exports.OptimizedImage = exports.NextStepsSectionDefinition = exports.MetricsSectionDefinition = exports.MarkdownText = exports.MATCH_DEBUG_QUERY_PARAM = exports.MATCH_DEBUG_KEY = exports.Loader = exports.ListItemsSectionDefinition = exports.LinkType = exports.LIST_ITEMS_ENDPOINT = exports.KpiSectionDefinition = exports.ImageSlotProvider = exports.ImageSearchFilterToken = exports.HtmlCommentSectionDefinition = exports.HeroSectionDefinition = exports.HeroEntitySectionDefinition = exports.HOST_CONSENT_GLOBAL = exports.FeedbackBar = exports.FeatureToggleProvider = exports.FeatureSection9PlusDefinition = exports.FeatureCardsSectionDefinition = exports.FallbackSectionDefinition = exports.ErrorSectionDefinition = exports.EntitySectionDefinition = exports.EntityCollectionSectionDefinition = exports.EXPERIMENT_IDS = exports.ERROR_MARKDOWN = exports.EDITABLE_TOKENS = exports.Disclaimer = exports.DiagnosticsCollector = exports.DROP_SECTION = exports.DIAGNOSTIC_TYPES = exports.DEFAULT_ERROR_TEMPLATES = exports.DEFAULT_BACKEND_ENVIRONMENT = exports.CtaBannerSectionDefinition = exports.ComponentTracking = exports.ComponentRegistry = exports.ComponentDependenciesProvider = exports.ComparisonSectionDefinition = exports.ChipsProvider = exports.CalloutSectionDefinition = exports.CalloutBlock = exports.CONSENT_OVERRIDE_QUERY_PARAM = exports.CONSENT_OVERRIDE_KEY = exports.COLLECTION_BY_HANDLE_QUERY = exports.CLIENT_IDS = exports.CALLOUT_SEMANTICS = exports.CALLOUT_KINDS = exports.BottomContainer = exports.BRAND_TOKENS = exports.BACKEND_ENVIRONMENT_QUERY_PARAM = exports.BACKEND_ENVIRONMENT_KEY = exports.ARTICLE_BY_HANDLE_QUERY = void 0;
5
+ exports.isThemeDebugEnabled = exports.isTemplatePickerRequested = exports.isSimulationTraffic = exports.isShopifyHost = exports.isProductFamilyEntityType = exports.isOneTrustHost = exports.isNavigableUrl = exports.isMatchDebugEnabled = exports.isLegacyUrl = exports.isHtmlComment = exports.isHslTriplet = exports.isEntityLink = exports.installConsentProvider = exports.initConsentGate = exports.hslTripletToHex = exports.hslToRgb = exports.hostAliasFor = exports.hexToHslTriplet = exports.hasImage = exports.hasHostSuppliedConsent = exports.hasAnalyticsConsent = exports.getTemplateOverride = exports.getSessionId = exports.getResizedImageUrl = exports.getRefreshPromptsExpiry = exports.getPartsByType = exports.getPartByRole = exports.getOrCreateSessionId = exports.getLinks = exports.getIntentFromMarkdown = exports.getInstalledProviderName = exports.getImages = exports.getHeading = exports.getGateView = exports.getForwardStack = exports.getErrorTypeFromStatus = exports.getEntityExtractor = exports.getContextualImageFilename = exports.getConsentSnapshot = exports.getConsentOverride = exports.getConsentGateStats = exports.getClientBundleOverride = exports.getChatId = exports.getBackendEnvironment = exports.getAllByRole = exports.generateSectionId = exports.generateId = exports.formatProductPriceLabel = exports.formatPriceField = exports.formatMoney = exports.fixMalformedLinks = exports.findKeywordsInContent = exports.findInvalidWeb5Links = exports.findImageInNode = exports.findImageInChildren = exports.fetchProductsByHandlesMap = exports.fetchProductsByHandles = exports.fetchEntityListData = exports.extractProtocol = exports.extractLinkMetadata = exports.extractIntentFromMarkdown = exports.extractContentMarkdown = exports.extractContent = exports.escapeWeb5Links = exports.entityPayloadFromItems = exports.entityHref = exports.ensureMinLightness = exports.enrichEntitiesFromPayload = exports.enableRefreshPrompts = exports.disableRefreshPrompts = exports.detectLinkType = exports.detectConsentProvider = exports.deriveRole = exports.deriveLightColor = exports.deriveDarkGradient = exports.deriveDarkColor = exports.defaultExtractor = exports.decodeLinkText = exports.createWixAuthFetch = exports.createShopifyConsentProvider = exports.createSdkRegistry = exports.createPageSection = exports.createOneTrustConsentProvider = exports.createHostSuppliedConsentProvider = exports.createFeatureToggleReader = exports.createErrorMarkdown = exports.convertToBlockElementsWithMapping = exports.convertToBlockElements = exports.computeContentBBox = exports.composeSemantic = exports.cn = exports.clearForwardStack = exports.buildProbeUrl = exports.buildPlacementDependencies = exports.buildImageSearchFilter = exports.bucketOf = exports.backgroundFilter = exports.applyThemeOverrides = exports.analyzeBackdrop = exports.addToCart = void 0;
6
+ exports.validatePatternSyntax = exports.validatePattern = exports.validateLinkUrl = exports.usesStagingBackend = exports.useWeb5Link = exports.useUserQuery = exports.useResolvedImageSources = exports.useResolveShopifyEntityData = exports.useResolveSearchSpringEntityData = exports.useResolveGenericEntityData = exports.usePlacementPayload = exports.useMarkdownUtils = exports.useImageSlotCollector = exports.useImageSlot = exports.useFeatureToggles = exports.useFeatureToggle = exports.useEntityTransforms = exports.useDebugImageContext = exports.useConversation = exports.useComponentDependencies = exports.useChips = exports.unlockOnUserAction = exports.tryParseComponent = exports.trimTrailingWhitespace = exports.transmit = exports.transformToSolutionEntityData = exports.transformToGenericEntityData = exports.transformToBlogPostEntityData = exports.transformShopifyProduct = exports.transformShopifyEntityToItemData = exports.transformShopifyCollection = exports.transformShopifyArticle = exports.transformSSProductToEntityItemData = exports.toRgb = exports.toMatchedOptions = exports.toCatalogPath = exports.subscribeToConsent = exports.stripMarkdown = exports.startNewChatId = exports.shouldRefreshPrompts = exports.setMatchDebug = exports.setForwardStack = exports.setConsentOverride = exports.setConsentBufferLimit = exports.setChatId = exports.setBackendEnvironment = exports.rgbToHsl = exports.resolveShopifyEntity = exports.resolveShopifyConfig = exports.resolveErrorTemplate = exports.resolveClientBundleUrl = exports.resetMatchDebugCache = exports.resetConsentGateForTests = exports.resetChatIdForTests = exports.registerEntityExtractor = exports.readProductBackHandoff = exports.readCurrencyCode = exports.pushToForwardStack = exports.pushPromptSubmit = exports.pushLinkClick = exports.pushExit = exports.pushEvent = exports.pushError = exports.pushEntityFiltered = exports.publishHostConsent = exports.preprocessMarkdown = exports.popFromForwardStack = exports.parseWeb5Url = exports.parseMarkdownToComponents = exports.parseMarkdownToAst = exports.parseEntityLink = exports.parseAstToMarkdown = exports.normalizeImageUrl = exports.normalizeIconUrls = exports.normalizeEntityItem = exports.nodesToParts = exports.mergeSectionsWithStableReferences = exports.mergeEntityData = exports.mergeClientConfig = exports.mayTransmit = exports.mayPersistIdentity = exports.matchMarkdown = exports.matchAllSections = exports.logMatchDebug = exports.loadImagePixels = exports.loadClientBundle = exports.loadBackdropAnalysis = exports.listEntityItems = exports.isWeb5Url = exports.isWeb5SearchUrl = exports.isWeb5ImageUrl = exports.isWeb5IconUrl = exports.isWeb5EntityUrl = exports.isWeb5AskUrl = exports.isWeb5ActionUrl = exports.isValidWeb5Url = exports.isValidTemplateId = exports.isValidLinkUrl = exports.isUserEngaged = exports.isTrustedBundleHost = void 0;
7
+ exports.writeProductBackHandoff = exports.validatePatternWithBlocks = void 0;
7
8
  var _clients = require("./clients");
8
9
  exports.CLIENT_IDS = _clients.CLIENT_IDS;
9
10
  exports.EXPERIMENT_IDS = _clients.EXPERIMENT_IDS;
@@ -132,6 +133,13 @@ var _useDebugImageContext = require("./hooks/useDebugImageContext");
132
133
  exports.useDebugImageContext = _useDebugImageContext.useDebugImageContext;
133
134
  var _useResolvedImageSources = require("./hooks/useResolvedImageSources");
134
135
  exports.useResolvedImageSources = _useResolvedImageSources.useResolvedImageSources;
136
+ var _useImageSlot = require("./hooks/useImageSlot");
137
+ exports.useImageSlot = _useImageSlot.useImageSlot;
138
+ var _ImageSlotContext = require("./context/ImageSlotContext");
139
+ exports.ImageSlotProvider = _ImageSlotContext.ImageSlotProvider;
140
+ exports.useImageSlotCollector = _ImageSlotContext.useImageSlotCollector;
141
+ var _composeSemantic = require("./image/composeSemantic");
142
+ exports.composeSemantic = _composeSemantic.composeSemantic;
135
143
  var _useResolveGenericEntityData = require("./hooks/useResolveGenericEntityData");
136
144
  exports.useResolveGenericEntityData = _useResolveGenericEntityData.useResolveGenericEntityData;
137
145
  var _useEntityTransforms = require("./hooks/useEntityTransforms");
@@ -1 +1 @@
1
- {"version":3,"names":["_clients","require","exports","CLIENT_IDS","EXPERIMENT_IDS","_FeatureToggleContext","createFeatureToggleReader","FeatureToggleProvider","useFeatureToggles","useFeatureToggle","_parts","getPartsByType","getPartByRole","getAllByRole","getHeading","getImages","getLinks","extractContent","extractContentMarkdown","deriveRole","_sectionDefinition","DROP_SECTION","_diagnosticTypes","DIAGNOSTIC_TYPES","_imageSearchFilterTypes","buildImageSearchFilter","_imageSearchFilters","ImageSearchFilterToken","backgroundFilter","_componentDefinitions","HeroSectionDefinition","HeroEntitySectionDefinition","KpiSectionDefinition","MetricsSectionDefinition","FeatureCardsSectionDefinition","EntitySectionDefinition","EntityCollectionSectionDefinition","ComparisonSectionDefinition","TextBlockSectionDefinition","CtaBannerSectionDefinition","CalloutSectionDefinition","NextStepsSectionDefinition","FeatureSection9PlusDefinition","ListItemsSectionDefinition","SkipNodesSectionDefinition","HtmlCommentSectionDefinition","SearchSectionDefinition","ErrorSectionDefinition","FallbackSectionDefinition","createSdkRegistry","_registry","ComponentRegistry","_patternValidator","validatePattern","validatePatternSyntax","validatePatternWithBlocks","_markdownBlocks","convertToBlockElements","convertToBlockElementsWithMapping","_linkTypes","Web5UrlType","isWeb5AskUrl","isWeb5EntityUrl","isWeb5ImageUrl","isWeb5IconUrl","isWeb5ActionUrl","isWeb5SearchUrl","isWeb5Url","isNavigableUrl","isValidLinkUrl","isLegacyUrl","_entityLinkParser","parseWeb5Url","isValidWeb5Url","validateLinkUrl","isEntityLink","parseEntityLink","extractProtocol","extractLinkMetadata","_web5LinkValidator","findInvalidWeb5Links","_nodeMatchers","hasImage","isHtmlComment","_match","matchMarkdown","matchAllSections","nodesToParts","_ComponentDependenciesContext","ComponentDependenciesProvider","useComponentDependencies","_UserQueryContext","UserQueryProvider","useUserQuery","_ChipsContext","ChipsProvider","useChips","_entity","defaultExtractor","enrichEntitiesFromPayload","entityHref","normalizeEntityItem","toCatalogPath","entityPayloadFromItems","mergeEntityData","fetchEntityListData","listEntityItems","LIST_ITEMS_ENDPOINT","getEntityExtractor","registerEntityExtractor","transformToSolutionEntityData","transformToBlogPostEntityData","transformToGenericEntityData","toMatchedOptions","formatMoney","readCurrencyCode","formatPriceField","formatProductPriceLabel","isProductFamilyEntityType","_callout","CALLOUT_KINDS","CALLOUT_SEMANTICS","_useWeb5Link","useWeb5Link","_useConversation","useConversation","_useDebugImageContext","useDebugImageContext","_useResolvedImageSources","useResolvedImageSources","_useResolveGenericEntityData","useResolveGenericEntityData","_useEntityTransforms","useEntityTransforms","_useMarkdownUtils","useMarkdownUtils","_useResolveShopifyEntityData","useResolveShopifyEntityData","_useResolveSearchSpringEntityData","useResolveSearchSpringEntityData","_searchspring","fetchProductsByHandles","fetchProductsByHandlesMap","transformSSProductToEntityItemData","_cart","addToCart","_shopify","ShopifyStorefrontClient","resolveShopifyConfig","resolveShopifyEntity","transformShopifyProduct","transformShopifyCollection","transformShopifyArticle","transformShopifyEntityToItemData","PRODUCT_BY_HANDLE_QUERY","COLLECTION_BY_HANDLE_QUERY","ARTICLE_BY_HANDLE_QUERY","_utils","cn","_imageUtils","normalizeImageUrl","getResizedImageUrl","_imageBackdrop","analyzeBackdrop","computeContentBBox","buildProbeUrl","loadImagePixels","loadBackdropAnalysis","_parseUtils","stripMarkdown","_colorUtils","rgbToHsl","hslToRgb","ensureMinLightness","toRgb","deriveDarkColor","deriveDarkGradient","deriveLightColor","_analyticsEvents","pushEvent","pushPromptSubmit","pushLinkClick","pushError","pushExit","pushEntityFiltered","hasAnalyticsConsent","_privacy","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","_errors","ERROR_MARKDOWN","getErrorTypeFromStatus","createErrorMarkdown","STREAMING_TIMEOUT_MS","DEFAULT_ERROR_TEMPLATES","resolveErrorTemplate","_navigationStack","getForwardStack","setForwardStack","clearForwardStack","pushToForwardStack","popFromForwardStack","_UserQuery","UserQuery","_productBackHandoff","PRODUCT_BACK_SESSION_KEY","writeProductBackHandoff","readProductBackHandoff","_PromptEntryEmptyState","PromptEntryEmptyState","_SearchSection","SearchSection","_FeedbackBar","FeedbackBar","_Disclaimer","Disclaimer","_BottomContainer","BottomContainer","_MarkdownText","MarkdownText","_CalloutBlock","CalloutBlock","_OptimizedImage","OptimizedImage","_SectionSkeleton","SectionSkeleton","_SmartIcon","SmartIcon","_Loader","Loader","_PlacementLoader","PlacementLoader","_UnifiedLink","UnifiedLink","detectLinkType","LinkType","_table","Table","TableHeader","TableBody","TableFooter","TableHead","TableRow","TableCell","TableCaption","_userQueryEvent","WEB5_USER_QUERY_EVENT","_answerUpdatedEvent","WEB5_ANSWER_UPDATED_EVENT","_answerSettledEvent","WEB5_ANSWER_SETTLED_EVENT","_redirectEvent","WEB5_REDIRECT_EVENT","_loadClientBundle","loadClientBundle","_clientBundleOverride","getClientBundleOverride","isTrustedBundleHost","_clientBundleUrl","TEMPLATES_CDN_BASE","TEMPLATES_MANIFEST_URL","getTemplateOverride","isTemplatePickerRequested","isValidTemplateId","resolveClientBundleUrl","_mergeClientConfig","mergeClientConfig","_applyThemeOverrides","applyThemeOverrides","THEME_OVERRIDE_TOKENS","_tokenContract","THEME_TOKEN_CONTRACT","BRAND_TOKENS","EDITABLE_TOKENS","TOKEN_NAME_PATTERN","bucketOf","hostAliasFor","_themeDebug","isThemeDebugEnabled","THEME_DEBUG_KEY","THEME_DEBUG_QUERY_PARAM","_colorFormat","hexToHslTriplet","hslTripletToHex","isHslTriplet","_PlacementResponseRenderer","PlacementResponseRenderer","PlacementSmoothHeight","_buildPlacementDependencies","buildPlacementDependencies","_PlacementPayloadContext","PlacementPayloadProvider","usePlacementPayload","_unifiedMarkdownParser","UnifiedMarkdownParser","parseMarkdownToAst","parseAstToMarkdown","_markdownPreprocessor","escapeWeb5Links","fixMalformedLinks","trimTrailingWhitespace","normalizeIconUrls","decodeLinkText","preprocessMarkdown","_componentTracking","ComponentTracking","_contentKeywordMatcher","findKeywordsInContent","getContextualImageFilename","_intentExtractor","extractIntentFromMarkdown","getIntentFromMarkdown","_propsExtractor","createPageSection","generateSectionId","generateId","findImageInNode","findImageInChildren","_diagnosticsCollector","DiagnosticsCollector","_refreshPrompts","REFRESH_PROMPTS_UNTIL_KEY","REFRESH_PROMPTS_WINDOW_MS","getRefreshPromptsExpiry","shouldRefreshPrompts","enableRefreshPrompts","disableRefreshPrompts","_backendEnvironment","BACKEND_ENVIRONMENT_KEY","BACKEND_ENVIRONMENT_QUERY_PARAM","DEFAULT_BACKEND_ENVIRONMENT","getBackendEnvironment","setBackendEnvironment","usesStagingBackend","_simulation","isSimulationTraffic","_matchDebug","MATCH_DEBUG_KEY","MATCH_DEBUG_QUERY_PARAM","isMatchDebugEnabled","setMatchDebug","resetMatchDebugCache","logMatchDebug","_wixAuthFetch","createWixAuthFetch","_sessionManager","getOrCreateSessionId","getSessionId","getChatId","startNewChatId","setChatId","resetChatIdForTests","_componentParser","parseMarkdownToComponents","tryParseComponent","mergeSectionsWithStableReferences","_hostScope","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 MetricsCompProps,\n MetricsItemCompProps,\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 MetricsItemComponent,\n FeatureItemComponent,\n FeatureCardComponent,\n GenericEntityComponent,\n AiNarrativeComponent,\n ComparisonSectionComponent,\n TextBlockSectionComponent,\n HeroSectionComponent,\n HeroEntitySectionComponent,\n KpiSectionComponent,\n MetricsSectionComponent,\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 MetricsSectionDefinition,\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 entityHref,\n normalizeEntityItem,\n toCatalogPath,\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":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAAuDC,OAAA,CAAAC,UAAA,GAAAH,QAAA,CAAAG,UAAA;AAAAD,OAAA,CAAAE,cAAA,GAAAJ,QAAA,CAAAI,cAAA;AAEvD,IAAAC,qBAAA,GAAAJ,OAAA;AAO+CC,OAAA,CAAAI,yBAAA,GAAAD,qBAAA,CAAAC,yBAAA;AAAAJ,OAAA,CAAAK,qBAAA,GAAAF,qBAAA,CAAAE,qBAAA;AAAAL,OAAA,CAAAM,iBAAA,GAAAH,qBAAA,CAAAG,iBAAA;AAAAN,OAAA,CAAAO,gBAAA,GAAAJ,qBAAA,CAAAI,gBAAA;AAM/C,IAAAC,MAAA,GAAAT,OAAA;AAsBuBC,OAAA,CAAAS,cAAA,GAAAD,MAAA,CAAAC,cAAA;AAAAT,OAAA,CAAAU,aAAA,GAAAF,MAAA,CAAAE,aAAA;AAAAV,OAAA,CAAAW,YAAA,GAAAH,MAAA,CAAAG,YAAA;AAAAX,OAAA,CAAAY,UAAA,GAAAJ,MAAA,CAAAI,UAAA;AAAAZ,OAAA,CAAAa,SAAA,GAAAL,MAAA,CAAAK,SAAA;AAAAb,OAAA,CAAAc,QAAA,GAAAN,MAAA,CAAAM,QAAA;AAAAd,OAAA,CAAAe,cAAA,GAAAP,MAAA,CAAAO,cAAA;AAAAf,OAAA,CAAAgB,sBAAA,GAAAR,MAAA,CAAAQ,sBAAA;AAAAhB,OAAA,CAAAiB,UAAA,GAAAT,MAAA,CAAAS,UAAA;AAyFvB,IAAAC,kBAAA,GAAAnB,OAAA;AAA8DC,OAAA,CAAAmB,YAAA,GAAAD,kBAAA,CAAAC,YAAA;AAG9D,IAAAC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AAAH,eAAA,CAAAG,SAAA;AAAApX,OAAA,CAAAqX,cAAA,GAAAJ,eAAA,CAAAI,cAAA;AAAArX,OAAA,CAAAsX,SAAA,GAAAL,eAAA,CAAAK,SAAA;AAAAtX,OAAA,CAAAuX,mBAAA,GAAAN,eAAA,CAAAM,mBAAA;AAGhC,IAAAC,gBAAA,GAAAzX,OAAA;AAQqCC,OAAA,CAAAyX,yBAAA,GAAAD,gBAAA,CAAAC,yBAAA;AAAAzX,OAAA,CAAA0X,iBAAA,GAAAF,gBAAA,CAAAE,iBAAA;AAAA1X,OAAA,CAAA2X,iCAAA,GAAAH,gBAAA,CAAAG,iCAAA;AASrC,IAAAC,UAAA,GAAA7X,OAAA;AAOqBC,OAAA,CAAA6X,YAAA,GAAAD,UAAA,CAAAC,YAAA;AAAA7X,OAAA,CAAA8X,eAAA,GAAAF,UAAA,CAAAE,eAAA;AAAA9X,OAAA,CAAA+X,WAAA,GAAAH,UAAA,CAAAG,WAAA;AAAA/X,OAAA,CAAAgY,UAAA,GAAAJ,UAAA,CAAAI,UAAA;AAAAhY,OAAA,CAAAiY,kBAAA,GAAAL,UAAA,CAAAK,kBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_clients","require","exports","CLIENT_IDS","EXPERIMENT_IDS","_FeatureToggleContext","createFeatureToggleReader","FeatureToggleProvider","useFeatureToggles","useFeatureToggle","_parts","getPartsByType","getPartByRole","getAllByRole","getHeading","getImages","getLinks","extractContent","extractContentMarkdown","deriveRole","_sectionDefinition","DROP_SECTION","_diagnosticTypes","DIAGNOSTIC_TYPES","_imageSearchFilterTypes","buildImageSearchFilter","_imageSearchFilters","ImageSearchFilterToken","backgroundFilter","_componentDefinitions","HeroSectionDefinition","HeroEntitySectionDefinition","KpiSectionDefinition","MetricsSectionDefinition","FeatureCardsSectionDefinition","EntitySectionDefinition","EntityCollectionSectionDefinition","ComparisonSectionDefinition","TextBlockSectionDefinition","CtaBannerSectionDefinition","CalloutSectionDefinition","NextStepsSectionDefinition","FeatureSection9PlusDefinition","ListItemsSectionDefinition","SkipNodesSectionDefinition","HtmlCommentSectionDefinition","SearchSectionDefinition","ErrorSectionDefinition","FallbackSectionDefinition","createSdkRegistry","_registry","ComponentRegistry","_patternValidator","validatePattern","validatePatternSyntax","validatePatternWithBlocks","_markdownBlocks","convertToBlockElements","convertToBlockElementsWithMapping","_linkTypes","Web5UrlType","isWeb5AskUrl","isWeb5EntityUrl","isWeb5ImageUrl","isWeb5IconUrl","isWeb5ActionUrl","isWeb5SearchUrl","isWeb5Url","isNavigableUrl","isValidLinkUrl","isLegacyUrl","_entityLinkParser","parseWeb5Url","isValidWeb5Url","validateLinkUrl","isEntityLink","parseEntityLink","extractProtocol","extractLinkMetadata","_web5LinkValidator","findInvalidWeb5Links","_nodeMatchers","hasImage","isHtmlComment","_match","matchMarkdown","matchAllSections","nodesToParts","_ComponentDependenciesContext","ComponentDependenciesProvider","useComponentDependencies","_UserQueryContext","UserQueryProvider","useUserQuery","_ChipsContext","ChipsProvider","useChips","_entity","defaultExtractor","enrichEntitiesFromPayload","entityHref","normalizeEntityItem","toCatalogPath","entityPayloadFromItems","mergeEntityData","fetchEntityListData","listEntityItems","LIST_ITEMS_ENDPOINT","getEntityExtractor","registerEntityExtractor","transformToSolutionEntityData","transformToBlogPostEntityData","transformToGenericEntityData","toMatchedOptions","formatMoney","readCurrencyCode","formatPriceField","formatProductPriceLabel","isProductFamilyEntityType","_callout","CALLOUT_KINDS","CALLOUT_SEMANTICS","_useWeb5Link","useWeb5Link","_useConversation","useConversation","_useDebugImageContext","useDebugImageContext","_useResolvedImageSources","useResolvedImageSources","_useImageSlot","useImageSlot","_ImageSlotContext","ImageSlotProvider","useImageSlotCollector","_composeSemantic","composeSemantic","_useResolveGenericEntityData","useResolveGenericEntityData","_useEntityTransforms","useEntityTransforms","_useMarkdownUtils","useMarkdownUtils","_useResolveShopifyEntityData","useResolveShopifyEntityData","_useResolveSearchSpringEntityData","useResolveSearchSpringEntityData","_searchspring","fetchProductsByHandles","fetchProductsByHandlesMap","transformSSProductToEntityItemData","_cart","addToCart","_shopify","ShopifyStorefrontClient","resolveShopifyConfig","resolveShopifyEntity","transformShopifyProduct","transformShopifyCollection","transformShopifyArticle","transformShopifyEntityToItemData","PRODUCT_BY_HANDLE_QUERY","COLLECTION_BY_HANDLE_QUERY","ARTICLE_BY_HANDLE_QUERY","_utils","cn","_imageUtils","normalizeImageUrl","getResizedImageUrl","_imageBackdrop","analyzeBackdrop","computeContentBBox","buildProbeUrl","loadImagePixels","loadBackdropAnalysis","_parseUtils","stripMarkdown","_colorUtils","rgbToHsl","hslToRgb","ensureMinLightness","toRgb","deriveDarkColor","deriveDarkGradient","deriveLightColor","_analyticsEvents","pushEvent","pushPromptSubmit","pushLinkClick","pushError","pushExit","pushEntityFiltered","hasAnalyticsConsent","_privacy","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","_errors","ERROR_MARKDOWN","getErrorTypeFromStatus","createErrorMarkdown","STREAMING_TIMEOUT_MS","DEFAULT_ERROR_TEMPLATES","resolveErrorTemplate","_navigationStack","getForwardStack","setForwardStack","clearForwardStack","pushToForwardStack","popFromForwardStack","_UserQuery","UserQuery","_productBackHandoff","PRODUCT_BACK_SESSION_KEY","writeProductBackHandoff","readProductBackHandoff","_PromptEntryEmptyState","PromptEntryEmptyState","_SearchSection","SearchSection","_FeedbackBar","FeedbackBar","_Disclaimer","Disclaimer","_BottomContainer","BottomContainer","_MarkdownText","MarkdownText","_CalloutBlock","CalloutBlock","_OptimizedImage","OptimizedImage","_SectionSkeleton","SectionSkeleton","_SmartIcon","SmartIcon","_Loader","Loader","_PlacementLoader","PlacementLoader","_UnifiedLink","UnifiedLink","detectLinkType","LinkType","_table","Table","TableHeader","TableBody","TableFooter","TableHead","TableRow","TableCell","TableCaption","_userQueryEvent","WEB5_USER_QUERY_EVENT","_answerUpdatedEvent","WEB5_ANSWER_UPDATED_EVENT","_answerSettledEvent","WEB5_ANSWER_SETTLED_EVENT","_redirectEvent","WEB5_REDIRECT_EVENT","_loadClientBundle","loadClientBundle","_clientBundleOverride","getClientBundleOverride","isTrustedBundleHost","_clientBundleUrl","TEMPLATES_CDN_BASE","TEMPLATES_MANIFEST_URL","getTemplateOverride","isTemplatePickerRequested","isValidTemplateId","resolveClientBundleUrl","_mergeClientConfig","mergeClientConfig","_applyThemeOverrides","applyThemeOverrides","THEME_OVERRIDE_TOKENS","_tokenContract","THEME_TOKEN_CONTRACT","BRAND_TOKENS","EDITABLE_TOKENS","TOKEN_NAME_PATTERN","bucketOf","hostAliasFor","_themeDebug","isThemeDebugEnabled","THEME_DEBUG_KEY","THEME_DEBUG_QUERY_PARAM","_colorFormat","hexToHslTriplet","hslTripletToHex","isHslTriplet","_PlacementResponseRenderer","PlacementResponseRenderer","PlacementSmoothHeight","_buildPlacementDependencies","buildPlacementDependencies","_PlacementPayloadContext","PlacementPayloadProvider","usePlacementPayload","_unifiedMarkdownParser","UnifiedMarkdownParser","parseMarkdownToAst","parseAstToMarkdown","_markdownPreprocessor","escapeWeb5Links","fixMalformedLinks","trimTrailingWhitespace","normalizeIconUrls","decodeLinkText","preprocessMarkdown","_componentTracking","ComponentTracking","_contentKeywordMatcher","findKeywordsInContent","getContextualImageFilename","_intentExtractor","extractIntentFromMarkdown","getIntentFromMarkdown","_propsExtractor","createPageSection","generateSectionId","generateId","findImageInNode","findImageInChildren","_diagnosticsCollector","DiagnosticsCollector","_refreshPrompts","REFRESH_PROMPTS_UNTIL_KEY","REFRESH_PROMPTS_WINDOW_MS","getRefreshPromptsExpiry","shouldRefreshPrompts","enableRefreshPrompts","disableRefreshPrompts","_backendEnvironment","BACKEND_ENVIRONMENT_KEY","BACKEND_ENVIRONMENT_QUERY_PARAM","DEFAULT_BACKEND_ENVIRONMENT","getBackendEnvironment","setBackendEnvironment","usesStagingBackend","_simulation","isSimulationTraffic","_matchDebug","MATCH_DEBUG_KEY","MATCH_DEBUG_QUERY_PARAM","isMatchDebugEnabled","setMatchDebug","resetMatchDebugCache","logMatchDebug","_wixAuthFetch","createWixAuthFetch","_sessionManager","getOrCreateSessionId","getSessionId","getChatId","startNewChatId","setChatId","resetChatIdForTests","_componentParser","parseMarkdownToComponents","tryParseComponent","mergeSectionsWithStableReferences","_hostScope","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 MetricsCompProps,\n MetricsItemCompProps,\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 MetricsItemComponent,\n FeatureItemComponent,\n FeatureCardComponent,\n GenericEntityComponent,\n AiNarrativeComponent,\n ComparisonSectionComponent,\n TextBlockSectionComponent,\n HeroSectionComponent,\n HeroEntitySectionComponent,\n KpiSectionComponent,\n MetricsSectionComponent,\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 MetricsSectionDefinition,\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 entityHref,\n normalizeEntityItem,\n toCatalogPath,\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';\n\n// Image slots (ADR 0222/0223/0225): a section declares the holes in its layout\n// and a per-section collector resolves them as one set. Replaces the per-image\n// `useResolvedImageSources` path above, which is kept until its callers move.\nexport { useImageSlot } from './hooks/useImageSlot';\nexport type {\n UseImageSlotOptions,\n ResolvedImage,\n} from './hooks/useImageSlot';\nexport {\n ImageSlotProvider,\n useImageSlotCollector,\n} from './context/ImageSlotContext';\nexport type {\n ImageSlotCollector,\n ImageSlotProviderProps,\n} from './context/ImageSlotContext';\nexport { composeSemantic } from './image/composeSemantic';\nexport type { ComposeSemanticInput } from './image/composeSemantic';\nexport type {\n ImageSlotKind,\n ImageMatchQuality,\n ImageBackground,\n ImageSlotRequest,\n ImagePalette,\n ImageStatGrid,\n ImageVisualMetadata,\n ResolvedImageSlot,\n ResolveImageSetResponse,\n ResolveImageSetPort,\n SlotState,\n ImageSubject,\n} from './image/imageSlotTypes';\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":";;;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAAuDC,OAAA,CAAAC,UAAA,GAAAH,QAAA,CAAAG,UAAA;AAAAD,OAAA,CAAAE,cAAA,GAAAJ,QAAA,CAAAI,cAAA;AAEvD,IAAAC,qBAAA,GAAAJ,OAAA;AAO+CC,OAAA,CAAAI,yBAAA,GAAAD,qBAAA,CAAAC,yBAAA;AAAAJ,OAAA,CAAAK,qBAAA,GAAAF,qBAAA,CAAAE,qBAAA;AAAAL,OAAA,CAAAM,iBAAA,GAAAH,qBAAA,CAAAG,iBAAA;AAAAN,OAAA,CAAAO,gBAAA,GAAAJ,qBAAA,CAAAI,gBAAA;AAM/C,IAAAC,MAAA,GAAAT,OAAA;AAsBuBC,OAAA,CAAAS,cAAA,GAAAD,MAAA,CAAAC,cAAA;AAAAT,OAAA,CAAAU,aAAA,GAAAF,MAAA,CAAAE,aAAA;AAAAV,OAAA,CAAAW,YAAA,GAAAH,MAAA,CAAAG,YAAA;AAAAX,OAAA,C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AAC,YAAA;AAAApY,OAAA,CAAAqY,eAAA,GAAAF,UAAA,CAAAE,eAAA;AAAArY,OAAA,CAAAsY,WAAA,GAAAH,UAAA,CAAAG,WAAA;AAAAtY,OAAA,CAAAuY,UAAA,GAAAJ,UAAA,CAAAI,UAAA;AAAAvY,OAAA,CAAAwY,kBAAA,GAAAL,UAAA,CAAAK,kBAAA","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 { ResolveImageSetPort } from '../image/imageSlotTypes';\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 /**\n * Resolve a whole SET of image slots in one call — the replacement for the\n * three `resolveContextualImage*` ports below, which target an endpoint that\n * now answers with an empty list.\n *\n * Declared here and provided by the host (`web50-server-ui`'s\n * `AppDependenciesProvider`), so core owns the hook and the host owns the\n * transport — the same split the contextual-image path already uses.\n */\n resolveImageSet?: ResolveImageSetPort;\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":[]}
@@ -7,6 +7,19 @@ export function useComponentDependencies() {
7
7
  }
8
8
  return ctx;
9
9
  }
10
+
11
+ /**
12
+ * The same context, without the throw.
13
+ *
14
+ * For providers the HOST mounts around every section rather than a component
15
+ * opting in: those sit above trees that may legitimately have no dependencies
16
+ * configured — a layout test, a storybook story — and hard-crashing them would
17
+ * make an unrelated feature's provider a global requirement. A consumer that
18
+ * genuinely needs deps should still use `useComponentDependencies`.
19
+ */
20
+ export function useOptionalComponentDependencies() {
21
+ return useContext(ComponentDependenciesContext);
22
+ }
10
23
  export const ComponentDependenciesProvider = _ref => {
11
24
  let {
12
25
  deps,
@@ -1 +1 @@
1
- {"version":3,"names":["React","createContext","useContext","ComponentDependenciesContext","useComponentDependencies","ctx","Error","ComponentDependenciesProvider","_ref","deps","children","createElement","Provider","value"],"sources":["../../../src/context/ComponentDependenciesContext.tsx"],"sourcesContent":["import React, {\n createContext,\n useContext,\n type FC,\n type PropsWithChildren,\n} from 'react';\nimport type { ComponentDependencies } from '../types/dependencies';\n\nconst ComponentDependenciesContext =\n createContext<ComponentDependencies | null>(null);\n\nexport function useComponentDependencies(): ComponentDependencies {\n const ctx = useContext(ComponentDependenciesContext);\n if (!ctx) {\n throw new Error(\n 'useComponentDependencies must be used within a ComponentDependenciesProvider. ' +\n 'Wrap your app with <ComponentDependenciesProvider deps={...}>.',\n );\n }\n return ctx;\n}\n\nexport interface ComponentDependenciesProviderProps extends PropsWithChildren {\n deps: ComponentDependencies;\n}\n\nexport const ComponentDependenciesProvider: FC<\n ComponentDependenciesProviderProps\n> = ({ deps, children }) => {\n return (\n <ComponentDependenciesContext.Provider value={deps}>\n {children}\n </ComponentDependenciesContext.Provider>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IACVC,aAAa,EACbC,UAAU,QAGL,OAAO;AAGd,MAAMC,4BAA4B,gBAChCF,aAAa,CAA+B,IAAI,CAAC;AAEnD,OAAO,SAASG,wBAAwBA,CAAA,EAA0B;EAChE,MAAMC,GAAG,GAAGH,UAAU,CAACC,4BAA4B,CAAC;EACpD,IAAI,CAACE,GAAG,EAAE;IACR,MAAM,IAAIC,KAAK,CACb,gFAAgF,GAC9E,gEACJ,CAAC;EACH;EACA,OAAOD,GAAG;AACZ;AAMA,OAAO,MAAME,6BAEZ,GAAGC,IAAA,IAAwB;EAAA,IAAvB;IAAEC,IAAI;IAAEC;EAAS,CAAC,GAAAF,IAAA;EACrB,oBACER,KAAA,CAAAW,aAAA,CAACR,4BAA4B,CAACS,QAAQ;IAACC,KAAK,EAAEJ;EAAK,GAChDC,QACoC,CAAC;AAE5C,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","createContext","useContext","ComponentDependenciesContext","useComponentDependencies","ctx","Error","useOptionalComponentDependencies","ComponentDependenciesProvider","_ref","deps","children","createElement","Provider","value"],"sources":["../../../src/context/ComponentDependenciesContext.tsx"],"sourcesContent":["import React, {\n createContext,\n useContext,\n type FC,\n type PropsWithChildren,\n} from 'react';\nimport type { ComponentDependencies } from '../types/dependencies';\n\nconst ComponentDependenciesContext =\n createContext<ComponentDependencies | null>(null);\n\nexport function useComponentDependencies(): ComponentDependencies {\n const ctx = useContext(ComponentDependenciesContext);\n if (!ctx) {\n throw new Error(\n 'useComponentDependencies must be used within a ComponentDependenciesProvider. ' +\n 'Wrap your app with <ComponentDependenciesProvider deps={...}>.',\n );\n }\n return ctx;\n}\n\n/**\n * The same context, without the throw.\n *\n * For providers the HOST mounts around every section rather than a component\n * opting in: those sit above trees that may legitimately have no dependencies\n * configured — a layout test, a storybook story — and hard-crashing them would\n * make an unrelated feature's provider a global requirement. A consumer that\n * genuinely needs deps should still use `useComponentDependencies`.\n */\nexport function useOptionalComponentDependencies(): ComponentDependencies | null {\n return useContext(ComponentDependenciesContext);\n}\n\nexport interface ComponentDependenciesProviderProps extends PropsWithChildren {\n deps: ComponentDependencies;\n}\n\nexport const ComponentDependenciesProvider: FC<\n ComponentDependenciesProviderProps\n> = ({ deps, children }) => {\n return (\n <ComponentDependenciesContext.Provider value={deps}>\n {children}\n </ComponentDependenciesContext.Provider>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IACVC,aAAa,EACbC,UAAU,QAGL,OAAO;AAGd,MAAMC,4BAA4B,gBAChCF,aAAa,CAA+B,IAAI,CAAC;AAEnD,OAAO,SAASG,wBAAwBA,CAAA,EAA0B;EAChE,MAAMC,GAAG,GAAGH,UAAU,CAACC,4BAA4B,CAAC;EACpD,IAAI,CAACE,GAAG,EAAE;IACR,MAAM,IAAIC,KAAK,CACb,gFAAgF,GAC9E,gEACJ,CAAC;EACH;EACA,OAAOD,GAAG;AACZ;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,gCAAgCA,CAAA,EAAiC;EAC/E,OAAOL,UAAU,CAACC,4BAA4B,CAAC;AACjD;AAMA,OAAO,MAAMK,6BAEZ,GAAGC,IAAA,IAAwB;EAAA,IAAvB;IAAEC,IAAI;IAAEC;EAAS,CAAC,GAAAF,IAAA;EACrB,oBACET,KAAA,CAAAY,aAAA,CAACT,4BAA4B,CAACU,QAAQ;IAACC,KAAK,EAAEJ;EAAK,GAChDC,QACoC,CAAC;AAE5C,CAAC","ignoreList":[]}
@@ -0,0 +1,197 @@
1
+ /**
2
+ * The section-scoped image slot collector.
3
+ *
4
+ * A section declares the holes in its layout; it never makes a request. This
5
+ * gathers every declaration made inside one section's subtree, fires ONE
6
+ * `ResolveImageSet` through the injected port, and hands each declaration its
7
+ * answer back by `slotId`. Sections stay ignorant of each other — no section
8
+ * imports another, no ordering rules, no exclusion lists threaded through
9
+ * props — and the network still sees the joint solve that distinctness depends
10
+ * on.
11
+ *
12
+ * WHY THE BOUNDARY IS THE SECTION
13
+ * -------------------------------
14
+ * The resolver solves a maximum-weight one-to-one assignment across everything
15
+ * in one request, so distinctness and palette cohesion are properties of that
16
+ * solve and stop at its edge. Drawing the boundary at the page would buy
17
+ * cross-section distinctness at the cost of making every section's pictures
18
+ * wait on the slowest declaration on the page; drawing it at the section keeps
19
+ * each section independent and accepts that two sections may land on the same
20
+ * photograph. The most visible case — four identical photos in one grid — is
21
+ * still prevented for free, because those slots share a request.
22
+ *
23
+ * WHY THERE IS NO READINESS POLICY
24
+ * --------------------------------
25
+ * There is nothing to wait for. A section component is never constructed from
26
+ * partial markdown: a declared-but-unstreamed section is a `PageSection` with
27
+ * `isSkeleton: true` and `component: null`, and the real element is built only
28
+ * once its body has finished streaming. So a section's props are final the
29
+ * moment it exists, and the flush is simply "after this section's first render
30
+ * commit" — one effect, not a scheduler.
31
+ *
32
+ * The same fact bounds the win honestly: because only a *mounted* section
33
+ * declares, no section can ask for a picture before its own body has streamed,
34
+ * including a background whose subject needed nothing from that body.
35
+ */
36
+ import React, { createContext, useCallback, useContext, useEffect, useMemo, useRef } from 'react';
37
+ import { useOptionalComponentDependencies } from './ComponentDependenciesContext.js';
38
+ import { DIAGNOSTIC_TYPES } from '../component/diagnosticTypes.js';
39
+ const ImageSlotContext = /*#__PURE__*/createContext(null);
40
+ /**
41
+ * Mounted once per section by the host's section wrapper, so every section in
42
+ * every client package gets a collector without opting in.
43
+ */
44
+ export const ImageSlotProvider = _ref => {
45
+ let {
46
+ sectionId,
47
+ children
48
+ } = _ref;
49
+ // Optional on purpose: this is mounted by the host around EVERY section, so
50
+ // it sits above trees that may have no dependencies configured at all (a
51
+ // layout test, a story). Throwing there would make the image feature's
52
+ // provider a global requirement for rendering any section.
53
+ const deps = useOptionalComponentDependencies();
54
+ const resolve = deps == null ? void 0 : deps.resolveImageSet;
55
+
56
+ /**
57
+ * Slot state lives in a ref, NOT in React state, and the context value never
58
+ * changes. Holding it in state put it inside the provider's value, so every
59
+ * resolution produced a new value and re-rendered every consumer in the
60
+ * section — free at one slot, twelve re-renders per resolution in a
61
+ * twelve-card grid, which is exactly the shape this boundary exists to serve.
62
+ * Consumers now subscribe to their own id and nothing else.
63
+ */
64
+ const statesRef = useRef({});
65
+ const listenersRef = useRef(new Map());
66
+
67
+ // Declarations arriving during this commit. A ref, not state: collecting a
68
+ // declaration must not itself cause a render, or every hook that declares
69
+ // would re-render every sibling before the batch is even sent.
70
+ const pendingRef = useRef(new Map());
71
+ // Ids already sent. A re-render re-declares the same content-derived id, and
72
+ // that must be a no-op rather than a second request.
73
+ const sentRef = useRef(new Set());
74
+ const flushScheduled = useRef(false);
75
+ const aliveRef = useRef(true);
76
+ useEffect(() => {
77
+ aliveRef.current = true;
78
+ return () => {
79
+ aliveRef.current = false;
80
+ };
81
+ }, []);
82
+ const publish = useCallback(next => {
83
+ const changed = [];
84
+ for (const [id, state] of Object.entries(next)) {
85
+ if (statesRef.current[id] !== state) {
86
+ statesRef.current[id] = state;
87
+ changed.push(id);
88
+ }
89
+ }
90
+ for (const id of changed) {
91
+ var _listenersRef$current;
92
+ (_listenersRef$current = listenersRef.current.get(id)) == null || _listenersRef$current.forEach(fn => fn());
93
+ }
94
+ }, []);
95
+ const markUnavailable = useCallback(batch => {
96
+ if (!aliveRef.current) {
97
+ return;
98
+ }
99
+ publish(Object.fromEntries(batch.map(s => [s.id, {
100
+ status: 'unavailable'
101
+ }])));
102
+ }, [publish]);
103
+ const flush = useCallback(async () => {
104
+ flushScheduled.current = false;
105
+ const batch = [...pendingRef.current.values()].filter(s => !sentRef.current.has(s.id));
106
+ pendingRef.current.clear();
107
+ if (batch.length === 0) {
108
+ return;
109
+ }
110
+ batch.forEach(s => sentRef.current.add(s.id));
111
+
112
+ // No port means the host has not injected a resolver. Fail the batch closed
113
+ // rather than silently leaving slots pending forever.
114
+ if (!resolve) {
115
+ markUnavailable(batch);
116
+ return;
117
+ }
118
+ try {
119
+ const res = await resolve(batch);
120
+ if (!aliveRef.current) {
121
+ return;
122
+ }
123
+ const bySlotId = new Map(res.slots.map(s => [s.slotId, s]));
124
+ const next = {};
125
+ for (const req of batch) {
126
+ const got = bySlotId.get(req.id);
127
+ // A slot the resolver could not fill comes back with a null url. That
128
+ // is `unavailable` to a layout, not a resolved picture.
129
+ next[req.id] = got && got.imageUrl ? {
130
+ status: 'resolved',
131
+ slot: got
132
+ } : {
133
+ status: 'unavailable'
134
+ };
135
+ }
136
+ publish(next);
137
+ } catch (err) {
138
+ // Failure is contained to this section: one bad request costs this
139
+ // section its pictures and nothing else on the page.
140
+ deps == null || deps.reportDiagnostic == null || deps.reportDiagnostic(DIAGNOSTIC_TYPES.IMAGE_RESOLUTION_FAILED, sectionId, `ResolveImageSet failed for ${batch.length} slot(s): ${err instanceof Error ? err.message : String(err)}`);
141
+ markUnavailable(batch);
142
+ }
143
+ }, [resolve, deps, sectionId, publish, markUnavailable]);
144
+ const declare = useCallback(slot => {
145
+ if (sentRef.current.has(slot.id)) {
146
+ return;
147
+ }
148
+ pendingRef.current.set(slot.id, slot);
149
+ // Flush on a microtask, so every declaration made during this commit —
150
+ // the background, the cards, an inline image — lands in the same batch.
151
+ if (!flushScheduled.current) {
152
+ flushScheduled.current = true;
153
+ queueMicrotask(() => {
154
+ void flush();
155
+ });
156
+ }
157
+ }, [flush]);
158
+ const read = useCallback(slotId => statesRef.current[slotId] ?? {
159
+ status: 'pending'
160
+ }, []);
161
+ const subscribe = useCallback((slotId, onChange) => {
162
+ let set = listenersRef.current.get(slotId);
163
+ if (!set) {
164
+ set = new Set();
165
+ listenersRef.current.set(slotId, set);
166
+ }
167
+ set.add(onChange);
168
+ return () => {
169
+ var _set;
170
+ (_set = set) == null || _set.delete(onChange);
171
+ if (set && set.size === 0) {
172
+ listenersRef.current.delete(slotId);
173
+ }
174
+ };
175
+ }, []);
176
+
177
+ // Stable for the provider's lifetime: every member is a `useCallback` with no
178
+ // reactive deps, so mounting this around a section costs its consumers
179
+ // nothing after first render.
180
+ const api = useMemo(() => ({
181
+ declare,
182
+ read,
183
+ subscribe
184
+ }), [declare, read, subscribe]);
185
+ return /*#__PURE__*/React.createElement(ImageSlotContext.Provider, {
186
+ value: api
187
+ }, children);
188
+ };
189
+
190
+ /**
191
+ * Null when no provider is mounted above — a host that has not adopted the
192
+ * section wrapper's collector. `useImageSlot` handles that by resolving each
193
+ * slot on its own, so a section still gets its picture and only loses batching
194
+ * with its siblings.
195
+ */
196
+ export const useImageSlotCollector = () => useContext(ImageSlotContext);
197
+ //# sourceMappingURL=ImageSlotContext.js.map