@wix/web5-core 1.63.24 → 1.63.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/component/componentDefinitions/MetricsSectionDefinition.js +149 -0
- package/dist/cjs/component/componentDefinitions/MetricsSectionDefinition.js.map +1 -0
- package/dist/cjs/component/componentDefinitions/index.js +3 -1
- package/dist/cjs/component/componentDefinitions/index.js.map +1 -1
- package/dist/cjs/component/types.js.map +1 -1
- package/dist/cjs/components/ui/UserQuery.css +10 -7
- package/dist/cjs/components/ui/UserQuery.js +17 -33
- package/dist/cjs/components/ui/UserQuery.js.map +1 -1
- package/dist/cjs/index.js +4 -3
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/component/componentDefinitions/MetricsSectionDefinition.js +144 -0
- package/dist/esm/component/componentDefinitions/MetricsSectionDefinition.js.map +1 -0
- package/dist/esm/component/componentDefinitions/index.js +3 -1
- package/dist/esm/component/componentDefinitions/index.js.map +1 -1
- package/dist/esm/component/types.js.map +1 -1
- package/dist/esm/components/ui/UserQuery.css +10 -7
- package/dist/esm/components/ui/UserQuery.js +5 -9
- package/dist/esm/components/ui/UserQuery.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/types/component/componentDefinitions/MetricsSectionDefinition.d.ts +49 -0
- package/dist/types/component/componentDefinitions/MetricsSectionDefinition.d.ts.map +1 -0
- package/dist/types/component/componentDefinitions/index.d.ts +1 -0
- package/dist/types/component/componentDefinitions/index.d.ts.map +1 -1
- package/dist/types/component/types.d.ts +19 -0
- package/dist/types/component/types.d.ts.map +1 -1
- package/dist/types/components/ui/UserQuery.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -2
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/ui/UserQuery.css +10 -7
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.MetricsSectionDefinition = void 0;
|
|
6
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
7
|
+
var _parseUtils = require("./parse-utils");
|
|
8
|
+
var _parts = require("../../parts/parts");
|
|
9
|
+
var _diagnosticTypes = require("../diagnosticTypes");
|
|
10
|
+
/**
|
|
11
|
+
* Metrics — a band of headline facts about one subject.
|
|
12
|
+
*
|
|
13
|
+
* Claims the orchestrator's `metrics` layout:
|
|
14
|
+
*
|
|
15
|
+
* <!-- section:metrics, semantic:metrics -->
|
|
16
|
+
* ## Sleep product price ranges and SKUs on this page
|
|
17
|
+
* - **Single-dose liquid price:** 3.9
|
|
18
|
+
* - **Melatonin liquids/gummies price range:** 9.8–15.96
|
|
19
|
+
*
|
|
20
|
+
* ## Why this is not `KpiSectionDefinition`
|
|
21
|
+
*
|
|
22
|
+
* That definition parses a near-identical shape but gates on
|
|
23
|
+
* `html_comment[section^="kpi"]`, and no prompt emits `section:kpi` — the word
|
|
24
|
+
* appears nowhere in the orchestrator prompt and was never once emitted across
|
|
25
|
+
* 220 pages of captured production output. It stays because two clients still
|
|
26
|
+
* register it, but nothing reaches it. Until this definition existed a real
|
|
27
|
+
* `section:metrics` block was claimed by `FeatureSection9PlusDefinition` and
|
|
28
|
+
* rendered as feature cards with icons, prices as card descriptions.
|
|
29
|
+
*
|
|
30
|
+
* ## The value/label inversion
|
|
31
|
+
*
|
|
32
|
+
* This is the one behavioural difference from `KpiSectionDefinition`, and the
|
|
33
|
+
* reason re-pointing that definition at the `metrics` marker would not have
|
|
34
|
+
* been enough. `prompt/base/section:metrics` mandates bolding the **label**:
|
|
35
|
+
*
|
|
36
|
+
* - **<Label>:** <value>
|
|
37
|
+
*
|
|
38
|
+
* while `parseKpiItem` reads the first bold run as the *title* — which every
|
|
39
|
+
* renderer shows as the large numeral. Under that contract a real page renders
|
|
40
|
+
* "Single-dose liquid price:" at display size and "3.9" as the caption. So here
|
|
41
|
+
* the bold run is the **label** (`description`) and the text after it is the
|
|
42
|
+
* **value** (`title`).
|
|
43
|
+
*
|
|
44
|
+
* The colon is accepted on either side of the bold: the section prompt's
|
|
45
|
+
* template puts it inside (`**Label:**`), the older KPI fixtures put it outside
|
|
46
|
+
* (`**48.8%**:`).
|
|
47
|
+
*/
|
|
48
|
+
class MetricsSectionDefinition {
|
|
49
|
+
constructor() {
|
|
50
|
+
(0, _defineProperty2.default)(this, "sectionType", 'metrics');
|
|
51
|
+
(0, _defineProperty2.default)(this, "patterns", ['html_comment[section^="metrics"] > h2 > list{item[1-]:icon? > t+}', 'html_comment[section^="metrics"] > h2 > (icon? > t)+']);
|
|
52
|
+
(0, _defineProperty2.default)(this, "defaults", {
|
|
53
|
+
title: 'Key metrics',
|
|
54
|
+
items: [{
|
|
55
|
+
title: '12',
|
|
56
|
+
description: 'Brands carried'
|
|
57
|
+
}]
|
|
58
|
+
});
|
|
59
|
+
(0, _defineProperty2.default)(this, "fixtures", [{
|
|
60
|
+
markdown: `<!-- section:metrics, semantic:metrics -->
|
|
61
|
+
## Sleep product price ranges and SKUs on this page
|
|
62
|
+
- **Single-dose liquid price:** 3.9
|
|
63
|
+
- **Example SKUs shown:** 8`,
|
|
64
|
+
expected: {
|
|
65
|
+
title: 'Sleep product price ranges and SKUs on this page',
|
|
66
|
+
items: [{
|
|
67
|
+
title: '3.9',
|
|
68
|
+
description: 'Single-dose liquid price'
|
|
69
|
+
}, {
|
|
70
|
+
title: '8',
|
|
71
|
+
description: 'Example SKUs shown'
|
|
72
|
+
}]
|
|
73
|
+
}
|
|
74
|
+
}]);
|
|
75
|
+
}
|
|
76
|
+
parse(parts, context) {
|
|
77
|
+
const title = (0, _parseUtils.headingText)(parts, 2);
|
|
78
|
+
const items = [];
|
|
79
|
+
let dropped = 0;
|
|
80
|
+
const collect = markdown => {
|
|
81
|
+
const parsed = parseMetricItem(markdown);
|
|
82
|
+
if (parsed) {
|
|
83
|
+
items.push(parsed);
|
|
84
|
+
} else if (markdown.trim()) {
|
|
85
|
+
dropped++;
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
// The shape the section prompt emits: a heading followed by one bullet list.
|
|
90
|
+
for (const list of (0, _parts.getPartsByType)(parts, 'list')) {
|
|
91
|
+
for (const item of ((_list$meta = list.meta) == null ? void 0 : _list$meta.items) ?? []) {
|
|
92
|
+
var _list$meta, _item$meta;
|
|
93
|
+
const itemParts = ((_item$meta = item.meta) == null ? void 0 : _item$meta.parts) ?? [];
|
|
94
|
+
collect(itemParts.filter(p => p.type !== 'icon').map(p => {
|
|
95
|
+
var _p$meta;
|
|
96
|
+
return ((_p$meta = p.meta) == null ? void 0 : _p$meta.markdown) || p.content;
|
|
97
|
+
}).filter(Boolean).join(' '));
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Fallback: the same facts emitted as loose lines rather than a list.
|
|
102
|
+
if (items.length === 0) {
|
|
103
|
+
for (const part of parts) {
|
|
104
|
+
var _part$meta;
|
|
105
|
+
if (part.type !== 'text' && part.type !== 'richText') {
|
|
106
|
+
continue;
|
|
107
|
+
}
|
|
108
|
+
const markdown = ((_part$meta = part.meta) == null ? void 0 : _part$meta.markdown) || part.content || '';
|
|
109
|
+
for (const line of markdown.split('\n')) {
|
|
110
|
+
collect(line);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (dropped > 0) {
|
|
115
|
+
context == null || context.reportDiagnostic == null || context.reportDiagnostic(_diagnosticTypes.DIAGNOSTIC_TYPES.ITEMS_DROPPED, `metrics: ${dropped} item(s) dropped (no bold label, or no value after it)`);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
// Nothing usable — reject the match so the block falls through rather than
|
|
119
|
+
// rendering an empty band.
|
|
120
|
+
return items.length > 0 ? {
|
|
121
|
+
title,
|
|
122
|
+
items
|
|
123
|
+
} : null;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* `**Label:** value` → `{ title: value, description: label }`.
|
|
129
|
+
*
|
|
130
|
+
* Null when there is no bold run, or nothing after it. A metric with no value
|
|
131
|
+
* is malformed rather than merely sparse — the band exists to show a number,
|
|
132
|
+
* and deriving one from the label is exactly what the section prompt forbids —
|
|
133
|
+
* so it is dropped and counted rather than rendered blank.
|
|
134
|
+
*/
|
|
135
|
+
exports.MetricsSectionDefinition = MetricsSectionDefinition;
|
|
136
|
+
function parseMetricItem(markdown) {
|
|
137
|
+
const trimmed = markdown.trim();
|
|
138
|
+
const boldMatch = trimmed.match(/\*\*(.+?)\*\*/);
|
|
139
|
+
if (!boldMatch) {
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
const label = boldMatch[1].trim().replace(/:$/, '').trim();
|
|
143
|
+
const value = trimmed.slice(trimmed.indexOf(boldMatch[0]) + boldMatch[0].length).replace(/^[:\s]+/, '').trim();
|
|
144
|
+
return value && label ? {
|
|
145
|
+
title: value,
|
|
146
|
+
description: label
|
|
147
|
+
} : null;
|
|
148
|
+
}
|
|
149
|
+
//# sourceMappingURL=MetricsSectionDefinition.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_parseUtils","require","_parts","_diagnosticTypes","MetricsSectionDefinition","constructor","_defineProperty2","default","title","items","description","markdown","expected","parse","parts","context","headingText","dropped","collect","parsed","parseMetricItem","push","trim","list","getPartsByType","item","_list$meta","meta","_item$meta","itemParts","filter","p","type","map","_p$meta","content","Boolean","join","length","part","_part$meta","line","split","reportDiagnostic","DIAGNOSTIC_TYPES","ITEMS_DROPPED","exports","trimmed","boldMatch","match","label","replace","value","slice","indexOf"],"sources":["../../../../src/component/componentDefinitions/MetricsSectionDefinition.ts"],"sourcesContent":["import { headingText } from './parse-utils';\nimport { getPartsByType, type Part, type ListPart } from '../../parts/parts';\nimport type {\n MetricsCompProps,\n MetricsItemCompProps,\n MetricsSectionComponent,\n SectionFixture,\n} from '../types';\nimport type { ParseContext, SectionDefinition } from '../section-definition';\nimport { DIAGNOSTIC_TYPES } from '../diagnosticTypes';\n\n/**\n * Metrics — a band of headline facts about one subject.\n *\n * Claims the orchestrator's `metrics` layout:\n *\n * <!-- section:metrics, semantic:metrics -->\n * ## Sleep product price ranges and SKUs on this page\n * - **Single-dose liquid price:** 3.9\n * - **Melatonin liquids/gummies price range:** 9.8–15.96\n *\n * ## Why this is not `KpiSectionDefinition`\n *\n * That definition parses a near-identical shape but gates on\n * `html_comment[section^=\"kpi\"]`, and no prompt emits `section:kpi` — the word\n * appears nowhere in the orchestrator prompt and was never once emitted across\n * 220 pages of captured production output. It stays because two clients still\n * register it, but nothing reaches it. Until this definition existed a real\n * `section:metrics` block was claimed by `FeatureSection9PlusDefinition` and\n * rendered as feature cards with icons, prices as card descriptions.\n *\n * ## The value/label inversion\n *\n * This is the one behavioural difference from `KpiSectionDefinition`, and the\n * reason re-pointing that definition at the `metrics` marker would not have\n * been enough. `prompt/base/section:metrics` mandates bolding the **label**:\n *\n * - **<Label>:** <value>\n *\n * while `parseKpiItem` reads the first bold run as the *title* — which every\n * renderer shows as the large numeral. Under that contract a real page renders\n * \"Single-dose liquid price:\" at display size and \"3.9\" as the caption. So here\n * the bold run is the **label** (`description`) and the text after it is the\n * **value** (`title`).\n *\n * The colon is accepted on either side of the bold: the section prompt's\n * template puts it inside (`**Label:**`), the older KPI fixtures put it outside\n * (`**48.8%**:`).\n */\nexport class MetricsSectionDefinition\n implements SectionDefinition<MetricsSectionComponent>\n{\n sectionType = 'metrics' as const;\n\n patterns = [\n 'html_comment[section^=\"metrics\"] > h2 > list{item[1-]:icon? > t+}',\n 'html_comment[section^=\"metrics\"] > h2 > (icon? > t)+',\n ];\n\n defaults: MetricsCompProps = {\n title: 'Key metrics',\n items: [{ title: '12', description: 'Brands carried' }],\n };\n\n fixtures: SectionFixture<MetricsCompProps>[] = [\n {\n markdown: `<!-- section:metrics, semantic:metrics -->\n## Sleep product price ranges and SKUs on this page\n- **Single-dose liquid price:** 3.9\n- **Example SKUs shown:** 8`,\n expected: {\n title: 'Sleep product price ranges and SKUs on this page',\n items: [\n { title: '3.9', description: 'Single-dose liquid price' },\n { title: '8', description: 'Example SKUs shown' },\n ],\n },\n },\n ];\n\n parse(parts: Part[], context?: ParseContext): MetricsCompProps | null {\n const title = headingText(parts, 2);\n const items: MetricsItemCompProps[] = [];\n let dropped = 0;\n\n const collect = (markdown: string) => {\n const parsed = parseMetricItem(markdown);\n if (parsed) {\n items.push(parsed);\n } else if (markdown.trim()) {\n dropped++;\n }\n };\n\n // The shape the section prompt emits: a heading followed by one bullet list.\n for (const list of getPartsByType<ListPart>(parts, 'list')) {\n for (const item of (list.meta?.items ?? []) as Part[]) {\n const itemParts = (item.meta?.parts ?? []) as Part[];\n collect(\n itemParts\n .filter((p) => p.type !== 'icon')\n .map((p) => (p.meta?.markdown as string) || p.content)\n .filter(Boolean)\n .join(' '),\n );\n }\n }\n\n // Fallback: the same facts emitted as loose lines rather than a list.\n if (items.length === 0) {\n for (const part of parts) {\n if (part.type !== 'text' && part.type !== 'richText') {\n continue;\n }\n const markdown = (part.meta?.markdown as string) || part.content || '';\n for (const line of markdown.split('\\n')) {\n collect(line);\n }\n }\n }\n\n if (dropped > 0) {\n context?.reportDiagnostic?.(\n DIAGNOSTIC_TYPES.ITEMS_DROPPED,\n `metrics: ${dropped} item(s) dropped (no bold label, or no value after it)`,\n );\n }\n\n // Nothing usable — reject the match so the block falls through rather than\n // rendering an empty band.\n return items.length > 0 ? { title, items } : null;\n }\n}\n\n/**\n * `**Label:** value` → `{ title: value, description: label }`.\n *\n * Null when there is no bold run, or nothing after it. A metric with no value\n * is malformed rather than merely sparse — the band exists to show a number,\n * and deriving one from the label is exactly what the section prompt forbids —\n * so it is dropped and counted rather than rendered blank.\n */\nfunction parseMetricItem(markdown: string): MetricsItemCompProps | null {\n const trimmed = markdown.trim();\n const boldMatch = trimmed.match(/\\*\\*(.+?)\\*\\*/);\n if (!boldMatch) {\n return null;\n }\n\n const label = boldMatch[1].trim().replace(/:$/, '').trim();\n const value = trimmed\n .slice(trimmed.indexOf(boldMatch[0]) + boldMatch[0].length)\n .replace(/^[:\\s]+/, '')\n .trim();\n\n return value && label ? { title: value, description: label } : null;\n}\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAQA,IAAAE,gBAAA,GAAAF,OAAA;AAEA;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;AACA;AACO,MAAMG,wBAAwB,CAErC;EAAAC,YAAA;IAAA,IAAAC,gBAAA,CAAAC,OAAA,uBACgB,SAAS;IAAA,IAAAD,gBAAA,CAAAC,OAAA,oBAEZ,CACT,mEAAmE,EACnE,sDAAsD,CACvD;IAAA,IAAAD,gBAAA,CAAAC,OAAA,oBAE4B;MAC3BC,KAAK,EAAE,aAAa;MACpBC,KAAK,EAAE,CAAC;QAAED,KAAK,EAAE,IAAI;QAAEE,WAAW,EAAE;MAAiB,CAAC;IACxD,CAAC;IAAA,IAAAJ,gBAAA,CAAAC,OAAA,oBAE8C,CAC7C;MACEI,QAAQ,EAAE;AAChB;AACA;AACA,4BAA4B;MACtBC,QAAQ,EAAE;QACRJ,KAAK,EAAE,kDAAkD;QACzDC,KAAK,EAAE,CACL;UAAED,KAAK,EAAE,KAAK;UAAEE,WAAW,EAAE;QAA2B,CAAC,EACzD;UAAEF,KAAK,EAAE,GAAG;UAAEE,WAAW,EAAE;QAAqB,CAAC;MAErD;IACF,CAAC,CACF;EAAA;EAEDG,KAAKA,CAACC,KAAa,EAAEC,OAAsB,EAA2B;IACpE,MAAMP,KAAK,GAAG,I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,EAAE,CAAC,CACtB7B,IAAI,CAAC,CAAC;EAET,OAAO8B,KAAK,IAAIF,KAAK,GAAG;IAAE1C,KAAK,EAAE4C,KAAK;IAAE1C,WAAW,EAAEwC;EAAM,CAAC,GAAG,IAAI;AACrE","ignoreList":[]}
|
|
@@ -12,6 +12,8 @@ var _HeroEntitySectionDefinition = require("./HeroEntitySectionDefinition");
|
|
|
12
12
|
exports.HeroEntitySectionDefinition = _HeroEntitySectionDefinition.HeroEntitySectionDefinition;
|
|
13
13
|
var _KpiSectionDefinition = require("./KpiSectionDefinition");
|
|
14
14
|
exports.KpiSectionDefinition = _KpiSectionDefinition.KpiSectionDefinition;
|
|
15
|
+
var _MetricsSectionDefinition = require("./MetricsSectionDefinition");
|
|
16
|
+
exports.MetricsSectionDefinition = _MetricsSectionDefinition.MetricsSectionDefinition;
|
|
15
17
|
var _FeatureCardsSectionDefinition = require("./FeatureCardsSectionDefinition");
|
|
16
18
|
exports.FeatureCardsSectionDefinition = _FeatureCardsSectionDefinition.FeatureCardsSectionDefinition;
|
|
17
19
|
var _EntitySectionDefinition = require("./EntitySectionDefinition");
|
|
@@ -45,7 +47,7 @@ var _registry = require("../../registry");
|
|
|
45
47
|
* Registration order determines evaluation priority — first match wins.
|
|
46
48
|
*/
|
|
47
49
|
function createSdkRegistry() {
|
|
48
|
-
return new _registry.ComponentRegistry(null).register(new _SkipNodesSectionDefinition.SkipNodesSectionDefinition()).register(new _SearchSectionDefinition.SearchSectionDefinition()).register(new _KpiSectionDefinition.KpiSectionDefinition()).register(new _NextStepsSectionDefinition.NextStepsSectionDefinition())
|
|
50
|
+
return new _registry.ComponentRegistry(null).register(new _SkipNodesSectionDefinition.SkipNodesSectionDefinition()).register(new _SearchSectionDefinition.SearchSectionDefinition()).register(new _KpiSectionDefinition.KpiSectionDefinition()).register(new _MetricsSectionDefinition.MetricsSectionDefinition()).register(new _NextStepsSectionDefinition.NextStepsSectionDefinition())
|
|
49
51
|
// Collection entities are claimed by their own definition first — it is a
|
|
50
52
|
// strictly narrower match than EntitySectionDefinition, which would
|
|
51
53
|
// otherwise swallow collection, product and article blocks alike.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_ComparisonSectionDefinition","require","exports","ComparisonSectionDefinition","_TextBlockSectionDefinition","TextBlockSectionDefinition","_HeroSectionDefinition","HeroSectionDefinition","_HeroEntitySectionDefinition","HeroEntitySectionDefinition","_KpiSectionDefinition","KpiSectionDefinition","_FeatureCardsSectionDefinition","FeatureCardsSectionDefinition","_EntitySectionDefinition","EntitySectionDefinition","_EntityCollectionSectionDefinition","EntityCollectionSectionDefinition","_CtaBannerSectionDefinition","CtaBannerSectionDefinition","_CalloutSectionDefinition","CalloutSectionDefinition","_NextStepsSectionDefinition","NextStepsSectionDefinition","_FeatureSection9PlusDefinition","FeatureSection9PlusDefinition","_listItemsSectionDefinition","ListItemsSectionDefinition","_SkipNodesSectionDefinition","SkipNodesSectionDefinition","_HtmlCommentSectionDefinition","HtmlCommentSectionDefinition","_SearchSectionDefinition","SearchSectionDefinition","_ErrorSectionDefinition","ErrorSectionDefinition","_FallbackSectionDefinition","FallbackSectionDefinition","_registry","createSdkRegistry","ComponentRegistry","register"],"sources":["../../../../src/component/componentDefinitions/index.ts"],"sourcesContent":["export type { SectionDefinition } from '../section-definition';\nexport { ComparisonSectionDefinition } from './ComparisonSectionDefinition';\nexport { TextBlockSectionDefinition } from './TextBlockSectionDefinition';\nexport { HeroSectionDefinition } from './HeroSectionDefinition';\nexport { HeroEntitySectionDefinition } from './HeroEntitySectionDefinition';\nexport { KpiSectionDefinition } from './KpiSectionDefinition';\nexport { FeatureCardsSectionDefinition } from './FeatureCardsSectionDefinition';\nexport { EntitySectionDefinition } from './EntitySectionDefinition';\nexport { EntityCollectionSectionDefinition } from './EntityCollectionSectionDefinition';\nexport { CtaBannerSectionDefinition } from './CtaBannerSectionDefinition';\nexport { CalloutSectionDefinition } from './CalloutSectionDefinition';\nexport { NextStepsSectionDefinition } from './NextStepsSectionDefinition';\nexport { FeatureSection9PlusDefinition } from './FeatureSection9PlusDefinition';\nexport { ListItemsSectionDefinition } from './listItemsSectionDefinition';\nexport { SkipNodesSectionDefinition } from './SkipNodesSectionDefinition';\nexport { HtmlCommentSectionDefinition } from './HtmlCommentSectionDefinition';\nexport { SearchSectionDefinition } from './SearchSectionDefinition';\nexport { ErrorSectionDefinition } from './ErrorSectionDefinition';\nexport { FallbackSectionDefinition } from './FallbackSectionDefinition';\n\nimport { ComponentRegistry } from '../../registry';\nimport { SkipNodesSectionDefinition } from './SkipNodesSectionDefinition';\nimport { SearchSectionDefinition } from './SearchSectionDefinition';\nimport { KpiSectionDefinition } from './KpiSectionDefinition';\nimport { NextStepsSectionDefinition } from './NextStepsSectionDefinition';\nimport { EntitySectionDefinition } from './EntitySectionDefinition';\nimport { EntityCollectionSectionDefinition } from './EntityCollectionSectionDefinition';\nimport { HeroEntitySectionDefinition } from './HeroEntitySectionDefinition';\nimport { HeroSectionDefinition } from './HeroSectionDefinition';\nimport { FeatureCardsSectionDefinition } from './FeatureCardsSectionDefinition';\nimport { FeatureSection9PlusDefinition } from './FeatureSection9PlusDefinition';\nimport { ListItemsSectionDefinition } from './listItemsSectionDefinition';\nimport { ComparisonSectionDefinition } from './ComparisonSectionDefinition';\nimport { HtmlCommentSectionDefinition } from './HtmlCommentSectionDefinition';\nimport { CtaBannerSectionDefinition } from './CtaBannerSectionDefinition';\nimport { CalloutSectionDefinition } from './CalloutSectionDefinition';\nimport { FallbackSectionDefinition } from './FallbackSectionDefinition';\nimport { ErrorSectionDefinition } from './ErrorSectionDefinition';\nimport { TextBlockSectionDefinition } from './TextBlockSectionDefinition';\n\n/**\n * Creates an SDK registry with all section definitions registered in the\n * same priority order as the app registry (createAppRegistry.ts).\n * Registration order determines evaluation priority — first match wins.\n */\nexport function createSdkRegistry(): ComponentRegistry<null> {\n return (\n new ComponentRegistry<null>(null)\n .register(new SkipNodesSectionDefinition())\n .register(new SearchSectionDefinition())\n .register(new KpiSectionDefinition())\n .register(new NextStepsSectionDefinition())\n // Collection entities are claimed by their own definition first — it is a\n // strictly narrower match than EntitySectionDefinition, which would\n // otherwise swallow collection, product and article blocks alike.\n .register(new EntityCollectionSectionDefinition())\n .register(new EntitySectionDefinition())\n .register(new HeroEntitySectionDefinition())\n .register(new HeroSectionDefinition())\n .register(new FeatureCardsSectionDefinition())\n .register(new ListItemsSectionDefinition())\n .register(new FeatureSection9PlusDefinition())\n .register(new ComparisonSectionDefinition())\n // Callout sits above HtmlComment: a callout block opens with its own\n // `<!-- section:callout -->` descriptor, and HtmlComment's bare\n // `html_comment` pattern would match that comment alone. A pattern may\n // match a PREFIX of a block, so HtmlComment would claim the descriptor\n // and strand the prose below it in the fallback, unstyled.\n .register(new CalloutSectionDefinition())\n .register(new HtmlCommentSectionDefinition())\n .register(new CtaBannerSectionDefinition())\n // textBlock comes after every definition whose block opens `h2 > t`\n // (entity, listItems, featureCards, ctaBanner, comparison, …). Its\n // `h2 > t+` also matches a bare `h2 > t`, and a pattern matches a PREFIX\n // of the block — registered above those it would claim the heading +\n // intro copy and strand the list / links / table that follow in a\n // separate section. It stops before a trailing callout, which Callout\n // (registered above) then claims on the parser's next iteration.\n .register(new TextBlockSectionDefinition())\n .register(new FallbackSectionDefinition())\n .register(new ErrorSectionDefinition())\n );\n}\n"],"mappings":";;;;AACA,IAAAA,4BAAA,GAAAC,OAAA;AAA4EC,OAAA,CAAAC,2BAAA,GAAAH,4BAAA,CAAAG,2BAAA;AAC5E,IAAAC,2BAAA,GAAAH,OAAA;AAA0EC,OAAA,CAAAG,0BAAA,GAAAD,2BAAA,CAAAC,0BAAA;AAC1E,IAAAC,sBAAA,GAAAL,OAAA;AAAgEC,OAAA,CAAAK,qBAAA,GAAAD,sBAAA,CAAAC,qBAAA;AAChE,IAAAC,4BAAA,GAAAP,OAAA;AAA4EC,OAAA,CAAAO,2BAAA,GAAAD,4BAAA,CAAAC,2BAAA;AAC5E,IAAAC,qBAAA,GAAAT,OAAA;AAA8DC,OAAA,CAAAS,oBAAA,GAAAD,qBAAA,CAAAC,oBAAA;AAC9D,IAAAC,
|
|
1
|
+
{"version":3,"names":["_ComparisonSectionDefinition","require","exports","ComparisonSectionDefinition","_TextBlockSectionDefinition","TextBlockSectionDefinition","_HeroSectionDefinition","HeroSectionDefinition","_HeroEntitySectionDefinition","HeroEntitySectionDefinition","_KpiSectionDefinition","KpiSectionDefinition","_MetricsSectionDefinition","MetricsSectionDefinition","_FeatureCardsSectionDefinition","FeatureCardsSectionDefinition","_EntitySectionDefinition","EntitySectionDefinition","_EntityCollectionSectionDefinition","EntityCollectionSectionDefinition","_CtaBannerSectionDefinition","CtaBannerSectionDefinition","_CalloutSectionDefinition","CalloutSectionDefinition","_NextStepsSectionDefinition","NextStepsSectionDefinition","_FeatureSection9PlusDefinition","FeatureSection9PlusDefinition","_listItemsSectionDefinition","ListItemsSectionDefinition","_SkipNodesSectionDefinition","SkipNodesSectionDefinition","_HtmlCommentSectionDefinition","HtmlCommentSectionDefinition","_SearchSectionDefinition","SearchSectionDefinition","_ErrorSectionDefinition","ErrorSectionDefinition","_FallbackSectionDefinition","FallbackSectionDefinition","_registry","createSdkRegistry","ComponentRegistry","register"],"sources":["../../../../src/component/componentDefinitions/index.ts"],"sourcesContent":["export type { SectionDefinition } from '../section-definition';\nexport { ComparisonSectionDefinition } from './ComparisonSectionDefinition';\nexport { TextBlockSectionDefinition } from './TextBlockSectionDefinition';\nexport { HeroSectionDefinition } from './HeroSectionDefinition';\nexport { HeroEntitySectionDefinition } from './HeroEntitySectionDefinition';\nexport { KpiSectionDefinition } from './KpiSectionDefinition';\nexport { MetricsSectionDefinition } from './MetricsSectionDefinition';\nexport { FeatureCardsSectionDefinition } from './FeatureCardsSectionDefinition';\nexport { EntitySectionDefinition } from './EntitySectionDefinition';\nexport { EntityCollectionSectionDefinition } from './EntityCollectionSectionDefinition';\nexport { CtaBannerSectionDefinition } from './CtaBannerSectionDefinition';\nexport { CalloutSectionDefinition } from './CalloutSectionDefinition';\nexport { NextStepsSectionDefinition } from './NextStepsSectionDefinition';\nexport { FeatureSection9PlusDefinition } from './FeatureSection9PlusDefinition';\nexport { ListItemsSectionDefinition } from './listItemsSectionDefinition';\nexport { SkipNodesSectionDefinition } from './SkipNodesSectionDefinition';\nexport { HtmlCommentSectionDefinition } from './HtmlCommentSectionDefinition';\nexport { SearchSectionDefinition } from './SearchSectionDefinition';\nexport { ErrorSectionDefinition } from './ErrorSectionDefinition';\nexport { FallbackSectionDefinition } from './FallbackSectionDefinition';\n\nimport { ComponentRegistry } from '../../registry';\nimport { SkipNodesSectionDefinition } from './SkipNodesSectionDefinition';\nimport { SearchSectionDefinition } from './SearchSectionDefinition';\nimport { KpiSectionDefinition } from './KpiSectionDefinition';\nimport { MetricsSectionDefinition } from './MetricsSectionDefinition';\nimport { NextStepsSectionDefinition } from './NextStepsSectionDefinition';\nimport { EntitySectionDefinition } from './EntitySectionDefinition';\nimport { EntityCollectionSectionDefinition } from './EntityCollectionSectionDefinition';\nimport { HeroEntitySectionDefinition } from './HeroEntitySectionDefinition';\nimport { HeroSectionDefinition } from './HeroSectionDefinition';\nimport { FeatureCardsSectionDefinition } from './FeatureCardsSectionDefinition';\nimport { FeatureSection9PlusDefinition } from './FeatureSection9PlusDefinition';\nimport { ListItemsSectionDefinition } from './listItemsSectionDefinition';\nimport { ComparisonSectionDefinition } from './ComparisonSectionDefinition';\nimport { HtmlCommentSectionDefinition } from './HtmlCommentSectionDefinition';\nimport { CtaBannerSectionDefinition } from './CtaBannerSectionDefinition';\nimport { CalloutSectionDefinition } from './CalloutSectionDefinition';\nimport { FallbackSectionDefinition } from './FallbackSectionDefinition';\nimport { ErrorSectionDefinition } from './ErrorSectionDefinition';\nimport { TextBlockSectionDefinition } from './TextBlockSectionDefinition';\n\n/**\n * Creates an SDK registry with all section definitions registered in the\n * same priority order as the app registry (createAppRegistry.ts).\n * Registration order determines evaluation priority — first match wins.\n */\nexport function createSdkRegistry(): ComponentRegistry<null> {\n return (\n new ComponentRegistry<null>(null)\n .register(new SkipNodesSectionDefinition())\n .register(new SearchSectionDefinition())\n .register(new KpiSectionDefinition())\n .register(new MetricsSectionDefinition())\n .register(new NextStepsSectionDefinition())\n // Collection entities are claimed by their own definition first — it is a\n // strictly narrower match than EntitySectionDefinition, which would\n // otherwise swallow collection, product and article blocks alike.\n .register(new EntityCollectionSectionDefinition())\n .register(new EntitySectionDefinition())\n .register(new HeroEntitySectionDefinition())\n .register(new HeroSectionDefinition())\n .register(new FeatureCardsSectionDefinition())\n .register(new ListItemsSectionDefinition())\n .register(new FeatureSection9PlusDefinition())\n .register(new ComparisonSectionDefinition())\n // Callout sits above HtmlComment: a callout block opens with its own\n // `<!-- section:callout -->` descriptor, and HtmlComment's bare\n // `html_comment` pattern would match that comment alone. A pattern may\n // match a PREFIX of a block, so HtmlComment would claim the descriptor\n // and strand the prose below it in the fallback, unstyled.\n .register(new CalloutSectionDefinition())\n .register(new HtmlCommentSectionDefinition())\n .register(new CtaBannerSectionDefinition())\n // textBlock comes after every definition whose block opens `h2 > t`\n // (entity, listItems, featureCards, ctaBanner, comparison, …). Its\n // `h2 > t+` also matches a bare `h2 > t`, and a pattern matches a PREFIX\n // of the block — registered above those it would claim the heading +\n // intro copy and strand the list / links / table that follow in a\n // separate section. It stops before a trailing callout, which Callout\n // (registered above) then claims on the parser's next iteration.\n .register(new TextBlockSectionDefinition())\n .register(new FallbackSectionDefinition())\n .register(new ErrorSectionDefinition())\n );\n}\n"],"mappings":";;;;AACA,IAAAA,4BAAA,GAAAC,OAAA;AAA4EC,OAAA,CAAAC,2BAAA,GAAAH,4BAAA,CAAAG,2BAAA;AAC5E,IAAAC,2BAAA,GAAAH,OAAA;AAA0EC,OAAA,CAAAG,0BAAA,GAAAD,2BAAA,CAAAC,0BAAA;AAC1E,IAAAC,sBAAA,GAAAL,OAAA;AAAgEC,OAAA,CAAAK,qBAAA,GAAAD,sBAAA,CAAAC,qBAAA;AAChE,IAAAC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B,QAAQ,CAAC,IAAIV,0DAA4B,CAAC,CAAC,CAAC,CAC5CU,QAAQ,CAAC,IAAItB,sDAA0B,CAAC,CAAC;EAC1C;EACA;EACA;EACA;EACA;EACA;EACA;EAAA,CACCsB,QAAQ,CAAC,IAAItC,sDAA0B,CAAC,CAAC,CAAC,CAC1CsC,QAAQ,CAAC,IAAIJ,oDAAyB,CAAC,CAAC,CAAC,CACzCI,QAAQ,CAAC,IAAIN,8CAAsB,CAAC,CAAC,CAAC;AAE7C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/component/types.ts"],"sourcesContent":["import type { FC } from 'react';\nimport type { Callout } from '../types/callout';\n\n/** Props extracted from markdown (base layer). */\nexport interface BaseCompProps {}\nexport interface SlotCompProps extends BaseCompProps {\n callout?: Callout;\n}\n\nexport interface SectionCompProps extends BaseCompProps {\n callout?: Callout;\n}\n\n/** Section props with a slot. TSlot enforces which slot component this section accepts. */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface SectionCompPropsWithSlot<TSlot extends FC<any> = FC<any>>\n extends SectionCompProps {\n slot?: TSlot;\n}\n\n// ----------------------\n// Base Components\n// ----------------------\n\nexport interface TextCompProps extends BaseCompProps {\n content: string;\n variant?: 'h1' | 'h2' | 'body' | 'caption';\n}\n\nexport interface ButtonCompProps extends BaseCompProps {\n label: string;\n variant?: 'primary' | 'secondary' | 'ghost';\n onClick?: string;\n}\n\nexport interface ImageCompProps extends BaseCompProps {\n src: string;\n alt: string;\n ratio?: '16:9' | '4:3' | '1:1' | '9:16' | '3:4';\n}\n\nexport interface BadgeCompProps extends BaseCompProps {\n label: string;\n color?: 'primary' | 'secondary' | 'success' | 'warning' | 'error';\n}\n\n// ----------------------\n// Hero Button (aligned to HeroSection1Button)\n// ----------------------\n\nexport interface HeroButton {\n id: string;\n text: string;\n variant?: 'primary' | 'secondary';\n onClick?: string;\n}\n\n// ----------------------\n// Slot Components\n// ----------------------\n\nexport interface KpiItemCompProps extends SlotCompProps {\n title: string;\n description: string;\n icon?: string;\n}\n\n/** Feature item — aligned to web50-server-ui Feature interface */\nexport interface FeatureItemCompProps extends SlotCompProps {\n title?: string;\n description?: string;\n icon?: string;\n}\n\n/** Feature card — aligned to web50-server-ui FeatureCard */\nexport interface FeatureCardCompProps extends SlotCompProps {\n title: string;\n description: string;\n imageUrl?: string;\n imageFromText?: boolean;\n linkText?: string;\n linkHref?: string;\n callout?: Callout;\n}\n\n/** Resolved entity data (populated at runtime via useResolveGenericEntityData) */\nexport interface EntityItemData {\n url: string;\n title: string;\n type: string;\n description?: string;\n excerpt?: string;\n imageUrl?: string;\n date?: string;\n publishDate?: string;\n author?: string;\n cmsItemId?: string;\n usage?: number;\n tags?: string[];\n /** Product vendor / brand name (e.g. \"HOKA\") */\n vendor?: string;\n /**\n * The `{ name, value }` pairs of the one variant a search matched, in the\n * store's own order. Present only when retrieval resolved the product down\n * to a single variant. The names are the store's own, so read this by\n * iterating it — never by looking a name up.\n */\n matchedOptions?: { name: string; value: string }[];\n /**\n * Id of the one variant a search matched — the same variant `imageUrl`,\n * `url` and `matchedOptions` describe. Bare store id, no `gid://` prefix.\n * A live enricher reads this to price that variant rather than the product.\n */\n variantId?: string;\n /** Whether the matched variant is in stock, as of the last live fetch */\n available?: boolean;\n /** Formatted lowest price across the product's variants (e.g. \"$107.95\") */\n priceMin?: string;\n /** Formatted highest price across the product's variants */\n priceMax?: string;\n /** Formatted price string (e.g. \"542.00 NIS\") */\n price?: string;\n /** Secondary product image URL — shown on hover */\n secondaryImageUrl?: string;\n /** Available sizes for the product */\n sizes?: string[];\n /** Original price before discount (formatted, e.g. \"494.00 NIS\") — shown with strikethrough */\n compareAtPrice?: string;\n /** Discount percentage (e.g. \"30% OFF\") */\n discountPercent?: string;\n /** Product variants with IDs and availability — used for add-to-cart and size display */\n variants?: {\n label: string;\n variantId: string;\n available: boolean;\n selectedOptions?: { name: string; value: string }[];\n price?: string;\n compareAtPrice?: string;\n }[];\n /** All product image URLs (not just featured + secondary) */\n allImages?: string[];\n /** Product option groups (e.g. Size, Color) with their available values */\n options?: { name: string; values: string[] }[];\n}\n\n/** Single entity item within an entity section */\nexport interface EntityItem {\n entityId: string;\n linkText?: string;\n entityType: string;\n entityUrl: string;\n description?: string;\n imageUrl?: string;\n /** Per-item callout from a blockquote inside the list item */\n callout?: Callout;\n /** Resolved at runtime via useResolveGenericEntityData hook; not produced by parse() */\n data?: EntityItemData;\n}\n\n// ---------------------------------------------------------------------------\n// Deprecated aliases — kept for seed-components compilation\n// ---------------------------------------------------------------------------\n/** @deprecated Use EntityItemData */\nexport type GenericEntityData = EntityItemData;\n/** @deprecated Use EntityItemData */\nexport type SolutionEntityData = EntityItemData;\n/** @deprecated Use EntityItemData */\nexport type BlogEntityData = EntityItemData;\n/** @deprecated Use EntityItem */\nexport type GenericEntityCompProps = EntityItem;\n\n/** Comparison row — aligned to web50-server-ui ComparisonRow */\nexport interface ComparisonRow {\n feature: string;\n iconHint?: string;\n values: (boolean | string)[];\n}\n\nexport interface ComparisonColumn {\n label: string;\n href?: string;\n entityId?: string;\n entityType?: string;\n}\n\n/** @deprecated Use Callout from types/callout instead */\nexport interface AiNarrativeCompProps extends SlotCompProps {\n content: string;\n}\n\n// ----------------------\n// Section Components\n// ----------------------\n\n/** Hero — aligned to HeroSection1Props */\nexport interface HeroCompProps extends SectionCompProps {\n headline: string;\n badge?: string | { text: string; showIndicator?: boolean };\n content?: string;\n buttons?: HeroButton[];\n image?: string;\n trailingList?: string;\n leadingQuote?: string;\n}\n\n/**\n * Entity hero — a hero section whose body carries one or more web5 entity\n * links (`web5://entity/...`). Shares the hero framing fields with\n * {@link HeroCompProps} but, instead of CTA buttons, surfaces the entities as\n * resolvable {@link EntityItem}s for rich rendering.\n */\nexport interface HeroEntityCompProps extends SectionCompProps {\n headline: string;\n badge?: string | { text: string; showIndicator?: boolean };\n content?: string;\n image?: string;\n leadingQuote?: string;\n items: EntityItem[];\n}\n\n/** KPI — aligned to KpiSectionProps */\nexport interface KpiCompProps\n extends SectionCompPropsWithSlot<KpiItemComponent> {\n title: string;\n items: KpiItemCompProps[];\n}\n\n/** Feature cards — aligned to FeatureCardsSectionProps */\nexport interface FeatureCardsCompProps extends SectionCompProps {\n cards: FeatureCardCompProps[];\n}\n\n/** Unified entity section — replaces EntityCompProps, SolutionEntityCompProps, BlogEntityCompProps */\nexport interface EntityCompProps extends SectionCompProps {\n title: string;\n description?: string;\n items: EntityItem[];\n}\n\n/** Comparison — aligned to ComparisonSection1Props */\nexport interface ComparisonCompProps extends SectionCompProps {\n title: string;\n description?: string;\n columnLabels: string[];\n columns?: ComparisonColumn[];\n rows: ComparisonRow[];\n featureColumnLabel?: string;\n ctaText?: string;\n ctaHref?: string;\n}\n\n/** General text — aligned to GeneralTextSectionProps (used by Fallback) */\nexport interface GeneralTextCompProps extends SectionCompProps {\n markdown: string;\n}\n\n/** Callout — aligned to CalloutSectionProps */\nexport interface CalloutCompProps extends SectionCompProps {\n callouts: Callout[];\n title?: string;\n relatedLinks?: { text: string; url: string }[];\n}\n\n/** Next steps — aligned to NextStepsSectionProps */\nexport interface NextStepsCompProps extends SectionCompProps {\n title: string;\n body?: string;\n /**\n * True when the chips are already rendered inline inside `body`. Renderers\n * must show `body` alone in that case — listing `steps` as well repeats every\n * chip. `steps` stays populated either way; it is the machine-readable chip\n * list (the scroll chips under the answer are built from it).\n */\n chipsInlineInBody?: boolean;\n backgroundImage?: string;\n steps: { content: string; iconHint?: string }[];\n}\n\n/** Feature section 9+ — aligned to FeatureSection9PlusProps */\nexport interface FeatureSection9PlusCompProps extends SectionCompProps {\n title: string;\n description?: string;\n features: { title?: string; description: string; iconHint?: string }[];\n}\n\n/** List items section — title + a list of feature items. */\nexport interface ListItemsSectionCompProps extends SectionCompProps {\n title: string;\n features: { title?: string; description: string }[];\n}\n\nexport type ListItemsSectionComponent = FC<ListItemsSectionCompProps>;\n\n/** Error — aligned to ErrorSection */\nexport interface ErrorCompProps extends SectionCompProps {\n type: import('../errors/conversationErrorTypes').ConversationErrorType;\n}\n\n/** Skip/HTML/Search — null-component parsers */\nexport interface NullCompProps extends SectionCompProps {}\n\n/** @deprecated Use EntityCompProps */\nexport type SolutionEntityCompProps = EntityCompProps;\n/** @deprecated Use EntityCompProps */\nexport type BlogEntityCompProps = EntityCompProps;\n\n/** CTA Banner — dark purple gradient card with headline, description, and pill link buttons */\nexport interface CtaBannerCompProps extends SectionCompProps {\n headline: string;\n description?: string;\n links: { text: string; href: string }[];\n /** Contextual background image — resolved from allowed keywords during parse() */\n imageUrl?: string;\n imageFromText?: boolean;\n}\n\nexport type CtaBannerSectionComponent = FC<CtaBannerCompProps>;\n\n/** Text block — heading + body with an optional pullquote callout on the side */\nexport interface TextBlockCompProps extends SectionCompProps {\n title: string;\n description: string;\n}\n\n/** Personalized narrative — standalone section with no parse() definition */\nexport interface PersonalizedNarrativeCompProps extends SectionCompProps {\n title: string;\n content?: string;\n}\n\n// --------------------------------\n// Types of component - all components\n// --------------------------------\n\nexport type Component = BaseComponent | SlotComponent | SectionComponent;\n\nexport type BaseComponent = FC<BaseCompProps>;\nexport type SlotComponent = FC<SlotCompProps>;\nexport type SectionComponent = FC<SectionCompProps>;\n\n// Base Components\nexport type TextComponent = FC<TextCompProps>;\nexport type ButtonComponent = FC<ButtonCompProps>;\nexport type ImageComponent = FC<ImageCompProps>;\nexport type BadgeComponent = FC<BadgeCompProps>;\n\n// Slot Components\nexport type KpiItemComponent = FC<KpiItemCompProps>;\nexport type FeatureItemComponent = FC<FeatureItemCompProps>;\nexport type FeatureCardComponent = FC<FeatureCardCompProps>;\n/** @deprecated Use FC<EntityItem> */\nexport type GenericEntityComponent = FC<EntityItem>;\nexport type AiNarrativeComponent = FC<AiNarrativeCompProps>;\n\n// Section Components\nexport type ComparisonSectionComponent = FC<ComparisonCompProps>;\nexport type GeneralTextSectionComponent = FC<GeneralTextCompProps>;\nexport type TextBlockSectionComponent = FC<TextBlockCompProps>;\nexport type HeroSectionComponent = FC<HeroCompProps>;\nexport type HeroEntitySectionComponent = FC<HeroEntityCompProps>;\n\n// section components with slots\nexport type KpiSectionComponent = FC<KpiCompProps>;\nexport type FeatureCardsSectionComponent = FC<FeatureCardsCompProps>;\nexport type EntitySectionComponent = FC<EntityCompProps>;\n\n// New section component types for Phase 4\nexport type CalloutSectionComponent = FC<CalloutCompProps>;\nexport type NextStepsSectionComponent = FC<NextStepsCompProps>;\nexport type FeatureSection9PlusSectionComponent =\n FC<FeatureSection9PlusCompProps>;\nexport type NullSectionComponent = FC<NullCompProps>;\nexport type ErrorSectionComponent = FC<ErrorCompProps>;\nexport type SolutionEntitySectionComponent = FC<SolutionEntityCompProps>;\nexport type BlogEntitySectionComponent = FC<BlogEntityCompProps>;\nexport type PersonalizedNarrativeSectionComponent =\n FC<PersonalizedNarrativeCompProps>;\n\nexport type PropsOf<T> = T extends (props: infer P) => unknown ? P : never;\n\nexport interface SectionFixture<TProps> {\n markdown: string;\n expected: Partial<TProps>;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/component/types.ts"],"sourcesContent":["import type { FC } from 'react';\nimport type { Callout } from '../types/callout';\n\n/** Props extracted from markdown (base layer). */\nexport interface BaseCompProps {}\nexport interface SlotCompProps extends BaseCompProps {\n callout?: Callout;\n}\n\nexport interface SectionCompProps extends BaseCompProps {\n callout?: Callout;\n}\n\n/** Section props with a slot. TSlot enforces which slot component this section accepts. */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport interface SectionCompPropsWithSlot<TSlot extends FC<any> = FC<any>>\n extends SectionCompProps {\n slot?: TSlot;\n}\n\n// ----------------------\n// Base Components\n// ----------------------\n\nexport interface TextCompProps extends BaseCompProps {\n content: string;\n variant?: 'h1' | 'h2' | 'body' | 'caption';\n}\n\nexport interface ButtonCompProps extends BaseCompProps {\n label: string;\n variant?: 'primary' | 'secondary' | 'ghost';\n onClick?: string;\n}\n\nexport interface ImageCompProps extends BaseCompProps {\n src: string;\n alt: string;\n ratio?: '16:9' | '4:3' | '1:1' | '9:16' | '3:4';\n}\n\nexport interface BadgeCompProps extends BaseCompProps {\n label: string;\n color?: 'primary' | 'secondary' | 'success' | 'warning' | 'error';\n}\n\n// ----------------------\n// Hero Button (aligned to HeroSection1Button)\n// ----------------------\n\nexport interface HeroButton {\n id: string;\n text: string;\n variant?: 'primary' | 'secondary';\n onClick?: string;\n}\n\n// ----------------------\n// Slot Components\n// ----------------------\n\nexport interface KpiItemCompProps extends SlotCompProps {\n title: string;\n description: string;\n icon?: string;\n}\n\n/** Feature item — aligned to web50-server-ui Feature interface */\nexport interface FeatureItemCompProps extends SlotCompProps {\n title?: string;\n description?: string;\n icon?: string;\n}\n\n/** Feature card — aligned to web50-server-ui FeatureCard */\nexport interface FeatureCardCompProps extends SlotCompProps {\n title: string;\n description: string;\n imageUrl?: string;\n imageFromText?: boolean;\n linkText?: string;\n linkHref?: string;\n callout?: Callout;\n}\n\n/** Resolved entity data (populated at runtime via useResolveGenericEntityData) */\nexport interface EntityItemData {\n url: string;\n title: string;\n type: string;\n description?: string;\n excerpt?: string;\n imageUrl?: string;\n date?: string;\n publishDate?: string;\n author?: string;\n cmsItemId?: string;\n usage?: number;\n tags?: string[];\n /** Product vendor / brand name (e.g. \"HOKA\") */\n vendor?: string;\n /**\n * The `{ name, value }` pairs of the one variant a search matched, in the\n * store's own order. Present only when retrieval resolved the product down\n * to a single variant. The names are the store's own, so read this by\n * iterating it — never by looking a name up.\n */\n matchedOptions?: { name: string; value: string }[];\n /**\n * Id of the one variant a search matched — the same variant `imageUrl`,\n * `url` and `matchedOptions` describe. Bare store id, no `gid://` prefix.\n * A live enricher reads this to price that variant rather than the product.\n */\n variantId?: string;\n /** Whether the matched variant is in stock, as of the last live fetch */\n available?: boolean;\n /** Formatted lowest price across the product's variants (e.g. \"$107.95\") */\n priceMin?: string;\n /** Formatted highest price across the product's variants */\n priceMax?: string;\n /** Formatted price string (e.g. \"542.00 NIS\") */\n price?: string;\n /** Secondary product image URL — shown on hover */\n secondaryImageUrl?: string;\n /** Available sizes for the product */\n sizes?: string[];\n /** Original price before discount (formatted, e.g. \"494.00 NIS\") — shown with strikethrough */\n compareAtPrice?: string;\n /** Discount percentage (e.g. \"30% OFF\") */\n discountPercent?: string;\n /** Product variants with IDs and availability — used for add-to-cart and size display */\n variants?: {\n label: string;\n variantId: string;\n available: boolean;\n selectedOptions?: { name: string; value: string }[];\n price?: string;\n compareAtPrice?: string;\n }[];\n /** All product image URLs (not just featured + secondary) */\n allImages?: string[];\n /** Product option groups (e.g. Size, Color) with their available values */\n options?: { name: string; values: string[] }[];\n}\n\n/** Single entity item within an entity section */\nexport interface EntityItem {\n entityId: string;\n linkText?: string;\n entityType: string;\n entityUrl: string;\n description?: string;\n imageUrl?: string;\n /** Per-item callout from a blockquote inside the list item */\n callout?: Callout;\n /** Resolved at runtime via useResolveGenericEntityData hook; not produced by parse() */\n data?: EntityItemData;\n}\n\n// ---------------------------------------------------------------------------\n// Deprecated aliases — kept for seed-components compilation\n// ---------------------------------------------------------------------------\n/** @deprecated Use EntityItemData */\nexport type GenericEntityData = EntityItemData;\n/** @deprecated Use EntityItemData */\nexport type SolutionEntityData = EntityItemData;\n/** @deprecated Use EntityItemData */\nexport type BlogEntityData = EntityItemData;\n/** @deprecated Use EntityItem */\nexport type GenericEntityCompProps = EntityItem;\n\n/** Comparison row — aligned to web50-server-ui ComparisonRow */\nexport interface ComparisonRow {\n feature: string;\n iconHint?: string;\n values: (boolean | string)[];\n}\n\nexport interface ComparisonColumn {\n label: string;\n href?: string;\n entityId?: string;\n entityType?: string;\n}\n\n/** @deprecated Use Callout from types/callout instead */\nexport interface AiNarrativeCompProps extends SlotCompProps {\n content: string;\n}\n\n// ----------------------\n// Section Components\n// ----------------------\n\n/** Hero — aligned to HeroSection1Props */\nexport interface HeroCompProps extends SectionCompProps {\n headline: string;\n badge?: string | { text: string; showIndicator?: boolean };\n content?: string;\n buttons?: HeroButton[];\n image?: string;\n trailingList?: string;\n leadingQuote?: string;\n}\n\n/**\n * Entity hero — a hero section whose body carries one or more web5 entity\n * links (`web5://entity/...`). Shares the hero framing fields with\n * {@link HeroCompProps} but, instead of CTA buttons, surfaces the entities as\n * resolvable {@link EntityItem}s for rich rendering.\n */\nexport interface HeroEntityCompProps extends SectionCompProps {\n headline: string;\n badge?: string | { text: string; showIndicator?: boolean };\n content?: string;\n image?: string;\n leadingQuote?: string;\n items: EntityItem[];\n}\n\n/** KPI — aligned to KpiSectionProps */\nexport interface KpiCompProps\n extends SectionCompPropsWithSlot<KpiItemComponent> {\n title: string;\n items: KpiItemCompProps[];\n}\n\n/**\n * Metrics — a band of headline facts about one subject.\n *\n * `title` is the VALUE (the large numeral) and `description` its LABEL. That\n * ordering is deliberate and is the inverse of how the markdown reads, which\n * bolds the label: see `MetricsSectionDefinition` for why.\n */\nexport interface MetricsItemCompProps extends SlotCompProps {\n title: string;\n description: string;\n icon?: string;\n}\n\n/** Metrics — aligned to MetricsSectionProps */\nexport interface MetricsCompProps\n extends SectionCompPropsWithSlot<MetricsItemComponent> {\n title: string;\n items: MetricsItemCompProps[];\n}\n\n/** Feature cards — aligned to FeatureCardsSectionProps */\nexport interface FeatureCardsCompProps extends SectionCompProps {\n cards: FeatureCardCompProps[];\n}\n\n/** Unified entity section — replaces EntityCompProps, SolutionEntityCompProps, BlogEntityCompProps */\nexport interface EntityCompProps extends SectionCompProps {\n title: string;\n description?: string;\n items: EntityItem[];\n}\n\n/** Comparison — aligned to ComparisonSection1Props */\nexport interface ComparisonCompProps extends SectionCompProps {\n title: string;\n description?: string;\n columnLabels: string[];\n columns?: ComparisonColumn[];\n rows: ComparisonRow[];\n featureColumnLabel?: string;\n ctaText?: string;\n ctaHref?: string;\n}\n\n/** General text — aligned to GeneralTextSectionProps (used by Fallback) */\nexport interface GeneralTextCompProps extends SectionCompProps {\n markdown: string;\n}\n\n/** Callout — aligned to CalloutSectionProps */\nexport interface CalloutCompProps extends SectionCompProps {\n callouts: Callout[];\n title?: string;\n relatedLinks?: { text: string; url: string }[];\n}\n\n/** Next steps — aligned to NextStepsSectionProps */\nexport interface NextStepsCompProps extends SectionCompProps {\n title: string;\n body?: string;\n /**\n * True when the chips are already rendered inline inside `body`. Renderers\n * must show `body` alone in that case — listing `steps` as well repeats every\n * chip. `steps` stays populated either way; it is the machine-readable chip\n * list (the scroll chips under the answer are built from it).\n */\n chipsInlineInBody?: boolean;\n backgroundImage?: string;\n steps: { content: string; iconHint?: string }[];\n}\n\n/** Feature section 9+ — aligned to FeatureSection9PlusProps */\nexport interface FeatureSection9PlusCompProps extends SectionCompProps {\n title: string;\n description?: string;\n features: { title?: string; description: string; iconHint?: string }[];\n}\n\n/** List items section — title + a list of feature items. */\nexport interface ListItemsSectionCompProps extends SectionCompProps {\n title: string;\n features: { title?: string; description: string }[];\n}\n\nexport type ListItemsSectionComponent = FC<ListItemsSectionCompProps>;\n\n/** Error — aligned to ErrorSection */\nexport interface ErrorCompProps extends SectionCompProps {\n type: import('../errors/conversationErrorTypes').ConversationErrorType;\n}\n\n/** Skip/HTML/Search — null-component parsers */\nexport interface NullCompProps extends SectionCompProps {}\n\n/** @deprecated Use EntityCompProps */\nexport type SolutionEntityCompProps = EntityCompProps;\n/** @deprecated Use EntityCompProps */\nexport type BlogEntityCompProps = EntityCompProps;\n\n/** CTA Banner — dark purple gradient card with headline, description, and pill link buttons */\nexport interface CtaBannerCompProps extends SectionCompProps {\n headline: string;\n description?: string;\n links: { text: string; href: string }[];\n /** Contextual background image — resolved from allowed keywords during parse() */\n imageUrl?: string;\n imageFromText?: boolean;\n}\n\nexport type CtaBannerSectionComponent = FC<CtaBannerCompProps>;\n\n/** Text block — heading + body with an optional pullquote callout on the side */\nexport interface TextBlockCompProps extends SectionCompProps {\n title: string;\n description: string;\n}\n\n/** Personalized narrative — standalone section with no parse() definition */\nexport interface PersonalizedNarrativeCompProps extends SectionCompProps {\n title: string;\n content?: string;\n}\n\n// --------------------------------\n// Types of component - all components\n// --------------------------------\n\nexport type Component = BaseComponent | SlotComponent | SectionComponent;\n\nexport type BaseComponent = FC<BaseCompProps>;\nexport type SlotComponent = FC<SlotCompProps>;\nexport type SectionComponent = FC<SectionCompProps>;\n\n// Base Components\nexport type TextComponent = FC<TextCompProps>;\nexport type ButtonComponent = FC<ButtonCompProps>;\nexport type ImageComponent = FC<ImageCompProps>;\nexport type BadgeComponent = FC<BadgeCompProps>;\n\n// Slot Components\nexport type KpiItemComponent = FC<KpiItemCompProps>;\nexport type MetricsItemComponent = FC<MetricsItemCompProps>;\nexport type FeatureItemComponent = FC<FeatureItemCompProps>;\nexport type FeatureCardComponent = FC<FeatureCardCompProps>;\n/** @deprecated Use FC<EntityItem> */\nexport type GenericEntityComponent = FC<EntityItem>;\nexport type AiNarrativeComponent = FC<AiNarrativeCompProps>;\n\n// Section Components\nexport type ComparisonSectionComponent = FC<ComparisonCompProps>;\nexport type GeneralTextSectionComponent = FC<GeneralTextCompProps>;\nexport type TextBlockSectionComponent = FC<TextBlockCompProps>;\nexport type HeroSectionComponent = FC<HeroCompProps>;\nexport type HeroEntitySectionComponent = FC<HeroEntityCompProps>;\n\n// section components with slots\nexport type KpiSectionComponent = FC<KpiCompProps>;\nexport type MetricsSectionComponent = FC<MetricsCompProps>;\nexport type FeatureCardsSectionComponent = FC<FeatureCardsCompProps>;\nexport type EntitySectionComponent = FC<EntityCompProps>;\n\n// New section component types for Phase 4\nexport type CalloutSectionComponent = FC<CalloutCompProps>;\nexport type NextStepsSectionComponent = FC<NextStepsCompProps>;\nexport type FeatureSection9PlusSectionComponent =\n FC<FeatureSection9PlusCompProps>;\nexport type NullSectionComponent = FC<NullCompProps>;\nexport type ErrorSectionComponent = FC<ErrorCompProps>;\nexport type SolutionEntitySectionComponent = FC<SolutionEntityCompProps>;\nexport type BlogEntitySectionComponent = FC<BlogEntityCompProps>;\nexport type PersonalizedNarrativeSectionComponent =\n FC<PersonalizedNarrativeCompProps>;\n\nexport type PropsOf<T> = T extends (props: infer P) => unknown ? P : never;\n\nexport interface SectionFixture<TProps> {\n markdown: string;\n expected: Partial<TProps>;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -130,9 +130,10 @@
|
|
|
130
130
|
* deliberately keeps its own near-black, because that one is a status message
|
|
131
131
|
* rather than a label and should not read as an action.
|
|
132
132
|
*
|
|
133
|
-
*
|
|
134
|
-
* the
|
|
135
|
-
*
|
|
133
|
+
* The buttons are icon-only at every width, so this bubble is the only place
|
|
134
|
+
* the actions are spelled out on a pointer device. Hover and focus-within
|
|
135
|
+
* both, so a keyboard user tabbing through the header gets the same
|
|
136
|
+
* affordance instead of two unexplained icons.
|
|
136
137
|
*/
|
|
137
138
|
.web5-user-query__tooltip {
|
|
138
139
|
position: absolute;
|
|
@@ -161,11 +162,13 @@
|
|
|
161
162
|
}
|
|
162
163
|
|
|
163
164
|
/*
|
|
164
|
-
*
|
|
165
|
-
* permanently in the way.
|
|
166
|
-
* actually names them for anyone who needs
|
|
165
|
+
* Mobile: no hover to open the bubble on, so it would be either permanently
|
|
166
|
+
* invisible or permanently in the way. Nothing is shown there — the buttons
|
|
167
|
+
* carry `aria-label`, which is what actually names them for anyone who needs
|
|
168
|
+
* it. Both queries, because `hover: none` is the precise question and
|
|
169
|
+
* `pointer: coarse` is the one older engines answer.
|
|
167
170
|
*/
|
|
168
|
-
@media (pointer: coarse) {
|
|
171
|
+
@media (hover: none), (pointer: coarse) {
|
|
169
172
|
.web5-user-query__tooltip {
|
|
170
173
|
display: none;
|
|
171
174
|
}
|
|
@@ -378,44 +378,36 @@ const UserQuery = ({
|
|
|
378
378
|
lineNumber: 324,
|
|
379
379
|
columnNumber: 41
|
|
380
380
|
}
|
|
381
|
-
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
382
|
-
className: "hidden sm:inline",
|
|
383
|
-
__self: void 0,
|
|
384
|
-
__source: {
|
|
385
|
-
fileName: _jsxFileName,
|
|
386
|
-
lineNumber: 325,
|
|
387
|
-
columnNumber: 13
|
|
388
|
-
}
|
|
389
|
-
}, isLoading ? 'Sharing…' : isCopied ? copiedLabel : 'Share')), !isCopied && /*#__PURE__*/_react.default.createElement("span", {
|
|
381
|
+
})), shareState === 'idle' && /*#__PURE__*/_react.default.createElement("span", {
|
|
390
382
|
className: "web5-user-query__tooltip",
|
|
391
383
|
role: "tooltip",
|
|
392
384
|
__self: void 0,
|
|
393
385
|
__source: {
|
|
394
386
|
fileName: _jsxFileName,
|
|
395
|
-
lineNumber:
|
|
387
|
+
lineNumber: 333,
|
|
396
388
|
columnNumber: 13
|
|
397
389
|
}
|
|
398
|
-
}, "Share this"),
|
|
399
|
-
className: "web5-user-query__copied-toast
|
|
390
|
+
}, "Share this"), shareState !== 'idle' && /*#__PURE__*/_react.default.createElement("div", {
|
|
391
|
+
className: "web5-user-query__copied-toast absolute top-full right-0 mt-1 flex items-center gap-2 bg-[#2b2b2b] text-white text-[12px] leading-none px-3 py-2 rounded-[8px] whitespace-nowrap",
|
|
400
392
|
__self: void 0,
|
|
401
393
|
__source: {
|
|
402
394
|
fileName: _jsxFileName,
|
|
403
|
-
lineNumber:
|
|
395
|
+
lineNumber: 345,
|
|
404
396
|
columnNumber: 13
|
|
405
397
|
}
|
|
406
|
-
}, /*#__PURE__*/_react.default.createElement(_CheckIcon.CheckIcon, {
|
|
398
|
+
}, isCopied && /*#__PURE__*/_react.default.createElement(_CheckIcon.CheckIcon, {
|
|
407
399
|
__self: void 0,
|
|
408
400
|
__source: {
|
|
409
401
|
fileName: _jsxFileName,
|
|
410
|
-
lineNumber:
|
|
411
|
-
columnNumber:
|
|
402
|
+
lineNumber: 346,
|
|
403
|
+
columnNumber: 28
|
|
412
404
|
}
|
|
413
|
-
}), copiedLabel)), onNewConversation && /*#__PURE__*/_react.default.createElement("div", {
|
|
405
|
+
}), isLoading ? 'Sharing…' : copiedLabel)), onNewConversation && /*#__PURE__*/_react.default.createElement("div", {
|
|
414
406
|
className: "web5-user-query__action group relative",
|
|
415
407
|
__self: void 0,
|
|
416
408
|
__source: {
|
|
417
409
|
fileName: _jsxFileName,
|
|
418
|
-
lineNumber:
|
|
410
|
+
lineNumber: 352,
|
|
419
411
|
columnNumber: 11
|
|
420
412
|
}
|
|
421
413
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
@@ -426,31 +418,23 @@ const UserQuery = ({
|
|
|
426
418
|
__self: void 0,
|
|
427
419
|
__source: {
|
|
428
420
|
fileName: _jsxFileName,
|
|
429
|
-
lineNumber:
|
|
421
|
+
lineNumber: 353,
|
|
430
422
|
columnNumber: 13
|
|
431
423
|
}
|
|
432
424
|
}, /*#__PURE__*/_react.default.createElement(_PlusIcon.PlusIcon, {
|
|
433
425
|
__self: void 0,
|
|
434
426
|
__source: {
|
|
435
427
|
fileName: _jsxFileName,
|
|
436
|
-
lineNumber:
|
|
437
|
-
columnNumber: 15
|
|
438
|
-
}
|
|
439
|
-
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
440
|
-
className: "hidden sm:inline",
|
|
441
|
-
__self: void 0,
|
|
442
|
-
__source: {
|
|
443
|
-
fileName: _jsxFileName,
|
|
444
|
-
lineNumber: 356,
|
|
428
|
+
lineNumber: 359,
|
|
445
429
|
columnNumber: 15
|
|
446
430
|
}
|
|
447
|
-
}
|
|
431
|
+
})), /*#__PURE__*/_react.default.createElement("span", {
|
|
448
432
|
className: "web5-user-query__tooltip",
|
|
449
433
|
role: "tooltip",
|
|
450
434
|
__self: void 0,
|
|
451
435
|
__source: {
|
|
452
436
|
fileName: _jsxFileName,
|
|
453
|
-
lineNumber:
|
|
437
|
+
lineNumber: 361,
|
|
454
438
|
columnNumber: 13
|
|
455
439
|
}
|
|
456
440
|
}, newConversationLabel)), onToggleCommentMode && /*#__PURE__*/_react.default.createElement("button", {
|
|
@@ -463,14 +447,14 @@ const UserQuery = ({
|
|
|
463
447
|
__self: void 0,
|
|
464
448
|
__source: {
|
|
465
449
|
fileName: _jsxFileName,
|
|
466
|
-
lineNumber:
|
|
450
|
+
lineNumber: 367,
|
|
467
451
|
columnNumber: 11
|
|
468
452
|
}
|
|
469
453
|
}, /*#__PURE__*/_react.default.createElement(_CommentIcon.CommentIcon, {
|
|
470
454
|
__self: void 0,
|
|
471
455
|
__source: {
|
|
472
456
|
fileName: _jsxFileName,
|
|
473
|
-
lineNumber:
|
|
457
|
+
lineNumber: 379,
|
|
474
458
|
columnNumber: 13
|
|
475
459
|
}
|
|
476
460
|
}), commentCount > 0 && /*#__PURE__*/_react.default.createElement("span", {
|
|
@@ -478,7 +462,7 @@ const UserQuery = ({
|
|
|
478
462
|
__self: void 0,
|
|
479
463
|
__source: {
|
|
480
464
|
fileName: _jsxFileName,
|
|
481
|
-
lineNumber:
|
|
465
|
+
lineNumber: 381,
|
|
482
466
|
columnNumber: 15
|
|
483
467
|
}
|
|
484
468
|
}, commentCount))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_ShareIcon","_CheckIcon","_PlusIcon","_UndoIcon","_RedoIcon","_CommentIcon","_navigationStack","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DEFAULT_LOADING_MESSAGES","headerClassName","UserQuery","query","onNewConversation","onNavigateToTriggerId","predecessorTriggerId","currentTriggerId","onShare","onToggleCommentMode","commentMode","commentCount","loading","newConversationLabel","copiedLabel","copiedDurationMs","productBackContext","onBackToProduct","forwardStack","useMemo","getForwardStack","canGoForward","length","canGoBack","hasNavigation","handleBack","useCallback","pushToForwardStack","handleForward","nextTid","popFromForwardStack","handleNewConversation","clearForwardStack","shareState","setShareState","useState","productImageError","setProductImageError","useEffect","imageUrl","handleShare","urlToCopy","window","location","href","err","console","warn","navigator","clipboard","writeText","catch","setTimeout","cyclingMessages","messages","cycledMessage","setCycledMessage","progressMessage","index","interval","setInterval","clearInterval","isCopied","isLoading","productBadge","title","backUrl","label","canNavigateBack","content","createElement","Fragment","UndoIcon","className","__self","__source","fileName","lineNumber","columnNumber","src","alt","onError","type","onClick","progressText","role","pendingQuery","disabled","RedoIcon","CheckIcon","ShareIcon","PlusIcon","CommentIcon","exports"],"sources":["../../../../src/components/ui/UserQuery.tsx"],"sourcesContent":["import React, { FC, useCallback, useEffect, useMemo, useState } from 'react';\nimport { ShareIcon } from './icons/ShareIcon';\nimport { CheckIcon } from './icons/CheckIcon';\nimport { PlusIcon } from './icons/PlusIcon';\nimport { UndoIcon } from './icons/UndoIcon';\nimport { RedoIcon } from './icons/RedoIcon';\nimport { CommentIcon } from './icons/CommentIcon';\nimport {\n getForwardStack,\n pushToForwardStack,\n popFromForwardStack,\n clearForwardStack,\n} from '../../utils/navigationStack';\n\ntype ShareState = 'idle' | 'loading' | 'copied';\n\nconst DEFAULT_LOADING_MESSAGES = [\n 'Thinking…',\n 'Recognizing intent…',\n 'Connecting the dots…',\n 'Synthesizing insights…',\n 'Formulating a response…',\n];\n\nconst headerClassName =\n 'web5-user-query sticky top-0 z-10 flex items-center justify-between bg-white/60 backdrop-blur-sm pl-5 pr-[10px] py-[7px] sm:px-[30px] sm:py-[17px]';\n\nexport interface UserQueryLoadingState {\n pendingQuery: string;\n /** Static progress message. If omitted, falls back to cycling through `messages`. */\n progressMessage?: string;\n /** Messages cycled while loading when `progressMessage` is not set. */\n messages?: string[];\n}\n\n/**\n * Product the visitor was redirected from (DL #114). Rendered as a back badge\n * above the query: back arrow + thumbnail + product name. All fields are\n * resolved and validated app-side (allowed-domain `backUrl`, `https:`\n * `imageUrl`) before reaching this presentational component.\n */\nexport interface ProductBackContext {\n /** Product display name. Required — without it the badge does not render. */\n title: string;\n /** Validated product thumbnail URL. Omitted/failed to load → arrow + title only. */\n imageUrl?: string;\n /** Validated product-page URL to return to. Omitted → badge is non-clickable. */\n backUrl?: string;\n /** Accessible label override. Defaults to `Back to ${title}`. */\n label?: string;\n}\n\nexport interface UserQueryProps {\n query: string;\n onNewConversation?: () => void;\n onNavigateToTriggerId?: (triggerId: string) => void;\n predecessorTriggerId?: string;\n currentTriggerId?: string;\n onShare?: (triggerId: string) => Promise<string>;\n /** Optional comment-mode toggle. When provided, render the chat-bubble\n * toggle button next to Share. The button reflects `commentMode` via\n * `is-on` styling and `aria-pressed`. */\n onToggleCommentMode?: () => void;\n commentMode?: boolean;\n /** Total number of comments on this response — shown as a badge next to the\n * toggle when > 0. */\n commentCount?: number;\n loading?: UserQueryLoadingState;\n /** Label for the \"new conversation\" action. Defaults to \"New conversation\". */\n newConversationLabel?: string;\n /** Label shown after the share link is copied. Defaults to \"Link Copied\". */\n copiedLabel?: string;\n /** How long the copied state stays visible, in ms. Defaults to 2000. */\n copiedDurationMs?: number;\n /** When set (visitor arrived from a product page), render a back-to-product\n * badge above the query (DL #114). */\n productBackContext?: ProductBackContext;\n /** Invoked with the validated `backUrl` when the badge is activated. */\n onBackToProduct?: (backUrl: string) => void;\n}\n\nexport const UserQuery: FC<UserQueryProps> = ({\n query,\n onNewConversation,\n onNavigateToTriggerId,\n predecessorTriggerId,\n currentTriggerId,\n onShare,\n onToggleCommentMode,\n commentMode = false,\n commentCount = 0,\n loading,\n newConversationLabel = 'New conversation',\n copiedLabel = 'Link Copied',\n copiedDurationMs = 2000,\n productBackContext,\n onBackToProduct,\n}) => {\n const forwardStack = useMemo(() => getForwardStack(), [currentTriggerId]);\n const canGoForward = forwardStack.length > 0;\n const canGoBack = !!predecessorTriggerId;\n const hasNavigation = canGoBack || canGoForward;\n\n const handleBack = useCallback(() => {\n if (!predecessorTriggerId || !currentTriggerId || !onNavigateToTriggerId) {\n return;\n }\n pushToForwardStack(currentTriggerId);\n onNavigateToTriggerId(predecessorTriggerId);\n }, [predecessorTriggerId, currentTriggerId, onNavigateToTriggerId]);\n\n const handleForward = useCallback(() => {\n if (!onNavigateToTriggerId) {\n return;\n }\n const nextTid = popFromForwardStack();\n if (!nextTid) {\n return;\n }\n onNavigateToTriggerId(nextTid);\n }, [onNavigateToTriggerId]);\n\n const handleNewConversation = useCallback(() => {\n clearForwardStack();\n onNewConversation?.();\n }, [onNewConversation]);\n\n const [shareState, setShareState] = useState<ShareState>('idle');\n\n const [productImageError, setProductImageError] = useState(false);\n useEffect(() => {\n setProductImageError(false);\n }, [productBackContext?.imageUrl]);\n\n const handleShare = useCallback(async () => {\n if (shareState !== 'idle') {\n return;\n }\n setShareState('loading');\n let urlToCopy = window.location.href;\n try {\n if (onShare && currentTriggerId) {\n urlToCopy = await onShare(currentTriggerId);\n }\n } catch (err) {\n console.warn('[share] failed, falling back to current URL:', err);\n }\n navigator.clipboard\n .writeText(urlToCopy)\n .catch((err) => console.warn('[share] clipboard write failed:', err));\n setShareState('copied');\n setTimeout(() => setShareState('idle'), copiedDurationMs);\n }, [shareState, onShare, currentTriggerId, copiedDurationMs]);\n\n const cyclingMessages = useMemo(\n () =>\n loading?.messages && loading.messages.length > 0\n ? loading.messages\n : DEFAULT_LOADING_MESSAGES,\n [loading?.messages],\n );\n const [cycledMessage, setCycledMessage] = useState(cyclingMessages[0]);\n\n useEffect(() => {\n if (!loading || loading.progressMessage) {\n return;\n }\n setCycledMessage(cyclingMessages[0]);\n if (cyclingMessages.length <= 1) {\n return;\n }\n let index = 0;\n const interval = setInterval(() => {\n index = (index + 1) % cyclingMessages.length;\n setCycledMessage(cyclingMessages[index]);\n }, 4000);\n return () => clearInterval(interval);\n }, [loading, cyclingMessages]);\n\n if (!query && !loading) {\n return null;\n }\n\n const isCopied = shareState === 'copied';\n const isLoading = shareState === 'loading';\n\n const productBadge = productBackContext\n ? (() => {\n const { title, imageUrl, backUrl, label } = productBackContext;\n const canNavigateBack = !!backUrl && !!onBackToProduct;\n const content = (\n <>\n <UndoIcon className=\"web5-user-query__product-back-icon\" />\n {imageUrl && !productImageError && (\n <span className=\"web5-user-query__product-back-thumb\">\n <img\n src={imageUrl}\n alt=\"\"\n onError={() => setProductImageError(true)}\n />\n </span>\n )}\n <span className=\"web5-user-query__product-back-title\">{title}</span>\n </>\n );\n return canNavigateBack ? (\n <button\n type=\"button\"\n onClick={() => onBackToProduct?.(backUrl!)}\n aria-label={label ?? `Back to ${title}`}\n className=\"web5-user-query__product-back\"\n >\n {content}\n </button>\n ) : (\n <div className=\"web5-user-query__product-back web5-user-query__product-back--static\">\n {content}\n </div>\n );\n })()\n : null;\n\n if (loading) {\n const progressText = loading.progressMessage ?? cycledMessage;\n return (\n <div\n className={headerClassName}\n role=\"status\"\n aria-busy=\"true\"\n aria-live=\"polite\"\n >\n <div className=\"web5-user-query__left flex-1\">\n {productBadge}\n <p\n className=\"text-[14px] leading-5 text-text-body truncate min-w-0 max-w-[700px]\"\n title={`Asking: ${loading.pendingQuery}`}\n >\n <span className=\"text-text-body/70\">Asking: </span>\n {loading.pendingQuery}\n </p>\n </div>\n {progressText && (\n <div className=\"hidden sm:flex items-center gap-2 ml-[10px] shrink-0 min-w-0\">\n <div\n className=\"w-4 h-4 shrink-0 animate-spin inline-block border-[2px] border-current border-t-transparent text-blue-600 dark:text-blue-500 rounded-full\"\n aria-hidden=\"true\"\n />\n <p className=\"text-[13px] leading-5 text-text-body/70 truncate max-w-[240px]\">\n {progressText}\n </p>\n </div>\n )}\n </div>\n );\n }\n\n return (\n <div className={headerClassName}>\n <div className=\"flex items-center gap-[30px] flex-1 min-w-0\">\n <div className=\"web5-user-query__left\">\n {productBadge}\n <p\n className=\"web5-user-query__title text-[14px] leading-5 text-text-body truncate min-w-0 max-w-[700px]\"\n title={query}\n >\n {query}\n </p>\n </div>\n {hasNavigation && (\n <div className=\"flex items-center gap-[9px]\">\n <button\n type=\"button\"\n onClick={handleBack}\n disabled={!canGoBack}\n title=\"Go to previous conversation\"\n aria-label=\"Go to previous conversation\"\n className=\"w-6 h-6 flex items-center justify-center text-text-body hover:text-black transition-colors bg-transparent border-0 cursor-pointer disabled:opacity-30 disabled:cursor-default\"\n >\n <UndoIcon />\n </button>\n <button\n type=\"button\"\n onClick={handleForward}\n disabled={!canGoForward}\n title=\"Go to next conversation\"\n aria-label=\"Go to next conversation\"\n className=\"w-6 h-6 flex items-center justify-center text-text-body hover:text-black transition-colors bg-transparent border-0 cursor-pointer disabled:opacity-30 disabled:cursor-default\"\n >\n <RedoIcon />\n </button>\n </div>\n )}\n </div>\n <div className=\"flex items-center gap-[10px] ml-[10px] sm:ml-0 shrink-0\">\n {/*\n Keyboard hint. It used to sit inside the prompt field, which was the\n wrong home for it twice over: it competed with the placeholder for the\n same space, and it disappeared exactly when the reader engaged with\n the input — so the shortcut was only ever advertised to someone who\n was not using it. Here it sits with the other page-level affordances\n and stays legible while the reader types.\n\n `aria-hidden` because the shortcut is already announced on the input\n itself via `aria-keyshortcuts`; this is the visual reminder, and\n repeating it to assistive tech would just be noise.\n */}\n <span className=\"web5-prompt-hint\" aria-hidden=\"true\">\n Press <kbd className=\"web5-prompt-hint__key\">/</kbd> to search\n </span>\n {/* Share button — wraps button + tooltips in a relative container */}\n <div className=\"web5-user-query__action group relative\">\n <button\n type=\"button\"\n aria-label=\"Share this\"\n onClick={handleShare}\n disabled={isLoading || isCopied}\n className={`web5-user-query__share flex items-center gap-2 p-[6px] sm:px-[13px] sm:py-[5px] rounded-[30px] text-[13px] leading-5 border-0 cursor-pointer transition-colors disabled:cursor-default\n ${\n isCopied\n ? 'is-copied bg-[#2b2b2b] text-white'\n : 'text-text-body bg-white hover:bg-gray-50'\n }`}\n >\n {isCopied ? <CheckIcon /> : <ShareIcon />}\n <span className=\"hidden sm:inline\">\n {isLoading ? 'Sharing…' : isCopied ? copiedLabel : 'Share'}\n </span>\n </button>\n {/*\n Hover tooltip. Suppressed once the link is copied, because the\n copied state is its own message and two overlapping bubbles saying\n different things is worse than none.\n */}\n {!isCopied && (\n <span className=\"web5-user-query__tooltip\" role=\"tooltip\">\n Share this\n </span>\n )}\n {/* Mobile-only tooltip: drops below the button when link is copied */}\n {isCopied && (\n <div className=\"web5-user-query__copied-toast sm:hidden absolute top-full right-0 mt-1 flex items-center gap-2 bg-[#2b2b2b] text-white text-[12px] leading-none px-3 py-2 rounded-[8px] whitespace-nowrap\">\n <CheckIcon />\n {copiedLabel}\n </div>\n )}\n </div>\n {onNewConversation && (\n <div className=\"web5-user-query__action group relative\">\n <button\n type=\"button\"\n aria-label={newConversationLabel}\n onClick={handleNewConversation}\n className=\"web5-user-query__new-conversation flex items-center gap-2 p-[6px] sm:px-[13px] sm:py-[5px] rounded-[30px] text-[13px] leading-5 text-text-body bg-white border-0 cursor-pointer hover:bg-gray-50 transition-colors\"\n >\n <PlusIcon />\n <span className=\"hidden sm:inline\">{newConversationLabel}</span>\n </button>\n <span className=\"web5-user-query__tooltip\" role=\"tooltip\">\n {newConversationLabel}\n </span>\n </div>\n )}\n {onToggleCommentMode && (\n <button\n type=\"button\"\n onClick={onToggleCommentMode}\n aria-pressed={commentMode}\n title=\"Add a comment\"\n aria-label=\"Add a comment\"\n className={`relative flex items-center gap-2 p-[6px] sm:px-[13px] sm:py-[5px] rounded-[30px] text-[13px] leading-5 border-0 cursor-pointer transition-colors ${\n commentMode\n ? 'bg-[#2b2b2b] text-white'\n : 'text-text-body bg-white hover:bg-gray-50'\n }`}\n >\n <CommentIcon />\n {commentCount > 0 && (\n <span\n className={`absolute -top-1 -right-1 min-w-[18px] h-[18px] px-1 rounded-full text-[10px] leading-[18px] text-center font-semibold ${\n commentMode ? 'bg-white text-[#2b2b2b]' : 'bg-[#2b2b2b] text-white'\n }`}\n >\n {commentCount}\n </span>\n )}\n </button>\n )}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,gBAAA,GAAAP,OAAA;AAKqC,IAAAQ,YAAA;AAAA,SAAAT,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,UAAA;MAAAC,YAAA;IAAA;EAAA,CAAE,CAAC,EACdnE,YAAY,GAAG,CAAC,iBACfzC,MAAA,CAAAqB,OAAA,CAAA+E,aAAA;IACEG,SAAS,EAAE,yHACT/D,WAAW,GAAG,yBAAyB,GAAG,yBAAyB,EAClE;IAAAgE,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAhG,YAAA;MAAAiG,UAAA;MAAAC,YAAA;IAAA;EAAA,GAEFnE,YACG,CAEF,CAEP,CACF,CAAC;AAEV,CAAC;AAACkF,OAAA,CAAA3F,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_ShareIcon","_CheckIcon","_PlusIcon","_UndoIcon","_RedoIcon","_CommentIcon","_navigationStack","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DEFAULT_LOADING_MESSAGES","headerClassName","UserQuery","query","onNewConversation","onNavigateToTriggerId","predecessorTriggerId","currentTriggerId","onShare","onToggleCommentMode","commentMode","commentCount","loading","newConversationLabel","copiedLabel","copiedDurationMs","productBackContext","onBackToProduct","forwardStack","useMemo","getForwardStack","canGoForward","length","canGoBack","hasNavigation","handleBack","useCallback","pushToForwardStack","handleForward","nextTid","popFromForwardStack","handleNewConversation","clearForwardStack","shareState","setShareState","useState","productImageError","setProductImageError","useEffect","imageUrl","handleShare","urlToCopy","window","location","href","err","console","warn","navigator","clipboard","writeText","catch","setTimeout","cyclingMessages","messages","cycledMessage","setCycledMessage","progressMessage","index","interval","setInterval","clearInterval","isCopied","isLoading","productBadge","title","backUrl","label","canNavigateBack","content","createElement","Fragment","UndoIcon","className","__self","__source","fileName","lineNumber","columnNumber","src","alt","onError","type","onClick","progressText","role","pendingQuery","disabled","RedoIcon","CheckIcon","ShareIcon","PlusIcon","CommentIcon","exports"],"sources":["../../../../src/components/ui/UserQuery.tsx"],"sourcesContent":["import React, { FC, useCallback, useEffect, useMemo, useState } from 'react';\nimport { ShareIcon } from './icons/ShareIcon';\nimport { CheckIcon } from './icons/CheckIcon';\nimport { PlusIcon } from './icons/PlusIcon';\nimport { UndoIcon } from './icons/UndoIcon';\nimport { RedoIcon } from './icons/RedoIcon';\nimport { CommentIcon } from './icons/CommentIcon';\nimport {\n getForwardStack,\n pushToForwardStack,\n popFromForwardStack,\n clearForwardStack,\n} from '../../utils/navigationStack';\n\ntype ShareState = 'idle' | 'loading' | 'copied';\n\nconst DEFAULT_LOADING_MESSAGES = [\n 'Thinking…',\n 'Recognizing intent…',\n 'Connecting the dots…',\n 'Synthesizing insights…',\n 'Formulating a response…',\n];\n\nconst headerClassName =\n 'web5-user-query sticky top-0 z-10 flex items-center justify-between bg-white/60 backdrop-blur-sm pl-5 pr-[10px] py-[7px] sm:px-[30px] sm:py-[17px]';\n\nexport interface UserQueryLoadingState {\n pendingQuery: string;\n /** Static progress message. If omitted, falls back to cycling through `messages`. */\n progressMessage?: string;\n /** Messages cycled while loading when `progressMessage` is not set. */\n messages?: string[];\n}\n\n/**\n * Product the visitor was redirected from (DL #114). Rendered as a back badge\n * above the query: back arrow + thumbnail + product name. All fields are\n * resolved and validated app-side (allowed-domain `backUrl`, `https:`\n * `imageUrl`) before reaching this presentational component.\n */\nexport interface ProductBackContext {\n /** Product display name. Required — without it the badge does not render. */\n title: string;\n /** Validated product thumbnail URL. Omitted/failed to load → arrow + title only. */\n imageUrl?: string;\n /** Validated product-page URL to return to. Omitted → badge is non-clickable. */\n backUrl?: string;\n /** Accessible label override. Defaults to `Back to ${title}`. */\n label?: string;\n}\n\nexport interface UserQueryProps {\n query: string;\n onNewConversation?: () => void;\n onNavigateToTriggerId?: (triggerId: string) => void;\n predecessorTriggerId?: string;\n currentTriggerId?: string;\n onShare?: (triggerId: string) => Promise<string>;\n /** Optional comment-mode toggle. When provided, render the chat-bubble\n * toggle button next to Share. The button reflects `commentMode` via\n * `is-on` styling and `aria-pressed`. */\n onToggleCommentMode?: () => void;\n commentMode?: boolean;\n /** Total number of comments on this response — shown as a badge next to the\n * toggle when > 0. */\n commentCount?: number;\n loading?: UserQueryLoadingState;\n /** Label for the \"new conversation\" action. Defaults to \"New conversation\". */\n newConversationLabel?: string;\n /** Label shown after the share link is copied. Defaults to \"Link Copied\". */\n copiedLabel?: string;\n /** How long the copied state stays visible, in ms. Defaults to 2000. */\n copiedDurationMs?: number;\n /** When set (visitor arrived from a product page), render a back-to-product\n * badge above the query (DL #114). */\n productBackContext?: ProductBackContext;\n /** Invoked with the validated `backUrl` when the badge is activated. */\n onBackToProduct?: (backUrl: string) => void;\n}\n\nexport const UserQuery: FC<UserQueryProps> = ({\n query,\n onNewConversation,\n onNavigateToTriggerId,\n predecessorTriggerId,\n currentTriggerId,\n onShare,\n onToggleCommentMode,\n commentMode = false,\n commentCount = 0,\n loading,\n newConversationLabel = 'New conversation',\n copiedLabel = 'Link Copied',\n copiedDurationMs = 2000,\n productBackContext,\n onBackToProduct,\n}) => {\n const forwardStack = useMemo(() => getForwardStack(), [currentTriggerId]);\n const canGoForward = forwardStack.length > 0;\n const canGoBack = !!predecessorTriggerId;\n const hasNavigation = canGoBack || canGoForward;\n\n const handleBack = useCallback(() => {\n if (!predecessorTriggerId || !currentTriggerId || !onNavigateToTriggerId) {\n return;\n }\n pushToForwardStack(currentTriggerId);\n onNavigateToTriggerId(predecessorTriggerId);\n }, [predecessorTriggerId, currentTriggerId, onNavigateToTriggerId]);\n\n const handleForward = useCallback(() => {\n if (!onNavigateToTriggerId) {\n return;\n }\n const nextTid = popFromForwardStack();\n if (!nextTid) {\n return;\n }\n onNavigateToTriggerId(nextTid);\n }, [onNavigateToTriggerId]);\n\n const handleNewConversation = useCallback(() => {\n clearForwardStack();\n onNewConversation?.();\n }, [onNewConversation]);\n\n const [shareState, setShareState] = useState<ShareState>('idle');\n\n const [productImageError, setProductImageError] = useState(false);\n useEffect(() => {\n setProductImageError(false);\n }, [productBackContext?.imageUrl]);\n\n const handleShare = useCallback(async () => {\n if (shareState !== 'idle') {\n return;\n }\n setShareState('loading');\n let urlToCopy = window.location.href;\n try {\n if (onShare && currentTriggerId) {\n urlToCopy = await onShare(currentTriggerId);\n }\n } catch (err) {\n console.warn('[share] failed, falling back to current URL:', err);\n }\n navigator.clipboard\n .writeText(urlToCopy)\n .catch((err) => console.warn('[share] clipboard write failed:', err));\n setShareState('copied');\n setTimeout(() => setShareState('idle'), copiedDurationMs);\n }, [shareState, onShare, currentTriggerId, copiedDurationMs]);\n\n const cyclingMessages = useMemo(\n () =>\n loading?.messages && loading.messages.length > 0\n ? loading.messages\n : DEFAULT_LOADING_MESSAGES,\n [loading?.messages],\n );\n const [cycledMessage, setCycledMessage] = useState(cyclingMessages[0]);\n\n useEffect(() => {\n if (!loading || loading.progressMessage) {\n return;\n }\n setCycledMessage(cyclingMessages[0]);\n if (cyclingMessages.length <= 1) {\n return;\n }\n let index = 0;\n const interval = setInterval(() => {\n index = (index + 1) % cyclingMessages.length;\n setCycledMessage(cyclingMessages[index]);\n }, 4000);\n return () => clearInterval(interval);\n }, [loading, cyclingMessages]);\n\n if (!query && !loading) {\n return null;\n }\n\n const isCopied = shareState === 'copied';\n const isLoading = shareState === 'loading';\n\n const productBadge = productBackContext\n ? (() => {\n const { title, imageUrl, backUrl, label } = productBackContext;\n const canNavigateBack = !!backUrl && !!onBackToProduct;\n const content = (\n <>\n <UndoIcon className=\"web5-user-query__product-back-icon\" />\n {imageUrl && !productImageError && (\n <span className=\"web5-user-query__product-back-thumb\">\n <img\n src={imageUrl}\n alt=\"\"\n onError={() => setProductImageError(true)}\n />\n </span>\n )}\n <span className=\"web5-user-query__product-back-title\">{title}</span>\n </>\n );\n return canNavigateBack ? (\n <button\n type=\"button\"\n onClick={() => onBackToProduct?.(backUrl!)}\n aria-label={label ?? `Back to ${title}`}\n className=\"web5-user-query__product-back\"\n >\n {content}\n </button>\n ) : (\n <div className=\"web5-user-query__product-back web5-user-query__product-back--static\">\n {content}\n </div>\n );\n })()\n : null;\n\n if (loading) {\n const progressText = loading.progressMessage ?? cycledMessage;\n return (\n <div\n className={headerClassName}\n role=\"status\"\n aria-busy=\"true\"\n aria-live=\"polite\"\n >\n <div className=\"web5-user-query__left flex-1\">\n {productBadge}\n <p\n className=\"text-[14px] leading-5 text-text-body truncate min-w-0 max-w-[700px]\"\n title={`Asking: ${loading.pendingQuery}`}\n >\n <span className=\"text-text-body/70\">Asking: </span>\n {loading.pendingQuery}\n </p>\n </div>\n {progressText && (\n <div className=\"hidden sm:flex items-center gap-2 ml-[10px] shrink-0 min-w-0\">\n <div\n className=\"w-4 h-4 shrink-0 animate-spin inline-block border-[2px] border-current border-t-transparent text-blue-600 dark:text-blue-500 rounded-full\"\n aria-hidden=\"true\"\n />\n <p className=\"text-[13px] leading-5 text-text-body/70 truncate max-w-[240px]\">\n {progressText}\n </p>\n </div>\n )}\n </div>\n );\n }\n\n return (\n <div className={headerClassName}>\n <div className=\"flex items-center gap-[30px] flex-1 min-w-0\">\n <div className=\"web5-user-query__left\">\n {productBadge}\n <p\n className=\"web5-user-query__title text-[14px] leading-5 text-text-body truncate min-w-0 max-w-[700px]\"\n title={query}\n >\n {query}\n </p>\n </div>\n {hasNavigation && (\n <div className=\"flex items-center gap-[9px]\">\n <button\n type=\"button\"\n onClick={handleBack}\n disabled={!canGoBack}\n title=\"Go to previous conversation\"\n aria-label=\"Go to previous conversation\"\n className=\"w-6 h-6 flex items-center justify-center text-text-body hover:text-black transition-colors bg-transparent border-0 cursor-pointer disabled:opacity-30 disabled:cursor-default\"\n >\n <UndoIcon />\n </button>\n <button\n type=\"button\"\n onClick={handleForward}\n disabled={!canGoForward}\n title=\"Go to next conversation\"\n aria-label=\"Go to next conversation\"\n className=\"w-6 h-6 flex items-center justify-center text-text-body hover:text-black transition-colors bg-transparent border-0 cursor-pointer disabled:opacity-30 disabled:cursor-default\"\n >\n <RedoIcon />\n </button>\n </div>\n )}\n </div>\n <div className=\"flex items-center gap-[10px] ml-[10px] sm:ml-0 shrink-0\">\n {/*\n Keyboard hint. It used to sit inside the prompt field, which was the\n wrong home for it twice over: it competed with the placeholder for the\n same space, and it disappeared exactly when the reader engaged with\n the input — so the shortcut was only ever advertised to someone who\n was not using it. Here it sits with the other page-level affordances\n and stays legible while the reader types.\n\n `aria-hidden` because the shortcut is already announced on the input\n itself via `aria-keyshortcuts`; this is the visual reminder, and\n repeating it to assistive tech would just be noise.\n */}\n <span className=\"web5-prompt-hint\" aria-hidden=\"true\">\n Press <kbd className=\"web5-prompt-hint__key\">/</kbd> to search\n </span>\n {/* Share button — wraps button + tooltips in a relative container */}\n <div className=\"web5-user-query__action group relative\">\n <button\n type=\"button\"\n aria-label=\"Share this\"\n onClick={handleShare}\n disabled={isLoading || isCopied}\n className={`web5-user-query__share flex items-center gap-2 p-[6px] sm:px-[13px] sm:py-[5px] rounded-[30px] text-[13px] leading-5 border-0 cursor-pointer transition-colors disabled:cursor-default\n ${\n isCopied\n ? 'is-copied bg-[#2b2b2b] text-white'\n : 'text-text-body bg-white hover:bg-gray-50'\n }`}\n >\n {isCopied ? <CheckIcon /> : <ShareIcon />}\n </button>\n {/*\n Hover tooltip — the only place this action is named now that the\n button is icon-only at every width. Shown solely while the share is\n idle: the status bubble below drops into the same slot, and two\n overlapping bubbles saying different things is worse than one.\n */}\n {shareState === 'idle' && (\n <span className=\"web5-user-query__tooltip\" role=\"tooltip\">\n Share this\n </span>\n )}\n {/*\n Status bubble — while the link is being built, and once it is on the\n clipboard. It used to be mobile-only, because the desktop button\n carried \"Sharing…\" / \"Link Copied\" in its own label; with the label\n gone this is the only thing reporting the outcome, so it shows at\n every width.\n */}\n {shareState !== 'idle' && (\n <div className=\"web5-user-query__copied-toast absolute top-full right-0 mt-1 flex items-center gap-2 bg-[#2b2b2b] text-white text-[12px] leading-none px-3 py-2 rounded-[8px] whitespace-nowrap\">\n {isCopied && <CheckIcon />}\n {isLoading ? 'Sharing…' : copiedLabel}\n </div>\n )}\n </div>\n {onNewConversation && (\n <div className=\"web5-user-query__action group relative\">\n <button\n type=\"button\"\n aria-label={newConversationLabel}\n onClick={handleNewConversation}\n className=\"web5-user-query__new-conversation flex items-center gap-2 p-[6px] sm:px-[13px] sm:py-[5px] rounded-[30px] text-[13px] leading-5 text-text-body bg-white border-0 cursor-pointer hover:bg-gray-50 transition-colors\"\n >\n <PlusIcon />\n </button>\n <span className=\"web5-user-query__tooltip\" role=\"tooltip\">\n {newConversationLabel}\n </span>\n </div>\n )}\n {onToggleCommentMode && (\n <button\n type=\"button\"\n onClick={onToggleCommentMode}\n aria-pressed={commentMode}\n title=\"Add a comment\"\n aria-label=\"Add a comment\"\n className={`relative flex items-center gap-2 p-[6px] sm:px-[13px] sm:py-[5px] rounded-[30px] text-[13px] leading-5 border-0 cursor-pointer transition-colors ${\n commentMode\n ? 'bg-[#2b2b2b] text-white'\n : 'text-text-body bg-white hover:bg-gray-50'\n }`}\n >\n <CommentIcon />\n {commentCount > 0 && (\n <span\n className={`absolute -top-1 -right-1 min-w-[18px] h-[18px] px-1 rounded-full text-[10px] leading-[18px] text-center font-semibold ${\n commentMode ? 'bg-white text-[#2b2b2b]' : 'bg-[#2b2b2b] text-white'\n }`}\n >\n {commentCount}\n </span>\n )}\n </button>\n )}\n </div>\n </div>\n );\n};\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AACA,IAAAO,gBAAA,GAAAP,OAAA;AAKqC,IAAAQ,YAAA;AAAA,SAAAT,wBAAAU,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAZ,uBAAA,YAAAA,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