@wix/web5-core 1.59.0 → 1.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/cjs/component/componentDefinitions/ComparisonSectionDefinition.js +33 -1
  2. package/dist/cjs/component/componentDefinitions/ComparisonSectionDefinition.js.map +1 -1
  3. package/dist/cjs/component/componentDefinitions/FeatureSection9PlusDefinition.js +9 -5
  4. package/dist/cjs/component/componentDefinitions/FeatureSection9PlusDefinition.js.map +1 -1
  5. package/dist/cjs/component/componentDefinitions/listItemsSectionDefinition.js +10 -5
  6. package/dist/cjs/component/componentDefinitions/listItemsSectionDefinition.js.map +1 -1
  7. package/dist/cjs/component/componentDefinitions/parse-utils.js +45 -8
  8. package/dist/cjs/component/componentDefinitions/parse-utils.js.map +1 -1
  9. package/dist/cjs/component/componentParser.js +15 -0
  10. package/dist/cjs/component/componentParser.js.map +1 -1
  11. package/dist/cjs/component/section-definition.js +14 -0
  12. package/dist/cjs/component/section-definition.js.map +1 -1
  13. package/dist/cjs/components/ui/MarkdownText.js +41 -42
  14. package/dist/cjs/components/ui/MarkdownText.js.map +1 -1
  15. package/dist/cjs/components/ui/UnifiedLink.js +22 -10
  16. package/dist/cjs/components/ui/UnifiedLink.js.map +1 -1
  17. package/dist/cjs/index.js +5 -3
  18. package/dist/cjs/index.js.map +1 -1
  19. package/dist/cjs/utils/markdownPreprocessor.js +162 -8
  20. package/dist/cjs/utils/markdownPreprocessor.js.map +1 -1
  21. package/dist/esm/component/componentDefinitions/ComparisonSectionDefinition.js +34 -1
  22. package/dist/esm/component/componentDefinitions/ComparisonSectionDefinition.js.map +1 -1
  23. package/dist/esm/component/componentDefinitions/FeatureSection9PlusDefinition.js +10 -6
  24. package/dist/esm/component/componentDefinitions/FeatureSection9PlusDefinition.js.map +1 -1
  25. package/dist/esm/component/componentDefinitions/listItemsSectionDefinition.js +11 -6
  26. package/dist/esm/component/componentDefinitions/listItemsSectionDefinition.js.map +1 -1
  27. package/dist/esm/component/componentDefinitions/parse-utils.js +44 -8
  28. package/dist/esm/component/componentDefinitions/parse-utils.js.map +1 -1
  29. package/dist/esm/component/componentParser.js +15 -0
  30. package/dist/esm/component/componentParser.js.map +1 -1
  31. package/dist/esm/component/section-definition.js +13 -1
  32. package/dist/esm/component/section-definition.js.map +1 -1
  33. package/dist/esm/components/ui/MarkdownText.js +8 -9
  34. package/dist/esm/components/ui/MarkdownText.js.map +1 -1
  35. package/dist/esm/components/ui/UnifiedLink.js +7 -1
  36. package/dist/esm/components/ui/UnifiedLink.js.map +1 -1
  37. package/dist/esm/index.js +2 -0
  38. package/dist/esm/index.js.map +1 -1
  39. package/dist/esm/utils/markdownPreprocessor.js +160 -8
  40. package/dist/esm/utils/markdownPreprocessor.js.map +1 -1
  41. package/dist/types/component/componentDefinitions/ComparisonSectionDefinition.d.ts +2 -2
  42. package/dist/types/component/componentDefinitions/ComparisonSectionDefinition.d.ts.map +1 -1
  43. package/dist/types/component/componentDefinitions/FeatureSection9PlusDefinition.d.ts.map +1 -1
  44. package/dist/types/component/componentDefinitions/listItemsSectionDefinition.d.ts.map +1 -1
  45. package/dist/types/component/componentDefinitions/parse-utils.d.ts +10 -0
  46. package/dist/types/component/componentDefinitions/parse-utils.d.ts.map +1 -1
  47. package/dist/types/component/componentParser.d.ts.map +1 -1
  48. package/dist/types/component/section-definition.d.ts +13 -1
  49. package/dist/types/component/section-definition.d.ts.map +1 -1
  50. package/dist/types/components/ui/MarkdownText.d.ts +13 -0
  51. package/dist/types/components/ui/MarkdownText.d.ts.map +1 -1
  52. package/dist/types/components/ui/UnifiedLink.d.ts +1 -1
  53. package/dist/types/components/ui/UnifiedLink.d.ts.map +1 -1
  54. package/dist/types/index.d.ts +2 -1
  55. package/dist/types/index.d.ts.map +1 -1
  56. package/dist/types/utils/markdownPreprocessor.d.ts +30 -5
  57. package/dist/types/utils/markdownPreprocessor.d.ts.map +1 -1
  58. package/package.json +2 -2
@@ -59,7 +59,19 @@ function UnifiedLink({
59
59
  } = (0, _ComponentDependenciesContext.useComponentDependencies)();
60
60
  if (!(0, _entityLinkParser.validateLinkUrl)(href)) {
61
61
  reportDiagnostic == null || reportDiagnostic(_diagnosticTypes.DIAGNOSTIC_TYPES.BROKEN_WEB5_LINK, 'unifiedLink', `link rejected: "${href}"`);
62
- return null;
62
+ // Degrade to the label as plain text rather than dropping it. Returning
63
+ // null used to delete the children too, so a bad href silently removed
64
+ // words from the middle of a sentence — the reader lost prose, not just a
65
+ // link. An unclickable phrase is the smaller failure.
66
+ return /*#__PURE__*/_react.default.createElement("span", {
67
+ className: className,
68
+ __self: this,
69
+ __source: {
70
+ fileName: _jsxFileName,
71
+ lineNumber: 79,
72
+ columnNumber: 12
73
+ }
74
+ }, children);
63
75
  }
64
76
  const resolvedHref = resolveUrl(href) ?? href;
65
77
  const linkType = linkTypeProp ?? detectLinkType(href);
@@ -84,7 +96,7 @@ function UnifiedLink({
84
96
  __self: this,
85
97
  __source: {
86
98
  fileName: _jsxFileName,
87
- lineNumber: 96,
99
+ lineNumber: 100,
88
100
  columnNumber: 7
89
101
  }
90
102
  }), children);
