PageSourceSearch

https://www.writesmith.ai/_next/static/chunks/app/product-descript…?dpl=dpl_72s7v3tHcM4VGv5CzJRfJFgBdHbD

js writesmith.ai collected 2026-10-02 01:12:38 UTC 11,705 bytes, 1 lines download raw bytes

1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="64a9180c-fcce-47ea-86e2-81c8d771bf11",e._sentryDebugIdIdentifier="sentry-dbid-64a9180c-fcce-47ea-86e2-81c8d771bf11")}catch(e){}}(),(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4781],{6584:function(e,t,n){Promise.resolve().then(n.bind(n,59849))},59849:function(e,t,n){"use strict";n.d(t,{default:function(){return g}});var r=n(57437),a=n(2265),s=n(42449),l=n(25262),o=n(53298),i=n(788),c=n(4798),d=n(93124),u=n(88685),f=n(48694);let h=[{value:"General",label:"General"},{value:"Amazon",label:"Amazon"},{value:"Etsy",label:"Etsy"},{value:"Shopify",label:"Shopify"},{value:"eBay",label:"eBay"}],x=[{value:"Professional",label:"Professional"},{value:"Luxury",label:"Luxury"},{value:"Casual",label:"Casual"},{value:"Technical",label:"Technical"},{value:"Playful",label:"Playful"}],b=[{question:"How many descriptions do I get?",answer:"Two versions: a short punchy one (50-80 words) and a detailed SEO-friendly one (150-250 words)."},{question:"Is this optimised for SEO?",answer:"Yes. The longer version includes relevant keywords naturally for better search rankings."}];function m(){return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("h2",{children:"How to Write Product Descriptions That Sell"}),(0,r.jsx)("p",{children:"Focus on benefits, not just features. Instead of “Made from 100% cotton,” try “Breathably soft against your skin. 100% pure cotton that gets softer with every wash.” Our AI transforms your product details into compelling copy that converts browsers into buyers."})]})}let p="w-full px-3 py-2 rounded-lg border border-[var(--border)] bg-surface text-content text-sm focus:outline-none focus:ring-2 focus:ring-brand/20 focus:border-brand";function g(){let{open:e}=(0,f.n)(),[t,n]=(0,a.useState)(""),[g,y]=(0,a.useState)(""),[v,j]=(0,a.useState)(""),[w,N]=(0,a.useState)("General"),[k,S]=(0,a.useState)("Professional"),[Z,C]=(0,a.useState)(!1),[P,z]=(0,a.useState)([]),[T,M]=(0,a.useState)("");async function I(){if(t.trim()&&g.trim()&&!Z){M(""),z([]),C(!0);try{let n=await fetch("/api/generate-product-description",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({productName:t,details:g,targetCustomer:v,platform:w,tone:k})}),r=await n.json();if(!n.ok){if(429===n.status&&(null==r?void 0:r.toolSlug)){e(r.toolSlug);return}M(r.error);return}z(r.versions)}catch(e){M("Failed to connect.")}finally{C(!1)}}}return(0,r.jsx)(l.Z,{toolSlug:"product-description-writer",faqs:b,seoContent:(0,r.jsx)(m,{}),children:(0,r.jsxs)("div",{className:"max-w-3xl mx-auto space-y-5",children:[(0,r.jsx)("input",{type:"text",value:t,onChange:e=>n(e.target.value),placeholder:"Product Name *",className:p}),(0,r.jsx)(o.Z,{value:g,onChange:y,placeholder:"Describe the product: features, materials, dimensions, what makes it special..",maxWords:u.xc,label:"Product Details",disabled:Z}),(0,r.jsx)("input",{type:"text",value:v,onChange:e=>j(e.target.value),placeholder:"Target Customer (optional)",className:p}),(0,r.jsx)(i.Z,{label:"Platform",options:h,value:w,onChange:N}),(0,r.jsx)(i.Z,{label:"Tone",options:x,value:k,onChange:S}),(0,r.jsxs)("button",{onClick:I,disabled:!t.trim()||!g.trim()||Z,className:"w-full sm:w-auto inline-flex items-center justify-center gap-2 bg-brand hover:bg-brand-hover text-white px-6 py-3 rounded-xl font-medium transition-all disabled:opacity-50 disabled:cursor-not-allowed",children:[(0,r.jsx)(s.Z,{size:18}),Z?"Writing..":"Write Description"]}),T&&(0,r.jsx)("div",{className:"bg-red-50 dark:bg-red-900/20 border border-red-200 dark:border-red-800 rounded-lg p-3",children:(0,r.jsx)("p",{className:"text-sm text-red-700 dark:text-red-400",children:T})}),Z&&(0,r.jsx)("div",{className:"rounded-xl border border-[var(--border)] bg-surface-elevated p-6",children:(0,r.jsx)(c.Z,{isLoading:!0})}),P.length>0&&!Z&&(0,r.jsx)("div",{className:"space-y-4 animate-fade-in",children:P.map((e,t)=>(0,r.jsxs)("div",{className:"rounded-xl border border-[var(--border)] bg-surface-elevated p-5",children:[(0,r.jsxs)("div",{className:"flex items-center justify-between mb-3",children:[(0,r.jsx)("span",{className:"text-xs font-semibold text-content-tertiary uppercase",children:0===t?"Short Version":"Detailed Version"}),(0,r.jsx)(d.default,{text:e,variant:"icon-only"})]}),(0,r.jsx)("p",{className:"text-sm text-content whitespace-pre-wrap leading-relaxed",children:e})]},t))})]})})}}
1,93124:function(e,t,n){"use strict";n.d(t,{default:function(){return i}});var r=n(57437),a=n(2265),s=n(30401),l=n(78867),o=n(69064);function i(e){let{text:t,variant:n="default"}=e,[i,c]=(0,a.useState)(!1);async function d(){try{await navigator.clipboard.writeText(t),c(!0),setTimeout(()=>c(!1),2e3)}catch(e){o.ZP.error("Failed to copy — try selecting and copying manually")}}return"icon-only"===n?(0,r.jsx)("button",{onClick:d,className:"p-2 rounded-lg hover:bg-surface-subtle transition-colors","aria-label":"Copy to clipboard",children:i?(0,r.jsx)(s.Z,{size:16,className:"text-green-600"}):(0,r.jsx)(l.Z,{size:16,className:"text-content-secondary"})}):(0,r.jsxs)("button",{onClick:d,className:"inline-flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-sm font-medium transition-all ".concat(i?"bg-green-50 text-green-700 dark:bg-green-900/20 dark:text-green-400":"bg-surface-subtle hover:bg-stone-200 dark:hover:bg-stone-700 text-content-secondary"),children:[i?(0,r.jsx)(s.Z,{size:14}):(0,r.jsx)(l.Z,{size:14}),i?"Copied":"Copy"]})}},788:function(e,t,n){"use strict";n.d(t,{Z:function(){return a}});var r=n(57437);function a(e){let{options:t,value:n,onChange:a,label:s}=e,l=t.find(e=>e.value===n);return(0,r.jsxs)("div",{children:[s&&(0,r.jsx)("label",{className:"block text-sm font-medium text-content mb-2",children:s}),(0,r.jsx)("div",{className:"flex flex-wrap gap-2",children:t.map(e=>(0,r.jsx)("button",{onClick:()=>a(e.value),className:"px-4 py-2 rounded-full text-sm font-medium transition-all ".concat(n===e.value?"bg-brand text-white shadow-sm":"border border-[var(--border)] text-content hover:bg-surface-subtle"),children:e.label},e.value))}),(null==l?void 0:l.description)&&(0,r.jsx)("p",{className:"mt-2 text-sm text-content-secondary italic animate-fade-in",children:l.description})]})}},4798:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});var r=n(57437),a=n(2265);let s=["Analysing your text...","Processing content...","Polishing results...","Almost done..."];function l(e){let{isLoading:t,stages:n=s}=e,[l,o]=(0,a.useState)(0),[i,c]=(0,a.useState)(0),[d,u]=(0,a.useState)(!1),f=(0,a.useRef)(null);return((0,a.useEffect)(()=>{if(t){u(!0),o(0),c(0);let e=[{target:30,duration:1e3},{target:60,duration:2e3},{target:85,duration:2e3},{target:95,duration:1e4}],t=0,r=0;f.current=setInterval(()=>{r+=50;let a=e[t];if(!a)return;let s=t>0?e[t-1].target:0;o(Math.min(a.target,s+(a.target-s)*r/a.duration)),r>=a.duration&&t<e.length-1&&(c(Math.min(++t,n.length-1)),r=0)},50)}else l>0&&(f.current&&clearInterval(f.current),o(100),setTimeout(()=>u(!1),500));return()=>{f.current&&clearInterval(f.current)}},[t]),d)?(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)("div",{className:"w-full h-1 bg-surface-subtle rounded-full overflow-hidden",children:(0,r.jsx)("div",{className:"h-full bg-gradient-to-r from-brand to-blue-400 rounded-full transition-all duration-200 ease-out relative",style:{width:"".concat(l,"%")},children:(0,r.jsx)("div",{className:"absolute right-0 top-0 w-4 h-full bg-white/30 animate-pulse rounded-full"})})}),(0,r.jsx)("p",{className:"text-xs text-content-secondary mt-2 animate-fade-in",children:n[i]})]}):null}},53298:function(e,t,n){"use strict";n.d(t,{Z:function(){return i}});var r=n(57437),a=n(2265);let s=(0,n(47411).Z)("clipboard-paste",[["path",{d:"M11 14h10",key:"1w8e9d"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v1.344",key:"1e62lh"}],["path",{d:"m17 18 4-4-4-4",key:"z2g111"}],["path",{d:"M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 1.793-1.113",key:"bjbb7m"}],["rect",{x:"8",y:"2",width:"8",height:"4",rx:"1",key:"ublpy"}]]);var l=n(32489);function o(e){let{text:t,limit:n,isPremium:a}=e,s=t.trim()?t.trim().split(/\s+/).length:0,l="text-content-tertiary";if(n&&!a){let e=s/n;e>=1?l="text-red-600":e>=.8&&(l="text-amber-600")}return(0,r.jsxs)("span",{className:"text-xs font-mono tabular-nums transition-colors duration-200 ".concat(l),children:[s.toLocaleString(),n&&!a?" / ".concat(n.toLocaleString()):""," words"]})}function i(e){let{value:t,onChange:n,placeholder:i,maxWords:c,disabled:d=!1,minHeight:u=200,label:f,showWordCount:h=!0}=e,x=(0,a.useRef)(null);async function b(){try{let e=await navigator.clipboard.readText();n(t+e)}catch(e){}}(0,a.useEffect)(()=>{let e=x.current;e&&(e.style.height="auto",e.style.height=Math.max(u,e.scrollHeight)+"px")},[t,u]);let m=t.length,p=t.trim()?t.trim().split(/\s+/).length:0,g=!!c&&p>c;return(0,r.jsxs)("div",{children:[f&&(0,r.jsx)("label",{className:"block text-sm font-medium text-content mb-2",children:f}),(0,r.jsxs)("div",{className:"relative group",children:[(0,r.jsx)("div",{className:"absolute top-2 left-2 z-10 flex gap-1",children:!t&&(0,r.jsxs)("button",{onClick:b,className:"flex items-center gap-1 px-2 py-1 rounded text-xs text-content-tertiary hover:text-content-secondary hover:bg-surface-subtle transition-colors",title:"Paste from clipboard",children:[(0,r.jsx)(s,{size:14}),(0,r.jsx)("span",{className:"hidden sm:inline",children:"Paste"})]})}),t&&(0,r.jsx)("button",{onClick:()=>n(""),className:"absolute top-2 right-2 z-10 p-1.5 rounded-lg hover:bg-surface-subtle transition-colors text-content-tertiary hover:text-content-secondary",title:"Clear text",children:(0,r.jsx)(l.Z,{size:16})}),(0,r.jsx)("textarea",{ref:x,value:t,onChange:e=>n(e.target.value),placeholder:i,disabled:d,className:"w-full resize-none rounded-xl border border-[var(--border)] bg-surface-elevated px-4 py-3 pt-10 text-content placeholder:text-content-tertiary focus:outline-none focus:ring-2 focus:ring-brand/20 focus:border-brand transition-all disabled:opacity-50 disabled:cursor-not-allowed ".concat(g?"border-red-300 focus:border-red-500 focus:ring-red-200":""),style:{minHeight:u}}),(0,r.jsxs)("div",{className:"flex items-center justify-between px-1 mt-1.5",children:[(0,r.jsxs)("span",{className:"text-xs text-content-tertiary tabular-nums font-mono",children:[m.toLocaleStr
1ing()," characters"]}),h&&(0,r.jsx)(o,{text:t,limit:c})]})]})]})}},30401:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(47411).Z)("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},78867:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(47411).Z)("copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]])},51817:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(47411).Z)("loader-circle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},99397:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(47411).Z)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]])},32489:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});let r=(0,n(47411).Z)("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},27648:function(e,t,n){"use strict";n.d(t,{default:function(){return a.a}});var r=n(72972),a=n.n(r)}},function(e){e.O(0,[9762,2972,619,9483,9064,8685,168,5262,991,2971,5929,2998,1744],function(){return e(e.s=6584)}),_N_E=e.O()}]);

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.