@wix/web5-core 1.62.0 → 1.63.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4,6 +4,7 @@ exports.__esModule = true;
4
4
  exports.THEME_OVERRIDE_TOKENS = void 0;
5
5
  exports.applyThemeOverrides = applyThemeOverrides;
6
6
  var _hostScope = require("../hostScope");
7
+ var _themeDebug = require("./themeDebug");
7
8
  var _tokenContract = require("../theme/tokenContract");
8
9
  /**
9
10
  * Runtime theme token injection (DL #131).
@@ -66,7 +67,9 @@ const THEME_OVERRIDE_TOKENS = exports.THEME_OVERRIDE_TOKENS = new Set(Object.key
66
67
  const KEY_PATTERN = /^--[a-z][a-z0-9-]{0,62}$/;
67
68
  const MARKER_ATTR = 'data-web5-theme-overrides';
68
69
  function applyThemeOverrides(overrides) {
69
- if (typeof document === 'undefined') return;
70
+ if (typeof document === 'undefined') {
71
+ return;
72
+ }
70
73
  const existing = document.head.querySelector(`style[${MARKER_ATTR}]`);
71
74
  const entries = Object.entries(overrides ?? {}).filter(([key]) => {
72
75
  const wellFormed = KEY_PATTERN.test(key);
@@ -77,6 +80,10 @@ function applyThemeOverrides(overrides) {
77
80
  });
78
81
  if (entries.length === 0) {
79
82
  existing == null || existing.remove();
83
+ // Nothing to apply is itself a traceable answer: it means every token on
84
+ // the page is the template's, which is otherwise indistinguishable from
85
+ // tracing having failed.
86
+ (0, _themeDebug.traceThemeOverrides)([]);
80
87
  return;
81
88
  }
82
89
  const style = document.createElement('style');
@@ -89,6 +96,7 @@ function applyThemeOverrides(overrides) {
89
96
  }
90
97
  sheet.insertRule(`${_hostScope.WEB5_SCOPE} {}`, 0);
91
98
  const rule = sheet.cssRules[0];
99
+ const applied = [];
92
100
  for (const [key, value] of entries) {
93
101
  // Brand wins over the template, so it is written as the token the
94
102
  // stylesheets actually read. Everything else lands in the host namespace,
@@ -96,6 +104,7 @@ function applyThemeOverrides(overrides) {
96
104
  const target = (0, _tokenContract.bucketOf)(key) === 'brand' ? key : (0, _tokenContract.hostAliasFor)(key);
97
105
  try {
98
106
  rule.style.setProperty(target, value);
107
+ applied.push([key, value]);
99
108
  } catch {
100
109
  // An engine that rejects the value leaves the token at its baked
101
110
  // default — degraded theming, never broken CSS.
@@ -104,5 +113,8 @@ function applyThemeOverrides(overrides) {
104
113
  // Replace-on-reapply: the fresh element is appended (so it stays last in
105
114
  // document order) before the stale one is dropped.
106
115
  existing == null || existing.remove();
116
+ // AFTER the stale element is gone, so the resolved values traced below are
117
+ // the ones the page will actually render. Off unless explicitly enabled.
118
+ (0, _themeDebug.traceThemeOverrides)(applied);
107
119
  }
108
120
  //# sourceMappingURL=applyThemeOverrides.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_hostScope","require","_tokenContract","THEME_OVERRIDE_TOKENS","exports","Set","Object","keys","THEME_TOKEN_CONTRACT","KEY_PATTERN","MARKER_ATTR","applyThemeOverrides","overrides","document","existing","head","querySelector","entries","filter","key","wellFormed","test","console","warn","length","remove","style","createElement","setAttribute","appendChild","sheet","insertRule","WEB5_SCOPE","rule","cssRules","value","target","bucketOf","hostAliasFor","setProperty"],"sources":["../../../src/client/applyThemeOverrides.ts"],"sourcesContent":["/**\n * Runtime theme token injection (DL #131).\n *\n * `Configuration.themeOverrides` carries per-store CSS custom-property\n * overrides (`--primary`, `--radius`, `--heading`, ...) computed from the\n * store's own theme (e.g. the Shopify `settings_data.json` extractor). This\n * applies them to the page so they win over the bundle's baked `theme.css`:\n *\n * - **Scoped, not `:root`**: the rule targets `WEB5_SCOPE`, the same\n * `:is(#root, .w5-root, [data-web5-placement], .debug-view)` selector every\n * compiled bundle stylesheet uses — host-page styling is never touched, and\n * equal specificity + later document order makes the override win. Callers\n * must therefore apply AFTER the client bundle's CSS is in the document.\n * - **Bucketed, since DL #193**: a `brand` token (colour roles, font families)\n * is written as itself, so the store's identity beats the template's. Every\n * other key — `host` tokens and anything the contract has never heard of —\n * is written as its `--web5-host-*` alias, which core's stylesheets consume\n * as a `var()` fallback. A template stating the real token therefore wins on\n * shape, and an unknown key is inert rather than dangerous: a custom property\n * nothing references renders nothing, so an adapter that learns to read a new\n * token cannot silently override a template.\n * - **The token set stays open, but the destination changed.** Before DL #193\n * an unrecognised key was applied verbatim, so a template could consume\n * `var(--foo)` and grow a token with no release. It now arrives as\n * `--web5-host-foo`, so the template consumes `var(--web5-host-foo, <default>)`\n * instead. One line different, and the provenance is explicit — the wiring\n * line is what activates a host token, not the contract entry.\n * - The mandatory `--` prefix means an override can only define custom\n * properties — it can never set a real CSS property inside the scope. The\n * server enforces the same shape (plus value sanitation) at write time.\n * - **Values are inert**: entries are written with\n * `CSSStyleDeclaration.setProperty`, never string-concatenated into CSS, so\n * a hostile value cannot terminate the declaration or open a new rule.\n * - **Idempotent**: one marker element per document, replaced wholesale on\n * re-apply; empty/absent input removes it.\n */\nimport { WEB5_SCOPE } from '../hostScope';\nimport {\n THEME_TOKEN_CONTRACT,\n bucketOf,\n hostAliasFor,\n} from '../theme/tokenContract';\n\n/** A themeOverrides key: always a CSS custom property. */\nexport type ThemeOverrideKey = `--${string}`;\n\n/**\n * Writer-side shape for a theme override map. The catalog below documents\n * the tokens the seed consumes today; the type stays open so new tokens\n * flow end-to-end with no release anywhere but the seed.\n */\nexport type ThemeOverrides = Record<ThemeOverrideKey, string>;\n\n/**\n * The known token catalog. GUIDANCE, NOT A GATE — `applyThemeOverrides` still\n * applies any well-formed custom property, so the vocabulary can grow without a\n * release here.\n *\n * Derived from `@wix/web5-token-contract` rather than restated, because two\n * hand-maintained copies of one list is how they drift. The contract also\n * carries what this Set cannot: which bucket each token is in, and therefore\n * who wins when a store and a template disagree.\n */\nexport const THEME_OVERRIDE_TOKENS: ReadonlySet<string> = new Set(\n Object.keys(THEME_TOKEN_CONTRACT),\n);\n\n/** Mirrors the server's Consts.ThemeOverrideKeyPattern. */\nconst KEY_PATTERN = /^--[a-z][a-z0-9-]{0,62}$/;\n\nconst MARKER_ATTR = 'data-web5-theme-overrides';\n\nexport function applyThemeOverrides(\n overrides?: Record<string, string> | null,\n): void {\n if (typeof document === 'undefined') return;\n\n const existing = document.head.querySelector(`style[${MARKER_ATTR}]`);\n const entries = Object.entries(overrides ?? {}).filter(([key]) => {\n const wellFormed = KEY_PATTERN.test(key);\n if (!wellFormed) {\n console.warn(`[web5-theme] Skipping malformed theme override key: ${key}`);\n }\n return wellFormed;\n });\n\n if (entries.length === 0) {\n existing?.remove();\n return;\n }\n\n const style = document.createElement('style');\n style.setAttribute(MARKER_ATTR, '');\n document.head.appendChild(style);\n const sheet = style.sheet;\n if (!sheet) {\n style.remove();\n return;\n }\n sheet.insertRule(`${WEB5_SCOPE} {}`, 0);\n const rule = sheet.cssRules[0] as CSSStyleRule;\n for (const [key, value] of entries) {\n // Brand wins over the template, so it is written as the token the\n // stylesheets actually read. Everything else lands in the host namespace,\n // where core consumes it only as a fallback the template can beat.\n const target = bucketOf(key) === 'brand' ? key : hostAliasFor(key);\n try {\n rule.style.setProperty(target, value);\n } catch {\n // An engine that rejects the value leaves the token at its baked\n // default — degraded theming, never broken CSS.\n }\n }\n // Replace-on-reapply: the fresh element is appended (so it stays last in\n // document order) before the stale one is dropped.\n existing?.remove();\n}\n"],"mappings":";;;;;AAoCA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AArCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAQA;;AAGA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,qBAA0C,GAAAC,OAAA,CAAAD,qBAAA,GAAG,IAAIE,GAAG,CAC/DC,MAAM,CAACC,IAAI,CAACC,mCAAoB,CAClC,CAAC;;AAED;AACA,MAAMC,WA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B,GAAG,CAAC,KAAK,OAAO,GAAGA,GAAG,GAAG,IAAAmB,2BAAY,EAACnB,GAAG,CAAC;IAClE,IAAI;MACFc,IAAI,CAACP,KAAK,CAACa,WAAW,CAACH,MAAM,EAAED,KAAK,CAAC;IACvC,CAAC,CAAC,MAAM;MACN;MACA;IAAA;EAEJ;EACA;EACA;EACArB,QAAQ,YAARA,QAAQ,CAAEW,MAAM,CAAC,CAAC;AACpB","ignoreList":[]}
1
+ {"version":3,"names":["_hostScope","require","_themeDebug","_tokenContract","THEME_OVERRIDE_TOKENS","exports","Set","Object","keys","THEME_TOKEN_CONTRACT","KEY_PATTERN","MARKER_ATTR","applyThemeOverrides","overrides","document","existing","head","querySelector","entries","filter","key","wellFormed","test","console","warn","length","remove","traceThemeOverrides","style","createElement","setAttribute","appendChild","sheet","insertRule","WEB5_SCOPE","rule","cssRules","applied","value","target","bucketOf","hostAliasFor","setProperty","push"],"sources":["../../../src/client/applyThemeOverrides.ts"],"sourcesContent":["/**\n * Runtime theme token injection (DL #131).\n *\n * `Configuration.themeOverrides` carries per-store CSS custom-property\n * overrides (`--primary`, `--radius`, `--heading`, ...) computed from the\n * store's own theme (e.g. the Shopify `settings_data.json` extractor). This\n * applies them to the page so they win over the bundle's baked `theme.css`:\n *\n * - **Scoped, not `:root`**: the rule targets `WEB5_SCOPE`, the same\n * `:is(#root, .w5-root, [data-web5-placement], .debug-view)` selector every\n * compiled bundle stylesheet uses — host-page styling is never touched, and\n * equal specificity + later document order makes the override win. Callers\n * must therefore apply AFTER the client bundle's CSS is in the document.\n * - **Bucketed, since DL #193**: a `brand` token (colour roles, font families)\n * is written as itself, so the store's identity beats the template's. Every\n * other key — `host` tokens and anything the contract has never heard of —\n * is written as its `--web5-host-*` alias, which core's stylesheets consume\n * as a `var()` fallback. A template stating the real token therefore wins on\n * shape, and an unknown key is inert rather than dangerous: a custom property\n * nothing references renders nothing, so an adapter that learns to read a new\n * token cannot silently override a template.\n * - **The token set stays open, but the destination changed.** Before DL #193\n * an unrecognised key was applied verbatim, so a template could consume\n * `var(--foo)` and grow a token with no release. It now arrives as\n * `--web5-host-foo`, so the template consumes `var(--web5-host-foo, <default>)`\n * instead. One line different, and the provenance is explicit — the wiring\n * line is what activates a host token, not the contract entry.\n * - The mandatory `--` prefix means an override can only define custom\n * properties — it can never set a real CSS property inside the scope. The\n * server enforces the same shape (plus value sanitation) at write time.\n * - **Values are inert**: entries are written with\n * `CSSStyleDeclaration.setProperty`, never string-concatenated into CSS, so\n * a hostile value cannot terminate the declaration or open a new rule.\n * - **Idempotent**: one marker element per document, replaced wholesale on\n * re-apply; empty/absent input removes it.\n */\nimport { WEB5_SCOPE } from '../hostScope';\nimport { traceThemeOverrides } from './themeDebug';\nimport {\n THEME_TOKEN_CONTRACT,\n bucketOf,\n hostAliasFor,\n} from '../theme/tokenContract';\n\n/** A themeOverrides key: always a CSS custom property. */\nexport type ThemeOverrideKey = `--${string}`;\n\n/**\n * Writer-side shape for a theme override map. The catalog below documents\n * the tokens the seed consumes today; the type stays open so new tokens\n * flow end-to-end with no release anywhere but the seed.\n */\nexport type ThemeOverrides = Record<ThemeOverrideKey, string>;\n\n/**\n * The known token catalog. GUIDANCE, NOT A GATE — `applyThemeOverrides` still\n * applies any well-formed custom property, so the vocabulary can grow without a\n * release here.\n *\n * Derived from `@wix/web5-token-contract` rather than restated, because two\n * hand-maintained copies of one list is how they drift. The contract also\n * carries what this Set cannot: which bucket each token is in, and therefore\n * who wins when a store and a template disagree.\n */\nexport const THEME_OVERRIDE_TOKENS: ReadonlySet<string> = new Set(\n Object.keys(THEME_TOKEN_CONTRACT),\n);\n\n/** Mirrors the server's Consts.ThemeOverrideKeyPattern. */\nconst KEY_PATTERN = /^--[a-z][a-z0-9-]{0,62}$/;\n\nconst MARKER_ATTR = 'data-web5-theme-overrides';\n\nexport function applyThemeOverrides(\n overrides?: Record<string, string> | null,\n): void {\n if (typeof document === 'undefined') {\n return;\n }\n\n const existing = document.head.querySelector(`style[${MARKER_ATTR}]`);\n const entries = Object.entries(overrides ?? {}).filter(([key]) => {\n const wellFormed = KEY_PATTERN.test(key);\n if (!wellFormed) {\n console.warn(\n `[web5-theme] Skipping malformed theme override key: ${key}`,\n );\n }\n return wellFormed;\n });\n\n if (entries.length === 0) {\n existing?.remove();\n // Nothing to apply is itself a traceable answer: it means every token on\n // the page is the template's, which is otherwise indistinguishable from\n // tracing having failed.\n traceThemeOverrides([]);\n return;\n }\n\n const style = document.createElement('style');\n style.setAttribute(MARKER_ATTR, '');\n document.head.appendChild(style);\n const sheet = style.sheet;\n if (!sheet) {\n style.remove();\n return;\n }\n sheet.insertRule(`${WEB5_SCOPE} {}`, 0);\n const rule = sheet.cssRules[0] as CSSStyleRule;\n const applied: [string, string][] = [];\n for (const [key, value] of entries) {\n // Brand wins over the template, so it is written as the token the\n // stylesheets actually read. Everything else lands in the host namespace,\n // where core consumes it only as a fallback the template can beat.\n const target = bucketOf(key) === 'brand' ? key : hostAliasFor(key);\n try {\n rule.style.setProperty(target, value);\n applied.push([key, value]);\n } catch {\n // An engine that rejects the value leaves the token at its baked\n // default — degraded theming, never broken CSS.\n }\n }\n // Replace-on-reapply: the fresh element is appended (so it stays last in\n // document order) before the stale one is dropped.\n existing?.remove();\n // AFTER the stale element is gone, so the resolved values traced below are\n // the ones the page will actually render. Off unless explicitly enabled.\n traceThemeOverrides(applied);\n}\n"],"mappings":";;;;;AAoCA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AAtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;;AAGA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAA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C,MAAMC,IAAI,GAAGH,KAAK,CAACI,QAAQ,CAAC,CAAC,CAAiB;EAC9C,MAAMC,OAA2B,GAAG,EAAE;EACtC,KAAK,MAAM,CAACjB,GAAG,EAAEkB,KAAK,CAAC,IAAIpB,OAAO,EAAE;IAClC;IACA;IACA;IACA,MAAMqB,MAAM,GAAG,IAAAC,uBAAQ,EAACpB,GAAG,CAAC,KAAK,OAAO,GAAGA,GAAG,GAAG,IAAAqB,2BAAY,EAACrB,GAAG,CAAC;IAClE,IAAI;MACFe,IAAI,CAACP,KAAK,CAACc,WAAW,CAACH,MAAM,EAAED,KAAK,CAAC;MACrCD,OAAO,CAACM,IAAI,CAAC,CAACvB,GAAG,EAAEkB,KAAK,CAAC,CAAC;IAC5B,CAAC,CAAC,MAAM;MACN;MACA;IAAA;EAEJ;EACA;EACA;EACAvB,QAAQ,YAARA,QAAQ,CAAEW,MAAM,CAAC,CAAC;EAClB;EACA;EACA,IAAAC,+BAAmB,EAACU,OAAO,CAAC;AAC9B","ignoreList":[]}
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.resetThemeDebugCache = exports.isThemeDebugEnabled = exports.THEME_DEBUG_QUERY_PARAM = exports.THEME_DEBUG_KEY = void 0;
5
+ exports.traceThemeOverrides = traceThemeOverrides;
6
+ var _hostScope = require("../hostScope");
7
+ var _tokenContract = require("../theme/tokenContract");
8
+ /**
9
+ * Theme-override tracing (debug-only).
10
+ *
11
+ * Answers the one question the token pipeline cannot otherwise be asked:
12
+ * **which layer actually won?**
13
+ *
14
+ * Since DL #193 a `brand` token is written as itself and everything else as its
15
+ * `--web5-host-*` alias, which core's stylesheets consume as a `var()` fallback
16
+ * a template can beat. That makes the outcome a cascade decision, and a cascade
17
+ * decision is invisible — there is no callback, no return value, and nothing in
18
+ * the DOM to read. Worse, `applyThemeOverrides` writes through the CSSOM
19
+ * (`insertRule` + `setProperty`, never `textContent`) so that a hostile value
20
+ * can never terminate a declaration, which means DevTools renders the marker as
21
+ * `<style data-web5-theme-overrides="">` — an empty tag, with the rules real but
22
+ * nowhere in the DOM tree. Every part of that is deliberate and every part of it
23
+ * looks broken.
24
+ *
25
+ * So this reads the resolved value back off the mount **after** the rule is in,
26
+ * and reports what the browser actually decided:
27
+ *
28
+ * [web5:theme] --radius host wrote --web5-host-radius=0rem → 1.25rem TEMPLATE
29
+ * [web5:theme] --primary brand wrote --primary=0 0% 9% → 0 0% 9% STORE
30
+ *
31
+ * Off by default. Enable with `?web5DebugTheme=1` (one-shot, wins over storage)
32
+ * or `localStorage["web5_debug_theme"] = "1"` (sticky) — the same shape as
33
+ * `matchDebug`, so there is one convention to learn rather than two.
34
+ *
35
+ * It is gated rather than always-on because reading a computed value forces a
36
+ * style recalculation, and this runs during page setup. One read is taken for
37
+ * the whole batch, not one per token.
38
+ */
39
+
40
+ const THEME_DEBUG_KEY = exports.THEME_DEBUG_KEY = 'web5_debug_theme';
41
+
42
+ /** Query param that forces theme tracing on, overriding localStorage. */
43
+ const THEME_DEBUG_QUERY_PARAM = exports.THEME_DEBUG_QUERY_PARAM = 'web5DebugTheme';
44
+ const LOG_PREFIX = '[web5:theme]';
45
+ const isTruthy = value => value === '1' || value === 'true';
46
+ let cached = null;
47
+
48
+ /** Whether theme tracing is enabled. Memoized — resolved once per page load. */
49
+ const isThemeDebugEnabled = () => {
50
+ if (cached !== null) {
51
+ return cached;
52
+ }
53
+ cached = false;
54
+ try {
55
+ if (isTruthy(new URLSearchParams(window.location.search).get(THEME_DEBUG_QUERY_PARAM))) {
56
+ cached = true;
57
+ return cached;
58
+ }
59
+ } catch {
60
+ // window / URLSearchParams unavailable (SSR, non-DOM environments).
61
+ }
62
+ try {
63
+ cached = isTruthy(localStorage.getItem(THEME_DEBUG_KEY));
64
+ } catch {
65
+ // localStorage can throw in privacy mode / non-DOM environments.
66
+ }
67
+ return cached;
68
+ };
69
+
70
+ /** Test seam — the flag is memoized for the page, so tests must be able to clear it. */
71
+ exports.isThemeDebugEnabled = isThemeDebugEnabled;
72
+ const resetThemeDebugCache = () => {
73
+ cached = null;
74
+ };
75
+ exports.resetThemeDebugCache = resetThemeDebugCache;
76
+ /**
77
+ * Report what each override did, after the rule is live.
78
+ *
79
+ * `applied` is what `applyThemeOverrides` actually wrote — already filtered for
80
+ * key shape, so anything malformed has been dropped and warned about before
81
+ * reaching here.
82
+ */
83
+ function traceThemeOverrides(applied) {
84
+ if (!isThemeDebugEnabled()) {
85
+ return;
86
+ }
87
+ if (applied.length === 0) {
88
+ // Silence here would be indistinguishable from tracing being broken, and
89
+ // "no overrides reached the page" is itself the answer often enough — a
90
+ // store with nothing imported means every token is the template's.
91
+ // eslint-disable-next-line no-console
92
+ console.info(`${LOG_PREFIX} no overrides applied — nothing usable arrived for this store, so every token is whatever the template and core defaults say`);
93
+ return;
94
+ }
95
+ let mount = null;
96
+ try {
97
+ mount = document.querySelector(_hostScope.WEB5_SCOPES.join(','));
98
+ } catch {
99
+ // Malformed selector cannot happen with the constant, but querySelector is
100
+ // the one call here that can throw, and a debug aid must never be the thing
101
+ // that breaks a page.
102
+ }
103
+ if (!mount) {
104
+ console.warn(`${LOG_PREFIX} no mount found (${_hostScope.WEB5_SCOPES.join(', ')}) — tokens were written, but their resolved values cannot be read`);
105
+ return;
106
+ }
107
+
108
+ // One computed-style read for the whole batch: the expensive part is the style
109
+ // recalculation it forces, not the per-property lookups off the result.
110
+ const computed = getComputedStyle(mount);
111
+ const rows = applied.map(([token, value]) => {
112
+ const bucket = (0, _tokenContract.bucketOf)(token);
113
+ const target = bucket === 'brand' ? token : (0, _tokenContract.hostAliasFor)(token);
114
+ const resolved = computed.getPropertyValue(token).trim();
115
+ const wanted = value.trim();
116
+ return {
117
+ token,
118
+ bucket,
119
+ 'written as': target,
120
+ 'store said': wanted,
121
+ 'resolves to': resolved || '(nothing reads it)',
122
+ winner: !resolved ? 'NOBODY — no stylesheet consumes this token' : resolved === wanted ? 'STORE' : 'TEMPLATE'
123
+ };
124
+ });
125
+ const overridden = rows.filter(r => r.winner === 'TEMPLATE').length;
126
+ const inert = rows.filter(r => r.winner.startsWith('NOBODY')).length;
127
+
128
+ /* eslint-disable no-console */
129
+ console.groupCollapsed(`${LOG_PREFIX} ${rows.length} override(s) applied · ${overridden} kept by the template · ${inert} inert`);
130
+ console.table(rows);
131
+ if (inert > 0) {
132
+ console.info(`${LOG_PREFIX} "inert" means the value was written but no stylesheet reads that token — ` + `for a host token that means core has no \`var(--web5-host-…)\` wiring for it yet.`);
133
+ }
134
+ console.info(`${LOG_PREFIX} the marker <style data-web5-theme-overrides> looks empty in DevTools on purpose: ` + `rules are inserted through the CSSOM, never as text. Read them with ` + `document.querySelector('style[data-web5-theme-overrides]').sheet.cssRules[0].cssText`);
135
+ console.groupEnd();
136
+ /* eslint-enable no-console */
137
+ }
138
+ //# sourceMappingURL=themeDebug.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_hostScope","require","_tokenContract","THEME_DEBUG_KEY","exports","THEME_DEBUG_QUERY_PARAM","LOG_PREFIX","isTruthy","value","cached","isThemeDebugEnabled","URLSearchParams","window","location","search","get","localStorage","getItem","resetThemeDebugCache","traceThemeOverrides","applied","length","console","info","mount","document","querySelector","WEB5_SCOPES","join","warn","computed","getComputedStyle","rows","map","token","bucket","bucketOf","target","hostAliasFor","resolved","getPropertyValue","trim","wanted","winner","overridden","filter","r","inert","startsWith","groupCollapsed","table","groupEnd"],"sources":["../../../src/client/themeDebug.ts"],"sourcesContent":["/**\n * Theme-override tracing (debug-only).\n *\n * Answers the one question the token pipeline cannot otherwise be asked:\n * **which layer actually won?**\n *\n * Since DL #193 a `brand` token is written as itself and everything else as its\n * `--web5-host-*` alias, which core's stylesheets consume as a `var()` fallback\n * a template can beat. That makes the outcome a cascade decision, and a cascade\n * decision is invisible — there is no callback, no return value, and nothing in\n * the DOM to read. Worse, `applyThemeOverrides` writes through the CSSOM\n * (`insertRule` + `setProperty`, never `textContent`) so that a hostile value\n * can never terminate a declaration, which means DevTools renders the marker as\n * `<style data-web5-theme-overrides=\"\">` — an empty tag, with the rules real but\n * nowhere in the DOM tree. Every part of that is deliberate and every part of it\n * looks broken.\n *\n * So this reads the resolved value back off the mount **after** the rule is in,\n * and reports what the browser actually decided:\n *\n * [web5:theme] --radius host wrote --web5-host-radius=0rem → 1.25rem TEMPLATE\n * [web5:theme] --primary brand wrote --primary=0 0% 9% → 0 0% 9% STORE\n *\n * Off by default. Enable with `?web5DebugTheme=1` (one-shot, wins over storage)\n * or `localStorage[\"web5_debug_theme\"] = \"1\"` (sticky) — the same shape as\n * `matchDebug`, so there is one convention to learn rather than two.\n *\n * It is gated rather than always-on because reading a computed value forces a\n * style recalculation, and this runs during page setup. One read is taken for\n * the whole batch, not one per token.\n */\nimport { WEB5_SCOPES } from '../hostScope';\nimport { bucketOf, hostAliasFor } from '../theme/tokenContract';\n\nexport const THEME_DEBUG_KEY = 'web5_debug_theme';\n\n/** Query param that forces theme tracing on, overriding localStorage. */\nexport const THEME_DEBUG_QUERY_PARAM = 'web5DebugTheme';\n\nconst LOG_PREFIX = '[web5:theme]';\n\nconst isTruthy = (value: unknown): boolean => value === '1' || value === 'true';\n\nlet cached: boolean | null = null;\n\n/** Whether theme tracing is enabled. Memoized — resolved once per page load. */\nexport const isThemeDebugEnabled = (): boolean => {\n if (cached !== null) {\n return cached;\n }\n cached = false;\n try {\n if (\n isTruthy(\n new URLSearchParams(window.location.search).get(\n THEME_DEBUG_QUERY_PARAM,\n ),\n )\n ) {\n cached = true;\n return cached;\n }\n } catch {\n // window / URLSearchParams unavailable (SSR, non-DOM environments).\n }\n try {\n cached = isTruthy(localStorage.getItem(THEME_DEBUG_KEY));\n } catch {\n // localStorage can throw in privacy mode / non-DOM environments.\n }\n return cached;\n};\n\n/** Test seam — the flag is memoized for the page, so tests must be able to clear it. */\nexport const resetThemeDebugCache = (): void => {\n cached = null;\n};\n\ninterface TraceRow {\n token: string;\n bucket: string;\n 'written as': string;\n 'store said': string;\n 'resolves to': string;\n winner: string;\n}\n\n/**\n * Report what each override did, after the rule is live.\n *\n * `applied` is what `applyThemeOverrides` actually wrote — already filtered for\n * key shape, so anything malformed has been dropped and warned about before\n * reaching here.\n */\nexport function traceThemeOverrides(applied: [string, string][]): void {\n if (!isThemeDebugEnabled()) {\n return;\n }\n if (applied.length === 0) {\n // Silence here would be indistinguishable from tracing being broken, and\n // \"no overrides reached the page\" is itself the answer often enough — a\n // store with nothing imported means every token is the template's.\n // eslint-disable-next-line no-console\n console.info(\n `${LOG_PREFIX} no overrides applied — nothing usable arrived for this store, so every token is whatever the template and core defaults say`,\n );\n return;\n }\n let mount: Element | null = null;\n try {\n mount = document.querySelector(WEB5_SCOPES.join(','));\n } catch {\n // Malformed selector cannot happen with the constant, but querySelector is\n // the one call here that can throw, and a debug aid must never be the thing\n // that breaks a page.\n }\n if (!mount) {\n console.warn(\n `${LOG_PREFIX} no mount found (${WEB5_SCOPES.join(\n ', ',\n )}) — tokens were written, but their resolved values cannot be read`,\n );\n return;\n }\n\n // One computed-style read for the whole batch: the expensive part is the style\n // recalculation it forces, not the per-property lookups off the result.\n const computed = getComputedStyle(mount);\n const rows: TraceRow[] = applied.map(([token, value]) => {\n const bucket = bucketOf(token);\n const target = bucket === 'brand' ? token : hostAliasFor(token);\n const resolved = computed.getPropertyValue(token).trim();\n const wanted = value.trim();\n return {\n token,\n bucket,\n 'written as': target,\n 'store said': wanted,\n 'resolves to': resolved || '(nothing reads it)',\n winner: !resolved\n ? 'NOBODY — no stylesheet consumes this token'\n : resolved === wanted\n ? 'STORE'\n : 'TEMPLATE',\n };\n });\n\n const overridden = rows.filter((r) => r.winner === 'TEMPLATE').length;\n const inert = rows.filter((r) => r.winner.startsWith('NOBODY')).length;\n\n /* eslint-disable no-console */\n console.groupCollapsed(\n `${LOG_PREFIX} ${rows.length} override(s) applied · ${overridden} kept by the template · ${inert} inert`,\n );\n console.table(rows);\n if (inert > 0) {\n console.info(\n `${LOG_PREFIX} \"inert\" means the value was written but no stylesheet reads that token — ` +\n `for a host token that means core has no \\`var(--web5-host-…)\\` wiring for it yet.`,\n );\n }\n console.info(\n `${LOG_PREFIX} the marker <style data-web5-theme-overrides> looks empty in DevTools on purpose: ` +\n `rules are inserted through the CSSOM, never as text. Read them with ` +\n `document.querySelector('style[data-web5-theme-overrides]').sheet.cssRules[0].cssText`,\n );\n console.groupEnd();\n /* eslint-enable no-console */\n}\n"],"mappings":";;;;;AA+BA,IAAAA,UAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAhCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIO,MAAME,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG,kBAAkB;;AAEjD;AACO,MAAME,uBAAuB,GAAAD,OAAA,CAAAC,uBAAA,GAAG,gBAAgB;AAEvD,MAAMC,UAAU,GAAG,cAAc;AAEjC,MAAMC,QAAQ,GAAIC,KAAc,IAAcA,KAAK,KAAK,GAAG,IAAIA,KAAK,KAAK,MAAM;AAE/E,IAAIC,MAAsB,GAAG,IAAI;;AAEjC;AACO,MAAMC,mBAAmB,GAAGA,CAAA,KAAe;EAChD,IAAID,MAAM,KAAK,IAAI,EAAE;IACnB,OAAOA,MAAM;EACf;EACAA,MAAM,GAAG,KAAK;EACd,IAAI;IACF,IACEF,QAAQ,CACN,IAAII,eAAe,CAACC,MAAM,CAACC,QAAQ,CAACC,MAAM,CAAC,CAACC,GAAG,CAC7CV,uBACF,CACF,CAAC,EACD;MACAI,MAAM,GAAG,IAAI;MACb,OAAOA,MAAM;IACf;EACF,CAAC,CAAC,MAAM;IACN;EAAA;EAEF,IAAI;IACFA,MAAM,GAAGF,QAAQ,CAACS,YAAY,CAACC,OAAO,CAACd,eAAe,CAAC,CAAC;EAC1D,CAAC,CAAC,MAAM;IACN;EAAA;E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AACiC,IAAI,CAAC,CAAC;IAC3B,OAAO;MACLP,KAAK;MACLC,MAAM;MACN,YAAY,EAAEE,MAAM;MACpB,YAAY,EAAEK,MAAM;MACpB,aAAa,EAAEH,QAAQ,IAAI,oBAAoB;MAC/CI,MAAM,EAAE,CAACJ,QAAQ,GACb,4CAA4C,GAC5CA,QAAQ,KAAKG,MAAM,GACnB,OAAO,GACP;IACN,CAAC;EACH,CAAC,CAAC;EAEF,MAAME,UAAU,GAAGZ,IAAI,CAACa,MAAM,CAAEC,CAAC,IAAKA,CAAC,CAACH,MAAM,KAAK,UAAU,CAAC,CAACtB,MAAM;EACrE,MAAM0B,KAAK,GAAGf,IAAI,CAACa,MAAM,CAAEC,CAAC,IAAKA,CAAC,CAACH,MAAM,CAACK,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC3B,MAAM;;EAEtE;EACAC,OAAO,CAAC2B,cAAc,CACpB,GAAG3C,UAAU,IAAI0B,IAAI,CAACX,MAAM,0BAA0BuB,UAAU,2BAA2BG,KAAK,QAClG,CAAC;EACDzB,OAAO,CAAC4B,KAAK,CAAClB,IAAI,CAAC;EACnB,IAAIe,KAAK,GAAG,CAAC,EAAE;IACbzB,OAAO,CAACC,IAAI,CACV,GAAGjB,UAAU,4EAA4E,GACvF,mFACJ,CAAC;EACH;EACAgB,OAAO,CAACC,IAAI,CACV,GAAGjB,UAAU,oFAAoF,GAC/F,sEAAsE,GACtE,sFACJ,CAAC;EACDgB,OAAO,CAAC6B,QAAQ,CAAC,CAAC;EAClB;AACF","ignoreList":[]}
package/dist/cjs/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
 
3
3
  exports.__esModule = true;
4
- exports.computeContentBBox = 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 = 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.TOKEN_NAME_PATTERN = exports.THEME_TOKEN_CONTRACT = 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.BRAND_TOKENS = exports.BACKEND_ENVIRONMENT_QUERY_PARAM = exports.BACKEND_ENVIRONMENT_KEY = exports.ARTICLE_BY_HANDLE_QUERY = void 0;
5
- 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.hostAliasFor = 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 = exports.createFeatureToggleReader = exports.createErrorMarkdown = exports.convertToBlockElementsWithMapping = exports.convertToBlockElements = 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 = exports.resolveClientBundleUrl = exports.resetMatchDebugCache = exports.resetChatIdForTests = exports.registerEntityExtractor = exports.readProductBackHandoff = void 0;
4
+ 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 = 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.TOKEN_NAME_PATTERN = exports.THEME_TOKEN_CONTRACT = exports.THEME_OVERRIDE_TOKENS = exports.THEME_DEBUG_QUERY_PARAM = exports.THEME_DEBUG_KEY = exports.TEMPLATES_MANIFEST_URL = exports.TEMPLATES_CDN_BASE = exports.SmartIcon = exports.SkipNodesSectionDefinition = exports.ShopifyStorefrontClient = exports.SectionSkeleton = exports.SearchSectionDefinition = exports.SearchSection = exports.STREAMING_TIMEOUT_MS = exports.REFRESH_PROMPTS_WINDOW_MS = exports.REFRESH_PROMPTS_UNTIL_KEY = exports.PromptEntryEmptyState = exports.PlacementSmoothHeight = exports.PlacementResponseRenderer = exports.PlacementPayloadProvider = exports.PlacementLoader = exports.PRODUCT_BY_HANDLE_QUERY = exports.PRODUCT_BACK_SESSION_KEY = exports.OptimizedImage = exports.NextStepsSectionDefinition = exports.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.BRAND_TOKENS = exports.BACKEND_ENVIRONMENT_QUERY_PARAM = exports.BACKEND_ENVIRONMENT_KEY = exports.ARTICLE_BY_HANDLE_QUERY = void 0;
5
+ 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.isThemeDebugEnabled = exports.isTemplatePickerRequested = exports.isNavigableUrl = exports.isMatchDebugEnabled = exports.isLegacyUrl = exports.isHtmlComment = exports.isEntityLink = exports.hslToRgb = exports.hostAliasFor = 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 = exports.createFeatureToggleReader = exports.createErrorMarkdown = exports.convertToBlockElementsWithMapping = exports.convertToBlockElements = exports.computeContentBBox = exports.cn = 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 = exports.resolveClientBundleUrl = exports.resetMatchDebugCache = exports.resetChatIdForTests = exports.registerEntityExtractor = exports.readProductBackHandoff = exports.pushToForwardStack = exports.pushPromptSubmit = exports.pushLinkClick = void 0;
7
7
  var _clients = require("./clients");
8
8
  exports.CLIENT_IDS = _clients.CLIENT_IDS;
9
9
  exports.EXPERIMENT_IDS = _clients.EXPERIMENT_IDS;
@@ -260,6 +260,10 @@ exports.BRAND_TOKENS = _tokenContract.BRAND_TOKENS;
260
260
  exports.TOKEN_NAME_PATTERN = _tokenContract.TOKEN_NAME_PATTERN;
261
261
  exports.bucketOf = _tokenContract.bucketOf;
262
262
  exports.hostAliasFor = _tokenContract.hostAliasFor;
263
+ var _themeDebug = require("./client/themeDebug");
264
+ exports.isThemeDebugEnabled = _themeDebug.isThemeDebugEnabled;
265
+ exports.THEME_DEBUG_KEY = _themeDebug.THEME_DEBUG_KEY;
266
+ exports.THEME_DEBUG_QUERY_PARAM = _themeDebug.THEME_DEBUG_QUERY_PARAM;
263
267
  var _PlacementResponseRenderer = require("./components/placement/PlacementResponseRenderer");
264
268
  exports.PlacementResponseRenderer = _PlacementResponseRenderer.PlacementResponseRenderer;
265
269
  exports.PlacementSmoothHeight = _PlacementResponseRenderer.PlacementSmoothHeight;
@@ -1 +1 @@
1
- {"version":3,"names":["_clients","require","exports","CLIENT_IDS","EXPERIMENT_IDS","_FeatureToggleContext","createFeatureToggleReader","FeatureToggleProvider","useFeatureToggles","useFeatureToggle","_parts","getPartsByType","getPartByRole","getAllByRole","getHeading","getImages","getLinks","extractContent","extractContentMarkdown","deriveRole","_sectionDefinition","DROP_SECTION","_diagnosticTypes","DIAGNOSTIC_TYPES","_imageSearchFilterTypes","buildImageSearchFilter","_imageSearchFilters","ImageSearchFilterToken","backgroundFilter","_componentDefinitions","HeroSectionDefinition","HeroEntitySectionDefinition","KpiSectionDefinition","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","_tokenContract","THEME_TOKEN_CONTRACT","BRAND_TOKENS","TOKEN_NAME_PATTERN","bucketOf","hostAliasFor","_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';\nexport {\n THEME_TOKEN_CONTRACT,\n BRAND_TOKENS,\n TOKEN_NAME_PATTERN,\n bucketOf,\n hostAliasFor,\n type TokenBucket,\n type TokenContractEntry,\n type TokenType,\n} from './theme/tokenContract';\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,cAA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M,aAAA;AAC5B,IAAAC,aAAA,GAAAzT,OAAA;AAA2DC,OAAA,CAAAyT,kBAAA,GAAAD,aAAA,CAAAC,kBAAA;AAC3D,IAAAC,eAAA,GAAA3T,OAAA;AAOgCC,OAAA,CAAA2T,oBAAA,GAAAD,eAAA,CAAAC,oBAAA;AAAA3T,OAAA,CAAA4T,YAAA,GAAAF,eAAA,CAAAE,YAAA;AAAA5T,OAAA,CAAA6T,SAAA,GAAAH,eAAA,CAAAG,SAAA;AAAA7T,OAAA,CAAA8T,cAAA,GAAAJ,eAAA,CAAAI,cAAA;AAAA9T,OAAA,CAAA+T,SAAA,GAAAL,eAAA,CAAAK,SAAA;AAAA/T,OAAA,CAAAgU,mBAAA,GAAAN,eAAA,CAAAM,mBAAA;AAGhC,IAAAC,gBAAA,GAAAlU,OAAA;AAQqCC,OAAA,CAAAkU,yBAAA,GAAAD,gBAAA,CAAAC,yBAAA;AAAAlU,OAAA,CAAAmU,iBAAA,GAAAF,gBAAA,CAAAE,iBAAA;AAAAnU,OAAA,CAAAoU,iCAAA,GAAAH,gBAAA,CAAAG,iCAAA;AASrC,IAAAC,UAAA,GAAAtU,OAAA;AAOqBC,OAAA,CAAAsU,YAAA,GAAAD,UAAA,CAAAC,YAAA;AAAAtU,OAAA,CAAAuU,eAAA,GAAAF,UAAA,CAAAE,eAAA;AAAAvU,OAAA,CAAAwU,WAAA,GAAAH,UAAA,CAAAG,WAAA;AAAAxU,OAAA,CAAAyU,UAAA,GAAAJ,UAAA,CAAAI,UAAA;AAAAzU,OAAA,CAAA0U,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","_tokenContract","THEME_TOKEN_CONTRACT","BRAND_TOKENS","TOKEN_NAME_PATTERN","bucketOf","hostAliasFor","_themeDebug","isThemeDebugEnabled","THEME_DEBUG_KEY","THEME_DEBUG_QUERY_PARAM","_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';\nexport {\n THEME_TOKEN_CONTRACT,\n BRAND_TOKENS,\n TOKEN_NAME_PATTERN,\n bucketOf,\n hostAliasFor,\n type TokenBucket,\n type TokenContractEntry,\n type TokenType,\n} from './theme/tokenContract';\nexport {\n isThemeDebugEnabled,\n THEME_DEBUG_KEY,\n THEME_DEBUG_QUERY_PARAM,\n} from './client/themeDebug';\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,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../hostScope.js';
38
+ import { traceThemeOverrides } from './themeDebug.js';
38
39
  import { THEME_TOKEN_CONTRACT, bucketOf, hostAliasFor } from '../theme/tokenContract.js';
39
40
 
40
41
  /** A themeOverrides key: always a CSS custom property. */
@@ -61,7 +62,9 @@ export const THEME_OVERRIDE_TOKENS = new Set(Object.keys(THEME_TOKEN_CONTRACT));
61
62
  const KEY_PATTERN = /^--[a-z][a-z0-9-]{0,62}$/;
62
63
  const MARKER_ATTR = 'data-web5-theme-overrides';
63
64
  export function applyThemeOverrides(overrides) {
64
- if (typeof document === 'undefined') return;
65
+ if (typeof document === 'undefined') {
66
+ return;
67
+ }
65
68
  const existing = document.head.querySelector(`style[${MARKER_ATTR}]`);
66
69
  const entries = Object.entries(overrides ?? {}).filter(_ref => {
67
70
  let [key] = _ref;
@@ -73,6 +76,10 @@ export function applyThemeOverrides(overrides) {
73
76
  });
74
77
  if (entries.length === 0) {
75
78
  existing == null || existing.remove();
79
+ // Nothing to apply is itself a traceable answer: it means every token on
80
+ // the page is the template's, which is otherwise indistinguishable from
81
+ // tracing having failed.
82
+ traceThemeOverrides([]);
76
83
  return;
77
84
  }
78
85
  const style = document.createElement('style');
@@ -85,6 +92,7 @@ export function applyThemeOverrides(overrides) {
85
92
  }
86
93
  sheet.insertRule(`${WEB5_SCOPE} {}`, 0);
87
94
  const rule = sheet.cssRules[0];
95
+ const applied = [];
88
96
  for (const [key, value] of entries) {
89
97
  // Brand wins over the template, so it is written as the token the
90
98
  // stylesheets actually read. Everything else lands in the host namespace,
@@ -92,6 +100,7 @@ export function applyThemeOverrides(overrides) {
92
100
  const target = bucketOf(key) === 'brand' ? key : hostAliasFor(key);
93
101
  try {
94
102
  rule.style.setProperty(target, value);
103
+ applied.push([key, value]);
95
104
  } catch {
96
105
  // An engine that rejects the value leaves the token at its baked
97
106
  // default — degraded theming, never broken CSS.
@@ -100,5 +109,8 @@ export function applyThemeOverrides(overrides) {
100
109
  // Replace-on-reapply: the fresh element is appended (so it stays last in
101
110
  // document order) before the stale one is dropped.
102
111
  existing == null || existing.remove();
112
+ // AFTER the stale element is gone, so the resolved values traced below are
113
+ // the ones the page will actually render. Off unless explicitly enabled.
114
+ traceThemeOverrides(applied);
103
115
  }
104
116
  //# sourceMappingURL=applyThemeOverrides.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["WEB5_SCOPE","THEME_TOKEN_CONTRACT","bucketOf","hostAliasFor","THEME_OVERRIDE_TOKENS","Set","Object","keys","KEY_PATTERN","MARKER_ATTR","applyThemeOverrides","overrides","document","existing","head","querySelector","entries","filter","_ref","key","wellFormed","test","console","warn","length","remove","style","createElement","setAttribute","appendChild","sheet","insertRule","rule","cssRules","value","target","setProperty"],"sources":["../../../src/client/applyThemeOverrides.ts"],"sourcesContent":["/**\n * Runtime theme token injection (DL #131).\n *\n * `Configuration.themeOverrides` carries per-store CSS custom-property\n * overrides (`--primary`, `--radius`, `--heading`, ...) computed from the\n * store's own theme (e.g. the Shopify `settings_data.json` extractor). This\n * applies them to the page so they win over the bundle's baked `theme.css`:\n *\n * - **Scoped, not `:root`**: the rule targets `WEB5_SCOPE`, the same\n * `:is(#root, .w5-root, [data-web5-placement], .debug-view)` selector every\n * compiled bundle stylesheet uses — host-page styling is never touched, and\n * equal specificity + later document order makes the override win. Callers\n * must therefore apply AFTER the client bundle's CSS is in the document.\n * - **Bucketed, since DL #193**: a `brand` token (colour roles, font families)\n * is written as itself, so the store's identity beats the template's. Every\n * other key — `host` tokens and anything the contract has never heard of —\n * is written as its `--web5-host-*` alias, which core's stylesheets consume\n * as a `var()` fallback. A template stating the real token therefore wins on\n * shape, and an unknown key is inert rather than dangerous: a custom property\n * nothing references renders nothing, so an adapter that learns to read a new\n * token cannot silently override a template.\n * - **The token set stays open, but the destination changed.** Before DL #193\n * an unrecognised key was applied verbatim, so a template could consume\n * `var(--foo)` and grow a token with no release. It now arrives as\n * `--web5-host-foo`, so the template consumes `var(--web5-host-foo, <default>)`\n * instead. One line different, and the provenance is explicit — the wiring\n * line is what activates a host token, not the contract entry.\n * - The mandatory `--` prefix means an override can only define custom\n * properties — it can never set a real CSS property inside the scope. The\n * server enforces the same shape (plus value sanitation) at write time.\n * - **Values are inert**: entries are written with\n * `CSSStyleDeclaration.setProperty`, never string-concatenated into CSS, so\n * a hostile value cannot terminate the declaration or open a new rule.\n * - **Idempotent**: one marker element per document, replaced wholesale on\n * re-apply; empty/absent input removes it.\n */\nimport { WEB5_SCOPE } from '../hostScope';\nimport {\n THEME_TOKEN_CONTRACT,\n bucketOf,\n hostAliasFor,\n} from '../theme/tokenContract';\n\n/** A themeOverrides key: always a CSS custom property. */\nexport type ThemeOverrideKey = `--${string}`;\n\n/**\n * Writer-side shape for a theme override map. The catalog below documents\n * the tokens the seed consumes today; the type stays open so new tokens\n * flow end-to-end with no release anywhere but the seed.\n */\nexport type ThemeOverrides = Record<ThemeOverrideKey, string>;\n\n/**\n * The known token catalog. GUIDANCE, NOT A GATE — `applyThemeOverrides` still\n * applies any well-formed custom property, so the vocabulary can grow without a\n * release here.\n *\n * Derived from `@wix/web5-token-contract` rather than restated, because two\n * hand-maintained copies of one list is how they drift. The contract also\n * carries what this Set cannot: which bucket each token is in, and therefore\n * who wins when a store and a template disagree.\n */\nexport const THEME_OVERRIDE_TOKENS: ReadonlySet<string> = new Set(\n Object.keys(THEME_TOKEN_CONTRACT),\n);\n\n/** Mirrors the server's Consts.ThemeOverrideKeyPattern. */\nconst KEY_PATTERN = /^--[a-z][a-z0-9-]{0,62}$/;\n\nconst MARKER_ATTR = 'data-web5-theme-overrides';\n\nexport function applyThemeOverrides(\n overrides?: Record<string, string> | null,\n): void {\n if (typeof document === 'undefined') return;\n\n const existing = document.head.querySelector(`style[${MARKER_ATTR}]`);\n const entries = Object.entries(overrides ?? {}).filter(([key]) => {\n const wellFormed = KEY_PATTERN.test(key);\n if (!wellFormed) {\n console.warn(`[web5-theme] Skipping malformed theme override key: ${key}`);\n }\n return wellFormed;\n });\n\n if (entries.length === 0) {\n existing?.remove();\n return;\n }\n\n const style = document.createElement('style');\n style.setAttribute(MARKER_ATTR, '');\n document.head.appendChild(style);\n const sheet = style.sheet;\n if (!sheet) {\n style.remove();\n return;\n }\n sheet.insertRule(`${WEB5_SCOPE} {}`, 0);\n const rule = sheet.cssRules[0] as CSSStyleRule;\n for (const [key, value] of entries) {\n // Brand wins over the template, so it is written as the token the\n // stylesheets actually read. Everything else lands in the host namespace,\n // where core consumes it only as a fallback the template can beat.\n const target = bucketOf(key) === 'brand' ? key : hostAliasFor(key);\n try {\n rule.style.setProperty(target, value);\n } catch {\n // An engine that rejects the value leaves the token at its baked\n // default — degraded theming, never broken CSS.\n }\n }\n // Replace-on-reapply: the fresh element is appended (so it stays last in\n // document order) before the stale one is dropped.\n existing?.remove();\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,cAAc;AACzC,SACEC,oBAAoB,EACpBC,QAAQ,EACRC,YAAY,QACP,wBAAwB;;AAE/B;;AAGA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAA0C,GAAG,IAAIC,GAAG,CAC/DC,MAAM,CAACC,IAAI,CAACN,oBAAoB,CAClC,CAAC;;AAED;AACA,MAAMO,WAAW,GAAG,0BAA0B;AAE9C,MAAMC,WAAW,GAAG,2BAA2B;AAE/C,OAAO,SAASC,mBAAmBA,CACjCC,SAAyC,EACnC;EACN,IAAI,OAAOC,QAAQ,KAAK,WAAW,EAAE;EAErC,MAAMC,QAAQ,GAAGD,QAAQ,CAACE,IAAI,CAACC,aAAa,CAAC,SAASN,WAAW,GAAG,CAAC;EACrE,MAAMO,OAAO,GAAGV,MAAM,CAACU,O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AM,CAAC,CAAC;AACpB","ignoreList":[]}
1
+ {"version":3,"names":["WEB5_SCOPE","traceThemeOverrides","THEME_TOKEN_CONTRACT","bucketOf","hostAliasFor","THEME_OVERRIDE_TOKENS","Set","Object","keys","KEY_PATTERN","MARKER_ATTR","applyThemeOverrides","overrides","document","existing","head","querySelector","entries","filter","_ref","key","wellFormed","test","console","warn","length","remove","style","createElement","setAttribute","appendChild","sheet","insertRule","rule","cssRules","applied","value","target","setProperty","push"],"sources":["../../../src/client/applyThemeOverrides.ts"],"sourcesContent":["/**\n * Runtime theme token injection (DL #131).\n *\n * `Configuration.themeOverrides` carries per-store CSS custom-property\n * overrides (`--primary`, `--radius`, `--heading`, ...) computed from the\n * store's own theme (e.g. the Shopify `settings_data.json` extractor). This\n * applies them to the page so they win over the bundle's baked `theme.css`:\n *\n * - **Scoped, not `:root`**: the rule targets `WEB5_SCOPE`, the same\n * `:is(#root, .w5-root, [data-web5-placement], .debug-view)` selector every\n * compiled bundle stylesheet uses — host-page styling is never touched, and\n * equal specificity + later document order makes the override win. Callers\n * must therefore apply AFTER the client bundle's CSS is in the document.\n * - **Bucketed, since DL #193**: a `brand` token (colour roles, font families)\n * is written as itself, so the store's identity beats the template's. Every\n * other key — `host` tokens and anything the contract has never heard of —\n * is written as its `--web5-host-*` alias, which core's stylesheets consume\n * as a `var()` fallback. A template stating the real token therefore wins on\n * shape, and an unknown key is inert rather than dangerous: a custom property\n * nothing references renders nothing, so an adapter that learns to read a new\n * token cannot silently override a template.\n * - **The token set stays open, but the destination changed.** Before DL #193\n * an unrecognised key was applied verbatim, so a template could consume\n * `var(--foo)` and grow a token with no release. It now arrives as\n * `--web5-host-foo`, so the template consumes `var(--web5-host-foo, <default>)`\n * instead. One line different, and the provenance is explicit — the wiring\n * line is what activates a host token, not the contract entry.\n * - The mandatory `--` prefix means an override can only define custom\n * properties — it can never set a real CSS property inside the scope. The\n * server enforces the same shape (plus value sanitation) at write time.\n * - **Values are inert**: entries are written with\n * `CSSStyleDeclaration.setProperty`, never string-concatenated into CSS, so\n * a hostile value cannot terminate the declaration or open a new rule.\n * - **Idempotent**: one marker element per document, replaced wholesale on\n * re-apply; empty/absent input removes it.\n */\nimport { WEB5_SCOPE } from '../hostScope';\nimport { traceThemeOverrides } from './themeDebug';\nimport {\n THEME_TOKEN_CONTRACT,\n bucketOf,\n hostAliasFor,\n} from '../theme/tokenContract';\n\n/** A themeOverrides key: always a CSS custom property. */\nexport type ThemeOverrideKey = `--${string}`;\n\n/**\n * Writer-side shape for a theme override map. The catalog below documents\n * the tokens the seed consumes today; the type stays open so new tokens\n * flow end-to-end with no release anywhere but the seed.\n */\nexport type ThemeOverrides = Record<ThemeOverrideKey, string>;\n\n/**\n * The known token catalog. GUIDANCE, NOT A GATE — `applyThemeOverrides` still\n * applies any well-formed custom property, so the vocabulary can grow without a\n * release here.\n *\n * Derived from `@wix/web5-token-contract` rather than restated, because two\n * hand-maintained copies of one list is how they drift. The contract also\n * carries what this Set cannot: which bucket each token is in, and therefore\n * who wins when a store and a template disagree.\n */\nexport const THEME_OVERRIDE_TOKENS: ReadonlySet<string> = new Set(\n Object.keys(THEME_TOKEN_CONTRACT),\n);\n\n/** Mirrors the server's Consts.ThemeOverrideKeyPattern. */\nconst KEY_PATTERN = /^--[a-z][a-z0-9-]{0,62}$/;\n\nconst MARKER_ATTR = 'data-web5-theme-overrides';\n\nexport function applyThemeOverrides(\n overrides?: Record<string, string> | null,\n): void {\n if (typeof document === 'undefined') {\n return;\n }\n\n const existing = document.head.querySelector(`style[${MARKER_ATTR}]`);\n const entries = Object.entries(overrides ?? {}).filter(([key]) => {\n const wellFormed = KEY_PATTERN.test(key);\n if (!wellFormed) {\n console.warn(\n `[web5-theme] Skipping malformed theme override key: ${key}`,\n );\n }\n return wellFormed;\n });\n\n if (entries.length === 0) {\n existing?.remove();\n // Nothing to apply is itself a traceable answer: it means every token on\n // the page is the template's, which is otherwise indistinguishable from\n // tracing having failed.\n traceThemeOverrides([]);\n return;\n }\n\n const style = document.createElement('style');\n style.setAttribute(MARKER_ATTR, '');\n document.head.appendChild(style);\n const sheet = style.sheet;\n if (!sheet) {\n style.remove();\n return;\n }\n sheet.insertRule(`${WEB5_SCOPE} {}`, 0);\n const rule = sheet.cssRules[0] as CSSStyleRule;\n const applied: [string, string][] = [];\n for (const [key, value] of entries) {\n // Brand wins over the template, so it is written as the token the\n // stylesheets actually read. Everything else lands in the host namespace,\n // where core consumes it only as a fallback the template can beat.\n const target = bucketOf(key) === 'brand' ? key : hostAliasFor(key);\n try {\n rule.style.setProperty(target, value);\n applied.push([key, value]);\n } catch {\n // An engine that rejects the value leaves the token at its baked\n // default — degraded theming, never broken CSS.\n }\n }\n // Replace-on-reapply: the fresh element is appended (so it stays last in\n // document order) before the stale one is dropped.\n existing?.remove();\n // AFTER the stale element is gone, so the resolved values traced below are\n // the ones the page will actually render. Off unless explicitly enabled.\n traceThemeOverrides(applied);\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,UAAU,QAAQ,cAAc;AACzC,SAASC,mBAAmB,QAAQ,cAAc;AAClD,SACEC,oBAAoB,EACpBC,QAAQ,EACRC,YAAY,QACP,wBAAwB;;AAE/B;;AAGA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,qBAA0C,GAAG,IAAIC,GAAG,CAC/DC,MAAM,CAACC,IAAI,CAACN,oBAAoB,CAClC,CAAC;;AAED;AACA,MAAMO,WAAW,GAAG,0BAA0B;AAE9C,MAAMC,WAAW,GAAG,2BAA2B;AAE/C,OAAO,SAASC,mBAAmBA,CACjCC,SAAyC,EACnC;EACN,IAAI,OAAOC,QAAQ,KAAK,WAAW,EA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OAAO,GAAGA,GAAG,GAAGhB,YAAY,CAACgB,GAAG,CAAC;IAClE,IAAI;MACFa,IAAI,CAACN,KAAK,CAACW,WAAW,CAACD,MAAM,EAAED,KAAK,CAAC;MACrCD,OAAO,CAACI,IAAI,CAAC,CAACnB,GAAG,EAAEgB,KAAK,CAAC,CAAC;IAC5B,CAAC,CAAC,MAAM;MACN;MACA;IAAA;EAEJ;EACA;EACA;EACAtB,QAAQ,YAARA,QAAQ,CAAEY,MAAM,CAAC,CAAC;EAClB;EACA;EACAzB,mBAAmB,CAACkC,OAAO,CAAC;AAC9B","ignoreList":[]}
@@ -0,0 +1,131 @@
1
+ /**
2
+ * Theme-override tracing (debug-only).
3
+ *
4
+ * Answers the one question the token pipeline cannot otherwise be asked:
5
+ * **which layer actually won?**
6
+ *
7
+ * Since DL #193 a `brand` token is written as itself and everything else as its
8
+ * `--web5-host-*` alias, which core's stylesheets consume as a `var()` fallback
9
+ * a template can beat. That makes the outcome a cascade decision, and a cascade
10
+ * decision is invisible — there is no callback, no return value, and nothing in
11
+ * the DOM to read. Worse, `applyThemeOverrides` writes through the CSSOM
12
+ * (`insertRule` + `setProperty`, never `textContent`) so that a hostile value
13
+ * can never terminate a declaration, which means DevTools renders the marker as
14
+ * `<style data-web5-theme-overrides="">` — an empty tag, with the rules real but
15
+ * nowhere in the DOM tree. Every part of that is deliberate and every part of it
16
+ * looks broken.
17
+ *
18
+ * So this reads the resolved value back off the mount **after** the rule is in,
19
+ * and reports what the browser actually decided:
20
+ *
21
+ * [web5:theme] --radius host wrote --web5-host-radius=0rem → 1.25rem TEMPLATE
22
+ * [web5:theme] --primary brand wrote --primary=0 0% 9% → 0 0% 9% STORE
23
+ *
24
+ * Off by default. Enable with `?web5DebugTheme=1` (one-shot, wins over storage)
25
+ * or `localStorage["web5_debug_theme"] = "1"` (sticky) — the same shape as
26
+ * `matchDebug`, so there is one convention to learn rather than two.
27
+ *
28
+ * It is gated rather than always-on because reading a computed value forces a
29
+ * style recalculation, and this runs during page setup. One read is taken for
30
+ * the whole batch, not one per token.
31
+ */
32
+ import { WEB5_SCOPES } from '../hostScope.js';
33
+ import { bucketOf, hostAliasFor } from '../theme/tokenContract.js';
34
+ export const THEME_DEBUG_KEY = 'web5_debug_theme';
35
+
36
+ /** Query param that forces theme tracing on, overriding localStorage. */
37
+ export const THEME_DEBUG_QUERY_PARAM = 'web5DebugTheme';
38
+ const LOG_PREFIX = '[web5:theme]';
39
+ const isTruthy = value => value === '1' || value === 'true';
40
+ let cached = null;
41
+
42
+ /** Whether theme tracing is enabled. Memoized — resolved once per page load. */
43
+ export const isThemeDebugEnabled = () => {
44
+ if (cached !== null) {
45
+ return cached;
46
+ }
47
+ cached = false;
48
+ try {
49
+ if (isTruthy(new URLSearchParams(window.location.search).get(THEME_DEBUG_QUERY_PARAM))) {
50
+ cached = true;
51
+ return cached;
52
+ }
53
+ } catch {
54
+ // window / URLSearchParams unavailable (SSR, non-DOM environments).
55
+ }
56
+ try {
57
+ cached = isTruthy(localStorage.getItem(THEME_DEBUG_KEY));
58
+ } catch {
59
+ // localStorage can throw in privacy mode / non-DOM environments.
60
+ }
61
+ return cached;
62
+ };
63
+
64
+ /** Test seam — the flag is memoized for the page, so tests must be able to clear it. */
65
+ export const resetThemeDebugCache = () => {
66
+ cached = null;
67
+ };
68
+ /**
69
+ * Report what each override did, after the rule is live.
70
+ *
71
+ * `applied` is what `applyThemeOverrides` actually wrote — already filtered for
72
+ * key shape, so anything malformed has been dropped and warned about before
73
+ * reaching here.
74
+ */
75
+ export function traceThemeOverrides(applied) {
76
+ if (!isThemeDebugEnabled()) {
77
+ return;
78
+ }
79
+ if (applied.length === 0) {
80
+ // Silence here would be indistinguishable from tracing being broken, and
81
+ // "no overrides reached the page" is itself the answer often enough — a
82
+ // store with nothing imported means every token is the template's.
83
+ // eslint-disable-next-line no-console
84
+ console.info(`${LOG_PREFIX} no overrides applied — nothing usable arrived for this store, so every token is whatever the template and core defaults say`);
85
+ return;
86
+ }
87
+ let mount = null;
88
+ try {
89
+ mount = document.querySelector(WEB5_SCOPES.join(','));
90
+ } catch {
91
+ // Malformed selector cannot happen with the constant, but querySelector is
92
+ // the one call here that can throw, and a debug aid must never be the thing
93
+ // that breaks a page.
94
+ }
95
+ if (!mount) {
96
+ console.warn(`${LOG_PREFIX} no mount found (${WEB5_SCOPES.join(', ')}) — tokens were written, but their resolved values cannot be read`);
97
+ return;
98
+ }
99
+
100
+ // One computed-style read for the whole batch: the expensive part is the style
101
+ // recalculation it forces, not the per-property lookups off the result.
102
+ const computed = getComputedStyle(mount);
103
+ const rows = applied.map(_ref => {
104
+ let [token, value] = _ref;
105
+ const bucket = bucketOf(token);
106
+ const target = bucket === 'brand' ? token : hostAliasFor(token);
107
+ const resolved = computed.getPropertyValue(token).trim();
108
+ const wanted = value.trim();
109
+ return {
110
+ token,
111
+ bucket,
112
+ 'written as': target,
113
+ 'store said': wanted,
114
+ 'resolves to': resolved || '(nothing reads it)',
115
+ winner: !resolved ? 'NOBODY — no stylesheet consumes this token' : resolved === wanted ? 'STORE' : 'TEMPLATE'
116
+ };
117
+ });
118
+ const overridden = rows.filter(r => r.winner === 'TEMPLATE').length;
119
+ const inert = rows.filter(r => r.winner.startsWith('NOBODY')).length;
120
+
121
+ /* eslint-disable no-console */
122
+ console.groupCollapsed(`${LOG_PREFIX} ${rows.length} override(s) applied · ${overridden} kept by the template · ${inert} inert`);
123
+ console.table(rows);
124
+ if (inert > 0) {
125
+ console.info(`${LOG_PREFIX} "inert" means the value was written but no stylesheet reads that token — ` + `for a host token that means core has no \`var(--web5-host-…)\` wiring for it yet.`);
126
+ }
127
+ console.info(`${LOG_PREFIX} the marker <style data-web5-theme-overrides> looks empty in DevTools on purpose: ` + `rules are inserted through the CSSOM, never as text. Read them with ` + `document.querySelector('style[data-web5-theme-overrides]').sheet.cssRules[0].cssText`);
128
+ console.groupEnd();
129
+ /* eslint-enable no-console */
130
+ }
131
+ //# sourceMappingURL=themeDebug.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["WEB5_SCOPES","bucketOf","hostAliasFor","THEME_DEBUG_KEY","THEME_DEBUG_QUERY_PARAM","LOG_PREFIX","isTruthy","value","cached","isThemeDebugEnabled","URLSearchParams","window","location","search","get","localStorage","getItem","resetThemeDebugCache","traceThemeOverrides","applied","length","console","info","mount","document","querySelector","join","warn","computed","getComputedStyle","rows","map","_ref","token","bucket","target","resolved","getPropertyValue","trim","wanted","winner","overridden","filter","r","inert","startsWith","groupCollapsed","table","groupEnd"],"sources":["../../../src/client/themeDebug.ts"],"sourcesContent":["/**\n * Theme-override tracing (debug-only).\n *\n * Answers the one question the token pipeline cannot otherwise be asked:\n * **which layer actually won?**\n *\n * Since DL #193 a `brand` token is written as itself and everything else as its\n * `--web5-host-*` alias, which core's stylesheets consume as a `var()` fallback\n * a template can beat. That makes the outcome a cascade decision, and a cascade\n * decision is invisible — there is no callback, no return value, and nothing in\n * the DOM to read. Worse, `applyThemeOverrides` writes through the CSSOM\n * (`insertRule` + `setProperty`, never `textContent`) so that a hostile value\n * can never terminate a declaration, which means DevTools renders the marker as\n * `<style data-web5-theme-overrides=\"\">` — an empty tag, with the rules real but\n * nowhere in the DOM tree. Every part of that is deliberate and every part of it\n * looks broken.\n *\n * So this reads the resolved value back off the mount **after** the rule is in,\n * and reports what the browser actually decided:\n *\n * [web5:theme] --radius host wrote --web5-host-radius=0rem → 1.25rem TEMPLATE\n * [web5:theme] --primary brand wrote --primary=0 0% 9% → 0 0% 9% STORE\n *\n * Off by default. Enable with `?web5DebugTheme=1` (one-shot, wins over storage)\n * or `localStorage[\"web5_debug_theme\"] = \"1\"` (sticky) — the same shape as\n * `matchDebug`, so there is one convention to learn rather than two.\n *\n * It is gated rather than always-on because reading a computed value forces a\n * style recalculation, and this runs during page setup. One read is taken for\n * the whole batch, not one per token.\n */\nimport { WEB5_SCOPES } from '../hostScope';\nimport { bucketOf, hostAliasFor } from '../theme/tokenContract';\n\nexport const THEME_DEBUG_KEY = 'web5_debug_theme';\n\n/** Query param that forces theme tracing on, overriding localStorage. */\nexport const THEME_DEBUG_QUERY_PARAM = 'web5DebugTheme';\n\nconst LOG_PREFIX = '[web5:theme]';\n\nconst isTruthy = (value: unknown): boolean => value === '1' || value === 'true';\n\nlet cached: boolean | null = null;\n\n/** Whether theme tracing is enabled. Memoized — resolved once per page load. */\nexport const isThemeDebugEnabled = (): boolean => {\n if (cached !== null) {\n return cached;\n }\n cached = false;\n try {\n if (\n isTruthy(\n new URLSearchParams(window.location.search).get(\n THEME_DEBUG_QUERY_PARAM,\n ),\n )\n ) {\n cached = true;\n return cached;\n }\n } catch {\n // window / URLSearchParams unavailable (SSR, non-DOM environments).\n }\n try {\n cached = isTruthy(localStorage.getItem(THEME_DEBUG_KEY));\n } catch {\n // localStorage can throw in privacy mode / non-DOM environments.\n }\n return cached;\n};\n\n/** Test seam — the flag is memoized for the page, so tests must be able to clear it. */\nexport const resetThemeDebugCache = (): void => {\n cached = null;\n};\n\ninterface TraceRow {\n token: string;\n bucket: string;\n 'written as': string;\n 'store said': string;\n 'resolves to': string;\n winner: string;\n}\n\n/**\n * Report what each override did, after the rule is live.\n *\n * `applied` is what `applyThemeOverrides` actually wrote — already filtered for\n * key shape, so anything malformed has been dropped and warned about before\n * reaching here.\n */\nexport function traceThemeOverrides(applied: [string, string][]): void {\n if (!isThemeDebugEnabled()) {\n return;\n }\n if (applied.length === 0) {\n // Silence here would be indistinguishable from tracing being broken, and\n // \"no overrides reached the page\" is itself the answer often enough — a\n // store with nothing imported means every token is the template's.\n // eslint-disable-next-line no-console\n console.info(\n `${LOG_PREFIX} no overrides applied — nothing usable arrived for this store, so every token is whatever the template and core defaults say`,\n );\n return;\n }\n let mount: Element | null = null;\n try {\n mount = document.querySelector(WEB5_SCOPES.join(','));\n } catch {\n // Malformed selector cannot happen with the constant, but querySelector is\n // the one call here that can throw, and a debug aid must never be the thing\n // that breaks a page.\n }\n if (!mount) {\n console.warn(\n `${LOG_PREFIX} no mount found (${WEB5_SCOPES.join(\n ', ',\n )}) — tokens were written, but their resolved values cannot be read`,\n );\n return;\n }\n\n // One computed-style read for the whole batch: the expensive part is the style\n // recalculation it forces, not the per-property lookups off the result.\n const computed = getComputedStyle(mount);\n const rows: TraceRow[] = applied.map(([token, value]) => {\n const bucket = bucketOf(token);\n const target = bucket === 'brand' ? token : hostAliasFor(token);\n const resolved = computed.getPropertyValue(token).trim();\n const wanted = value.trim();\n return {\n token,\n bucket,\n 'written as': target,\n 'store said': wanted,\n 'resolves to': resolved || '(nothing reads it)',\n winner: !resolved\n ? 'NOBODY — no stylesheet consumes this token'\n : resolved === wanted\n ? 'STORE'\n : 'TEMPLATE',\n };\n });\n\n const overridden = rows.filter((r) => r.winner === 'TEMPLATE').length;\n const inert = rows.filter((r) => r.winner.startsWith('NOBODY')).length;\n\n /* eslint-disable no-console */\n console.groupCollapsed(\n `${LOG_PREFIX} ${rows.length} override(s) applied · ${overridden} kept by the template · ${inert} inert`,\n );\n console.table(rows);\n if (inert > 0) {\n console.info(\n `${LOG_PREFIX} \"inert\" means the value was written but no stylesheet reads that token — ` +\n `for a host token that means core has no \\`var(--web5-host-…)\\` wiring for it yet.`,\n );\n }\n console.info(\n `${LOG_PREFIX} the marker <style data-web5-theme-overrides> looks empty in DevTools on purpose: ` +\n `rules are inserted through the CSSOM, never as text. Read them with ` +\n `document.querySelector('style[data-web5-theme-overrides]').sheet.cssRules[0].cssText`,\n );\n console.groupEnd();\n /* eslint-enable no-console */\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,WAAW,QAAQ,cAAc;AAC1C,SAASC,QAAQ,EAAEC,YAAY,QAAQ,wBAAwB;AAE/D,OAAO,MAAMC,eAAe,GAAG,kBAAkB;;AAEjD;AACA,OAAO,MAAMC,uBAAu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;EACDvB,OAAO,CAAC0B,KAAK,CAACjB,IAAI,CAAC;EACnB,IAAIc,KAAK,GAAG,CAAC,EAAE;IACbvB,OAAO,CAACC,IAAI,CACV,GAAGjB,UAAU,4EAA4E,GACvF,mFACJ,CAAC;EACH;EACAgB,OAAO,CAACC,IAAI,CACV,GAAGjB,UAAU,oFAAoF,GAC/F,sEAAsE,GACtE,sFACJ,CAAC;EACDgB,OAAO,CAAC2B,QAAQ,CAAC,CAAC;EAClB;AACF","ignoreList":[]}
package/dist/esm/index.js CHANGED
@@ -143,6 +143,7 @@ export { TEMPLATES_CDN_BASE, TEMPLATES_MANIFEST_URL, getTemplateOverride, isTemp
143
143
  export { mergeClientConfig } from './client/mergeClientConfig.js';
144
144
  export { applyThemeOverrides, THEME_OVERRIDE_TOKENS } from './client/applyThemeOverrides.js';
145
145
  export { THEME_TOKEN_CONTRACT, BRAND_TOKENS, TOKEN_NAME_PATTERN, bucketOf, hostAliasFor } from './theme/tokenContract.js';
146
+ export { isThemeDebugEnabled, THEME_DEBUG_KEY, THEME_DEBUG_QUERY_PARAM } from './client/themeDebug.js';
146
147
 
147
148
  // Placement renderer + DI helper (DL #088 D3.2, D3.4)
148
149
  export { PlacementResponseRenderer, PlacementSmoothHeight } from './components/placement/PlacementResponseRenderer.js';
@@ -1 +1 @@
1
- {"version":3,"names":["CLIENT_IDS","EXPERIMENT_IDS","createFeatureToggleReader","FeatureToggleProvider","useFeatureToggles","useFeatureToggle","getPartsByType","getPartByRole","getAllByRole","getHeading","getImages","getLinks","extractContent","extractContentMarkdown","deriveRole","DROP_SECTION","DIAGNOSTIC_TYPES","buildImageSearchFilter","ImageSearchFilterToken","backgroundFilter","HeroSectionDefinition","HeroEntitySectionDefinition","KpiSectionDefinition","FeatureCardsSectionDefinition","EntitySectionDefinition","EntityCollectionSectionDefinition","ComparisonSectionDefinition","TextBlockSectionDefinition","CtaBannerSectionDefinition","CalloutSectionDefinition","NextStepsSectionDefinition","FeatureSection9PlusDefinition","ListItemsSectionDefinition","SkipNodesSectionDefinition","HtmlCommentSectionDefinition","SearchSectionDefinition","ErrorSectionDefinition","FallbackSectionDefinition","createSdkRegistry","ComponentRegistry","validatePattern","validatePatternSyntax","validatePatternWithBlocks","convertToBlockElements","convertToBlockElementsWithMapping","Web5UrlType","isWeb5AskUrl","isWeb5EntityUrl","isWeb5ImageUrl","isWeb5IconUrl","isWeb5ActionUrl","isWeb5SearchUrl","isWeb5Url","isNavigableUrl","isValidLinkUrl","isLegacyUrl","parseWeb5Url","isValidWeb5Url","validateLinkUrl","isEntityLink","parseEntityLink","extractProtocol","extractLinkMetadata","findInvalidWeb5Links","hasImage","isHtmlComment","matchMarkdown","matchAllSections","nodesToParts","ComponentDependenciesProvider","useComponentDependencies","UserQueryProvider","useUserQuery","ChipsProvider","useChips","defaultExtractor","enrichEntitiesFromPayload","fetchEntityListData","listEntityItems","LIST_ITEMS_ENDPOINT","getEntityExtractor","registerEntityExtractor","transformToSolutionEntityData","transformToBlogPostEntityData","transformToGenericEntityData","CALLOUT_KINDS","useWeb5Link","useConversation","useDebugImageContext","useResolvedImageSources","useResolveGenericEntityData","useEntityTransforms","useMarkdownUtils","useResolveShopifyEntityData","useResolveSearchSpringEntityData","fetchProductsByHandles","fetchProductsByHandlesMap","transformSSProductToEntityItemData","addToCart","ShopifyStorefrontClient","resolveShopifyConfig","resolveShopifyEntity","transformShopifyProduct","transformShopifyCollection","transformShopifyArticle","transformShopifyEntityToItemData","PRODUCT_BY_HANDLE_QUERY","COLLECTION_BY_HANDLE_QUERY","ARTICLE_BY_HANDLE_QUERY","cn","normalizeImageUrl","getResizedImageUrl","analyzeBackdrop","computeContentBBox","buildProbeUrl","loadImagePixels","loadBackdropAnalysis","stripMarkdown","rgbToHsl","hslToRgb","ensureMinLightness","toRgb","deriveDarkColor","deriveDarkGradient","deriveLightColor","pushEvent","pushPromptSubmit","pushLinkClick","pushError","pushExit","pushEntityFiltered","hasAnalyticsConsent","ERROR_MARKDOWN","getErrorTypeFromStatus","createErrorMarkdown","STREAMING_TIMEOUT_MS","DEFAULT_ERROR_TEMPLATES","resolveErrorTemplate","getForwardStack","setForwardStack","clearForwardStack","pushToForwardStack","popFromForwardStack","UserQuery","PRODUCT_BACK_SESSION_KEY","writeProductBackHandoff","readProductBackHandoff","PromptEntryEmptyState","SearchSection","FeedbackBar","Disclaimer","BottomContainer","MarkdownText","CalloutBlock","OptimizedImage","SectionSkeleton","SmartIcon","Loader","PlacementLoader","UnifiedLink","detectLinkType","LinkType","Table","TableHeader","TableBody","TableFooter","TableHead","TableRow","TableCell","TableCaption","WEB5_USER_QUERY_EVENT","WEB5_ANSWER_UPDATED_EVENT","WEB5_REDIRECT_EVENT","loadClientBundle","getClientBundleOverride","isTrustedBundleHost","TEMPLATES_CDN_BASE","TEMPLATES_MANIFEST_URL","getTemplateOverride","isTemplatePickerRequested","isValidTemplateId","resolveClientBundleUrl","mergeClientConfig","applyThemeOverrides","THEME_OVERRIDE_TOKENS","THEME_TOKEN_CONTRACT","BRAND_TOKENS","TOKEN_NAME_PATTERN","bucketOf","hostAliasFor","PlacementResponseRenderer","PlacementSmoothHeight","buildPlacementDependencies","PlacementPayloadProvider","usePlacementPayload","UnifiedMarkdownParser","parseMarkdownToAst","parseAstToMarkdown","escapeWeb5Links","fixMalformedLinks","trimTrailingWhitespace","normalizeIconUrls","decodeLinkText","preprocessMarkdown","ComponentTracking","findKeywordsInContent","getContextualImageFilename","extractIntentFromMarkdown","getIntentFromMarkdown","createPageSection","generateSectionId","generateId","findImageInNode","findImageInChildren","DiagnosticsCollector","REFRESH_PROMPTS_UNTIL_KEY","REFRESH_PROMPTS_WINDOW_MS","getRefreshPromptsExpiry","shouldRefreshPrompts","enableRefreshPrompts","disableRefreshPrompts","BACKEND_ENVIRONMENT_KEY","BACKEND_ENVIRONMENT_QUERY_PARAM","DEFAULT_BACKEND_ENVIRONMENT","getBackendEnvironment","setBackendEnvironment","usesStagingBackend","MATCH_DEBUG_KEY","MATCH_DEBUG_QUERY_PARAM","isMatchDebugEnabled","setMatchDebug","resetMatchDebugCache","logMatchDebug","createWixAuthFetch","getOrCreateSessionId","getSessionId","getChatId","startNewChatId","setChatId","resetChatIdForTests","parseMarkdownToComponents","tryParseComponent","mergeSectionsWithStableReferences","WEB5_ROOT_ID","WEB5_ROOT_CLASS","WEB5_SCOPES","WEB5_SCOPE","WEB5_GLOBAL_TOKENS"],"sources":["../../src/index.ts"],"sourcesContent":["// Client IDs and experiment IDs\nexport { CLIENT_IDS, EXPERIMENT_IDS } from './clients';\n\nexport {\n type EmbedFeatureToggleResult,\n type FeatureToggleReader,\n createFeatureToggleReader,\n FeatureToggleProvider,\n useFeatureToggles,\n useFeatureToggle,\n} from './featureToggles/FeatureToggleContext';\n\n// Dev-only chrome injection contract for client packages\nexport type { DevEnvironment } from './client/devEnvironment';\n\n// Part types and helpers\nexport {\n type PartType,\n type Part,\n type HeadingPart,\n type ImagePart,\n type LinkPart,\n type ListPart,\n type ListItemPart,\n type KpiItemPart,\n type CardPart,\n type IconPart,\n type CalloutPart,\n type EntityPart,\n getPartsByType,\n getPartByRole,\n getAllByRole,\n getHeading,\n getImages,\n getLinks,\n extractContent,\n extractContentMarkdown,\n deriveRole,\n} from './parts/parts';\n\n// Component types\nexport type {\n BaseCompProps,\n SlotCompProps,\n SectionCompProps,\n SectionCompPropsWithSlot,\n TextCompProps,\n ButtonCompProps,\n ImageCompProps,\n BadgeCompProps,\n HeroButton,\n KpiItemCompProps,\n FeatureItemCompProps,\n FeatureCardCompProps,\n EntityItemData,\n EntityItem,\n GenericEntityData,\n GenericEntityCompProps,\n ComparisonRow,\n ComparisonColumn,\n AiNarrativeCompProps,\n HeroCompProps,\n HeroEntityCompProps,\n KpiCompProps,\n 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';\nexport {\n THEME_TOKEN_CONTRACT,\n BRAND_TOKENS,\n TOKEN_NAME_PATTERN,\n bucketOf,\n hostAliasFor,\n type TokenBucket,\n type TokenContractEntry,\n type TokenType,\n} from './theme/tokenContract';\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":"AAAA;AACA,SAASA,UAAU,EAAEC,cAAc,QAAQ,WAAW;AAEtD,SAGEC,yBAAyB,EACzBC,qBAAqB,EACrBC,iBAAiB,EACjBC,gBAAgB,QACX,uCAAuC;;AAE9C;;AAGA;AACA,SAaEC,cAAc,EACdC,aAAa,EACbC,YAAY,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qBAAqB,EACrBC,qBAAqB,EACrBC,kBAAkB,QACb,4BAA4B;AACnC,SACEC,eAAe,EACfC,uBAAuB,EACvBC,mBAAmB,EACnBC,aAAa,EACbC,oBAAoB,EACpBC,aAAa,QACR,oBAAoB;AAC3B,SAASC,kBAAkB,QAAQ,uBAAuB;AAC1D,SACEC,oBAAoB,EACpBC,YAAY,EACZC,SAAS,EACTC,cAAc,EACdC,SAAS,EACTC,mBAAmB,QACd,wBAAwB;;AAE/B;AACA,SACEC,yBAAyB,EACzBC,iBAAiB,EACjBC,iCAAiC,QAK5B,6BAA6B;AAMpC;AACA;AACA;AACA,SACEC,YAAY,EACZC,eAAe,EACfC,WAAW,EACXC,UAAU,EACVC,kBAAkB,QAEb,aAAa","ignoreList":[]}
1
+ {"version":3,"names":["CLIENT_IDS","EXPERIMENT_IDS","createFeatureToggleReader","FeatureToggleProvider","useFeatureToggles","useFeatureToggle","getPartsByType","getPartByRole","getAllByRole","getHeading","getImages","getLinks","extractContent","extractContentMarkdown","deriveRole","DROP_SECTION","DIAGNOSTIC_TYPES","buildImageSearchFilter","ImageSearchFilterToken","backgroundFilter","HeroSectionDefinition","HeroEntitySectionDefinition","KpiSectionDefinition","FeatureCardsSectionDefinition","EntitySectionDefinition","EntityCollectionSectionDefinition","ComparisonSectionDefinition","TextBlockSectionDefinition","CtaBannerSectionDefinition","CalloutSectionDefinition","NextStepsSectionDefinition","FeatureSection9PlusDefinition","ListItemsSectionDefinition","SkipNodesSectionDefinition","HtmlCommentSectionDefinition","SearchSectionDefinition","ErrorSectionDefinition","FallbackSectionDefinition","createSdkRegistry","ComponentRegistry","validatePattern","validatePatternSyntax","validatePatternWithBlocks","convertToBlockElements","convertToBlockElementsWithMapping","Web5UrlType","isWeb5AskUrl","isWeb5EntityUrl","isWeb5ImageUrl","isWeb5IconUrl","isWeb5ActionUrl","isWeb5SearchUrl","isWeb5Url","isNavigableUrl","isValidLinkUrl","isLegacyUrl","parseWeb5Url","isValidWeb5Url","validateLinkUrl","isEntityLink","parseEntityLink","extractProtocol","extractLinkMetadata","findInvalidWeb5Links","hasImage","isHtmlComment","matchMarkdown","matchAllSections","nodesToParts","ComponentDependenciesProvider","useComponentDependencies","UserQueryProvider","useUserQuery","ChipsProvider","useChips","defaultExtractor","enrichEntitiesFromPayload","fetchEntityListData","listEntityItems","LIST_ITEMS_ENDPOINT","getEntityExtractor","registerEntityExtractor","transformToSolutionEntityData","transformToBlogPostEntityData","transformToGenericEntityData","CALLOUT_KINDS","useWeb5Link","useConversation","useDebugImageContext","useResolvedImageSources","useResolveGenericEntityData","useEntityTransforms","useMarkdownUtils","useResolveShopifyEntityData","useResolveSearchSpringEntityData","fetchProductsByHandles","fetchProductsByHandlesMap","transformSSProductToEntityItemData","addToCart","ShopifyStorefrontClient","resolveShopifyConfig","resolveShopifyEntity","transformShopifyProduct","transformShopifyCollection","transformShopifyArticle","transformShopifyEntityToItemData","PRODUCT_BY_HANDLE_QUERY","COLLECTION_BY_HANDLE_QUERY","ARTICLE_BY_HANDLE_QUERY","cn","normalizeImageUrl","getResizedImageUrl","analyzeBackdrop","computeContentBBox","buildProbeUrl","loadImagePixels","loadBackdropAnalysis","stripMarkdown","rgbToHsl","hslToRgb","ensureMinLightness","toRgb","deriveDarkColor","deriveDarkGradient","deriveLightColor","pushEvent","pushPromptSubmit","pushLinkClick","pushError","pushExit","pushEntityFiltered","hasAnalyticsConsent","ERROR_MARKDOWN","getErrorTypeFromStatus","createErrorMarkdown","STREAMING_TIMEOUT_MS","DEFAULT_ERROR_TEMPLATES","resolveErrorTemplate","getForwardStack","setForwardStack","clearForwardStack","pushToForwardStack","popFromForwardStack","UserQuery","PRODUCT_BACK_SESSION_KEY","writeProductBackHandoff","readProductBackHandoff","PromptEntryEmptyState","SearchSection","FeedbackBar","Disclaimer","BottomContainer","MarkdownText","CalloutBlock","OptimizedImage","SectionSkeleton","SmartIcon","Loader","PlacementLoader","UnifiedLink","detectLinkType","LinkType","Table","TableHeader","TableBody","TableFooter","TableHead","TableRow","TableCell","TableCaption","WEB5_USER_QUERY_EVENT","WEB5_ANSWER_UPDATED_EVENT","WEB5_REDIRECT_EVENT","loadClientBundle","getClientBundleOverride","isTrustedBundleHost","TEMPLATES_CDN_BASE","TEMPLATES_MANIFEST_URL","getTemplateOverride","isTemplatePickerRequested","isValidTemplateId","resolveClientBundleUrl","mergeClientConfig","applyThemeOverrides","THEME_OVERRIDE_TOKENS","THEME_TOKEN_CONTRACT","BRAND_TOKENS","TOKEN_NAME_PATTERN","bucketOf","hostAliasFor","isThemeDebugEnabled","THEME_DEBUG_KEY","THEME_DEBUG_QUERY_PARAM","PlacementResponseRenderer","PlacementSmoothHeight","buildPlacementDependencies","PlacementPayloadProvider","usePlacementPayload","UnifiedMarkdownParser","parseMarkdownToAst","parseAstToMarkdown","escapeWeb5Links","fixMalformedLinks","trimTrailingWhitespace","normalizeIconUrls","decodeLinkText","preprocessMarkdown","ComponentTracking","findKeywordsInContent","getContextualImageFilename","extractIntentFromMarkdown","getIntentFromMarkdown","createPageSection","generateSectionId","generateId","findImageInNode","findImageInChildren","DiagnosticsCollector","REFRESH_PROMPTS_UNTIL_KEY","REFRESH_PROMPTS_WINDOW_MS","getRefreshPromptsExpiry","shouldRefreshPrompts","enableRefreshPrompts","disableRefreshPrompts","BACKEND_ENVIRONMENT_KEY","BACKEND_ENVIRONMENT_QUERY_PARAM","DEFAULT_BACKEND_ENVIRONMENT","getBackendEnvironment","setBackendEnvironment","usesStagingBackend","MATCH_DEBUG_KEY","MATCH_DEBUG_QUERY_PARAM","isMatchDebugEnabled","setMatchDebug","resetMatchDebugCache","logMatchDebug","createWixAuthFetch","getOrCreateSessionId","getSessionId","getChatId","startNewChatId","setChatId","resetChatIdForTests","parseMarkdownToComponents","tryParseComponent","mergeSectionsWithStableReferences","WEB5_ROOT_ID","WEB5_ROOT_CLASS","WEB5_SCOPES","WEB5_SCOPE","WEB5_GLOBAL_TOKENS"],"sources":["../../src/index.ts"],"sourcesContent":["// Client IDs and experiment IDs\nexport { CLIENT_IDS, EXPERIMENT_IDS } from './clients';\n\nexport {\n type EmbedFeatureToggleResult,\n type FeatureToggleReader,\n createFeatureToggleReader,\n FeatureToggleProvider,\n useFeatureToggles,\n useFeatureToggle,\n} from './featureToggles/FeatureToggleContext';\n\n// Dev-only chrome injection contract for client packages\nexport type { DevEnvironment } from './client/devEnvironment';\n\n// Part types and helpers\nexport {\n type PartType,\n type Part,\n type HeadingPart,\n type ImagePart,\n type LinkPart,\n type ListPart,\n type ListItemPart,\n type KpiItemPart,\n type CardPart,\n type IconPart,\n type CalloutPart,\n type EntityPart,\n getPartsByType,\n getPartByRole,\n getAllByRole,\n getHeading,\n getImages,\n getLinks,\n extractContent,\n extractContentMarkdown,\n deriveRole,\n} from './parts/parts';\n\n// Component types\nexport type {\n BaseCompProps,\n SlotCompProps,\n SectionCompProps,\n SectionCompPropsWithSlot,\n TextCompProps,\n ButtonCompProps,\n ImageCompProps,\n BadgeCompProps,\n HeroButton,\n KpiItemCompProps,\n FeatureItemCompProps,\n FeatureCardCompProps,\n EntityItemData,\n EntityItem,\n GenericEntityData,\n GenericEntityCompProps,\n ComparisonRow,\n ComparisonColumn,\n AiNarrativeCompProps,\n HeroCompProps,\n HeroEntityCompProps,\n KpiCompProps,\n 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';\nexport {\n THEME_TOKEN_CONTRACT,\n BRAND_TOKENS,\n TOKEN_NAME_PATTERN,\n bucketOf,\n hostAliasFor,\n type TokenBucket,\n type TokenContractEntry,\n type TokenType,\n} from './theme/tokenContract';\nexport {\n isThemeDebugEnabled,\n THEME_DEBUG_KEY,\n THEME_DEBUG_QUERY_PARAM,\n} from './client/themeDebug';\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":"AAAA;AACA,SAASA,UAAU,EAAEC,cAAc,QAAQ,WAAW;AAEtD,SAGEC,yBAAyB,EACzBC,qBAAqB,EACrBC,iBAAiB,EACjBC,gBAAgB,QACX,uCAAuC;;AAE9C;;AAGA;AACA,SAaEC,cAAc,EACdC,aAAa,EACbC,YAAY,EACZC,UAAU,EACVC,SAAS,EACTC,QAAQ,EACRC,cAAc,EACdC,sBAAsB,EACtBC,UAAU,QACL,eAAe;;AAEtB;;AA4EA;;AAOA,SAASC,YAAY,QAAQ,gCAAgC;;AAE7D;AACA,SAASC,gBAAgB,QAAQ,6BAA6B;AAG9D;AACA,SACEC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aAAa,QACR,oBAAoB;AAC3B,SAASC,kBAAkB,QAAQ,uBAAuB;AAC1D,SACEC,oBAAoB,EACpBC,YAAY,EACZC,SAAS,EACTC,cAAc,EACdC,SAAS,EACTC,mBAAmB,QACd,wBAAwB;;AAE/B;AACA,SACEC,yBAAyB,EACzBC,iBAAiB,EACjBC,iCAAiC,QAK5B,6BAA6B;AAMpC;AACA;AACA;AACA,SACEC,YAAY,EACZC,eAAe,EACfC,WAAW,EACXC,UAAU,EACVC,kBAAkB,QAEb,aAAa","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"applyThemeOverrides.d.ts","sourceRoot":"","sources":["../../../src/client/applyThemeOverrides.ts"],"names":[],"mappings":"AA2CA,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,KAAK,MAAM,EAAE,CAAC;AAE7C;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAE9D;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,MAAM,CAErD,CAAC;AAOF,wBAAgB,mBAAmB,CACjC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,GACxC,IAAI,CA0CN"}
1
+ {"version":3,"file":"applyThemeOverrides.d.ts","sourceRoot":"","sources":["../../../src/client/applyThemeOverrides.ts"],"names":[],"mappings":"AA4CA,0DAA0D;AAC1D,MAAM,MAAM,gBAAgB,GAAG,KAAK,MAAM,EAAE,CAAC;AAE7C;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,CAAC;AAE9D;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,EAAE,WAAW,CAAC,MAAM,CAErD,CAAC;AAOF,wBAAgB,mBAAmB,CACjC,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,IAAI,GACxC,IAAI,CAuDN"}
@@ -0,0 +1,16 @@
1
+ export declare const THEME_DEBUG_KEY = "web5_debug_theme";
2
+ /** Query param that forces theme tracing on, overriding localStorage. */
3
+ export declare const THEME_DEBUG_QUERY_PARAM = "web5DebugTheme";
4
+ /** Whether theme tracing is enabled. Memoized — resolved once per page load. */
5
+ export declare const isThemeDebugEnabled: () => boolean;
6
+ /** Test seam — the flag is memoized for the page, so tests must be able to clear it. */
7
+ export declare const resetThemeDebugCache: () => void;
8
+ /**
9
+ * Report what each override did, after the rule is live.
10
+ *
11
+ * `applied` is what `applyThemeOverrides` actually wrote — already filtered for
12
+ * key shape, so anything malformed has been dropped and warned about before
13
+ * reaching here.
14
+ */
15
+ export declare function traceThemeOverrides(applied: [string, string][]): void;
16
+ //# sourceMappingURL=themeDebug.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themeDebug.d.ts","sourceRoot":"","sources":["../../../src/client/themeDebug.ts"],"names":[],"mappings":"AAkCA,eAAO,MAAM,eAAe,qBAAqB,CAAC;AAElD,yEAAyE;AACzE,eAAO,MAAM,uBAAuB,mBAAmB,CAAC;AAQxD,gFAAgF;AAChF,eAAO,MAAM,mBAAmB,QAAO,OAyBtC,CAAC;AAEF,wFAAwF;AACxF,eAAO,MAAM,oBAAoB,QAAO,IAEvC,CAAC;AAWF;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,IAAI,CA0ErE"}
@@ -76,6 +76,7 @@ export { TEMPLATES_CDN_BASE, TEMPLATES_MANIFEST_URL, getTemplateOverride, isTemp
76
76
  export { mergeClientConfig, type DeepPartial } from './client/mergeClientConfig';
77
77
  export { applyThemeOverrides, THEME_OVERRIDE_TOKENS, type ThemeOverrideKey, type ThemeOverrides, } from './client/applyThemeOverrides';
78
78
  export { THEME_TOKEN_CONTRACT, BRAND_TOKENS, TOKEN_NAME_PATTERN, bucketOf, hostAliasFor, type TokenBucket, type TokenContractEntry, type TokenType, } from './theme/tokenContract';
79
+ export { isThemeDebugEnabled, THEME_DEBUG_KEY, THEME_DEBUG_QUERY_PARAM, } from './client/themeDebug';
79
80
  export { PlacementResponseRenderer, PlacementSmoothHeight, type PlacementResponseRendererProps, type PlacementSection, type PlacementVariant, } from './components/placement/PlacementResponseRenderer';
80
81
  export { buildPlacementDependencies, type BuildPlacementDependenciesOptions, } from './components/placement/buildPlacementDependencies';
81
82
  export { PlacementPayloadProvider, usePlacementPayload, type PlacementPayloadContextValue, } from './components/placement/PlacementPayloadContext';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,uCAAuC,CAAC;AAG/C,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,IAAI,EACT,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,cAAc,EACd,aAAa,EACb,YAAY,EACZ,UAAU,EACV,SAAS,EACT,QAAQ,EACR,cAAc,EACd,sBAAsB,EACtB,UAAU,GACX,MAAM,eAAe,CAAC;AAGvB,YAAY,EACV,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,cAAc,EACd,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACd,UAAU,EACV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ACjB,iCAAiC,EACjC,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAEvD,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,EACxB,yBAAyB,EACzB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,GACjB,MAAM,uCAAuC,CAAC;AAG/C,YAAY,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,IAAI,EACT,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,WAAW,EAChB,KAAK,QAAQ,EACb,KAAK,QAAQ,EACb,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,cAAc,EACd,aAAa,EACb,YAAY,EACZ,UAAU,EACV,SAAS,EACT,QAAQ,EACR,cAAc,EACd,sBAAsB,EACtB,UAAU,GACX,MAAM,eAAe,CAAC;AAGvB,YAAY,EACV,aAAa,EACb,aAAa,EACb,gBAAgB,EAChB,wBAAwB,EACxB,aAAa,EACb,eAAe,EACf,cAAc,EACd,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,cAAc,EACd,UAAU,EACV,iBAAiB,EACjB,sBAAsB,EACtB,aAAa,EACb,gBAAgB,EAChB,oBAAoB,EACpB,aAAa,EACb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jB,iCAAiC,EACjC,KAAK,oBAAoB,EACzB,KAAK,mBAAmB,EACxB,KAAK,cAAc,EACnB,KAAK,aAAa,GACnB,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EACL,YAAY,EACZ,eAAe,EACf,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,KAAK,aAAa,GACnB,MAAM,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@wix/web5-core",
3
3
  "license": "MIT",
4
- "version": "1.62.0",
4
+ "version": "1.63.1",
5
5
  "author": {
6
6
  "name": "tsachis",
7
7
  "email": "tsachis@wix.com"
@@ -100,5 +100,5 @@
100
100
  "wallaby": {
101
101
  "autoDetect": true
102
102
  },
103
- "falconPackageHash": "6796550854d3a51bfecb2ebb957ef475051e33aae7c4e8f71812d718"
103
+ "falconPackageHash": "27466350a6618e18cb51150d3a5ee8c45b853e99714c315a051e5151"
104
104
  }