@wix/web5-core 1.63.34 → 1.63.36

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 (43) hide show
  1. package/dist/cjs/components/ui/AiDisclosure.css +60 -0
  2. package/dist/cjs/components/ui/AiDisclosure.js +93 -0
  3. package/dist/cjs/components/ui/AiDisclosure.js.map +1 -0
  4. package/dist/cjs/components/ui/PoweredByBadge.css +68 -0
  5. package/dist/cjs/components/ui/PoweredByBadge.js +72 -0
  6. package/dist/cjs/components/ui/PoweredByBadge.js.map +1 -0
  7. package/dist/cjs/components/ui/icons/AiIcon.js +53 -0
  8. package/dist/cjs/components/ui/icons/AiIcon.js.map +1 -0
  9. package/dist/cjs/index.js +13 -6
  10. package/dist/cjs/index.js.map +1 -1
  11. package/dist/cjs/styles/components.css +2 -1
  12. package/dist/esm/components/ui/AiDisclosure.css +60 -0
  13. package/dist/esm/components/ui/AiDisclosure.js +58 -0
  14. package/dist/esm/components/ui/AiDisclosure.js.map +1 -0
  15. package/dist/esm/components/ui/PoweredByBadge.css +68 -0
  16. package/dist/esm/components/ui/PoweredByBadge.js +42 -0
  17. package/dist/esm/components/ui/PoweredByBadge.js.map +1 -0
  18. package/dist/esm/components/ui/icons/AiIcon.js +28 -0
  19. package/dist/esm/components/ui/icons/AiIcon.js.map +1 -0
  20. package/dist/esm/index.js +3 -1
  21. package/dist/esm/index.js.map +1 -1
  22. package/dist/esm/styles/components.css +2 -1
  23. package/dist/types/components/ui/AiDisclosure.d.ts +52 -0
  24. package/dist/types/components/ui/AiDisclosure.d.ts.map +1 -0
  25. package/dist/types/components/ui/PoweredByBadge.d.ts +25 -0
  26. package/dist/types/components/ui/PoweredByBadge.d.ts.map +1 -0
  27. package/dist/types/components/ui/icons/AiIcon.d.ts +13 -0
  28. package/dist/types/components/ui/icons/AiIcon.d.ts.map +1 -0
  29. package/dist/types/index.d.ts +3 -1
  30. package/dist/types/index.d.ts.map +1 -1
  31. package/package.json +2 -2
  32. package/src/components/ui/AiDisclosure.css +60 -0
  33. package/src/components/ui/PoweredByBadge.css +68 -0
  34. package/src/styles/components.css +2 -1
  35. package/dist/cjs/components/ui/Disclaimer.css +0 -35
  36. package/dist/cjs/components/ui/Disclaimer.js +0 -56
  37. package/dist/cjs/components/ui/Disclaimer.js.map +0 -1
  38. package/dist/esm/components/ui/Disclaimer.css +0 -35
  39. package/dist/esm/components/ui/Disclaimer.js +0 -32
  40. package/dist/esm/components/ui/Disclaimer.js.map +0 -1
  41. package/dist/types/components/ui/Disclaimer.d.ts +0 -21
  42. package/dist/types/components/ui/Disclaimer.d.ts.map +0 -1
  43. package/src/components/ui/Disclaimer.css +0 -35
