Publish fashion-products bundle from Hyper3Labs/hyperview-spaces@34c5bb1
Browse files
bundle/api/panels/content/fashion-typed-search-business-evidence-v3/fashion-search-readout/panel.js
CHANGED
|
@@ -68,5 +68,5 @@ export default function FashionSearchPanel() {
|
|
| 68 |
const models = props.models || {};
|
| 69 |
return /* @__PURE__ */ React.createElement(Panel, null, /* @__PURE__ */ React.createElement("div", { className: "fs-root" }, /* @__PURE__ */ React.createElement("style", null, `
|
| 70 |
.fs-root,.fs-root *{box-sizing:border-box}.fs-root{flex:1;min-height:0;overflow:auto;padding:14px;background:var(--hv-color-background);color:var(--hv-color-foreground);font:11px/1.42 system-ui,-apple-system,BlinkMacSystemFont,sans-serif}.fs-kicker{display:block;color:var(--hv-color-muted-foreground);font-size:9px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}.fs-header h2{margin:3px 0 0;font-size:18px;line-height:1.15;letter-spacing:-.02em}.fs-header p{margin:6px 0 0;color:var(--hv-color-muted-foreground)}.fs-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:11px}.fs-tab{border:1px solid var(--hv-color-border);border-radius:8px;padding:9px 8px;background:var(--hv-color-surface);color:var(--hv-color-muted-foreground);cursor:pointer;font-weight:760}.fs-tab:hover{border-color:color-mix(in srgb,var(--hv-color-accent) 55%,var(--hv-color-border));color:var(--hv-color-foreground)}.fs-tab.is-active{border-color:var(--hv-color-accent);background:color-mix(in srgb,var(--hv-color-accent) 20%,var(--hv-color-surface));color:var(--hv-color-foreground);box-shadow:inset 0 0 0 1px var(--hv-color-accent)}.fs-query{margin:10px 0 0;padding:8px 9px;border-left:2px solid var(--hv-color-accent);background:var(--hv-color-surface-muted);font-size:12px;font-weight:660}.fs-visual{display:grid;grid-template-columns:104px minmax(0,1fr);gap:9px;align-items:center;width:100%;margin-top:9px;border:1px solid var(--hv-color-border);border-radius:8px;padding:7px;background:var(--hv-color-surface);color:var(--hv-color-foreground);text-align:left;cursor:pointer}.fs-visual img{width:104px;height:96px;object-fit:contain;border-radius:5px;background:var(--hv-color-surface-muted)}.fs-visual strong,.fs-visual small{display:block}.fs-visual strong{margin-top:3px;font-size:12px}.fs-visual small{margin-top:3px;color:var(--hv-color-muted-foreground);font-size:9px}.fs-models{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:9px}.fs-model{border:1px solid var(--hv-color-border);border-radius:8px;padding:9px;background:var(--hv-color-surface)}.fs-model-top{display:flex;justify-content:space-between;gap:6px;font-weight:750}.fs-model-top span{display:flex;align-items:center;gap:5px}.fs-model-top i{width:7px;height:7px;border-radius:99px}.fs-model-top strong{font-size:17px}.fs-model>small{display:block;color:var(--hv-color-muted-foreground);font-size:8px}.fs-model p{margin:6px 0 0;color:var(--hv-color-muted-foreground);font-size:9px}.fs-cases{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:9px}.fs-case{border:1px solid var(--hv-color-border);border-radius:8px;padding:8px;background:var(--hv-color-surface);color:var(--hv-color-foreground);text-align:left;cursor:pointer}.fs-case:hover{border-color:color-mix(in srgb,var(--hv-color-accent) 55%,var(--hv-color-border))}.fs-case[aria-pressed=true]{border-color:var(--hv-color-accent);background:color-mix(in srgb,var(--hv-color-accent) 16%,var(--hv-color-surface));box-shadow:inset 0 0 0 1px var(--hv-color-accent)}.fs-case strong,.fs-case small{display:block}.fs-case small{margin-top:2px;color:var(--hv-color-muted-foreground);font-size:8px}.fs-benchmark{margin-top:13px;border-top:1px solid var(--hv-color-border);padding-top:10px}.fs-benchmark h3{margin:3px 0 2px;font-size:12px}.fs-caption{margin:0 0 7px;color:var(--hv-color-muted-foreground);font-size:9px}.fs-table{width:100%;border-collapse:collapse;font-size:9px}.fs-table th,.fs-table td{padding:5px 4px;border-bottom:1px solid var(--hv-color-border);text-align:right}.fs-table th:first-child,.fs-table td:first-child{text-align:left}.fs-table th{color:var(--hv-color-muted-foreground);font-size:8px;text-transform:uppercase}.fs-note{margin:7px 0 0;color:var(--hv-color-muted-foreground);font-size:9px}.fs-error{color:#ef4444}.fs-busy{opacity:.62}@media(max-width:390px){.fs-root{padding:10px}.fs-models{grid-template-columns:1fr}.fs-visual{grid-template-columns:82px minmax(0,1fr)}.fs-visual img{width:82px;height:78px}}
|
| 71 |
-
`), /* @__PURE__ */ React.createElement("header", { className: "fs-header" }, /* @__PURE__ */ React.createElement("span", { className: "fs-kicker" }, "Catalog search"), /* @__PURE__ */ React.createElement("h2", null, mode === "photo" ? "Same product, another photo. Can search find it?" : `Does search find ${active.label.toLowerCase()}?`), /* @__PURE__ */ React.createElement("p", null, mode === "photo" ? "Use one product photo to find its other catalog views." : "Compare the same detailed request across both models.")), /* @__PURE__ */ React.createElement("nav", { className: "fs-tabs", "aria-label": "Search type" }, /* @__PURE__ */ React.createElement("button", { type: "button", className: `fs-tab${mode === "photo" ? " is-active" : ""}`, onClick: () => present(activePhoto, "photo") }, "Photo match"), /* @__PURE__ */ React.createElement("button", { type: "button", className: `fs-tab${mode === "text" ? " is-active" : ""}`, onClick: () => present(activeText, "text") }, "Typed search")), mode === "text" ? /* @__PURE__ */ React.createElement("blockquote", { className: "fs-query" }, "\u201C", active.query, "\u201D") : null, /* @__PURE__ */ React.createElement("button", { type: "button", className: "fs-visual", onClick: () => void setSelection([visualSampleId]) }, visualUrl ? /* @__PURE__ */ React.createElement("img", { src: visualUrl, alt: active.label }) : null, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("span", { className: "fs-kicker" }, mode === "photo" ? "Starting photo" : "Matching product"), /* @__PURE__ */ React.createElement("strong", null, active.label), /* @__PURE__ */ React.createElement("small", null, mode === "photo" ? active.context : "Any view of this product counts as a match.")
|
| 72 |
}
|
|
|
|
| 68 |
const models = props.models || {};
|
| 69 |
return /* @__PURE__ */ React.createElement(Panel, null, /* @__PURE__ */ React.createElement("div", { className: "fs-root" }, /* @__PURE__ */ React.createElement("style", null, `
|
| 70 |
.fs-root,.fs-root *{box-sizing:border-box}.fs-root{flex:1;min-height:0;overflow:auto;padding:14px;background:var(--hv-color-background);color:var(--hv-color-foreground);font:11px/1.42 system-ui,-apple-system,BlinkMacSystemFont,sans-serif}.fs-kicker{display:block;color:var(--hv-color-muted-foreground);font-size:9px;font-weight:800;letter-spacing:.09em;text-transform:uppercase}.fs-header h2{margin:3px 0 0;font-size:18px;line-height:1.15;letter-spacing:-.02em}.fs-header p{margin:6px 0 0;color:var(--hv-color-muted-foreground)}.fs-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:11px}.fs-tab{border:1px solid var(--hv-color-border);border-radius:8px;padding:9px 8px;background:var(--hv-color-surface);color:var(--hv-color-muted-foreground);cursor:pointer;font-weight:760}.fs-tab:hover{border-color:color-mix(in srgb,var(--hv-color-accent) 55%,var(--hv-color-border));color:var(--hv-color-foreground)}.fs-tab.is-active{border-color:var(--hv-color-accent);background:color-mix(in srgb,var(--hv-color-accent) 20%,var(--hv-color-surface));color:var(--hv-color-foreground);box-shadow:inset 0 0 0 1px var(--hv-color-accent)}.fs-query{margin:10px 0 0;padding:8px 9px;border-left:2px solid var(--hv-color-accent);background:var(--hv-color-surface-muted);font-size:12px;font-weight:660}.fs-visual{display:grid;grid-template-columns:104px minmax(0,1fr);gap:9px;align-items:center;width:100%;margin-top:9px;border:1px solid var(--hv-color-border);border-radius:8px;padding:7px;background:var(--hv-color-surface);color:var(--hv-color-foreground);text-align:left;cursor:pointer}.fs-visual img{width:104px;height:96px;object-fit:contain;border-radius:5px;background:var(--hv-color-surface-muted)}.fs-visual strong,.fs-visual small{display:block}.fs-visual strong{margin-top:3px;font-size:12px}.fs-visual small{margin-top:3px;color:var(--hv-color-muted-foreground);font-size:9px}.fs-models{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:9px}.fs-model{border:1px solid var(--hv-color-border);border-radius:8px;padding:9px;background:var(--hv-color-surface)}.fs-model-top{display:flex;justify-content:space-between;gap:6px;font-weight:750}.fs-model-top span{display:flex;align-items:center;gap:5px}.fs-model-top i{width:7px;height:7px;border-radius:99px}.fs-model-top strong{font-size:17px}.fs-model>small{display:block;color:var(--hv-color-muted-foreground);font-size:8px}.fs-model p{margin:6px 0 0;color:var(--hv-color-muted-foreground);font-size:9px}.fs-cases{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:9px}.fs-case{border:1px solid var(--hv-color-border);border-radius:8px;padding:8px;background:var(--hv-color-surface);color:var(--hv-color-foreground);text-align:left;cursor:pointer}.fs-case:hover{border-color:color-mix(in srgb,var(--hv-color-accent) 55%,var(--hv-color-border))}.fs-case[aria-pressed=true]{border-color:var(--hv-color-accent);background:color-mix(in srgb,var(--hv-color-accent) 16%,var(--hv-color-surface));box-shadow:inset 0 0 0 1px var(--hv-color-accent)}.fs-case strong,.fs-case small{display:block}.fs-case small{margin-top:2px;color:var(--hv-color-muted-foreground);font-size:8px}.fs-benchmark{margin-top:13px;border-top:1px solid var(--hv-color-border);padding-top:10px}.fs-benchmark h3{margin:3px 0 2px;font-size:12px}.fs-caption{margin:0 0 7px;color:var(--hv-color-muted-foreground);font-size:9px}.fs-table{width:100%;border-collapse:collapse;font-size:9px}.fs-table th,.fs-table td{padding:5px 4px;border-bottom:1px solid var(--hv-color-border);text-align:right}.fs-table th:first-child,.fs-table td:first-child{text-align:left}.fs-table th{color:var(--hv-color-muted-foreground);font-size:8px;text-transform:uppercase}.fs-note{margin:7px 0 0;color:var(--hv-color-muted-foreground);font-size:9px}.fs-error{color:#ef4444}.fs-busy{opacity:.62}@media(max-width:390px){.fs-root{padding:10px}.fs-models{grid-template-columns:1fr}.fs-visual{grid-template-columns:82px minmax(0,1fr)}.fs-visual img{width:82px;height:78px}}
|
| 71 |
+
`), /* @__PURE__ */ React.createElement("header", { className: "fs-header" }, /* @__PURE__ */ React.createElement("span", { className: "fs-kicker" }, "Catalog search"), /* @__PURE__ */ React.createElement("h2", null, mode === "photo" ? "Same product, another photo. Can search find it?" : `Does search find ${active.label.toLowerCase()}?`), /* @__PURE__ */ React.createElement("p", null, mode === "photo" ? "Use one product photo to find its other catalog views." : "Compare the same detailed request across both models.")), /* @__PURE__ */ React.createElement("nav", { className: "fs-tabs", "aria-label": "Search type" }, /* @__PURE__ */ React.createElement("button", { type: "button", className: `fs-tab${mode === "photo" ? " is-active" : ""}`, onClick: () => present(activePhoto, "photo") }, "Photo match"), /* @__PURE__ */ React.createElement("button", { type: "button", className: `fs-tab${mode === "text" ? " is-active" : ""}`, onClick: () => present(activeText, "text") }, "Typed search")), mode === "text" ? /* @__PURE__ */ React.createElement("blockquote", { className: "fs-query" }, "\u201C", active.query, "\u201D") : null, /* @__PURE__ */ React.createElement("button", { type: "button", className: "fs-visual", onClick: () => void setSelection([visualSampleId]) }, visualUrl ? /* @__PURE__ */ React.createElement("img", { src: visualUrl, alt: active.label }) : null, /* @__PURE__ */ React.createElement("span", null, /* @__PURE__ */ React.createElement("span", { className: "fs-kicker" }, mode === "photo" ? "Starting photo" : "Matching product"), /* @__PURE__ */ React.createElement("strong", null, active.label), /* @__PURE__ */ React.createElement("small", null, mode === "photo" ? active.context : "Any view of this product counts as a match."))), /* @__PURE__ */ React.createElement("section", { className: "fs-models", "aria-label": "First matching product rank" }, /* @__PURE__ */ React.createElement(ModelCard, { name: "Hyper3-CLIP", checkpoint: models.hyper3 || "v1", color: "#60a5fa", rank: active.target.hyper3Rank, readout: active.modelReadout.hyper3 }), /* @__PURE__ */ React.createElement(ModelCard, { name: "OpenAI CLIP", checkpoint: models.clip || "ViT-B/32", color: "#f59e0b", rank: active.target.clipRank, readout: active.modelReadout.clip })), mode === "photo" ? /* @__PURE__ */ React.createElement("nav", { className: "fs-cases", "aria-label": "Photo matching examples" }, photoCases.map((item) => /* @__PURE__ */ React.createElement("button", { key: item.id, type: "button", className: `fs-case${busy ? " fs-busy" : ""}`, "aria-pressed": item.id === active.id, disabled: busy, onClick: () => present(item, "photo") }, /* @__PURE__ */ React.createElement("strong", null, item.label), /* @__PURE__ */ React.createElement("small", null, item.context)))) : textCases.length > 1 ? /* @__PURE__ */ React.createElement("nav", { className: "fs-cases", "aria-label": "Typed search examples" }, textCases.map((item) => /* @__PURE__ */ React.createElement("button", { key: item.id, type: "button", className: `fs-case${busy ? " fs-busy" : ""}`, "aria-pressed": item.id === active.id, disabled: busy, onClick: () => present(item, "text") }, /* @__PURE__ */ React.createElement("strong", null, item.label), /* @__PURE__ */ React.createElement("small", null, item.target.hyper3Rank === 1 ? "Hyper3 first" : item.target.clipRank === 1 ? "CLIP first" : "Compare ranks")))) : null, /* @__PURE__ */ React.createElement("section", { className: "fs-benchmark", "aria-label": "Full benchmark results" }, /* @__PURE__ */ React.createElement("span", { className: "fs-kicker" }, "How the models compare"), mode === "photo" ? /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("h3", null, photoBenchmark.queryCount, " queries \xB7 ", photoBenchmark.candidateCount, " catalog photos"), /* @__PURE__ */ React.createElement("p", { className: "fs-caption" }, "Correct means another view of the same product, not a similar style."), /* @__PURE__ */ React.createElement("table", { className: "fs-table" }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Correct product"), /* @__PURE__ */ React.createElement("th", { style: { color: "#60a5fa" } }, "Hyper3"), /* @__PURE__ */ React.createElement("th", { style: { color: "#f59e0b" } }, "CLIP"))), /* @__PURE__ */ React.createElement("tbody", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("td", null, "Ranked first"), /* @__PURE__ */ React.createElement("td", null, percentage(photoBenchmark.hyper3R1)), /* @__PURE__ */ React.createElement("td", null, percentage(photoBenchmark.clipR1))), /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("td", null, "Within top ten"), /* @__PURE__ */ React.createElement("td", null, percentage(photoBenchmark.hyper3R10)), /* @__PURE__ */ React.createElement("td", null, percentage(photoBenchmark.clipR10))), /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("td", null, "Mean average precision"), /* @__PURE__ */ React.createElement("td", null, Number(photoBenchmark.hyper3Map).toFixed(3)), /* @__PURE__ */ React.createElement("td", null, Number(photoBenchmark.clipMap).toFixed(3))))), /* @__PURE__ */ React.createElement("p", { className: "fs-note" }, "The examples are the largest rank gaps in each direction, so a CLIP win is included. Photo and typed search are separate evaluations.")) : /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement("h3", null, typed.queryCount, " written requests \xB7 ", typed.candidateCount, " photos"), /* @__PURE__ */ React.createElement("p", { className: "fs-caption" }, "Correct means any view of the described product."), /* @__PURE__ */ React.createElement("table", { className: "fs-table" }, /* @__PURE__ */ React.createElement("thead", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("th", null, "Correct product"), /* @__PURE__ */ React.createElement("th", { style: { color: "#60a5fa" } }, "Hyper3"), /* @__PURE__ */ React.createElement("th", { style: { color: "#f59e0b" } }, "CLIP"))), /* @__PURE__ */ React.createElement("tbody", null, /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("td", null, "Ranked first"), /* @__PURE__ */ React.createElement("td", null, percentage(typed.hyper3Hit1)), /* @__PURE__ */ React.createElement("td", null, percentage(typed.clipHit1))), /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("td", null, "Within top ten"), /* @__PURE__ */ React.createElement("td", null, percentage(typed.hyper3Hit10)), /* @__PURE__ */ React.createElement("td", null, percentage(typed.clipHit10))), /* @__PURE__ */ React.createElement("tr", null, /* @__PURE__ */ React.createElement("td", null, "Within top fifty"), /* @__PURE__ */ React.createElement("td", null, percentage(typed.hyper3Hit50)), /* @__PURE__ */ React.createElement("td", null, percentage(typed.clipHit50))))), /* @__PURE__ */ React.createElement("p", { className: "fs-note" }, "This example is a Hyper3 win. Across the full 1,120-photo benchmark the models are close, and OpenAI CLIP leads at fifty results. The map shows ", props.workspaceSampleCount || 741, " catalog photos."))), samplePage.error ? /* @__PURE__ */ React.createElement("p", { className: "fs-error" }, samplePage.error) : null, error ? /* @__PURE__ */ React.createElement("p", { className: "fs-error", role: "alert" }, error) : null));
|
| 72 |
}
|