@wix/web5-core 1.63.45 → 1.63.47

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.
@@ -1 +1 @@
1
- {"version":3,"names":["CLIENT_IDS","EXPERIMENT_IDS","createFeatureToggleReader","FeatureToggleProvider","useFeatureToggles","useFeatureToggle","getPartsByType","getPartByRole","getAllByRole","getHeading","getImages","getLinks","extractContent","extractContentMarkdown","deriveRole","DROP_SECTION","DIAGNOSTIC_TYPES","buildImageSearchFilter","ImageSearchFilterToken","backgroundFilter","HeroSectionDefinition","HeroEntitySectionDefinition","KpiSectionDefinition","MetricsSectionDefinition","FeatureCardsSectionDefinition","EntitySectionDefinition","EntityCollectionSectionDefinition","ComparisonSectionDefinition","TextBlockSectionDefinition","CtaBannerSectionDefinition","CalloutSectionDefinition","NextStepsSectionDefinition","FeatureSection9PlusDefinition","ListItemsSectionDefinition","SkipNodesSectionDefinition","HtmlCommentSectionDefinition","SearchSectionDefinition","ErrorSectionDefinition","FallbackSectionDefinition","createSdkRegistry","ComponentRegistry","validatePattern","validatePatternSyntax","validatePatternWithBlocks","convertToBlockElements","convertToBlockElementsWithMapping","Web5UrlType","isWeb5AskUrl","isWeb5EntityUrl","isWeb5ImageUrl","isWeb5IconUrl","isWeb5ActionUrl","isWeb5SearchUrl","isWeb5Url","isNavigableUrl","isValidLinkUrl","isLegacyUrl","parseWeb5Url","isValidWeb5Url","validateLinkUrl","isEntityLink","parseEntityLink","extractProtocol","extractLinkMetadata","findInvalidWeb5Links","hasImage","isHtmlComment","matchMarkdown","matchAllSections","nodesToParts","ComponentDependenciesProvider","useComponentDependencies","UserQueryProvider","useUserQuery","ChipsProvider","useChips","defaultExtractor","enrichEntitiesFromPayload","entityHref","normalizeEntityItem","toCatalogPath","entityPayloadFromItems","mergeEntityData","fetchEntityListData","listEntityItems","LIST_ITEMS_ENDPOINT","getEntityExtractor","registerEntityExtractor","transformToSolutionEntityData","transformToBlogPostEntityData","transformToGenericEntityData","toMatchedOptions","formatMoney","readCurrencyCode","formatPriceField","formatProductPriceLabel","isProductFamilyEntityType","isDocumentFamilyEntityType","PLATFORM_ENTITY_TYPES","resolveEntityTypeConfig","CALLOUT_KINDS","CALLOUT_SEMANTICS","useWeb5Link","useConversation","useDebugImageContext","useResolvedImageSources","useImageSlot","ImageSlotProvider","useImageSlotCollector","SectionsRuntimeProvider","SectionRuntimeProvider","useCurrentSectionOptions","useCurrentSectionId","composeSemantic","useResolveGenericEntityData","useEntityTransforms","useMarkdownUtils","useResolveShopifyEntityData","useResolveSearchSpringEntityData","fetchProductsByHandles","fetchProductsByHandlesMap","transformSSProductToEntityItemData","addToCart","ShopifyStorefrontClient","resolveShopifyConfig","resolveShopifyEntity","transformShopifyProduct","transformShopifyCollection","transformShopifyArticle","transformShopifyEntityToItemData","PRODUCT_BY_HANDLE_QUERY","COLLECTION_BY_HANDLE_QUERY","ARTICLE_BY_HANDLE_QUERY","cn","normalizeImageUrl","getResizedImageUrl","analyzeBackdrop","computeContentBBox","buildProbeUrl","loadImagePixels","loadBackdropAnalysis","stripMarkdown","rgbToHsl","hslToRgb","ensureMinLightness","toRgb","deriveDarkColor","deriveDarkGradient","deriveLightColor","pushEvent","pushPromptSubmit","pushLinkClick","pushError","pushExit","pushEntityFiltered","UNKNOWN_CONSENT","HOST_CONSENT_GLOBAL","unlockOnUserAction","mayPersistToken","getConsentSnapshot","subscribeToConsent","installConsentProvider","resetConsentGateForTests","detectConsentProvider","initConsentGate","CONSENT_OVERRIDE_KEY","CONSENT_OVERRIDE_QUERY_PARAM","getConsentOverride","setConsentOverride","createShopifyConsentProvider","isShopifyHost","createOneTrustConsentProvider","isOneTrustHost","createHostSuppliedConsentProvider","hasHostSuppliedConsent","publishHostConsent","ERROR_MARKDOWN","getErrorTypeFromStatus","createErrorMarkdown","STREAMING_TIMEOUT_MS","DEFAULT_ERROR_TEMPLATES","resolveErrorTemplate","getForwardStack","setForwardStack","clearForwardStack","pushToForwardStack","popFromForwardStack","UserQuery","PRODUCT_BACK_SESSION_KEY","writeProductBackHandoff","readProductBackHandoff","PromptEntryEmptyState","SearchSection","FeedbackBar","AiDisclosure","DEFAULT_AI_DISCLOSURE_TEXT","ASSISTANT_TOKEN","UNBRANDED_ASSISTANT_NAME","DEFAULT_PROMPT_PLACEHOLDER","assistantName","resolveAssistantPlaceholder","AiIcon","PoweredByBadge","DEFAULT_POWERED_BY_HREF","BottomContainer","MarkdownText","CalloutBlock","OptimizedImage","SectionSkeleton","SmartIcon","Loader","PlacementLoader","UnifiedLink","detectLinkType","LinkType","Table","TableHeader","TableBody","TableFooter","TableHead","TableRow","TableCell","TableCaption","WEB5_USER_QUERY_EVENT","WEB5_ANSWER_UPDATED_EVENT","WEB5_ANSWER_SETTLED_EVENT","WEB5_REDIRECT_EVENT","loadClientBundle","getClientBundleOverride","isTrustedBundleHost","TEMPLATES_CDN_BASE","TEMPLATES_MANIFEST_URL","getTemplateOverride","isTemplatePickerRequested","isValidTemplateId","resolveClientBundleUrl","mergeClientConfig","applyThemeOverrides","THEME_OVERRIDE_TOKENS","THEME_TOKEN_CONTRACT","BRAND_TOKENS","EDITABLE_TOKENS","TOKEN_NAME_PATTERN","THEME_OVERRIDE_KEY_PATTERN","bucketOf","hostAliasFor","SCHEME_COLOR_TOKENS","MAX_THEME_SCHEMES","SCHEME_ANCHOR_TOKENS","completeScheme","isThemeScheme","isSchemeTokenEntry","nextOwnerSchemeId","resolveActiveScheme","schemeDisplayName","isThemeDebugEnabled","THEME_DEBUG_KEY","THEME_DEBUG_QUERY_PARAM","hexToHslTriplet","hslTripletToHex","isHslTriplet","PlacementResponseRenderer","PlacementSmoothHeight","buildPlacementDependencies","PlacementPayloadProvider","usePlacementPayload","UnifiedMarkdownParser","parseMarkdownToAst","parseAstToMarkdown","escapeWeb5Links","fixMalformedLinks","trimTrailingWhitespace","normalizeIconUrls","decodeLinkText","preprocessMarkdown","ComponentTracking","findKeywordsInContent","getContextualImageFilename","extractIntentFromMarkdown","getIntentFromMarkdown","createPageSection","generateSectionId","generateId","findImageInNode","findImageInChildren","DiagnosticsCollector","REFRESH_PROMPTS_UNTIL_KEY","REFRESH_PROMPTS_WINDOW_MS","getRefreshPromptsExpiry","shouldRefreshPrompts","enableRefreshPrompts","disableRefreshPrompts","BACKEND_ENVIRONMENT_KEY","BACKEND_ENVIRONMENT_QUERY_PARAM","DEFAULT_BACKEND_ENVIRONMENT","getBackendEnvironment","setBackendEnvironment","usesStagingBackend","isSimulationTraffic","MATCH_DEBUG_KEY","MATCH_DEBUG_QUERY_PARAM","isMatchDebugEnabled","setMatchDebug","resetMatchDebugCache","logMatchDebug","createWixAuthFetch","getOrCreateSessionId","getSessionId","getChatId","startNewChatId","setChatId","resetChatIdForTests","parseMarkdownToComponents","tryParseComponent","mergeSectionsWithStableReferences","WEB5_ROOT_ID","WEB5_ROOT_CLASS","WEB5_SCOPES","WEB5_SCOPE","WEB5_GLOBAL_TOKENS"],"sources":["../../src/index.ts"],"sourcesContent":["// Client IDs and experiment IDs\nexport { CLIENT_IDS, EXPERIMENT_IDS } from './clients';\n\nexport {\n type EmbedFeatureToggleResult,\n type FeatureToggleReader,\n createFeatureToggleReader,\n FeatureToggleProvider,\n useFeatureToggles,\n useFeatureToggle,\n} from './featureToggles/FeatureToggleContext';\n\n// Dev-only chrome injection contract for client packages\nexport type { DevEnvironment } from './client/devEnvironment';\n\n// Part types and helpers\nexport {\n type PartType,\n type Part,\n type HeadingPart,\n type ImagePart,\n type LinkPart,\n type ListPart,\n type ListItemPart,\n type KpiItemPart,\n type CardPart,\n type IconPart,\n type CalloutPart,\n type EntityPart,\n getPartsByType,\n getPartByRole,\n getAllByRole,\n getHeading,\n getImages,\n getLinks,\n extractContent,\n extractContentMarkdown,\n deriveRole,\n} from './parts/parts';\n\n// Component types\nexport type {\n BaseCompProps,\n SlotCompProps,\n SectionCompProps,\n SectionCompPropsWithSlot,\n TextCompProps,\n ButtonCompProps,\n ImageCompProps,\n BadgeCompProps,\n HeroButton,\n KpiItemCompProps,\n FeatureItemCompProps,\n FeatureCardCompProps,\n EntityItemData,\n EntityItem,\n GenericEntityData,\n GenericEntityCompProps,\n ComparisonRow,\n ComparisonColumn,\n AiNarrativeCompProps,\n HeroCompProps,\n HeroEntityCompProps,\n KpiCompProps,\n 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 isDocumentFamilyEntityType,\n PLATFORM_ENTITY_TYPES,\n resolveEntityTypeConfig,\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';\n\n// Section runtime: the host mounts these around the page and around each\n// section, so a component can read the id of the section it renders inside\n// and the `componentOptions` its registry entry carried. Client bundles used\n// to ship their own copies as uiSlots; those are superseded by this.\nexport {\n SectionsRuntimeProvider,\n SectionRuntimeProvider,\n useCurrentSectionOptions,\n useCurrentSectionId,\n} from './context/SectionRuntimeContext';\nexport type {\n RuntimeSection,\n SectionsRuntimeProviderProps,\n SectionRuntimeProviderProps,\n} from './context/SectionRuntimeContext';\nexport { composeSemantic } from './image/composeSemantic';\nexport type { ComposeSemanticInput } from './image/composeSemantic';\nexport type {\n ImageSlotKind,\n ImageMatchQuality,\n ImageKind,\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 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 HostConsentInput,\n UNKNOWN_CONSENT,\n HOST_CONSENT_GLOBAL,\n unlockOnUserAction,\n mayPersistToken,\n getConsentSnapshot,\n subscribeToConsent,\n installConsentProvider,\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 {\n AiDisclosure,\n DEFAULT_AI_DISCLOSURE_TEXT,\n type AiDisclosureProps,\n} from './components/ui/AiDisclosure';\nexport {\n ASSISTANT_TOKEN,\n UNBRANDED_ASSISTANT_NAME,\n DEFAULT_PROMPT_PLACEHOLDER,\n assistantName,\n resolveAssistantPlaceholder,\n} from './lib/assistant';\nexport { AiIcon } from './components/ui/icons/AiIcon';\nexport {\n PoweredByBadge,\n DEFAULT_POWERED_BY_HREF,\n type PoweredByBadgeProps,\n} from './components/ui/PoweredByBadge';\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 THEME_OVERRIDE_KEY_PATTERN,\n bucketOf,\n hostAliasFor,\n type TokenBucket,\n type TokenContractEntry,\n type TokenType,\n} from './theme/tokenContract';\nexport {\n SCHEME_COLOR_TOKENS,\n MAX_THEME_SCHEMES,\n SCHEME_ANCHOR_TOKENS,\n completeScheme,\n isThemeScheme,\n isSchemeTokenEntry,\n nextOwnerSchemeId,\n resolveActiveScheme,\n schemeDisplayName,\n type ThemeScheme,\n type SchemeAnchorToken,\n type SchemeOrigin,\n} from './theme/themeScheme';\nexport {\n isThemeDebugEnabled,\n THEME_DEBUG_KEY,\n THEME_DEBUG_QUERY_PARAM,\n type AppliedToken,\n type ThemeOverrideSource,\n} from './client/themeDebug';\nexport {\n hexToHslTriplet,\n hslTripletToHex,\n isHslTriplet,\n} from './theme/colorFormat';\n\n// Placement renderer + DI helper (DL #088 D3.2, D3.4)\nexport {\n PlacementResponseRenderer,\n PlacementSmoothHeight,\n type PlacementResponseRendererProps,\n type PlacementSection,\n type PlacementVariant,\n} from './components/placement/PlacementResponseRenderer';\nexport {\n buildPlacementDependencies,\n type BuildPlacementDependenciesOptions,\n} from './components/placement/buildPlacementDependencies';\nexport {\n PlacementPayloadProvider,\n usePlacementPayload,\n type PlacementPayloadContextValue,\n} from './components/placement/PlacementPayloadContext';\n\n// Markdown parsing utilities — lifted from web50-server-ui (DL #088 B9.1)\nexport {\n UnifiedMarkdownParser,\n parseMarkdownToAst,\n parseAstToMarkdown,\n} from './utils/unifiedMarkdownParser';\nexport {\n escapeWeb5Links,\n fixMalformedLinks,\n trimTrailingWhitespace,\n normalizeIconUrls,\n decodeLinkText,\n preprocessMarkdown,\n type PreprocessorDiagnostic,\n type PreprocessResult,\n} from './utils/markdownPreprocessor';\nexport {\n ComponentTracking,\n type ComponentNodeRange,\n} from './utils/componentTracking';\nexport {\n findKeywordsInContent,\n getContextualImageFilename,\n} from './utils/contentKeywordMatcher';\nexport {\n extractIntentFromMarkdown,\n getIntentFromMarkdown,\n type IntentInfo,\n type IntentExtractionOptions,\n type ResponseState,\n} from './utils/intentExtractor';\nexport type { PageSection } from './types/page-section';\nexport {\n createPageSection,\n generateSectionId,\n generateId,\n findImageInNode,\n findImageInChildren,\n type Product,\n type ComparisonProduct,\n type ProductComparisonSectionProps,\n} from './utils/propsExtractor';\nexport {\n DiagnosticsCollector,\n type DiagnosticEntry,\n} from './utils/diagnosticsCollector';\nexport {\n REFRESH_PROMPTS_UNTIL_KEY,\n REFRESH_PROMPTS_WINDOW_MS,\n getRefreshPromptsExpiry,\n shouldRefreshPrompts,\n enableRefreshPrompts,\n disableRefreshPrompts,\n} from './utils/refreshPrompts';\nexport {\n type BackendEnvironment,\n BACKEND_ENVIRONMENT_KEY,\n BACKEND_ENVIRONMENT_QUERY_PARAM,\n DEFAULT_BACKEND_ENVIRONMENT,\n getBackendEnvironment,\n setBackendEnvironment,\n usesStagingBackend,\n} from './utils/backendEnvironment';\nexport { isSimulationTraffic } from './utils/simulation';\nexport {\n MATCH_DEBUG_KEY,\n MATCH_DEBUG_QUERY_PARAM,\n isMatchDebugEnabled,\n setMatchDebug,\n resetMatchDebugCache,\n logMatchDebug,\n} from './utils/matchDebug';\nexport { createWixAuthFetch } from './client/wixAuthFetch';\nexport {\n getOrCreateSessionId,\n getSessionId,\n getChatId,\n startNewChatId,\n setChatId,\n resetChatIdForTests,\n} from './utils/sessionManager';\n\n// Component parser orchestrator — lifted from web50-server-ui (DL #088 B9.5)\nexport {\n parseMarkdownToComponents,\n tryParseComponent,\n mergeSectionsWithStableReferences,\n type ParseMarkdownOptions,\n type ParseMarkdownResult,\n type ComponentMatch,\n type ParserContext,\n} from './component/componentParser';\nexport type {\n ParserClientConfig,\n EnrichEntityProps,\n} from './component/parser-types';\n\n// Host-mount scope contract — shared by web50-server-ui (which stamps the\n// class and mounts), embed-placement (which mounts the same bundle elsewhere),\n// and the client CDN build (which compiles every selector against it).\nexport {\n WEB5_ROOT_ID,\n WEB5_ROOT_CLASS,\n WEB5_SCOPES,\n WEB5_SCOPE,\n WEB5_GLOBAL_TOKENS,\n type HostFitConfig,\n} from './hostScope';\n"],"mappings":"AAAA;AACA,SAASA,UAAU,EAAEC,cAAc,QAAQ,WAAW;AAEtD,SAGEC,yBAAyB,EACzBC,qBAAqB,EACrBC,iBAAiB,EACjBC,gBAAgB,QACX,uCAAuC;;AAE9C;;AAGA;AACA,SAaEC,cAAc,EACdC,aAAa,EACbC,YAAY,EACZC,UAAU,EACVC,SAAS,EACTC,QAAQ,EACRC,cAAc,EACdC,sBAAsB,EACtBC,UAAU,QACL,eAAe;;AAEtB;;AAgFA;;AAOA,SAASC,YAAY,QAAQ,gCAAgC;;AAE7D;AACA,SAASC,gBAAgB,QAAQ,6BAA6B;AAG9D;AACA,SACEC,sBAAsB,QAEjB,gCAAgC;AACvC,SACEC,sBAAsB,EACtBC,gBAAgB,QACX,4BAA4B;AAQnC;AACA,SACEC,qBAAqB,EACrBC,2BAA2B,EAC3BC,oBAAoB,EACpBC,wBAAwB,EACxBC,6BAA6B,EAC7BC,uBAAuB,EACvBC,iCAAiC,EACjCC,2BAA2B,EAC3BC,0BAA0B,EAC1BC,0BAA0B,EAC1BC,wBAAwB,EACxBC,0BAA0B,EAC1BC,6BAA6B,EAC7BC,0BAA0B,EAC1BC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,uBAAuB,EACvBC,sBAAsB,EACtBC,yBAAyB,EACzBC,iBAAiB,QACZ,kCAAkC;;AAEzC;AACA,SAASC,iBAAiB,QAAQ,YAAY;AAgB9C;AACA,SACEC,eAAe,EACfC,qBAAqB,EACrBC,yBAAyB,QAMpB,oBAAoB;;AAE3B;AACA,SACEC,sBAAsB,EACtBC,iCAAiC,QAE5B,kBAAkB;;AAEzB;AACA,SACEC,WAAW,EAgBXC,YAAY,EACZC,eAAe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BC,cAAc,EACdC,kBAAkB,QAGb,8BAA8B;AACrC,SACEC,iBAAiB,QAEZ,2BAA2B;AAClC,SACEC,qBAAqB,EACrBC,0BAA0B,QACrB,+BAA+B;AACtC,SACEC,yBAAyB,EACzBC,qBAAqB,QAIhB,yBAAyB;AAEhC,SACEC,iBAAiB,EACjBC,iBAAiB,EACjBC,UAAU,EACVC,eAAe,EACfC,mBAAmB,QAId,wBAAwB;AAC/B,SACEC,oBAAoB,QAEf,8BAA8B;AACrC,SACEC,yBAAyB,EACzBC,yBAAyB,EACzBC,uBAAuB,EACvBC,oBAAoB,EACpBC,oBAAoB,EACpBC,qBAAqB,QAChB,wBAAwB;AAC/B,SAEEC,uBAAuB,EACvBC,+BAA+B,EAC/BC,2BAA2B,EAC3BC,qBAAqB,EACrBC,qBAAqB,EACrBC,kBAAkB,QACb,4BAA4B;AACnC,SAASC,mBAAmB,QAAQ,oBAAoB;AACxD,SACEC,eAAe,EACfC,uBAAuB,EACvBC,mBAAmB,EACnBC,aAAa,EACbC,oBAAoB,EACpBC,aAAa,QACR,oBAAoB;AAC3B,SAASC,kBAAkB,QAAQ,uBAAuB;AAC1D,SACEC,oBAAoB,EACpBC,YAAY,EACZC,SAAS,EACTC,cAAc,EACdC,SAAS,EACTC,mBAAmB,QACd,wBAAwB;;AAE/B;AACA,SACEC,yBAAyB,EACzBC,iBAAiB,EACjBC,iCAAiC,QAK5B,6BAA6B;AAMpC;AACA;AACA;AACA,SACEC,YAAY,EACZC,eAAe,EACfC,WAAW,EACXC,UAAU,EACVC,kBAAkB,QAEb,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["CLIENT_IDS","EXPERIMENT_IDS","createFeatureToggleReader","FeatureToggleProvider","useFeatureToggles","useFeatureToggle","getPartsByType","getPartByRole","getAllByRole","getHeading","getImages","getLinks","extractContent","extractContentMarkdown","deriveRole","DROP_SECTION","DIAGNOSTIC_TYPES","buildImageSearchFilter","ImageSearchFilterToken","backgroundFilter","HeroSectionDefinition","HeroEntitySectionDefinition","KpiSectionDefinition","MetricsSectionDefinition","FeatureCardsSectionDefinition","EntitySectionDefinition","EntityCollectionSectionDefinition","ComparisonSectionDefinition","TextBlockSectionDefinition","CtaBannerSectionDefinition","CalloutSectionDefinition","NextStepsSectionDefinition","FeatureSection9PlusDefinition","ListItemsSectionDefinition","SkipNodesSectionDefinition","HtmlCommentSectionDefinition","SearchSectionDefinition","ErrorSectionDefinition","FallbackSectionDefinition","createSdkRegistry","ComponentRegistry","validatePattern","validatePatternSyntax","validatePatternWithBlocks","convertToBlockElements","convertToBlockElementsWithMapping","Web5UrlType","isWeb5AskUrl","isWeb5EntityUrl","isWeb5ImageUrl","isWeb5IconUrl","isWeb5ActionUrl","isWeb5SearchUrl","isWeb5Url","isNavigableUrl","isValidLinkUrl","isLegacyUrl","parseWeb5Url","isValidWeb5Url","validateLinkUrl","isEntityLink","parseEntityLink","extractProtocol","extractLinkMetadata","findInvalidWeb5Links","hasImage","isHtmlComment","matchMarkdown","matchAllSections","nodesToParts","ComponentDependenciesProvider","useComponentDependencies","UserQueryProvider","useUserQuery","ChipsProvider","useChips","defaultExtractor","enrichEntitiesFromPayload","entityHref","normalizeEntityItem","toCatalogPath","entityPayloadFromItems","mergeEntityData","fetchEntityListData","listEntityItems","LIST_ITEMS_ENDPOINT","getEntityExtractor","registerEntityExtractor","transformToSolutionEntityData","transformToBlogPostEntityData","transformToGenericEntityData","toMatchedOptions","formatMoney","readCurrencyCode","formatPriceField","formatProductPriceLabel","isProductFamilyEntityType","isDocumentFamilyEntityType","PLATFORM_ENTITY_TYPES","resolveEntityTypeConfig","CALLOUT_KINDS","CALLOUT_SEMANTICS","useWeb5Link","useConversation","useDebugImageContext","useResolvedImageSources","useImageSlot","ImageSlotProvider","useImageSlotCollector","SectionsRuntimeProvider","SectionRuntimeProvider","useCurrentSectionOptions","useCurrentSectionId","composeSemantic","useResolveGenericEntityData","useEntityTransforms","useMarkdownUtils","useResolveShopifyEntityData","useResolveSearchSpringEntityData","fetchProductsByHandles","fetchProductsByHandlesMap","transformSSProductToEntityItemData","addToCart","ShopifyStorefrontClient","resolveShopifyConfig","resolveShopifyEntity","transformShopifyProduct","transformShopifyCollection","transformShopifyArticle","transformShopifyEntityToItemData","PRODUCT_BY_HANDLE_QUERY","COLLECTION_BY_HANDLE_QUERY","ARTICLE_BY_HANDLE_QUERY","cn","normalizeImageUrl","getResizedImageUrl","analyzeBackdrop","computeContentBBox","buildProbeUrl","loadImagePixels","loadBackdropAnalysis","stripMarkdown","rgbToHsl","hslToRgb","ensureMinLightness","toRgb","deriveDarkColor","deriveDarkGradient","deriveLightColor","pushEvent","pushPromptSubmit","pushLinkClick","pushError","pushExit","pushEntityFiltered","UNKNOWN_CONSENT","HOST_CONSENT_GLOBAL","unlockOnUserAction","mayPersistToken","getConsentSnapshot","subscribeToConsent","installConsentProvider","resetConsentGateForTests","detectConsentProvider","initConsentGate","CONSENT_OVERRIDE_KEY","CONSENT_OVERRIDE_QUERY_PARAM","getConsentOverride","setConsentOverride","createShopifyConsentProvider","isShopifyHost","createOneTrustConsentProvider","isOneTrustHost","createHostSuppliedConsentProvider","hasHostSuppliedConsent","publishHostConsent","ERROR_MARKDOWN","getErrorTypeFromStatus","createErrorMarkdown","STREAMING_TIMEOUT_MS","DEFAULT_ERROR_TEMPLATES","resolveErrorTemplate","getForwardStack","setForwardStack","clearForwardStack","pushToForwardStack","popFromForwardStack","UserQuery","PRODUCT_BACK_SESSION_KEY","writeProductBackHandoff","readProductBackHandoff","PromptEntryEmptyState","SearchSection","FeedbackBar","AiDisclosure","DEFAULT_AI_DISCLOSURE_TEXT","ASSISTANT_TOKEN","UNBRANDED_ASSISTANT_NAME","DEFAULT_PROMPT_PLACEHOLDER","assistantName","resolveAssistantPlaceholder","AiIcon","PoweredByBadge","DEFAULT_POWERED_BY_HREF","BottomContainer","MarkdownText","CalloutBlock","OptimizedImage","SectionSkeleton","SmartIcon","Loader","PlacementLoader","UnifiedLink","detectLinkType","LinkType","Table","TableHeader","TableBody","TableFooter","TableHead","TableRow","TableCell","TableCaption","WEB5_USER_QUERY_EVENT","WEB5_ANSWER_UPDATED_EVENT","WEB5_ANSWER_SETTLED_EVENT","WEB5_REDIRECT_EVENT","loadClientBundle","getClientBundleOverride","isTrustedBundleHost","TEMPLATES_CDN_BASE","TEMPLATES_MANIFEST_URL","getTemplateOverride","isTemplatePickerRequested","isValidTemplateId","resolveClientBundleUrl","mergeClientConfig","applyThemeOverrides","themeOverrideDeclarations","THEME_OVERRIDE_TOKENS","THEME_TOKEN_CONTRACT","BRAND_TOKENS","EDITABLE_TOKENS","TOKEN_NAME_PATTERN","THEME_OVERRIDE_KEY_PATTERN","bucketOf","hostAliasFor","SCHEME_COLOR_TOKENS","MAX_THEME_SCHEMES","SCHEME_ANCHOR_TOKENS","SCHEME_TOKENS","completeScheme","isThemeScheme","isSchemeTokenEntry","nextOwnerSchemeId","resolveActiveScheme","schemeDisplayName","schemeTokensOf","WEB5_CHROME_TOKENS","web5ChromeProperties","web5ChromeProperty","isThemeDebugEnabled","THEME_DEBUG_KEY","THEME_DEBUG_QUERY_PARAM","hexToHslTriplet","hslTripletToHex","isHslTriplet","PlacementResponseRenderer","PlacementSmoothHeight","buildPlacementDependencies","PlacementPayloadProvider","usePlacementPayload","UnifiedMarkdownParser","parseMarkdownToAst","parseAstToMarkdown","escapeWeb5Links","fixMalformedLinks","trimTrailingWhitespace","normalizeIconUrls","decodeLinkText","preprocessMarkdown","ComponentTracking","findKeywordsInContent","getContextualImageFilename","extractIntentFromMarkdown","getIntentFromMarkdown","createPageSection","generateSectionId","generateId","findImageInNode","findImageInChildren","DiagnosticsCollector","REFRESH_PROMPTS_UNTIL_KEY","REFRESH_PROMPTS_WINDOW_MS","getRefreshPromptsExpiry","shouldRefreshPrompts","enableRefreshPrompts","disableRefreshPrompts","BACKEND_ENVIRONMENT_KEY","BACKEND_ENVIRONMENT_QUERY_PARAM","DEFAULT_BACKEND_ENVIRONMENT","getBackendEnvironment","setBackendEnvironment","usesStagingBackend","isSimulationTraffic","MATCH_DEBUG_KEY","MATCH_DEBUG_QUERY_PARAM","isMatchDebugEnabled","setMatchDebug","resetMatchDebugCache","logMatchDebug","createWixAuthFetch","getOrCreateSessionId","getSessionId","getChatId","startNewChatId","setChatId","resetChatIdForTests","parseMarkdownToComponents","tryParseComponent","mergeSectionsWithStableReferences","WEB5_ROOT_ID","WEB5_ROOT_CLASS","WEB5_SCOPES","WEB5_SCOPE","WEB5_GLOBAL_TOKENS"],"sources":["../../src/index.ts"],"sourcesContent":["// Client IDs and experiment IDs\nexport { CLIENT_IDS, EXPERIMENT_IDS } from './clients';\n\nexport {\n type EmbedFeatureToggleResult,\n type FeatureToggleReader,\n createFeatureToggleReader,\n FeatureToggleProvider,\n useFeatureToggles,\n useFeatureToggle,\n} from './featureToggles/FeatureToggleContext';\n\n// Dev-only chrome injection contract for client packages\nexport type { DevEnvironment } from './client/devEnvironment';\n\n// Part types and helpers\nexport {\n type PartType,\n type Part,\n type HeadingPart,\n type ImagePart,\n type LinkPart,\n type ListPart,\n type ListItemPart,\n type KpiItemPart,\n type CardPart,\n type IconPart,\n type CalloutPart,\n type EntityPart,\n getPartsByType,\n getPartByRole,\n getAllByRole,\n getHeading,\n getImages,\n getLinks,\n extractContent,\n extractContentMarkdown,\n deriveRole,\n} from './parts/parts';\n\n// Component types\nexport type {\n BaseCompProps,\n SlotCompProps,\n SectionCompProps,\n SectionCompPropsWithSlot,\n TextCompProps,\n ButtonCompProps,\n ImageCompProps,\n BadgeCompProps,\n HeroButton,\n KpiItemCompProps,\n FeatureItemCompProps,\n FeatureCardCompProps,\n EntityItemData,\n EntityItem,\n GenericEntityData,\n GenericEntityCompProps,\n ComparisonRow,\n ComparisonColumn,\n AiNarrativeCompProps,\n HeroCompProps,\n HeroEntityCompProps,\n KpiCompProps,\n 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 isDocumentFamilyEntityType,\n PLATFORM_ENTITY_TYPES,\n resolveEntityTypeConfig,\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 { UseImageSlotOptions, ResolvedImage } from './hooks/useImageSlot';\nexport {\n ImageSlotProvider,\n useImageSlotCollector,\n} from './context/ImageSlotContext';\nexport type {\n ImageSlotCollector,\n ImageSlotProviderProps,\n} from './context/ImageSlotContext';\n\n// Section runtime: the host mounts these around the page and around each\n// section, so a component can read the id of the section it renders inside\n// and the `componentOptions` its registry entry carried. Client bundles used\n// to ship their own copies as uiSlots; those are superseded by this.\nexport {\n SectionsRuntimeProvider,\n SectionRuntimeProvider,\n useCurrentSectionOptions,\n useCurrentSectionId,\n} from './context/SectionRuntimeContext';\nexport type {\n RuntimeSection,\n SectionsRuntimeProviderProps,\n SectionRuntimeProviderProps,\n} from './context/SectionRuntimeContext';\nexport { composeSemantic } from './image/composeSemantic';\nexport type { ComposeSemanticInput } from './image/composeSemantic';\nexport type {\n ImageSlotKind,\n ImageMatchQuality,\n ImageKind,\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 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 HostConsentInput,\n UNKNOWN_CONSENT,\n HOST_CONSENT_GLOBAL,\n unlockOnUserAction,\n mayPersistToken,\n getConsentSnapshot,\n subscribeToConsent,\n installConsentProvider,\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 {\n AiDisclosure,\n DEFAULT_AI_DISCLOSURE_TEXT,\n type AiDisclosureProps,\n} from './components/ui/AiDisclosure';\nexport {\n ASSISTANT_TOKEN,\n UNBRANDED_ASSISTANT_NAME,\n DEFAULT_PROMPT_PLACEHOLDER,\n assistantName,\n resolveAssistantPlaceholder,\n} from './lib/assistant';\nexport { AiIcon } from './components/ui/icons/AiIcon';\nexport {\n PoweredByBadge,\n DEFAULT_POWERED_BY_HREF,\n type PoweredByBadgeProps,\n} from './components/ui/PoweredByBadge';\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 themeOverrideDeclarations,\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 THEME_OVERRIDE_KEY_PATTERN,\n bucketOf,\n hostAliasFor,\n type TokenBucket,\n type TokenContractEntry,\n type TokenType,\n} from './theme/tokenContract';\nexport {\n SCHEME_COLOR_TOKENS,\n MAX_THEME_SCHEMES,\n SCHEME_ANCHOR_TOKENS,\n SCHEME_TOKENS,\n completeScheme,\n isThemeScheme,\n isSchemeTokenEntry,\n nextOwnerSchemeId,\n resolveActiveScheme,\n schemeDisplayName,\n schemeTokensOf,\n type ThemeScheme,\n type SchemeAnchorToken,\n type SchemeToken,\n type SchemeOrigin,\n} from './theme/themeScheme';\nexport {\n WEB5_CHROME_TOKENS,\n web5ChromeProperties,\n web5ChromeProperty,\n type Web5ChromeToken,\n} from './theme/chromeTokens';\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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8B;AACrC,SACEC,iBAAiB,QAEZ,2BAA2B;AAClC,SACEC,qBAAqB,EACrBC,0BAA0B,QACrB,+BAA+B;AACtC,SACEC,yBAAyB,EACzBC,qBAAqB,QAIhB,yBAAyB;AAEhC,SACEC,iBAAiB,EACjBC,iBAAiB,EACjBC,UAAU,EACVC,eAAe,EACfC,mBAAmB,QAId,wBAAwB;AAC/B,SACEC,oBAAoB,QAEf,8BAA8B;AACrC,SACEC,yBAAyB,EACzBC,yBAAyB,EACzBC,uBAAuB,EACvBC,oBAAoB,EACpBC,oBAAoB,EACpBC,qBAAqB,QAChB,wBAAwB;AAC/B,SAEEC,uBAAuB,EACvBC,+BAA+B,EAC/BC,2BAA2B,EAC3BC,qBAAqB,EACrBC,qBAAqB,EACrBC,kBAAkB,QACb,4BAA4B;AACnC,SAASC,mBAAmB,QAAQ,oBAAoB;AACxD,SACEC,eAAe,EACfC,uBAAuB,EACvBC,mBAAmB,EACnBC,aAAa,EACbC,oBAAoB,EACpBC,aAAa,QACR,oBAAoB;AAC3B,SAASC,kBAAkB,QAAQ,uBAAuB;AAC1D,SACEC,oBAAoB,EACpBC,YAAY,EACZC,SAAS,EACTC,cAAc,EACdC,SAAS,EACTC,mBAAmB,QACd,wBAAwB;;AAE/B;AACA,SACEC,yBAAyB,EACzBC,iBAAiB,EACjBC,iCAAiC,QAK5B,6BAA6B;AAMpC;AACA;AACA;AACA,SACEC,YAAY,EACZC,eAAe,EACfC,WAAW,EACXC,UAAU,EACVC,kBAAkB,QAEb,aAAa","ignoreList":[]}
@@ -31,6 +31,25 @@
31
31
  --input: 0 0% 89.8%;
32
32
  --ring: 0 0% 3.9%;
33
33
 
34
+ /* Owner chrome tokens — HSL triplets. The Customize panel's own greys (ADR
35
+ * 0243), held apart from the store's palette ON PURPOSE: the panel edits and
36
+ * previews `--background`, `--card` and the rest, so chrome painted with them
37
+ * repaints itself — a dark scheme turned the panel black and its labels
38
+ * unreadable. Nothing writes these: they are not in THEME_TOKEN_CONTRACT, no
39
+ * store import, scheme or owner override carries them, and an unknown key
40
+ * from a flat map lands on its `--web5-host-*` alias, never here. Light only
41
+ * (no `.dark` twin) — admin chrome, not themed. */
42
+ --web5-chrome-surface: 0 0% 100%;
43
+ --web5-chrome-foreground: 0 0% 18.8%;
44
+ --web5-chrome-muted-foreground: 0 0% 38%;
45
+ --web5-chrome-subtle-foreground: 210 4.5% 56.9%;
46
+ --web5-chrome-border: 0 0% 89%;
47
+ --web5-chrome-border-strong: 0 0% 71%;
48
+ --web5-chrome-tint: 0 0% 98%;
49
+ --web5-chrome-accent: 0 0% 18.8%;
50
+ --web5-chrome-accent-foreground: 0 0% 100%;
51
+ --web5-chrome-destructive: 9 72.2% 44.9%;
52
+
34
53
  /* Typography tokens */
35
54
  --font-sans: ui-sans-serif, system-ui, sans-serif;
36
55
  --font-serif: serif;
@@ -47,6 +47,18 @@
47
47
  --color-text-accent-hover: var(--text-accent-hover);
48
48
  --color-accent-border: var(--accent-border);
49
49
 
50
+ /* Owner chrome — the Customize panel's store-independent greys */
51
+ --color-web5-chrome-surface: hsl(var(--web5-chrome-surface));
52
+ --color-web5-chrome-foreground: hsl(var(--web5-chrome-foreground));
53
+ --color-web5-chrome-muted-foreground: hsl(var(--web5-chrome-muted-foreground));
54
+ --color-web5-chrome-subtle-foreground: hsl(var(--web5-chrome-subtle-foreground));
55
+ --color-web5-chrome-border: hsl(var(--web5-chrome-border));
56
+ --color-web5-chrome-border-strong: hsl(var(--web5-chrome-border-strong));
57
+ --color-web5-chrome-tint: hsl(var(--web5-chrome-tint));
58
+ --color-web5-chrome-accent: hsl(var(--web5-chrome-accent));
59
+ --color-web5-chrome-accent-foreground: hsl(var(--web5-chrome-accent-foreground));
60
+ --color-web5-chrome-destructive: hsl(var(--web5-chrome-destructive));
61
+
50
62
  --radius-sm: calc(var(--radius) - 4px);
51
63
  --radius-md: calc(var(--radius) - 2px);
52
64
  --radius-lg: var(--radius);
@@ -0,0 +1,53 @@
1
+ /**
2
+ * The owner panel's own chrome colours (`--web5-chrome-*`).
3
+ *
4
+ * The Customize panel edits and previews the store's colour tokens, so its
5
+ * chrome cannot be painted with them: a dark scheme would turn its labels
6
+ * dark-on-dark and a cream card colour would turn the whole panel cream. It
7
+ * takes these instead — light, neutral, and written by nothing the store or the
8
+ * merchant controls.
9
+ *
10
+ * WHY A CONSTANT AND NOT ONLY CSS. `base-tokens.css` declares the same values,
11
+ * but that stylesheet reaches a page through the CLIENT bundle, and every
12
+ * client bundle pins the core version it was built against. A storefront whose
13
+ * template predates these tokens would leave the panel's `hsl(var(...))`
14
+ * invalid — a transparent panel inheriting the scheme's text colour. The panel
15
+ * lives in web50-server-ui, which bundles its own core, so it writes each value
16
+ * as the `var()` fallback (`hsl(var(--web5-chrome-surface, 0 0% 100%))`, see
17
+ * `chrome()` in the TemplatePicker) and never depends on the client's CSS.
18
+ * `chromeTokens.spec.ts` keeps this map and `base-tokens.css` equal.
19
+ *
20
+ * Bare HSL triplets, like every colour token: callers wrap them in `hsl()`.
21
+ * A leaf module (no CSS imports), for the reason `tokenContract.ts` gives.
22
+ */
23
+
24
+ /** Token name (without the `--web5-chrome-` prefix) → bare HSL triplet. */
25
+ export const WEB5_CHROME_TOKENS = Object.freeze({
26
+ surface: '0 0% 100%',
27
+ foreground: '0 0% 18.8%',
28
+ 'muted-foreground': '0 0% 38%',
29
+ 'subtle-foreground': '210 4.5% 56.9%',
30
+ border: '0 0% 89%',
31
+ 'border-strong': '0 0% 71%',
32
+ tint: '0 0% 98%',
33
+ accent: '0 0% 18.8%',
34
+ 'accent-foreground': '0 0% 100%',
35
+ destructive: '9 72.2% 44.9%'
36
+ });
37
+ /** `surface` → `--web5-chrome-surface`. */
38
+ export const web5ChromeProperty = token => `--web5-chrome-${token}`;
39
+
40
+ /**
41
+ * Every chrome token as custom properties, ready to spread into an element's
42
+ * inline style (`style={{ ...web5ChromeProperties(), ... }}`), so the element
43
+ * and everything inside it resolve `var(--web5-chrome-*)` without any
44
+ * stylesheet.
45
+ */
46
+ export function web5ChromeProperties() {
47
+ const out = {};
48
+ for (const [token, value] of Object.entries(WEB5_CHROME_TOKENS)) {
49
+ out[web5ChromeProperty(token)] = value;
50
+ }
51
+ return out;
52
+ }
53
+ //# sourceMappingURL=chromeTokens.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["WEB5_CHROME_TOKENS","Object","freeze","surface","foreground","border","tint","accent","destructive","web5ChromeProperty","token","web5ChromeProperties","out","value","entries"],"sources":["../../../src/theme/chromeTokens.ts"],"sourcesContent":["/**\n * The owner panel's own chrome colours (`--web5-chrome-*`).\n *\n * The Customize panel edits and previews the store's colour tokens, so its\n * chrome cannot be painted with them: a dark scheme would turn its labels\n * dark-on-dark and a cream card colour would turn the whole panel cream. It\n * takes these instead — light, neutral, and written by nothing the store or the\n * merchant controls.\n *\n * WHY A CONSTANT AND NOT ONLY CSS. `base-tokens.css` declares the same values,\n * but that stylesheet reaches a page through the CLIENT bundle, and every\n * client bundle pins the core version it was built against. A storefront whose\n * template predates these tokens would leave the panel's `hsl(var(...))`\n * invalid — a transparent panel inheriting the scheme's text colour. The panel\n * lives in web50-server-ui, which bundles its own core, so it writes each value\n * as the `var()` fallback (`hsl(var(--web5-chrome-surface, 0 0% 100%))`, see\n * `chrome()` in the TemplatePicker) and never depends on the client's CSS.\n * `chromeTokens.spec.ts` keeps this map and `base-tokens.css` equal.\n *\n * Bare HSL triplets, like every colour token: callers wrap them in `hsl()`.\n * A leaf module (no CSS imports), for the reason `tokenContract.ts` gives.\n */\n\n/** Token name (without the `--web5-chrome-` prefix) → bare HSL triplet. */\nexport const WEB5_CHROME_TOKENS = Object.freeze({\n surface: '0 0% 100%',\n foreground: '0 0% 18.8%',\n 'muted-foreground': '0 0% 38%',\n 'subtle-foreground': '210 4.5% 56.9%',\n border: '0 0% 89%',\n 'border-strong': '0 0% 71%',\n tint: '0 0% 98%',\n accent: '0 0% 18.8%',\n 'accent-foreground': '0 0% 100%',\n destructive: '9 72.2% 44.9%',\n} as const);\n\nexport type Web5ChromeToken = keyof typeof WEB5_CHROME_TOKENS;\n\n/** `surface` → `--web5-chrome-surface`. */\nexport const web5ChromeProperty = (token: Web5ChromeToken): `--web5-chrome-${string}` =>\n `--web5-chrome-${token}`;\n\n/**\n * Every chrome token as custom properties, ready to spread into an element's\n * inline style (`style={{ ...web5ChromeProperties(), ... }}`), so the element\n * and everything inside it resolve `var(--web5-chrome-*)` without any\n * stylesheet.\n */\nexport function web5ChromeProperties(): Record<`--web5-chrome-${string}`, string> {\n const out = {} as Record<`--web5-chrome-${string}`, string>;\n for (const [token, value] of Object.entries(WEB5_CHROME_TOKENS)) {\n out[web5ChromeProperty(token as Web5ChromeToken)] = value;\n }\n return out;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,MAAMA,kBAAkB,GAAGC,MAAM,CAACC,MAAM,CAAC;EAC9CC,OAAO,EAAE,WAAW;EACpBC,UAAU,EAAE,YAAY;EACxB,kBAAkB,EAAE,UAAU;EAC9B,mBAAmB,EAAE,gBAAgB;EACrCC,MAAM,EAAE,UAAU;EAClB,eAAe,EAAE,UAAU;EAC3BC,IAAI,EAAE,UAAU;EAChBC,MAAM,EAAE,YAAY;EACpB,mBAAmB,EAAE,WAAW;EAChCC,WAAW,EAAE;AACf,CAAU,CAAC;AAIX;AACA,OAAO,MAAMC,kBAAkB,GAAIC,KAAsB,IACvD,iBAAiBA,KAAK,EAAE;;AAE1B;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,oBAAoBA,CAAA,EAA8C;EAChF,MAAMC,GAAG,GAAG,CAAC,CAA8C;EAC3D,KAAK,MAAM,CAACF,KAAK,EAAEG,KAAK,CAAC,IAAIZ,MAAM,CAACa,OAAO,CAACd,kBAAkB,CAAC,EAAE;IAC/DY,GAAG,CAACH,kBAAkB,CAACC,KAAwB,CAAC,CAAC,GAAGG,KAAK;EAC3D;EACA,OAAOD,GAAG;AACZ","ignoreList":[]}
@@ -29,9 +29,22 @@
29
29
  * but a deep import of a zero-CSS leaf works. It imports only its siblings
30
30
  * `./tokenContract` and `./colorFormat`, both leaves themselves.
31
31
  *
32
+ * ## What a scheme carries (ADR 0243)
33
+ *
34
+ * A theme scheme is a background and its text, plus the colours mechanically
35
+ * derived from those two: `SCHEME_TOKENS`. Card colours, button colours,
36
+ * radius and fonts are the store's global set (`themeOverrides`) and the
37
+ * owner's global edits (`userThemeOverrides`), applied under and over the
38
+ * scheme respectively — so they survive every scheme switch. Rows written
39
+ * before 0243 may still carry more; readers apply whatever a row holds, and
40
+ * the owner panel writes only `SCHEME_TOKENS` into the rows it creates.
41
+ *
42
+ * An edited THEME scheme is an OWNER row that names it in `baseSchemeId`, so
43
+ * the panel can show the edit on that scheme's tile and revert only that one.
44
+ *
32
45
  * ## `completeScheme` — what the owner panel recomputes
33
46
  *
34
- * The owner edits the four anchors. The rest of the palette has to move with
47
+ * The owner edits the two anchors. The rest of the scheme has to move with
35
48
  * them the way `web50-shopify-adapter/src/theme-tokens.ts` would have moved it
36
49
  * had the theme stated those anchors, so the arithmetic below is a COPY of the
37
50
  * adapter's (`composite`/`mix`/`toTriplet` and the token assignments at the end
@@ -42,30 +55,21 @@
42
55
  * | ------------------------ | ------------------------------------------------------ |
43
56
  * | `--background` | anchor (else inherited from base) |
44
57
  * | `--foreground` | anchor (else inherited from base) |
45
- * | `--card` | anchor; when not given, derived: foreground 4% over background |
46
- * | `--card-foreground` | anchor; when not given, derived: = foreground |
47
58
  * | `--popover` | derived: = background |
48
59
  * | `--popover-foreground` | derived: = foreground |
49
60
  * | `--muted` | derived: foreground 4% over background |
50
61
  * | `--muted-foreground` | derived: foreground 60% over background |
51
- * | `--secondary` | derived: primary 10% over background |
52
- * | `--accent` | derived: primary 10% over background |
53
- * | `--primary` | inherited from base (the theme's button colour) |
54
- * | `--primary-foreground` | inherited from base (the theme's button label) |
55
- * | `--secondary-foreground` | inherited from base (the theme's outline-button label) |
56
- * | `--accent-foreground` | inherited from base; fallback = primary |
57
- * | `--ring` | inherited from base; fallback = primary |
58
62
  * | `--border` | inherited from base (no fallback — see below) |
59
63
  * | `--input` | inherited from base (no fallback — see below) |
60
- * | `--heading` | inherited from base (no adapter fills it) |
61
- * | any non-colour key | `--radius`, fonts, unknown: copied from base when valid |
62
64
  *
63
- * "Inherited" tokens are ones the adapter reads straight off the theme, which
64
- * no arithmetic over the anchors can recover. Where base lacks one, the
65
- * adapter's own fallback applies: `--ring` and `--accent-foreground` are the
66
- * primary colour. `--border`/`--input` have none the adapter reconstructs a
67
- * missing border from the theme's `*_border_opacity` setting, which a token map
68
- * does not carry — so they are omitted, as the adapter omits them.
65
+ * `--secondary`/`--accent` are NOT scheme tokens: the adapter mixes them from
66
+ * the button colour, so they belong to the store's global set
67
+ * (`themeOverrides`) with the buttons, and a scheme edit leaves them alone.
68
+ * `--border`/`--input` are read straight off the
69
+ * theme by the adapter, which reconstructs a missing border from the theme's
70
+ * `*_border_opacity` setting a token map does not carry — so they are
71
+ * inherited from base, and omitted when base lacks them, as the adapter omits
72
+ * them.
69
73
  *
70
74
  * ## Rounding: why an unchanged input keeps base's value
71
75
  *
@@ -80,8 +84,8 @@
80
84
  *
81
85
  * When it is recomputed, triplets convert back to RGB WITHOUT rounding to
82
86
  * 8-bit first — that would be a second quantisation the adapter never
83
- * performs, and enough to move smallflower's `--secondary` from `230 38% 94%`
84
- * to `230 42% 94%`. The mix result is rounded exactly where the adapter
87
+ * performs, and enough to move a mixed colour's saturation by several points
88
+ * (smallflower's button tint went from `230 38% 94%` to `230 42% 94%`). The mix result is rounded exactly where the adapter
85
89
  * rounds it.
86
90
  */
87
91
  import { isHslTriplet } from './colorFormat.js';
@@ -124,8 +128,24 @@ const SCHEME_RADIUS_VALUE = /^\d{1,4}(?:\.\d+)?(?:px|rem|em)$/;
124
128
  const SCHEME_LOOSE_VALUE = /^[^;{}\p{Cc}]+$/u;
125
129
  const MAX_SCHEME_VALUE_LENGTH = 256;
126
130
 
127
- /** The four the owner edits, in panel order. Equal to the contract's editable colour tokens. */
128
- export const SCHEME_ANCHOR_TOKENS = ['--background', '--foreground', '--card', '--card-foreground'];
131
+ /**
132
+ * What a scheme is (ADR 0243): its background and text, and the colours
133
+ * derived from those two. The panel writes exactly these into the OWNER rows
134
+ * it creates, and mirrors exactly these of the active row into `themeOverrides`.
135
+ */
136
+ export const SCHEME_TOKENS = ['--background', '--foreground', '--popover', '--popover-foreground', '--muted', '--muted-foreground', '--border', '--input'];
137
+ const SCHEME_TOKEN_SET = new Set(SCHEME_TOKENS);
138
+
139
+ /** Only the `SCHEME_TOKENS` entries of `map`. */
140
+ export function schemeTokensOf(map) {
141
+ return Object.fromEntries(Object.entries(map ?? {}).filter(_ref3 => {
142
+ let [token] = _ref3;
143
+ return SCHEME_TOKEN_SET.has(token);
144
+ }));
145
+ }
146
+
147
+ /** The two the owner edits on a scheme, in panel order. */
148
+ export const SCHEME_ANCHOR_TOKENS = ['--background', '--foreground'];
129
149
  /** Upper bound on schemes per configuration. */
130
150
  export const MAX_THEME_SCHEMES = 16;
131
151
  const SCHEME_ID_PATTERN = /^[a-z0-9][a-z0-9-]{0,31}$/;
@@ -148,11 +168,15 @@ export function isThemeScheme(value) {
148
168
  id,
149
169
  name,
150
170
  origin,
171
+ baseSchemeId,
151
172
  tokens
152
173
  } = value;
153
174
  if (typeof id !== 'string' || !SCHEME_ID_PATTERN.test(id)) {
154
175
  return false;
155
176
  }
177
+ if (baseSchemeId !== undefined && typeof baseSchemeId !== 'string') {
178
+ return false;
179
+ }
156
180
  if (name !== undefined && (typeof name !== 'string' || name.length > MAX_SCHEME_NAME_LENGTH)) {
157
181
  return false;
158
182
  }
@@ -217,12 +241,12 @@ function mix(fg, ratio, bg) {
217
241
  }
218
242
 
219
243
  /** Adapter `toTriplet`: `"H S% L%"`, integer-rounded. */
220
- function toTriplet(_ref3) {
244
+ function toTriplet(_ref4) {
221
245
  let {
222
246
  r,
223
247
  g,
224
248
  b
225
- } = _ref3;
249
+ } = _ref4;
226
250
  const rn = r / 255;
227
251
  const gn = g / 255;
228
252
  const bn = b / 255;
@@ -246,23 +270,18 @@ function toTriplet(_ref3) {
246
270
  return `${Math.round(h)} ${Math.round(s * 100)}% ${Math.round(l * 100)}%`;
247
271
  }
248
272
 
249
- /** Tokens the adapter reads off the theme rather than computing from the anchors. */
250
- const INHERITED_TOKENS = ['--primary', '--primary-foreground', '--secondary-foreground', '--accent-foreground', '--ring', '--border', '--input', '--heading'];
251
-
252
273
  /**
253
- * A full colour-token map for a palette whose anchors the owner just edited.
274
+ * The `SCHEME_TOKENS` of a scheme whose anchors the owner just edited.
254
275
  *
255
276
  * `anchors` win; everything the adapter derives from them is recomputed when
256
277
  * one of its inputs changed (and kept from `base` when none did — see "Rounding"
257
- * in the module header); everything it reads directly is taken from `base`.
258
- * Invalid triplets in either input are ignored, and a derived token whose
259
- * inputs are unavailable keeps `base`'s value, if any.
278
+ * in the module header); `--border`/`--input` are taken from `base`. Invalid
279
+ * triplets in any input are ignored, and a derived token whose inputs are
280
+ * unavailable keeps `base`'s value, if any.
260
281
  *
261
- * Returns the whole scheme map, not only its colours: every non-colour entry of
262
- * `base` that passes `isSchemeTokenEntry` `--radius`, a font stack, a token
263
- * this module does not know — is copied as is, so customizing a palette keeps
264
- * everything it states beyond colour. Every output entry passes
265
- * `isSchemeTokenEntry`.
282
+ * Returns ONLY `SCHEME_TOKENS`: whatever else `base` carries (a pre-0243 row's
283
+ * card, button or secondary/accent colours, its radius) is the store's global set now, not the
284
+ * scheme's, and is dropped. Every output entry passes `isSchemeTokenEntry`.
266
285
  */
267
286
  export function completeScheme(base, anchors) {
268
287
  // Both checks: `isHslTriplet` is what the arithmetic can convert, and the
@@ -292,30 +311,12 @@ export function completeScheme(base, anchors) {
292
311
  const mixOver = (over, ratio) => () => over !== null && bg !== null ? toTriplet(mix(over, ratio, bg)) : undefined;
293
312
  put('--background', background);
294
313
  put('--foreground', foreground);
295
- put('--card', fromAnchor('--card') ?? derive('--card', bgChanged || fgChanged, mixOver(fg, 0.04)));
296
- put('--card-foreground', fromAnchor('--card-foreground') ?? derive('--card-foreground', fgChanged, () => foreground));
297
314
  put('--popover', derive('--popover', bgChanged, () => background));
298
315
  put('--popover-foreground', derive('--popover-foreground', fgChanged, () => foreground));
299
316
  put('--muted', derive('--muted', bgChanged || fgChanged, mixOver(fg, 0.04)));
300
317
  put('--muted-foreground', derive('--muted-foreground', bgChanged || fgChanged, mixOver(fg, 0.6)));
301
- for (const token of INHERITED_TOKENS) {
302
- put(token, fromBase(token));
303
- }
304
- // Primary is inherited, so of the button family's inputs only the page can change.
305
- const primaryTriplet = out['--primary'];
306
- const primary = primaryTriplet === undefined ? null : tripletToRgb(primaryTriplet);
307
- put('--ring', out['--ring'] ?? primaryTriplet);
308
- put('--accent-foreground', out['--accent-foreground'] ?? primaryTriplet);
309
- put('--secondary', derive('--secondary', bgChanged, mixOver(primary, 0.1)));
310
- put('--accent', derive('--accent', bgChanged, mixOver(primary, 0.1)));
311
-
312
- // Not colours, so no arithmetic touches them: the palette keeps its shape,
313
- // its type, and any token a writer added that this module has never heard of.
314
- for (const [token, value] of Object.entries(base)) {
315
- if (!SCHEME_COLOR_TOKENS.has(token) && isSchemeTokenEntry(token, value)) {
316
- out[token] = value;
317
- }
318
- }
318
+ put('--border', fromBase('--border'));
319
+ put('--input', fromBase('--input'));
319
320
  return out;
320
321
  }
321
322