@@ -0,0 +1,60 @@
1
+ /* AI disclosure row — icon + "Generated by <Store> AI · Double-check anything
2
+ important" (B2B-4488, Figma `Hero` 758:2948).
3
+
4
+ Every value is a web5 token, not the Figma literal it came from:
5
+
6
+ Figma token
7
+ 13px body copy → --text-table-body
8
+ store name, 18px display italic → --font-display + --body-text-font-size
9
+ black @ 100% (icon, store name) → --body-text-color
10
+ black @ 50% (the rest) → --text-muted
11
+
12
+ The 50%-black in the design computes to #808080, which is 3.95:1 on white —
13
+ under the 4.5:1 this text size needs. `--text-muted` (#737373 by default) is
14
+ the same visual weight and clears AA, so the muted role, not the alpha, is
15
+ what gets mapped. See docs/accessibility-guide.md.
16
+
17
+ The `--web5-ai-disclosure-*` vars are the per-client escape hatches; each
18
+ falls back to the shared token so a store that re-skins the theme re-skins
19
+ this row for free. */
20
+
21
+ .web5-ai-disclosure {
22
+ display: flex;
23
+ align-items: center;
24
+ justify-content: center;
25
+ flex-wrap: wrap;
26
+ gap: var(--web5-ai-disclosure-gap, 7px);
27
+ margin: 0;
28
+ font-size: var(--web5-ai-disclosure-font-size, var(--text-table-body));
29
+ font-weight: 400;
30
+ line-height: normal;
31
+ text-align: center;
32
+ color: var(--web5-ai-disclosure-color, var(--text-muted));
33
+ }
34
+
35
+ /* Left-aligned surfaces (placement cards, start-aligned heroes). */
36
+ .web5-ai-disclosure--start {
37
+ justify-content: flex-start;
38
+ text-align: left;
39
+ }
40
+
41
+ .web5-ai-disclosure__icon {
42
+ flex: none;
43
+ width: var(--web5-ai-disclosure-icon-size, 24px);
44
+ height: var(--web5-ai-disclosure-icon-size, 24px);
45
+ /* Full-strength in the design, unlike the copy beside it. */
46
+ color: var(--web5-ai-disclosure-icon-color, var(--body-text-color));
47
+ }
48
+
49
+ /* The store's own name: the display face, so the brand is what the eye lands
50
+ on in an otherwise muted line. */
51
+ .web5-ai-disclosure__assistant {
52
+ font-family: var(--web5-ai-disclosure-assistant-font, var(--font-display));
53
+ font-size: var(
54
+ --web5-ai-disclosure-assistant-font-size,
55
+ var(--body-text-font-size)
56
+ );
57
+ font-style: italic;
58
+ font-weight: 500;
59
+ color: var(--web5-ai-disclosure-assistant-color, var(--body-text-color));
60
+ }
@@ -0,0 +1,93 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.DEFAULT_AI_DISCLOSURE_TEXT = exports.AiDisclosure = exports.ASSISTANT_TOKEN = void 0;
5
+ var _react = _interopRequireWildcard(require("react"));
6
+ var _utils = require("../../lib/utils");
7
+ var _AiIcon = require("./icons/AiIcon");
8
+ var _jsxFileName = "/home/builduser/work/c2b6ca0b3fa984ee/packages/web5-core/dist/cjs/components/ui/AiDisclosure.tsx";
9
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
10
+ /**
11
+ * Placeholder inside `text` that the assistant's name is substituted into.
12
+ *
13
+ * Same `{assistant}` token the prompt-input placeholder already uses
14
+ * ("Ask {assistant}…"), so a store rename moves both together and a
15
+ * translator can put the name wherever the target language needs it.
16
+ */
17
+ const ASSISTANT_TOKEN = exports.ASSISTANT_TOKEN = '{assistant}';
18
+
19
+ /**
20
+ * The disclosure a shopper must see. Wording is fixed here rather than in each
21
+ * client bundle: it is what tells the shopper they are reading machine-written
22
+ * text, so it should not be forkable per store by accident.
23
+ */
24
+ const DEFAULT_AI_DISCLOSURE_TEXT = exports.DEFAULT_AI_DISCLOSURE_TEXT = `Generated by ${ASSISTANT_TOKEN} · Double-check anything important`;
25
+
26
+ /** Used when the host publishes no store name — still reads correctly. */
27
+ const UNBRANDED_ASSISTANT_NAME = 'AI';
28
+ /**
29
+ * "Generated by <Store> AI · Double-check anything important" — the AI
30
+ * disclosure shown at the top of a generated answer (EU AI Act, B2B-4488).
31
+ *
32
+ * Replaces the old "AI can make mistakes." response footer: one notice, above
33
+ * the content rather than below it, so a shopper reads it before the answer
34
+ * instead of after.
35
+ *
36
+ * Presentational only. Hosts decide where it mounts and pass the store's
37
+ * assistant name; every color, size and face resolves from web5 tokens, so a
38
+ * client re-skins it by re-skinning the theme.
39
+ */
40
+ const AiDisclosure = ({
41
+ assistantName,
42
+ text = DEFAULT_AI_DISCLOSURE_TEXT,
43
+ icon,
44
+ align = 'center',
45
+ className
46
+ }) => {
47
+ const name = (assistantName ?? '').trim() || UNBRANDED_ASSISTANT_NAME;
48
+ const segments = text.split(ASSISTANT_TOKEN);
49
+ return /*#__PURE__*/_react.default.createElement("p", {
50
+ className: (0, _utils.cn)('web5-ai-disclosure', align === 'start' && 'web5-ai-disclosure--start', className),
51
+ role: "note",
52
+ __self: void 0,
53
+ __source: {
54
+ fileName: _jsxFileName,
55
+ lineNumber: 71,
56
+ columnNumber: 5
57
+ }
58
+ }, icon === undefined ? /*#__PURE__*/_react.default.createElement(_AiIcon.AiIcon, {
59
+ className: "web5-ai-disclosure__icon",
60
+ __self: void 0,
61
+ __source: {
62
+ fileName: _jsxFileName,
63
+ lineNumber: 80,
64
+ columnNumber: 9
65
+ }
66
+ }) : icon, /*#__PURE__*/_react.default.createElement("span", {
67
+ className: "web5-ai-disclosure__text",
68
+ __self: void 0,
69
+ __source: {
70
+ fileName: _jsxFileName,
71
+ lineNumber: 84,
72
+ columnNumber: 7
73
+ }
74
+ }, segments.map((segment, index) => /*#__PURE__*/_react.default.createElement(_react.Fragment, {
75
+ key: index,
76
+ __self: void 0,
77
+ __source: {
78
+ fileName: _jsxFileName,
79
+ lineNumber: 86,
80
+ columnNumber: 11
81
+ }
82
+ }, segment, index < segments.length - 1 && /*#__PURE__*/_react.default.createElement("span", {
83
+ className: "web5-ai-disclosure__assistant",
84
+ __self: void 0,
85
+ __source: {
86
+ fileName: _jsxFileName,
87
+ lineNumber: 89,
88
+ columnNumber: 15
89
+ }
90
+ }, name)))));
91
+ };
92
+ exports.AiDisclosure = AiDisclosure;
93
+ //# sourceMappingURL=AiDisclosure.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_utils","_AiIcon","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ASSISTANT_TOKEN","exports","DEFAULT_AI_DISCLOSURE_TEXT","UNBRANDED_ASSISTANT_NAME","AiDisclosure","assistantName","text","icon","align","className","name","trim","segments","split","createElement","cn","role","__self","__source","fileName","lineNumber","columnNumber","undefined","AiIcon","map","segment","index","Fragment","key","length"],"sources":["../../../../src/components/ui/AiDisclosure.tsx"],"sourcesContent":["import React, { FC, Fragment, ReactNode } from 'react';\nimport { cn } from '../../lib/utils';\nimport { AiIcon } from './icons/AiIcon';\n\n/**\n * Placeholder inside `text` that the assistant's name is substituted into.\n *\n * Same `{assistant}` token the prompt-input placeholder already uses\n * (\"Ask {assistant}…\"), so a store rename moves both together and a\n * translator can put the name wherever the target language needs it.\n */\nexport const ASSISTANT_TOKEN = '{assistant}';\n\n/**\n * The disclosure a shopper must see. Wording is fixed here rather than in each\n * client bundle: it is what tells the shopper they are reading machine-written\n * text, so it should not be forkable per store by accident.\n */\nexport const DEFAULT_AI_DISCLOSURE_TEXT = `Generated by ${ASSISTANT_TOKEN} · Double-check anything important`;\n\n/** Used when the host publishes no store name — still reads correctly. */\nconst UNBRANDED_ASSISTANT_NAME = 'AI';\n\nexport interface AiDisclosureProps {\n /**\n * What the assistant is called — the store's name plus \"AI\", e.g.\n * \"Smallflower AI\". Rendered in the display face so the store's brand is the\n * emphasized word in the line. Blank/omitted falls back to \"AI\".\n */\n assistantName?: string;\n /**\n * The full sentence, with `{assistant}` marking where the name goes.\n * Defaults to {@link DEFAULT_AI_DISCLOSURE_TEXT}. A string without the token\n * renders verbatim, with no emphasized name.\n */\n text?: string;\n /**\n * Replace the leading icon. `null` drops it — the text alone still carries\n * the disclosure, so removing the icon is a visual choice, not a\n * compliance one.\n */\n icon?: ReactNode;\n /** Row alignment. `'center'` (default) matches the hero; `'start'` for left-aligned surfaces. */\n align?: 'start' | 'center';\n className?: string;\n}\n\n/**\n * \"Generated by <Store> AI · Double-check anything important\" — the AI\n * disclosure shown at the top of a generated answer (EU AI Act, B2B-4488).\n *\n * Replaces the old \"AI can make mistakes.\" response footer: one notice, above\n * the content rather than below it, so a shopper reads it before the answer\n * instead of after.\n *\n * Presentational only. Hosts decide where it mounts and pass the store's\n * assistant name; every color, size and face resolves from web5 tokens, so a\n * client re-skins it by re-skinning the theme.\n */\nexport const AiDisclosure: FC<AiDisclosureProps> = ({\n assistantName,\n text = DEFAULT_AI_DISCLOSURE_TEXT,\n icon,\n align = 'center',\n className,\n}) => {\n const name = (assistantName ?? '').trim() || UNBRANDED_ASSISTANT_NAME;\n const segments = text.split(ASSISTANT_TOKEN);\n\n return (\n <p\n className={cn(\n 'web5-ai-disclosure',\n align === 'start' && 'web5-ai-disclosure--start',\n className,\n )}\n role=\"note\"\n >\n {icon === undefined ? (\n <AiIcon className=\"web5-ai-disclosure__icon\" />\n ) : (\n icon\n )}\n <span className=\"web5-ai-disclosure__text\">\n {segments.map((segment, index) => (\n <Fragment key={index}>\n {segment}\n {index < segments.length - 1 && (\n <span className=\"web5-ai-disclosure__assistant\">{name}</span>\n )}\n </Fragment>\n ))}\n </span>\n </p>\n );\n};\n"],"mappings":"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","ignoreList":[]}
@@ -0,0 +1,68 @@
1
+ /* "Powered by Niso" free-tier credit bar (B2B-4574).
2
+
3
+ A full-width strip pinned under the prompt dock at the very bottom of the AI
4
+ page. Colour and type are vars with fallbacks so a client can re-skin the bar
5
+ without forking the component — but see the two values below that are
6
+ deliberately fixed, and `App.tsx` on why the bar itself is not a UI slot. */
7
+
8
+ .web5-powered-by {
9
+ /*
10
+ * The bar's lift, straight from the design (Figma 751-2729): a soft drop
11
+ * plus a wider ambient glow, the latter being what actually reads above a
12
+ * bar pinned to the bottom edge.
13
+ *
14
+ * Its own value rather than one of the `--shadow-*` steps in
15
+ * `base-tokens.css`: that is a general-purpose scale clients legitimately
16
+ * re-map — feature.com flattens `--shadow-sm` to `none` — and the bar needs
17
+ * a lift that survives it. Declared here rather than in `base-tokens.css`
18
+ * because that file ships in the *client* bundle, which is versioned apart
19
+ * from this stylesheet; a token defined there would resolve to nothing on
20
+ * any client built before this change.
21
+ */
22
+ --web5-credit-bar-shadow:
23
+ 0px 6px 6px hsl(230 100% 7% / 0.03), 0px 0px 18px hsl(230 100% 7% / 0.07);
24
+
25
+ display: flex;
26
+ align-items: center;
27
+ justify-content: center;
28
+ width: 100%;
29
+ /*
30
+ * Fixed, not a var. The host docks this bar `position: fixed` and lifts the
31
+ * prompt input by the same 30px (`--web5-credit-bar-height` in `App.css`);
32
+ * a client able to resize it could only ever push the two out of step. The
33
+ * colour and type vars below are safe precisely because they cannot.
34
+ */
35
+ height: 30px;
36
+ padding-inline: var(--web5-powered-by-padding-inline, 16px);
37
+ background: var(--web5-powered-by-background, hsl(var(--background)));
38
+ box-shadow: var(--web5-powered-by-shadow, var(--web5-credit-bar-shadow));
39
+ font-size: var(--web5-powered-by-font-size, 14px);
40
+ line-height: var(--web5-powered-by-line-height, 1);
41
+ font-weight: 400;
42
+ text-align: center;
43
+ }
44
+
45
+ .web5-powered-by__link {
46
+ display: inline-flex;
47
+ align-items: center;
48
+ gap: 0.25em;
49
+ /* WCAG 2.1 AA target size — the 30px bar is taller than the text alone. */
50
+ min-height: 24px;
51
+ color: inherit;
52
+ text-decoration: none;
53
+ cursor: pointer;
54
+ }
55
+
56
+ .web5-powered-by__label {
57
+ color: var(--web5-powered-by-label-color, hsl(var(--muted-foreground)));
58
+ }
59
+
60
+ .web5-powered-by__brand {
61
+ color: var(--web5-powered-by-brand-color, hsl(var(--foreground)));
62
+ }
63
+
64
+ .web5-powered-by__link:hover .web5-powered-by__brand,
65
+ .web5-powered-by__link:focus-visible .web5-powered-by__brand {
66
+ text-decoration: underline;
67
+ text-decoration-skip-ink: none;
68
+ }
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ exports.__esModule = true;
5
+ exports.PoweredByBadge = exports.DEFAULT_POWERED_BY_HREF = void 0;
6
+ var _react = _interopRequireDefault(require("react"));
7
+ var _utils = require("../../lib/utils");
8
+ var _jsxFileName = "/home/builduser/work/c2b6ca0b3fa984ee/packages/web5-core/dist/cjs/components/ui/PoweredByBadge.tsx";
9
+ const DEFAULT_POWERED_BY_HREF = exports.DEFAULT_POWERED_BY_HREF = 'https://www.nisoweb.ai';
10
+
11
+ /**
12
+ * The free-tier credit bar (B2B-4574): a full-width strip at the very bottom of
13
+ * the AI page reading "Powered by Niso", with the brand name linking out.
14
+ *
15
+ * Rendering is the caller's decision — this component says nothing about plans.
16
+ * The AI page mounts it only when the site is on the Free tier (see
17
+ * `shouldShowPoweredBy`); any paid package removes it.
18
+ */
19
+ const PoweredByBadge = ({
20
+ label = 'Powered by',
21
+ brand = 'Niso',
22
+ href = DEFAULT_POWERED_BY_HREF,
23
+ target = '_blank',
24
+ onClick,
25
+ className
26
+ }) => {
27
+ const rel = target === '_blank' ? 'noopener noreferrer' : undefined;
28
+ return /*#__PURE__*/_react.default.createElement("div", {
29
+ className: (0, _utils.cn)('web5-powered-by', className),
30
+ __self: void 0,
31
+ __source: {
32
+ fileName: _jsxFileName,
33
+ lineNumber: 39,
34
+ columnNumber: 5
35
+ }
36
+ }, /*#__PURE__*/_react.default.createElement("a", {
37
+ className: "web5-powered-by__link",
38
+ href: href,
39
+ target: target,
40
+ rel: rel,
41
+ onClick: onClick
42
+ // The visible text splits across two spans for the two-tone treatment,
43
+ // so spell the whole thing out once for assistive tech — including the
44
+ // new tab, which is otherwise unannounced.
45
+ ,
46
+ "aria-label": `${label} ${brand}${target === '_blank' ? ' (opens in a new tab)' : ''}`,
47
+ __self: void 0,
48
+ __source: {
49
+ fileName: _jsxFileName,
50
+ lineNumber: 40,
51
+ columnNumber: 7
52
+ }
53
+ }, /*#__PURE__*/_react.default.createElement("span", {
54
+ className: "web5-powered-by__label",
55
+ __self: void 0,
56
+ __source: {
57
+ fileName: _jsxFileName,
58
+ lineNumber: 53,
59
+ columnNumber: 9
60
+ }
61
+ }, label), ' ', /*#__PURE__*/_react.default.createElement("span", {
62
+ className: "web5-powered-by__brand",
63
+ __self: void 0,
64
+ __source: {
65
+ fileName: _jsxFileName,
66
+ lineNumber: 54,
67
+ columnNumber: 9
68
+ }
69
+ }, brand)));
70
+ };
71
+ exports.PoweredByBadge = PoweredByBadge;
72
+ //# sourceMappingURL=PoweredByBadge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_utils","_jsxFileName","DEFAULT_POWERED_BY_HREF","exports","PoweredByBadge","label","brand","href","target","onClick","className","rel","undefined","default","createElement","cn","__self","__source","fileName","lineNumber","columnNumber"],"sources":["../../../../src/components/ui/PoweredByBadge.tsx"],"sourcesContent":["import React, { FC } from 'react';\nimport { cn } from '../../lib/utils';\n\nexport interface PoweredByBadgeProps {\n /** Muted lead-in. Default: \"Powered by\". */\n label?: string;\n /** The emphasised brand name, and the link's visible anchor. Default: \"Niso\". */\n brand?: string;\n /** URL the badge opens. Default: the Niso marketing site. */\n href?: string;\n /** Override the link target. Default: `_blank` (opens in a new tab). */\n target?: '_blank' | '_self' | '_parent' | '_top';\n /** Click handler invoked before navigation. Use to fire analytics. */\n onClick?: (event: React.MouseEvent<HTMLAnchorElement>) => void;\n className?: string;\n}\n\nexport const DEFAULT_POWERED_BY_HREF = 'https://www.nisoweb.ai';\n\n/**\n * The free-tier credit bar (B2B-4574): a full-width strip at the very bottom of\n * the AI page reading \"Powered by Niso\", with the brand name linking out.\n *\n * Rendering is the caller's decision — this component says nothing about plans.\n * The AI page mounts it only when the site is on the Free tier (see\n * `shouldShowPoweredBy`); any paid package removes it.\n */\nexport const PoweredByBadge: FC<PoweredByBadgeProps> = ({\n label = 'Powered by',\n brand = 'Niso',\n href = DEFAULT_POWERED_BY_HREF,\n target = '_blank',\n onClick,\n className,\n}) => {\n const rel = target === '_blank' ? 'noopener noreferrer' : undefined;\n\n return (\n <div className={cn('web5-powered-by', className)}>\n <a\n className=\"web5-powered-by__link\"\n href={href}\n target={target}\n rel={rel}\n onClick={onClick}\n // The visible text splits across two spans for the two-tone treatment,\n // so spell the whole thing out once for assistive tech — including the\n // new tab, which is otherwise unannounced.\n aria-label={`${label} ${brand}${\n target === '_blank' ? ' (opens in a new tab)' : ''\n }`}\n >\n <span className=\"web5-powered-by__label\">{label}</span>{' '}\n <span className=\"web5-powered-by__brand\">{brand}</span>\n </a>\n </div>\n );\n};\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAAqC,IAAAE,YAAA;AAgB9B,MAAMC,uBAAuB,GAAAC,OAAA,CAAAD,uBAAA,GAAG,wBAAwB;;AAE/D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,cAAuC,GAAGA,CAAC;EACtDC,KAAK,GAAG,YAAY;EACpBC,KAAK,GAAG,MAAM;EACdC,IAAI,GAAGL,uBAAuB;EAC9BM,MAAM,GAAG,QAAQ;EACjBC,OAAO;EACPC;AACF,CAAC,KAAK;EACJ,MAAMC,GAAG,GAAGH,MAAM,KAAK,QAAQ,GAAG,qBAAqB,GAAGI,SAAS;EAEnE,oBACEf,MAAA,CAAAgB,OAAA,CAAAC,aAAA;IAAKJ,SAAS,EAAE,IAAAK,SAAE,EAAC,iBAAiB,EAAEL,SAAS,CAAE;IAAAM,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAjB,YAAA;MAAAkB,UAAA;MAAAC,YAAA;IAAA;EAAA,gBAC/CvB,MAAA,CAAAgB,OAAA,CAAAC,aAAA;IACEJ,SAAS,EAAC,uBAAuB;IACjCH,IAAI,EAAEA,IAAK;IACXC,MAAM,EAAEA,MAAO;IACfG,GAAG,EAAEA,GAAI;IACTF,OAAO,EAAEA;IACT;IACA;IACA;IAAA;IACA,cAAY,GAAGJ,KAAK,IAAIC,KAAK,GAC3BE,MAAM,KAAK,QAAQ,GAAG,uBAAuB,GAAG,EAAE,EACjD;IAAAQ,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAjB,YAAA;MAAAkB,UAAA;MAAAC,YAAA;IAAA;EAAA,gBAEHvB,MAAA,CAAAgB,OAAA,CAAAC,aAAA;IAAMJ,SAAS,EAAC,wBAAwB;IAAAM,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAjB,YAAA;MAAAkB,UAAA;MAAAC,YAAA;IAAA;EAAA,GAAEf,KAAY,CAAC,EAAC,GAAG,eAC3DR,MAAA,CAAAgB,OAAA,CAAAC,aAAA;IAAMJ,SAAS,EAAC,wBAAwB;IAAAM,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAjB,YAAA;MAAAkB,UAAA;MAAAC,YAAA;IAAA;EAAA,GAAEd,KAAY,CACrD,CACA,CAAC;AAEV,CAAC;AAACH,OAAA,CAAAC,cAAA,GAAAA,cAAA","ignoreList":[]}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ exports.__esModule = true;
5
+ exports.AiIcon = void 0;
6
+ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _jsxFileName = "/home/builduser/work/c2b6ca0b3fa984ee/packages/web5-core/dist/cjs/components/ui/icons/AiIcon.tsx";
9
+ /**
10
+ * The two-star "AI" glyph (Figma `Icons / General / Ai`, Medium 24px).
11
+ *
12
+ * Decorative by default: it sits next to text that already says the same
13
+ * thing, so it carries `aria-hidden` and no accessible name. Pass
14
+ * `aria-hidden={false}` plus a `<title>` only if it is ever used alone.
15
+ *
16
+ * Fills with `currentColor` so the host decides the color — the icon inherits
17
+ * from whatever text color the surrounding component resolved.
18
+ */
19
+ const AiIcon = props => /*#__PURE__*/_react.default.createElement("svg", (0, _extends2.default)({
20
+ width: "24",
21
+ height: "24",
22
+ viewBox: "0 0 24 24",
23
+ fill: "none",
24
+ xmlns: "http://www.w3.org/2000/svg",
25
+ "aria-hidden": "true"
26
+ }, props, {
27
+ __self: void 0,
28
+ __source: {
29
+ fileName: _jsxFileName,
30
+ lineNumber: 14,
31
+ columnNumber: 3
32
+ }
33
+ }), /*#__PURE__*/_react.default.createElement("path", {
34
+ d: "M17.9903 3.40194C17.9435 3.16823 17.7383 3 17.5 3C17.2617 3 17.0565 3.16823 17.0097 3.40194L16.9019 3.94078C16.704 4.93043 15.9304 5.70401 14.9408 5.90194L14.4019 6.00971C14.1682 6.05645 14 6.26166 14 6.5C14 6.73834 14.1682 6.94355 14.4019 6.99029L14.9408 7.09806C15.9304 7.29599 16.704 8.06957 16.9019 9.05922L17.0097 9.59806C17.0565 9.83177 17.2617 10 17.5 10C17.7383 10 17.9435 9.83177 17.9903 9.59806L18.0981 9.05922C18.296 8.06957 19.0696 7.29599 20.0592 7.09806L20.5981 6.99029C20.8318 6.94355 21 6.73834 21 6.5C21 6.26166 20.8318 6.05645 20.5981 6.00971L20.0592 5.90194C19.0696 5.70401 18.296 4.93043 18.0981 3.94078L17.9903 3.40194Z",
35
+ fill: "currentColor",
36
+ __self: void 0,
37
+ __source: {
38
+ fileName: _jsxFileName,
39
+ lineNumber: 23,
40
+ columnNumber: 5
41
+ }
42
+ }), /*#__PURE__*/_react.default.createElement("path", {
43
+ d: "M10.9824 6.36844C10.9231 6.15091 10.7255 6 10.5 6C10.2745 6 10.0769 6.15091 10.0176 6.36844L9.57009 8.00939C8.96451 10.2298 7.22985 11.9645 5.00939 12.5701L3.36844 13.0176C3.15091 13.0769 3 13.2745 3 13.5C3 13.7255 3.15091 13.9231 3.36844 13.9824L5.00939 14.4299C7.22985 15.0355 8.96451 16.7702 9.57009 18.9906L10.0176 20.6316C10.0769 20.8491 10.2745 21 10.5 21C10.7255 21 10.9231 20.8491 10.9824 20.6316L11.4299 18.9906C12.0355 16.7702 13.7702 15.0355 15.9906 14.4299L17.6316 13.9824C17.8491 13.9231 18 13.7255 18 13.5C18 13.2745 17.8491 13.0769 17.6316 13.0176L15.9906 12.5701C13.7702 11.9645 12.0355 10.2298 11.4299 8.00939L10.9824 6.36844Z",
44
+ fill: "currentColor",
45
+ __self: void 0,
46
+ __source: {
47
+ fileName: _jsxFileName,
48
+ lineNumber: 27,
49
+ columnNumber: 5
50
+ }
51
+ }));
52
+ exports.AiIcon = AiIcon;
53
+ //# sourceMappingURL=AiIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_jsxFileName","AiIcon","props","default","createElement","_extends2","width","height","viewBox","fill","xmlns","__self","__source","fileName","lineNumber","columnNumber","d","exports"],"sources":["../../../../../src/components/ui/icons/AiIcon.tsx"],"sourcesContent":["import React, { FC, SVGProps } from 'react';\n\n/**\n * The two-star \"AI\" glyph (Figma `Icons / General / Ai`, Medium 24px).\n *\n * Decorative by default: it sits next to text that already says the same\n * thing, so it carries `aria-hidden` and no accessible name. Pass\n * `aria-hidden={false}` plus a `<title>` only if it is ever used alone.\n *\n * Fills with `currentColor` so the host decides the color — the icon inherits\n * from whatever text color the surrounding component resolved.\n */\nexport const AiIcon: FC<SVGProps<SVGSVGElement>> = (props) => (\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n {...props}\n >\n <path\n d=\"M17.9903 3.40194C17.9435 3.16823 17.7383 3 17.5 3C17.2617 3 17.0565 3.16823 17.0097 3.40194L16.9019 3.94078C16.704 4.93043 15.9304 5.70401 14.9408 5.90194L14.4019 6.00971C14.1682 6.05645 14 6.26166 14 6.5C14 6.73834 14.1682 6.94355 14.4019 6.99029L14.9408 7.09806C15.9304 7.29599 16.704 8.06957 16.9019 9.05922L17.0097 9.59806C17.0565 9.83177 17.2617 10 17.5 10C17.7383 10 17.9435 9.83177 17.9903 9.59806L18.0981 9.05922C18.296 8.06957 19.0696 7.29599 20.0592 7.09806L20.5981 6.99029C20.8318 6.94355 21 6.73834 21 6.5C21 6.26166 20.8318 6.05645 20.5981 6.00971L20.0592 5.90194C19.0696 5.70401 18.296 4.93043 18.0981 3.94078L17.9903 3.40194Z\"\n fill=\"currentColor\"\n />\n <path\n d=\"M10.9824 6.36844C10.9231 6.15091 10.7255 6 10.5 6C10.2745 6 10.0769 6.15091 10.0176 6.36844L9.57009 8.00939C8.96451 10.2298 7.22985 11.9645 5.00939 12.5701L3.36844 13.0176C3.15091 13.0769 3 13.2745 3 13.5C3 13.7255 3.15091 13.9231 3.36844 13.9824L5.00939 14.4299C7.22985 15.0355 8.96451 16.7702 9.57009 18.9906L10.0176 20.6316C10.0769 20.8491 10.2745 21 10.5 21C10.7255 21 10.9231 20.8491 10.9824 20.6316L11.4299 18.9906C12.0355 16.7702 13.7702 15.0355 15.9906 14.4299L17.6316 13.9824C17.8491 13.9231 18 13.7255 18 13.5C18 13.2745 17.8491 13.0769 17.6316 13.0176L15.9906 12.5701C13.7702 11.9645 12.0355 10.2298 11.4299 8.00939L10.9824 6.36844Z\"\n fill=\"currentColor\"\n />\n </svg>\n);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA4C,IAAAC,YAAA;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,MAAmC,GAAIC,KAAK,iBACvDL,MAAA,CAAAM,OAAA,CAAAC,aAAA,YAAAC,SAAA,CAAAF,OAAA;EACEG,KAAK,EAAC,IAAI;EACVC,MAAM,EAAC,IAAI;EACXC,OAAO,EAAC,WAAW;EACnBC,IAAI,EAAC,MAAM;EACXC,KAAK,EAAC,4BAA4B;EAClC,eAAY;AAAM,GACdR,KAAK;EAAAS,MAAA;EAAAC,QAAA;IAAAC,QAAA,EAAAb,YAAA;IAAAc,UAAA;IAAAC,YAAA;EAAA;AAAA,iBAETlB,MAAA,CAAAM,OAAA,CAAAC,aAAA;EACEY,CAAC,EAAC,koBAAkoB;EACpoBP,IAAI,EAAC,cAAc;EAAAE,MAAA;EAAAC,QAAA;IAAAC,QAAA,EAAAb,YAAA;IAAAc,UAAA;IAAAC,YAAA;EAAA;AAAA,CACpB,CAAC,eACFlB,MAAA,CAAAM,OAAA,CAAAC,aAAA;EACEY,CAAC,EAAC,qoBAAqoB;EACvoBP,IAAI,EAAC,cAAc;EAAAE,MAAA;EAAAC,QAAA;IAAAC,QAAA,EAAAb,YAAA;IAAAc,UAAA;IAAAC,YAAA;EAAA;AAAA,CACpB,CACE,CACN;AAACE,OAAA,CAAAhB,MAAA,GAAAA,MAAA","ignoreList":[]}
package/dist/cjs/index.js CHANGED
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.WEB5_USER_QUERY_EVENT = exports.WEB5_SCOPES = exports.WEB5_SCOPE = exports.WEB5_ROOT_ID = exports.WEB5_ROOT_CLASS = exports.WEB5_REDIRECT_EVENT = exports.WEB5_GLOBAL_TOKENS = exports.WEB5_ANSWER_UPDATED_EVENT = exports.WEB5_ANSWER_SETTLED_EVENT = exports.UserQueryProvider = exports.UserQuery = exports.UnifiedMarkdownParser = exports.UnifiedLink = exports.UNKNOWN_CONSENT = exports.TextBlockSectionDefinition = exports.TableRow = exports.TableHeader = exports.TableHead = exports.TableFooter = exports.TableCell = exports.TableCaption = exports.TableBody = exports.Table = exports.TOKEN_NAME_PATTERN = exports.THEME_TOKEN_CONTRACT = exports.THEME_OVERRIDE_TOKENS = exports.THEME_DEBUG_QUERY_PARAM = exports.THEME_DEBUG_KEY = exports.TEMPLATES_MANIFEST_URL = exports.TEMPLATES_CDN_BASE = exports.SmartIcon = exports.SkipNodesSectionDefinition = exports.ShopifyStorefrontClient = exports.SectionSkeleton = exports.SearchSectionDefinition = exports.SearchSection = exports.STREAMING_TIMEOUT_MS = exports.REFRESH_PROMPTS_WINDOW_MS = exports.REFRESH_PROMPTS_UNTIL_KEY = exports.PromptEntryEmptyState = exports.PlacementSmoothHeight = exports.PlacementResponseRenderer = exports.PlacementPayloadProvider = exports.PlacementLoader = exports.PRODUCT_BY_HANDLE_QUERY = exports.PRODUCT_BACK_SESSION_KEY = exports.PLATFORM_ENTITY_TYPES = exports.OptimizedImage = exports.NextStepsSectionDefinition = exports.MetricsSectionDefinition = exports.MarkdownText = exports.MATCH_DEBUG_QUERY_PARAM = exports.MATCH_DEBUG_KEY = exports.Loader = exports.ListItemsSectionDefinition = exports.LinkType = exports.LIST_ITEMS_ENDPOINT = exports.KpiSectionDefinition = exports.ImageSlotProvider = exports.ImageSearchFilterToken = exports.HtmlCommentSectionDefinition = exports.HeroSectionDefinition = exports.HeroEntitySectionDefinition = exports.HOST_CONSENT_GLOBAL = exports.FeedbackBar = exports.FeatureToggleProvider = exports.FeatureSection9PlusDefinition = exports.FeatureCardsSectionDefinition = exports.FallbackSectionDefinition = exports.ErrorSectionDefinition = exports.EntitySectionDefinition = exports.EntityCollectionSectionDefinition = exports.EXPERIMENT_IDS = exports.ERROR_MARKDOWN = exports.EDITABLE_TOKENS = exports.Disclaimer = exports.DiagnosticsCollector = exports.DROP_SECTION = exports.DIAGNOSTIC_TYPES = exports.DEFAULT_ERROR_TEMPLATES = exports.DEFAULT_BACKEND_ENVIRONMENT = exports.CtaBannerSectionDefinition = exports.ComponentTracking = exports.ComponentRegistry = exports.ComponentDependenciesProvider = exports.ComparisonSectionDefinition = exports.ChipsProvider = exports.CalloutSectionDefinition = exports.CalloutBlock = exports.CONSENT_OVERRIDE_QUERY_PARAM = exports.CONSENT_OVERRIDE_KEY = exports.COLLECTION_BY_HANDLE_QUERY = exports.CLIENT_IDS = exports.CALLOUT_SEMANTICS = exports.CALLOUT_KINDS = exports.BottomContainer = exports.BRAND_TOKENS = exports.BACKEND_ENVIRONMENT_QUERY_PARAM = exports.BACKEND_ENVIRONMENT_KEY = exports.ARTICLE_BY_HANDLE_QUERY = void 0;
5
- exports.isSimulationTraffic = exports.isShopifyHost = exports.isProductFamilyEntityType = exports.isOneTrustHost = exports.isNavigableUrl = exports.isMatchDebugEnabled = exports.isLegacyUrl = exports.isHtmlComment = exports.isHslTriplet = exports.isEntityLink = exports.isDocumentFamilyEntityType = exports.installConsentProvider = exports.initConsentGate = exports.hslTripletToHex = exports.hslToRgb = exports.hostAliasFor = exports.hexToHslTriplet = exports.hasImage = exports.hasHostSuppliedConsent = exports.hasAnalyticsConsent = exports.getTemplateOverride = exports.getSessionId = exports.getResizedImageUrl = exports.getRefreshPromptsExpiry = exports.getPartsByType = exports.getPartByRole = exports.getOrCreateSessionId = exports.getLinks = exports.getIntentFromMarkdown = exports.getInstalledProviderName = exports.getImages = exports.getHeading = exports.getGateView = exports.getForwardStack = exports.getErrorTypeFromStatus = exports.getEntityExtractor = exports.getContextualImageFilename = exports.getConsentSnapshot = exports.getConsentOverride = exports.getConsentGateStats = exports.getClientBundleOverride = exports.getChatId = exports.getBackendEnvironment = exports.getAllByRole = exports.generateSectionId = exports.generateId = exports.formatProductPriceLabel = exports.formatPriceField = exports.formatMoney = exports.fixMalformedLinks = exports.findKeywordsInContent = exports.findInvalidWeb5Links = exports.findImageInNode = exports.findImageInChildren = exports.fetchProductsByHandlesMap = exports.fetchProductsByHandles = exports.fetchEntityListData = exports.extractProtocol = exports.extractLinkMetadata = exports.extractIntentFromMarkdown = exports.extractContentMarkdown = exports.extractContent = exports.escapeWeb5Links = exports.entityPayloadFromItems = exports.entityHref = exports.ensureMinLightness = exports.enrichEntitiesFromPayload = exports.enableRefreshPrompts = exports.disableRefreshPrompts = exports.detectLinkType = exports.detectConsentProvider = exports.deriveRole = exports.deriveLightColor = exports.deriveDarkGradient = exports.deriveDarkColor = exports.defaultExtractor = exports.decodeLinkText = exports.createWixAuthFetch = exports.createShopifyConsentProvider = exports.createSdkRegistry = exports.createPageSection = exports.createOneTrustConsentProvider = exports.createHostSuppliedConsentProvider = exports.createFeatureToggleReader = exports.createErrorMarkdown = exports.convertToBlockElementsWithMapping = exports.convertToBlockElements = exports.computeContentBBox = exports.composeSemantic = exports.cn = exports.clearForwardStack = exports.buildProbeUrl = exports.buildPlacementDependencies = exports.buildImageSearchFilter = exports.bucketOf = exports.backgroundFilter = exports.applyThemeOverrides = exports.analyzeBackdrop = exports.addToCart = exports.Web5UrlType = void 0;
6
- exports.usesStagingBackend = exports.useWeb5Link = exports.useUserQuery = exports.useResolvedImageSources = exports.useResolveShopifyEntityData = exports.useResolveSearchSpringEntityData = exports.useResolveGenericEntityData = exports.usePlacementPayload = exports.useMarkdownUtils = exports.useImageSlotCollector = exports.useImageSlot = exports.useFeatureToggles = exports.useFeatureToggle = exports.useEntityTransforms = exports.useDebugImageContext = exports.useConversation = exports.useComponentDependencies = exports.useChips = exports.unlockOnUserAction = exports.tryParseComponent = exports.trimTrailingWhitespace = exports.transmit = exports.transformToSolutionEntityData = exports.transformToGenericEntityData = exports.transformToBlogPostEntityData = exports.transformShopifyProduct = exports.transformShopifyEntityToItemData = exports.transformShopifyCollection = exports.transformShopifyArticle = exports.transformSSProductToEntityItemData = exports.toRgb = exports.toMatchedOptions = exports.toCatalogPath = exports.subscribeToConsent = exports.stripMarkdown = exports.startNewChatId = exports.shouldRefreshPrompts = exports.setMatchDebug = exports.setForwardStack = exports.setConsentOverride = exports.setConsentBufferLimit = exports.setChatId = exports.setBackendEnvironment = exports.rgbToHsl = exports.resolveShopifyEntity = exports.resolveShopifyConfig = exports.resolveErrorTemplate = exports.resolveEntityTypeConfig = exports.resolveClientBundleUrl = exports.resetMatchDebugCache = exports.resetConsentGateForTests = exports.resetChatIdForTests = exports.registerEntityExtractor = exports.readProductBackHandoff = exports.readCurrencyCode = exports.pushToForwardStack = exports.pushPromptSubmit = exports.pushLinkClick = exports.pushExit = exports.pushEvent = exports.pushError = exports.pushEntityFiltered = exports.publishHostConsent = exports.preprocessMarkdown = exports.popFromForwardStack = exports.parseWeb5Url = exports.parseMarkdownToComponents = exports.parseMarkdownToAst = exports.parseEntityLink = exports.parseAstToMarkdown = exports.normalizeImageUrl = exports.normalizeIconUrls = exports.normalizeEntityItem = exports.nodesToParts = exports.mergeSectionsWithStableReferences = exports.mergeEntityData = exports.mergeClientConfig = exports.mayTransmit = exports.mayPersistIdentity = exports.matchMarkdown = exports.matchAllSections = exports.logMatchDebug = exports.loadImagePixels = exports.loadClientBundle = exports.loadBackdropAnalysis = exports.listEntityItems = exports.isWeb5Url = exports.isWeb5SearchUrl = exports.isWeb5ImageUrl = exports.isWeb5IconUrl = exports.isWeb5EntityUrl = exports.isWeb5AskUrl = exports.isWeb5ActionUrl = exports.isValidWeb5Url = exports.isValidTemplateId = exports.isValidLinkUrl = exports.isUserEngaged = exports.isTrustedBundleHost = exports.isThemeDebugEnabled = exports.isTemplatePickerRequested = void 0;
7
- exports.writeProductBackHandoff = exports.validatePatternWithBlocks = exports.validatePatternSyntax = exports.validatePattern = exports.validateLinkUrl = void 0;
4
+ exports.WEB5_REDIRECT_EVENT = exports.WEB5_GLOBAL_TOKENS = exports.WEB5_ANSWER_UPDATED_EVENT = exports.WEB5_ANSWER_SETTLED_EVENT = exports.UserQueryProvider = exports.UserQuery = exports.UnifiedMarkdownParser = exports.UnifiedLink = exports.UNKNOWN_CONSENT = exports.TextBlockSectionDefinition = exports.TableRow = exports.TableHeader = exports.TableHead = exports.TableFooter = exports.TableCell = exports.TableCaption = exports.TableBody = exports.Table = exports.TOKEN_NAME_PATTERN = exports.THEME_TOKEN_CONTRACT = exports.THEME_OVERRIDE_TOKENS = exports.THEME_DEBUG_QUERY_PARAM = exports.THEME_DEBUG_KEY = exports.TEMPLATES_MANIFEST_URL = exports.TEMPLATES_CDN_BASE = exports.SmartIcon = exports.SkipNodesSectionDefinition = exports.ShopifyStorefrontClient = exports.SectionSkeleton = exports.SearchSectionDefinition = exports.SearchSection = exports.STREAMING_TIMEOUT_MS = exports.REFRESH_PROMPTS_WINDOW_MS = exports.REFRESH_PROMPTS_UNTIL_KEY = exports.PromptEntryEmptyState = exports.PoweredByBadge = exports.PlacementSmoothHeight = exports.PlacementResponseRenderer = exports.PlacementPayloadProvider = exports.PlacementLoader = exports.PRODUCT_BY_HANDLE_QUERY = exports.PRODUCT_BACK_SESSION_KEY = exports.PLATFORM_ENTITY_TYPES = exports.OptimizedImage = exports.NextStepsSectionDefinition = exports.MetricsSectionDefinition = exports.MarkdownText = exports.MATCH_DEBUG_QUERY_PARAM = exports.MATCH_DEBUG_KEY = exports.Loader = exports.ListItemsSectionDefinition = exports.LinkType = exports.LIST_ITEMS_ENDPOINT = exports.KpiSectionDefinition = exports.ImageSlotProvider = exports.ImageSearchFilterToken = exports.HtmlCommentSectionDefinition = exports.HeroSectionDefinition = exports.HeroEntitySectionDefinition = exports.HOST_CONSENT_GLOBAL = exports.FeedbackBar = exports.FeatureToggleProvider = exports.FeatureSection9PlusDefinition = exports.FeatureCardsSectionDefinition = exports.FallbackSectionDefinition = exports.ErrorSectionDefinition = exports.EntitySectionDefinition = exports.EntityCollectionSectionDefinition = exports.EXPERIMENT_IDS = exports.ERROR_MARKDOWN = exports.EDITABLE_TOKENS = exports.DiagnosticsCollector = exports.DROP_SECTION = exports.DIAGNOSTIC_TYPES = exports.DEFAULT_POWERED_BY_HREF = exports.DEFAULT_ERROR_TEMPLATES = exports.DEFAULT_BACKEND_ENVIRONMENT = exports.DEFAULT_AI_DISCLOSURE_TEXT = exports.CtaBannerSectionDefinition = exports.ComponentTracking = exports.ComponentRegistry = exports.ComponentDependenciesProvider = exports.ComparisonSectionDefinition = exports.ChipsProvider = exports.CalloutSectionDefinition = exports.CalloutBlock = exports.CONSENT_OVERRIDE_QUERY_PARAM = exports.CONSENT_OVERRIDE_KEY = exports.COLLECTION_BY_HANDLE_QUERY = exports.CLIENT_IDS = exports.CALLOUT_SEMANTICS = exports.CALLOUT_KINDS = exports.BottomContainer = exports.BRAND_TOKENS = exports.BACKEND_ENVIRONMENT_QUERY_PARAM = exports.BACKEND_ENVIRONMENT_KEY = exports.AiIcon = exports.AiDisclosure = exports.ASSISTANT_TOKEN = exports.ARTICLE_BY_HANDLE_QUERY = void 0;
5
+ exports.isMatchDebugEnabled = exports.isLegacyUrl = exports.isHtmlComment = exports.isHslTriplet = exports.isEntityLink = exports.isDocumentFamilyEntityType = exports.installConsentProvider = exports.initConsentGate = exports.hslTripletToHex = exports.hslToRgb = exports.hostAliasFor = exports.hexToHslTriplet = exports.hasImage = exports.hasHostSuppliedConsent = exports.hasAnalyticsConsent = exports.getTemplateOverride = exports.getSessionId = exports.getResizedImageUrl = exports.getRefreshPromptsExpiry = exports.getPartsByType = exports.getPartByRole = exports.getOrCreateSessionId = exports.getLinks = exports.getIntentFromMarkdown = exports.getInstalledProviderName = exports.getImages = exports.getHeading = exports.getGateView = exports.getForwardStack = exports.getErrorTypeFromStatus = exports.getEntityExtractor = exports.getContextualImageFilename = exports.getConsentSnapshot = exports.getConsentOverride = exports.getConsentGateStats = exports.getClientBundleOverride = exports.getChatId = exports.getBackendEnvironment = exports.getAllByRole = exports.generateSectionId = exports.generateId = exports.formatProductPriceLabel = exports.formatPriceField = exports.formatMoney = exports.fixMalformedLinks = exports.findKeywordsInContent = exports.findInvalidWeb5Links = exports.findImageInNode = exports.findImageInChildren = exports.fetchProductsByHandlesMap = exports.fetchProductsByHandles = exports.fetchEntityListData = exports.extractProtocol = exports.extractLinkMetadata = exports.extractIntentFromMarkdown = exports.extractContentMarkdown = exports.extractContent = exports.escapeWeb5Links = exports.entityPayloadFromItems = exports.entityHref = exports.ensureMinLightness = exports.enrichEntitiesFromPayload = exports.enableRefreshPrompts = exports.disableRefreshPrompts = exports.detectLinkType = exports.detectConsentProvider = exports.deriveRole = exports.deriveLightColor = exports.deriveDarkGradient = exports.deriveDarkColor = exports.defaultExtractor = exports.decodeLinkText = exports.createWixAuthFetch = exports.createShopifyConsentProvider = exports.createSdkRegistry = exports.createPageSection = exports.createOneTrustConsentProvider = exports.createHostSuppliedConsentProvider = exports.createFeatureToggleReader = exports.createErrorMarkdown = exports.convertToBlockElementsWithMapping = exports.convertToBlockElements = exports.computeContentBBox = exports.composeSemantic = exports.cn = exports.clearForwardStack = exports.buildProbeUrl = exports.buildPlacementDependencies = exports.buildImageSearchFilter = exports.bucketOf = exports.backgroundFilter = exports.applyThemeOverrides = exports.analyzeBackdrop = exports.addToCart = exports.Web5UrlType = exports.WEB5_USER_QUERY_EVENT = exports.WEB5_SCOPES = exports.WEB5_SCOPE = exports.WEB5_ROOT_ID = exports.WEB5_ROOT_CLASS = void 0;
6
+ exports.useResolveSearchSpringEntityData = exports.useResolveGenericEntityData = exports.usePlacementPayload = exports.useMarkdownUtils = exports.useImageSlotCollector = exports.useImageSlot = exports.useFeatureToggles = exports.useFeatureToggle = exports.useEntityTransforms = exports.useDebugImageContext = exports.useConversation = exports.useComponentDependencies = exports.useChips = exports.unlockOnUserAction = exports.tryParseComponent = exports.trimTrailingWhitespace = exports.transmit = exports.transformToSolutionEntityData = exports.transformToGenericEntityData = exports.transformToBlogPostEntityData = exports.transformShopifyProduct = exports.transformShopifyEntityToItemData = exports.transformShopifyCollection = exports.transformShopifyArticle = exports.transformSSProductToEntityItemData = exports.toRgb = exports.toMatchedOptions = exports.toCatalogPath = exports.subscribeToConsent = exports.stripMarkdown = exports.startNewChatId = exports.shouldRefreshPrompts = exports.setMatchDebug = exports.setForwardStack = exports.setConsentOverride = exports.setConsentBufferLimit = exports.setChatId = exports.setBackendEnvironment = exports.rgbToHsl = exports.resolveShopifyEntity = exports.resolveShopifyConfig = exports.resolveErrorTemplate = exports.resolveEntityTypeConfig = exports.resolveClientBundleUrl = exports.resetMatchDebugCache = exports.resetConsentGateForTests = exports.resetChatIdForTests = exports.registerEntityExtractor = exports.readProductBackHandoff = exports.readCurrencyCode = exports.pushToForwardStack = exports.pushPromptSubmit = exports.pushLinkClick = exports.pushExit = exports.pushEvent = exports.pushError = exports.pushEntityFiltered = exports.publishHostConsent = exports.preprocessMarkdown = exports.popFromForwardStack = exports.parseWeb5Url = exports.parseMarkdownToComponents = exports.parseMarkdownToAst = exports.parseEntityLink = exports.parseAstToMarkdown = exports.normalizeImageUrl = exports.normalizeIconUrls = exports.normalizeEntityItem = exports.nodesToParts = exports.mergeSectionsWithStableReferences = exports.mergeEntityData = exports.mergeClientConfig = exports.mayTransmit = exports.mayPersistIdentity = exports.matchMarkdown = exports.matchAllSections = exports.logMatchDebug = exports.loadImagePixels = exports.loadClientBundle = exports.loadBackdropAnalysis = exports.listEntityItems = exports.isWeb5Url = exports.isWeb5SearchUrl = exports.isWeb5ImageUrl = exports.isWeb5IconUrl = exports.isWeb5EntityUrl = exports.isWeb5AskUrl = exports.isWeb5ActionUrl = exports.isValidWeb5Url = exports.isValidTemplateId = exports.isValidLinkUrl = exports.isUserEngaged = exports.isTrustedBundleHost = exports.isThemeDebugEnabled = exports.isTemplatePickerRequested = exports.isSimulationTraffic = exports.isShopifyHost = exports.isProductFamilyEntityType = exports.isOneTrustHost = exports.isNavigableUrl = void 0;
7
+ exports.writeProductBackHandoff = exports.validatePatternWithBlocks = exports.validatePatternSyntax = exports.validatePattern = exports.validateLinkUrl = exports.usesStagingBackend = exports.useWeb5Link = exports.useUserQuery = exports.useResolvedImageSources = exports.useResolveShopifyEntityData = void 0;
8
8
  var _clients = require("./clients");