@@ -98,7 +110,7 @@ function UnifiedLink({
98
110
  __self: this,
99
111
  __source: {
100
112
  fileName: _jsxFileName,
101
- lineNumber: 112,
113
+ lineNumber: 116,
102
114
  columnNumber: 7
103
115
  }
104
116
  }), children, showArrow && /*#__PURE__*/_react.default.createElement("span", {
@@ -106,7 +118,7 @@ function UnifiedLink({
106
118
  __self: this,
107
119
  __source: {
108
120
  fileName: _jsxFileName,
109
- lineNumber: 124,
121
+ lineNumber: 128,
110
122
  columnNumber: 11
111
123
  }
112
124
  }, "\xA0", /*#__PURE__*/_react.default.createElement(ArrowIcon, {
@@ -114,7 +126,7 @@ function UnifiedLink({
114
126
  __self: this,
115
127
  __source: {
116
128
  fileName: _jsxFileName,
117
- lineNumber: 126,
129
+ lineNumber: 130,
118
130
  columnNumber: 13
119
131
  }
120
132
  })));
@@ -129,7 +141,7 @@ function UnifiedLink({
129
141
  __self: this,
130
142
  __source: {
131
143
  fileName: _jsxFileName,
132
- lineNumber: 135,
144
+ lineNumber: 139,
133
145
  columnNumber: 5
134
146
  }
135
147
  }), /*#__PURE__*/_react.default.createElement("span", {
@@ -137,7 +149,7 @@ function UnifiedLink({
137
149
  __self: this,
138
150
  __source: {
139
151
  fileName: _jsxFileName,
140
- lineNumber: 149,
152
+ lineNumber: 153,
141
153
  columnNumber: 7
142
154
  }
143
155
  }), /*#__PURE__*/_react.default.createElement("span", {
@@ -145,7 +157,7 @@ function UnifiedLink({
145
157
  __self: this,
146
158
  __source: {
147
159
  fileName: _jsxFileName,
148
- lineNumber: 157,
160
+ lineNumber: 161,
149
161
  columnNumber: 7
150
162
  }
151
163
  }, children), showArrow && /*#__PURE__*/_react.default.createElement("span", {
@@ -153,7 +165,7 @@ function UnifiedLink({
153
165
  __self: this,
154
166
  __source: {
155
167
  fileName: _jsxFileName,
156
- lineNumber: 161,
168
+ lineNumber: 165,
157
169
  columnNumber: 9
158
170
  }
159
171
  }, /*#__PURE__*/_react.default.createElement(ArrowIcon, {
@@ -161,7 +173,7 @@ function UnifiedLink({
161
173
  __self: this,
162
174
  __source: {
163
175
  fileName: _jsxFileName,
164
- lineNumber: 168,
176
+ lineNumber: 172,
165
177
  columnNumber: 11
166
178
  }
167
179
  })));
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_linkTypes","_entityLinkParser","_utils","_useWeb5Link","_ComponentDependenciesContext","_diagnosticTypes","_ArrowUpIcon","_ArrowTopRightIcon","_jsxFileName","LinkType","exports","ARROW_BY_TYPE","ASK","ArrowUpIcon","ACTION","ArrowTopRightIcon","NAVIGATE","detectLinkType","href","isWeb5AskUrl","isWeb5ActionUrl","UnifiedLink","linkType","linkTypeProp","variant","active","hideArrow","className","children","onClick","props","handleLinkClick","resolveUrl","useWeb5Link","reportDiagnostic","useComponentDependencies","validateLinkUrl","DIAGNOSTIC_TYPES","BROKEN_WEB5_LINK","resolvedHref","ArrowIcon","showArrow","safeHref","startsWith","handleClick","e","defaultPrevented","default","createElement","_extends2","cn","__self","__source","fileName","lineNumber","columnNumber"],"sources":["../../../../src/components/ui/UnifiedLink.tsx"],"sourcesContent":["import React from 'react';\nimport { isWeb5AskUrl, isWeb5ActionUrl } from '../../types/link-types';\nimport { validateLinkUrl } from '../../utils/entityLinkParser';\nimport { cn } from '../../lib/utils';\nimport { useWeb5Link } from '../../hooks/useWeb5Link';\nimport { useComponentDependencies } from '../../context/ComponentDependenciesContext';\nimport { DIAGNOSTIC_TYPES } from '../../component/diagnosticTypes';\nimport { ArrowUpIcon } from './icons/ArrowUpIcon';\nimport { ArrowTopRightIcon } from './icons/ArrowTopRightIcon';\n\nexport enum LinkType {\n ASK = 'ask',\n ACTION = 'action',\n NAVIGATE = 'navigate',\n}\n\nexport type LinkVariant = 'primary' | 'secondary' | 'inline';\n\nexport interface UnifiedLinkProps\n extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n href?: string;\n /** Override auto-detected link type */\n linkType?: LinkType;\n /** Visual variant */\n variant?: LinkVariant;\n /** Whether this is the first/active item (dark bg). Only applies to primary variant. */\n active?: boolean;\n /** Hide the arrow icon */\n hideArrow?: boolean;\n children: React.ReactNode;\n}\n\nconst ARROW_BY_TYPE: Record<\n LinkType,\n React.FC<React.SVGProps<SVGSVGElement>>\n> = {\n [LinkType.ASK]: ArrowUpIcon,\n [LinkType.ACTION]: ArrowTopRightIcon,\n [LinkType.NAVIGATE]: ArrowUpIcon,\n};\n\nexport function detectLinkType(href: string | undefined): LinkType {\n if (!href) {\n return LinkType.NAVIGATE;\n }\n if (isWeb5AskUrl(href)) {\n return LinkType.ASK;\n }\n if (isWeb5ActionUrl(href)) {\n return LinkType.ACTION;\n }\n return LinkType.NAVIGATE;\n}\n\nexport function UnifiedLink({\n href,\n linkType: linkTypeProp,\n variant = 'primary',\n active = false,\n hideArrow,\n className,\n children,\n onClick,\n ...props\n}: UnifiedLinkProps) {\n const { handleLinkClick, resolveUrl } = useWeb5Link();\n const { reportDiagnostic } = useComponentDependencies();\n\n if (!validateLinkUrl(href)) {\n reportDiagnostic?.(\n DIAGNOSTIC_TYPES.BROKEN_WEB5_LINK,\n 'unifiedLink',\n `link rejected: \"${href}\"`,\n );\n return null;\n }\n\n const resolvedHref = resolveUrl(href) ?? href;\n const linkType = linkTypeProp ?? detectLinkType(href);\n const ArrowIcon = ARROW_BY_TYPE[linkType];\n const showArrow = !hideArrow && variant !== 'inline';\n\n // web5:// hrefs must never reach the browser — Safari iOS attempts custom-scheme\n // navigation before JS fires, producing an \"address is invalid\" error.\n const safeHref = href?.startsWith('web5://') ? '#' : resolvedHref;\n\n const handleClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n onClick?.(e);\n if (!e.defaultPrevented && resolvedHref) {\n handleLinkClick(e, resolvedHref);\n }\n };\n\n if (variant === 'inline') {\n return (\n <a\n href={safeHref}\n className={cn(\n 'text-primary underline underline-offset-4 hover:text-primary/80 cursor-pointer',\n className,\n )}\n onClick={handleClick}\n {...props}\n >\n {children}\n </a>\n );\n }\n\n if (variant === 'secondary') {\n return (\n <a\n href={safeHref}\n className={cn(\n 'inline w-fit cursor-pointer',\n 'text-sm leading-[18px] text-text-accent',\n className,\n )}\n onClick={handleClick}\n {...props}\n >\n {children}\n {showArrow && (\n <span className=\"inline whitespace-nowrap\">\n &nbsp;\n <ArrowIcon className=\"ml-0.5 inline-block size-4 align-middle\" />\n </span>\n )}\n </a>\n );\n }\n\n // Primary variant — pill with arrow circle and hover overlay\n return (\n <a\n href={safeHref}\n className={cn(\n 'group relative flex md:w-fit md:max-w-[500px] items-center justify-between rounded-[80px] pl-5 pr-[3px] py-[3px] gap-2 cursor-pointer overflow-hidden',\n 'text-sm leading-[14px]',\n active\n ? 'bg-text-accent text-white'\n : 'bg-white border border-text-accent/30 text-text-accent',\n className,\n )}\n onClick={handleClick}\n {...props}\n >\n {/* Hover overlay — expands from right (arrow) to fill pill */}\n <span\n className={cn(\n 'absolute inset-[3px] rounded-[80px] pointer-events-none',\n 'origin-right scale-x-0 group-hover:scale-x-100',\n 'transition-transform duration-300 ease-out',\n active ? 'bg-text-accent-hover' : 'bg-text-accent/10',\n )}\n />\n <span className=\"relative z-[1] min-w-0 py-[10px] truncate\">\n {children}\n </span>\n {showArrow && (\n <span\n className={cn(\n 'relative z-[1] flex items-center justify-center rounded-full shrink-0',\n 'size-[34px] p-2.5',\n active ? 'bg-text-accent-hover' : 'bg-text-accent/10',\n )}\n >\n <ArrowIcon className=\"size-4\" />\n </span>\n )}\n </a>\n );\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,6BAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,kBAAA,GAAAR,OAAA;AAA8D,IAAAS,YAAA;AAAA,IAElDC,QAAQ,GAAAC,OAAA,CAAAD,QAAA,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAA,OAARA,QAAQ;AAAA;AAsBpB,MAAME,aAGL,GAAG;EACF,CAACF,QAAQ,CAACG,GAAG,GAAGC,wBAAW;EAC3B,CAACJ,QAAQ,CAACK,MAAM,GAAGC,oCAAiB;EACpC,CAACN,QAAQ,CAACO,QAAQ,GAAGH;AACvB,CAAC;AAEM,SAASI,cAAcA,CAACC,IAAwB,EAAY;EACjE,IAAI,CAACA,IAAI,EAAE;IACT,OAAOT,QAAQ,CAACO,QAAQ;EAC1B;EACA,IAAI,IAAAG,uBAAY,EAACD,IAAI,CAAC,EAAE;IACtB,OAAOT,QAAQ,CAACG,GAAG;EACrB;EACA,IAAI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entityLinkParser","_utils","_useWeb5Link","_ComponentDependenciesContext","_diagnosticTypes","_ArrowUpIcon","_ArrowTopRightIcon","_jsxFileName","LinkType","exports","ARROW_BY_TYPE","ASK","ArrowUpIcon","ACTION","ArrowTopRightIcon","NAVIGATE","detectLinkType","href","isWeb5AskUrl","isWeb5ActionUrl","UnifiedLink","linkType","linkTypeProp","variant","active","hideArrow","className","children","onClick","props","handleLinkClick","resolveUrl","useWeb5Link","reportDiagnostic","useComponentDependencies","validateLinkUrl","DIAGNOSTIC_TYPES","BROKEN_WEB5_LINK","default","createElement","__self","__source","fileName","lineNumber","columnNumber","resolvedHref","ArrowIcon","showArrow","safeHref","startsWith","handleClick","e","defaultPrevented","_extends2","cn"],"sources":["../../../../src/components/ui/UnifiedLink.tsx"],"sourcesContent":["import React from 'react';\nimport { isWeb5AskUrl, isWeb5ActionUrl } from '../../types/link-types';\nimport { validateLinkUrl } from '../../utils/entityLinkParser';\nimport { cn } from '../../lib/utils';\nimport { useWeb5Link } from '../../hooks/useWeb5Link';\nimport { useComponentDependencies } from '../../context/ComponentDependenciesContext';\nimport { DIAGNOSTIC_TYPES } from '../../component/diagnosticTypes';\nimport { ArrowUpIcon } from './icons/ArrowUpIcon';\nimport { ArrowTopRightIcon } from './icons/ArrowTopRightIcon';\n\nexport enum LinkType {\n ASK = 'ask',\n ACTION = 'action',\n NAVIGATE = 'navigate',\n}\n\nexport type LinkVariant = 'primary' | 'secondary' | 'inline';\n\nexport interface UnifiedLinkProps\n extends React.AnchorHTMLAttributes<HTMLAnchorElement> {\n href?: string;\n /** Override auto-detected link type */\n linkType?: LinkType;\n /** Visual variant */\n variant?: LinkVariant;\n /** Whether this is the first/active item (dark bg). Only applies to primary variant. */\n active?: boolean;\n /** Hide the arrow icon */\n hideArrow?: boolean;\n children: React.ReactNode;\n}\n\nconst ARROW_BY_TYPE: Record<\n LinkType,\n React.FC<React.SVGProps<SVGSVGElement>>\n> = {\n [LinkType.ASK]: ArrowUpIcon,\n [LinkType.ACTION]: ArrowTopRightIcon,\n [LinkType.NAVIGATE]: ArrowUpIcon,\n};\n\nexport function detectLinkType(href: string | undefined): LinkType {\n if (!href) {\n return LinkType.NAVIGATE;\n }\n if (isWeb5AskUrl(href)) {\n return LinkType.ASK;\n }\n if (isWeb5ActionUrl(href)) {\n return LinkType.ACTION;\n }\n return LinkType.NAVIGATE;\n}\n\nexport function UnifiedLink({\n href,\n linkType: linkTypeProp,\n variant = 'primary',\n active = false,\n hideArrow,\n className,\n children,\n onClick,\n ...props\n}: UnifiedLinkProps) {\n const { handleLinkClick, resolveUrl } = useWeb5Link();\n const { reportDiagnostic } = useComponentDependencies();\n\n if (!validateLinkUrl(href)) {\n reportDiagnostic?.(\n DIAGNOSTIC_TYPES.BROKEN_WEB5_LINK,\n 'unifiedLink',\n `link rejected: \"${href}\"`,\n );\n // Degrade to the label as plain text rather than dropping it. Returning\n // null used to delete the children too, so a bad href silently removed\n // words from the middle of a sentence — the reader lost prose, not just a\n // link. An unclickable phrase is the smaller failure.\n return <span className={className}>{children}</span>;\n }\n\n const resolvedHref = resolveUrl(href) ?? href;\n const linkType = linkTypeProp ?? detectLinkType(href);\n const ArrowIcon = ARROW_BY_TYPE[linkType];\n const showArrow = !hideArrow && variant !== 'inline';\n\n // web5:// hrefs must never reach the browser — Safari iOS attempts custom-scheme\n // navigation before JS fires, producing an \"address is invalid\" error.\n const safeHref = href?.startsWith('web5://') ? '#' : resolvedHref;\n\n const handleClick = (e: React.MouseEvent<HTMLAnchorElement>) => {\n onClick?.(e);\n if (!e.defaultPrevented && resolvedHref) {\n handleLinkClick(e, resolvedHref);\n }\n };\n\n if (variant === 'inline') {\n return (\n <a\n href={safeHref}\n className={cn(\n 'text-primary underline underline-offset-4 hover:text-primary/80 cursor-pointer',\n className,\n )}\n onClick={handleClick}\n {...props}\n >\n {children}\n </a>\n );\n }\n\n if (variant === 'secondary') {\n return (\n <a\n href={safeHref}\n className={cn(\n 'inline w-fit cursor-pointer',\n 'text-sm leading-[18px] text-text-accent',\n className,\n )}\n onClick={handleClick}\n {...props}\n >\n {children}\n {showArrow && (\n <span className=\"inline whitespace-nowrap\">\n &nbsp;\n <ArrowIcon className=\"ml-0.5 inline-block size-4 align-middle\" />\n </span>\n )}\n </a>\n );\n }\n\n // Primary variant — pill with arrow circle and hover overlay\n return (\n <a\n href={safeHref}\n className={cn(\n 'group relative flex md:w-fit md:max-w-[500px] items-center justify-between rounded-[80px] pl-5 pr-[3px] py-[3px] gap-2 cursor-pointer overflow-hidden',\n 'text-sm leading-[14px]',\n active\n ? 'bg-text-accent text-white'\n : 'bg-white border border-text-accent/30 text-text-accent',\n className,\n )}\n onClick={handleClick}\n {...props}\n >\n {/* Hover overlay — expands from right (arrow) to fill pill */}\n <span\n className={cn(\n 'absolute inset-[3px] rounded-[80px] pointer-events-none',\n 'origin-right scale-x-0 group-hover:scale-x-100',\n 'transition-transform duration-300 ease-out',\n active ? 'bg-text-accent-hover' : 'bg-text-accent/10',\n )}\n />\n <span className=\"relative z-[1] min-w-0 py-[10px] truncate\">\n {children}\n </span>\n {showArrow && (\n <span\n className={cn(\n 'relative z-[1] flex items-center justify-center rounded-full shrink-0',\n 'size-[34px] p-2.5',\n active ? 'bg-text-accent-hover' : 'bg-text-accent/10',\n )}\n >\n <ArrowIcon className=\"size-4\" />\n </span>\n )}\n </a>\n );\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,6BAAA,GAAAL,OAAA;AACA,IAAAM,gBAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,kBAAA,GAAAR,OAAA;AAA8D,IAAAS,YAAA;AAAA,IAElDC,QAAQ,GAAAC,OAAA,CAAAD,QAAA,0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S,EAAC,2CAA2C;IAAAc,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAnC,YAAA;MAAAoC,UAAA;MAAAC,YAAA;IAAA;EAAA,GACxDjB,QACG,CAAC,EACNoB,SAAS,iBACRnD,MAAA,CAAA0C,OAAA,CAAAC,aAAA;IACEb,SAAS,EAAE,IAAA4B,SAAE,EACX,uEAAuE,EACvE,mBAAmB,EACnB9B,MAAM,GAAG,sBAAsB,GAAG,mBACpC,CAAE;IAAAgB,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAnC,YAAA;MAAAoC,UAAA;MAAAC,YAAA;IAAA;EAAA,gBAEFhD,MAAA,CAAA0C,OAAA,CAAAC,aAAA,CAACO,SAAS;IAACpB,SAAS,EAAC,QAAQ;IAAAc,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAnC,YAAA;MAAAoC,UAAA;MAAAC,YAAA;IAAA;EAAA,CAAE,CAC3B,CAEP,CAAC;AAER","ignoreList":[]}
package/dist/cjs/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.createPageSection = exports.createFeatureToggleReader = exports.createErrorMarkdown = exports.convertToBlockElementsWithMapping = exports.convertToBlockElements = exports.computeContentBBox = exports.cn = exports.clearForwardStack = exports.buildProbeUrl = exports.buildPlacementDependencies = exports.buildImageSearchFilter = exports.backgroundFilter = exports.applyThemeOverrides = exports.analyzeBackdrop = exports.addToCart = exports.Web5UrlType = exports.WEB5_USER_QUERY_EVENT = exports.WEB5_SCOPES = exports.WEB5_SCOPE = exports.WEB5_ROOT_ID = exports.WEB5_ROOT_CLASS = exports.WEB5_REDIRECT_EVENT = exports.WEB5_GLOBAL_TOKENS = exports.WEB5_ANSWER_UPDATED_EVENT = exports.UserQueryProvider = exports.UserQuery = exports.UnifiedMarkdownParser = exports.UnifiedLink = exports.TextBlockSectionDefinition = exports.TableRow = exports.TableHeader = exports.TableHead = exports.TableFooter = exports.TableCell = exports.TableCaption = exports.TableBody = exports.Table = exports.THEME_OVERRIDE_TOKENS = exports.TEMPLATES_MANIFEST_URL = exports.TEMPLATES_CDN_BASE = exports.SmartIcon = exports.SkipNodesSectionDefinition = exports.ShopifyStorefrontClient = exports.SectionSkeleton = exports.SearchSectionDefinition = exports.SearchSection = exports.STREAMING_TIMEOUT_MS = exports.REFRESH_PROMPTS_WINDOW_MS = exports.REFRESH_PROMPTS_UNTIL_KEY = exports.PromptEntryEmptyState = exports.PlacementSmoothHeight = exports.PlacementResponseRenderer = exports.PlacementPayloadProvider = exports.PlacementLoader = exports.PRODUCT_BY_HANDLE_QUERY = exports.PRODUCT_BACK_SESSION_KEY = exports.OptimizedImage = exports.NextStepsSectionDefinition = exports.MarkdownText = exports.MATCH_DEBUG_QUERY_PARAM = exports.MATCH_DEBUG_KEY = exports.Loader = exports.ListItemsSectionDefinition = exports.LinkType = exports.LIST_ITEMS_ENDPOINT = exports.KpiSectionDefinition = exports.ImageSearchFilterToken = exports.HtmlCommentSectionDefinition = exports.HeroSectionDefinition = exports.HeroEntitySectionDefinition = exports.FeedbackBar = exports.FeatureToggleProvider = exports.FeatureSection9PlusDefinition = exports.FeatureCardsSectionDefinition = exports.FallbackSectionDefinition = exports.ErrorSectionDefinition = exports.EntitySectionDefinition = exports.EntityCollectionSectionDefinition = exports.EXPERIMENT_IDS = exports.ERROR_MARKDOWN = exports.Disclaimer = exports.DiagnosticsCollector = exports.DIAGNOSTIC_TYPES = exports.DEFAULT_ERROR_TEMPLATES = exports.DEFAULT_BACKEND_ENVIRONMENT = exports.CtaBannerSectionDefinition = exports.ComponentTracking = exports.ComponentRegistry = exports.ComponentDependenciesProvider = exports.ComparisonSectionDefinition = exports.ChipsProvider = exports.CalloutSectionDefinition = exports.CalloutBlock = exports.COLLECTION_BY_HANDLE_QUERY = exports.CLIENT_IDS = exports.CALLOUT_KINDS = exports.BottomContainer = exports.BACKEND_ENVIRONMENT_QUERY_PARAM = exports.BACKEND_ENVIRONMENT_KEY = exports.ARTICLE_BY_HANDLE_QUERY = void 0;
5
- exports.resolveErrorTemplate = exports.resolveClientBundleUrl = exports.resetMatchDebugCache = exports.resetChatIdForTests = exports.registerEntityExtractor = exports.readProductBackHandoff = exports.pushToForwardStack = exports.pushPromptSubmit = exports.pushLinkClick = exports.pushExit = exports.pushEvent = exports.pushError = exports.pushEntityFiltered = exports.preprocessMarkdown = exports.popFromForwardStack = exports.parseWeb5Url = exports.parseMarkdownToComponents = exports.parseMarkdownToAst = exports.parseEntityLink = exports.parseAstToMarkdown = exports.normalizeImageUrl = exports.normalizeIconUrls = exports.nodesToParts = exports.mergeSectionsWithStableReferences = exports.mergeClientConfig = exports.matchMarkdown = exports.matchAllSections = exports.logMatchDebug = exports.loadImagePixels = exports.loadClientBundle = exports.loadBackdropAnalysis = exports.listEntityItems = exports.isWeb5Url = exports.isWeb5SearchUrl = exports.isWeb5ImageUrl = exports.isWeb5IconUrl = exports.isWeb5EntityUrl = exports.isWeb5AskUrl = exports.isWeb5ActionUrl = exports.isValidWeb5Url = exports.isValidTemplateId = exports.isValidLinkUrl = exports.isTrustedBundleHost = exports.isTemplatePickerRequested = exports.isNavigableUrl = exports.isMatchDebugEnabled = exports.isLegacyUrl = exports.isHtmlComment = exports.isEntityLink = exports.hslToRgb = exports.hasImage = exports.hasAnalyticsConsent = exports.getTemplateOverride = exports.getSessionId = exports.getResizedImageUrl = exports.getRefreshPromptsExpiry = exports.getPartsByType = exports.getPartByRole = exports.getOrCreateSessionId = exports.getLinks = exports.getIntentFromMarkdown = exports.getImages = exports.getHeading = exports.getForwardStack = exports.getErrorTypeFromStatus = exports.getEntityExtractor = exports.getContextualImageFilename = exports.getClientBundleOverride = exports.getChatId = exports.getBackendEnvironment = exports.getAllByRole = exports.generateSectionId = exports.generateId = exports.fixMalformedLinks = exports.findKeywordsInContent = exports.findInvalidWeb5Links = exports.findImageInNode = exports.findImageInChildren = exports.fetchProductsByHandlesMap = exports.fetchProductsByHandles = exports.fetchEntityListData = exports.extractProtocol = exports.extractLinkMetadata = exports.extractIntentFromMarkdown = exports.extractContentMarkdown = exports.extractContent = exports.escapeWeb5Links = exports.ensureMinLightness = exports.enrichEntitiesFromPayload = exports.enableRefreshPrompts = exports.disableRefreshPrompts = exports.detectLinkType = exports.deriveRole = exports.deriveLightColor = exports.deriveDarkGradient = exports.deriveDarkColor = exports.defaultExtractor = exports.decodeLinkText = exports.createWixAuthFetch = exports.createSdkRegistry = void 0;
6
- exports.writeProductBackHandoff = exports.validatePatternWithBlocks = exports.validatePatternSyntax = exports.validatePattern = exports.validateLinkUrl = exports.usesStagingBackend = exports.useWeb5Link = exports.useUserQuery = exports.useResolvedImageSources = exports.useResolveShopifyEntityData = exports.useResolveSearchSpringEntityData = exports.useResolveGenericEntityData = exports.usePlacementPayload = exports.useMarkdownUtils = exports.useFeatureToggles = exports.useFeatureToggle = exports.useEntityTransforms = exports.useDebugImageContext = exports.useConversation = exports.useComponentDependencies = exports.useChips = exports.tryParseComponent = exports.trimTrailingWhitespace = exports.transformToSolutionEntityData = exports.transformToGenericEntityData = exports.transformToBlogPostEntityData = exports.transformShopifyProduct = exports.transformShopifyEntityToItemData = exports.transformShopifyCollection = exports.transformShopifyArticle = exports.transformSSProductToEntityItemData = exports.toRgb = exports.stripMarkdown = exports.startNewChatId = exports.shouldRefreshPrompts = exports.setMatchDebug = exports.setForwardStack = exports.setChatId = exports.setBackendEnvironment = exports.rgbToHsl = exports.resolveShopifyEntity = exports.resolveShopifyConfig = void 0;
4
+ exports.createFeatureToggleReader = exports.createErrorMarkdown = exports.convertToBlockElementsWithMapping = exports.convertToBlockElements = exports.computeContentBBox = exports.cn = exports.clearForwardStack = exports.buildProbeUrl = exports.buildPlacementDependencies = exports.buildImageSearchFilter = exports.backgroundFilter = exports.applyThemeOverrides = exports.analyzeBackdrop = exports.addToCart = exports.Web5UrlType = exports.WEB5_USER_QUERY_EVENT = exports.WEB5_SCOPES = exports.WEB5_SCOPE = exports.WEB5_ROOT_ID = exports.WEB5_ROOT_CLASS = exports.WEB5_REDIRECT_EVENT = exports.WEB5_GLOBAL_TOKENS = exports.WEB5_ANSWER_UPDATED_EVENT = exports.UserQueryProvider = exports.UserQuery = exports.UnifiedMarkdownParser = exports.UnifiedLink = exports.TextBlockSectionDefinition = exports.TableRow = exports.TableHeader = exports.TableHead = exports.TableFooter = exports.TableCell = exports.TableCaption = exports.TableBody = exports.Table = exports.THEME_OVERRIDE_TOKENS = exports.TEMPLATES_MANIFEST_URL = exports.TEMPLATES_CDN_BASE = exports.SmartIcon = exports.SkipNodesSectionDefinition = exports.ShopifyStorefrontClient = exports.SectionSkeleton = exports.SearchSectionDefinition = exports.SearchSection = exports.STREAMING_TIMEOUT_MS = exports.REFRESH_PROMPTS_WINDOW_MS = exports.REFRESH_PROMPTS_UNTIL_KEY = exports.PromptEntryEmptyState = exports.PlacementSmoothHeight = exports.PlacementResponseRenderer = exports.PlacementPayloadProvider = exports.PlacementLoader = exports.PRODUCT_BY_HANDLE_QUERY = exports.PRODUCT_BACK_SESSION_KEY = exports.OptimizedImage = exports.NextStepsSectionDefinition = exports.MarkdownText = exports.MATCH_DEBUG_QUERY_PARAM = exports.MATCH_DEBUG_KEY = exports.Loader = exports.ListItemsSectionDefinition = exports.LinkType = exports.LIST_ITEMS_ENDPOINT = exports.KpiSectionDefinition = exports.ImageSearchFilterToken = exports.HtmlCommentSectionDefinition = exports.HeroSectionDefinition = exports.HeroEntitySectionDefinition = exports.FeedbackBar = exports.FeatureToggleProvider = exports.FeatureSection9PlusDefinition = exports.FeatureCardsSectionDefinition = exports.FallbackSectionDefinition = exports.ErrorSectionDefinition = exports.EntitySectionDefinition = exports.EntityCollectionSectionDefinition = exports.EXPERIMENT_IDS = exports.ERROR_MARKDOWN = exports.Disclaimer = exports.DiagnosticsCollector = exports.DROP_SECTION = exports.DIAGNOSTIC_TYPES = exports.DEFAULT_ERROR_TEMPLATES = exports.DEFAULT_BACKEND_ENVIRONMENT = exports.CtaBannerSectionDefinition = exports.ComponentTracking = exports.ComponentRegistry = exports.ComponentDependenciesProvider = exports.ComparisonSectionDefinition = exports.ChipsProvider = exports.CalloutSectionDefinition = exports.CalloutBlock = exports.COLLECTION_BY_HANDLE_QUERY = exports.CLIENT_IDS = exports.CALLOUT_KINDS = exports.BottomContainer = exports.BACKEND_ENVIRONMENT_QUERY_PARAM = exports.BACKEND_ENVIRONMENT_KEY = exports.ARTICLE_BY_HANDLE_QUERY = void 0;
5
+ exports.resolveClientBundleUrl = exports.resetMatchDebugCache = exports.resetChatIdForTests = exports.registerEntityExtractor = exports.readProductBackHandoff = exports.pushToForwardStack = exports.pushPromptSubmit = exports.pushLinkClick = exports.pushExit = exports.pushEvent = exports.pushError = exports.pushEntityFiltered = exports.preprocessMarkdown = exports.popFromForwardStack = exports.parseWeb5Url = exports.parseMarkdownToComponents = exports.parseMarkdownToAst = exports.parseEntityLink = exports.parseAstToMarkdown = exports.normalizeImageUrl = exports.normalizeIconUrls = exports.nodesToParts = exports.mergeSectionsWithStableReferences = exports.mergeClientConfig = exports.matchMarkdown = exports.matchAllSections = exports.logMatchDebug = exports.loadImagePixels = exports.loadClientBundle = exports.loadBackdropAnalysis = exports.listEntityItems = exports.isWeb5Url = exports.isWeb5SearchUrl = exports.isWeb5ImageUrl = exports.isWeb5IconUrl = exports.isWeb5EntityUrl = exports.isWeb5AskUrl = exports.isWeb5ActionUrl = exports.isValidWeb5Url = exports.isValidTemplateId = exports.isValidLinkUrl = exports.isTrustedBundleHost = exports.isTemplatePickerRequested = exports.isNavigableUrl = exports.isMatchDebugEnabled = exports.isLegacyUrl = exports.isHtmlComment = exports.isEntityLink = exports.hslToRgb = exports.hasImage = exports.hasAnalyticsConsent = exports.getTemplateOverride = exports.getSessionId = exports.getResizedImageUrl = exports.getRefreshPromptsExpiry = exports.getPartsByType = exports.getPartByRole = exports.getOrCreateSessionId = exports.getLinks = exports.getIntentFromMarkdown = exports.getImages = exports.getHeading = exports.getForwardStack = exports.getErrorTypeFromStatus = exports.getEntityExtractor = exports.getContextualImageFilename = exports.getClientBundleOverride = exports.getChatId = exports.getBackendEnvironment = exports.getAllByRole = exports.generateSectionId = exports.generateId = exports.fixMalformedLinks = exports.findKeywordsInContent = exports.findInvalidWeb5Links = exports.findImageInNode = exports.findImageInChildren = exports.fetchProductsByHandlesMap = exports.fetchProductsByHandles = exports.fetchEntityListData = exports.extractProtocol = exports.extractLinkMetadata = exports.extractIntentFromMarkdown = exports.extractContentMarkdown = exports.extractContent = exports.escapeWeb5Links = exports.ensureMinLightness = exports.enrichEntitiesFromPayload = exports.enableRefreshPrompts = exports.disableRefreshPrompts = exports.detectLinkType = exports.deriveRole = exports.deriveLightColor = exports.deriveDarkGradient = exports.deriveDarkColor = exports.defaultExtractor = exports.decodeLinkText = exports.createWixAuthFetch = exports.createSdkRegistry = exports.createPageSection = void 0;
6
+ exports.writeProductBackHandoff = exports.validatePatternWithBlocks = exports.validatePatternSyntax = exports.validatePattern = exports.validateLinkUrl = exports.usesStagingBackend = exports.useWeb5Link = exports.useUserQuery = exports.useResolvedImageSources = exports.useResolveShopifyEntityData = exports.useResolveSearchSpringEntityData = exports.useResolveGenericEntityData = exports.usePlacementPayload = exports.useMarkdownUtils = exports.useFeatureToggles = exports.useFeatureToggle = exports.useEntityTransforms = exports.useDebugImageContext = exports.useConversation = exports.useComponentDependencies = exports.useChips = exports.tryParseComponent = exports.trimTrailingWhitespace = exports.transformToSolutionEntityData = exports.transformToGenericEntityData = exports.transformToBlogPostEntityData = exports.transformShopifyProduct = exports.transformShopifyEntityToItemData = exports.transformShopifyCollection = exports.transformShopifyArticle = exports.transformSSProductToEntityItemData = exports.toRgb = exports.stripMarkdown = exports.startNewChatId = exports.shouldRefreshPrompts = exports.setMatchDebug = exports.setForwardStack = exports.setChatId = exports.setBackendEnvironment = exports.rgbToHsl = exports.resolveShopifyEntity = exports.resolveShopifyConfig = exports.resolveErrorTemplate = void 0;
7
7
  var _clients = require("./clients");
8
8
  exports.CLIENT_IDS = _clients.CLIENT_IDS;
9
9
  exports.EXPERIMENT_IDS = _clients.EXPERIMENT_IDS;
@@ -22,6 +22,8 @@ exports.getLinks = _parts.getLinks;
22
22
  exports.extractContent = _parts.extractContent;
23
23
  exports.extractContentMarkdown = _parts.extractContentMarkdown;
24
24
  exports.deriveRole = _parts.deriveRole;
25
+ var _sectionDefinition = require("./component/section-definition");
26
+ exports.DROP_SECTION = _sectionDefinition.DROP_SECTION;
25
27
  var _diagnosticTypes = require("./component/diagnosticTypes");
26
28
  exports.DIAGNOSTIC_TYPES = _diagnosticTypes.DIAGNOSTIC_TYPES;
27
29
  var _imageSearchFilterTypes = require("./image/imageSearchFilterTypes");
@@ -1 +1 @@
1
- {"version":3,"names":["_clients","require","exports","CLIENT_IDS","EXPERIMENT_IDS","_FeatureToggleContext","createFeatureToggleReader","FeatureToggleProvider","useFeatureToggles","useFeatureToggle","_parts","getPartsByType","getPartByRole","getAllByRole","getHeading","getImages","getLinks","extractContent","extractContentMarkdown","deriveRole","_diagnosticTypes","DIAGNOSTIC_TYPES","_imageSearchFilterTypes","buildImageSearchFilter","_imageSearchFilters","ImageSearchFilterToken","backgroundFilter","_componentDefinitions","HeroSectionDefinition","HeroEntitySectionDefinition","KpiSectionDefinition","FeatureCardsSectionDefinition","EntitySectionDefinition","EntityCollectionSectionDefinition","ComparisonSectionDefinition","TextBlockSectionDefinition","CtaBannerSectionDefinition","CalloutSectionDefinition","NextStepsSectionDefinition","FeatureSection9PlusDefinition","ListItemsSectionDefinition","SkipNodesSectionDefinition","HtmlCommentSectionDefinition","SearchSectionDefinition","ErrorSectionDefinition","FallbackSectionDefinition","createSdkRegistry","_registry","ComponentRegistry","_patternValidator","validatePattern","validatePatternSyntax","validatePatternWithBlocks","_markdownBlocks","convertToBlockElements","convertToBlockElementsWithMapping","_linkTypes","Web5UrlType","isWeb5AskUrl","isWeb5EntityUrl","isWeb5ImageUrl","isWeb5IconUrl","isWeb5ActionUrl","isWeb5SearchUrl","isWeb5Url","isNavigableUrl","isValidLinkUrl","isLegacyUrl","_entityLinkParser","parseWeb5Url","isValidWeb5Url","validateLinkUrl","isEntityLink","parseEntityLink","extractProtocol","extractLinkMetadata","_web5LinkValidator","findInvalidWeb5Links","_nodeMatchers","hasImage","isHtmlComment","_match","matchMarkdown","matchAllSections","nodesToParts","_ComponentDependenciesContext","ComponentDependenciesProvider","useComponentDependencies","_UserQueryContext","UserQueryProvider","useUserQuery","_ChipsContext","ChipsProvider","useChips","_entity","defaultExtractor","enrichEntitiesFromPayload","fetchEntityListData","listEntityItems","LIST_ITEMS_ENDPOINT","getEntityExtractor","registerEntityExtractor","transformToSolutionEntityData","transformToBlogPostEntityData","transformToGenericEntityData","_callout","CALLOUT_KINDS","_useWeb5Link","useWeb5Link","_useConversation","useConversation","_useDebugImageContext","useDebugImageContext","_useResolvedImageSources","useResolvedImageSources","_useResolveGenericEntityData","useResolveGenericEntityData","_useEntityTransforms","useEntityTransforms","_useMarkdownUtils","useMarkdownUtils","_useResolveShopifyEntityData","useResolveShopifyEntityData","_useResolveSearchSpringEntityData","useResolveSearchSpringEntityData","_searchspring","fetchProductsByHandles","fetchProductsByHandlesMap","transformSSProductToEntityItemData","_cart","addToCart","_shopify","ShopifyStorefrontClient","resolveShopifyConfig","resolveShopifyEntity","transformShopifyProduct","transformShopifyCollection","transformShopifyArticle","transformShopifyEntityToItemData","PRODUCT_BY_HANDLE_QUERY","COLLECTION_BY_HANDLE_QUERY","ARTICLE_BY_HANDLE_QUERY","_utils","cn","_imageUtils","normalizeImageUrl","getResizedImageUrl","_imageBackdrop","analyzeBackdrop","computeContentBBox","buildProbeUrl","loadImagePixels","loadBackdropAnalysis","_parseUtils","stripMarkdown","_colorUtils","rgbToHsl","hslToRgb","ensureMinLightness","toRgb","deriveDarkColor","deriveDarkGradient","deriveLightColor","_analyticsEvents","pushEvent","pushPromptSubmit","pushLinkClick","pushError","pushExit","pushEntityFiltered","hasAnalyticsConsent","_errors","ERROR_MARKDOWN","getErrorTypeFromStatus","createErrorMarkdown","STREAMING_TIMEOUT_MS","DEFAULT_ERROR_TEMPLATES","resolveErrorTemplate","_navigationStack","getForwardStack","setForwardStack","clearForwardStack","pushToForwardStack","popFromForwardStack","_UserQuery","UserQuery","_productBackHandoff","PRODUCT_BACK_SESSION_KEY","writeProductBackHandoff","readProductBackHandoff","_PromptEntryEmptyState","PromptEntryEmptyState","_SearchSection","SearchSection","_FeedbackBar","FeedbackBar","_Disclaimer","Disclaimer","_BottomContainer","BottomContainer","_MarkdownText","MarkdownText","_CalloutBlock","CalloutBlock","_OptimizedImage","OptimizedImage","_SectionSkeleton","SectionSkeleton","_SmartIcon","SmartIcon","_Loader","Loader","_PlacementLoader","PlacementLoader","_UnifiedLink","UnifiedLink","detectLinkType","LinkType","_table","Table","TableHeader","TableBody","TableFooter","TableHead","TableRow","TableCell","TableCaption","_userQueryEvent","WEB5_USER_QUERY_EVENT","_answerUpdatedEvent","WEB5_ANSWER_UPDATED_EVENT","_redirectEvent","WEB5_REDIRECT_EVENT","_loadClientBundle","loadClientBundle","_clientBundleOverride","getClientBundleOverride","isTrustedBundleHost","_clientBundleUrl","TEMPLATES_CDN_BASE","TEMPLATES_MANIFEST_URL","getTemplateOverride","isTemplatePickerRequested","isValidTemplateId","resolveClientBundleUrl","_mergeClientConfig","mergeClientConfig","_applyThemeOverrides","applyThemeOverrides","THEME_OVERRIDE_TOKENS","_PlacementResponseRenderer","PlacementResponseRenderer","PlacementSmoothHeight","_buildPlacementDependencies","buildPlacementDependencies","_PlacementPayloadContext","PlacementPayloadProvider","usePlacementPayload","_unifiedMarkdownParser","UnifiedMarkdownParser","parseMarkdownToAst","parseAstToMarkdown","_markdownPreprocessor","escapeWeb5Links","fixMalformedLinks","trimTrailingWhitespace","normalizeIconUrls","decodeLinkText","preprocessMarkdown","_componentTracking","ComponentTracking","_contentKeywordMatcher","findKeywordsInContent","getContextualImageFilename","_intentExtractor","extractIntentFromMarkdown","getIntentFromMarkdown","_propsExtractor","createPageSection","generateSectionId","generateId","findImageInNode","findImageInChildren","_diagnosticsCollector","DiagnosticsCollector","_refreshPrompts","REFRESH_PROMPTS_UNTIL_KEY","REFRESH_PROMPTS_WINDOW_MS","getRefreshPromptsExpiry","shouldRefreshPrompts","enableRefreshPrompts","disableRefreshPrompts","_backendEnvironment","BACKEND_ENVIRONMENT_KEY","BACKEND_ENVIRONMENT_QUERY_PARAM","DEFAULT_BACKEND_ENVIRONMENT","getBackendEnvironment","setBackendEnvironment","usesStagingBackend","_matchDebug","MATCH_DEBUG_KEY","MATCH_DEBUG_QUERY_PARAM","isMatchDebugEnabled","setMatchDebug","resetMatchDebugCache","logMatchDebug","_wixAuthFetch","createWixAuthFetch","_sessionManager","getOrCreateSessionId","getSessionId","getChatId","startNewChatId","setChatId","resetChatIdForTests","_componentParser","parseMarkdownToComponents","tryParseComponent","mergeSectionsWithStableReferences","_hostScope","WEB5_ROOT_ID","WEB5_ROOT_CLASS","WEB5_SCOPES","WEB5_SCOPE","WEB5_GLOBAL_TOKENS"],"sources":["../../src/index.ts"],"sourcesContent":["// Client IDs and experiment IDs\nexport { CLIENT_IDS, EXPERIMENT_IDS } from './clients';\n\nexport {\n type EmbedFeatureToggleResult,\n type FeatureToggleReader,\n createFeatureToggleReader,\n FeatureToggleProvider,\n useFeatureToggles,\n useFeatureToggle,\n} from './featureToggles/FeatureToggleContext';\n\n// Dev-only chrome injection contract for client packages\nexport type { DevEnvironment } from './client/devEnvironment';\n\n// Part types and helpers\nexport {\n type PartType,\n type Part,\n type HeadingPart,\n type ImagePart,\n type LinkPart,\n type ListPart,\n type ListItemPart,\n type KpiItemPart,\n type CardPart,\n type IconPart,\n type CalloutPart,\n type EntityPart,\n getPartsByType,\n getPartByRole,\n getAllByRole,\n getHeading,\n getImages,\n getLinks,\n extractContent,\n extractContentMarkdown,\n deriveRole,\n} from './parts/parts';\n\n// Component types\nexport type {\n BaseCompProps,\n SlotCompProps,\n SectionCompProps,\n SectionCompPropsWithSlot,\n TextCompProps,\n ButtonCompProps,\n ImageCompProps,\n BadgeCompProps,\n HeroButton,\n KpiItemCompProps,\n FeatureItemCompProps,\n FeatureCardCompProps,\n EntityItemData,\n EntityItem,\n GenericEntityData,\n GenericEntityCompProps,\n ComparisonRow,\n ComparisonColumn,\n AiNarrativeCompProps,\n HeroCompProps,\n HeroEntityCompProps,\n KpiCompProps,\n FeatureCardsCompProps,\n EntityCompProps,\n ComparisonCompProps,\n TextBlockCompProps,\n Component,\n BaseComponent,\n SlotComponent,\n SectionComponent,\n TextComponent,\n ButtonComponent,\n ImageComponent,\n BadgeComponent,\n KpiItemComponent,\n FeatureItemComponent,\n FeatureCardComponent,\n GenericEntityComponent,\n AiNarrativeComponent,\n ComparisonSectionComponent,\n TextBlockSectionComponent,\n HeroSectionComponent,\n HeroEntitySectionComponent,\n KpiSectionComponent,\n FeatureCardsSectionComponent,\n EntitySectionComponent,\n PropsOf,\n SectionFixture,\n CtaBannerCompProps,\n CtaBannerSectionComponent,\n CalloutCompProps,\n CalloutSectionComponent,\n NextStepsCompProps,\n NextStepsSectionComponent,\n FeatureSection9PlusCompProps,\n FeatureSection9PlusSectionComponent,\n ListItemsSectionCompProps,\n ListItemsSectionComponent,\n ErrorCompProps,\n ErrorSectionComponent,\n NullCompProps,\n NullSectionComponent,\n SolutionEntityCompProps,\n SolutionEntitySectionComponent,\n SolutionEntityData,\n BlogEntityCompProps,\n BlogEntitySectionComponent,\n BlogEntityData,\n GeneralTextCompProps,\n GeneralTextSectionComponent,\n PersonalizedNarrativeCompProps,\n PersonalizedNarrativeSectionComponent,\n} from './component/types';\n\n// Section definition\nexport type {\n SectionDefinition,\n ParseContext,\n ContextualImageResult,\n} from './component/section-definition';\n\n// Diagnostic types\nexport { DIAGNOSTIC_TYPES } from './component/diagnosticTypes';\nexport type { DiagnosticType } from './component/diagnosticTypes';\n\n// Image search filters\nexport {\n buildImageSearchFilter,\n type ImageSearchFilterString,\n} from './image/imageSearchFilterTypes';\nexport {\n ImageSearchFilterToken,\n backgroundFilter,\n} from './image/imageSearchFilters';\nexport type {\n ContextualImageAsset,\n ImageSourceInput,\n ResolvedImageSource,\n ResolvedImageSourceKind,\n} from './image/contextualImageTypes';\n\n// Section definition classes + createSdkRegistry\nexport {\n HeroSectionDefinition,\n HeroEntitySectionDefinition,\n KpiSectionDefinition,\n FeatureCardsSectionDefinition,\n EntitySectionDefinition,\n EntityCollectionSectionDefinition,\n ComparisonSectionDefinition,\n TextBlockSectionDefinition,\n CtaBannerSectionDefinition,\n CalloutSectionDefinition,\n NextStepsSectionDefinition,\n FeatureSection9PlusDefinition,\n ListItemsSectionDefinition,\n SkipNodesSectionDefinition,\n HtmlCommentSectionDefinition,\n SearchSectionDefinition,\n ErrorSectionDefinition,\n FallbackSectionDefinition,\n createSdkRegistry,\n} from './component/componentDefinitions';\n\n// Registry\nexport { ComponentRegistry } from './registry';\nexport type {\n SlotOptions,\n SectionOptions,\n SectionRegistration,\n SlotNode,\n SlotIntentNode,\n SectionIntentNode,\n SectionNode,\n SlotVariant,\n SectionVariant,\n RegistryCatalog,\n ActionResult,\n ActionHandler,\n} from './registry';\n\n// Pattern validator\nexport {\n validatePattern,\n validatePatternSyntax,\n validatePatternWithBlocks,\n type PatternValidationResult,\n type BlockElement,\n type EnrichedBlockElement,\n type LinkMetadata,\n type LinkAttribute,\n} from './patternValidator';\n\n// Markdown blocks\nexport {\n convertToBlockElements,\n convertToBlockElementsWithMapping,\n type BlockElementsWithMapping,\n} from './markdownBlocks';\n\n// Link types, enum & guards\nexport {\n Web5UrlType,\n type Web5AskUrl,\n type Web5EntityUrl,\n type Web5ImageUrl,\n type Web5IconUrl,\n type Web5ActionUrl,\n type Web5SearchUrl,\n type Web5Url,\n type HttpsUrl,\n type HttpUrl,\n type MailtoUrl,\n type RelativeUrl,\n type NavigableUrl,\n type ValidLinkUrl,\n type AnyKnownUrl,\n type LegacyUrl,\n isWeb5AskUrl,\n isWeb5EntityUrl,\n isWeb5ImageUrl,\n isWeb5IconUrl,\n isWeb5ActionUrl,\n isWeb5SearchUrl,\n isWeb5Url,\n isNavigableUrl,\n isValidLinkUrl,\n isLegacyUrl,\n} from './types/link-types';\n\n// Entity/URL parsing\nexport {\n parseWeb5Url,\n isValidWeb5Url,\n validateLinkUrl,\n type Web5UrlParsed,\n type Web5AskParsed,\n type Web5EntityParsed,\n type Web5ImageParsed,\n type Web5IconParsed,\n type Web5ActionParsed,\n type Web5SearchParsed,\n isEntityLink,\n parseEntityLink,\n extractProtocol,\n extractLinkMetadata,\n} from './utils/entityLinkParser';\n\n// Web5 link validation\nexport {\n findInvalidWeb5Links,\n type InvalidWeb5Link,\n} from './utils/web5LinkValidator';\n\n// Node matchers\nexport { hasImage, isHtmlComment } from './utils/nodeMatchers';\n\n// Match API\nexport {\n matchMarkdown,\n type MarkdownMatchResult,\n matchAllSections,\n type MatchAllSectionsResult,\n nodesToParts,\n} from './match';\n\n// ---------------------------------------------------------------------------\n// DI Infrastructure (moved from @wix/w5-client-circana)\n// ---------------------------------------------------------------------------\n\n// DI context and provider\nexport {\n ComponentDependenciesProvider,\n useComponentDependencies,\n type ComponentDependenciesProviderProps,\n} from './context/ComponentDependenciesContext';\n\n// Raw user query for the current response page\nexport {\n UserQueryProvider,\n useUserQuery,\n type UserQueryProviderProps,\n} from './context/UserQueryContext';\n\n// Chips context (suggestion chips shared between SearchSection and error states)\nexport {\n ChipsProvider,\n useChips,\n type SuggestionChip,\n} from './context/ChipsContext';\n\n// DI types\nexport type {\n ComponentDependencies,\n Web5LinkApi,\n ConversationApi,\n SendMessageTrackingOptions,\n SendMessageOptions,\n ComparisonSubmitPayload,\n ComparisonSelectedProduct,\n ProductComparisonSelectionState,\n ProductComparisonApi,\n EntityTransforms,\n MarkdownUtils,\n ResolveGenericEntityDataOptions,\n} from './types/dependencies';\nexport type {\n ApiPayloadItem,\n EntityTypeConfig,\n EntityConfig,\n EntityExtractionContext,\n} from './types/entity';\nexport {\n defaultExtractor,\n enrichEntitiesFromPayload,\n fetchEntityListData,\n listEntityItems,\n LIST_ITEMS_ENDPOINT,\n getEntityExtractor,\n registerEntityExtractor,\n transformToSolutionEntityData,\n transformToBlogPostEntityData,\n transformToGenericEntityData,\n} from './entity';\nexport type {\n EntityExtractor,\n FetchEntityListDataOptions,\n ListEntityItemsOptions,\n} from './entity';\nexport { CALLOUT_KINDS, type CalloutKind, type Callout } from './types/callout';\n\n// Wrapper hooks\nexport { useWeb5Link } from './hooks/useWeb5Link';\nexport { useConversation } from './hooks/useConversation';\nexport { useDebugImageContext } from './hooks/useDebugImageContext';\nexport { useResolvedImageSources } from './hooks/useResolvedImageSources';\nexport { useResolveGenericEntityData } from './hooks/useResolveGenericEntityData';\nexport { useEntityTransforms } from './hooks/useEntityTransforms';\nexport { useMarkdownUtils } from './hooks/useMarkdownUtils';\nexport { useResolveShopifyEntityData } from './hooks/useResolveShopifyEntityData';\nexport { useResolveSearchSpringEntityData } from './hooks/useResolveSearchSpringEntityData';\n\n// SearchSpring\nexport {\n fetchProductsByHandles,\n fetchProductsByHandlesMap,\n transformSSProductToEntityItemData,\n} from './services/searchspring';\nexport type {\n SearchSpringConfig,\n SSProduct,\n SSSearchResponse,\n SSSizeData,\n} from './services/searchspring';\n\n// Shopify Storefront API\n// Cart actions\nexport { addToCart } from './services/cart';\n\nexport {\n ShopifyStorefrontClient,\n resolveShopifyConfig,\n resolveShopifyEntity,\n transformShopifyProduct,\n transformShopifyCollection,\n transformShopifyArticle,\n transformShopifyEntityToItemData,\n PRODUCT_BY_HANDLE_QUERY,\n COLLECTION_BY_HANDLE_QUERY,\n ARTICLE_BY_HANDLE_QUERY,\n} from './services/shopify';\nexport type {\n ShopifyStorefrontConfig,\n ShopifyProduct,\n ShopifyCollection,\n ShopifyArticle,\n ShopifyImage,\n ShopifyMoneyV2,\n} from './services/shopify';\n\n// Utilities\nexport { cn } from './lib/utils';\nexport { normalizeImageUrl, getResizedImageUrl } from './utils/image-utils';\nexport {\n analyzeBackdrop,\n computeContentBBox,\n buildProbeUrl,\n loadImagePixels,\n loadBackdropAnalysis,\n type BackdropAnalysis,\n type ContentBBox,\n type ImagePixels,\n} from './utils/imageBackdrop';\nexport { stripMarkdown } from './component/componentDefinitions/parse-utils';\n\n// Color utilities\nexport {\n type RGB,\n rgbToHsl,\n hslToRgb,\n ensureMinLightness,\n toRgb,\n deriveDarkColor,\n deriveDarkGradient,\n deriveLightColor,\n} from './color/colorUtils';\n\n// Analytics\nexport {\n pushEvent,\n pushPromptSubmit,\n pushLinkClick,\n pushError,\n pushExit,\n pushEntityFiltered,\n hasAnalyticsConsent,\n type EntityFilteredReason,\n} from './utils/analyticsEvents';\n\n// Error handling types and utilities\nexport {\n type ConversationErrorType,\n ERROR_MARKDOWN,\n getErrorTypeFromStatus,\n createErrorMarkdown,\n STREAMING_TIMEOUT_MS,\n type ErrorActionType,\n type ErrorIconType,\n type ErrorTemplateButton,\n type ErrorTemplate,\n type ErrorTemplateOverrides,\n DEFAULT_ERROR_TEMPLATES,\n resolveErrorTemplate,\n} from './errors';\n\n// Navigation utilities\nexport {\n getForwardStack,\n setForwardStack,\n clearForwardStack,\n pushToForwardStack,\n popFromForwardStack,\n} from './utils/navigationStack';\n\n// UI components\nexport {\n UserQuery,\n type UserQueryProps,\n type ProductBackContext,\n} from './components/ui/UserQuery';\nexport {\n PRODUCT_BACK_SESSION_KEY,\n writeProductBackHandoff,\n readProductBackHandoff,\n type ProductBackHandoff,\n} from './utils/productBackHandoff';\nexport {\n PromptEntryEmptyState,\n type PromptEntryEmptyStateProps,\n} from './components/ui/PromptEntryEmptyState';\nexport {\n SearchSection,\n type SearchSectionProps,\n type SearchSectionHandle,\n type ScrollChip,\n} from './components/ui/SearchSection';\nexport {\n FeedbackBar,\n type FeedbackBarProps,\n type FeedbackCategoryOption,\n type FeedbackSentiment,\n type FeedbackSubmitInput,\n} from './components/ui/FeedbackBar';\nexport {\n Disclaimer,\n type DisclaimerProps,\n} from './components/ui/Disclaimer';\nexport {\n BottomContainer,\n type BottomContainerProps,\n} from './components/ui/BottomContainer';\nexport { MarkdownText } from './components/ui/MarkdownText';\nexport {\n CalloutBlock,\n type CalloutBlockProps,\n} from './components/ui/CalloutBlock';\nexport {\n OptimizedImage,\n type OptimizedImageProps,\n} from './components/ui/OptimizedImage';\nexport {\n SectionSkeleton,\n type SectionSkeletonProps,\n} from './components/ui/SectionSkeleton';\nexport { SmartIcon, type SmartIconProps } from './components/ui/SmartIcon';\nexport { Loader, type LoaderProps } from './components/ui/Loader';\nexport {\n PlacementLoader,\n type PlacementLoaderProps,\n} from './components/ui/PlacementLoader';\nexport {\n UnifiedLink,\n detectLinkType,\n type UnifiedLinkProps,\n LinkType,\n type LinkVariant,\n} from './components/ui/UnifiedLink';\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n} from './components/ui/table';\n\n// Placement (DL #088, DL #102 behavior declarations)\nexport type {\n PlacementBehaviorConfig,\n PlacementConfig,\n PlacementPrompts,\n} from './types/placement';\n\n// Cross-bundle user-query broadcast event (DL #097 D2)\nexport {\n WEB5_USER_QUERY_EVENT,\n type Web5UserQueryEventDetail,\n type Web5UserQueryEvent,\n} from './types/userQueryEvent';\n\n// Cross-bundle answer-updated broadcast event (B2B-4121)\nexport {\n WEB5_ANSWER_UPDATED_EVENT,\n type Web5AnswerUpdatedEventDetail,\n type Web5AnswerUpdatedEvent,\n} from './types/answerUpdatedEvent';\n\n// Cross-bundle redirect broadcast event (DL #098 D3)\nexport {\n WEB5_REDIRECT_EVENT,\n type Web5RedirectEventDetail,\n type Web5RedirectEvent,\n type Web5RedirectReason,\n} from './types/redirectEvent';\n// `placementFilter` was removed — hero/next-steps exclusion is the prompt's job\n// and placement-specific designs belong as `{ placement: true }` registry\n// variants (resolved automatically via `resolveSection(type, { placement: true })`).\n\n// Client bundle loader (DL #088 D3.3)\nexport { loadClientBundle } from './client/loadClientBundle';\n\n// `?clientBundleUrl=` dev override — shared by `web50-server-ui` and\n// `embed-placement` so the trusted-host gate can't drift between them.\nexport {\n getClientBundleOverride,\n isTrustedBundleHost,\n} from './client/clientBundleOverride';\n\n// Client-UMD URL resolution (DL #094 per-msid, DL #129 per-template) and the\n// universal bundle←backend config merge (DL #129 Q3/Q7) — shared by\n// `web50-server-ui` and `embed-placement`, the two client-bundle load sites.\nexport {\n TEMPLATES_CDN_BASE,\n TEMPLATES_MANIFEST_URL,\n getTemplateOverride,\n isTemplatePickerRequested,\n isValidTemplateId,\n resolveClientBundleUrl,\n} from './client/clientBundleUrl';\nexport { mergeClientConfig, type DeepPartial } from './client/mergeClientConfig';\nexport {\n applyThemeOverrides,\n THEME_OVERRIDE_TOKENS,\n type ThemeOverrideKey,\n type ThemeOverrides,\n} from './client/applyThemeOverrides';\n\n// Placement renderer + DI helper (DL #088 D3.2, D3.4)\nexport {\n PlacementResponseRenderer,\n PlacementSmoothHeight,\n type PlacementResponseRendererProps,\n type PlacementSection,\n type PlacementVariant,\n} from './components/placement/PlacementResponseRenderer';\nexport {\n buildPlacementDependencies,\n type BuildPlacementDependenciesOptions,\n} from './components/placement/buildPlacementDependencies';\nexport {\n PlacementPayloadProvider,\n usePlacementPayload,\n type PlacementPayloadContextValue,\n} from './components/placement/PlacementPayloadContext';\n\n// Markdown parsing utilities — lifted from web50-server-ui (DL #088 B9.1)\nexport {\n UnifiedMarkdownParser,\n parseMarkdownToAst,\n parseAstToMarkdown,\n} from './utils/unifiedMarkdownParser';\nexport {\n escapeWeb5Links,\n fixMalformedLinks,\n trimTrailingWhitespace,\n normalizeIconUrls,\n decodeLinkText,\n preprocessMarkdown,\n type PreprocessorDiagnostic,\n type PreprocessResult,\n} from './utils/markdownPreprocessor';\nexport {\n ComponentTracking,\n type ComponentNodeRange,\n} from './utils/componentTracking';\nexport {\n findKeywordsInContent,\n getContextualImageFilename,\n} from './utils/contentKeywordMatcher';\nexport {\n extractIntentFromMarkdown,\n getIntentFromMarkdown,\n type IntentInfo,\n type IntentExtractionOptions,\n type ResponseState,\n} from './utils/intentExtractor';\nexport type { PageSection } from './types/page-section';\nexport {\n createPageSection,\n generateSectionId,\n generateId,\n findImageInNode,\n findImageInChildren,\n type Product,\n type ComparisonProduct,\n type ProductComparisonSectionProps,\n} from './utils/propsExtractor';\nexport {\n DiagnosticsCollector,\n type DiagnosticEntry,\n} from './utils/diagnosticsCollector';\nexport {\n REFRESH_PROMPTS_UNTIL_KEY,\n REFRESH_PROMPTS_WINDOW_MS,\n getRefreshPromptsExpiry,\n shouldRefreshPrompts,\n enableRefreshPrompts,\n disableRefreshPrompts,\n} from './utils/refreshPrompts';\nexport {\n type BackendEnvironment,\n BACKEND_ENVIRONMENT_KEY,\n BACKEND_ENVIRONMENT_QUERY_PARAM,\n DEFAULT_BACKEND_ENVIRONMENT,\n getBackendEnvironment,\n setBackendEnvironment,\n usesStagingBackend,\n} from './utils/backendEnvironment';\nexport {\n MATCH_DEBUG_KEY,\n MATCH_DEBUG_QUERY_PARAM,\n isMatchDebugEnabled,\n setMatchDebug,\n resetMatchDebugCache,\n logMatchDebug,\n} from './utils/matchDebug';\nexport { createWixAuthFetch } from './client/wixAuthFetch';\nexport {\n getOrCreateSessionId,\n getSessionId,\n getChatId,\n startNewChatId,\n setChatId,\n resetChatIdForTests,\n} from './utils/sessionManager';\n\n// Component parser orchestrator — lifted from web50-server-ui (DL #088 B9.5)\nexport {\n parseMarkdownToComponents,\n tryParseComponent,\n mergeSectionsWithStableReferences,\n type ParseMarkdownOptions,\n type ParseMarkdownResult,\n type ComponentMatch,\n type ParserContext,\n} from './component/componentParser';\nexport type {\n ParserClientConfig,\n EnrichEntityProps,\n} from './component/parser-types';\n\n// Host-mount scope contract — shared by web50-server-ui (which stamps the\n// class and mounts), embed-placement (which mounts the same bundle elsewhere),\n// and the client CDN build (which compiles every selector against it).\nexport {\n WEB5_ROOT_ID,\n WEB5_ROOT_CLASS,\n WEB5_SCOPES,\n WEB5_SCOPE,\n WEB5_GLOBAL_TOKENS,\n type HostFitConfig,\n} from './hostScope';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OAAA,CAAAqT,SAAA,GAAAH,eAAA,CAAAG,SAAA;AAAArT,OAAA,CAAAsT,cAAA,GAAAJ,eAAA,CAAAI,cAAA;AAAAtT,OAAA,CAAAuT,SAAA,GAAAL,eAAA,CAAAK,SAAA;AAAAvT,OAAA,CAAAwT,mBAAA,GAAAN,eAAA,CAAAM,mBAAA;AAGhC,IAAAC,gBAAA,GAAA1T,OAAA;AAQqCC,OAAA,CAAA0T,yBAAA,GAAAD,gBAAA,CAAAC,yBAAA;AAAA1T,OAAA,CAAA2T,iBAAA,GAAAF,gBAAA,CAAAE,iBAAA;AAAA3T,OAAA,CAAA4T,iCAAA,GAAAH,gBAAA,CAAAG,iCAAA;AASrC,IAAAC,UAAA,GAAA9T,OAAA;AAOqBC,OAAA,CAAA8T,YAAA,GAAAD,UAAA,CAAAC,YAAA;AAAA9T,OAAA,CAAA+T,eAAA,GAAAF,UAAA,CAAAE,eAAA;AAAA/T,OAAA,CAAAgU,WAAA,GAAAH,UAAA,CAAAG,WAAA;AAAAhU,OAAA,CAAAiU,UAAA,GAAAJ,UAAA,CAAAI,UAAA;AAAAjU,OAAA,CAAAkU,kBAAA,GAAAL,UAAA,CAAAK,kBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_clients","require","exports","CLIENT_IDS","EXPERIMENT_IDS","_FeatureToggleContext","createFeatureToggleReader","FeatureToggleProvider","useFeatureToggles","useFeatureToggle","_parts","getPartsByType","getPartByRole","getAllByRole","getHeading","getImages","getLinks","extractContent","extractContentMarkdown","deriveRole","_sectionDefinition","DROP_SECTION","_diagnosticTypes","DIAGNOSTIC_TYPES","_imageSearchFilterTypes","buildImageSearchFilter","_imageSearchFilters","ImageSearchFilterToken","backgroundFilter","_componentDefinitions","HeroSectionDefinition","HeroEntitySectionDefinition","KpiSectionDefinition","FeatureCardsSectionDefinition","EntitySectionDefinition","EntityCollectionSectionDefinition","ComparisonSectionDefinition","TextBlockSectionDefinition","CtaBannerSectionDefinition","CalloutSectionDefinition","NextStepsSectionDefinition","FeatureSection9PlusDefinition","ListItemsSectionDefinition","SkipNodesSectionDefinition","HtmlCommentSectionDefinition","SearchSectionDefinition","ErrorSectionDefinition","FallbackSectionDefinition","createSdkRegistry","_registry","ComponentRegistry","_patternValidator","validatePattern","validatePatternSyntax","validatePatternWithBlocks","_markdownBlocks","convertToBlockElements","convertToBlockElementsWithMapping","_linkTypes","Web5UrlType","isWeb5AskUrl","isWeb5EntityUrl","isWeb5ImageUrl","isWeb5IconUrl","isWeb5ActionUrl","isWeb5SearchUrl","isWeb5Url","isNavigableUrl","isValidLinkUrl","isLegacyUrl","_entityLinkParser","parseWeb5Url","isValidWeb5Url","validateLinkUrl","isEntityLink","parseEntityLink","extractProtocol","extractLinkMetadata","_web5LinkValidator","findInvalidWeb5Links","_nodeMatchers","hasImage","isHtmlComment","_match","matchMarkdown","matchAllSections","nodesToParts","_ComponentDependenciesContext","ComponentDependenciesProvider","useComponentDependencies","_UserQueryContext","UserQueryProvider","useUserQuery","_ChipsContext","ChipsProvider","useChips","_entity","defaultExtractor","enrichEntitiesFromPayload","fetchEntityListData","listEntityItems","LIST_ITEMS_ENDPOINT","getEntityExtractor","registerEntityExtractor","transformToSolutionEntityData","transformToBlogPostEntityData","transformToGenericEntityData","_callout","CALLOUT_KINDS","_useWeb5Link","useWeb5Link","_useConversation","useConversation","_useDebugImageContext","useDebugImageContext","_useResolvedImageSources","useResolvedImageSources","_useResolveGenericEntityData","useResolveGenericEntityData","_useEntityTransforms","useEntityTransforms","_useMarkdownUtils","useMarkdownUtils","_useResolveShopifyEntityData","useResolveShopifyEntityData","_useResolveSearchSpringEntityData","useResolveSearchSpringEntityData","_searchspring","fetchProductsByHandles","fetchProductsByHandlesMap","transformSSProductToEntityItemData","_cart","addToCart","_shopify","ShopifyStorefrontClient","resolveShopifyConfig","resolveShopifyEntity","transformShopifyProduct","transformShopifyCollection","transformShopifyArticle","transformShopifyEntityToItemData","PRODUCT_BY_HANDLE_QUERY","COLLECTION_BY_HANDLE_QUERY","ARTICLE_BY_HANDLE_QUERY","_utils","cn","_imageUtils","normalizeImageUrl","getResizedImageUrl","_imageBackdrop","analyzeBackdrop","computeContentBBox","buildProbeUrl","loadImagePixels","loadBackdropAnalysis","_parseUtils","stripMarkdown","_colorUtils","rgbToHsl","hslToRgb","ensureMinLightness","toRgb","deriveDarkColor","deriveDarkGradient","deriveLightColor","_analyticsEvents","pushEvent","pushPromptSubmit","pushLinkClick","pushError","pushExit","pushEntityFiltered","hasAnalyticsConsent","_errors","ERROR_MARKDOWN","getErrorTypeFromStatus","createErrorMarkdown","STREAMING_TIMEOUT_MS","DEFAULT_ERROR_TEMPLATES","resolveErrorTemplate","_navigationStack","getForwardStack","setForwardStack","clearForwardStack","pushToForwardStack","popFromForwardStack","_UserQuery","UserQuery","_productBackHandoff","PRODUCT_BACK_SESSION_KEY","writeProductBackHandoff","readProductBackHandoff","_PromptEntryEmptyState","PromptEntryEmptyState","_SearchSection","SearchSection","_FeedbackBar","FeedbackBar","_Disclaimer","Disclaimer","_BottomContainer","BottomContainer","_MarkdownText","MarkdownText","_CalloutBlock","CalloutBlock","_OptimizedImage","OptimizedImage","_SectionSkeleton","SectionSkeleton","_SmartIcon","SmartIcon","_Loader","Loader","_PlacementLoader","PlacementLoader","_UnifiedLink","UnifiedLink","detectLinkType","LinkType","_table","Table","TableHeader","TableBody","TableFooter","TableHead","TableRow","TableCell","TableCaption","_userQueryEvent","WEB5_USER_QUERY_EVENT","_answerUpdatedEvent","WEB5_ANSWER_UPDATED_EVENT","_redirectEvent","WEB5_REDIRECT_EVENT","_loadClientBundle","loadClientBundle","_clientBundleOverride","getClientBundleOverride","isTrustedBundleHost","_clientBundleUrl","TEMPLATES_CDN_BASE","TEMPLATES_MANIFEST_URL","getTemplateOverride","isTemplatePickerRequested","isValidTemplateId","resolveClientBundleUrl","_mergeClientConfig","mergeClientConfig","_applyThemeOverrides","applyThemeOverrides","THEME_OVERRIDE_TOKENS","_PlacementResponseRenderer","PlacementResponseRenderer","PlacementSmoothHeight","_buildPlacementDependencies","buildPlacementDependencies","_PlacementPayloadContext","PlacementPayloadProvider","usePlacementPayload","_unifiedMarkdownParser","UnifiedMarkdownParser","parseMarkdownToAst","parseAstToMarkdown","_markdownPreprocessor","escapeWeb5Links","fixMalformedLinks","trimTrailingWhitespace","normalizeIconUrls","decodeLinkText","preprocessMarkdown","_componentTracking","ComponentTracking","_contentKeywordMatcher","findKeywordsInContent","getContextualImageFilename","_intentExtractor","extractIntentFromMarkdown","getIntentFromMarkdown","_propsExtractor","createPageSection","generateSectionId","generateId","findImageInNode","findImageInChildren","_diagnosticsCollector","DiagnosticsCollector","_refreshPrompts","REFRESH_PROMPTS_UNTIL_KEY","REFRESH_PROMPTS_WINDOW_MS","getRefreshPromptsExpiry","shouldRefreshPrompts","enableRefreshPrompts","disableRefreshPrompts","_backendEnvironment","BACKEND_ENVIRONMENT_KEY","BACKEND_ENVIRONMENT_QUERY_PARAM","DEFAULT_BACKEND_ENVIRONMENT","getBackendEnvironment","setBackendEnvironment","usesStagingBackend","_matchDebug","MATCH_DEBUG_KEY","MATCH_DEBUG_QUERY_PARAM","isMatchDebugEnabled","setMatchDebug","resetMatchDebugCache","logMatchDebug","_wixAuthFetch","createWixAuthFetch","_sessionManager","getOrCreateSessionId","getSessionId","getChatId","startNewChatId","setChatId","resetChatIdForTests","_componentParser","parseMarkdownToComponents","tryParseComponent","mergeSectionsWithStableReferences","_hostScope","WEB5_ROOT_ID","WEB5_ROOT_CLASS","WEB5_SCOPES","WEB5_SCOPE","WEB5_GLOBAL_TOKENS"],"sources":["../../src/index.ts"],"sourcesContent":["// Client IDs and experiment IDs\nexport { CLIENT_IDS, EXPERIMENT_IDS } from './clients';\n\nexport {\n type EmbedFeatureToggleResult,\n type FeatureToggleReader,\n createFeatureToggleReader,\n FeatureToggleProvider,\n useFeatureToggles,\n useFeatureToggle,\n} from './featureToggles/FeatureToggleContext';\n\n// Dev-only chrome injection contract for client packages\nexport type { DevEnvironment } from './client/devEnvironment';\n\n// Part types and helpers\nexport {\n type PartType,\n type Part,\n type HeadingPart,\n type ImagePart,\n type LinkPart,\n type ListPart,\n type ListItemPart,\n type KpiItemPart,\n type CardPart,\n type IconPart,\n type CalloutPart,\n type EntityPart,\n getPartsByType,\n getPartByRole,\n getAllByRole,\n getHeading,\n getImages,\n getLinks,\n extractContent,\n extractContentMarkdown,\n deriveRole,\n} from './parts/parts';\n\n// Component types\nexport type {\n BaseCompProps,\n SlotCompProps,\n SectionCompProps,\n SectionCompPropsWithSlot,\n TextCompProps,\n ButtonCompProps,\n ImageCompProps,\n BadgeCompProps,\n HeroButton,\n KpiItemCompProps,\n FeatureItemCompProps,\n FeatureCardCompProps,\n EntityItemData,\n EntityItem,\n GenericEntityData,\n GenericEntityCompProps,\n ComparisonRow,\n ComparisonColumn,\n AiNarrativeCompProps,\n HeroCompProps,\n HeroEntityCompProps,\n KpiCompProps,\n FeatureCardsCompProps,\n EntityCompProps,\n ComparisonCompProps,\n TextBlockCompProps,\n Component,\n BaseComponent,\n SlotComponent,\n SectionComponent,\n TextComponent,\n ButtonComponent,\n ImageComponent,\n BadgeComponent,\n KpiItemComponent,\n FeatureItemComponent,\n FeatureCardComponent,\n GenericEntityComponent,\n AiNarrativeComponent,\n ComparisonSectionComponent,\n TextBlockSectionComponent,\n HeroSectionComponent,\n HeroEntitySectionComponent,\n KpiSectionComponent,\n FeatureCardsSectionComponent,\n EntitySectionComponent,\n PropsOf,\n SectionFixture,\n CtaBannerCompProps,\n CtaBannerSectionComponent,\n CalloutCompProps,\n CalloutSectionComponent,\n NextStepsCompProps,\n NextStepsSectionComponent,\n FeatureSection9PlusCompProps,\n FeatureSection9PlusSectionComponent,\n ListItemsSectionCompProps,\n ListItemsSectionComponent,\n ErrorCompProps,\n ErrorSectionComponent,\n NullCompProps,\n NullSectionComponent,\n SolutionEntityCompProps,\n SolutionEntitySectionComponent,\n SolutionEntityData,\n BlogEntityCompProps,\n BlogEntitySectionComponent,\n BlogEntityData,\n GeneralTextCompProps,\n GeneralTextSectionComponent,\n PersonalizedNarrativeCompProps,\n PersonalizedNarrativeSectionComponent,\n} from './component/types';\n\n// Section definition\nexport type {\n SectionDefinition,\n ParseContext,\n ContextualImageResult,\n DropSection,\n} from './component/section-definition';\nexport { DROP_SECTION } from './component/section-definition';\n\n// Diagnostic types\nexport { DIAGNOSTIC_TYPES } from './component/diagnosticTypes';\nexport type { DiagnosticType } from './component/diagnosticTypes';\n\n// Image search filters\nexport {\n buildImageSearchFilter,\n type ImageSearchFilterString,\n} from './image/imageSearchFilterTypes';\nexport {\n ImageSearchFilterToken,\n backgroundFilter,\n} from './image/imageSearchFilters';\nexport type {\n ContextualImageAsset,\n ImageSourceInput,\n ResolvedImageSource,\n ResolvedImageSourceKind,\n} from './image/contextualImageTypes';\n\n// Section definition classes + createSdkRegistry\nexport {\n HeroSectionDefinition,\n HeroEntitySectionDefinition,\n KpiSectionDefinition,\n FeatureCardsSectionDefinition,\n EntitySectionDefinition,\n EntityCollectionSectionDefinition,\n ComparisonSectionDefinition,\n TextBlockSectionDefinition,\n CtaBannerSectionDefinition,\n CalloutSectionDefinition,\n NextStepsSectionDefinition,\n FeatureSection9PlusDefinition,\n ListItemsSectionDefinition,\n SkipNodesSectionDefinition,\n HtmlCommentSectionDefinition,\n SearchSectionDefinition,\n ErrorSectionDefinition,\n FallbackSectionDefinition,\n createSdkRegistry,\n} from './component/componentDefinitions';\n\n// Registry\nexport { ComponentRegistry } from './registry';\nexport type {\n SlotOptions,\n SectionOptions,\n SectionRegistration,\n SlotNode,\n SlotIntentNode,\n SectionIntentNode,\n SectionNode,\n SlotVariant,\n SectionVariant,\n RegistryCatalog,\n ActionResult,\n ActionHandler,\n} from './registry';\n\n// Pattern validator\nexport {\n validatePattern,\n validatePatternSyntax,\n validatePatternWithBlocks,\n type PatternValidationResult,\n type BlockElement,\n type EnrichedBlockElement,\n type LinkMetadata,\n type LinkAttribute,\n} from './patternValidator';\n\n// Markdown blocks\nexport {\n convertToBlockElements,\n convertToBlockElementsWithMapping,\n type BlockElementsWithMapping,\n} from './markdownBlocks';\n\n// Link types, enum & guards\nexport {\n Web5UrlType,\n type Web5AskUrl,\n type Web5EntityUrl,\n type Web5ImageUrl,\n type Web5IconUrl,\n type Web5ActionUrl,\n type Web5SearchUrl,\n type Web5Url,\n type HttpsUrl,\n type HttpUrl,\n type MailtoUrl,\n type RelativeUrl,\n type NavigableUrl,\n type ValidLinkUrl,\n type AnyKnownUrl,\n type LegacyUrl,\n isWeb5AskUrl,\n isWeb5EntityUrl,\n isWeb5ImageUrl,\n isWeb5IconUrl,\n isWeb5ActionUrl,\n isWeb5SearchUrl,\n isWeb5Url,\n isNavigableUrl,\n isValidLinkUrl,\n isLegacyUrl,\n} from './types/link-types';\n\n// Entity/URL parsing\nexport {\n parseWeb5Url,\n isValidWeb5Url,\n validateLinkUrl,\n type Web5UrlParsed,\n type Web5AskParsed,\n type Web5EntityParsed,\n type Web5ImageParsed,\n type Web5IconParsed,\n type Web5ActionParsed,\n type Web5SearchParsed,\n isEntityLink,\n parseEntityLink,\n extractProtocol,\n extractLinkMetadata,\n} from './utils/entityLinkParser';\n\n// Web5 link validation\nexport {\n findInvalidWeb5Links,\n type InvalidWeb5Link,\n} from './utils/web5LinkValidator';\n\n// Node matchers\nexport { hasImage, isHtmlComment } from './utils/nodeMatchers';\n\n// Match API\nexport {\n matchMarkdown,\n type MarkdownMatchResult,\n matchAllSections,\n type MatchAllSectionsResult,\n nodesToParts,\n} from './match';\n\n// ---------------------------------------------------------------------------\n// DI Infrastructure (moved from @wix/w5-client-circana)\n// ---------------------------------------------------------------------------\n\n// DI context and provider\nexport {\n ComponentDependenciesProvider,\n useComponentDependencies,\n type ComponentDependenciesProviderProps,\n} from './context/ComponentDependenciesContext';\n\n// Raw user query for the current response page\nexport {\n UserQueryProvider,\n useUserQuery,\n type UserQueryProviderProps,\n} from './context/UserQueryContext';\n\n// Chips context (suggestion chips shared between SearchSection and error states)\nexport {\n ChipsProvider,\n useChips,\n type SuggestionChip,\n} from './context/ChipsContext';\n\n// DI types\nexport type {\n ComponentDependencies,\n Web5LinkApi,\n ConversationApi,\n SendMessageTrackingOptions,\n SendMessageOptions,\n ComparisonSubmitPayload,\n ComparisonSelectedProduct,\n ProductComparisonSelectionState,\n ProductComparisonApi,\n EntityTransforms,\n MarkdownUtils,\n ResolveGenericEntityDataOptions,\n} from './types/dependencies';\nexport type {\n ApiPayloadItem,\n EntityTypeConfig,\n EntityConfig,\n EntityExtractionContext,\n} from './types/entity';\nexport {\n defaultExtractor,\n enrichEntitiesFromPayload,\n fetchEntityListData,\n listEntityItems,\n LIST_ITEMS_ENDPOINT,\n getEntityExtractor,\n registerEntityExtractor,\n transformToSolutionEntityData,\n transformToBlogPostEntityData,\n transformToGenericEntityData,\n} from './entity';\nexport type {\n EntityExtractor,\n FetchEntityListDataOptions,\n ListEntityItemsOptions,\n} from './entity';\nexport { CALLOUT_KINDS, type CalloutKind, type Callout } from './types/callout';\n\n// Wrapper hooks\nexport { useWeb5Link } from './hooks/useWeb5Link';\nexport { useConversation } from './hooks/useConversation';\nexport { useDebugImageContext } from './hooks/useDebugImageContext';\nexport { useResolvedImageSources } from './hooks/useResolvedImageSources';\nexport { useResolveGenericEntityData } from './hooks/useResolveGenericEntityData';\nexport { useEntityTransforms } from './hooks/useEntityTransforms';\nexport { useMarkdownUtils } from './hooks/useMarkdownUtils';\nexport { useResolveShopifyEntityData } from './hooks/useResolveShopifyEntityData';\nexport { useResolveSearchSpringEntityData } from './hooks/useResolveSearchSpringEntityData';\n\n// SearchSpring\nexport {\n fetchProductsByHandles,\n fetchProductsByHandlesMap,\n transformSSProductToEntityItemData,\n} from './services/searchspring';\nexport type {\n SearchSpringConfig,\n SSProduct,\n SSSearchResponse,\n SSSizeData,\n} from './services/searchspring';\n\n// Shopify Storefront API\n// Cart actions\nexport { addToCart } from './services/cart';\n\nexport {\n ShopifyStorefrontClient,\n resolveShopifyConfig,\n resolveShopifyEntity,\n transformShopifyProduct,\n transformShopifyCollection,\n transformShopifyArticle,\n transformShopifyEntityToItemData,\n PRODUCT_BY_HANDLE_QUERY,\n COLLECTION_BY_HANDLE_QUERY,\n ARTICLE_BY_HANDLE_QUERY,\n} from './services/shopify';\nexport type {\n ShopifyStorefrontConfig,\n ShopifyProduct,\n ShopifyCollection,\n ShopifyArticle,\n ShopifyImage,\n ShopifyMoneyV2,\n} from './services/shopify';\n\n// Utilities\nexport { cn } from './lib/utils';\nexport { normalizeImageUrl, getResizedImageUrl } from './utils/image-utils';\nexport {\n analyzeBackdrop,\n computeContentBBox,\n buildProbeUrl,\n loadImagePixels,\n loadBackdropAnalysis,\n type BackdropAnalysis,\n type ContentBBox,\n type ImagePixels,\n} from './utils/imageBackdrop';\nexport { stripMarkdown } from './component/componentDefinitions/parse-utils';\n\n// Color utilities\nexport {\n type RGB,\n rgbToHsl,\n hslToRgb,\n ensureMinLightness,\n toRgb,\n deriveDarkColor,\n deriveDarkGradient,\n deriveLightColor,\n} from './color/colorUtils';\n\n// Analytics\nexport {\n pushEvent,\n pushPromptSubmit,\n pushLinkClick,\n pushError,\n pushExit,\n pushEntityFiltered,\n hasAnalyticsConsent,\n type EntityFilteredReason,\n} from './utils/analyticsEvents';\n\n// Error handling types and utilities\nexport {\n type ConversationErrorType,\n ERROR_MARKDOWN,\n getErrorTypeFromStatus,\n createErrorMarkdown,\n STREAMING_TIMEOUT_MS,\n type ErrorActionType,\n type ErrorIconType,\n type ErrorTemplateButton,\n type ErrorTemplate,\n type ErrorTemplateOverrides,\n DEFAULT_ERROR_TEMPLATES,\n resolveErrorTemplate,\n} from './errors';\n\n// Navigation utilities\nexport {\n getForwardStack,\n setForwardStack,\n clearForwardStack,\n pushToForwardStack,\n popFromForwardStack,\n} from './utils/navigationStack';\n\n// UI components\nexport {\n UserQuery,\n type UserQueryProps,\n type ProductBackContext,\n} from './components/ui/UserQuery';\nexport {\n PRODUCT_BACK_SESSION_KEY,\n writeProductBackHandoff,\n readProductBackHandoff,\n type ProductBackHandoff,\n} from './utils/productBackHandoff';\nexport {\n PromptEntryEmptyState,\n type PromptEntryEmptyStateProps,\n} from './components/ui/PromptEntryEmptyState';\nexport {\n SearchSection,\n type SearchSectionProps,\n type SearchSectionHandle,\n type ScrollChip,\n} from './components/ui/SearchSection';\nexport {\n FeedbackBar,\n type FeedbackBarProps,\n type FeedbackCategoryOption,\n type FeedbackSentiment,\n type FeedbackSubmitInput,\n} from './components/ui/FeedbackBar';\nexport {\n Disclaimer,\n type DisclaimerProps,\n} from './components/ui/Disclaimer';\nexport {\n BottomContainer,\n type BottomContainerProps,\n} from './components/ui/BottomContainer';\nexport { MarkdownText } from './components/ui/MarkdownText';\nexport {\n CalloutBlock,\n type CalloutBlockProps,\n} from './components/ui/CalloutBlock';\nexport {\n OptimizedImage,\n type OptimizedImageProps,\n} from './components/ui/OptimizedImage';\nexport {\n SectionSkeleton,\n type SectionSkeletonProps,\n} from './components/ui/SectionSkeleton';\nexport { SmartIcon, type SmartIconProps } from './components/ui/SmartIcon';\nexport { Loader, type LoaderProps } from './components/ui/Loader';\nexport {\n PlacementLoader,\n type PlacementLoaderProps,\n} from './components/ui/PlacementLoader';\nexport {\n UnifiedLink,\n detectLinkType,\n type UnifiedLinkProps,\n LinkType,\n type LinkVariant,\n} from './components/ui/UnifiedLink';\nexport {\n Table,\n TableHeader,\n TableBody,\n TableFooter,\n TableHead,\n TableRow,\n TableCell,\n TableCaption,\n} from './components/ui/table';\n\n// Placement (DL #088, DL #102 behavior declarations)\nexport type {\n PlacementBehaviorConfig,\n PlacementConfig,\n PlacementPrompts,\n} from './types/placement';\n\n// Cross-bundle user-query broadcast event (DL #097 D2)\nexport {\n WEB5_USER_QUERY_EVENT,\n type Web5UserQueryEventDetail,\n type Web5UserQueryEvent,\n} from './types/userQueryEvent';\n\n// Cross-bundle answer-updated broadcast event (B2B-4121)\nexport {\n WEB5_ANSWER_UPDATED_EVENT,\n type Web5AnswerUpdatedEventDetail,\n type Web5AnswerUpdatedEvent,\n} from './types/answerUpdatedEvent';\n\n// Cross-bundle redirect broadcast event (DL #098 D3)\nexport {\n WEB5_REDIRECT_EVENT,\n type Web5RedirectEventDetail,\n type Web5RedirectEvent,\n type Web5RedirectReason,\n} from './types/redirectEvent';\n// `placementFilter` was removed — hero/next-steps exclusion is the prompt's job\n// and placement-specific designs belong as `{ placement: true }` registry\n// variants (resolved automatically via `resolveSection(type, { placement: true })`).\n\n// Client bundle loader (DL #088 D3.3)\nexport { loadClientBundle } from './client/loadClientBundle';\n\n// `?clientBundleUrl=` dev override — shared by `web50-server-ui` and\n// `embed-placement` so the trusted-host gate can't drift between them.\nexport {\n getClientBundleOverride,\n isTrustedBundleHost,\n} from './client/clientBundleOverride';\n\n// Client-UMD URL resolution (DL #094 per-msid, DL #129 per-template) and the\n// universal bundle←backend config merge (DL #129 Q3/Q7) — shared by\n// `web50-server-ui` and `embed-placement`, the two client-bundle load sites.\nexport {\n TEMPLATES_CDN_BASE,\n TEMPLATES_MANIFEST_URL,\n getTemplateOverride,\n isTemplatePickerRequested,\n isValidTemplateId,\n resolveClientBundleUrl,\n} from './client/clientBundleUrl';\nexport { mergeClientConfig, type DeepPartial } from './client/mergeClientConfig';\nexport {\n applyThemeOverrides,\n THEME_OVERRIDE_TOKENS,\n type ThemeOverrideKey,\n type ThemeOverrides,\n} from './client/applyThemeOverrides';\n\n// Placement renderer + DI helper (DL #088 D3.2, D3.4)\nexport {\n PlacementResponseRenderer,\n PlacementSmoothHeight,\n type PlacementResponseRendererProps,\n type PlacementSection,\n type PlacementVariant,\n} from './components/placement/PlacementResponseRenderer';\nexport {\n buildPlacementDependencies,\n type BuildPlacementDependenciesOptions,\n} from './components/placement/buildPlacementDependencies';\nexport {\n PlacementPayloadProvider,\n usePlacementPayload,\n type PlacementPayloadContextValue,\n} from './components/placement/PlacementPayloadContext';\n\n// Markdown parsing utilities — lifted from web50-server-ui (DL #088 B9.1)\nexport {\n UnifiedMarkdownParser,\n parseMarkdownToAst,\n parseAstToMarkdown,\n} from './utils/unifiedMarkdownParser';\nexport {\n escapeWeb5Links,\n fixMalformedLinks,\n trimTrailingWhitespace,\n normalizeIconUrls,\n decodeLinkText,\n preprocessMarkdown,\n type PreprocessorDiagnostic,\n type PreprocessResult,\n} from './utils/markdownPreprocessor';\nexport {\n ComponentTracking,\n type ComponentNodeRange,\n} from './utils/componentTracking';\nexport {\n findKeywordsInContent,\n getContextualImageFilename,\n} from './utils/contentKeywordMatcher';\nexport {\n extractIntentFromMarkdown,\n getIntentFromMarkdown,\n type IntentInfo,\n type IntentExtractionOptions,\n type ResponseState,\n} from './utils/intentExtractor';\nexport type { PageSection } from './types/page-section';\nexport {\n createPageSection,\n generateSectionId,\n generateId,\n findImageInNode,\n findImageInChildren,\n type Product,\n type ComparisonProduct,\n type ProductComparisonSectionProps,\n} from './utils/propsExtractor';\nexport {\n DiagnosticsCollector,\n type DiagnosticEntry,\n} from './utils/diagnosticsCollector';\nexport {\n REFRESH_PROMPTS_UNTIL_KEY,\n REFRESH_PROMPTS_WINDOW_MS,\n getRefreshPromptsExpiry,\n shouldRefreshPrompts,\n enableRefreshPrompts,\n disableRefreshPrompts,\n} from './utils/refreshPrompts';\nexport {\n type BackendEnvironment,\n BACKEND_ENVIRONMENT_KEY,\n BACKEND_ENVIRONMENT_QUERY_PARAM,\n DEFAULT_BACKEND_ENVIRONMENT,\n getBackendEnvironment,\n setBackendEnvironment,\n usesStagingBackend,\n} from './utils/backendEnvironment';\nexport {\n MATCH_DEBUG_KEY,\n MATCH_DEBUG_QUERY_PARAM,\n isMatchDebugEnabled,\n setMatchDebug,\n resetMatchDebugCache,\n logMatchDebug,\n} from './utils/matchDebug';\nexport { createWixAuthFetch } from './client/wixAuthFetch';\nexport {\n getOrCreateSessionId,\n getSessionId,\n getChatId,\n startNewChatId,\n setChatId,\n resetChatIdForTests,\n} from './utils/sessionManager';\n\n// Component parser orchestrator — lifted from web50-server-ui (DL #088 B9.5)\nexport {\n parseMarkdownToComponents,\n tryParseComponent,\n mergeSectionsWithStableReferences,\n type ParseMarkdownOptions,\n type ParseMarkdownResult,\n type ComponentMatch,\n type ParserContext,\n} from './component/componentParser';\nexport type {\n ParserClientConfig,\n EnrichEntityProps,\n} from './component/parser-types';\n\n// Host-mount scope contract — shared by web50-server-ui (which stamps the\n// class and mounts), embed-placement (which mounts the same bundle elsewhere),\n// and the client CDN build (which compiles every selector against it).\nexport {\n WEB5_ROOT_ID,\n WEB5_ROOT_CLASS,\n WEB5_SCOPES,\n WEB5_SCOPE,\n WEB5_GLOBAL_TOKENS,\n type HostFitConfig,\n} from './hostScope';\n"],"mappings":";;;;;;AACA,IAAAA,QAAA,GAAAC,OAAA;AAAuDC,OAAA,CAAAC,UAAA,GAAAH,QAAA,CAAAG,UAAA;AAAAD,OAAA,CAAAE,cAAA,GAAAJ,QAAA,CAAAI,cAAA;AAEvD,IAAAC,qBAAA,GAAAJ,OAAA;AAO+CC,OAAA,CAAAI,yBAAA,GAAAD,qBAAA,CAAAC,yBAAA;AAAAJ,OAAA,CAAAK,qBAAA,GAAAF,qBAAA,CAAAE,qBAAA;AAAAL,OAAA,CAAAM,iBAAA,GAAAH,qBAAA,CAAAG,iBAAA;AAAAN,OAAA,CAAAO,gBAAA,GAAAJ,qBAAA,CAAAI,gBAAA;AAM/C,IAAAC,MAAA,GAAAT,OAAA;AAsBuBC,OAAA,CAAAS,cAAA,GAAAD,MAAA,CAAAC,cAAA;AAAAT,OAAA,CAAAU,aAAA,GAAAF,MAAA,CAAAE,aAAA;AAAAV,OAAA,CAAAW,YAAA,GAAAH,MAAA,CAAAG,YAAA;AAAAX,OAAA,CAAAY,UAAA,GAAAJ,MAAA,CAAAI,UAAA;AAAAZ,OAAA,CAAAa,SAAA,GAAAL,MAAA,CAAAK,SAAA;AAAAb,OAAA,CAAAc,QAAA,GAAAN,MAAA,CAAAM,QAAA;AAAAd,OAAA,CAAAe,cAAA,GAAAP,MAAA,CAAAO,cAAA;AAAAf,OAAA,CA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List":[]}
@@ -8,6 +8,8 @@ exports.insertMissingTableSeparators = insertMissingTableSeparators;
8
8
  exports.normalizeIconUrls = normalizeIconUrls;
9
9
  exports.preprocessMarkdown = preprocessMarkdown;
10
10
  exports.recoverOrphanedEmphasisLinks = recoverOrphanedEmphasisLinks;
11
+ exports.repairOrphanedWeb5Links = repairOrphanedWeb5Links;
12
+ exports.scrubVisibleWeb5Urls = scrubVisibleWeb5Urls;
11
13
  exports.trimTrailingWhitespace = trimTrailingWhitespace;
12
14
  /**
13
15
  * Markdown preprocessing utilities
@@ -81,6 +83,148 @@ function recoverOrphanedEmphasisLinks(markdown) {
81
83
  };
82
84
  }
83
85
 
86
+ /**
87
+ * A `web5://` link target whose opening `[` never arrived, e.g.
88
+ * `try filtering for men](web5://ask/Which+are+for+men%3F)`.
89
+ *
90
+ * Dropping the opening bracket is the most common way an inline ask link is
91
+ * mis-emitted, and it is the worst one: remark parses nothing as a link, so the
92
+ * scheme renders as literal text and the visitor reads `web5://ask/...`.
93
+ *
94
+ * `run` is the text before the `]` on the same line, which is what the label
95
+ * should have been. It may be empty, in which case there is nothing to promote
96
+ * and the construct is dropped instead.
97
+ */
98
+ const ORPHANED_WEB5_TARGET = /([^[\]()*\n]{0,80}?)\]\((web5:\/\/[^)\s]*)\)/g;
99
+
100
+ /** Any `web5://` url, for the final check that none is visible as text. */
101
+ const ANY_WEB5_URL = /web5:\/\/[^\s)\]]*/g;
102
+
103
+ /** Longest label we will promote out of surrounding prose. */
104
+ const MAX_RECOVERED_LABEL_WORDS = 4;
105
+
106
+ /**
107
+ * Words a label should start *after* rather than with. The label is cut at the
108
+ * last of these inside the window, so a promoted phrase reads as a noun phrase
109
+ * ("sensitive skin") instead of trailing off a verb or preposition
110
+ * ("carry for sensitive skin").
111
+ */
112
+ const LABEL_BOUNDARY_WORDS = new Set(['a', 'an', 'and', 'at', 'but', 'by', 'for', 'from', 'in', 'into', 'of', 'on', 'or', 'the', 'to', 'with']);
113
+
114
+ /**
115
+ * True when `segment` holds a `[` that is still waiting to be closed — meaning
116
+ * the `](` after it closes a real link and there is nothing to repair.
117
+ */
118
+ function hasOpenLinkBracket(segment) {
119
+ return segment.lastIndexOf('[') > segment.lastIndexOf(']');
120
+ }
121
+
122
+ /**
123
+ * Split `run` into the prose to leave in place and the phrase to promote into
124
+ * the link label. Slices on token offsets rather than rejoining words, so the
125
+ * original spacing around the label is preserved exactly.
126
+ *
127
+ * An empty label means there is nothing worth promoting and the caller should
128
+ * drop the link instead.
129
+ */
130
+ function splitRecoveredLabel(run) {
131
+ // Never let the label cross a sentence boundary.
132
+ let sentenceStart = 0;
133
+ for (const boundary of run.matchAll(/(?<=[.!?;:])\s+/g)) {
134
+ sentenceStart = (boundary.index ?? 0) + boundary[0].length;
135
+ }
136
+ const tokens = [...run.slice(sentenceStart).matchAll(/\S+/g)].map(token => ({
137
+ word: token[0],
138
+ start: sentenceStart + (token.index ?? 0)
139
+ }));
140
+ let window = tokens.slice(-MAX_RECOVERED_LABEL_WORDS);
141
+ for (let i = window.length - 1; i >= 0; i--) {
142
+ const bare = window[i].word.toLowerCase().replace(/[^a-z]/g, '');
143
+ if (LABEL_BOUNDARY_WORDS.has(bare)) {
144
+ window = window.slice(i + 1);
145
+ break;
146
+ }
147
+ }
148
+ if (window.length === 0) {
149
+ return {
150
+ prefix: run,
151
+ label: ''
152
+ };
153
+ }
154
+ return {
155
+ prefix: run.slice(0, window[0].start),
156
+ label: run.slice(window[0].start).trim()
157
+ };
158
+ }
159
+
160
+ /**
161
+ * Repair `web5://` links that lost their opening `[`.
162
+ *
163
+ * Recovers the link by promoting the words immediately before the `]` into its
164
+ * label; when there are no words to promote, drops the whole construct. Either
165
+ * way the scheme stops being visible, which is the point — a link the visitor
166
+ * cannot use is a smaller failure than a url the visitor can read.
167
+ */
168
+ function repairOrphanedWeb5Links(markdown) {
169
+ const diagnostics = [];
170
+ const result = markdown.replace(ORPHANED_WEB5_TARGET, (match, run, href, offset, whole) => {
171
+ const lineStart = whole.lastIndexOf('\n', offset) + 1;
172
+ if (hasOpenLinkBracket(whole.slice(lineStart, offset))) {
173
+ // A real `[label](url)` — the bracket is there, leave it alone.
174
+ return match;
175
+ }
176
+ const {
177
+ prefix,
178
+ label
179
+ } = splitRecoveredLabel(run);
180
+ if (!label) {
181
+ diagnostics.push({
182
+ type: 'orphaned_web5_link_dropped',
183
+ original: match,
184
+ normalized: run
185
+ });
186
+ return run;
187
+ }
188
+ const normalized = `${prefix}[${label}](${href})`;
189
+ diagnostics.push({
190
+ type: 'orphaned_web5_link_recovered',
191
+ original: match,
192
+ normalized
193
+ });
194
+ return normalized;
195
+ });
196
+ return {
197
+ result,
198
+ diagnostics
199
+ };
200
+ }
201
+
202
+ /**
203
+ * Last resort: remove any `web5://` url still sitting in visible text.
204
+ *
205
+ * Runs after every recovery step, so anything left here is a url no repair
206
+ * could turn back into a link. A url in a link target (`](web5://...)`) is
207
+ * left alone — only text the visitor would actually read is scrubbed.
208
+ */
209
+ function scrubVisibleWeb5Urls(markdown) {
210
+ const diagnostics = [];
211
+ const result = markdown.replace(ANY_WEB5_URL, (match, offset, whole) => {
212
+ if (whole.slice(offset - 2, offset) === '](') {
213
+ return match;
214
+ }
215
+ diagnostics.push({
216
+ type: 'visible_web5_url_scrubbed',
217
+ original: match,
218
+ normalized: ''
219
+ });
220
+ return '';
221
+ });
222
+ return {
223
+ result,
224
+ diagnostics
225
+ };
226
+ }
227
+
84
228
  /**
85
229
  * Trim trailing whitespace from lines that contain text
86
230
  *
@@ -231,11 +375,13 @@ function decodeLinkText(markdown) {
231
375
  * The preprocessing steps are applied in the following order:
232
376
  * 1. Recover orphaned emphasized web5 links
233
377
  * 2. Fix malformed links (remove whitespace between ] and () - must happen before web5 links are matched)
234
- * 3. Decode URL-encoded link text
235
- * 4. Escape web5:// links (URL-encode URLs)
236
- * 5. Normalize icon URLs
237
- * 6. Insert missing table separators for obvious pipe tables
238
- * 7. Trim trailing whitespace from lines
378
+ * 3. Repair web5 links missing their opening `[` (after step 2, so `] (url)` is already normalized)
379
+ * 4. Decode URL-encoded link text
380
+ * 5. Escape web5:// links (URL-encode URLs)
381
+ * 6. Normalize icon URLs
382
+ * 7. Insert missing table separators for obvious pipe tables
383
+ * 8. Scrub any web5:// url still visible as text (last, so every repair has had its chance)
384
+ * 9. Trim trailing whitespace from lines
239
385
  *
240
386
  * @param markdown - The raw markdown string to preprocess
241
387
  * @returns The preprocessed markdown string ready for AST parsing
@@ -246,10 +392,14 @@ function preprocessMarkdown(markdown) {
246
392
  diagnostics: recoveredLinkDiagnostics
247
393
  } = recoverOrphanedEmphasisLinks(markdown);
248
394
  let processed = fixMalformedLinks(recoveredLinks);
395
+ const {
396
+ result: repairedLinks,
397
+ diagnostics: repairedLinkDiagnostics
398
+ } = repairOrphanedWeb5Links(processed);
249
399
  const {
250
400
  result: decodedText,
251
401
  diagnostics: decodeDiagnostics
252
- } = decodeLinkText(processed);
402
+ } = decodeLinkText(repairedLinks);
253
403
  processed = escapeWeb5Links(decodedText);
254
404
  const {
255
405
  result: normalized,
@@ -259,10 +409,14 @@ function preprocessMarkdown(markdown) {
259
409
  result: tableNormalized,
260
410
  diagnostics: tableDiagnostics
261
411
  } = insertMissingTableSeparators(normalized);
262
- processed = trimTrailingWhitespace(tableNormalized);
412
+ const {
413
+ result: scrubbed,
414
+ diagnostics: scrubDiagnostics
415
+ } = scrubVisibleWeb5Urls(tableNormalized);
416
+ processed = trimTrailingWhitespace(scrubbed);
263
417
  return {
264
418
  markdown: processed,
265
- diagnostics: [...recoveredLinkDiagnostics, ...decodeDiagnostics, ...iconDiagnostics, ...tableDiagnostics]
419
+ diagnostics: [...recoveredLinkDiagnostics, ...repairedLinkDiagnostics, ...decodeDiagnostics, ...iconDiagnostics, ...tableDiagnostics, ...scrubDiagnostics]
266
420
  };
267
421
  }
268
422
  //# sourceMappingURL=markdownPreprocessor.js.map