PageSourceSearch

https://recipepantry.app/assets/ProParsedPreview-Ep2JjHA4.js

js recipepantry.app collected 2026-10-04 14:31:48 UTC 7,962 bytes, 1 lines download raw bytes

1import{r as g,j as e}from"./index-DlDjpmXN.js";import{P as j}from"./ProLayout-DN0R9IN5.js";import{P as N}from"./ProGate-Dgw187pz.js";import{A as _}from"./AdminGate-CG_rYugf.js";import{a as y}from"./useParsedRecipe-DCGksc3M.js";import{F as k}from"./file-text-ChXhjnFl.js";import{C as v}from"./circle-check-Dkr14DlU.js";import{C as w}from"./circle-alert-DcsOOjB_.js";import"./dropdown-menu-CSilu0KO.js";import"./index-DPOiYQUH.js";import"./index-BgRalcfl.js";import"./check-CvxbXc9O.js";import"./chevron-right-_5jpd2If.js";import"./catalogMeta-BzukOmM-.js";import"./proAssets-Dl8p5OM4.js";import"./my-market-white-TDmBeJwt.js";import"./parsedRecipeReader-CnKE77Je.js";import"./useQuery-CWz6ZAWF.js";import"./chef-hat-D5i_VEEf.js";import"./settings-jduGvH0f.js";import"./dollar-sign-Dyj6vjgl.js";import"./log-out-BAaQlR3f.js";import"./useProMember-CZ_JYUoA.js";import"./useAdminCheck-DJNKVcbN.js";const b=["sourdough-boule","sandwich-loaf","seeded-multigrain","caraway-rye","rosemary-focaccia","garlic-herb","challah","cinnamon-raisin","brioche-hamburger-buns","quick-bread","base-pastry-dough","hand-pies","blondies","rustic-galette","oatmeal-cookies","snickerdoodle-cookies","southern-drop-biscuits","sourdough-discard-scones","buttermilk-scones","market-muffins","sour-cream-coffee-cake","lemon-shortbread","gingerbread","jalapeno-cheddar-sourdough","holiday-cinnamon-rolls","cranberry-orange-walnut","chocolate-cherry-babka","stollen"];function d({ok:n,label:m}){return e.jsxs("div",{className:"flex items-start gap-2 text-sm",children:[n?e.jsx(v,{className:"mt-0.5 h-4 w-4 shrink-0 text-emerald-500"}):e.jsx(w,{className:"mt-0.5 h-4 w-4 shrink-0 text-amber-500"}),e.jsx("span",{className:n?"text-foreground":"text-amber-600 dark:text-amber-400",children:m})]})}function U(){const{recipes:n,loading:m}=y(),i=g.useMemo(()=>[...n].sort((s,t)=>b.indexOf(s.slug)-b.indexOf(t.slug)),[n]),[f,h]=g.useState(null),r=i.find(s=>s.slug==="quick-bread"),o=i.find(s=>s.slug==="jalapeno-cheddar-sourdough"),x=i.filter(s=>s.group==="farmers-market"),p=i.filter(s=>s.expected_versions.length>=2),c={quickBreadOK:!!r&&!r.has_bakers_percentages&&!r.has_levain&&r.has_ratio_table,jalapenoOK:!!o&&o.is_existing_canon&&o.canon_corrections.length===3,dualVersionsOK:p.every(s=>s.detected_versions.length>=2),sellLinesOK:x.length>=10&&x.every(s=>s.sell_line_source.startsWith("handoff verbatim"))};return e.jsx(N,{children:e.jsx(_,{children:e.jsxs(j,{title:"Parsed Recipe Source Diagnostics",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-3xl",children:"Parsed Pro Recipe Diagnostics"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Admin-only verification of all structured source recipes, version detection, canonical corrections, and section coverage."})]}),m&&e.jsx("p",{className:"mb-6 text-sm text-muted-foreground",children:"Loading the gated catalog…"}),e.jsxs("section",{className:"mb-8 rounded-xl border border-border bg-card p-4",children:[e.jsx("h2",{className:"pro-serif mb-3 text-lg",children:"Sign-off checks"}),e.jsxs("div",{className:"grid grid-cols-1 gap-2 md:grid-cols-2",children:[e.jsx(d,{ok:c.quickBreadOK,label:`Quick Bread parsed with NO baker's-% block (ratio table instead) and no active levain section. bakers%=${r?.has_bakers_percentages} levain=${r?.has_levain} ratio_table=${r?.has_ratio_table}`}),e.jsx(d,{ok:c.jalapenoOK,label:`Jalapeño Cheddar = existing canon file (no new import) with the 3-cell correction applied (${o?.canon_corrections.length}/3).`}),e.jsx(d,{ok:c.dualVersionsOK,label:`Every dual-version file kept its two versions as separate objects (${p.filter(s=>s.detected_versions.length>=2).length}/${p.length}).`}),e.jsx(d,{ok:c.sellLinesOK,label:`sell_line populated verbatim from the handoff for all 10 farmers-market recipes (${x.filter(s=>s.sell_line_source.startsWith("handoff verbatim")).length}/10).`})]})]}),e.jsx("section",{className:"space-y-3",children:i.map(s=>{const t=f===s.slug,u=s.group==="holiday"?"text-rose-500":"text-[hsl(var(--pro-crust))]";return e.jsxs("article",{className:"rounded-xl border border-border bg-card transition-colors",children:[e.jsxs("div",{role:"button",tabIndex:0,onClick:()=>h(t?null:s.slug),onKeyDown:a=>{(a.key==="Enter"||a.key===" ")&&h(t?null:s.slug)},className:"flex w-full items-start justify-between gap-4 p-4 text-left cursor-pointer",children:[e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(k,{className:`h-4 w-4 ${u}`,"aria-hidden":!0}),e.jsx("span",{className:`text-xs uppercase tracking-wide ${u}
1`,children:s.group==="holiday"?"Holiday":"Farmers Market"}),s.is_existing_canon&&e.jsx("span",{className:"rounded bg-amber-500/10 px-1.5 py-0.5 text-[10px] font-medium text-amber-600 dark:text-amber-400",children:"Existing canon · 3-cell correction"})]}),e.jsx("h3",{className:"pro-serif mt-1 text-xl",children:s.display_name}),e.jsxs("p",{className:"mt-0.5 text-xs text-muted-foreground",children:[s.tier," · ",s.source_file]}),s.sell_line&&e.jsxs("p",{className:"mt-2 text-sm italic text-muted-foreground",children:["“",s.sell_line,"”"]}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2 text-xs",children:[e.jsxs("span",{className:"rounded bg-muted px-2 py-0.5",children:["Versions: ",s.detected_versions.join(" · ")||"—"]}),e.jsxs("span",{className:"rounded bg-muted px-2 py-0.5",children:["Sections: ",s.section_count]}),e.jsxs("span",{className:"rounded bg-muted px-2 py-0.5",children:["Retail: ",s.suggested_retail]}),e.jsxs("span",{className:"rounded bg-muted px-2 py-0.5",children:["Baker's %: ",s.has_bakers_percentages?"yes":"no"]}),e.jsxs("span",{className:"rounded bg-muted px-2 py-0.5",children:["Levain: ",s.has_levain?"yes":s.levain_section_present_as_na?"N/A placeholder":"no"]}),e.jsxs("span",{className:"rounded bg-muted px-2 py-0.5",children:["sell_line: ",s.sell_line_source]})]})]}),e.jsxs("div",{className:"flex flex-col items-end gap-2",children:[e.jsx("a",{href:`/pro/v2/${s.slug}`,onClick:a=>a.stopPropagation(),className:"rounded-md border border-primary/40 bg-primary/10 px-2 py-1 text-xs font-medium text-primary hover:bg-primary/20",children:"View wired card →"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:t?"Hide":"Show"})]})]}),t&&e.jsxs("div",{className:"border-t border-border p-4 text-sm",children:[s.parsing_notes.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("h4",{className:"mb-2 font-medium",children:"Parser notes"}),e.jsx("ul",{className:"space-y-1",children:s.parsing_notes.map((a,l)=>e.jsxs("li",{className:"text-muted-foreground",children:["· ",a]},l))})]}),s.canon_corrections.length>0&&e.jsxs("div",{className:"mb-4",children:[e.jsx("h4",{className:"mb-2 font-medium",children:"Canon corrections applied"}),e.jsxs("table",{className:"w-full text-xs",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-left text-muted-foreground",children:[e.jsx("th",{className:"py-1 pr-3",children:"Cell"}),e.jsx("th",{className:"py-1 pr-3",children:"From"}),e.jsx("th",{className:"py-1",children:"To"})]})}),e.jsx("tbody",{children:s.canon_corrections.map((a,l)=>e.jsxs("tr",{className:"border-t border-border/50",children:[e.jsx("td",{className:"py-1 pr-3",children:a.cell}),e.jsx("td",{className:"py-1 pr-3 text-muted-foreground",children:a.from}),e.jsx("td",{className:"py-1 font-medium",children:a.to})]},l))})]})]}),e.jsxs("div",{children:[e.jsxs("h4",{className:"mb-2 font-medium",children:["Sections (",s.section_count,")"]}),e.jsx("ol",{className:"space-y-1 text-xs text-muted-foreground",children:s.sections.map((a,l)=>e.jsxs("li",{children:[e.jsx("span",{className:"mr-2 font-mono text-[10px]",children:String(l+1).padStart(2,"0")}),e.jsx("span",{className:a.kind==="flag"?"italic":"",children:a.name}),a.has_table&&e.jsx("span",{className:"ml-2 rounded bg-muted px-1.5 py-0.5 text-[10px]",children:"table"})]},l))})]})]})]},s.slug)})})]})})})}export{U as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.