9
9
  exports.CLIENT_IDS = _clients.CLIENT_IDS;
10
10
  exports.EXPERIMENT_IDS = _clients.EXPERIMENT_IDS;
@@ -253,8 +253,15 @@ var _SearchSection = require("./components/ui/SearchSection");
253
253
  exports.SearchSection = _SearchSection.SearchSection;
254
254
  var _FeedbackBar = require("./components/ui/FeedbackBar");
255
255
  exports.FeedbackBar = _FeedbackBar.FeedbackBar;
256
- var _Disclaimer = require("./components/ui/Disclaimer");
257
- exports.Disclaimer = _Disclaimer.Disclaimer;
256
+ var _AiDisclosure = require("./components/ui/AiDisclosure");
257
+ exports.AiDisclosure = _AiDisclosure.AiDisclosure;
258
+ exports.ASSISTANT_TOKEN = _AiDisclosure.ASSISTANT_TOKEN;
259
+ exports.DEFAULT_AI_DISCLOSURE_TEXT = _AiDisclosure.DEFAULT_AI_DISCLOSURE_TEXT;
260
+ var _AiIcon = require("./components/ui/icons/AiIcon");
261
+ exports.AiIcon = _AiIcon.AiIcon;
262
+ var _PoweredByBadge = require("./components/ui/PoweredByBadge");
263
+ exports.PoweredByBadge = _PoweredByBadge.PoweredByBadge;
264
+ exports.DEFAULT_POWERED_BY_HREF = _PoweredByBadge.DEFAULT_POWERED_BY_HREF;
258
265
  var _BottomContainer = require("./components/ui/BottomContainer");
259
266
  exports.BottomContainer = _BottomContainer.BottomContainer;
260
267
  var _MarkdownText = require("./components/ui/MarkdownText");