PageSourceSearch

https://wodeapp.ai/assets/GenDemoPreviewPage-BSyZkEnG.js

js wodeapp.ai collected 2026-09-24 14:08:17 UTC 5,462 bytes, 1 lines download raw bytes

1import{r as m,j as e}from"./react-vendor-BxoUhqX6.js";import{I as g,k as l}from"./index-CR94Sc3y.js";import{A as S}from"./arrow-left-tmmVnOsc.js";import{E as b}from"./external-link-BN1OQuTi.js";import{H as p}from"./Hero-Dd70mmZR.js";import{FAQSection as d}from"./FAQSection-Clv-AEgt.js";import{FeaturesSection as x}from"./FeaturesSection-CHDT-B36.js";import{PricingSection as f}from"./PricingSection-800PMogP.js";import{StepsSection as u}from"./StepsSection-DETApAn3.js";import{SmartForm as h}from"./SmartForm-CuTx7aSn.js";import{BrandMcpOrderSection as N}from"./BrandMcpOrderSection-8jeCvaLI.js";import"./clsx-B-dksMZM.js";import"./i18n-vendor-Coo-X0AG.js";import"./AIMarkdownLazy-Bp07NADo.js";import"./index-B8k91cqS.js";import"./StyleContext-Bk-jbCxL.js";import"./badge-DxRzSeHN.js";import"./useAssetResolver-CyGlMJpD.js";import"./GlobalStateContext-gbqgQCXu.js";import"./ApiConfigContext-Bv82tjXQ.js";import"./button-BV8P2odn.js";import"./SlotRenderer-CO01OgyL.js";import"./ComponentRegistry-6pCWxLE-.js";import"./PageEventBusContext-CJZd96QW.js";import"./CustomStyleInjector-CSdfV4By.js";import"./ResolvedImage-DgKpC2oX.js";import"./magic-card-Nmrp3Rxw.js";import"./proxy-BgMY0RHy.js";import"./MainThreadAnimation-B2ypLK8w.js";import"./use-motion-value-BIgeTbbO.js";import"./border-beam-WvHFJKCE.js";import"./useActionRunner-BWze4AHn.js";import"./safeEval-D6F6vWHL.js";import"./models-CZWopL8T.js";import"./imageModels-C1w1osMq.js";import"./TextModelSelect-DvNkahrx.js";import"./chevron-down-vJuovLQF.js";import"./aiClient-DZ8NzrMg.js";import"./input-CrBfnhJn.js";import"./textarea-BIatyFQ0.js";import"./scissors-CukhxH9j.js";import"./wand-sparkles-CHdoSHZp.js";import"./useToast-B0Lt3KTA.js";import"./label-qCpjlM84.js";import"./checkbox-BbvmOFue.js";import"./check-DJEGI8P0.js";import"./switch-jI59zicL.js";import"./spinner-C3rDyzqV.js";const v={HeroSection:p,Hero:p,BrandMcpOrderSection:N,FAQSection:d,FAQ:d,FeaturesSection:x,Features:x,PricingSection:f,Pricing:f,StepsSection:u,Steps:u,SmartFormSection:h,SmartForm:h},w={HeroSection:"首屏横幅",BrandMcpOrderSection:"商家 MCP 点单",FAQSection:"常见问题",FeaturesSection:"功能特性",PricingSection:"定价方案",StepsSection:"步骤流程",SmartFormSection:"AI 表单"},k={"luckin-blindbox":{title:"瑞幸心愿盲盒",blurb:"BrandMcpOrderSection · mock 盲盒五步流(新 commerce 路径)"},"saas-landing":{title:"SaaS 落地页",blurb:"Hero + Features + Pricing + FAQ(普通生成场景)"},"weekly-report-agent":{title:"AI 周报生成器",blurb:"Hero + Steps + SmartForm(Agent 工具页场景)"}};function y(t){const o={};for(const[s,n]of Object.entries(t))n!=null&&(o[s]=n);return o}function E({section:t}){const o=v[t.type];return o?e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"pointer-events-none absolute left-4 top-2 z-10 rounded bg-slate-800/80 px-2 py-0.5 text-[11px] text-white",children:w[t.type]||t.type}),e.jsx(o,{...y(t.props||{})})]}):e.jsxs("div",{className:"mx-auto max-w-3xl my-8 rounded-xl border border-dashed border-slate-300 bg-slate-50 p-8 text-center text-slate-500",children:["未知组件: ",t.type]})}function Ne(){const{demoId:t=""}=g(),o=k[t],[s,n]=m.useState(null),[a,c]=m.useState("");m.useEffect(()=>{let r=!1;return n(null),c(""),fetch(`/demo-configs/${t}.json`).then(i=>{if(!i.ok)throw new Error(`配置不存在 (${i.status})`);return i.json()}).then(i=>{r||n(i)}).catch(i=>{r||c(i.message)}),()=>{r=!0}},[t]);const j=m.useMemo(()=>{const r=s?.theme||{};return{minHeight:"100dvh",background:r.background||(r.mode==="dark"?"#0f0a1a":"#ffffff"),color:r.mode==="dark"?"#f8fafc":"#0f172a"}},[s]);return o?e.jsxs("div",{style:j,children:[e.jsx("header",{className:"sticky top-0 z-20 border-b border-white/10 bg-black/70",children:e.jsxs("div",{className:"mx-auto flex max-w-6xl items-center justify-between gap-4 px-4 py-3",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsxs(l,{to:"/gen-demo",className:"flex shrink-0 items-center gap-1 text-sm text-slate-300 hover:text-white",children:[e.jsx(S,{className:"h-4 w-4"}),"全部 Demo"]}),e.jsx("span",{className:"text-slate-500",children:"|"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("h1",{className:"truncate text-sm font-semibold text-white",children:o.title}),e.jsx("p",{className:"truncate text-xs text-slate-400",children:o.blurb})]})]}),e.jsx("span",{className:"shrink-0 rounded-full bg-violet-600/30 px-2.5 py-1 text-[11px] font-medium text-violet-200",children:"本地 Demo · 无需数据库"})]})}),a&&e.jsx("div",{className:"mx-auto max-w-3xl p-8 text-center text-red-400",children:a}),!s&&!a&&e.jsx("div",{className:"p-12 text-center text-slate-400",children:"加载中…"}),s?.sections?.map(r=>e.jsx(E,{section:r},r.id||r.type)),e.jsxs("footer",{className:"border-t border-white/10 px-4 py-8 text-center text-xs text-slate-500",children:["配置来源: client-react/public/demo-configs/",t,".json ·"," ",e.jsxs("a",{className:"inline-flex items-center gap-1 text-indigo-400 hover:underline",href:`/demo-configs/${t}.json`,target:"_blank",rel:"noreferrer",children:["查看 JSON",e.jsx(b,{className:"h-3 w-3"})]})]})]}):e.jsxs("div",{className:"flex min-h-[50vh] flex-col items-center justify-center gap-4 p-8",children:[e.jsxs("p",{className:"text-slate-600",children:["未找到 demo: ",t]}),e.jsx(l,{to:"/gen-demo",className:"text-indigo-600 hover:underline",children:"返回列表"})]})}
1export{Ne 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.