admesh-ui-sdk 0.15.0 → 0.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AdMeshLayout.d.ts.map +1 -1
- package/dist/components/AdMeshSummaryLayout.d.ts +2 -2
- package/dist/components/AdMeshSummaryLayout.d.ts.map +1 -1
- package/dist/components/AdMeshSummaryUnit.d.ts +1 -1
- package/dist/components/AdMeshSummaryUnit.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +159 -156
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.ts +8 -2
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/react/jsx-runtime.js","../src/components/AdMeshSummaryUnit.tsx","../node_modules/classnames/index.js","../src/hooks/useAdMeshTracker.ts","../src/components/AdMeshLinkTracker.tsx","../src/hooks/useAdMeshStyles.ts","../src/utils/disclosureUtils.ts","../src/components/AdMeshProductCard.tsx","../src/components/AdMeshEcommerceCards.tsx","../src/components/AdMeshSummaryLayout.tsx","../src/components/AdMeshLayout.tsx","../src/components/AdMeshInlineCard.tsx","../src/components/AdMeshBadge.tsx","../src/utils/themeUtils.ts","../src/index.ts"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return (type.displayName || \"Context\") + \".Provider\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(\n type,\n key,\n self,\n source,\n owner,\n props,\n debugStack,\n debugTask\n ) {\n self = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== self ? self : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n source,\n self,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n self,\n source,\n getOwner(),\n maybeKey,\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_ELEMENT_TYPE &&\n node._store &&\n (node._store.validated = 1);\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\n Symbol.for(\"react.provider\");\n var REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n \"react-stack-bottom-frame\": function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React[\"react-stack-bottom-frame\"].bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import React from 'react';\nimport { AdMeshRecommendation, AdMeshTheme } from '../types';\n\nexport interface AdMeshSummaryUnitProps {\n summaryText: string; // The citation_summary from backend response\n recommendations: AdMeshRecommendation[]; // Full recommendation objects\n theme?: AdMeshTheme;\n className?: string;\n style?: React.CSSProperties;\n onLinkClick?: (recommendation: AdMeshRecommendation) => void;\n}\n\n// Process summary text with markdown links [Product Name](admesh_link)\nconst processSummaryText = (summaryText: string, recommendations: AdMeshRecommendation[]) => {\n // Create lookup map for recommendations by admesh_link\n const linkToRecMap = new Map<string, AdMeshRecommendation>();\n recommendations.forEach(rec => {\n if (rec.admesh_link) {\n linkToRecMap.set(rec.admesh_link, rec);\n }\n });\n\n // Find markdown links and replace with JSX elements\n const markdownLinkRegex = /\\[([^\\]]+)\\]\\(([^)]+)\\)/g;\n const parts: (string | React.ReactElement)[] = [];\n let lastIndex = 0;\n let match;\n let linkCounter = 0;\n\n while ((match = markdownLinkRegex.exec(summaryText)) !== null) {\n const [fullMatch, linkText, url] = match;\n const recommendation = linkToRecMap.get(url);\n\n // Add text before the link\n if (match.index > lastIndex) {\n parts.push(summaryText.slice(lastIndex, match.index));\n }\n\n if (recommendation) {\n linkCounter++;\n // Create clickable link element\n parts.push(\n <a\n key={`summary-link-${linkCounter}`}\n href={recommendation.admesh_link}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 underline decoration-blue-600 dark:decoration-blue-400 hover:decoration-blue-800 dark:hover:decoration-blue-300 transition-colors duration-200 font-medium\"\n onClick={(e) => {\n // Log comprehensive click data\n console.log('AdMesh summary link clicked:', {\n adId: recommendation.ad_id,\n productId: recommendation.product_id,\n title: recommendation.title || recommendation.recommendation_title,\n brand: recommendation.brand,\n pricing: recommendation.pricing,\n admeshLink: recommendation.admesh_link,\n source: 'summary'\n });\n\n // Call external tracker if available\n if (typeof window !== 'undefined' && (window as any).admeshTracker) {\n (window as any).admeshTracker.trackClick({\n adId: recommendation.ad_id,\n productId: recommendation.product_id,\n admeshLink: recommendation.admesh_link,\n source: 'summary'\n });\n }\n }}\n >\n {linkText}\n </a>\n );\n } else {\n // Keep original text if no recommendation found\n console.warn(`[AdMesh Summary] No recommendation found for link: [${linkText}](${url})`);\n parts.push(fullMatch);\n }\n\n lastIndex = match.index + fullMatch.length;\n }\n\n // Add remaining text\n if (lastIndex < summaryText.length) {\n parts.push(summaryText.slice(lastIndex));\n }\n\n return parts;\n};\n\nexport const AdMeshSummaryUnit: React.FC<AdMeshSummaryUnitProps> = ({\n summaryText,\n recommendations,\n theme,\n className = '',\n style = {},\n onLinkClick\n}) => {\n // Validate inputs\n if (!summaryText || !summaryText.trim()) {\n console.warn('[AdMesh Summary] No summary text provided');\n return null;\n }\n\n if (!recommendations || recommendations.length === 0) {\n console.warn('[AdMesh Summary] No recommendations provided');\n return (\n <div className={`admesh-summary-unit ${className}`} style={style}>\n <p className=\"text-gray-700 dark:text-gray-300 leading-relaxed\">\n {summaryText}\n </p>\n </div>\n );\n }\n\n // Process the summary text to create clickable links\n const processedContent = processSummaryText(summaryText, recommendations);\n\n return (\n <div \n className={`admesh-summary-unit ${className}`}\n style={{\n fontFamily: theme?.fontFamily || '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n ...style\n }}\n >\n {/* Summary Content */}\n <div className=\"summary-content\">\n <p className=\"text-gray-700 dark:text-gray-300 leading-relaxed text-base\">\n {processedContent.map((part, index) => (\n <React.Fragment key={index}>{part}</React.Fragment>\n ))}\n </p>\n </div>\n\n {/* Disclosure */}\n <div className=\"mt-3 pt-2 border-t border-gray-200 dark:border-gray-700\">\n <p className=\"text-xs text-gray-500 dark:text-gray-400\">\n Partner Recommendation • Powered by AdMesh\n </p>\n </div>\n </div>\n );\n};\n\nexport default AdMeshSummaryUnit;\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import { useState, useCallback, useMemo } from 'react';\nimport type { TrackingData, UseAdMeshTrackerReturn } from '../types/index';\n\n// Default tracking endpoint - can be overridden via config\nconst DEFAULT_TRACKING_URL = 'https://api.useadmesh.com/track';\n\ninterface TrackingConfig {\n apiBaseUrl?: string;\n enabled?: boolean;\n debug?: boolean;\n retryAttempts?: number;\n retryDelay?: number;\n}\n\n// Global config that can be set by the consuming application\nlet globalConfig: TrackingConfig = {\n apiBaseUrl: DEFAULT_TRACKING_URL,\n enabled: true,\n debug: false,\n retryAttempts: 3,\n retryDelay: 1000\n};\n\nexport const setAdMeshTrackerConfig = (config: Partial<TrackingConfig>) => {\n globalConfig = { ...globalConfig, ...config };\n};\n\nexport const useAdMeshTracker = (config?: Partial<TrackingConfig>): UseAdMeshTrackerReturn => {\n const [isTracking, setIsTracking] = useState(false);\n const [error, setError] = useState<string | null>(null);\n\n const mergedConfig = useMemo(() => ({ ...globalConfig, ...config }), [config]);\n\n const log = useCallback((message: string, data?: unknown) => {\n if (mergedConfig.debug) {\n console.log(`[AdMesh Tracker] ${message}`, data);\n }\n }, [mergedConfig.debug]);\n\n const sendTrackingEvent = useCallback(async (\n eventType: 'click' | 'view' | 'conversion',\n data: TrackingData\n ): Promise<void> => {\n if (!mergedConfig.enabled) {\n log('Tracking disabled, skipping event', { eventType, data });\n return;\n }\n\n if (!data.adId || !data.admeshLink) {\n const errorMsg = 'Missing required tracking data: adId and admeshLink are required';\n log(errorMsg, data);\n setError(errorMsg);\n return;\n }\n\n setIsTracking(true);\n setError(null);\n\n const payload = {\n event_type: eventType,\n ad_id: data.adId,\n admesh_link: data.admeshLink,\n product_id: data.productId,\n user_id: data.userId,\n session_id: data.sessionId,\n revenue: data.revenue,\n conversion_type: data.conversionType,\n metadata: data.metadata,\n timestamp: new Date().toISOString(),\n user_agent: navigator.userAgent,\n referrer: document.referrer,\n page_url: window.location.href\n };\n\n log(`Sending ${eventType} event`, payload);\n\n let lastError: Error | null = null;\n \n for (let attempt = 1; attempt <= (mergedConfig.retryAttempts || 3); attempt++) {\n try {\n const response = await fetch(`${mergedConfig.apiBaseUrl}/events`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(payload),\n });\n\n if (!response.ok) {\n throw new Error(`HTTP ${response.status}: ${response.statusText}`);\n }\n\n const result = await response.json();\n log(`${eventType} event tracked successfully`, result);\n setIsTracking(false);\n return;\n\n } catch (err) {\n lastError = err as Error;\n log(`Attempt ${attempt} failed for ${eventType} event`, err);\n \n if (attempt < (mergedConfig.retryAttempts || 3)) {\n await new Promise(resolve => \n setTimeout(resolve, (mergedConfig.retryDelay || 1000) * attempt)\n );\n }\n }\n }\n\n // All attempts failed\n const errorMsg = `Failed to track ${eventType} event after ${mergedConfig.retryAttempts} attempts: ${lastError?.message}`;\n log(errorMsg, lastError);\n setError(errorMsg);\n setIsTracking(false);\n }, [mergedConfig, log]);\n\n const trackClick = useCallback(async (data: TrackingData): Promise<void> => {\n return sendTrackingEvent('click', data);\n }, [sendTrackingEvent]);\n\n const trackView = useCallback(async (data: TrackingData): Promise<void> => {\n return sendTrackingEvent('view', data);\n }, [sendTrackingEvent]);\n\n const trackConversion = useCallback(async (data: TrackingData): Promise<void> => {\n if (!data.revenue && !data.conversionType) {\n log('Warning: Conversion tracking without revenue or conversion type', data);\n }\n return sendTrackingEvent('conversion', data);\n }, [sendTrackingEvent, log]);\n\n return {\n trackClick,\n trackView,\n trackConversion,\n isTracking,\n error\n };\n};\n\n// Utility function to build admesh_link with tracking parameters\nexport const buildAdMeshLink = (\n baseLink: string, \n adId: string, \n additionalParams?: Record<string, string>\n): string => {\n try {\n const url = new URL(baseLink);\n url.searchParams.set('ad_id', adId);\n url.searchParams.set('utm_source', 'admesh');\n url.searchParams.set('utm_medium', 'recommendation');\n \n if (additionalParams) {\n Object.entries(additionalParams).forEach(([key, value]) => {\n url.searchParams.set(key, value);\n });\n }\n \n return url.toString();\n } catch (err) {\n console.warn('[AdMesh] Invalid URL provided to buildAdMeshLink:', baseLink, err);\n return baseLink;\n }\n};\n\n// Helper function to extract tracking data from recommendation\nexport const extractTrackingData = (\n recommendation: { ad_id: string; admesh_link: string; product_id: string },\n additionalData?: Partial<TrackingData>\n): TrackingData => {\n return {\n adId: recommendation.ad_id,\n admeshLink: recommendation.admesh_link,\n productId: recommendation.product_id,\n ...additionalData\n };\n};\n","import React, { useCallback, useEffect, useRef } from 'react';\nimport type { AdMeshLinkTrackerProps } from '../types/index';\nimport { useAdMeshTracker } from '../hooks/useAdMeshTracker';\n\nexport const AdMeshLinkTracker: React.FC<AdMeshLinkTrackerProps> = ({\n adId,\n admeshLink,\n productId,\n children,\n trackingData,\n className,\n style\n}) => {\n const { trackClick, trackView } = useAdMeshTracker();\n const elementRef = useRef<HTMLDivElement>(null);\n const hasTrackedView = useRef(false);\n\n // Track view when component becomes visible\n useEffect(() => {\n if (!elementRef.current || hasTrackedView.current) return;\n\n const observer = new IntersectionObserver(\n (entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting && !hasTrackedView.current) {\n hasTrackedView.current = true;\n trackView({\n adId,\n admeshLink,\n productId,\n ...trackingData\n }).catch(console.error);\n }\n });\n },\n {\n threshold: 0.5, // Track when 50% of the element is visible\n rootMargin: '0px'\n }\n );\n\n observer.observe(elementRef.current);\n\n return () => {\n observer.disconnect();\n };\n }, [adId, admeshLink, productId, trackingData, trackView]);\n\n const handleClick = useCallback(async (event: React.MouseEvent) => {\n // Track the click\n try {\n await trackClick({\n adId,\n admeshLink,\n productId,\n ...trackingData\n });\n } catch (error) {\n console.error('Failed to track click:', error);\n }\n\n\n\n // If the children contain a link, let the browser handle navigation\n // Otherwise, navigate programmatically\n const target = event.target as HTMLElement;\n const link = target.closest('a');\n \n if (!link) {\n // No link found, navigate programmatically\n window.open(admeshLink, '_blank', 'noopener,noreferrer');\n }\n // If there's a link, let the browser handle it naturally\n }, [adId, admeshLink, productId, trackingData, trackClick]);\n\n return (\n <div\n ref={elementRef}\n className={className}\n onClick={handleClick}\n style={{\n cursor: 'pointer',\n ...style\n }}\n >\n {children}\n </div>\n );\n};\n\nAdMeshLinkTracker.displayName = 'AdMeshLinkTracker';\n","import { useEffect } from 'react';\n\n// Complete CSS content as a string - this will be injected automatically\nconst ADMESH_STYLES = `\n/* AdMesh UI SDK - Complete Self-Contained Styles */\n\n/* CSS Reset for AdMesh components */\n.admesh-component, .admesh-component * {\n box-sizing: border-box;\n}\n\n/* CSS Variables */\n.admesh-component {\n --admesh-primary: #6366f1;\n --admesh-primary-hover: #4f46e5;\n --admesh-secondary: #8b5cf6;\n --admesh-accent: #06b6d4;\n --admesh-background: #ffffff;\n --admesh-surface: #ffffff;\n --admesh-border: #e2e8f0;\n --admesh-text: #0f172a;\n --admesh-text-muted: #64748b;\n --admesh-text-light: #94a3b8;\n --admesh-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --admesh-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n --admesh-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --admesh-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --admesh-radius: 0.75rem;\n --admesh-radius-sm: 0.375rem;\n --admesh-radius-lg: 1rem;\n --admesh-radius-xl: 1.5rem;\n}\n\n.admesh-component[data-admesh-theme=\"dark\"] {\n --admesh-background: #111827;\n --admesh-surface: #1f2937;\n --admesh-border: #374151;\n --admesh-text: #f9fafb;\n --admesh-text-muted: #9ca3af;\n --admesh-text-light: #6b7280;\n --admesh-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);\n --admesh-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);\n --admesh-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);\n --admesh-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);\n}\n\n/* Layout Styles */\n.admesh-layout {\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n color: var(--admesh-text);\n background-color: var(--admesh-background);\n border-radius: var(--admesh-radius);\n padding: 1.5rem;\n box-shadow: var(--admesh-shadow);\n border: 1px solid var(--admesh-border);\n /* Consistent width: 100% for all layouts except ecommerce */\n width: 100%;\n}\n\n/* Ecommerce layout exception */\n.admesh-layout--ecommerce {\n width: auto;\n}\n\n/* Citation Unit Styles */\n.admesh-citation-unit {\n width: 100%;\n}\n\n/* Inline Recommendation Styles */\n.admesh-inline-recommendation {\n width: 100%;\n}\n\n/* Simple Ad Styles */\n.admesh-simple-ad {\n width: 100%;\n}\n\n.admesh-layout__header {\n margin-bottom: 1.5rem;\n text-align: center;\n}\n\n.admesh-layout__title {\n font-size: 1.25rem;\n font-weight: 600;\n color: var(--admesh-text);\n margin-bottom: 0.5rem;\n}\n\n.admesh-layout__subtitle {\n font-size: 0.875rem;\n color: var(--admesh-text-muted);\n}\n\n.admesh-layout__cards-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 1rem;\n margin-bottom: 1.5rem;\n}\n\n.admesh-layout__more-indicator {\n text-align: center;\n padding: 1rem;\n color: var(--admesh-text-muted);\n font-size: 0.875rem;\n}\n\n.admesh-layout__empty {\n text-align: center;\n padding: 3rem 1rem;\n}\n\n.admesh-layout__empty-content h3 {\n font-size: 1.125rem;\n font-weight: 600;\n color: var(--admesh-text-muted);\n margin-bottom: 0.5rem;\n}\n\n.admesh-layout__empty-content p {\n font-size: 0.875rem;\n color: var(--admesh-text-muted);\n}\n\n/* Product Card Styles */\n.admesh-product-card {\n background-color: var(--admesh-surface);\n border: 1px solid var(--admesh-border);\n border-radius: var(--admesh-radius);\n padding: 1.5rem;\n transition: all 0.2s ease-in-out;\n position: relative;\n overflow: hidden;\n /* Consistent width: 100% for product cards */\n width: 100%;\n}\n\n.admesh-product-card:hover {\n box-shadow: var(--admesh-shadow-lg);\n transform: translateY(-2px);\n border-color: var(--admesh-primary);\n}\n\n.admesh-product-card__header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 1rem;\n}\n\n.admesh-product-card__title {\n font-size: 1.125rem;\n font-weight: 600;\n color: var(--admesh-text);\n margin-bottom: 0.5rem;\n line-height: 1.4;\n}\n\n.admesh-product-card__reason {\n font-size: 0.875rem;\n color: var(--admesh-text-muted);\n line-height: 1.5;\n margin-bottom: 1rem;\n}\n\n.admesh-product-card__match-score {\n margin-bottom: 1rem;\n}\n\n.admesh-product-card__match-score-label {\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 0.75rem;\n color: var(--admesh-text-muted);\n margin-bottom: 0.25rem;\n}\n\n.admesh-product-card__match-score-bar {\n width: 100%;\n height: 0.375rem;\n background-color: var(--admesh-border);\n border-radius: var(--admesh-radius-sm);\n overflow: hidden;\n}\n\n.admesh-product-card__match-score-fill {\n height: 100%;\n background: linear-gradient(90deg, var(--admesh-primary), #8b5cf6);\n border-radius: var(--admesh-radius-sm);\n transition: width 0.3s ease-in-out;\n}\n\n.admesh-product-card__badges {\n display: flex;\n flex-wrap: wrap;\n gap: 0.5rem;\n margin-bottom: 1rem;\n}\n\n.admesh-product-card__badge {\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n padding: 0.25rem 0.5rem;\n background-color: var(--admesh-primary);\n color: white;\n font-size: 0.75rem;\n font-weight: 500;\n border-radius: var(--admesh-radius-sm);\n}\n\n.admesh-product-card__badge--secondary {\n background-color: var(--admesh-secondary);\n}\n\n.admesh-product-card__keywords {\n display: flex;\n flex-wrap: wrap;\n gap: 0.25rem;\n margin-bottom: 1rem;\n}\n\n.admesh-product-card__keyword {\n padding: 0.125rem 0.375rem;\n background-color: var(--admesh-border);\n color: var(--admesh-text-muted);\n font-size: 0.75rem;\n border-radius: var(--admesh-radius-sm);\n}\n\n/* Dark mode specific enhancements */\n.admesh-component[data-admesh-theme=\"dark\"] .admesh-product-card__keyword {\n background-color: #4b5563;\n color: #d1d5db;\n}\n\n.admesh-component[data-admesh-theme=\"dark\"] .admesh-product-card:hover {\n border-color: var(--admesh-primary);\n background-color: #374151;\n}\n\n.admesh-component[data-admesh-theme=\"dark\"] .admesh-product-card__button:hover {\n background: linear-gradient(90deg, var(--admesh-primary-hover), var(--admesh-primary));\n}\n\n.admesh-product-card__footer {\n display: flex;\n justify-content: flex-end;\n margin-top: 1.5rem;\n}\n\n/* Mobile-specific sidebar improvements */\n@media (max-width: 640px) {\n .admesh-sidebar {\n /* Ensure proper mobile viewport handling */\n height: 100vh !important;\n height: 100dvh !important; /* Dynamic viewport height for mobile browsers */\n max-height: 100vh !important;\n max-height: 100dvh !important;\n width: 100vw !important;\n max-width: 90vw !important;\n overflow: hidden !important;\n }\n\n .admesh-sidebar.relative {\n height: 100% !important;\n width: 100% !important;\n max-width: 100% !important;\n }\n\n /* Improve touch scrolling */\n .admesh-sidebar .overflow-y-auto {\n -webkit-overflow-scrolling: touch !important;\n overscroll-behavior: contain !important;\n scroll-behavior: smooth !important;\n }\n\n /* Prevent body scroll when sidebar is open */\n body:has(.admesh-sidebar[data-mobile-open=\"true\"]) {\n overflow: hidden !important;\n position: fixed !important;\n width: 100% !important;\n }\n}\n\n/* Tablet improvements */\n@media (min-width: 641px) and (max-width: 1024px) {\n .admesh-sidebar {\n max-width: 400px !important;\n }\n}\n\n/* Mobile responsiveness improvements for all components */\n@media (max-width: 640px) {\n /* Product cards mobile optimization */\n .admesh-card {\n padding: 0.75rem !important;\n margin-bottom: 0.75rem !important;\n }\n\n /* Inline recommendations mobile optimization */\n .admesh-inline-recommendation {\n padding: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n /* Conversation summary mobile optimization */\n .admesh-conversation-summary {\n padding: 1rem !important;\n }\n\n /* Percentage text mobile improvements */\n .admesh-component .text-xs {\n font-size: 0.75rem !important;\n line-height: 1rem !important;\n }\n\n .admesh-component .text-sm {\n font-size: 0.875rem !important;\n line-height: 1.25rem !important;\n }\n\n /* Button mobile improvements */\n .admesh-component button {\n padding: 0.375rem 0.75rem !important;\n font-size: 0.75rem !important;\n min-height: 2rem !important;\n touch-action: manipulation !important;\n }\n\n /* Badge mobile improvements */\n .admesh-component .rounded-full {\n padding: 0.25rem 0.5rem !important;\n font-size: 0.625rem !important;\n line-height: 1rem !important;\n }\n\n /* Progress bar mobile improvements */\n .admesh-component .bg-gray-200,\n .admesh-component .bg-slate-600 {\n height: 0.25rem !important;\n }\n\n /* Flex layout mobile improvements */\n .admesh-component .flex {\n flex-wrap: wrap !important;\n }\n\n .admesh-component .gap-2 {\n gap: 0.375rem !important;\n }\n\n .admesh-component .gap-3 {\n gap: 0.5rem !important;\n }\n}\n\n.admesh-product-card__button {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.75rem 1.5rem;\n background: linear-gradient(90deg, var(--admesh-primary), var(--admesh-primary-hover));\n color: white;\n font-size: 0.875rem;\n font-weight: 500;\n border: none;\n border-radius: var(--admesh-radius);\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n text-decoration: none;\n}\n\n.admesh-product-card__button:hover {\n transform: translateY(-1px);\n box-shadow: var(--admesh-shadow-lg);\n}\n\n/* Utility Classes */\n.admesh-text-xs { font-size: 0.75rem; }\n.admesh-text-sm { font-size: 0.875rem; }\n.admesh-text-base { font-size: 1rem; }\n.admesh-text-lg { font-size: 1.125rem; }\n.admesh-text-xl { font-size: 1.25rem; }\n\n.admesh-font-medium { font-weight: 500; }\n.admesh-font-semibold { font-weight: 600; }\n.admesh-font-bold { font-weight: 700; }\n\n.admesh-text-muted { color: var(--admesh-text-muted); }\n\n/* Comparison Table Styles */\n.admesh-compare-table {\n width: 100%;\n border-collapse: collapse;\n background-color: var(--admesh-surface);\n border: 1px solid var(--admesh-border);\n border-radius: var(--admesh-radius);\n overflow: hidden;\n}\n\n.admesh-compare-table th,\n.admesh-compare-table td {\n padding: 0.75rem;\n text-align: left;\n border-bottom: 1px solid var(--admesh-border);\n}\n\n.admesh-compare-table th {\n background-color: var(--admesh-background);\n font-weight: 600;\n color: var(--admesh-text);\n font-size: 0.875rem;\n}\n\n.admesh-compare-table td {\n color: var(--admesh-text);\n font-size: 0.875rem;\n}\n\n.admesh-compare-table tr:hover {\n background-color: var(--admesh-border);\n}\n\n/* Dark mode table enhancements */\n.admesh-component[data-admesh-theme=\"dark\"] .admesh-compare-table th {\n background-color: #374151;\n}\n\n.admesh-component[data-admesh-theme=\"dark\"] .admesh-compare-table tr:hover {\n background-color: #4b5563;\n}\n\n/* Responsive Design */\n@media (max-width: 768px) {\n .admesh-layout {\n padding: 1rem;\n }\n\n .admesh-layout__cards-grid {\n grid-template-columns: 1fr;\n gap: 0.75rem;\n }\n\n .admesh-product-card {\n padding: 1rem;\n }\n\n .admesh-compare-table {\n font-size: 0.75rem;\n }\n\n .admesh-compare-table th,\n .admesh-compare-table td {\n padding: 0.5rem;\n }\n}\n\n/* Essential Utility Classes for Self-Contained SDK - High Specificity */\n.admesh-component .relative { position: relative !important; }\n.admesh-component .absolute { position: absolute !important; }\n.admesh-component .flex { display: flex !important; }\n.admesh-component .inline-flex { display: inline-flex !important; }\n.admesh-component .grid { display: grid !important; }\n.admesh-component .hidden { display: none !important; }\n.admesh-component .block { display: block !important; }\n.admesh-component .inline-block { display: inline-block !important; }\n\n/* Flexbox utilities */\n.admesh-component .flex-col { flex-direction: column !important; }\n.admesh-component .flex-row { flex-direction: row !important; }\n.admesh-component .flex-wrap { flex-wrap: wrap !important; }\n.admesh-component .items-center { align-items: center !important; }\n.admesh-component .items-start { align-items: flex-start !important; }\n.admesh-component .items-end { align-items: flex-end !important; }\n.admesh-component .justify-center { justify-content: center !important; }\n.admesh-component .justify-between { justify-content: space-between !important; }\n.admesh-component .justify-end { justify-content: flex-end !important; }\n.admesh-component .flex-1 { flex: 1 1 0% !important; }\n.admesh-component .flex-shrink-0 { flex-shrink: 0 !important; }\n\n/* Grid utilities */\n.admesh-component .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }\n.admesh-component .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n.admesh-component .grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n\n/* Spacing utilities */\n.admesh-component .gap-1 { gap: 0.25rem; }\n.admesh-component .gap-2 { gap: 0.5rem; }\n.admesh-component .gap-3 { gap: 0.75rem; }\n.admesh-component .gap-4 { gap: 1rem; }\n.admesh-component .gap-6 { gap: 1.5rem; }\n.admesh-component .gap-8 { gap: 2rem; }\n\n/* Padding utilities */\n.admesh-component .p-1 { padding: 0.25rem; }\n.admesh-component .p-2 { padding: 0.5rem; }\n.admesh-component .p-3 { padding: 0.75rem; }\n.admesh-component .p-4 { padding: 1rem; }\n.admesh-component .p-5 { padding: 1.25rem; }\n.admesh-component .p-6 { padding: 1.5rem; }\n.admesh-component .px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }\n.admesh-component .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }\n.admesh-component .px-4 { padding-left: 1rem; padding-right: 1rem; }\n.admesh-component .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }\n.admesh-component .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }\n.admesh-component .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }\n.admesh-component .pt-2 { padding-top: 0.5rem; }\n.admesh-component .pt-3 { padding-top: 0.75rem; }\n.admesh-component .pb-2 { padding-bottom: 0.5rem; }\n.admesh-component .pb-3 { padding-bottom: 0.75rem; }\n\n/* Margin utilities */\n.admesh-component .m-0 { margin: 0; }\n.admesh-component .mb-1 { margin-bottom: 0.25rem; }\n.admesh-component .mb-2 { margin-bottom: 0.5rem; }\n.admesh-component .mb-3 { margin-bottom: 0.75rem; }\n.admesh-component .mb-4 { margin-bottom: 1rem; }\n.admesh-component .mb-6 { margin-bottom: 1.5rem; }\n.admesh-component .mt-1 { margin-top: 0.25rem; }\n.admesh-component .mt-2 { margin-top: 0.5rem; }\n.admesh-component .mt-4 { margin-top: 1rem; }\n.admesh-component .mt-6 { margin-top: 1.5rem; }\n.admesh-component .mt-auto { margin-top: auto; }\n.admesh-component .ml-1 { margin-left: 0.25rem; }\n.admesh-component .mr-1 { margin-right: 0.25rem; }\n.admesh-component .mr-2 { margin-right: 0.5rem; }\n\n/* Width and height utilities */\n.admesh-component .w-2 { width: 0.5rem; }\n.admesh-component .w-3 { width: 0.75rem; }\n.admesh-component .w-4 { width: 1rem; }\n.admesh-component .w-5 { width: 1.25rem; }\n.admesh-component .w-6 { width: 1.5rem; }\n.admesh-component .w-full { width: 100%; }\n.admesh-component .w-fit { width: fit-content; }\n.admesh-component .h-2 { height: 0.5rem; }\n.admesh-component .h-3 { height: 0.75rem; }\n.admesh-component .h-4 { height: 1rem; }\n.admesh-component .h-5 { height: 1.25rem; }\n.admesh-component .h-6 { height: 1.5rem; }\n.admesh-component .h-full { height: 100%; }\n.admesh-component .min-w-0 { min-width: 0px; }\n\n/* Border utilities */\n.admesh-component .border { border-width: 1px; }\n.admesh-component .border-t { border-top-width: 1px; }\n.admesh-component .border-gray-100 { border-color: #f3f4f6; }\n.admesh-component .border-gray-200 { border-color: #e5e7eb; }\n.admesh-component .border-gray-300 { border-color: #d1d5db; }\n.admesh-component .border-blue-200 { border-color: #bfdbfe; }\n.admesh-component .border-green-200 { border-color: #bbf7d0; }\n\n/* Border radius utilities */\n.admesh-component .rounded { border-radius: 0.25rem !important; }\n.admesh-component .rounded-md { border-radius: 0.375rem !important; }\n.admesh-component .rounded-lg { border-radius: 0.5rem !important; }\n.admesh-component .rounded-xl { border-radius: 0.75rem !important; }\n.admesh-component .rounded-full { border-radius: 9999px !important; }\n\n/* Background utilities */\n.admesh-component .bg-white { background-color: #ffffff; }\n.admesh-component .bg-gray-50 { background-color: #f9fafb; }\n.admesh-component .bg-gray-100 { background-color: #f3f4f6; }\n.admesh-component .bg-blue-50 { background-color: #eff6ff; }\n.admesh-component .bg-blue-100 { background-color: #dbeafe; }\n.admesh-component .bg-green-100 { background-color: #dcfce7; }\n.admesh-component .bg-green-500 { background-color: #22c55e; }\n.admesh-component .bg-blue-500 { background-color: #3b82f6; }\n\n/* Gradients */\n.admesh-component .bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }\n.admesh-component .bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }\n.admesh-component .from-white { --tw-gradient-from: #ffffff; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 255, 255, 0)); }\n.admesh-component .to-gray-50 { --tw-gradient-to: #f9fafb; }\n.admesh-component .from-purple-500 { --tw-gradient-from: #a855f7; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(168, 85, 247, 0)); }\n.admesh-component .to-pink-500 { --tw-gradient-to: #ec4899; }\n.admesh-component .from-green-400 { --tw-gradient-from: #4ade80; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(74, 222, 128, 0)); }\n.admesh-component .to-blue-500 { --tw-gradient-to: #3b82f6; }\n\n/* Text utilities */\n.admesh-component .text-xs { font-size: 0.75rem; line-height: 1rem; }\n.admesh-component .text-sm { font-size: 0.875rem; line-height: 1.25rem; }\n.admesh-component .text-base { font-size: 1rem; line-height: 1.5rem; }\n.admesh-component .text-lg { font-size: 1.125rem; line-height: 1.75rem; }\n.admesh-component .text-xl { font-size: 1.25rem; line-height: 1.75rem; }\n.admesh-component .font-medium { font-weight: 500; }\n.admesh-component .font-semibold { font-weight: 600; }\n.admesh-component .font-bold { font-weight: 700; }\n.admesh-component .leading-relaxed { line-height: 1.625; }\n\n/* Text colors */\n.admesh-component .text-white { color: #ffffff; }\n.admesh-component .text-gray-400 { color: #9ca3af; }\n.admesh-component .text-gray-500 { color: #6b7280; }\n.admesh-component .text-gray-600 { color: #4b5563; }\n.admesh-component .text-gray-700 { color: #374151; }\n.admesh-component .text-gray-800 { color: #1f2937; }\n.admesh-component .text-blue-600 { color: #2563eb; }\n.admesh-component .text-blue-700 { color: #1d4ed8; }\n.admesh-component .text-green-700 { color: #15803d; }\n\n/* Shadow utilities */\n.admesh-component .shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }\n.admesh-component .shadow { box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); }\n.admesh-component .shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }\n.admesh-component .shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }\n.admesh-component .shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }\n\n/* Transition utilities */\n.admesh-component .transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }\n.admesh-component .transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }\n.admesh-component .duration-200 { transition-duration: 200ms; }\n.admesh-component .duration-300 { transition-duration: 300ms; }\n\n/* Transform utilities */\n.admesh-component .hover\\\\:-translate-y-1:hover { transform: translateY(-0.25rem); }\n.admesh-component .hover\\\\:scale-105:hover { transform: scale(1.05); }\n\n/* Hover utilities */\n.admesh-component .hover\\\\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }\n.admesh-component .hover\\\\:bg-gray-100:hover { background-color: #f3f4f6; }\n.admesh-component .hover\\\\:text-blue-800:hover { color: #1e40af; }\n\n/* Cursor utilities */\n.admesh-component .cursor-pointer { cursor: pointer; }\n\n/* Overflow utilities */\n.admesh-component .overflow-hidden { overflow: hidden; }\n.admesh-component .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n\n/* Text decoration */\n.admesh-component .underline { text-decoration-line: underline; }\n\n/* Whitespace */\n.admesh-component .whitespace-nowrap { white-space: nowrap; }\n\n/* Dark mode utilities */\n@media (prefers-color-scheme: dark) {\n .admesh-component .dark\\\\:bg-slate-800 { background-color: #1e293b; }\n .admesh-component .dark\\\\:bg-slate-900 { background-color: #0f172a; }\n .admesh-component .dark\\\\:border-slate-700 { border-color: #334155; }\n .admesh-component .dark\\\\:text-white { color: #ffffff; }\n .admesh-component .dark\\\\:text-gray-200 { color: #e5e7eb; }\n .admesh-component .dark\\\\:text-gray-300 { color: #d1d5db; }\n .admesh-component .dark\\\\:text-gray-400 { color: #9ca3af; }\n .admesh-component .dark\\\\:text-blue-400 { color: #60a5fa; }\n}\n\n/* Responsive utilities */\n@media (min-width: 640px) {\n .admesh-component .sm\\\\:p-5 { padding: 1.25rem; }\n .admesh-component .sm\\\\:text-base { font-size: 1rem; line-height: 1.5rem; }\n .admesh-component .sm\\\\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }\n .admesh-component .sm\\\\:flex-row { flex-direction: row; }\n .admesh-component .sm\\\\:items-center { align-items: center; }\n .admesh-component .sm\\\\:justify-between { justify-content: space-between; }\n}\n\n@media (min-width: 768px) {\n .admesh-component .md\\\\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n}\n\n@media (min-width: 1024px) {\n .admesh-component .lg\\\\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n .admesh-component .lg\\\\:col-span-1 { grid-column: span 1 / span 1; }\n}\n`;\n\nlet stylesInjected = false;\n\nexport const useAdMeshStyles = () => {\n useEffect(() => {\n if (stylesInjected) return;\n\n // Create and inject styles\n const styleElement = document.createElement('style');\n styleElement.id = 'admesh-ui-sdk-styles';\n styleElement.textContent = ADMESH_STYLES;\n \n // Check if styles are already injected\n if (!document.getElementById('admesh-ui-sdk-styles')) {\n document.head.appendChild(styleElement);\n stylesInjected = true;\n }\n\n // Cleanup function\n return () => {\n const existingStyle = document.getElementById('admesh-ui-sdk-styles');\n if (existingStyle && document.head.contains(existingStyle)) {\n document.head.removeChild(existingStyle);\n stylesInjected = false;\n }\n };\n }, []);\n};\n","import type { AdMeshRecommendation } from '../types/index';\n\n/**\n * Utility functions for generating compliant disclosure labels and tooltips\n */\n\nexport interface DisclosureConfig {\n showTooltips?: boolean;\n compactMode?: boolean;\n customLabels?: {\n partnerRecommendation?: string;\n partnerMatch?: string;\n promotedOption?: string;\n relatedOption?: string;\n };\n}\n\n/**\n * Generate appropriate label based on match score and recommendation quality\n */\nexport const getRecommendationLabel = (\n recommendation: AdMeshRecommendation,\n config: DisclosureConfig = {}\n): string => {\n const matchScore = recommendation.intent_match_score || 0;\n const customLabels = config.customLabels || {};\n\n // High match score (>0.8)\n if (matchScore >= 0.8) {\n return customLabels.partnerRecommendation || 'Partner Recommendation';\n }\n \n // Medium match score (0.6-0.8)\n if (matchScore >= 0.6) {\n return customLabels.partnerMatch || 'Partner Match';\n }\n \n // Lower match score (<0.6)\n if (matchScore >= 0.3) {\n return customLabels.promotedOption || 'Promoted';\n }\n \n // Very low match - related option\n return customLabels.relatedOption || 'Related';\n};\n\n/**\n * Generate tooltip text for recommendation labels\n */\nexport const getLabelTooltip = (\n recommendation: AdMeshRecommendation,\n _label: string\n): string => {\n const matchScore = recommendation.intent_match_score || 0;\n\n if (matchScore >= 0.8) {\n return \"This recommendation is from a partner who compensates us when you engage. We've matched it to your needs based on your query.\";\n }\n \n if (matchScore >= 0.6) {\n return \"Top-rated partner solution matched to your specific requirements. Partner compensates us for qualified referrals.\";\n }\n \n if (matchScore >= 0.3) {\n return \"This partner solution may be relevant to your needs. The partner compensates us when you take qualifying actions.\";\n }\n \n return \"This solution is somewhat related to your query. While not a perfect match, it might still be helpful. This partner compensates us for qualified referrals.\";\n};\n\n/**\n * Generate section-level disclosure text\n */\nexport const getSectionDisclosure = (\n hasHighMatches: boolean = true,\n isExpanded: boolean = false\n): string => {\n if (!hasHighMatches) {\n return \"Expanded Results: While these don't perfectly match your query, they're related solutions from our partner network. All partners compensate us for referrals.\";\n }\n \n if (isExpanded) {\n return \"These curated recommendations are from partners who compensate us for referrals.\";\n }\n \n return \"Personalized Partner Recommendations: All results are from vetted partners who compensate us for qualified matches. We've ranked them based on relevance to your specific needs.\";\n};\n\n/**\n * Generate inline disclosure text for product cards\n */\nexport const getInlineDisclosure = (\n recommendation: AdMeshRecommendation,\n compact: boolean = false\n): string => {\n const matchScore = recommendation.intent_match_score || 0;\n\n if (compact) {\n return \"Promoted\";\n }\n\n if (matchScore >= 0.8) {\n return \"Smart Recommendation\";\n }\n\n if (matchScore >= 0.6) {\n return \"Partner Match\";\n }\n\n return \"Promoted\";\n};\n\n/**\n * Generate detailed tooltip for inline disclosures\n */\nexport const getInlineTooltip = (): string => {\n return \"We've partnered with trusted providers to bring you relevant solutions. These partners compensate us for qualified referrals, which helps us keep our service free.\";\n};\n\n/**\n * Generate badge text without emojis\n */\nexport const getBadgeText = (badgeType: string): string => {\n const badgeMap: Record<string, string> = {\n 'Top Match': 'Top Match',\n 'Partner Recommendation': 'Partner Recommendation',\n 'Perfect Fit': 'Perfect Fit',\n 'Great Match': 'Great Match',\n 'Recommended': 'Recommended',\n 'Good Fit': 'Good Fit',\n 'Featured': 'Featured',\n 'Popular Choice': 'Popular Choice',\n 'Premium Pick': 'Premium Pick',\n 'Free Tier': 'Free Tier',\n 'AI Powered': 'AI Powered',\n 'Popular': 'Popular',\n 'New': 'New',\n 'Trial Available': 'Trial Available',\n 'Related Option': 'Related Option',\n 'Alternative Solution': 'Alternative Solution',\n 'Expanded Match': 'Expanded Match'\n };\n \n return badgeMap[badgeType] || badgeType;\n};\n\n/**\n * Generate appropriate CTA text\n */\nexport const getCtaText = (\n recommendation: AdMeshRecommendation,\n context: 'button' | 'link' = 'button'\n): string => {\n const productName = recommendation.recommendation_title || recommendation.title;\n \n if (context === 'link') {\n return productName;\n }\n \n // For buttons, use action-oriented text\n if (recommendation.trial_days && recommendation.trial_days > 0) {\n return `Try ${productName}`;\n }\n\n return `Learn More`;\n};\n\n/**\n * Check if recommendations have high match scores\n */\nexport const hasHighQualityMatches = (recommendations: AdMeshRecommendation[]): boolean => {\n return recommendations.some(rec => (rec.intent_match_score || 0) >= 0.8);\n};\n\n/**\n * Generate compliant powered-by text\n */\nexport const getPoweredByText = (compact: boolean = false): string => {\n if (compact) {\n return \"Powered by AdMesh\";\n }\n \n return \"Recommendations powered by AdMesh\";\n};\n","import React, { useMemo, useState } from 'react';\nimport classNames from 'classnames';\nimport type { AdMeshProductCardProps, BadgeType } from '../types/index';\nimport { AdMeshLinkTracker } from './AdMeshLinkTracker';\nimport { useAdMeshStyles } from '../hooks/useAdMeshStyles';\nimport {\n getRecommendationLabel,\n getLabelTooltip,\n getBadgeText\n} from '../utils/disclosureUtils';\n\nexport const AdMeshProductCard: React.FC<AdMeshProductCardProps> = ({\n recommendation,\n theme,\n showMatchScore = false, // Deprecated - Match Score removed from UI\n showBadges = true,\n variation = 'default',\n expandable = false,\n className,\n style\n}) => {\n // Inject styles automatically\n useAdMeshStyles();\n\n // State for expandable variations\n const [isExpanded, setIsExpanded] = useState(false);\n // Generate badges based on recommendation data using compliant labels\n const badges = useMemo((): BadgeType[] => {\n const generatedBadges: BadgeType[] = [];\n\n // Add primary recommendation label based on match score\n const primaryLabel = getRecommendationLabel(recommendation);\n if (primaryLabel === 'Partner Recommendation') {\n generatedBadges.push('Top Match'); // Map to existing badge type\n }\n\n // Add Trial Available badge\n if (recommendation.trial_days && recommendation.trial_days > 0) {\n generatedBadges.push('Trial Available');\n }\n\n // Add AI Powered badge (check if AI-related keywords exist)\n const aiKeywords = ['ai', 'artificial intelligence', 'machine learning', 'ml', 'automation'];\n const hasAIKeywords = recommendation.keywords?.some(keyword =>\n aiKeywords.some(ai => keyword.toLowerCase().includes(ai))\n ) || recommendation.title.toLowerCase().includes('ai');\n\n if (hasAIKeywords) {\n generatedBadges.push('AI Powered');\n }\n\n // Add badges from the response if available\n if (recommendation.badges && recommendation.badges.length > 0) {\n recommendation.badges.forEach(badge => {\n // Only add if it's a valid BadgeType and not already included\n if (['Top Match', 'Free Tier', 'AI Powered', 'Popular', 'New', 'Trial Available'].includes(badge) &&\n !generatedBadges.includes(badge as BadgeType)) {\n generatedBadges.push(badge as BadgeType);\n }\n });\n }\n\n // Note: is_open_source field has been removed\n\n return generatedBadges;\n }, [recommendation]);\n\n // Disclosure removed - only layout component shows disclosures\n\n // Format match score as percentage\n const matchScorePercentage = Math.round(recommendation.intent_match_score * 100);\n\n // Get content based on variation\n const getVariationContent = () => {\n if (variation === 'simple') {\n return {\n title: recommendation.recommendation_title || recommendation.title,\n description: recommendation.recommendation_description || recommendation.description || recommendation.reason,\n ctaText: recommendation.recommendation_title || recommendation.title,\n isSimple: true\n };\n\n } else {\n // Default variation\n return {\n title: recommendation.recommendation_title || recommendation.title,\n description: recommendation.recommendation_description || recommendation.description || recommendation.reason,\n ctaText: recommendation.recommendation_title || recommendation.title\n };\n }\n };\n\n const content = getVariationContent();\n\n const cardClasses = classNames(\n 'admesh-component',\n 'admesh-card',\n 'relative p-4 sm:p-5 rounded-xl bg-gradient-to-br from-white to-gray-50 dark:from-slate-800 dark:to-slate-900 border border-gray-200/50 dark:border-slate-700/50 shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-1',\n className\n );\n\n const cardStyle = theme ? {\n '--admesh-primary': theme.primaryColor || theme.accentColor || '#3b82f6',\n '--admesh-secondary': theme.secondaryColor || '#10b981',\n '--admesh-accent': theme.accentColor || '#3b82f6',\n '--admesh-background': theme.backgroundColor,\n '--admesh-surface': theme.surfaceColor,\n '--admesh-border': theme.borderColor,\n '--admesh-text': theme.textColor,\n '--admesh-text-secondary': theme.textSecondaryColor,\n '--admesh-radius': theme.borderRadius || '12px',\n '--admesh-shadow-sm': theme.shadows?.small,\n '--admesh-shadow-md': theme.shadows?.medium,\n '--admesh-shadow-lg': theme.shadows?.large,\n '--admesh-spacing-sm': theme.spacing?.small,\n '--admesh-spacing-md': theme.spacing?.medium,\n '--admesh-spacing-lg': theme.spacing?.large,\n '--admesh-font-size-sm': theme.fontSize?.small,\n '--admesh-font-size-base': theme.fontSize?.base,\n '--admesh-font-size-lg': theme.fontSize?.large,\n '--admesh-font-size-title': theme.fontSize?.title,\n fontFamily: theme.fontFamily,\n // Ensure consistent width: 100% for all components except ecommerce\n width: theme.components?.productCard?.width || '100%'\n } as React.CSSProperties : { width: '100%' } as React.CSSProperties;\n\n // Render different layouts based on variation\n if (variation === 'simple') {\n // Simple inline ad format (replaces AdMeshSimpleAd)\n return (\n <div\n className={classNames(\n \"admesh-component admesh-simple-ad\",\n \"inline-block text-sm leading-relaxed\",\n className\n )}\n style={{\n fontFamily: theme?.fontFamily || '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n ...theme?.components?.productCard,\n ...style\n }}\n data-admesh-theme={theme?.mode}\n >\n {/* Recommendation label */}\n <span\n style={{\n fontSize: '11px',\n fontWeight: '600',\n color: theme?.accentColor || '#2563eb',\n backgroundColor: theme?.mode === 'dark' ? '#374151' : '#f3f4f6',\n padding: '2px 6px',\n borderRadius: '4px',\n marginRight: '8px'\n }}\n title={getLabelTooltip(recommendation, getRecommendationLabel(recommendation))}\n >\n {getRecommendationLabel(recommendation)}\n </span>\n\n {/* Main content */}\n <span\n style={{\n color: theme?.mode === 'dark' ? '#f3f4f6' : '#374151',\n marginRight: '4px'\n }}\n >\n {content.description}{' '}\n </span>\n\n {/* CTA Link */}\n <AdMeshLinkTracker\n adId={recommendation.ad_id}\n admeshLink={recommendation.admesh_link}\n productId={recommendation.product_id}\n trackingData={{\n title: recommendation.title,\n matchScore: recommendation.intent_match_score,\n component: 'simple_ad_cta'\n }}\n >\n <span\n style={{\n color: theme?.accentColor || '#2563eb',\n textDecoration: 'underline',\n cursor: 'pointer',\n fontSize: 'inherit',\n fontFamily: 'inherit'\n }}\n >\n {content.ctaText}\n </span>\n </AdMeshLinkTracker>\n\n {/* Disclosure */}\n <span\n style={{\n fontSize: '10px',\n color: theme?.mode === 'dark' ? '#9ca3af' : '#6b7280',\n marginLeft: '8px'\n }}\n >\n (Sponsored • Powered by AdMesh)\n </span>\n </div>\n );\n }\n\n\n\n\n // Default full product card layout\n return (\n <div\n className={cardClasses}\n style={{\n fontFamily: theme?.fontFamily || '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n ...theme?.components?.productCard,\n ...style\n }}\n data-admesh-theme={theme?.mode}\n >\n <div\n className=\"h-full flex flex-col\"\n style={cardStyle}\n >\n {/* Recommendation label at top */}\n <div className=\"mb-3\">\n <span\n style={{\n fontSize: '11px',\n fontWeight: '600',\n color: theme?.accentColor || '#2563eb',\n backgroundColor: theme?.mode === 'dark' ? '#374151' : '#f3f4f6',\n padding: '2px 6px',\n borderRadius: '4px'\n }}\n title={getLabelTooltip(recommendation, getRecommendationLabel(recommendation))}\n >\n {getRecommendationLabel(recommendation)}\n </span>\n </div>\n\n {/* Header with title and CTA button in same row */}\n <div className=\"flex justify-between items-center gap-3 mb-4\">\n <div className=\"flex items-center gap-2 flex-1 min-w-0\">\n {recommendation.product_logo && (\n <img\n src={recommendation.product_logo.url}\n alt={`${recommendation.title} logo`}\n className=\"w-6 h-6 rounded flex-shrink-0\"\n onError={(e) => {\n // Hide image if it fails to load\n (e.target as HTMLImageElement).style.display = 'none';\n }}\n />\n )}\n <h4 className=\"font-semibold text-gray-800 dark:text-gray-200 text-sm sm:text-base truncate\">\n {content.title}\n </h4>\n </div>\n\n <div className=\"flex-shrink-0\">\n <AdMeshLinkTracker\n adId={recommendation.ad_id}\n admeshLink={recommendation.admesh_link}\n productId={recommendation.product_id}\n trackingData={{\n title: recommendation.title,\n matchScore: recommendation.intent_match_score,\n component: 'product_card_cta'\n }}\n >\n <button className=\"text-xs px-2 py-1 sm:px-3 sm:py-2 rounded-full bg-gradient-to-r from-purple-500 to-pink-500 text-white hover:from-purple-600 hover:to-pink-600 flex items-center transition-all duration-200 transform hover:scale-105 shadow-md hover:shadow-lg whitespace-nowrap\">\n Visit\n <svg className=\"ml-1 h-3 w-3\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" />\n </svg>\n </button>\n </AdMeshLinkTracker>\n </div>\n </div>\n\n {/* Product Description/Reason */}\n <div className=\"mb-6\">\n <p className=\"text-sm text-gray-600 dark:text-gray-300 leading-relaxed\">\n {content.description}\n </p>\n </div>\n\n\n \n\n {/* Features */}\n {recommendation.features && recommendation.features.length > 0 && (\n <div className=\"mb-3\">\n <div className=\"text-xs text-gray-600 dark:text-gray-300 mb-2 font-medium\">\n ✨ Key Features\n </div>\n <div className=\"flex flex-wrap gap-1.5\">\n {recommendation.features.slice(0, 4).map((feature, j) => (\n <span\n key={j}\n className=\"text-xs px-2 py-1 rounded-full bg-gradient-to-r from-indigo-100 to-purple-100 dark:from-indigo-900/30 dark:to-purple-900/30 text-indigo-700 dark:text-indigo-300 border border-indigo-200 dark:border-indigo-700\"\n >\n <svg className=\"h-3 w-3 mr-0.5 inline text-indigo-500\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n {feature}\n </span>\n ))}\n {recommendation.features.length > 4 && (\n <span className=\"text-xs text-gray-500 dark:text-gray-400 px-2 py-1\">\n +{recommendation.features.length - 4} more\n </span>\n )}\n </div>\n </div>\n )}\n\n\n\n\n\n\n\n\n\n\n {/* Footer section with disclosure */}\n <div className=\"mt-auto pt-3 border-t border-gray-100 dark:border-slate-700\">\n <div className=\"flex items-center justify-between text-xs text-gray-500 dark:text-gray-400\">\n <span>\n Sponsored\n </span>\n <span className=\"text-gray-400 dark:text-gray-500\">\n Powered by AdMesh\n </span>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nAdMeshProductCard.displayName = 'AdMeshProductCard';\n","import React from 'react';\nimport classNames from 'classnames';\nimport type { AdMeshRecommendation, EcommerceProduct } from '../types/index';\n\nexport interface AdMeshEcommerceCardsProps {\n products?: EcommerceProduct[]; // Legacy support\n recommendations?: AdMeshRecommendation[]; // New: unified schema recommendations\n title?: string;\n showTitle?: boolean;\n className?: string;\n cardClassName?: string;\n onProductClick?: (product: EcommerceProduct | AdMeshRecommendation) => void;\n showPricing?: boolean;\n showRatings?: boolean;\n showBrand?: boolean;\n showSource?: boolean;\n showShipping?: boolean;\n maxCards?: number;\n cardWidth?: 'sm' | 'md' | 'lg';\n theme?: 'light' | 'dark' | 'auto';\n borderRadius?: 'none' | 'sm' | 'md' | 'lg';\n shadow?: 'none' | 'sm' | 'md' | 'lg';\n}\n\nexport const AdMeshEcommerceCards: React.FC<AdMeshEcommerceCardsProps> = ({\n products = [],\n recommendations = [],\n title = \"Product Recommendations\",\n showTitle = true,\n className = \"\",\n cardClassName = \"\",\n onProductClick,\n showPricing = true,\n showRatings = true,\n showBrand = true,\n showSource = false,\n showShipping = true,\n maxCards = 10,\n cardWidth = 'md',\n theme = 'auto',\n borderRadius = 'md',\n shadow = 'sm'\n}) => {\n // Use recommendations directly if provided, otherwise use legacy products\n const displayItems: (AdMeshRecommendation | EcommerceProduct)[] = recommendations.length > 0 ? recommendations.slice(0, maxCards) : products.slice(0, maxCards);\n\n\n\n const getCardWidthClass = () => {\n switch (cardWidth) {\n case 'sm': return 'w-48 min-w-48';\n case 'md': return 'w-64 min-w-64';\n case 'lg': return 'w-80 min-w-80';\n default: return 'w-64 min-w-64';\n }\n };\n\n const getBorderRadiusClass = () => {\n switch (borderRadius) {\n case 'none': return 'rounded-none';\n case 'sm': return 'rounded-sm';\n case 'md': return 'rounded-lg';\n case 'lg': return 'rounded-xl';\n default: return 'rounded-lg';\n }\n };\n\n const getShadowClass = () => {\n switch (shadow) {\n case 'none': return '';\n case 'sm': return 'shadow-sm hover:shadow-md';\n case 'md': return 'shadow-md hover:shadow-lg';\n case 'lg': return 'shadow-lg hover:shadow-xl';\n default: return 'shadow-sm hover:shadow-md';\n }\n };\n\n const getThemeClasses = () => {\n if (theme === 'dark') {\n return 'bg-gray-900 text-white';\n } else if (theme === 'light') {\n return 'bg-white text-gray-900';\n }\n return 'bg-white dark:bg-gray-900 text-gray-900 dark:text-white';\n };\n\n const formatPrice = (price: number) => {\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 0,\n maximumFractionDigits: 2,\n }).format(price);\n };\n\n const renderStars = (rating: number) => {\n const stars = [];\n const fullStars = Math.floor(rating);\n const hasHalfStar = rating % 1 !== 0;\n\n for (let i = 0; i < fullStars; i++) {\n stars.push(\n <span key={i} className=\"text-yellow-400\">★</span>\n );\n }\n\n if (hasHalfStar) {\n stars.push(\n <span key=\"half\" className=\"text-yellow-400\">☆</span>\n );\n }\n\n const emptyStars = 5 - Math.ceil(rating);\n for (let i = 0; i < emptyStars; i++) {\n stars.push(\n <span key={`empty-${i}`} className=\"text-gray-300 dark:text-gray-600\">☆</span>\n );\n }\n\n return stars;\n };\n\n const handleProductClick = (item: EcommerceProduct | AdMeshRecommendation) => {\n if (onProductClick) {\n onProductClick(item);\n } else {\n // Default behavior: open product link\n const link = item.admesh_link || item.url;\n if (link) {\n window.open(link, '_blank', 'noopener,noreferrer');\n }\n }\n };\n\n // Check if we have any data to display\n if ((!products || products.length === 0) && (!recommendations || recommendations.length === 0)) {\n return null;\n }\n\n return (\n <div className={classNames('w-full', className)}>\n {showTitle && (\n <div className=\"mb-4\">\n <h3 className=\"text-lg font-semibold text-gray-900 dark:text-white\">\n {title}\n </h3>\n <div className=\"mt-1 h-0.5 w-12 bg-blue-500\"></div>\n </div>\n )}\n \n <div className=\"relative\">\n {displayItems.length === 0 ? (\n <div className=\"text-center py-8 text-gray-500\">\n No products to display\n </div>\n ) : (\n <div className=\"flex gap-4 overflow-x-auto pb-4 scrollbar-hide\">\n {displayItems.map((item) => {\n // Get the appropriate ID for the key\n const itemId = (item as any).product_id || (item as any).id || (item as any).ad_id;\n\n return (\n <div\n key={itemId}\n className={classNames(\n getCardWidthClass(),\n getBorderRadiusClass(),\n getShadowClass(),\n getThemeClasses(),\n 'flex-shrink-0 border border-gray-200 dark:border-gray-700 transition-all duration-200 cursor-pointer hover:scale-[1.02]',\n cardClassName\n )}\n onClick={() => handleProductClick(item)}\n >\n {/* Product Image */}\n <div className=\"relative aspect-square w-full overflow-hidden\">\n {item.image_url ? (\n <img\n src={item.image_url}\n alt={item.title}\n className=\"h-full w-full object-cover transition-transform duration-200 hover:scale-105\"\n loading=\"lazy\"\n />\n ) : (\n <div className=\"flex h-full w-full items-center justify-center bg-gray-100 dark:bg-gray-800\">\n <svg className=\"h-12 w-12 text-gray-400\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\" />\n </svg>\n </div>\n )}\n\n {/* Discount Badge */}\n {showPricing && item.discount_percentage && item.discount_percentage > 0 && (\n <div className=\"absolute top-2 left-2 bg-red-500 text-white text-xs font-bold px-2 py-1 rounded\">\n -{Math.round(item.discount_percentage)}%\n </div>\n )}\n\n {/* Source Badge */}\n {showSource && item.source && (\n <div className=\"absolute top-2 right-2 bg-blue-500 text-white text-xs font-medium px-2 py-1 rounded\">\n {item.source.toUpperCase()}\n </div>\n )}\n </div>\n\n {/* Product Info */}\n <div className=\"p-3\">\n {/* Brand */}\n {showBrand && item.brand && (\n <div className=\"text-xs text-gray-500 dark:text-gray-400 mb-1 uppercase tracking-wide\">\n {item.brand}\n </div>\n )}\n\n {/* Title */}\n <h4 className=\"text-sm font-medium text-gray-900 dark:text-white line-clamp-2 mb-2 leading-tight\">\n {item.title}\n </h4>\n\n {/* Rating */}\n {showRatings && item.rating && (\n <div className=\"flex items-center gap-1 mb-2\">\n <div className=\"flex text-sm\">\n {renderStars(item.rating)}\n </div>\n <span className=\"text-xs text-gray-500 dark:text-gray-400\">\n ({item.review_count || 0})\n </span>\n </div>\n )}\n\n {/* Pricing */}\n {showPricing && item.price && (\n <div className=\"mb-2\">\n <div className=\"flex items-center gap-2\">\n <span className=\"text-lg font-bold text-gray-900 dark:text-white\">\n {formatPrice(item.price)}\n </span>\n {item.original_price && item.original_price > item.price && (\n <span className=\"text-sm text-gray-500 dark:text-gray-400 line-through\">\n {formatPrice(item.original_price)}\n </span>\n )}\n </div>\n </div>\n )}\n\n {/* Shipping Info */}\n {showShipping && item.shipping_info?.free_shipping_over_35 && (\n <div className=\"text-xs text-green-600 dark:text-green-400 font-medium\">\n Free shipping over $35\n </div>\n )}\n\n {/* Availability */}\n {item.availability && item.availability !== 'unknown' && (\n <div className={classNames(\n 'text-xs font-medium mt-1',\n item.availability === 'in_stock'\n ? 'text-green-600 dark:text-green-400'\n : 'text-red-600 dark:text-red-400'\n )}>\n {item.availability === 'in_stock' ? 'In Stock' : 'Out of Stock'}\n </div>\n )}\n </div>\n </div>\n );\n })}\n </div>\n )}\n\n {/* Scroll Indicators - only show when there are products */}\n {displayItems.length > 0 && (\n <>\n <div className=\"absolute top-1/2 -left-2 transform -translate-y-1/2 bg-white dark:bg-gray-800 rounded-full shadow-lg p-1 opacity-0 group-hover:opacity-100 transition-opacity\">\n <svg className=\"w-4 h-4 text-gray-600 dark:text-gray-300\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M15 19l-7-7 7-7\" />\n </svg>\n </div>\n <div className=\"absolute top-1/2 -right-2 transform -translate-y-1/2 bg-white dark:bg-gray-800 rounded-full shadow-lg p-1 opacity-0 group-hover:opacity-100 transition-opacity\">\n <svg className=\"w-4 h-4 text-gray-600 dark:text-gray-300\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M9 5l7 7-7 7\" />\n </svg>\n </div>\n </>\n )}\n </div>\n\n {/* Disclosure */}\n <div className=\"flex justify-between items-center mt-3 pt-2 border-t border-gray-200 dark:border-gray-700\">\n <span className=\"text-xs text-gray-500 dark:text-gray-400\">\n Sponsored\n </span>\n <span className=\"text-xs text-gray-400 dark:text-gray-500\">\n Powered by AdMesh\n </span>\n </div>\n\n {/* Custom scrollbar styles */}\n <style dangerouslySetInnerHTML={{\n __html: `\n .scrollbar-hide {\n -ms-overflow-style: none;\n scrollbar-width: none;\n }\n .scrollbar-hide::-webkit-scrollbar {\n display: none;\n }\n .line-clamp-2 {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n `\n }} />\n </div>\n );\n};\n\nexport default AdMeshEcommerceCards;\n","import React from 'react';\nimport { AdMeshRecommendation, AdMeshTheme } from '../types';\nimport { AdMeshSummaryUnit } from './AdMeshSummaryUnit';\nimport { AdMeshProductCard } from './AdMeshProductCard';\nimport { AdMeshEcommerceCards } from './AdMeshEcommerceCards';\n\nexport interface AdMeshSummaryLayoutProps {\n // Backend response data\n response: {\n layout_type?: string; // \"citation\", \"product_cards\", \"ecommerce\"\n citation_summary?: string; // LLM-generated summary with embedded links\n recommendations: AdMeshRecommendation[];\n requires_summary?: boolean;\n };\n \n // Styling\n theme?: AdMeshTheme;\n className?: string;\n style?: React.CSSProperties;\n \n // Behavior\n onRecommendationClick?: (recommendation: AdMeshRecommendation) => void;\n onLinkClick?: (recommendation: AdMeshRecommendation) => void;\n}\n\n// Validate response object\nconst validateResponse = (response: any) => {\n const warnings: string[] = [];\n \n if (!response) {\n return { isValid: false, warnings: ['No response object provided'] };\n }\n \n if (!response.recommendations || !Array.isArray(response.recommendations)) {\n warnings.push('No recommendations array found in response');\n }\n \n if (response.layout_type === 'citation' && !response.citation_summary) {\n warnings.push('Citation layout specified but no citation_summary provided');\n }\n \n const validRecommendations = response.recommendations?.filter((rec: any) => \n rec && rec.admesh_link && (rec.title || rec.recommendation_title)\n ) || [];\n \n if (validRecommendations.length === 0) {\n warnings.push('No valid recommendations found (missing admesh_link or title)');\n }\n \n return {\n isValid: validRecommendations.length > 0,\n validCount: validRecommendations.length,\n totalCount: response.recommendations?.length || 0,\n warnings\n };\n};\n\nexport const AdMeshSummaryLayout: React.FC<AdMeshSummaryLayoutProps> = ({\n response,\n theme,\n className = '',\n style = {},\n onRecommendationClick,\n onLinkClick\n}) => {\n // Validate response\n const validation = validateResponse(response);\n \n if (validation.warnings.length > 0) {\n console.warn('[AdMesh Summary Layout] Validation warnings:', validation.warnings);\n }\n \n if (!validation.isValid) {\n console.error('[AdMesh Summary Layout] Invalid response object');\n return (\n <div className={`admesh-summary-layout-error ${className}`} style={style}>\n <div className=\"text-center py-6 px-4 bg-gray-50 dark:bg-gray-800 rounded-lg\">\n <p className=\"text-gray-600 dark:text-gray-400 text-sm\">\n Unable to display recommendations\n </p>\n <p className=\"text-gray-500 dark:text-gray-500 text-xs mt-1\">\n Check console for details\n </p>\n </div>\n </div>\n );\n }\n \n // Extract data from response\n const {\n layout_type = 'citation',\n citation_summary,\n recommendations = [],\n requires_summary = true\n } = response;\n \n console.log(`[AdMesh Summary Layout] Rendering ${layout_type} layout with ${validation.validCount}/${validation.totalCount} valid recommendations`);\n \n // Render based on layout type\n const renderContent = () => {\n switch (layout_type) {\n case 'citation':\n // Show summary if available and required\n if (citation_summary && requires_summary) {\n return (\n <AdMeshSummaryUnit\n summaryText={citation_summary}\n recommendations={recommendations}\n theme={theme}\n onLinkClick={onLinkClick}\n />\n );\n }\n // Fallback to first recommendation if no summary\n return (\n <div className=\"fallback-citation\">\n <p className=\"text-gray-700 dark:text-gray-300 mb-3\">\n Based on your query, I'd recommend checking out these options:\n </p>\n <AdMeshProductCard\n recommendation={recommendations[0]}\n theme={theme}\n onClick={onRecommendationClick}\n />\n </div>\n );\n \n case 'product_cards':\n case 'product':\n return (\n <div className=\"product-cards-layout\">\n {recommendations.slice(0, 3).map((rec, index) => (\n <AdMeshProductCard\n key={rec.ad_id || `rec-${index}`}\n recommendation={rec}\n theme={theme}\n onClick={onRecommendationClick}\n className=\"mb-4\"\n />\n ))}\n </div>\n );\n \n case 'ecommerce':\n return (\n <AdMeshEcommerceCards\n recommendations={recommendations}\n theme={theme}\n onProductClick={onRecommendationClick}\n maxItems={3}\n />\n );\n \n default:\n console.warn(`[AdMesh Summary Layout] Unknown layout type: ${layout_type}`);\n // Default to summary if available, otherwise product cards\n if (citation_summary) {\n return (\n <AdMeshSummaryUnit\n summaryText={citation_summary}\n recommendations={recommendations}\n theme={theme}\n onLinkClick={onLinkClick}\n />\n );\n }\n return (\n <AdMeshProductCard\n recommendation={recommendations[0]}\n theme={theme}\n onClick={onRecommendationClick}\n />\n );\n }\n };\n \n return (\n <div \n className={`admesh-summary-layout admesh-layout-${layout_type} ${className}`}\n style={{\n fontFamily: theme?.fontFamily || '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n ...style\n }}\n >\n {renderContent()}\n </div>\n );\n};\n\nexport default AdMeshSummaryLayout;\n","import React from 'react';\nimport type { AdMeshLayoutProps } from '../types/index';\nimport { AdMeshSummaryLayout } from './AdMeshSummaryLayout';\n\nexport const AdMeshLayout: React.FC<AdMeshLayoutProps> = ({\n // Legacy props (for backward compatibility)\n recommendations = [],\n citationSummary,\n layout,\n\n // New response object (preferred)\n response,\n\n // Styling\n theme,\n className,\n style,\n\n // Behavior\n onRecommendationClick,\n onLinkClick\n}) => {\n // If response object is provided, use the new AdMeshSummaryLayout\n if (response) {\n return (\n <AdMeshSummaryLayout\n response={response}\n theme={theme}\n className={className}\n style={style}\n onRecommendationClick={onRecommendationClick}\n onLinkClick={onLinkClick}\n />\n );\n }\n\n // Legacy support: convert old props to response format\n const legacyResponse = {\n layout_type: layout || 'citation',\n citation_summary: citationSummary,\n recommendations: recommendations,\n requires_summary: !!citationSummary\n };\n\n return (\n <AdMeshSummaryLayout\n response={legacyResponse}\n theme={theme}\n className={className}\n style={style}\n onRecommendationClick={onRecommendationClick}\n onLinkClick={onLinkClick}\n />\n );\n};\n\nexport default AdMeshLayout;\n","import React, { useState } from 'react';\nimport classNames from 'classnames';\nimport type { AdMeshRecommendation, AdMeshTheme } from '../types/index';\nimport { AdMeshLinkTracker } from './AdMeshLinkTracker';\n\nexport interface AdMeshInlineCardProps {\n recommendation: AdMeshRecommendation;\n theme?: AdMeshTheme;\n variation?: 'default' | 'statement' | 'question';\n expandable?: boolean; // For question and statement variations, default: false\n className?: string;\n style?: React.CSSProperties;\n}\n\n/**\n * AdMeshInlineCard\n * Compact inline card that uses the same card style as AdMeshProductCard,\n * but with a smaller content footprint suitable for inline placements.\n */\nexport const AdMeshInlineCard: React.FC<AdMeshInlineCardProps> = ({\n recommendation,\n theme,\n variation = 'default',\n expandable = false,\n className,\n style,\n}) => {\n const [isExpanded, setIsExpanded] = useState(false);\n\n // Get content based on variation\n const getVariationContent = () => {\n const variations = recommendation.content_variations;\n\n if (variation === 'question' && variations?.question) {\n return {\n title: variations.question.cta || recommendation.recommendation_title || recommendation.title,\n description: variations.question.text,\n ctaText: variations.question.cta || recommendation.recommendation_title || recommendation.title\n };\n } else if (variation === 'statement' && variations?.statement) {\n return {\n title: recommendation.recommendation_title || recommendation.title,\n description: variations.statement.text,\n ctaText: variations.statement.cta || recommendation.recommendation_title || recommendation.title\n };\n } else {\n // Default variation\n return {\n title: recommendation.recommendation_title || recommendation.title,\n description: recommendation.recommendation_description || recommendation.reason || '',\n ctaText: recommendation.recommendation_title || recommendation.title\n };\n }\n };\n\n const content = getVariationContent();\n\n const cardClasses = classNames(\n 'rounded-xl shadow-sm border border-gray-200 dark:border-gray-800 p-4 bg-white dark:bg-slate-900',\n 'hover:shadow-md transition-shadow duration-200',\n {\n 'cursor-pointer': expandable && (variation === 'question' || variation === 'statement')\n },\n className\n );\n\n return (\n <div\n className={cardClasses}\n style={{\n fontFamily: theme?.fontFamily || '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n // Ensure consistent width: 100% for inline cards\n width: theme?.components?.inlineRecommendation?.width || '100%',\n ...theme?.components?.productCard,\n ...style,\n }}\n data-admesh-theme={theme?.mode}\n >\n <div className=\"h-full flex flex-col\">\n {/* Header with title and CTA button in same row */}\n <div className=\"flex justify-between items-center gap-3 mb-2\">\n <div className=\"flex items-center gap-2 flex-1 min-w-0\">\n {recommendation.product_logo && (\n <img\n src={recommendation.product_logo.url}\n alt={`${recommendation.title} logo`}\n className=\"w-5 h-5 rounded flex-shrink-0\"\n onError={(e) => { (e.target as HTMLImageElement).style.display = 'none'; }}\n />\n )}\n <h4 className=\"font-semibold text-gray-800 dark:text-gray-200 text-sm truncate\">\n {content.title}\n </h4>\n </div>\n\n <div className=\"flex-shrink-0\">\n <AdMeshLinkTracker\n adId={recommendation.ad_id}\n admeshLink={recommendation.admesh_link}\n productId={recommendation.product_id}\n trackingData={{\n title: recommendation.title,\n matchScore: recommendation.intent_match_score,\n component: 'inline_card_cta',\n }}\n >\n <button className=\"text-xs px-2 py-1 rounded-full bg-gradient-to-r from-purple-500 to-pink-500 text-white hover:from-purple-600 hover:to-pink-600 flex items-center transition-all duration-200 transform hover:scale-105 shadow-sm whitespace-nowrap\">\n {variation === 'question' ? 'Try' : 'Visit'}\n <svg className=\"ml-1 h-3 w-3\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" />\n </svg>\n </button>\n </AdMeshLinkTracker>\n </div>\n </div>\n\n {/* Brief description (single line clamp) */}\n {content.description && (\n <p className=\"text-xs text-gray-600 dark:text-gray-300 mb-2 line-clamp-2\">\n {content.description}\n </p>\n )}\n\n {/* Footer with disclosures */}\n <div className=\"mt-auto pt-2 border-t border-gray-100 dark:border-slate-700\">\n <div className=\"flex items-center justify-between text-[11px] text-gray-500 dark:text-gray-400\">\n <span>Sponsored</span>\n <span className=\"text-gray-400 dark:text-gray-500\">Powered by AdMesh</span>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nAdMeshInlineCard.displayName = 'AdMeshInlineCard';\n\n","import React from 'react';\nimport classNames from 'classnames';\nimport type { AdMeshBadgeProps, BadgeType } from '../types/index';\n\n// Badge type to variant mapping\nconst badgeTypeVariants: Record<BadgeType, string> = {\n 'Top Match': 'primary',\n 'Free Tier': 'success',\n 'AI Powered': 'secondary',\n 'Popular': 'warning',\n 'New': 'primary',\n 'Trial Available': 'success'\n};\n\n// Badge type to icon mapping (using clean Unicode symbols)\nconst badgeTypeIcons: Partial<Record<BadgeType, string>> = {\n 'Top Match': '★',\n 'Free Tier': '◆',\n 'AI Powered': '◉',\n 'Popular': '▲',\n 'New': '●',\n 'Trial Available': '◈'\n};\n\nexport const AdMeshBadge: React.FC<AdMeshBadgeProps> = ({\n type,\n variant,\n size = 'md',\n className,\n style\n}) => {\n const effectiveVariant = variant || badgeTypeVariants[type] || 'secondary';\n const icon = badgeTypeIcons[type];\n\n const badgeClasses = classNames(\n 'admesh-component',\n 'admesh-badge',\n `admesh-badge--${effectiveVariant}`,\n `admesh-badge--${size}`,\n className\n );\n\n return (\n <span\n className={badgeClasses}\n style={style}\n >\n {icon && <span className=\"admesh-badge__icon\">{icon}</span>}\n <span className=\"admesh-badge__text\">{type}</span>\n </span>\n );\n};\n\nAdMeshBadge.displayName = 'AdMeshBadge';\n","import type { AdMeshTheme } from '../types';\n\n/**\n * Utility functions for theme customization in AdMesh UI SDK\n */\n\n/**\n * Creates a theme with sensible defaults and custom overrides\n * Ensures consistent styling across all AdMesh UI SDK components\n */\nexport const createAdMeshTheme = (customTheme: Partial<AdMeshTheme> = {}): AdMeshTheme => {\n const baseTheme: AdMeshTheme = {\n mode: 'light',\n primaryColor: '#3b82f6',\n secondaryColor: '#10b981',\n accentColor: '#3b82f6',\n backgroundColor: '#ffffff',\n surfaceColor: '#f9fafb',\n borderColor: '#e5e7eb',\n textColor: '#111827',\n textSecondaryColor: '#6b7280',\n fontFamily: '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n fontSize: {\n small: '12px',\n base: '14px',\n large: '16px',\n title: '18px'\n },\n borderRadius: '8px',\n spacing: {\n small: '4px',\n medium: '8px',\n large: '16px'\n },\n shadows: {\n small: '0 1px 3px rgba(0, 0, 0, 0.1)',\n medium: '0 4px 6px rgba(0, 0, 0, 0.1)',\n large: '0 10px 15px rgba(0, 0, 0, 0.1)'\n },\n icons: {\n expandIcon: '▼',\n collapseIcon: '▲',\n starIcon: '★',\n checkIcon: '✓',\n arrowIcon: '→'\n },\n gradients: {\n primary: 'linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%)',\n secondary: 'linear-gradient(135deg, #10b981 0%, #059669 100%)',\n accent: 'linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%)'\n },\n // Component-specific defaults with consistent width settings\n components: {\n productCard: { width: '100%' },\n citationUnit: { width: '100%' },\n inlineRecommendation: { width: '100%' },\n expandableUnit: { width: '100%' },\n compareTable: { width: '100%' },\n // Ecommerce cards maintain their specific width behavior\n card: { width: 'auto' },\n button: { width: 'auto' }\n }\n };\n\n const mergedTheme = {\n ...baseTheme,\n ...customTheme,\n fontSize: {\n ...baseTheme.fontSize,\n ...customTheme.fontSize\n },\n spacing: {\n ...baseTheme.spacing,\n ...customTheme.spacing\n },\n shadows: {\n ...baseTheme.shadows,\n ...customTheme.shadows\n },\n icons: {\n ...baseTheme.icons,\n ...customTheme.icons\n },\n components: {\n ...baseTheme.components,\n ...customTheme.components\n }\n };\n\n // Ensure consistent widths are applied\n const finalTheme = ensureConsistentWidths(mergedTheme);\n return finalTheme as AdMeshTheme;\n};\n\n/**\n * Creates a dark theme variant\n */\nexport const createDarkTheme = (customTheme: Partial<AdMeshTheme> = {}): AdMeshTheme => {\n const darkDefaults: Partial<AdMeshTheme> = {\n mode: 'dark',\n backgroundColor: '#1f2937',\n surfaceColor: '#374151',\n borderColor: '#4b5563',\n textColor: '#f9fafb',\n textSecondaryColor: '#9ca3af',\n shadows: {\n small: '0 1px 3px rgba(0, 0, 0, 0.3)',\n medium: '0 4px 6px rgba(0, 0, 0, 0.3)',\n large: '0 10px 15px rgba(0, 0, 0, 0.3)'\n }\n };\n\n return createAdMeshTheme({\n ...darkDefaults,\n ...customTheme\n });\n};\n\n/**\n * Predefined theme presets for common AI platforms\n * All presets ensure consistent width settings and styling\n */\nexport const themePresets = {\n // Clean, minimal theme with consistent width\n get minimal() {\n return createAdMeshTheme({\n primaryColor: '#000000',\n secondaryColor: '#666666',\n borderRadius: '4px',\n shadows: {\n small: 'none',\n medium: '0 1px 3px rgba(0, 0, 0, 0.1)',\n large: '0 2px 6px rgba(0, 0, 0, 0.1)'\n },\n components: {\n productCard: { width: '100%' },\n citationUnit: { width: '100%' },\n inlineRecommendation: { width: '100%' },\n expandableUnit: { width: '100%' },\n compareTable: { width: '100%' }\n }\n });\n },\n\n // Modern, colorful theme with consistent width\n get vibrant() {\n return createAdMeshTheme({\n primaryColor: '#8b5cf6',\n secondaryColor: '#06b6d4',\n accentColor: '#f59e0b',\n borderRadius: '12px',\n gradients: {\n primary: 'linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%)',\n secondary: 'linear-gradient(135deg, #06b6d4 0%, #10b981 100%)',\n accent: 'linear-gradient(135deg, #f59e0b 0%, #ef4444 100%)'\n },\n components: {\n productCard: { width: '100%' },\n citationUnit: { width: '100%' },\n inlineRecommendation: { width: '100%' },\n expandableUnit: { width: '100%' },\n compareTable: { width: '100%' }\n }\n });\n },\n\n // Professional, corporate theme with consistent width\n get corporate() {\n return createAdMeshTheme({\n primaryColor: '#1e40af',\n secondaryColor: '#059669',\n backgroundColor: '#f8fafc',\n surfaceColor: '#ffffff',\n borderColor: '#cbd5e1',\n borderRadius: '6px',\n fontFamily: '\"Inter\", -apple-system, BlinkMacSystemFont, sans-serif',\n components: {\n productCard: { width: '100%' },\n citationUnit: { width: '100%' },\n inlineRecommendation: { width: '100%' },\n expandableUnit: { width: '100%' },\n compareTable: { width: '100%' }\n }\n });\n },\n\n // High contrast theme for accessibility with consistent width\n get highContrast() {\n return createAdMeshTheme({\n primaryColor: '#000000',\n secondaryColor: '#ffffff',\n backgroundColor: '#ffffff',\n surfaceColor: '#f5f5f5',\n borderColor: '#000000',\n textColor: '#000000',\n textSecondaryColor: '#333333',\n borderRadius: '0px',\n shadows: {\n small: 'none',\n medium: '0 0 0 2px #000000',\n large: '0 0 0 3px #000000'\n },\n components: {\n productCard: { width: '100%' },\n citationUnit: { width: '100%' },\n inlineRecommendation: { width: '100%' },\n expandableUnit: { width: '100%' },\n compareTable: { width: '100%' }\n }\n });\n }\n};\n\n/**\n * Ensures consistent width settings across all components\n * This function enforces the rule: 100% width for all components except ecommerce\n */\nexport const ensureConsistentWidths = (inputTheme: Partial<AdMeshTheme> = {}): Partial<AdMeshTheme> => {\n const existingComponents = inputTheme.components || {};\n\n const consistentComponents = {\n productCard: { width: '100%', ...existingComponents.productCard },\n citationUnit: { width: '100%', ...existingComponents.citationUnit },\n inlineRecommendation: { width: '100%', ...existingComponents.inlineRecommendation },\n expandableUnit: { width: '100%', ...existingComponents.expandableUnit },\n compareTable: { width: '100%', ...existingComponents.compareTable },\n // Ecommerce cards maintain their specific width behavior\n card: { width: 'auto', ...existingComponents.card },\n button: { width: 'auto', ...existingComponents.button }\n };\n\n return {\n ...inputTheme,\n components: {\n ...existingComponents,\n ...consistentComponents\n }\n };\n};\n\n/**\n * Utility to merge multiple theme objects\n */\nexport const mergeThemes = (...themes: Partial<AdMeshTheme>[]): AdMeshTheme => {\n const baseTheme = createAdMeshTheme();\n return themes.reduce((merged, theme) => {\n if (!theme) return merged;\n return {\n ...merged,\n ...theme,\n mode: theme.mode || merged.mode\n };\n }, baseTheme);\n};\n\n/**\n * Utility to create a theme from CSS custom properties\n */\nexport const themeFromCSSProperties = (element: HTMLElement): Partial<AdMeshTheme> => {\n const computedStyle = getComputedStyle(element);\n \n return {\n primaryColor: computedStyle.getPropertyValue('--admesh-primary-color')?.trim() || undefined,\n secondaryColor: computedStyle.getPropertyValue('--admesh-secondary-color')?.trim() || undefined,\n backgroundColor: computedStyle.getPropertyValue('--admesh-background-color')?.trim() || undefined,\n textColor: computedStyle.getPropertyValue('--admesh-text-color')?.trim() || undefined,\n borderRadius: computedStyle.getPropertyValue('--admesh-border-radius')?.trim() || undefined,\n fontFamily: computedStyle.getPropertyValue('--admesh-font-family')?.trim() || undefined\n };\n};\n","// AdMesh UI SDK - Main Entry Point\n\n// Export core components only\nexport {\n AdMeshLayout,\n AdMeshProductCard,\n AdMeshInlineCard,\n AdMeshEcommerceCards,\n AdMeshSummaryUnit,\n AdMeshSummaryLayout,\n AdMeshLinkTracker,\n AdMeshBadge\n} from './components';\n\n// Export hooks\nexport {\n useAdMeshTracker,\n setAdMeshTrackerConfig,\n buildAdMeshLink,\n extractTrackingData\n} from './hooks/useAdMeshTracker';\n\nexport {\n useAdMeshStyles\n} from './hooks/useAdMeshStyles';\n\n// Export theme utilities\nexport {\n createAdMeshTheme,\n createDarkTheme,\n themePresets,\n mergeThemes,\n themeFromCSSProperties\n} from './utils/themeUtils';\n\n// Export disclosure utilities\nexport {\n getRecommendationLabel,\n getLabelTooltip,\n getSectionDisclosure,\n getInlineDisclosure,\n getInlineTooltip,\n getBadgeText,\n getCtaText,\n hasHighQualityMatches,\n getPoweredByText\n} from './utils/disclosureUtils';\n\nexport type {\n DisclosureConfig\n} from './utils/disclosureUtils';\n\n// Export types\nexport type {\n AdMeshRecommendation,\n AdMeshTheme,\n IntentType,\n BadgeType,\n BadgeVariant,\n BadgeSize,\n TrackingData,\n AdMeshProductCardProps,\n AdMeshEcommerceCardsProps,\n EcommerceProduct,\n AdMeshBadgeProps,\n AdMeshLayoutProps,\n AdMeshLayoutType,\n AdMeshLinkTrackerProps,\n AdMeshSummaryUnitProps,\n AdMeshSummaryLayoutProps,\n UseAdMeshTrackerReturn,\n AgentRecommendationResponse,\n AdMeshConfig\n} from './types/index';\n\n// Version info\nexport const VERSION = '0.2.1';\n\n// Default configuration\nexport const DEFAULT_CONFIG = {\n trackingEnabled: true,\n debug: false,\n theme: {\n mode: 'light' as const,\n accentColor: '#2563eb'\n }\n};\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getTaskName","name","getOwner","dispatcher","ReactSharedInternals","UnknownOwner","hasValidKey","hasOwnProperty","getter","defineKeyPropWarningGetter","props","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","self","source","owner","debugStack","debugTask","jsxDEVImpl","isStaticChildren","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","React","require$$0","createTask","callStackForError","unknownOwnerDebugStack","unknownOwnerDebugTask","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","require$$1","processSummaryText","summaryText","recommendations","linkToRecMap","rec","markdownLinkRegex","parts","lastIndex","match","linkCounter","fullMatch","linkText","url","recommendation","jsx","e","AdMeshSummaryUnit","theme","className","style","onLinkClick","processedContent","jsxs","part","index","hasOwn","classNames","classes","i","arg","appendClass","parseValue","newClass","module","DEFAULT_TRACKING_URL","globalConfig","setAdMeshTrackerConfig","useAdMeshTracker","isTracking","setIsTracking","useState","error","setError","mergedConfig","useMemo","log","useCallback","message","data","sendTrackingEvent","eventType","errorMsg","payload","lastError","attempt","response","result","err","resolve","trackClick","trackView","trackConversion","buildAdMeshLink","baseLink","adId","additionalParams","extractTrackingData","additionalData","AdMeshLinkTracker","admeshLink","productId","trackingData","elementRef","useRef","hasTrackedView","useEffect","observer","entries","entry","handleClick","event","ADMESH_STYLES","stylesInjected","useAdMeshStyles","styleElement","existingStyle","getRecommendationLabel","matchScore","customLabels","getLabelTooltip","_label","getSectionDisclosure","hasHighMatches","isExpanded","getInlineDisclosure","compact","getInlineTooltip","getBadgeText","badgeType","getCtaText","context","productName","hasHighQualityMatches","getPoweredByText","AdMeshProductCard","showMatchScore","showBadges","variation","expandable","setIsExpanded","generatedBadges","aiKeywords","_a","keyword","ai","badge","content","cardClasses","cardStyle","_b","_c","_d","_e","_f","_g","_h","_i","_j","_l","_k","_m","_n","feature","j","AdMeshEcommerceCards","products","title","showTitle","cardClassName","onProductClick","showPricing","showRatings","showBrand","showSource","showShipping","maxCards","cardWidth","borderRadius","shadow","displayItems","getCardWidthClass","getBorderRadiusClass","getShadowClass","getThemeClasses","formatPrice","price","renderStars","rating","stars","fullStars","hasHalfStar","emptyStars","handleProductClick","item","link","itemId","Fragment","validateResponse","warnings","validRecommendations","AdMeshSummaryLayout","onRecommendationClick","validation","layout_type","citation_summary","requires_summary","renderContent","AdMeshLayout","citationSummary","layout","legacyResponse","AdMeshInlineCard","variations","badgeTypeVariants","badgeTypeIcons","AdMeshBadge","variant","size","effectiveVariant","icon","badgeClasses","createAdMeshTheme","customTheme","baseTheme","mergedTheme","ensureConsistentWidths","createDarkTheme","themePresets","inputTheme","existingComponents","consistentComponents","mergeThemes","themes","merged","themeFromCSSProperties","element","computedStyle","VERSION","DEFAULT_CONFIG"],"mappings":";;;;;;;;4CAWA,IAAIA,EAAqB,OAAO,IAAI,4BAA4B,EAC9DC,EAAsB,OAAO,IAAI,gBAAgB,EACnD,SAASC,EAAQC,EAAMC,EAAQC,EAAU,CACvC,IAAIC,EAAM,KAGV,GAFWD,IAAX,SAAwBC,EAAM,GAAKD,GACxBD,EAAO,MAAlB,SAA0BE,EAAM,GAAKF,EAAO,KACxC,QAASA,EAAQ,CACnBC,EAAW,CAAE,EACb,QAASE,KAAYH,EACTG,IAAV,QAAuBF,EAASE,CAAQ,EAAIH,EAAOG,CAAQ,EAC9D,MAAMF,EAAWD,EAClB,OAAAA,EAASC,EAAS,IACX,CACL,SAAUL,EACV,KAAMG,EACN,IAAKG,EACL,IAAgBF,IAAX,OAAoBA,EAAS,KAClC,MAAOC,CACR,CACH,CACA,OAAAG,EAAA,SAAmBP,EACnBO,EAAA,IAAcN,EACdM,EAAA,KAAeN;;;;;;;;yCCtBE,QAAQ,IAAI,WAA7B,cACG,UAAY,CACX,SAASO,EAAyBN,EAAM,CACtC,GAAYA,GAAR,KAAc,OAAO,KACzB,GAAmB,OAAOA,GAAtB,WACF,OAAOA,EAAK,WAAaO,EACrB,KACAP,EAAK,aAAeA,EAAK,MAAQ,KACvC,GAAiB,OAAOA,GAApB,SAA0B,OAAOA,EACrC,OAAQA,EAAI,CACV,KAAKF,EACH,MAAO,WACT,KAAKU,EACH,MA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AAO,OAAO,CAACC,EAAQ1L,IACvBA,EACE,CACL,GAAG0L,EACH,GAAG1L,EACH,KAAMA,EAAM,MAAQ0L,EAAO,IAC7B,EALmBA,EAMlBV,CAAS,CACd,EAKaW,GAA0BC,GAA+C,iBAC9E,MAAAC,EAAgB,iBAAiBD,CAAO,EAEvC,MAAA,CACL,eAAc7F,EAAA8F,EAAc,iBAAiB,wBAAwB,IAAvD,YAAA9F,EAA0D,SAAU,OAClF,iBAAgBO,EAAAuF,EAAc,iBAAiB,0BAA0B,IAAzD,YAAAvF,EAA4D,SAAU,OACtF,kBAAiBC,EAAAsF,EAAc,iBAAiB,2BAA2B,IAA1D,YAAAtF,EAA6D,SAAU,OACxF,YAAWC,EAAAqF,EAAc,iBAAiB,qBAAqB,IAApD,YAAArF,EAAuD,SAAU,OAC5E,eAAcC,EAAAoF,EAAc,iBAAiB,wBAAwB,IAAvD,YAAApF,EAA0D,SAAU,OAClF,aAAYC,EAAAmF,EAAc,iBAAiB,sBAAsB,IAArD,YAAAnF,EAAwD,SAAU,MAChF,CACF,ECjMaoF,GAAU,QAGVC,GAAiB,CAC5B,gBAAiB,GACjB,MAAO,GACP,MAAO,CACL,KAAM,QACN,YAAa,SAAA,CAEjB","x_google_ignoreList":[0,1,2,4]}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../node_modules/react/cjs/react-jsx-runtime.production.js","../node_modules/react/cjs/react-jsx-runtime.development.js","../node_modules/react/jsx-runtime.js","../src/components/AdMeshSummaryUnit.tsx","../node_modules/classnames/index.js","../src/hooks/useAdMeshTracker.ts","../src/components/AdMeshLinkTracker.tsx","../src/hooks/useAdMeshStyles.ts","../src/utils/disclosureUtils.ts","../src/components/AdMeshProductCard.tsx","../src/components/AdMeshEcommerceCards.tsx","../src/components/AdMeshSummaryLayout.tsx","../src/components/AdMeshLayout.tsx","../src/components/AdMeshInlineCard.tsx","../src/components/AdMeshBadge.tsx","../src/utils/themeUtils.ts","../src/index.ts"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","/**\n * @license React\n * react-jsx-runtime.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function getComponentNameFromType(type) {\n if (null == type) return null;\n if (\"function\" === typeof type)\n return type.$$typeof === REACT_CLIENT_REFERENCE\n ? null\n : type.displayName || type.name || null;\n if (\"string\" === typeof type) return type;\n switch (type) {\n case REACT_FRAGMENT_TYPE:\n return \"Fragment\";\n case REACT_PROFILER_TYPE:\n return \"Profiler\";\n case REACT_STRICT_MODE_TYPE:\n return \"StrictMode\";\n case REACT_SUSPENSE_TYPE:\n return \"Suspense\";\n case REACT_SUSPENSE_LIST_TYPE:\n return \"SuspenseList\";\n case REACT_ACTIVITY_TYPE:\n return \"Activity\";\n }\n if (\"object\" === typeof type)\n switch (\n (\"number\" === typeof type.tag &&\n console.error(\n \"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.\"\n ),\n type.$$typeof)\n ) {\n case REACT_PORTAL_TYPE:\n return \"Portal\";\n case REACT_CONTEXT_TYPE:\n return (type.displayName || \"Context\") + \".Provider\";\n case REACT_CONSUMER_TYPE:\n return (type._context.displayName || \"Context\") + \".Consumer\";\n case REACT_FORWARD_REF_TYPE:\n var innerType = type.render;\n type = type.displayName;\n type ||\n ((type = innerType.displayName || innerType.name || \"\"),\n (type = \"\" !== type ? \"ForwardRef(\" + type + \")\" : \"ForwardRef\"));\n return type;\n case REACT_MEMO_TYPE:\n return (\n (innerType = type.displayName || null),\n null !== innerType\n ? innerType\n : getComponentNameFromType(type.type) || \"Memo\"\n );\n case REACT_LAZY_TYPE:\n innerType = type._payload;\n type = type._init;\n try {\n return getComponentNameFromType(type(innerType));\n } catch (x) {}\n }\n return null;\n }\n function testStringCoercion(value) {\n return \"\" + value;\n }\n function checkKeyStringCoercion(value) {\n try {\n testStringCoercion(value);\n var JSCompiler_inline_result = !1;\n } catch (e) {\n JSCompiler_inline_result = !0;\n }\n if (JSCompiler_inline_result) {\n JSCompiler_inline_result = console;\n var JSCompiler_temp_const = JSCompiler_inline_result.error;\n var JSCompiler_inline_result$jscomp$0 =\n (\"function\" === typeof Symbol &&\n Symbol.toStringTag &&\n value[Symbol.toStringTag]) ||\n value.constructor.name ||\n \"Object\";\n JSCompiler_temp_const.call(\n JSCompiler_inline_result,\n \"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.\",\n JSCompiler_inline_result$jscomp$0\n );\n return testStringCoercion(value);\n }\n }\n function getTaskName(type) {\n if (type === REACT_FRAGMENT_TYPE) return \"<>\";\n if (\n \"object\" === typeof type &&\n null !== type &&\n type.$$typeof === REACT_LAZY_TYPE\n )\n return \"<...>\";\n try {\n var name = getComponentNameFromType(type);\n return name ? \"<\" + name + \">\" : \"<...>\";\n } catch (x) {\n return \"<...>\";\n }\n }\n function getOwner() {\n var dispatcher = ReactSharedInternals.A;\n return null === dispatcher ? null : dispatcher.getOwner();\n }\n function UnknownOwner() {\n return Error(\"react-stack-top-frame\");\n }\n function hasValidKey(config) {\n if (hasOwnProperty.call(config, \"key\")) {\n var getter = Object.getOwnPropertyDescriptor(config, \"key\").get;\n if (getter && getter.isReactWarning) return !1;\n }\n return void 0 !== config.key;\n }\n function defineKeyPropWarningGetter(props, displayName) {\n function warnAboutAccessingKey() {\n specialPropKeyWarningShown ||\n ((specialPropKeyWarningShown = !0),\n console.error(\n \"%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)\",\n displayName\n ));\n }\n warnAboutAccessingKey.isReactWarning = !0;\n Object.defineProperty(props, \"key\", {\n get: warnAboutAccessingKey,\n configurable: !0\n });\n }\n function elementRefGetterWithDeprecationWarning() {\n var componentName = getComponentNameFromType(this.type);\n didWarnAboutElementRef[componentName] ||\n ((didWarnAboutElementRef[componentName] = !0),\n console.error(\n \"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.\"\n ));\n componentName = this.props.ref;\n return void 0 !== componentName ? componentName : null;\n }\n function ReactElement(\n type,\n key,\n self,\n source,\n owner,\n props,\n debugStack,\n debugTask\n ) {\n self = props.ref;\n type = {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n props: props,\n _owner: owner\n };\n null !== (void 0 !== self ? self : null)\n ? Object.defineProperty(type, \"ref\", {\n enumerable: !1,\n get: elementRefGetterWithDeprecationWarning\n })\n : Object.defineProperty(type, \"ref\", { enumerable: !1, value: null });\n type._store = {};\n Object.defineProperty(type._store, \"validated\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: 0\n });\n Object.defineProperty(type, \"_debugInfo\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: null\n });\n Object.defineProperty(type, \"_debugStack\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugStack\n });\n Object.defineProperty(type, \"_debugTask\", {\n configurable: !1,\n enumerable: !1,\n writable: !0,\n value: debugTask\n });\n Object.freeze && (Object.freeze(type.props), Object.freeze(type));\n return type;\n }\n function jsxDEVImpl(\n type,\n config,\n maybeKey,\n isStaticChildren,\n source,\n self,\n debugStack,\n debugTask\n ) {\n var children = config.children;\n if (void 0 !== children)\n if (isStaticChildren)\n if (isArrayImpl(children)) {\n for (\n isStaticChildren = 0;\n isStaticChildren < children.length;\n isStaticChildren++\n )\n validateChildKeys(children[isStaticChildren]);\n Object.freeze && Object.freeze(children);\n } else\n console.error(\n \"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.\"\n );\n else validateChildKeys(children);\n if (hasOwnProperty.call(config, \"key\")) {\n children = getComponentNameFromType(type);\n var keys = Object.keys(config).filter(function (k) {\n return \"key\" !== k;\n });\n isStaticChildren =\n 0 < keys.length\n ? \"{key: someKey, \" + keys.join(\": ..., \") + \": ...}\"\n : \"{key: someKey}\";\n didWarnAboutKeySpread[children + isStaticChildren] ||\n ((keys =\n 0 < keys.length ? \"{\" + keys.join(\": ..., \") + \": ...}\" : \"{}\"),\n console.error(\n 'A props object containing a \"key\" prop is being spread into JSX:\\n let props = %s;\\n <%s {...props} />\\nReact keys must be passed directly to JSX without using spread:\\n let props = %s;\\n <%s key={someKey} {...props} />',\n isStaticChildren,\n children,\n keys,\n children\n ),\n (didWarnAboutKeySpread[children + isStaticChildren] = !0));\n }\n children = null;\n void 0 !== maybeKey &&\n (checkKeyStringCoercion(maybeKey), (children = \"\" + maybeKey));\n hasValidKey(config) &&\n (checkKeyStringCoercion(config.key), (children = \"\" + config.key));\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n children &&\n defineKeyPropWarningGetter(\n maybeKey,\n \"function\" === typeof type\n ? type.displayName || type.name || \"Unknown\"\n : type\n );\n return ReactElement(\n type,\n children,\n self,\n source,\n getOwner(),\n maybeKey,\n debugStack,\n debugTask\n );\n }\n function validateChildKeys(node) {\n \"object\" === typeof node &&\n null !== node &&\n node.$$typeof === REACT_ELEMENT_TYPE &&\n node._store &&\n (node._store.validated = 1);\n }\n var React = require(\"react\"),\n REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\n Symbol.for(\"react.provider\");\n var REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_ACTIVITY_TYPE = Symbol.for(\"react.activity\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\"),\n ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,\n hasOwnProperty = Object.prototype.hasOwnProperty,\n isArrayImpl = Array.isArray,\n createTask = console.createTask\n ? console.createTask\n : function () {\n return null;\n };\n React = {\n \"react-stack-bottom-frame\": function (callStackForError) {\n return callStackForError();\n }\n };\n var specialPropKeyWarningShown;\n var didWarnAboutElementRef = {};\n var unknownOwnerDebugStack = React[\"react-stack-bottom-frame\"].bind(\n React,\n UnknownOwner\n )();\n var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));\n var didWarnAboutKeySpread = {};\n exports.Fragment = REACT_FRAGMENT_TYPE;\n exports.jsx = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !1,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n exports.jsxs = function (type, config, maybeKey, source, self) {\n var trackActualOwner =\n 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;\n return jsxDEVImpl(\n type,\n config,\n maybeKey,\n !0,\n source,\n self,\n trackActualOwner\n ? Error(\"react-stack-top-frame\")\n : unknownOwnerDebugStack,\n trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask\n );\n };\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","import React from 'react';\nimport type { AdMeshRecommendation, AdMeshTheme } from '../types/index';\n\nexport interface AdMeshSummaryUnitProps {\n summaryText: string; // The citation_summary from backend response\n recommendations: AdMeshRecommendation[]; // Full recommendation objects\n theme?: AdMeshTheme;\n className?: string;\n style?: React.CSSProperties;\n onLinkClick?: (recommendation: AdMeshRecommendation) => void;\n}\n\n// Process summary text with markdown links [Product Name](admesh_link)\nconst processSummaryText = (summaryText: string, recommendations: AdMeshRecommendation[]) => {\n // Create lookup map for recommendations by admesh_link\n const linkToRecMap = new Map<string, AdMeshRecommendation>();\n recommendations.forEach(rec => {\n if (rec.admesh_link) {\n linkToRecMap.set(rec.admesh_link, rec);\n }\n });\n\n // Find markdown links and replace with JSX elements\n const markdownLinkRegex = /\\[([^\\]]+)\\]\\(([^)]+)\\)/g;\n const parts: (string | React.ReactElement)[] = [];\n let lastIndex = 0;\n let match;\n let linkCounter = 0;\n\n while ((match = markdownLinkRegex.exec(summaryText)) !== null) {\n const [fullMatch, linkText, url] = match;\n const recommendation = linkToRecMap.get(url);\n\n // Add text before the link\n if (match.index > lastIndex) {\n parts.push(summaryText.slice(lastIndex, match.index));\n }\n\n if (recommendation) {\n linkCounter++;\n // Create clickable link element\n parts.push(\n <a\n key={`summary-link-${linkCounter}`}\n href={recommendation.admesh_link}\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n className=\"text-blue-600 dark:text-blue-400 hover:text-blue-800 dark:hover:text-blue-300 underline decoration-blue-600 dark:decoration-blue-400 hover:decoration-blue-800 dark:hover:decoration-blue-300 transition-colors duration-200 font-medium\"\n style={{\n color: '#2563eb', // Force blue color\n textDecoration: 'underline',\n textDecorationColor: '#2563eb',\n textUnderlineOffset: '2px'\n }}\n onClick={(e) => {\n // Log comprehensive click data\n console.log('AdMesh summary link clicked:', {\n adId: recommendation.ad_id,\n productId: recommendation.product_id,\n title: recommendation.title || recommendation.recommendation_title,\n brand: recommendation.brand,\n pricing: recommendation.pricing,\n admeshLink: recommendation.admesh_link,\n source: 'summary'\n });\n\n // Call external tracker if available\n if (typeof window !== 'undefined' && (window as any).admeshTracker) {\n (window as any).admeshTracker.trackClick({\n adId: recommendation.ad_id,\n productId: recommendation.product_id,\n admeshLink: recommendation.admesh_link,\n source: 'summary'\n });\n }\n }}\n >\n {linkText}\n </a>\n );\n } else {\n // Keep original text if no recommendation found\n console.warn(`[AdMesh Summary] No recommendation found for link: [${linkText}](${url})`);\n parts.push(fullMatch);\n }\n\n lastIndex = match.index + fullMatch.length;\n }\n\n // Add remaining text\n if (lastIndex < summaryText.length) {\n parts.push(summaryText.slice(lastIndex));\n }\n\n return parts;\n};\n\nexport const AdMeshSummaryUnit: React.FC<AdMeshSummaryUnitProps> = ({\n summaryText,\n recommendations,\n theme,\n className = '',\n style = {},\n onLinkClick\n}) => {\n // Validate inputs\n if (!summaryText || !summaryText.trim()) {\n console.warn('[AdMesh Summary] No summary text provided');\n return null;\n }\n\n if (!recommendations || recommendations.length === 0) {\n console.warn('[AdMesh Summary] No recommendations provided');\n return (\n <div className={`admesh-summary-unit ${className}`} style={style}>\n <p className=\"text-gray-700 dark:text-gray-300 leading-relaxed\">\n {summaryText}\n </p>\n </div>\n );\n }\n\n // Process the summary text to create clickable links\n const processedContent = processSummaryText(summaryText, recommendations);\n\n return (\n <div \n className={`admesh-summary-unit ${className}`}\n style={{\n fontFamily: theme?.fontFamily || '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n ...style\n }}\n >\n {/* Summary Content */}\n <div className=\"summary-content\">\n <p className=\"text-gray-700 dark:text-gray-300 leading-relaxed text-base\">\n {processedContent.map((part, index) => (\n <React.Fragment key={index}>{part}</React.Fragment>\n ))}\n </p>\n </div>\n\n {/* Disclosure */}\n <div className=\"mt-3 pt-2 border-t border-gray-200 dark:border-gray-700\">\n <p className=\"text-xs text-gray-500 dark:text-gray-400\">\n Partner Recommendation • Powered by AdMesh\n </p>\n </div>\n </div>\n );\n};\n\nexport default AdMeshSummaryUnit;\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames () {\n\t\tvar classes = '';\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (arg) {\n\t\t\t\tclasses = appendClass(classes, parseValue(arg));\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction parseValue (arg) {\n\t\tif (typeof arg === 'string' || typeof arg === 'number') {\n\t\t\treturn arg;\n\t\t}\n\n\t\tif (typeof arg !== 'object') {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (Array.isArray(arg)) {\n\t\t\treturn classNames.apply(null, arg);\n\t\t}\n\n\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\treturn arg.toString();\n\t\t}\n\n\t\tvar classes = '';\n\n\t\tfor (var key in arg) {\n\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\tclasses = appendClass(classes, key);\n\t\t\t}\n\t\t}\n\n\t\treturn classes;\n\t}\n\n\tfunction appendClass (value, newClass) {\n\t\tif (!newClass) {\n\t\t\treturn value;\n\t\t}\n\t\n\t\tif (value) {\n\t\t\treturn value + ' ' + newClass;\n\t\t}\n\t\n\t\treturn value + newClass;\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import { useState, useCallback, useMemo } from 'react';\nimport type { TrackingData, UseAdMeshTrackerReturn } from '../types/index';\n\n// Default tracking endpoint - can be overridden via config\nconst DEFAULT_TRACKING_URL = 'https://api.useadmesh.com/track';\n\ninterface TrackingConfig {\n apiBaseUrl?: string;\n enabled?: boolean;\n debug?: boolean;\n retryAttempts?: number;\n retryDelay?: number;\n}\n\n// Global config that can be set by the consuming application\nlet globalConfig: TrackingConfig = {\n apiBaseUrl: DEFAULT_TRACKING_URL,\n enabled: true,\n debug: false,\n retryAttempts: 3,\n retryDelay: 1000\n};\n\nexport const setAdMeshTrackerConfig = (config: Partial<TrackingConfig>) => {\n globalConfig = { ...globalConfig, ...config };\n};\n\nexport const useAdMeshTracker = (config?: Partial<TrackingConfig>): UseAdMeshTrackerReturn => {\n const [isTracking, setIsTracking] = useState(false);\n const [error, setError] = useState<string | null>(null);\n\n const mergedConfig = useMemo(() => ({ ...globalConfig, ...config }), [config]);\n\n const log = useCallback((message: string, data?: unknown) => {\n if (mergedConfig.debug) {\n console.log(`[AdMesh Tracker] ${message}`, data);\n }\n }, [mergedConfig.debug]);\n\n const sendTrackingEvent = useCallback(async (\n eventType: 'click' | 'view' | 'conversion',\n data: TrackingData\n ): Promise<void> => {\n if (!mergedConfig.enabled) {\n log('Tracking disabled, skipping event', { eventType, data });\n return;\n }\n\n if (!data.adId || !data.admeshLink) {\n const errorMsg = 'Missing required tracking data: adId and admeshLink are required';\n log(errorMsg, data);\n setError(errorMsg);\n return;\n }\n\n setIsTracking(true);\n setError(null);\n\n const payload = {\n event_type: eventType,\n ad_id: data.adId,\n admesh_link: data.admeshLink,\n product_id: data.productId,\n user_id: data.userId,\n session_id: data.sessionId,\n revenue: data.revenue,\n conversion_type: data.conversionType,\n metadata: data.metadata,\n timestamp: new Date().toISOString(),\n user_agent: navigator.userAgent,\n referrer: document.referrer,\n page_url: window.location.href\n };\n\n log(`Sending ${eventType} event`, payload);\n\n let lastError: Error | null = null;\n \n for (let attempt = 1; attempt <= (mergedConfig.retryAttempts || 3); attempt++) {\n try {\n const response = await fetch(`${mergedConfig.apiBaseUrl}/events`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify(payload),\n });\n\n if (!response.ok) {\n throw new Error(`HTTP ${response.status}: ${response.statusText}`);\n }\n\n const result = await response.json();\n log(`${eventType} event tracked successfully`, result);\n setIsTracking(false);\n return;\n\n } catch (err) {\n lastError = err as Error;\n log(`Attempt ${attempt} failed for ${eventType} event`, err);\n \n if (attempt < (mergedConfig.retryAttempts || 3)) {\n await new Promise(resolve => \n setTimeout(resolve, (mergedConfig.retryDelay || 1000) * attempt)\n );\n }\n }\n }\n\n // All attempts failed\n const errorMsg = `Failed to track ${eventType} event after ${mergedConfig.retryAttempts} attempts: ${lastError?.message}`;\n log(errorMsg, lastError);\n setError(errorMsg);\n setIsTracking(false);\n }, [mergedConfig, log]);\n\n const trackClick = useCallback(async (data: TrackingData): Promise<void> => {\n return sendTrackingEvent('click', data);\n }, [sendTrackingEvent]);\n\n const trackView = useCallback(async (data: TrackingData): Promise<void> => {\n return sendTrackingEvent('view', data);\n }, [sendTrackingEvent]);\n\n const trackConversion = useCallback(async (data: TrackingData): Promise<void> => {\n if (!data.revenue && !data.conversionType) {\n log('Warning: Conversion tracking without revenue or conversion type', data);\n }\n return sendTrackingEvent('conversion', data);\n }, [sendTrackingEvent, log]);\n\n return {\n trackClick,\n trackView,\n trackConversion,\n isTracking,\n error\n };\n};\n\n// Utility function to build admesh_link with tracking parameters\nexport const buildAdMeshLink = (\n baseLink: string, \n adId: string, \n additionalParams?: Record<string, string>\n): string => {\n try {\n const url = new URL(baseLink);\n url.searchParams.set('ad_id', adId);\n url.searchParams.set('utm_source', 'admesh');\n url.searchParams.set('utm_medium', 'recommendation');\n \n if (additionalParams) {\n Object.entries(additionalParams).forEach(([key, value]) => {\n url.searchParams.set(key, value);\n });\n }\n \n return url.toString();\n } catch (err) {\n console.warn('[AdMesh] Invalid URL provided to buildAdMeshLink:', baseLink, err);\n return baseLink;\n }\n};\n\n// Helper function to extract tracking data from recommendation\nexport const extractTrackingData = (\n recommendation: { ad_id: string; admesh_link: string; product_id: string },\n additionalData?: Partial<TrackingData>\n): TrackingData => {\n return {\n adId: recommendation.ad_id,\n admeshLink: recommendation.admesh_link,\n productId: recommendation.product_id,\n ...additionalData\n };\n};\n","import React, { useCallback, useEffect, useRef } from 'react';\nimport type { AdMeshLinkTrackerProps } from '../types/index';\nimport { useAdMeshTracker } from '../hooks/useAdMeshTracker';\n\nexport const AdMeshLinkTracker: React.FC<AdMeshLinkTrackerProps> = ({\n adId,\n admeshLink,\n productId,\n children,\n trackingData,\n className,\n style\n}) => {\n const { trackClick, trackView } = useAdMeshTracker();\n const elementRef = useRef<HTMLDivElement>(null);\n const hasTrackedView = useRef(false);\n\n // Track view when component becomes visible\n useEffect(() => {\n if (!elementRef.current || hasTrackedView.current) return;\n\n const observer = new IntersectionObserver(\n (entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting && !hasTrackedView.current) {\n hasTrackedView.current = true;\n trackView({\n adId,\n admeshLink,\n productId,\n ...trackingData\n }).catch(console.error);\n }\n });\n },\n {\n threshold: 0.5, // Track when 50% of the element is visible\n rootMargin: '0px'\n }\n );\n\n observer.observe(elementRef.current);\n\n return () => {\n observer.disconnect();\n };\n }, [adId, admeshLink, productId, trackingData, trackView]);\n\n const handleClick = useCallback(async (event: React.MouseEvent) => {\n // Track the click\n try {\n await trackClick({\n adId,\n admeshLink,\n productId,\n ...trackingData\n });\n } catch (error) {\n console.error('Failed to track click:', error);\n }\n\n\n\n // If the children contain a link, let the browser handle navigation\n // Otherwise, navigate programmatically\n const target = event.target as HTMLElement;\n const link = target.closest('a');\n \n if (!link) {\n // No link found, navigate programmatically\n window.open(admeshLink, '_blank', 'noopener,noreferrer');\n }\n // If there's a link, let the browser handle it naturally\n }, [adId, admeshLink, productId, trackingData, trackClick]);\n\n return (\n <div\n ref={elementRef}\n className={className}\n onClick={handleClick}\n style={{\n cursor: 'pointer',\n ...style\n }}\n >\n {children}\n </div>\n );\n};\n\nAdMeshLinkTracker.displayName = 'AdMeshLinkTracker';\n","import { useEffect } from 'react';\n\n// Complete CSS content as a string - this will be injected automatically\nconst ADMESH_STYLES = `\n/* AdMesh UI SDK - Complete Self-Contained Styles */\n\n/* CSS Reset for AdMesh components */\n.admesh-component, .admesh-component * {\n box-sizing: border-box;\n}\n\n/* CSS Variables */\n.admesh-component {\n --admesh-primary: #6366f1;\n --admesh-primary-hover: #4f46e5;\n --admesh-secondary: #8b5cf6;\n --admesh-accent: #06b6d4;\n --admesh-background: #ffffff;\n --admesh-surface: #ffffff;\n --admesh-border: #e2e8f0;\n --admesh-text: #0f172a;\n --admesh-text-muted: #64748b;\n --admesh-text-light: #94a3b8;\n --admesh-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --admesh-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);\n --admesh-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --admesh-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --admesh-radius: 0.75rem;\n --admesh-radius-sm: 0.375rem;\n --admesh-radius-lg: 1rem;\n --admesh-radius-xl: 1.5rem;\n}\n\n.admesh-component[data-admesh-theme=\"dark\"] {\n --admesh-background: #111827;\n --admesh-surface: #1f2937;\n --admesh-border: #374151;\n --admesh-text: #f9fafb;\n --admesh-text-muted: #9ca3af;\n --admesh-text-light: #6b7280;\n --admesh-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.3), 0 1px 2px -1px rgb(0 0 0 / 0.3);\n --admesh-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.3), 0 2px 4px -2px rgb(0 0 0 / 0.3);\n --admesh-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.3), 0 4px 6px -4px rgb(0 0 0 / 0.3);\n --admesh-shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.3), 0 8px 10px -6px rgb(0 0 0 / 0.3);\n}\n\n/* Layout Styles */\n.admesh-layout {\n font-family: -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, sans-serif;\n color: var(--admesh-text);\n background-color: var(--admesh-background);\n border-radius: var(--admesh-radius);\n padding: 1.5rem;\n box-shadow: var(--admesh-shadow);\n border: 1px solid var(--admesh-border);\n /* Consistent width: 100% for all layouts except ecommerce */\n width: 100%;\n}\n\n/* Ecommerce layout exception */\n.admesh-layout--ecommerce {\n width: auto;\n}\n\n/* Citation Unit Styles */\n.admesh-citation-unit {\n width: 100%;\n}\n\n/* Inline Recommendation Styles */\n.admesh-inline-recommendation {\n width: 100%;\n}\n\n/* Simple Ad Styles */\n.admesh-simple-ad {\n width: 100%;\n}\n\n.admesh-layout__header {\n margin-bottom: 1.5rem;\n text-align: center;\n}\n\n.admesh-layout__title {\n font-size: 1.25rem;\n font-weight: 600;\n color: var(--admesh-text);\n margin-bottom: 0.5rem;\n}\n\n.admesh-layout__subtitle {\n font-size: 0.875rem;\n color: var(--admesh-text-muted);\n}\n\n.admesh-layout__cards-grid {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));\n gap: 1rem;\n margin-bottom: 1.5rem;\n}\n\n.admesh-layout__more-indicator {\n text-align: center;\n padding: 1rem;\n color: var(--admesh-text-muted);\n font-size: 0.875rem;\n}\n\n.admesh-layout__empty {\n text-align: center;\n padding: 3rem 1rem;\n}\n\n.admesh-layout__empty-content h3 {\n font-size: 1.125rem;\n font-weight: 600;\n color: var(--admesh-text-muted);\n margin-bottom: 0.5rem;\n}\n\n.admesh-layout__empty-content p {\n font-size: 0.875rem;\n color: var(--admesh-text-muted);\n}\n\n/* Product Card Styles */\n.admesh-product-card {\n background-color: var(--admesh-surface);\n border: 1px solid var(--admesh-border);\n border-radius: var(--admesh-radius);\n padding: 1.5rem;\n transition: all 0.2s ease-in-out;\n position: relative;\n overflow: hidden;\n /* Consistent width: 100% for product cards */\n width: 100%;\n}\n\n.admesh-product-card:hover {\n box-shadow: var(--admesh-shadow-lg);\n transform: translateY(-2px);\n border-color: var(--admesh-primary);\n}\n\n.admesh-product-card__header {\n display: flex;\n justify-content: space-between;\n align-items: flex-start;\n margin-bottom: 1rem;\n}\n\n.admesh-product-card__title {\n font-size: 1.125rem;\n font-weight: 600;\n color: var(--admesh-text);\n margin-bottom: 0.5rem;\n line-height: 1.4;\n}\n\n.admesh-product-card__reason {\n font-size: 0.875rem;\n color: var(--admesh-text-muted);\n line-height: 1.5;\n margin-bottom: 1rem;\n}\n\n.admesh-product-card__match-score {\n margin-bottom: 1rem;\n}\n\n.admesh-product-card__match-score-label {\n display: flex;\n justify-content: space-between;\n align-items: center;\n font-size: 0.75rem;\n color: var(--admesh-text-muted);\n margin-bottom: 0.25rem;\n}\n\n.admesh-product-card__match-score-bar {\n width: 100%;\n height: 0.375rem;\n background-color: var(--admesh-border);\n border-radius: var(--admesh-radius-sm);\n overflow: hidden;\n}\n\n.admesh-product-card__match-score-fill {\n height: 100%;\n background: linear-gradient(90deg, var(--admesh-primary), #8b5cf6);\n border-radius: var(--admesh-radius-sm);\n transition: width 0.3s ease-in-out;\n}\n\n.admesh-product-card__badges {\n display: flex;\n flex-wrap: wrap;\n gap: 0.5rem;\n margin-bottom: 1rem;\n}\n\n.admesh-product-card__badge {\n display: inline-flex;\n align-items: center;\n gap: 0.25rem;\n padding: 0.25rem 0.5rem;\n background-color: var(--admesh-primary);\n color: white;\n font-size: 0.75rem;\n font-weight: 500;\n border-radius: var(--admesh-radius-sm);\n}\n\n.admesh-product-card__badge--secondary {\n background-color: var(--admesh-secondary);\n}\n\n.admesh-product-card__keywords {\n display: flex;\n flex-wrap: wrap;\n gap: 0.25rem;\n margin-bottom: 1rem;\n}\n\n.admesh-product-card__keyword {\n padding: 0.125rem 0.375rem;\n background-color: var(--admesh-border);\n color: var(--admesh-text-muted);\n font-size: 0.75rem;\n border-radius: var(--admesh-radius-sm);\n}\n\n/* Dark mode specific enhancements */\n.admesh-component[data-admesh-theme=\"dark\"] .admesh-product-card__keyword {\n background-color: #4b5563;\n color: #d1d5db;\n}\n\n.admesh-component[data-admesh-theme=\"dark\"] .admesh-product-card:hover {\n border-color: var(--admesh-primary);\n background-color: #374151;\n}\n\n.admesh-component[data-admesh-theme=\"dark\"] .admesh-product-card__button:hover {\n background: linear-gradient(90deg, var(--admesh-primary-hover), var(--admesh-primary));\n}\n\n.admesh-product-card__footer {\n display: flex;\n justify-content: flex-end;\n margin-top: 1.5rem;\n}\n\n/* Mobile-specific sidebar improvements */\n@media (max-width: 640px) {\n .admesh-sidebar {\n /* Ensure proper mobile viewport handling */\n height: 100vh !important;\n height: 100dvh !important; /* Dynamic viewport height for mobile browsers */\n max-height: 100vh !important;\n max-height: 100dvh !important;\n width: 100vw !important;\n max-width: 90vw !important;\n overflow: hidden !important;\n }\n\n .admesh-sidebar.relative {\n height: 100% !important;\n width: 100% !important;\n max-width: 100% !important;\n }\n\n /* Improve touch scrolling */\n .admesh-sidebar .overflow-y-auto {\n -webkit-overflow-scrolling: touch !important;\n overscroll-behavior: contain !important;\n scroll-behavior: smooth !important;\n }\n\n /* Prevent body scroll when sidebar is open */\n body:has(.admesh-sidebar[data-mobile-open=\"true\"]) {\n overflow: hidden !important;\n position: fixed !important;\n width: 100% !important;\n }\n}\n\n/* Tablet improvements */\n@media (min-width: 641px) and (max-width: 1024px) {\n .admesh-sidebar {\n max-width: 400px !important;\n }\n}\n\n/* Mobile responsiveness improvements for all components */\n@media (max-width: 640px) {\n /* Product cards mobile optimization */\n .admesh-card {\n padding: 0.75rem !important;\n margin-bottom: 0.75rem !important;\n }\n\n /* Inline recommendations mobile optimization */\n .admesh-inline-recommendation {\n padding: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n /* Conversation summary mobile optimization */\n .admesh-conversation-summary {\n padding: 1rem !important;\n }\n\n /* Percentage text mobile improvements */\n .admesh-component .text-xs {\n font-size: 0.75rem !important;\n line-height: 1rem !important;\n }\n\n .admesh-component .text-sm {\n font-size: 0.875rem !important;\n line-height: 1.25rem !important;\n }\n\n /* Button mobile improvements */\n .admesh-component button {\n padding: 0.375rem 0.75rem !important;\n font-size: 0.75rem !important;\n min-height: 2rem !important;\n touch-action: manipulation !important;\n }\n\n /* Badge mobile improvements */\n .admesh-component .rounded-full {\n padding: 0.25rem 0.5rem !important;\n font-size: 0.625rem !important;\n line-height: 1rem !important;\n }\n\n /* Progress bar mobile improvements */\n .admesh-component .bg-gray-200,\n .admesh-component .bg-slate-600 {\n height: 0.25rem !important;\n }\n\n /* Flex layout mobile improvements */\n .admesh-component .flex {\n flex-wrap: wrap !important;\n }\n\n .admesh-component .gap-2 {\n gap: 0.375rem !important;\n }\n\n .admesh-component .gap-3 {\n gap: 0.5rem !important;\n }\n}\n\n.admesh-product-card__button {\n display: inline-flex;\n align-items: center;\n gap: 0.5rem;\n padding: 0.75rem 1.5rem;\n background: linear-gradient(90deg, var(--admesh-primary), var(--admesh-primary-hover));\n color: white;\n font-size: 0.875rem;\n font-weight: 500;\n border: none;\n border-radius: var(--admesh-radius);\n cursor: pointer;\n transition: all 0.2s ease-in-out;\n text-decoration: none;\n}\n\n.admesh-product-card__button:hover {\n transform: translateY(-1px);\n box-shadow: var(--admesh-shadow-lg);\n}\n\n/* Utility Classes */\n.admesh-text-xs { font-size: 0.75rem; }\n.admesh-text-sm { font-size: 0.875rem; }\n.admesh-text-base { font-size: 1rem; }\n.admesh-text-lg { font-size: 1.125rem; }\n.admesh-text-xl { font-size: 1.25rem; }\n\n.admesh-font-medium { font-weight: 500; }\n.admesh-font-semibold { font-weight: 600; }\n.admesh-font-bold { font-weight: 700; }\n\n.admesh-text-muted { color: var(--admesh-text-muted); }\n\n/* Comparison Table Styles */\n.admesh-compare-table {\n width: 100%;\n border-collapse: collapse;\n background-color: var(--admesh-surface);\n border: 1px solid var(--admesh-border);\n border-radius: var(--admesh-radius);\n overflow: hidden;\n}\n\n.admesh-compare-table th,\n.admesh-compare-table td {\n padding: 0.75rem;\n text-align: left;\n border-bottom: 1px solid var(--admesh-border);\n}\n\n.admesh-compare-table th {\n background-color: var(--admesh-background);\n font-weight: 600;\n color: var(--admesh-text);\n font-size: 0.875rem;\n}\n\n.admesh-compare-table td {\n color: var(--admesh-text);\n font-size: 0.875rem;\n}\n\n.admesh-compare-table tr:hover {\n background-color: var(--admesh-border);\n}\n\n/* Dark mode table enhancements */\n.admesh-component[data-admesh-theme=\"dark\"] .admesh-compare-table th {\n background-color: #374151;\n}\n\n.admesh-component[data-admesh-theme=\"dark\"] .admesh-compare-table tr:hover {\n background-color: #4b5563;\n}\n\n/* Responsive Design */\n@media (max-width: 768px) {\n .admesh-layout {\n padding: 1rem;\n }\n\n .admesh-layout__cards-grid {\n grid-template-columns: 1fr;\n gap: 0.75rem;\n }\n\n .admesh-product-card {\n padding: 1rem;\n }\n\n .admesh-compare-table {\n font-size: 0.75rem;\n }\n\n .admesh-compare-table th,\n .admesh-compare-table td {\n padding: 0.5rem;\n }\n}\n\n/* Essential Utility Classes for Self-Contained SDK - High Specificity */\n.admesh-component .relative { position: relative !important; }\n.admesh-component .absolute { position: absolute !important; }\n.admesh-component .flex { display: flex !important; }\n.admesh-component .inline-flex { display: inline-flex !important; }\n.admesh-component .grid { display: grid !important; }\n.admesh-component .hidden { display: none !important; }\n.admesh-component .block { display: block !important; }\n.admesh-component .inline-block { display: inline-block !important; }\n\n/* Flexbox utilities */\n.admesh-component .flex-col { flex-direction: column !important; }\n.admesh-component .flex-row { flex-direction: row !important; }\n.admesh-component .flex-wrap { flex-wrap: wrap !important; }\n.admesh-component .items-center { align-items: center !important; }\n.admesh-component .items-start { align-items: flex-start !important; }\n.admesh-component .items-end { align-items: flex-end !important; }\n.admesh-component .justify-center { justify-content: center !important; }\n.admesh-component .justify-between { justify-content: space-between !important; }\n.admesh-component .justify-end { justify-content: flex-end !important; }\n.admesh-component .flex-1 { flex: 1 1 0% !important; }\n.admesh-component .flex-shrink-0 { flex-shrink: 0 !important; }\n\n/* Grid utilities */\n.admesh-component .grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }\n.admesh-component .grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n.admesh-component .grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n\n/* Spacing utilities */\n.admesh-component .gap-1 { gap: 0.25rem; }\n.admesh-component .gap-2 { gap: 0.5rem; }\n.admesh-component .gap-3 { gap: 0.75rem; }\n.admesh-component .gap-4 { gap: 1rem; }\n.admesh-component .gap-6 { gap: 1.5rem; }\n.admesh-component .gap-8 { gap: 2rem; }\n\n/* Padding utilities */\n.admesh-component .p-1 { padding: 0.25rem; }\n.admesh-component .p-2 { padding: 0.5rem; }\n.admesh-component .p-3 { padding: 0.75rem; }\n.admesh-component .p-4 { padding: 1rem; }\n.admesh-component .p-5 { padding: 1.25rem; }\n.admesh-component .p-6 { padding: 1.5rem; }\n.admesh-component .px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }\n.admesh-component .px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }\n.admesh-component .px-4 { padding-left: 1rem; padding-right: 1rem; }\n.admesh-component .py-1 { padding-top: 0.25rem; padding-bottom: 0.25rem; }\n.admesh-component .py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }\n.admesh-component .py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }\n.admesh-component .pt-2 { padding-top: 0.5rem; }\n.admesh-component .pt-3 { padding-top: 0.75rem; }\n.admesh-component .pb-2 { padding-bottom: 0.5rem; }\n.admesh-component .pb-3 { padding-bottom: 0.75rem; }\n\n/* Margin utilities */\n.admesh-component .m-0 { margin: 0; }\n.admesh-component .mb-1 { margin-bottom: 0.25rem; }\n.admesh-component .mb-2 { margin-bottom: 0.5rem; }\n.admesh-component .mb-3 { margin-bottom: 0.75rem; }\n.admesh-component .mb-4 { margin-bottom: 1rem; }\n.admesh-component .mb-6 { margin-bottom: 1.5rem; }\n.admesh-component .mt-1 { margin-top: 0.25rem; }\n.admesh-component .mt-2 { margin-top: 0.5rem; }\n.admesh-component .mt-4 { margin-top: 1rem; }\n.admesh-component .mt-6 { margin-top: 1.5rem; }\n.admesh-component .mt-auto { margin-top: auto; }\n.admesh-component .ml-1 { margin-left: 0.25rem; }\n.admesh-component .mr-1 { margin-right: 0.25rem; }\n.admesh-component .mr-2 { margin-right: 0.5rem; }\n\n/* Width and height utilities */\n.admesh-component .w-2 { width: 0.5rem; }\n.admesh-component .w-3 { width: 0.75rem; }\n.admesh-component .w-4 { width: 1rem; }\n.admesh-component .w-5 { width: 1.25rem; }\n.admesh-component .w-6 { width: 1.5rem; }\n.admesh-component .w-full { width: 100%; }\n.admesh-component .w-fit { width: fit-content; }\n.admesh-component .h-2 { height: 0.5rem; }\n.admesh-component .h-3 { height: 0.75rem; }\n.admesh-component .h-4 { height: 1rem; }\n.admesh-component .h-5 { height: 1.25rem; }\n.admesh-component .h-6 { height: 1.5rem; }\n.admesh-component .h-full { height: 100%; }\n.admesh-component .min-w-0 { min-width: 0px; }\n\n/* Border utilities */\n.admesh-component .border { border-width: 1px; }\n.admesh-component .border-t { border-top-width: 1px; }\n.admesh-component .border-gray-100 { border-color: #f3f4f6; }\n.admesh-component .border-gray-200 { border-color: #e5e7eb; }\n.admesh-component .border-gray-300 { border-color: #d1d5db; }\n.admesh-component .border-blue-200 { border-color: #bfdbfe; }\n.admesh-component .border-green-200 { border-color: #bbf7d0; }\n\n/* Border radius utilities */\n.admesh-component .rounded { border-radius: 0.25rem !important; }\n.admesh-component .rounded-md { border-radius: 0.375rem !important; }\n.admesh-component .rounded-lg { border-radius: 0.5rem !important; }\n.admesh-component .rounded-xl { border-radius: 0.75rem !important; }\n.admesh-component .rounded-full { border-radius: 9999px !important; }\n\n/* Background utilities */\n.admesh-component .bg-white { background-color: #ffffff; }\n.admesh-component .bg-gray-50 { background-color: #f9fafb; }\n.admesh-component .bg-gray-100 { background-color: #f3f4f6; }\n.admesh-component .bg-blue-50 { background-color: #eff6ff; }\n.admesh-component .bg-blue-100 { background-color: #dbeafe; }\n.admesh-component .bg-green-100 { background-color: #dcfce7; }\n.admesh-component .bg-green-500 { background-color: #22c55e; }\n.admesh-component .bg-blue-500 { background-color: #3b82f6; }\n\n/* Gradients */\n.admesh-component .bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }\n.admesh-component .bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }\n.admesh-component .from-white { --tw-gradient-from: #ffffff; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(255, 255, 255, 0)); }\n.admesh-component .to-gray-50 { --tw-gradient-to: #f9fafb; }\n.admesh-component .from-purple-500 { --tw-gradient-from: #a855f7; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(168, 85, 247, 0)); }\n.admesh-component .to-pink-500 { --tw-gradient-to: #ec4899; }\n.admesh-component .from-green-400 { --tw-gradient-from: #4ade80; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(74, 222, 128, 0)); }\n.admesh-component .to-blue-500 { --tw-gradient-to: #3b82f6; }\n\n/* Text utilities */\n.admesh-component .text-xs { font-size: 0.75rem; line-height: 1rem; }\n.admesh-component .text-sm { font-size: 0.875rem; line-height: 1.25rem; }\n.admesh-component .text-base { font-size: 1rem; line-height: 1.5rem; }\n.admesh-component .text-lg { font-size: 1.125rem; line-height: 1.75rem; }\n.admesh-component .text-xl { font-size: 1.25rem; line-height: 1.75rem; }\n.admesh-component .font-medium { font-weight: 500; }\n.admesh-component .font-semibold { font-weight: 600; }\n.admesh-component .font-bold { font-weight: 700; }\n.admesh-component .leading-relaxed { line-height: 1.625; }\n\n/* Text colors */\n.admesh-component .text-white { color: #ffffff; }\n.admesh-component .text-gray-400 { color: #9ca3af; }\n.admesh-component .text-gray-500 { color: #6b7280; }\n.admesh-component .text-gray-600 { color: #4b5563; }\n.admesh-component .text-gray-700 { color: #374151; }\n.admesh-component .text-gray-800 { color: #1f2937; }\n.admesh-component .text-blue-600 { color: #2563eb; }\n.admesh-component .text-blue-700 { color: #1d4ed8; }\n.admesh-component .text-green-700 { color: #15803d; }\n\n/* Shadow utilities */\n.admesh-component .shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05); }\n.admesh-component .shadow { box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1); }\n.admesh-component .shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1); }\n.admesh-component .shadow-lg { box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }\n.admesh-component .shadow-xl { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }\n\n/* Transition utilities */\n.admesh-component .transition-all { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }\n.admesh-component .transition-colors { transition-property: color, background-color, border-color, text-decoration-color, fill, stroke; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 150ms; }\n.admesh-component .duration-200 { transition-duration: 200ms; }\n.admesh-component .duration-300 { transition-duration: 300ms; }\n\n/* Transform utilities */\n.admesh-component .hover\\\\:-translate-y-1:hover { transform: translateY(-0.25rem); }\n.admesh-component .hover\\\\:scale-105:hover { transform: scale(1.05); }\n\n/* Hover utilities */\n.admesh-component .hover\\\\:shadow-xl:hover { box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1); }\n.admesh-component .hover\\\\:bg-gray-100:hover { background-color: #f3f4f6; }\n.admesh-component .hover\\\\:text-blue-800:hover { color: #1e40af; }\n\n/* Cursor utilities */\n.admesh-component .cursor-pointer { cursor: pointer; }\n\n/* Overflow utilities */\n.admesh-component .overflow-hidden { overflow: hidden; }\n.admesh-component .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n\n/* Text decoration */\n.admesh-component .underline { text-decoration-line: underline; }\n\n/* Whitespace */\n.admesh-component .whitespace-nowrap { white-space: nowrap; }\n\n/* Dark mode utilities */\n@media (prefers-color-scheme: dark) {\n .admesh-component .dark\\\\:bg-slate-800 { background-color: #1e293b; }\n .admesh-component .dark\\\\:bg-slate-900 { background-color: #0f172a; }\n .admesh-component .dark\\\\:border-slate-700 { border-color: #334155; }\n .admesh-component .dark\\\\:text-white { color: #ffffff; }\n .admesh-component .dark\\\\:text-gray-200 { color: #e5e7eb; }\n .admesh-component .dark\\\\:text-gray-300 { color: #d1d5db; }\n .admesh-component .dark\\\\:text-gray-400 { color: #9ca3af; }\n .admesh-component .dark\\\\:text-blue-400 { color: #60a5fa; }\n}\n\n/* Responsive utilities */\n@media (min-width: 640px) {\n .admesh-component .sm\\\\:p-5 { padding: 1.25rem; }\n .admesh-component .sm\\\\:text-base { font-size: 1rem; line-height: 1.5rem; }\n .admesh-component .sm\\\\:text-lg { font-size: 1.125rem; line-height: 1.75rem; }\n .admesh-component .sm\\\\:flex-row { flex-direction: row; }\n .admesh-component .sm\\\\:items-center { align-items: center; }\n .admesh-component .sm\\\\:justify-between { justify-content: space-between; }\n}\n\n@media (min-width: 768px) {\n .admesh-component .md\\\\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }\n}\n\n@media (min-width: 1024px) {\n .admesh-component .lg\\\\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }\n .admesh-component .lg\\\\:col-span-1 { grid-column: span 1 / span 1; }\n}\n`;\n\nlet stylesInjected = false;\n\nexport const useAdMeshStyles = () => {\n useEffect(() => {\n if (stylesInjected) return;\n\n // Create and inject styles\n const styleElement = document.createElement('style');\n styleElement.id = 'admesh-ui-sdk-styles';\n styleElement.textContent = ADMESH_STYLES;\n \n // Check if styles are already injected\n if (!document.getElementById('admesh-ui-sdk-styles')) {\n document.head.appendChild(styleElement);\n stylesInjected = true;\n }\n\n // Cleanup function\n return () => {\n const existingStyle = document.getElementById('admesh-ui-sdk-styles');\n if (existingStyle && document.head.contains(existingStyle)) {\n document.head.removeChild(existingStyle);\n stylesInjected = false;\n }\n };\n }, []);\n};\n","import type { AdMeshRecommendation } from '../types/index';\n\n/**\n * Utility functions for generating compliant disclosure labels and tooltips\n */\n\nexport interface DisclosureConfig {\n showTooltips?: boolean;\n compactMode?: boolean;\n customLabels?: {\n partnerRecommendation?: string;\n partnerMatch?: string;\n promotedOption?: string;\n relatedOption?: string;\n };\n}\n\n/**\n * Generate appropriate label based on match score and recommendation quality\n */\nexport const getRecommendationLabel = (\n recommendation: AdMeshRecommendation,\n config: DisclosureConfig = {}\n): string => {\n const matchScore = recommendation.intent_match_score || 0;\n const customLabels = config.customLabels || {};\n\n // High match score (>0.8)\n if (matchScore >= 0.8) {\n return customLabels.partnerRecommendation || 'Partner Recommendation';\n }\n \n // Medium match score (0.6-0.8)\n if (matchScore >= 0.6) {\n return customLabels.partnerMatch || 'Partner Match';\n }\n \n // Lower match score (<0.6)\n if (matchScore >= 0.3) {\n return customLabels.promotedOption || 'Promoted';\n }\n \n // Very low match - related option\n return customLabels.relatedOption || 'Related';\n};\n\n/**\n * Generate tooltip text for recommendation labels\n */\nexport const getLabelTooltip = (\n recommendation: AdMeshRecommendation,\n _label: string\n): string => {\n const matchScore = recommendation.intent_match_score || 0;\n\n if (matchScore >= 0.8) {\n return \"This recommendation is from a partner who compensates us when you engage. We've matched it to your needs based on your query.\";\n }\n \n if (matchScore >= 0.6) {\n return \"Top-rated partner solution matched to your specific requirements. Partner compensates us for qualified referrals.\";\n }\n \n if (matchScore >= 0.3) {\n return \"This partner solution may be relevant to your needs. The partner compensates us when you take qualifying actions.\";\n }\n \n return \"This solution is somewhat related to your query. While not a perfect match, it might still be helpful. This partner compensates us for qualified referrals.\";\n};\n\n/**\n * Generate section-level disclosure text\n */\nexport const getSectionDisclosure = (\n hasHighMatches: boolean = true,\n isExpanded: boolean = false\n): string => {\n if (!hasHighMatches) {\n return \"Expanded Results: While these don't perfectly match your query, they're related solutions from our partner network. All partners compensate us for referrals.\";\n }\n \n if (isExpanded) {\n return \"These curated recommendations are from partners who compensate us for referrals.\";\n }\n \n return \"Personalized Partner Recommendations: All results are from vetted partners who compensate us for qualified matches. We've ranked them based on relevance to your specific needs.\";\n};\n\n/**\n * Generate inline disclosure text for product cards\n */\nexport const getInlineDisclosure = (\n recommendation: AdMeshRecommendation,\n compact: boolean = false\n): string => {\n const matchScore = recommendation.intent_match_score || 0;\n\n if (compact) {\n return \"Promoted\";\n }\n\n if (matchScore >= 0.8) {\n return \"Smart Recommendation\";\n }\n\n if (matchScore >= 0.6) {\n return \"Partner Match\";\n }\n\n return \"Promoted\";\n};\n\n/**\n * Generate detailed tooltip for inline disclosures\n */\nexport const getInlineTooltip = (): string => {\n return \"We've partnered with trusted providers to bring you relevant solutions. These partners compensate us for qualified referrals, which helps us keep our service free.\";\n};\n\n/**\n * Generate badge text without emojis\n */\nexport const getBadgeText = (badgeType: string): string => {\n const badgeMap: Record<string, string> = {\n 'Top Match': 'Top Match',\n 'Partner Recommendation': 'Partner Recommendation',\n 'Perfect Fit': 'Perfect Fit',\n 'Great Match': 'Great Match',\n 'Recommended': 'Recommended',\n 'Good Fit': 'Good Fit',\n 'Featured': 'Featured',\n 'Popular Choice': 'Popular Choice',\n 'Premium Pick': 'Premium Pick',\n 'Free Tier': 'Free Tier',\n 'AI Powered': 'AI Powered',\n 'Popular': 'Popular',\n 'New': 'New',\n 'Trial Available': 'Trial Available',\n 'Related Option': 'Related Option',\n 'Alternative Solution': 'Alternative Solution',\n 'Expanded Match': 'Expanded Match'\n };\n \n return badgeMap[badgeType] || badgeType;\n};\n\n/**\n * Generate appropriate CTA text\n */\nexport const getCtaText = (\n recommendation: AdMeshRecommendation,\n context: 'button' | 'link' = 'button'\n): string => {\n const productName = recommendation.recommendation_title || recommendation.title;\n \n if (context === 'link') {\n return productName;\n }\n \n // For buttons, use action-oriented text\n if (recommendation.trial_days && recommendation.trial_days > 0) {\n return `Try ${productName}`;\n }\n\n return `Learn More`;\n};\n\n/**\n * Check if recommendations have high match scores\n */\nexport const hasHighQualityMatches = (recommendations: AdMeshRecommendation[]): boolean => {\n return recommendations.some(rec => (rec.intent_match_score || 0) >= 0.8);\n};\n\n/**\n * Generate compliant powered-by text\n */\nexport const getPoweredByText = (compact: boolean = false): string => {\n if (compact) {\n return \"Powered by AdMesh\";\n }\n \n return \"Recommendations powered by AdMesh\";\n};\n","import React, { useMemo, useState } from 'react';\nimport classNames from 'classnames';\nimport type { AdMeshProductCardProps, BadgeType } from '../types/index';\nimport { AdMeshLinkTracker } from './AdMeshLinkTracker';\nimport { useAdMeshStyles } from '../hooks/useAdMeshStyles';\nimport {\n getRecommendationLabel,\n getLabelTooltip,\n getBadgeText\n} from '../utils/disclosureUtils';\n\nexport const AdMeshProductCard: React.FC<AdMeshProductCardProps> = ({\n recommendation,\n theme,\n showMatchScore = false, // Deprecated - Match Score removed from UI\n showBadges = true,\n variation = 'default',\n expandable = false,\n className,\n style\n}) => {\n // Inject styles automatically\n useAdMeshStyles();\n\n // State for expandable variations\n const [isExpanded, setIsExpanded] = useState(false);\n // Generate badges based on recommendation data using compliant labels\n const badges = useMemo((): BadgeType[] => {\n const generatedBadges: BadgeType[] = [];\n\n // Add primary recommendation label based on match score\n const primaryLabel = getRecommendationLabel(recommendation);\n if (primaryLabel === 'Partner Recommendation') {\n generatedBadges.push('Top Match'); // Map to existing badge type\n }\n\n // Add Trial Available badge\n if (recommendation.trial_days && recommendation.trial_days > 0) {\n generatedBadges.push('Trial Available');\n }\n\n // Add AI Powered badge (check if AI-related keywords exist)\n const aiKeywords = ['ai', 'artificial intelligence', 'machine learning', 'ml', 'automation'];\n const hasAIKeywords = recommendation.keywords?.some(keyword =>\n aiKeywords.some(ai => keyword.toLowerCase().includes(ai))\n ) || recommendation.title.toLowerCase().includes('ai');\n\n if (hasAIKeywords) {\n generatedBadges.push('AI Powered');\n }\n\n // Add badges from the response if available\n if (recommendation.badges && recommendation.badges.length > 0) {\n recommendation.badges.forEach(badge => {\n // Only add if it's a valid BadgeType and not already included\n if (['Top Match', 'Free Tier', 'AI Powered', 'Popular', 'New', 'Trial Available'].includes(badge) &&\n !generatedBadges.includes(badge as BadgeType)) {\n generatedBadges.push(badge as BadgeType);\n }\n });\n }\n\n // Note: is_open_source field has been removed\n\n return generatedBadges;\n }, [recommendation]);\n\n // Disclosure removed - only layout component shows disclosures\n\n // Format match score as percentage\n const matchScorePercentage = Math.round(recommendation.intent_match_score * 100);\n\n // Get content based on variation\n const getVariationContent = () => {\n if (variation === 'simple') {\n return {\n title: recommendation.recommendation_title || recommendation.title,\n description: recommendation.recommendation_description || recommendation.description || recommendation.reason,\n ctaText: recommendation.recommendation_title || recommendation.title,\n isSimple: true\n };\n\n } else {\n // Default variation\n return {\n title: recommendation.recommendation_title || recommendation.title,\n description: recommendation.recommendation_description || recommendation.description || recommendation.reason,\n ctaText: recommendation.recommendation_title || recommendation.title\n };\n }\n };\n\n const content = getVariationContent();\n\n const cardClasses = classNames(\n 'admesh-component',\n 'admesh-card',\n 'relative p-4 sm:p-5 rounded-xl bg-gradient-to-br from-white to-gray-50 dark:from-slate-800 dark:to-slate-900 border border-gray-200/50 dark:border-slate-700/50 shadow-lg hover:shadow-xl transition-all duration-300 hover:-translate-y-1',\n className\n );\n\n const cardStyle = theme ? {\n '--admesh-primary': theme.primaryColor || theme.accentColor || '#3b82f6',\n '--admesh-secondary': theme.secondaryColor || '#10b981',\n '--admesh-accent': theme.accentColor || '#3b82f6',\n '--admesh-background': theme.backgroundColor,\n '--admesh-surface': theme.surfaceColor,\n '--admesh-border': theme.borderColor,\n '--admesh-text': theme.textColor,\n '--admesh-text-secondary': theme.textSecondaryColor,\n '--admesh-radius': theme.borderRadius || '12px',\n '--admesh-shadow-sm': theme.shadows?.small,\n '--admesh-shadow-md': theme.shadows?.medium,\n '--admesh-shadow-lg': theme.shadows?.large,\n '--admesh-spacing-sm': theme.spacing?.small,\n '--admesh-spacing-md': theme.spacing?.medium,\n '--admesh-spacing-lg': theme.spacing?.large,\n '--admesh-font-size-sm': theme.fontSize?.small,\n '--admesh-font-size-base': theme.fontSize?.base,\n '--admesh-font-size-lg': theme.fontSize?.large,\n '--admesh-font-size-title': theme.fontSize?.title,\n fontFamily: theme.fontFamily,\n // Ensure consistent width: 100% for all components except ecommerce\n width: theme.components?.productCard?.width || '100%'\n } as React.CSSProperties : { width: '100%' } as React.CSSProperties;\n\n // Render different layouts based on variation\n if (variation === 'simple') {\n // Simple inline ad format (replaces AdMeshSimpleAd)\n return (\n <div\n className={classNames(\n \"admesh-component admesh-simple-ad\",\n \"inline-block text-sm leading-relaxed\",\n className\n )}\n style={{\n fontFamily: theme?.fontFamily || '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n ...theme?.components?.productCard,\n ...style\n }}\n data-admesh-theme={theme?.mode}\n >\n {/* Recommendation label */}\n <span\n style={{\n fontSize: '11px',\n fontWeight: '600',\n color: theme?.accentColor || '#2563eb',\n backgroundColor: theme?.mode === 'dark' ? '#374151' : '#f3f4f6',\n padding: '2px 6px',\n borderRadius: '4px',\n marginRight: '8px'\n }}\n title={getLabelTooltip(recommendation, getRecommendationLabel(recommendation))}\n >\n {getRecommendationLabel(recommendation)}\n </span>\n\n {/* Main content */}\n <span\n style={{\n color: theme?.mode === 'dark' ? '#f3f4f6' : '#374151',\n marginRight: '4px'\n }}\n >\n {content.description}{' '}\n </span>\n\n {/* CTA Link */}\n <AdMeshLinkTracker\n adId={recommendation.ad_id}\n admeshLink={recommendation.admesh_link}\n productId={recommendation.product_id}\n trackingData={{\n title: recommendation.title,\n matchScore: recommendation.intent_match_score,\n component: 'simple_ad_cta'\n }}\n >\n <span\n style={{\n color: theme?.accentColor || '#2563eb',\n textDecoration: 'underline',\n cursor: 'pointer',\n fontSize: 'inherit',\n fontFamily: 'inherit'\n }}\n >\n {content.ctaText}\n </span>\n </AdMeshLinkTracker>\n\n {/* Disclosure */}\n <span\n style={{\n fontSize: '10px',\n color: theme?.mode === 'dark' ? '#9ca3af' : '#6b7280',\n marginLeft: '8px'\n }}\n >\n (Sponsored • Powered by AdMesh)\n </span>\n </div>\n );\n }\n\n\n\n\n // Default full product card layout\n return (\n <div\n className={cardClasses}\n style={{\n fontFamily: theme?.fontFamily || '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n ...theme?.components?.productCard,\n ...style\n }}\n data-admesh-theme={theme?.mode}\n >\n <div\n className=\"h-full flex flex-col\"\n style={cardStyle}\n >\n {/* Recommendation label at top */}\n <div className=\"mb-3\">\n <span\n style={{\n fontSize: '11px',\n fontWeight: '600',\n color: theme?.accentColor || '#2563eb',\n backgroundColor: theme?.mode === 'dark' ? '#374151' : '#f3f4f6',\n padding: '2px 6px',\n borderRadius: '4px'\n }}\n title={getLabelTooltip(recommendation, getRecommendationLabel(recommendation))}\n >\n {getRecommendationLabel(recommendation)}\n </span>\n </div>\n\n {/* Header with title and CTA button in same row */}\n <div className=\"flex justify-between items-center gap-3 mb-4\">\n <div className=\"flex items-center gap-2 flex-1 min-w-0\">\n {recommendation.product_logo && (\n <img\n src={recommendation.product_logo.url}\n alt={`${recommendation.title} logo`}\n className=\"w-6 h-6 rounded flex-shrink-0\"\n onError={(e) => {\n // Hide image if it fails to load\n (e.target as HTMLImageElement).style.display = 'none';\n }}\n />\n )}\n <h4 className=\"font-semibold text-gray-800 dark:text-gray-200 text-sm sm:text-base truncate\">\n {content.title}\n </h4>\n </div>\n\n <div className=\"flex-shrink-0\">\n <AdMeshLinkTracker\n adId={recommendation.ad_id}\n admeshLink={recommendation.admesh_link}\n productId={recommendation.product_id}\n trackingData={{\n title: recommendation.title,\n matchScore: recommendation.intent_match_score,\n component: 'product_card_cta'\n }}\n >\n <button className=\"text-xs px-2 py-1 sm:px-3 sm:py-2 rounded-full bg-gradient-to-r from-purple-500 to-pink-500 text-white hover:from-purple-600 hover:to-pink-600 flex items-center transition-all duration-200 transform hover:scale-105 shadow-md hover:shadow-lg whitespace-nowrap\">\n Visit\n <svg className=\"ml-1 h-3 w-3\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" />\n </svg>\n </button>\n </AdMeshLinkTracker>\n </div>\n </div>\n\n {/* Product Description/Reason */}\n <div className=\"mb-6\">\n <p className=\"text-sm text-gray-600 dark:text-gray-300 leading-relaxed\">\n {content.description}\n </p>\n </div>\n\n\n \n\n {/* Features */}\n {recommendation.features && recommendation.features.length > 0 && (\n <div className=\"mb-3\">\n <div className=\"text-xs text-gray-600 dark:text-gray-300 mb-2 font-medium\">\n ✨ Key Features\n </div>\n <div className=\"flex flex-wrap gap-1.5\">\n {recommendation.features.slice(0, 4).map((feature, j) => (\n <span\n key={j}\n className=\"text-xs px-2 py-1 rounded-full bg-gradient-to-r from-indigo-100 to-purple-100 dark:from-indigo-900/30 dark:to-purple-900/30 text-indigo-700 dark:text-indigo-300 border border-indigo-200 dark:border-indigo-700\"\n >\n <svg className=\"h-3 w-3 mr-0.5 inline text-indigo-500\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z\" />\n </svg>\n {feature}\n </span>\n ))}\n {recommendation.features.length > 4 && (\n <span className=\"text-xs text-gray-500 dark:text-gray-400 px-2 py-1\">\n +{recommendation.features.length - 4} more\n </span>\n )}\n </div>\n </div>\n )}\n\n\n\n\n\n\n\n\n\n\n {/* Footer section with disclosure */}\n <div className=\"mt-auto pt-3 border-t border-gray-100 dark:border-slate-700\">\n <div className=\"flex items-center justify-between text-xs text-gray-500 dark:text-gray-400\">\n <span>\n Sponsored\n </span>\n <span className=\"text-gray-400 dark:text-gray-500\">\n Powered by AdMesh\n </span>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nAdMeshProductCard.displayName = 'AdMeshProductCard';\n","import React from 'react';\nimport classNames from 'classnames';\nimport type { AdMeshRecommendation, EcommerceProduct } from '../types/index';\n\nexport interface AdMeshEcommerceCardsProps {\n products?: EcommerceProduct[]; // Legacy support\n recommendations?: AdMeshRecommendation[]; // New: unified schema recommendations\n title?: string;\n showTitle?: boolean;\n className?: string;\n cardClassName?: string;\n onProductClick?: (product: EcommerceProduct | AdMeshRecommendation) => void;\n showPricing?: boolean;\n showRatings?: boolean;\n showBrand?: boolean;\n showSource?: boolean;\n showShipping?: boolean;\n maxCards?: number;\n cardWidth?: 'sm' | 'md' | 'lg';\n theme?: 'light' | 'dark' | 'auto';\n borderRadius?: 'none' | 'sm' | 'md' | 'lg';\n shadow?: 'none' | 'sm' | 'md' | 'lg';\n}\n\nexport const AdMeshEcommerceCards: React.FC<AdMeshEcommerceCardsProps> = ({\n products = [],\n recommendations = [],\n title = \"Product Recommendations\",\n showTitle = true,\n className = \"\",\n cardClassName = \"\",\n onProductClick,\n showPricing = true,\n showRatings = true,\n showBrand = true,\n showSource = false,\n showShipping = true,\n maxCards = 10,\n cardWidth = 'md',\n theme = 'auto',\n borderRadius = 'md',\n shadow = 'sm'\n}) => {\n // Use recommendations directly if provided, otherwise use legacy products\n const displayItems: (AdMeshRecommendation | EcommerceProduct)[] = recommendations.length > 0 ? recommendations.slice(0, maxCards) : products.slice(0, maxCards);\n\n\n\n const getCardWidthClass = () => {\n switch (cardWidth) {\n case 'sm': return 'w-48 min-w-48';\n case 'md': return 'w-64 min-w-64';\n case 'lg': return 'w-80 min-w-80';\n default: return 'w-64 min-w-64';\n }\n };\n\n const getBorderRadiusClass = () => {\n switch (borderRadius) {\n case 'none': return 'rounded-none';\n case 'sm': return 'rounded-sm';\n case 'md': return 'rounded-lg';\n case 'lg': return 'rounded-xl';\n default: return 'rounded-lg';\n }\n };\n\n const getShadowClass = () => {\n switch (shadow) {\n case 'none': return '';\n case 'sm': return 'shadow-sm hover:shadow-md';\n case 'md': return 'shadow-md hover:shadow-lg';\n case 'lg': return 'shadow-lg hover:shadow-xl';\n default: return 'shadow-sm hover:shadow-md';\n }\n };\n\n const getThemeClasses = () => {\n if (theme === 'dark') {\n return 'bg-gray-900 text-white';\n } else if (theme === 'light') {\n return 'bg-white text-gray-900';\n }\n return 'bg-white dark:bg-gray-900 text-gray-900 dark:text-white';\n };\n\n const formatPrice = (price: number) => {\n return new Intl.NumberFormat('en-US', {\n style: 'currency',\n currency: 'USD',\n minimumFractionDigits: 0,\n maximumFractionDigits: 2,\n }).format(price);\n };\n\n const renderStars = (rating: number) => {\n const stars = [];\n const fullStars = Math.floor(rating);\n const hasHalfStar = rating % 1 !== 0;\n\n for (let i = 0; i < fullStars; i++) {\n stars.push(\n <span key={i} className=\"text-yellow-400\">★</span>\n );\n }\n\n if (hasHalfStar) {\n stars.push(\n <span key=\"half\" className=\"text-yellow-400\">☆</span>\n );\n }\n\n const emptyStars = 5 - Math.ceil(rating);\n for (let i = 0; i < emptyStars; i++) {\n stars.push(\n <span key={`empty-${i}`} className=\"text-gray-300 dark:text-gray-600\">☆</span>\n );\n }\n\n return stars;\n };\n\n const handleProductClick = (item: EcommerceProduct | AdMeshRecommendation) => {\n if (onProductClick) {\n onProductClick(item);\n } else {\n // Default behavior: open product link\n const link = item.admesh_link || item.url;\n if (link) {\n window.open(link, '_blank', 'noopener,noreferrer');\n }\n }\n };\n\n // Check if we have any data to display\n if ((!products || products.length === 0) && (!recommendations || recommendations.length === 0)) {\n return null;\n }\n\n return (\n <div className={classNames('w-full', className)}>\n {showTitle && (\n <div className=\"mb-4\">\n <h3 className=\"text-lg font-semibold text-gray-900 dark:text-white\">\n {title}\n </h3>\n <div className=\"mt-1 h-0.5 w-12 bg-blue-500\"></div>\n </div>\n )}\n \n <div className=\"relative\">\n {displayItems.length === 0 ? (\n <div className=\"text-center py-8 text-gray-500\">\n No products to display\n </div>\n ) : (\n <div className=\"flex gap-4 overflow-x-auto pb-4 scrollbar-hide\">\n {displayItems.map((item) => {\n // Get the appropriate ID for the key\n const itemId = (item as any).product_id || (item as any).id || (item as any).ad_id;\n\n return (\n <div\n key={itemId}\n className={classNames(\n getCardWidthClass(),\n getBorderRadiusClass(),\n getShadowClass(),\n getThemeClasses(),\n 'flex-shrink-0 border border-gray-200 dark:border-gray-700 transition-all duration-200 cursor-pointer hover:scale-[1.02]',\n cardClassName\n )}\n onClick={() => handleProductClick(item)}\n >\n {/* Product Image */}\n <div className=\"relative aspect-square w-full overflow-hidden\">\n {item.image_url ? (\n <img\n src={item.image_url}\n alt={item.title}\n className=\"h-full w-full object-cover transition-transform duration-200 hover:scale-105\"\n loading=\"lazy\"\n />\n ) : (\n <div className=\"flex h-full w-full items-center justify-center bg-gray-100 dark:bg-gray-800\">\n <svg className=\"h-12 w-12 text-gray-400\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z\" />\n </svg>\n </div>\n )}\n\n {/* Discount Badge */}\n {showPricing && item.discount_percentage && item.discount_percentage > 0 && (\n <div className=\"absolute top-2 left-2 bg-red-500 text-white text-xs font-bold px-2 py-1 rounded\">\n -{Math.round(item.discount_percentage)}%\n </div>\n )}\n\n {/* Source Badge */}\n {showSource && item.source && (\n <div className=\"absolute top-2 right-2 bg-blue-500 text-white text-xs font-medium px-2 py-1 rounded\">\n {item.source.toUpperCase()}\n </div>\n )}\n </div>\n\n {/* Product Info */}\n <div className=\"p-3\">\n {/* Brand */}\n {showBrand && item.brand && (\n <div className=\"text-xs text-gray-500 dark:text-gray-400 mb-1 uppercase tracking-wide\">\n {item.brand}\n </div>\n )}\n\n {/* Title */}\n <h4 className=\"text-sm font-medium text-gray-900 dark:text-white line-clamp-2 mb-2 leading-tight\">\n {item.title}\n </h4>\n\n {/* Rating */}\n {showRatings && item.rating && (\n <div className=\"flex items-center gap-1 mb-2\">\n <div className=\"flex text-sm\">\n {renderStars(item.rating)}\n </div>\n <span className=\"text-xs text-gray-500 dark:text-gray-400\">\n ({item.review_count || 0})\n </span>\n </div>\n )}\n\n {/* Pricing */}\n {showPricing && item.price && (\n <div className=\"mb-2\">\n <div className=\"flex items-center gap-2\">\n <span className=\"text-lg font-bold text-gray-900 dark:text-white\">\n {formatPrice(item.price)}\n </span>\n {item.original_price && item.original_price > item.price && (\n <span className=\"text-sm text-gray-500 dark:text-gray-400 line-through\">\n {formatPrice(item.original_price)}\n </span>\n )}\n </div>\n </div>\n )}\n\n {/* Shipping Info */}\n {showShipping && item.shipping_info?.free_shipping_over_35 && (\n <div className=\"text-xs text-green-600 dark:text-green-400 font-medium\">\n Free shipping over $35\n </div>\n )}\n\n {/* Availability */}\n {item.availability && item.availability !== 'unknown' && (\n <div className={classNames(\n 'text-xs font-medium mt-1',\n item.availability === 'in_stock'\n ? 'text-green-600 dark:text-green-400'\n : 'text-red-600 dark:text-red-400'\n )}>\n {item.availability === 'in_stock' ? 'In Stock' : 'Out of Stock'}\n </div>\n )}\n </div>\n </div>\n );\n })}\n </div>\n )}\n\n {/* Scroll Indicators - only show when there are products */}\n {displayItems.length > 0 && (\n <>\n <div className=\"absolute top-1/2 -left-2 transform -translate-y-1/2 bg-white dark:bg-gray-800 rounded-full shadow-lg p-1 opacity-0 group-hover:opacity-100 transition-opacity\">\n <svg className=\"w-4 h-4 text-gray-600 dark:text-gray-300\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M15 19l-7-7 7-7\" />\n </svg>\n </div>\n <div className=\"absolute top-1/2 -right-2 transform -translate-y-1/2 bg-white dark:bg-gray-800 rounded-full shadow-lg p-1 opacity-0 group-hover:opacity-100 transition-opacity\">\n <svg className=\"w-4 h-4 text-gray-600 dark:text-gray-300\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M9 5l7 7-7 7\" />\n </svg>\n </div>\n </>\n )}\n </div>\n\n {/* Disclosure */}\n <div className=\"flex justify-between items-center mt-3 pt-2 border-t border-gray-200 dark:border-gray-700\">\n <span className=\"text-xs text-gray-500 dark:text-gray-400\">\n Sponsored\n </span>\n <span className=\"text-xs text-gray-400 dark:text-gray-500\">\n Powered by AdMesh\n </span>\n </div>\n\n {/* Custom scrollbar styles */}\n <style dangerouslySetInnerHTML={{\n __html: `\n .scrollbar-hide {\n -ms-overflow-style: none;\n scrollbar-width: none;\n }\n .scrollbar-hide::-webkit-scrollbar {\n display: none;\n }\n .line-clamp-2 {\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n }\n `\n }} />\n </div>\n );\n};\n\nexport default AdMeshEcommerceCards;\n","import React from 'react';\nimport type { AdMeshRecommendation, AdMeshTheme } from '../types/index';\nimport { AdMeshSummaryUnit } from './AdMeshSummaryUnit';\nimport { AdMeshProductCard } from './AdMeshProductCard';\nimport { AdMeshEcommerceCards } from './AdMeshEcommerceCards';\n\nexport interface AdMeshSummaryLayoutProps {\n // Backend response data\n response: {\n layout_type?: string; // \"citation\", \"product_cards\", \"ecommerce\"\n citation_summary?: string; // LLM-generated summary with embedded links\n recommendations?: AdMeshRecommendation[];\n requires_summary?: boolean;\n };\n \n // Styling\n theme?: AdMeshTheme;\n className?: string;\n style?: React.CSSProperties;\n \n // Behavior\n onRecommendationClick?: (recommendation: AdMeshRecommendation) => void;\n onLinkClick?: (recommendation: AdMeshRecommendation) => void;\n}\n\n// Validate response object\nconst validateResponse = (response: any) => {\n const warnings: string[] = [];\n \n if (!response) {\n return { isValid: false, warnings: ['No response object provided'] };\n }\n \n if (!response.recommendations || !Array.isArray(response.recommendations)) {\n warnings.push('No recommendations array found in response');\n }\n \n if (response.layout_type === 'citation' && !response.citation_summary) {\n warnings.push('Citation layout specified but no citation_summary provided');\n }\n \n const validRecommendations = response.recommendations?.filter((rec: any) => \n rec && rec.admesh_link && (rec.title || rec.recommendation_title)\n ) || [];\n \n if (validRecommendations.length === 0) {\n warnings.push('No valid recommendations found (missing admesh_link or title)');\n }\n \n return {\n isValid: validRecommendations.length > 0,\n validCount: validRecommendations.length,\n totalCount: response.recommendations?.length || 0,\n warnings\n };\n};\n\nexport const AdMeshSummaryLayout: React.FC<AdMeshSummaryLayoutProps> = ({\n response,\n theme,\n className = '',\n style = {},\n onRecommendationClick,\n onLinkClick\n}) => {\n // Validate response\n const validation = validateResponse(response);\n \n if (validation.warnings.length > 0) {\n console.warn('[AdMesh Summary Layout] Validation warnings:', validation.warnings);\n }\n \n if (!validation.isValid) {\n console.error('[AdMesh Summary Layout] Invalid response object');\n return (\n <div className={`admesh-summary-layout-error ${className}`} style={style}>\n <div className=\"text-center py-6 px-4 bg-gray-50 dark:bg-gray-800 rounded-lg\">\n <p className=\"text-gray-600 dark:text-gray-400 text-sm\">\n Unable to display recommendations\n </p>\n <p className=\"text-gray-500 dark:text-gray-500 text-xs mt-1\">\n Check console for details\n </p>\n </div>\n </div>\n );\n }\n \n // Extract data from response\n const {\n layout_type = 'citation',\n citation_summary,\n recommendations = [],\n requires_summary = true\n } = response;\n \n console.log(`[AdMesh Summary Layout] Rendering ${layout_type} layout with ${validation.validCount}/${validation.totalCount} valid recommendations`);\n \n // Render based on layout type\n const renderContent = () => {\n switch (layout_type) {\n case 'citation':\n // Show summary if available and required\n if (citation_summary && requires_summary) {\n return (\n <AdMeshSummaryUnit\n summaryText={citation_summary}\n recommendations={recommendations}\n theme={theme}\n onLinkClick={onLinkClick}\n />\n );\n }\n // Fallback to first recommendation if no summary\n return (\n <div className=\"fallback-citation\">\n <p className=\"text-gray-700 dark:text-gray-300 mb-3\">\n Based on your query, I'd recommend checking out these options:\n </p>\n <AdMeshProductCard\n recommendation={recommendations[0]}\n theme={theme}\n />\n </div>\n );\n \n case 'product_cards':\n case 'product':\n return (\n <div className=\"product-cards-layout\">\n {recommendations.slice(0, 3).map((rec, index) => (\n <AdMeshProductCard\n key={rec.ad_id || `rec-${index}`}\n recommendation={rec}\n theme={theme}\n className=\"mb-4\"\n />\n ))}\n </div>\n );\n\n case 'ecommerce':\n return (\n <AdMeshEcommerceCards\n recommendations={recommendations.slice(0, 3)}\n theme={theme?.mode || 'light'}\n />\n );\n \n default:\n console.warn(`[AdMesh Summary Layout] Unknown layout type: ${layout_type}`);\n // Default to summary if available, otherwise product cards\n if (citation_summary) {\n return (\n <AdMeshSummaryUnit\n summaryText={citation_summary}\n recommendations={recommendations}\n theme={theme}\n onLinkClick={onLinkClick}\n />\n );\n }\n return (\n <AdMeshProductCard\n recommendation={recommendations[0]}\n theme={theme}\n />\n );\n }\n };\n \n return (\n <div \n className={`admesh-summary-layout admesh-layout-${layout_type} ${className}`}\n style={{\n fontFamily: theme?.fontFamily || '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n ...style\n }}\n >\n {renderContent()}\n </div>\n );\n};\n\nexport default AdMeshSummaryLayout;\n","import React from 'react';\nimport type { AdMeshLayoutProps, AdMeshRecommendation } from '../types/index';\nimport { AdMeshSummaryLayout } from './AdMeshSummaryLayout';\n\nexport const AdMeshLayout: React.FC<AdMeshLayoutProps> = ({\n // Legacy props (for backward compatibility)\n recommendations = [],\n citationSummary,\n layout,\n\n // New response object (preferred)\n response,\n\n // Styling\n theme,\n className,\n style,\n\n // Behavior\n onRecommendationClick,\n onLinkClick\n}) => {\n // Convert legacy callback to new format\n const handleRecommendationClick = onRecommendationClick ?\n (rec: AdMeshRecommendation) => onRecommendationClick(rec.ad_id || '', rec.admesh_link || '') :\n undefined;\n\n // If response object is provided, use the new AdMeshSummaryLayout\n if (response) {\n return (\n <AdMeshSummaryLayout\n response={response}\n theme={theme}\n className={className}\n style={style}\n onRecommendationClick={handleRecommendationClick}\n onLinkClick={onLinkClick}\n />\n );\n }\n\n // Legacy support: convert old props to response format\n const legacyResponse = {\n layout_type: layout || 'citation',\n citation_summary: citationSummary,\n recommendations: recommendations,\n requires_summary: !!citationSummary\n };\n\n return (\n <AdMeshSummaryLayout\n response={legacyResponse}\n theme={theme}\n className={className}\n style={style}\n onRecommendationClick={handleRecommendationClick}\n onLinkClick={onLinkClick}\n />\n );\n};\n\nexport default AdMeshLayout;\n","import React, { useState } from 'react';\nimport classNames from 'classnames';\nimport type { AdMeshRecommendation, AdMeshTheme } from '../types/index';\nimport { AdMeshLinkTracker } from './AdMeshLinkTracker';\n\nexport interface AdMeshInlineCardProps {\n recommendation: AdMeshRecommendation;\n theme?: AdMeshTheme;\n variation?: 'default' | 'statement' | 'question';\n expandable?: boolean; // For question and statement variations, default: false\n className?: string;\n style?: React.CSSProperties;\n}\n\n/**\n * AdMeshInlineCard\n * Compact inline card that uses the same card style as AdMeshProductCard,\n * but with a smaller content footprint suitable for inline placements.\n */\nexport const AdMeshInlineCard: React.FC<AdMeshInlineCardProps> = ({\n recommendation,\n theme,\n variation = 'default',\n expandable = false,\n className,\n style,\n}) => {\n const [isExpanded, setIsExpanded] = useState(false);\n\n // Get content based on variation\n const getVariationContent = () => {\n const variations = recommendation.content_variations;\n\n if (variation === 'question' && variations?.question) {\n return {\n title: variations.question.cta || recommendation.recommendation_title || recommendation.title,\n description: variations.question.text,\n ctaText: variations.question.cta || recommendation.recommendation_title || recommendation.title\n };\n } else if (variation === 'statement' && variations?.statement) {\n return {\n title: recommendation.recommendation_title || recommendation.title,\n description: variations.statement.text,\n ctaText: variations.statement.cta || recommendation.recommendation_title || recommendation.title\n };\n } else {\n // Default variation\n return {\n title: recommendation.recommendation_title || recommendation.title,\n description: recommendation.recommendation_description || recommendation.reason || '',\n ctaText: recommendation.recommendation_title || recommendation.title\n };\n }\n };\n\n const content = getVariationContent();\n\n const cardClasses = classNames(\n 'rounded-xl shadow-sm border border-gray-200 dark:border-gray-800 p-4 bg-white dark:bg-slate-900',\n 'hover:shadow-md transition-shadow duration-200',\n {\n 'cursor-pointer': expandable && (variation === 'question' || variation === 'statement')\n },\n className\n );\n\n return (\n <div\n className={cardClasses}\n style={{\n fontFamily: theme?.fontFamily || '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n // Ensure consistent width: 100% for inline cards\n width: theme?.components?.inlineRecommendation?.width || '100%',\n ...theme?.components?.productCard,\n ...style,\n }}\n data-admesh-theme={theme?.mode}\n >\n <div className=\"h-full flex flex-col\">\n {/* Header with title and CTA button in same row */}\n <div className=\"flex justify-between items-center gap-3 mb-2\">\n <div className=\"flex items-center gap-2 flex-1 min-w-0\">\n {recommendation.product_logo && (\n <img\n src={recommendation.product_logo.url}\n alt={`${recommendation.title} logo`}\n className=\"w-5 h-5 rounded flex-shrink-0\"\n onError={(e) => { (e.target as HTMLImageElement).style.display = 'none'; }}\n />\n )}\n <h4 className=\"font-semibold text-gray-800 dark:text-gray-200 text-sm truncate\">\n {content.title}\n </h4>\n </div>\n\n <div className=\"flex-shrink-0\">\n <AdMeshLinkTracker\n adId={recommendation.ad_id}\n admeshLink={recommendation.admesh_link}\n productId={recommendation.product_id}\n trackingData={{\n title: recommendation.title,\n matchScore: recommendation.intent_match_score,\n component: 'inline_card_cta',\n }}\n >\n <button className=\"text-xs px-2 py-1 rounded-full bg-gradient-to-r from-purple-500 to-pink-500 text-white hover:from-purple-600 hover:to-pink-600 flex items-center transition-all duration-200 transform hover:scale-105 shadow-sm whitespace-nowrap\">\n {variation === 'question' ? 'Try' : 'Visit'}\n <svg className=\"ml-1 h-3 w-3\" fill=\"none\" stroke=\"currentColor\" viewBox=\"0 0 24 24\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14\" />\n </svg>\n </button>\n </AdMeshLinkTracker>\n </div>\n </div>\n\n {/* Brief description (single line clamp) */}\n {content.description && (\n <p className=\"text-xs text-gray-600 dark:text-gray-300 mb-2 line-clamp-2\">\n {content.description}\n </p>\n )}\n\n {/* Footer with disclosures */}\n <div className=\"mt-auto pt-2 border-t border-gray-100 dark:border-slate-700\">\n <div className=\"flex items-center justify-between text-[11px] text-gray-500 dark:text-gray-400\">\n <span>Sponsored</span>\n <span className=\"text-gray-400 dark:text-gray-500\">Powered by AdMesh</span>\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nAdMeshInlineCard.displayName = 'AdMeshInlineCard';\n\n","import React from 'react';\nimport classNames from 'classnames';\nimport type { AdMeshBadgeProps, BadgeType } from '../types/index';\n\n// Badge type to variant mapping\nconst badgeTypeVariants: Record<BadgeType, string> = {\n 'Top Match': 'primary',\n 'Free Tier': 'success',\n 'AI Powered': 'secondary',\n 'Popular': 'warning',\n 'New': 'primary',\n 'Trial Available': 'success'\n};\n\n// Badge type to icon mapping (using clean Unicode symbols)\nconst badgeTypeIcons: Partial<Record<BadgeType, string>> = {\n 'Top Match': '★',\n 'Free Tier': '◆',\n 'AI Powered': '◉',\n 'Popular': '▲',\n 'New': '●',\n 'Trial Available': '◈'\n};\n\nexport const AdMeshBadge: React.FC<AdMeshBadgeProps> = ({\n type,\n variant,\n size = 'md',\n className,\n style\n}) => {\n const effectiveVariant = variant || badgeTypeVariants[type] || 'secondary';\n const icon = badgeTypeIcons[type];\n\n const badgeClasses = classNames(\n 'admesh-component',\n 'admesh-badge',\n `admesh-badge--${effectiveVariant}`,\n `admesh-badge--${size}`,\n className\n );\n\n return (\n <span\n className={badgeClasses}\n style={style}\n >\n {icon && <span className=\"admesh-badge__icon\">{icon}</span>}\n <span className=\"admesh-badge__text\">{type}</span>\n </span>\n );\n};\n\nAdMeshBadge.displayName = 'AdMeshBadge';\n","import type { AdMeshTheme } from '../types';\n\n/**\n * Utility functions for theme customization in AdMesh UI SDK\n */\n\n/**\n * Creates a theme with sensible defaults and custom overrides\n * Ensures consistent styling across all AdMesh UI SDK components\n */\nexport const createAdMeshTheme = (customTheme: Partial<AdMeshTheme> = {}): AdMeshTheme => {\n const baseTheme: AdMeshTheme = {\n mode: 'light',\n primaryColor: '#3b82f6',\n secondaryColor: '#10b981',\n accentColor: '#3b82f6',\n backgroundColor: '#ffffff',\n surfaceColor: '#f9fafb',\n borderColor: '#e5e7eb',\n textColor: '#111827',\n textSecondaryColor: '#6b7280',\n fontFamily: '-apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n fontSize: {\n small: '12px',\n base: '14px',\n large: '16px',\n title: '18px'\n },\n borderRadius: '8px',\n spacing: {\n small: '4px',\n medium: '8px',\n large: '16px'\n },\n shadows: {\n small: '0 1px 3px rgba(0, 0, 0, 0.1)',\n medium: '0 4px 6px rgba(0, 0, 0, 0.1)',\n large: '0 10px 15px rgba(0, 0, 0, 0.1)'\n },\n icons: {\n expandIcon: '▼',\n collapseIcon: '▲',\n starIcon: '★',\n checkIcon: '✓',\n arrowIcon: '→'\n },\n gradients: {\n primary: 'linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%)',\n secondary: 'linear-gradient(135deg, #10b981 0%, #059669 100%)',\n accent: 'linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%)'\n },\n // Component-specific defaults with consistent width settings\n components: {\n productCard: { width: '100%' },\n citationUnit: { width: '100%' },\n inlineRecommendation: { width: '100%' },\n expandableUnit: { width: '100%' },\n compareTable: { width: '100%' },\n // Ecommerce cards maintain their specific width behavior\n card: { width: 'auto' },\n button: { width: 'auto' }\n }\n };\n\n const mergedTheme = {\n ...baseTheme,\n ...customTheme,\n fontSize: {\n ...baseTheme.fontSize,\n ...customTheme.fontSize\n },\n spacing: {\n ...baseTheme.spacing,\n ...customTheme.spacing\n },\n shadows: {\n ...baseTheme.shadows,\n ...customTheme.shadows\n },\n icons: {\n ...baseTheme.icons,\n ...customTheme.icons\n },\n components: {\n ...baseTheme.components,\n ...customTheme.components\n }\n };\n\n // Ensure consistent widths are applied\n const finalTheme = ensureConsistentWidths(mergedTheme);\n return finalTheme as AdMeshTheme;\n};\n\n/**\n * Creates a dark theme variant\n */\nexport const createDarkTheme = (customTheme: Partial<AdMeshTheme> = {}): AdMeshTheme => {\n const darkDefaults: Partial<AdMeshTheme> = {\n mode: 'dark',\n backgroundColor: '#1f2937',\n surfaceColor: '#374151',\n borderColor: '#4b5563',\n textColor: '#f9fafb',\n textSecondaryColor: '#9ca3af',\n shadows: {\n small: '0 1px 3px rgba(0, 0, 0, 0.3)',\n medium: '0 4px 6px rgba(0, 0, 0, 0.3)',\n large: '0 10px 15px rgba(0, 0, 0, 0.3)'\n }\n };\n\n return createAdMeshTheme({\n ...darkDefaults,\n ...customTheme\n });\n};\n\n/**\n * Predefined theme presets for common AI platforms\n * All presets ensure consistent width settings and styling\n */\nexport const themePresets = {\n // Clean, minimal theme with consistent width\n get minimal() {\n return createAdMeshTheme({\n primaryColor: '#000000',\n secondaryColor: '#666666',\n borderRadius: '4px',\n shadows: {\n small: 'none',\n medium: '0 1px 3px rgba(0, 0, 0, 0.1)',\n large: '0 2px 6px rgba(0, 0, 0, 0.1)'\n },\n components: {\n productCard: { width: '100%' },\n citationUnit: { width: '100%' },\n inlineRecommendation: { width: '100%' },\n expandableUnit: { width: '100%' },\n compareTable: { width: '100%' }\n }\n });\n },\n\n // Modern, colorful theme with consistent width\n get vibrant() {\n return createAdMeshTheme({\n primaryColor: '#8b5cf6',\n secondaryColor: '#06b6d4',\n accentColor: '#f59e0b',\n borderRadius: '12px',\n gradients: {\n primary: 'linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%)',\n secondary: 'linear-gradient(135deg, #06b6d4 0%, #10b981 100%)',\n accent: 'linear-gradient(135deg, #f59e0b 0%, #ef4444 100%)'\n },\n components: {\n productCard: { width: '100%' },\n citationUnit: { width: '100%' },\n inlineRecommendation: { width: '100%' },\n expandableUnit: { width: '100%' },\n compareTable: { width: '100%' }\n }\n });\n },\n\n // Professional, corporate theme with consistent width\n get corporate() {\n return createAdMeshTheme({\n primaryColor: '#1e40af',\n secondaryColor: '#059669',\n backgroundColor: '#f8fafc',\n surfaceColor: '#ffffff',\n borderColor: '#cbd5e1',\n borderRadius: '6px',\n fontFamily: '\"Inter\", -apple-system, BlinkMacSystemFont, sans-serif',\n components: {\n productCard: { width: '100%' },\n citationUnit: { width: '100%' },\n inlineRecommendation: { width: '100%' },\n expandableUnit: { width: '100%' },\n compareTable: { width: '100%' }\n }\n });\n },\n\n // High contrast theme for accessibility with consistent width\n get highContrast() {\n return createAdMeshTheme({\n primaryColor: '#000000',\n secondaryColor: '#ffffff',\n backgroundColor: '#ffffff',\n surfaceColor: '#f5f5f5',\n borderColor: '#000000',\n textColor: '#000000',\n textSecondaryColor: '#333333',\n borderRadius: '0px',\n shadows: {\n small: 'none',\n medium: '0 0 0 2px #000000',\n large: '0 0 0 3px #000000'\n },\n components: {\n productCard: { width: '100%' },\n citationUnit: { width: '100%' },\n inlineRecommendation: { width: '100%' },\n expandableUnit: { width: '100%' },\n compareTable: { width: '100%' }\n }\n });\n }\n};\n\n/**\n * Ensures consistent width settings across all components\n * This function enforces the rule: 100% width for all components except ecommerce\n */\nexport const ensureConsistentWidths = (inputTheme: Partial<AdMeshTheme> = {}): Partial<AdMeshTheme> => {\n const existingComponents = inputTheme.components || {};\n\n const consistentComponents = {\n productCard: { width: '100%', ...existingComponents.productCard },\n citationUnit: { width: '100%', ...existingComponents.citationUnit },\n inlineRecommendation: { width: '100%', ...existingComponents.inlineRecommendation },\n expandableUnit: { width: '100%', ...existingComponents.expandableUnit },\n compareTable: { width: '100%', ...existingComponents.compareTable },\n // Ecommerce cards maintain their specific width behavior\n card: { width: 'auto', ...existingComponents.card },\n button: { width: 'auto', ...existingComponents.button }\n };\n\n return {\n ...inputTheme,\n components: {\n ...existingComponents,\n ...consistentComponents\n }\n };\n};\n\n/**\n * Utility to merge multiple theme objects\n */\nexport const mergeThemes = (...themes: Partial<AdMeshTheme>[]): AdMeshTheme => {\n const baseTheme = createAdMeshTheme();\n return themes.reduce((merged, theme) => {\n if (!theme) return merged;\n return {\n ...merged,\n ...theme,\n mode: theme.mode || merged.mode\n };\n }, baseTheme);\n};\n\n/**\n * Utility to create a theme from CSS custom properties\n */\nexport const themeFromCSSProperties = (element: HTMLElement): Partial<AdMeshTheme> => {\n const computedStyle = getComputedStyle(element);\n \n return {\n primaryColor: computedStyle.getPropertyValue('--admesh-primary-color')?.trim() || undefined,\n secondaryColor: computedStyle.getPropertyValue('--admesh-secondary-color')?.trim() || undefined,\n backgroundColor: computedStyle.getPropertyValue('--admesh-background-color')?.trim() || undefined,\n textColor: computedStyle.getPropertyValue('--admesh-text-color')?.trim() || undefined,\n borderRadius: computedStyle.getPropertyValue('--admesh-border-radius')?.trim() || undefined,\n fontFamily: computedStyle.getPropertyValue('--admesh-font-family')?.trim() || undefined\n };\n};\n","// AdMesh UI SDK - Main Entry Point\n\n// Export core components only\nexport {\n AdMeshLayout,\n AdMeshProductCard,\n AdMeshInlineCard,\n AdMeshEcommerceCards,\n AdMeshSummaryUnit,\n AdMeshSummaryLayout,\n AdMeshLinkTracker,\n AdMeshBadge\n} from './components';\n\n// Export hooks\nexport {\n useAdMeshTracker,\n setAdMeshTrackerConfig,\n buildAdMeshLink,\n extractTrackingData\n} from './hooks/useAdMeshTracker';\n\nexport {\n useAdMeshStyles\n} from './hooks/useAdMeshStyles';\n\n// Export theme utilities\nexport {\n createAdMeshTheme,\n createDarkTheme,\n themePresets,\n mergeThemes,\n themeFromCSSProperties\n} from './utils/themeUtils';\n\n// Export disclosure utilities\nexport {\n getRecommendationLabel,\n getLabelTooltip,\n getSectionDisclosure,\n getInlineDisclosure,\n getInlineTooltip,\n getBadgeText,\n getCtaText,\n hasHighQualityMatches,\n getPoweredByText\n} from './utils/disclosureUtils';\n\nexport type {\n DisclosureConfig\n} from './utils/disclosureUtils';\n\n// Export types\nexport type {\n AdMeshRecommendation,\n AdMeshTheme,\n IntentType,\n BadgeType,\n BadgeVariant,\n BadgeSize,\n TrackingData,\n AdMeshProductCardProps,\n AdMeshEcommerceCardsProps,\n EcommerceProduct,\n AdMeshBadgeProps,\n AdMeshLayoutProps,\n AdMeshLayoutType,\n AdMeshLinkTrackerProps,\n AdMeshSummaryUnitProps,\n AdMeshSummaryLayoutProps,\n UseAdMeshTrackerReturn,\n AgentRecommendationResponse,\n AdMeshConfig\n} from './types/index';\n\n// Version info\nexport const VERSION = '0.2.1';\n\n// Default configuration\nexport const DEFAULT_CONFIG = {\n trackingEnabled: true,\n debug: false,\n theme: {\n mode: 'light' as const,\n accentColor: '#2563eb'\n }\n};\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production","getComponentNameFromType","REACT_CLIENT_REFERENCE","REACT_PROFILER_TYPE","REACT_STRICT_MODE_TYPE","REACT_SUSPENSE_TYPE","REACT_SUSPENSE_LIST_TYPE","REACT_ACTIVITY_TYPE","REACT_PORTAL_TYPE","REACT_CONTEXT_TYPE","REACT_CONSUMER_TYPE","REACT_FORWARD_REF_TYPE","innerType","REACT_MEMO_TYPE","REACT_LAZY_TYPE","testStringCoercion","value","checkKeyStringCoercion","JSCompiler_inline_result","JSCompiler_temp_const","JSCompiler_inline_result$jscomp$0","getTaskName","name","getOwner","dispatcher","ReactSharedInternals","UnknownOwner","hasValidKey","hasOwnProperty","getter","defineKeyPropWarningGetter","props","displayName","warnAboutAccessingKey","specialPropKeyWarningShown","elementRefGetterWithDeprecationWarning","componentName","didWarnAboutElementRef","ReactElement","self","source","owner","debugStack","debugTask","jsxDEVImpl","isStaticChildren","children","isArrayImpl","validateChildKeys","keys","k","didWarnAboutKeySpread","node","React","require$$0","createTask","callStackForError","unknownOwnerDebugStack","unknownOwnerDebugTask","reactJsxRuntime_development","trackActualOwner","jsxRuntimeModule","require$$1","processSummaryText","summaryText","recommendations","linkToRecMap","rec","markdownLinkRegex","parts","lastIndex","match","linkCounter","fullMatch","linkText","url","recommendation","jsx","e","AdMeshSummaryUnit","theme","className","style","onLinkClick","processedContent","jsxs","part","index","hasOwn","classNames","classes","i","arg","appendClass","parseValue","newClass","module","DEFAULT_TRACKING_URL","globalConfig","setAdMeshTrackerConfig","useAdMeshTracker","isTracking","setIsTracking","useState","error","setError","mergedConfig","useMemo","log","useCallback","message","data","sendTrackingEvent","eventType","errorMsg","payload","lastError","attempt","response","result","err","resolve","trackClick","trackView","trackConversion","buildAdMeshLink","baseLink","adId","additionalParams","extractTrackingData","additionalData","AdMeshLinkTracker","admeshLink","productId","trackingData","elementRef","useRef","hasTrackedView","useEffect","observer","entries","entry","handleClick","event","ADMESH_STYLES","stylesInjected","useAdMeshStyles","styleElement","existingStyle","getRecommendationLabel","matchScore","customLabels","getLabelTooltip","_label","getSectionDisclosure","hasHighMatches","isExpanded","getInlineDisclosure","compact","getInlineTooltip","getBadgeText","badgeType","getCtaText","context","productName","hasHighQualityMatches","getPoweredByText","AdMeshProductCard","showMatchScore","showBadges","variation","expandable","setIsExpanded","generatedBadges","aiKeywords","_a","keyword","ai","badge","content","cardClasses","cardStyle","_b","_c","_d","_e","_f","_g","_h","_i","_j","_l","_k","_m","_n","feature","j","AdMeshEcommerceCards","products","title","showTitle","cardClassName","onProductClick","showPricing","showRatings","showBrand","showSource","showShipping","maxCards","cardWidth","borderRadius","shadow","displayItems","getCardWidthClass","getBorderRadiusClass","getShadowClass","getThemeClasses","formatPrice","price","renderStars","rating","stars","fullStars","hasHalfStar","emptyStars","handleProductClick","item","link","itemId","Fragment","validateResponse","warnings","validRecommendations","AdMeshSummaryLayout","onRecommendationClick","validation","layout_type","citation_summary","requires_summary","renderContent","AdMeshLayout","citationSummary","layout","handleRecommendationClick","legacyResponse","AdMeshInlineCard","variations","badgeTypeVariants","badgeTypeIcons","AdMeshBadge","variant","size","effectiveVariant","icon","badgeClasses","createAdMeshTheme","customTheme","baseTheme","mergedTheme","ensureConsistentWidths","createDarkTheme","themePresets","inputTheme","existingComponents","consistentComponents","mergeThemes","themes","merged","themeFromCSSProperties","element","computedStyle","VERSION","DEFAULT_CONFIG"],"mappings":";;;;;;;;4CAWA,IAAIA,EAAqB,OAAO,IAAI,4BAA4B,EAC9DC,EAAsB,OAAO,IAAI,gBAAgB,EACnD,SAASC,EAAQC,EAAMC,EAAQC,EAAU,CACvC,IAAIC,EAAM,KAGV,GAFWD,IAAX,SAAwBC,EAAM,GAAKD,GACxBD,EAAO,MAAlB,SAA0BE,EAAM,GAAKF,EAAO,KACxC,QAASA,EAAQ,CACnBC,EAAW,CAAE,EACb,QAASE,KAAYH,EACTG,IAAV,QAAuBF,EAASE,CAAQ,EAAIH,EAAOG,CAAQ,EAC9D,MAAMF,EAAWD,EAClB,OAAAA,EA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