@asymmetric-effort/specifyjs 0.2.13 → 0.2.14

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.
@@ -1,2 +1,2 @@
1
- "use strict";var n=require("fs"),e=require("path");function t(n){let e=n,t="";for(let n=0;n<10&&e!==t;n++)t=e,e=e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script\s*>/gi,""),e=e.replace(/<button\b[^>]*>([\s\S]*?)<\/button\s*>/gi,"$1"),e=e.replace(/<input\b[^>]*\/?>/gi,""),e=e.replace(/<select\b[^<]*(?:(?!<\/select>)<[^<]*)*<\/select\s*>/gi,""),e=e.replace(/<textarea\b[^<]*(?:(?!<\/textarea>)<[^<]*)*<\/textarea\s*>/gi,""),e=e.replace(/<\/?form\b[^>]*>/gi,"");return e=e.replace(/\s+on[a-z]+\s*=\s*"[^"]*"/gi,""),e=e.replace(/\s+on[a-z]+\s*=\s*'[^']*'/gi,""),e=e.replace(/\s+style\s*=\s*"[^"]*javascript\s*:[^"]*"/gi,""),e=e.replace(/\s+style\s*=\s*'[^']*javascript\s*:[^']*'/gi,""),e}function o(n){const e=n.classPrefix??"ns",o=n.sections;if(0===o.length)return"";const s=o.map(n=>`<a href="#${n.id}" class="${e}-nav-link">${i(n.title)}</a>`).join("\n "),r=o.map(n=>{const o=t(n.html);return`\n <section id="${n.id}" class="${e}-section">\n <h2 class="${e}-section-title">${i(n.title)}</h2>\n <div class="${e}-section-content">\n ${o}\n </div>\n <p class="${e}-back-to-top"><a href="#${e}-top">Back to top</a></p>\n </section>`}).join("\n"),c=n.title?`<h1 class="${e}-title">${i(n.title)}</h1>`:"",a=n.description?`<p class="${e}-desc">${i(n.description)}</p>`:"",p=n.copyright?`<footer class="${e}-footer"><p>${i(n.copyright)}</p></footer>`:"";return`\n <noscript>\n <style>\n .${e}-container {\n max-width: 900px;\n margin: 0 auto;\n padding: 20px;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n line-height: 1.6;\n color: #1f2937;\n }\n .${e}-title {\n font-size: 2rem;\n margin-bottom: 0.5rem;\n color: #0f172a;\n }\n .${e}-desc {\n font-size: 1.1rem;\n color: #64748b;\n margin-bottom: 1.5rem;\n }\n .${e}-nav {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n padding: 12px 0;\n border-bottom: 1px solid #e2e8f0;\n margin-bottom: 2rem;\n position: sticky;\n top: 0;\n background: white;\n z-index: 10;\n }\n .${e}-nav-link {\n padding: 6px 14px;\n border-radius: 6px;\n background: #f1f5f9;\n color: #3b82f6;\n text-decoration: none;\n font-size: 14px;\n font-weight: 500;\n }\n .${e}-nav-link:hover {\n background: #3b82f6;\n color: white;\n }\n .${e}-section {\n margin-bottom: 3rem;\n padding-bottom: 2rem;\n border-bottom: 1px solid #f1f5f9;\n }\n .${e}-section-title {\n font-size: 1.5rem;\n color: #1e293b;\n margin-bottom: 1rem;\n padding-top: 1rem;\n }\n .${e}-section-content h3 {\n font-size: 1.2rem;\n margin-top: 1.5rem;\n color: #334155;\n }\n .${e}-section-content p {\n margin: 0.5rem 0;\n }\n .${e}-section-content pre {\n background: #1e293b;\n color: #e2e8f0;\n padding: 12px 16px;\n border-radius: 6px;\n overflow-x: auto;\n font-size: 13px;\n line-height: 1.5;\n }\n .${e}-section-content code {\n background: #f1f5f9;\n padding: 2px 6px;\n border-radius: 3px;\n font-size: 0.9em;\n }\n .${e}-section-content pre code {\n background: none;\n padding: 0;\n }\n .${e}-section-content table {\n width: 100%;\n border-collapse: collapse;\n margin: 1rem 0;\n }\n .${e}-section-content th,\n .${e}-section-content td {\n padding: 8px 12px;\n border: 1px solid #e2e8f0;\n text-align: left;\n }\n .${e}-section-content th {\n background: #f8fafc;\n font-weight: 600;\n }\n .${e}-section-content img {\n max-width: 100%;\n height: auto;\n }\n .${e}-back-to-top {\n font-size: 13px;\n margin-top: 1.5rem;\n }\n .${e}-back-to-top a {\n color: #3b82f6;\n text-decoration: none;\n }\n .${e}-footer {\n margin-top: 3rem;\n padding-top: 1rem;\n border-top: 1px solid #e2e8f0;\n color: #94a3b8;\n font-size: 13px;\n text-align: center;\n }\n .${e}-js-notice {\n background: #fef3c7;\n border: 1px solid #f59e0b;\n border-radius: 6px;\n padding: 12px 16px;\n margin-bottom: 1.5rem;\n font-size: 14px;\n color: #92400e;\n }\n </style>\n <div id="${e}-top" class="${e}-container">\n ${c}\n ${a}\n <div class="${e}-js-notice">\n This page works best with JavaScript enabled. You are viewing a\n static version of the content.\n </div>\n <nav class="${e}-nav" aria-label="Section navigation">\n ${s}\n </nav>\n ${r}\n ${p}\n </div>\n </noscript>`}function i(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}exports.generateNoscriptHtml=o,exports.specifyJsNoscriptPlugin=function(t){return{name:"specifyjs-noscript",closeBundle(){const i=e.resolve(process.cwd(),"dist"),s=e.join(i,"index.html");if(!n.existsSync(s))return void console.warn("[specifyjs-noscript] index.html not found in dist/");const r=o(t);if(!r)return void console.warn("[specifyjs-noscript] No sections provided, skipping.");const c=t.maxContentSize??524288,a=Buffer.byteLength(r,"utf-8");a>c&&console.warn(`[specifyjs-noscript] Noscript content is ${(a/1024).toFixed(0)}KB (limit: ${(c/1024).toFixed(0)}KB). Consider reducing section content.`);let p=n.readFileSync(s,"utf-8");p=p.replace("</body>",`${r}\n</body>`),n.writeFileSync(s,p,"utf-8"),console.log(`Generated: noscript fallback (${t.sections.length} sections, ${(a/1024).toFixed(1)}KB)`)}}},exports.specifyJsSeoPlugin=function(t){return{name:"specifyjs-seo",closeBundle(){const o=e.resolve(process.cwd(),"dist"),i=(new Date).toISOString().split("T")[0]??"",s=[...t.routes??["/"]],r=[];if(t.docsDir&&n.existsSync(t.docsDir)){!function(t,o){const i=[{dir:t,prefix:""}];for(;i.length>0;){const{dir:t,prefix:s}=i.pop(),r=n.readdirSync(t,{withFileTypes:!0});for(const n of r)n.isDirectory()?i.push({dir:e.join(t,n.name),prefix:s+n.name+"/"}):n.name.endsWith(".md")&&o.push(s+n.name.replace(".md",""))}}(t.docsDir,r);for(const n of r)s.push(`/#/docs/${n}`)}const c=function(n,e,t){return['<?xml version="1.0" encoding="UTF-8"?>','<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">',...e.map(e=>` <url><loc>${n}${e}</loc><lastmod>${t}</lastmod></url>`),"</urlset>"].join("\n")}(t.siteUrl,s,i);n.writeFileSync(e.join(o,"sitemap.xml"),c);const a=function(n,e){const t=["User-agent: *","Allow: /"];return e&&t.push(...e),t.push("",`Sitemap: ${n}/sitemap.xml`),t.join("\n")}(t.siteUrl,t.robotsRules);n.writeFileSync(e.join(o,"robots.txt"),a);const p=function(n,e){const t=[`# ${n.title??"Site"}`];if(n.description){t.push("");const e=n.description.split("\n");for(const n of e)t.push(`> ${n}`)}t.push(""),t.push(`## Website: ${n.siteUrl}`),n.repository&&t.push(`## Repository: ${n.repository}`),n.npmPackage&&t.push(`## npm: https://www.npmjs.com/package/${n.npmPackage}`);const o=e.filter(n=>n.startsWith("guides/")).map(n=>n.replace("guides/","")),i=e.filter(n=>n.startsWith("api/")).map(n=>n.replace("api/",""));if(o.length>0){t.push("","## Documentation","");for(const e of o)t.push(`- ${e}: ${n.siteUrl}/#/docs/guides/${e}`)}if(i.length>0){t.push("","## API Reference","");for(const e of i)t.push(`- ${e}: ${n.siteUrl}/#/docs/api/${e}`)}return n.npmPackage&&t.push("","## Install","","```",`npm install ${n.npmPackage}`,"```"),n.license&&t.push("",`## License: ${n.license}`),n.author&&t.push(`## Author: ${n.author}`),t.join("\n")}(t,r);n.writeFileSync(e.join(o,"llms.txt"),p),console.log(`Generated: sitemap.xml (${s.length} URLs), robots.txt, llms.txt`)}}},exports.stripInteractiveElements=t;
1
+ "use strict";var n=require("fs"),e=require("path");function t(n){let e=n,t="";for(let n=0;n<10&&e!==t;n++)t=e,e=e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script\s*>/gi,""),e=e.replace(/<button\b[^>]*>([\s\S]*?)<\/button\s*>/gi,"$1"),e=e.replace(/<input\b[^>]*\/?>/gi,""),e=e.replace(/<select\b[^<]*(?:(?!<\/select>)<[^<]*)*<\/select\s*>/gi,""),e=e.replace(/<textarea\b[^<]*(?:(?!<\/textarea>)<[^<]*)*<\/textarea\s*>/gi,""),e=e.replace(/<\/?form\b[^>]*>/gi,"");return e=e.replace(/\s+on[a-z]+\s*=\s*"[^"]*"/gi,""),e=e.replace(/\s+on[a-z]+\s*=\s*'[^']*'/gi,""),e=e.replace(/\s+style\s*=\s*"[^"]*javascript\s*:[^"]*"/gi,""),e=e.replace(/\s+style\s*=\s*'[^']*javascript\s*:[^']*'/gi,""),e}function o(n){const e=n.classPrefix??"ns",o=n.sections;if(0===o.length)return"";const s=o.map(n=>`<a href="#${n.id}" class="${e}-nav-link">${i(n.title)}</a>`).join("\n "),r=o.map(n=>{const o=t(n.html);return`\n <section id="${n.id}" class="${e}-section">\n <h2 class="${e}-section-title">${i(n.title)}</h2>\n <div class="${e}-section-content">\n ${o}\n </div>\n <p class="${e}-back-to-top"><a href="#${e}-top">Back to top</a></p>\n </section>`}).join("\n"),c=n.title?`<h1 class="${e}-title">${i(n.title)}</h1>`:"",a=n.description?`<p class="${e}-desc">${i(n.description)}</p>`:"",p=n.copyright?`<footer class="${e}-footer"><p>${i(n.copyright)}</p></footer>`:"";return`\n <noscript>\n <style>\n .${e}-container {\n max-width: 900px;\n margin: 0 auto;\n padding: 20px;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n line-height: 1.6;\n color: #1f2937;\n }\n .${e}-title {\n font-size: 2rem;\n margin-bottom: 0.5rem;\n color: #0f172a;\n }\n .${e}-desc {\n font-size: 1.1rem;\n color: #64748b;\n margin-bottom: 1.5rem;\n }\n .${e}-nav {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n padding: 12px 0;\n border-bottom: 1px solid #e2e8f0;\n margin-bottom: 2rem;\n position: sticky;\n top: 0;\n background: white;\n z-index: 10;\n }\n .${e}-nav-link {\n padding: 6px 14px;\n border-radius: 6px;\n background: #f1f5f9;\n color: #3b82f6;\n text-decoration: none;\n font-size: 14px;\n font-weight: 500;\n }\n .${e}-nav-link:hover {\n background: #3b82f6;\n color: white;\n }\n .${e}-section {\n margin-bottom: 3rem;\n padding-bottom: 2rem;\n border-bottom: 1px solid #f1f5f9;\n }\n .${e}-section-title {\n font-size: 1.5rem;\n color: #1e293b;\n margin-bottom: 1rem;\n padding-top: 1rem;\n }\n .${e}-section-content h3 {\n font-size: 1.2rem;\n margin-top: 1.5rem;\n color: #334155;\n }\n .${e}-section-content p {\n margin: 0.5rem 0;\n }\n .${e}-section-content pre {\n background: #1e293b;\n color: #e2e8f0;\n padding: 12px 16px;\n border-radius: 6px;\n overflow-x: auto;\n font-size: 13px;\n line-height: 1.5;\n }\n .${e}-section-content code {\n background: #f1f5f9;\n padding: 2px 6px;\n border-radius: 3px;\n font-size: 0.9em;\n }\n .${e}-section-content pre code {\n background: none;\n padding: 0;\n }\n .${e}-section-content table {\n width: 100%;\n border-collapse: collapse;\n margin: 1rem 0;\n }\n .${e}-section-content th,\n .${e}-section-content td {\n padding: 8px 12px;\n border: 1px solid #e2e8f0;\n text-align: left;\n }\n .${e}-section-content th {\n background: #f8fafc;\n font-weight: 600;\n }\n .${e}-section-content img {\n max-width: 100%;\n height: auto;\n }\n .${e}-back-to-top {\n font-size: 13px;\n margin-top: 1.5rem;\n }\n .${e}-back-to-top a {\n color: #3b82f6;\n text-decoration: none;\n }\n .${e}-footer {\n margin-top: 3rem;\n padding-top: 1rem;\n border-top: 1px solid #e2e8f0;\n color: #94a3b8;\n font-size: 13px;\n text-align: center;\n }\n .${e}-js-notice {\n background: #fef3c7;\n border: 1px solid #f59e0b;\n border-radius: 6px;\n padding: 12px 16px;\n margin-bottom: 1.5rem;\n font-size: 14px;\n color: #92400e;\n }\n </style>\n <div id="${e}-top" class="${e}-container">\n ${c}\n ${a}\n <div class="${e}-js-notice">\n This page works best with JavaScript enabled. You are viewing a\n static version of the content.\n </div>\n <nav class="${e}-nav" aria-label="Section navigation">\n ${s}\n </nav>\n ${r}\n ${p}\n </div>\n </noscript>`}function i(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}exports.generateNoscriptHtml=o,exports.specifyJsNoscriptPlugin=function(t){return{name:"specifyjs-noscript",closeBundle(){const i=e.resolve(process.cwd(),"dist"),s=e.join(i,"index.html");if(!n.existsSync(s))return void console.warn("[specifyjs-noscript] index.html not found in dist/");const r=o(t);if(!r)return void console.warn("[specifyjs-noscript] No sections provided, skipping.");const c=t.maxContentSize??524288,a=Buffer.byteLength(r,"utf-8");a>c&&console.warn(`[specifyjs-noscript] Noscript content is ${(a/1024).toFixed(0)}KB (limit: ${(c/1024).toFixed(0)}KB). Consider reducing section content.`);let p=n.readFileSync(s,"utf-8");p=p.replace("</body>",`${r}\n</body>`),n.writeFileSync(s,p,"utf-8"),console.log(`Generated: noscript fallback (${t.sections.length} sections, ${(a/1024).toFixed(1)}KB)`)}}},exports.specifyJsSeoPlugin=function(t){return{name:"specifyjs-seo",closeBundle(){const o=e.resolve(process.cwd(),"dist"),i=(new Date).toISOString().split("T")[0]??"",s=[...t.routes??["/"]],r=[];if(t.docsDir&&n.existsSync(t.docsDir)){!function(t,o){const i=[{dir:t,prefix:""}];for(;i.length>0;){const{dir:t,prefix:s}=i.pop(),r=n.readdirSync(t,{withFileTypes:!0});for(const n of r)n.isDirectory()?i.push({dir:e.join(t,n.name),prefix:s+n.name+"/"}):n.name.endsWith(".md")&&o.push(s+n.name.replace(".md",""))}}(t.docsDir,r);for(const n of r)s.push(`/#/docs/${n}`)}const c=function(n,e,t){return['<?xml version="1.0" encoding="UTF-8"?>','<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">',...e.map(e=>` <url><loc>${n}${e}</loc><lastmod>${t}</lastmod></url>`),"</urlset>"].join("\n")}(t.siteUrl,s,i);n.writeFileSync(e.join(o,"sitemap.xml"),c);const a=function(n,e){const t=["User-agent: *","Allow: /"];return e&&t.push(...e),t.push("",`Sitemap: ${n}/sitemap.xml`),t.join("\n")}(t.siteUrl,t.robotsRules);n.writeFileSync(e.join(o,"robots.txt"),a);const p=function(n,e){const t=[`# ${n.title??"Site"}`];if(n.description){t.push("");const e=n.description.split("\n");for(const n of e)t.push(`> ${n}`)}t.push(""),t.push(`## Website: ${n.siteUrl}`),n.repository&&t.push(`## Repository: ${n.repository}`),n.npmPackage&&t.push(`## npm: https://www.npmjs.com/package/${n.npmPackage}`);const o=e.filter(n=>n.startsWith("guides/")).map(n=>n.replace("guides/","")),i=e.filter(n=>n.startsWith("api/")).map(n=>n.replace("api/",""));if(o.length>0){t.push("","## Documentation","");for(const e of o)t.push(`- ${e}: ${n.siteUrl}/#/docs/guides/${e}`)}if(i.length>0){t.push("","## API Reference","");for(const e of i)t.push(`- ${e}: ${n.siteUrl}/#/docs/api/${e}`)}return n.npmPackage&&t.push("","## Install","","```",`npm install ${n.npmPackage}`,"```"),n.license&&t.push("",`## License: ${n.license}`),n.author&&t.push(`## Author: ${n.author}`),t.join("\n")}(t,r);if(n.writeFileSync(e.join(o,"llms.txt"),p),t.jsonLd){const i=e.join(o,"index.html");if(n.existsSync(i)){let e=n.readFileSync(i,"utf-8");const o=(Array.isArray(t.jsonLd)?t.jsonLd:[t.jsonLd]).map(n=>`<script type="application/ld+json">${JSON.stringify(n)}<\/script>`).join("\n ");e=e.replace("</head>",` ${o}\n </head>`),n.writeFileSync(i,e,"utf-8")}}const l=t.jsonLd?", JSON-LD":"";console.log(`Generated: sitemap.xml (${s.length} URLs), robots.txt, llms.txt${l}`)}}},exports.stripInteractiveElements=t;
2
2
  //# sourceMappingURL=specifyjs-build.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"specifyjs-build.cjs.js","sources":["../../src/build/noscript-plugin.ts","../../src/build/seo-plugin.ts"],"sourcesContent":[null,null],"names":["stripInteractiveElements","html","result","prev","pass","replace","generateNoscriptHtml","config","prefix","classPrefix","sections","length","navLinks","map","s","id","escapeHtml","title","join","sectionBlocks","cleanHtml","desc","description","copyright","str","name","closeBundle","distDir","path","resolve","process","cwd","indexPath","fs","existsSync","console","warn","noscriptHtml","maxSize","maxContentSize","noscriptSize","Buffer","byteLength","toFixed","readFileSync","writeFileSync","log","today","Date","toISOString","split","routes","docPaths","docsDir","rootDir","results","stack","dir","pop","entries","readdirSync","withFileTypes","entry","isDirectory","push","endsWith","walkDocs","dp","sitemap","siteUrl","r","generateSitemap","robots","extraRules","lines","generateRobots","robotsRules","llmsTxt","descLines","dl","repository","npmPackage","guideNames","filter","p","startsWith","apiNames","g","a","license","author","generateLlmsTxt"],"mappings":"mDA6EM,SAAUA,EAAyBC,GACvC,IAAIC,EAASD,EACTE,EAAO,GAKX,IAAK,IAAIC,EAAO,EAAGA,EADA,IACqBF,IAAWC,EAAMC,IACvDD,EAAOD,EAEPA,EAASA,EAAOG,QAAQ,yDAA0D,IAElFH,EAASA,EAAOG,QAAQ,2CAA4C,MAEpEH,EAASA,EAAOG,QAAQ,sBAAuB,IAE/CH,EAASA,EAAOG,QAAQ,yDAA0D,IAElFH,EAASA,EAAOG,QAAQ,+DAAgE,IAExFH,EAASA,EAAOG,QAAQ,qBAAsB,IAUhD,OANAH,EAASA,EAAOG,QAAQ,8BAA+B,IACvDH,EAASA,EAAOG,QAAQ,8BAA+B,IAEvDH,EAASA,EAAOG,QAAQ,8CAA+C,IACvEH,EAASA,EAAOG,QAAQ,8CAA+C,IAEhEH,CACT,CAMM,SAAUI,EAAqBC,GACnC,MAAMC,EAASD,EAAOE,aAAe,KAC/BC,EAAWH,EAAOG,SAExB,GAAwB,IAApBA,EAASC,OAAc,MAAO,GAGlC,MAAMC,EAAWF,EACdG,IAAKC,GAAM,aAAaA,EAAEC,cAAcP,eAAoBQ,EAAWF,EAAEG,cACzEC,KA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K,KAAKwB,MAAMjF,EAAO8D,sBAAsBmB,IAEvD,CAaA,OAXIjF,EAAO0E,YACTP,EAAMV,KAAK,GAAI,aAAc,GAAI,MAAO,eAAezD,EAAO0E,aAAc,OAG1E1E,EAAOkF,SACTf,EAAMV,KAAK,GAAI,eAAezD,EAAOkF,WAEnClF,EAAOmF,QACThB,EAAMV,KAAK,cAAczD,EAAOmF,UAG3BhB,EAAMxD,KAAK,KACpB,CAoCsByE,CAAgBpF,EAAQ6C,GACxCnB,EAAGY,cAAcjB,EAAKV,KAAKS,EAAS,YAAakD,GAEjD1C,QAAQW,IAAI,2BAA2BK,EAAOxC,qCAChD,EAEJ"}
1
+ {"version":3,"file":"specifyjs-build.cjs.js","sources":["../../src/build/noscript-plugin.ts","../../src/build/seo-plugin.ts"],"sourcesContent":[null,null],"names":["stripInteractiveElements","html","result","prev","pass","replace","generateNoscriptHtml","config","prefix","classPrefix","sections","length","navLinks","map","s","id","escapeHtml","title","join","sectionBlocks","cleanHtml","desc","description","copyright","str","name","closeBundle","distDir","path","resolve","process","cwd","indexPath","fs","existsSync","console","warn","noscriptHtml","maxSize","maxContentSize","noscriptSize","Buffer","byteLength","toFixed","readFileSync","writeFileSync","log","today","Date","toISOString","split","routes","docPaths","docsDir","rootDir","results","stack","dir","pop","entries","readdirSync","withFileTypes","entry","isDirectory","push","endsWith","walkDocs","dp","sitemap","siteUrl","r","generateSitemap","robots","extraRules","lines","generateRobots","robotsRules","llmsTxt","descLines","dl","repository","npmPackage","guideNames","filter","p","startsWith","apiNames","g","a","license","author","generateLlmsTxt","jsonLd","ldBlocks","Array","isArray","JSON","stringify","extras"],"mappings":"mDA6EM,SAAUA,EAAyBC,GACvC,IAAIC,EAASD,EACTE,EAAO,GAKX,IAAK,IAAIC,EAAO,EAAGA,EADA,IACqBF,IAAWC,EAAMC,IACvDD,EAAOD,EAEPA,EAASA,EAAOG,QAAQ,yDAA0D,IAElFH,EAASA,EAAOG,QAAQ,2CAA4C,MAEpEH,EA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cb,EAAW/B,EAAM,QACpC,CACF,CAGA,MAAMiG,EAAS3F,EAAOqF,OAAS,YAAc,GAC7CzD,QAAQW,IAAI,2BAA2BK,EAAOxC,qCAAqCuF,IACrF,EAEJ"}
@@ -30,6 +30,10 @@ interface SeoPluginConfig {
30
30
  robotsRules?: string[];
31
31
  /** Repository URL for llms.txt */
32
32
  repository?: string;
33
+ /** Schema.org structured data (JSON-LD). When provided, a
34
+ * `<script type="application/ld+json">` block is injected into index.html.
35
+ * Can be a plain object or an array of objects for multiple schemas. */
36
+ jsonLd?: Record<string, unknown> | Record<string, unknown>[];
33
37
  }
34
38
  /**
35
39
  * Create the SpecifyJS SEO Vite plugin.
@@ -1,2 +1,2 @@
1
- import n from"fs";import e from"path";function t(t){return{name:"specifyjs-seo",closeBundle(){const o=e.resolve(process.cwd(),"dist"),i=(new Date).toISOString().split("T")[0]??"",s=[...t.routes??["/"]],r=[];if(t.docsDir&&n.existsSync(t.docsDir)){!function(t,o){const i=[{dir:t,prefix:""}];for(;i.length>0;){const{dir:t,prefix:s}=i.pop(),r=n.readdirSync(t,{withFileTypes:!0});for(const n of r)n.isDirectory()?i.push({dir:e.join(t,n.name),prefix:s+n.name+"/"}):n.name.endsWith(".md")&&o.push(s+n.name.replace(".md",""))}}(t.docsDir,r);for(const n of r)s.push(`/#/docs/${n}`)}const c=function(n,e,t){return['<?xml version="1.0" encoding="UTF-8"?>','<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">',...e.map(e=>` <url><loc>${n}${e}</loc><lastmod>${t}</lastmod></url>`),"</urlset>"].join("\n")}(t.siteUrl,s,i);n.writeFileSync(e.join(o,"sitemap.xml"),c);const a=function(n,e){const t=["User-agent: *","Allow: /"];return e&&t.push(...e),t.push("",`Sitemap: ${n}/sitemap.xml`),t.join("\n")}(t.siteUrl,t.robotsRules);n.writeFileSync(e.join(o,"robots.txt"),a);const p=function(n,e){const t=[`# ${n.title??"Site"}`];if(n.description){t.push("");const e=n.description.split("\n");for(const n of e)t.push(`> ${n}`)}t.push(""),t.push(`## Website: ${n.siteUrl}`),n.repository&&t.push(`## Repository: ${n.repository}`),n.npmPackage&&t.push(`## npm: https://www.npmjs.com/package/${n.npmPackage}`);const o=e.filter(n=>n.startsWith("guides/")).map(n=>n.replace("guides/","")),i=e.filter(n=>n.startsWith("api/")).map(n=>n.replace("api/",""));if(o.length>0){t.push("","## Documentation","");for(const e of o)t.push(`- ${e}: ${n.siteUrl}/#/docs/guides/${e}`)}if(i.length>0){t.push("","## API Reference","");for(const e of i)t.push(`- ${e}: ${n.siteUrl}/#/docs/api/${e}`)}return n.npmPackage&&t.push("","## Install","","```",`npm install ${n.npmPackage}`,"```"),n.license&&t.push("",`## License: ${n.license}`),n.author&&t.push(`## Author: ${n.author}`),t.join("\n")}(t,r);n.writeFileSync(e.join(o,"llms.txt"),p),console.log(`Generated: sitemap.xml (${s.length} URLs), robots.txt, llms.txt`)}}}function o(n){let e=n,t="";for(let n=0;n<10&&e!==t;n++)t=e,e=e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script\s*>/gi,""),e=e.replace(/<button\b[^>]*>([\s\S]*?)<\/button\s*>/gi,"$1"),e=e.replace(/<input\b[^>]*\/?>/gi,""),e=e.replace(/<select\b[^<]*(?:(?!<\/select>)<[^<]*)*<\/select\s*>/gi,""),e=e.replace(/<textarea\b[^<]*(?:(?!<\/textarea>)<[^<]*)*<\/textarea\s*>/gi,""),e=e.replace(/<\/?form\b[^>]*>/gi,"");return e=e.replace(/\s+on[a-z]+\s*=\s*"[^"]*"/gi,""),e=e.replace(/\s+on[a-z]+\s*=\s*'[^']*'/gi,""),e=e.replace(/\s+style\s*=\s*"[^"]*javascript\s*:[^"]*"/gi,""),e=e.replace(/\s+style\s*=\s*'[^']*javascript\s*:[^']*'/gi,""),e}function i(n){const e=n.classPrefix??"ns",t=n.sections;if(0===t.length)return"";const i=t.map(n=>`<a href="#${n.id}" class="${e}-nav-link">${s(n.title)}</a>`).join("\n "),r=t.map(n=>{const t=o(n.html);return`\n <section id="${n.id}" class="${e}-section">\n <h2 class="${e}-section-title">${s(n.title)}</h2>\n <div class="${e}-section-content">\n ${t}\n </div>\n <p class="${e}-back-to-top"><a href="#${e}-top">Back to top</a></p>\n </section>`}).join("\n"),c=n.title?`<h1 class="${e}-title">${s(n.title)}</h1>`:"",a=n.description?`<p class="${e}-desc">${s(n.description)}</p>`:"",p=n.copyright?`<footer class="${e}-footer"><p>${s(n.copyright)}</p></footer>`:"";return`\n <noscript>\n <style>\n .${e}-container {\n max-width: 900px;\n margin: 0 auto;\n padding: 20px;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n line-height: 1.6;\n color: #1f2937;\n }\n .${e}-title {\n font-size: 2rem;\n margin-bottom: 0.5rem;\n color: #0f172a;\n }\n .${e}-desc {\n font-size: 1.1rem;\n color: #64748b;\n margin-bottom: 1.5rem;\n }\n .${e}-nav {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n padding: 12px 0;\n border-bottom: 1px solid #e2e8f0;\n margin-bottom: 2rem;\n position: sticky;\n top: 0;\n background: white;\n z-index: 10;\n }\n .${e}-nav-link {\n padding: 6px 14px;\n border-radius: 6px;\n background: #f1f5f9;\n color: #3b82f6;\n text-decoration: none;\n font-size: 14px;\n font-weight: 500;\n }\n .${e}-nav-link:hover {\n background: #3b82f6;\n color: white;\n }\n .${e}-section {\n margin-bottom: 3rem;\n padding-bottom: 2rem;\n border-bottom: 1px solid #f1f5f9;\n }\n .${e}-section-title {\n font-size: 1.5rem;\n color: #1e293b;\n margin-bottom: 1rem;\n padding-top: 1rem;\n }\n .${e}-section-content h3 {\n font-size: 1.2rem;\n margin-top: 1.5rem;\n color: #334155;\n }\n .${e}-section-content p {\n margin: 0.5rem 0;\n }\n .${e}-section-content pre {\n background: #1e293b;\n color: #e2e8f0;\n padding: 12px 16px;\n border-radius: 6px;\n overflow-x: auto;\n font-size: 13px;\n line-height: 1.5;\n }\n .${e}-section-content code {\n background: #f1f5f9;\n padding: 2px 6px;\n border-radius: 3px;\n font-size: 0.9em;\n }\n .${e}-section-content pre code {\n background: none;\n padding: 0;\n }\n .${e}-section-content table {\n width: 100%;\n border-collapse: collapse;\n margin: 1rem 0;\n }\n .${e}-section-content th,\n .${e}-section-content td {\n padding: 8px 12px;\n border: 1px solid #e2e8f0;\n text-align: left;\n }\n .${e}-section-content th {\n background: #f8fafc;\n font-weight: 600;\n }\n .${e}-section-content img {\n max-width: 100%;\n height: auto;\n }\n .${e}-back-to-top {\n font-size: 13px;\n margin-top: 1.5rem;\n }\n .${e}-back-to-top a {\n color: #3b82f6;\n text-decoration: none;\n }\n .${e}-footer {\n margin-top: 3rem;\n padding-top: 1rem;\n border-top: 1px solid #e2e8f0;\n color: #94a3b8;\n font-size: 13px;\n text-align: center;\n }\n .${e}-js-notice {\n background: #fef3c7;\n border: 1px solid #f59e0b;\n border-radius: 6px;\n padding: 12px 16px;\n margin-bottom: 1.5rem;\n font-size: 14px;\n color: #92400e;\n }\n </style>\n <div id="${e}-top" class="${e}-container">\n ${c}\n ${a}\n <div class="${e}-js-notice">\n This page works best with JavaScript enabled. You are viewing a\n static version of the content.\n </div>\n <nav class="${e}-nav" aria-label="Section navigation">\n ${i}\n </nav>\n ${r}\n ${p}\n </div>\n </noscript>`}function s(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function r(t){return{name:"specifyjs-noscript",closeBundle(){const o=e.resolve(process.cwd(),"dist"),s=e.join(o,"index.html");if(!n.existsSync(s))return void console.warn("[specifyjs-noscript] index.html not found in dist/");const r=i(t);if(!r)return void console.warn("[specifyjs-noscript] No sections provided, skipping.");const c=t.maxContentSize??524288,a=Buffer.byteLength(r,"utf-8");a>c&&console.warn(`[specifyjs-noscript] Noscript content is ${(a/1024).toFixed(0)}KB (limit: ${(c/1024).toFixed(0)}KB). Consider reducing section content.`);let p=n.readFileSync(s,"utf-8");p=p.replace("</body>",`${r}\n</body>`),n.writeFileSync(s,p,"utf-8"),console.log(`Generated: noscript fallback (${t.sections.length} sections, ${(a/1024).toFixed(1)}KB)`)}}}export{i as generateNoscriptHtml,r as specifyJsNoscriptPlugin,t as specifyJsSeoPlugin,o as stripInteractiveElements};
1
+ import n from"fs";import e from"path";function t(t){return{name:"specifyjs-seo",closeBundle(){const o=e.resolve(process.cwd(),"dist"),i=(new Date).toISOString().split("T")[0]??"",s=[...t.routes??["/"]],r=[];if(t.docsDir&&n.existsSync(t.docsDir)){!function(t,o){const i=[{dir:t,prefix:""}];for(;i.length>0;){const{dir:t,prefix:s}=i.pop(),r=n.readdirSync(t,{withFileTypes:!0});for(const n of r)n.isDirectory()?i.push({dir:e.join(t,n.name),prefix:s+n.name+"/"}):n.name.endsWith(".md")&&o.push(s+n.name.replace(".md",""))}}(t.docsDir,r);for(const n of r)s.push(`/#/docs/${n}`)}const c=function(n,e,t){return['<?xml version="1.0" encoding="UTF-8"?>','<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">',...e.map(e=>` <url><loc>${n}${e}</loc><lastmod>${t}</lastmod></url>`),"</urlset>"].join("\n")}(t.siteUrl,s,i);n.writeFileSync(e.join(o,"sitemap.xml"),c);const a=function(n,e){const t=["User-agent: *","Allow: /"];return e&&t.push(...e),t.push("",`Sitemap: ${n}/sitemap.xml`),t.join("\n")}(t.siteUrl,t.robotsRules);n.writeFileSync(e.join(o,"robots.txt"),a);const p=function(n,e){const t=[`# ${n.title??"Site"}`];if(n.description){t.push("");const e=n.description.split("\n");for(const n of e)t.push(`> ${n}`)}t.push(""),t.push(`## Website: ${n.siteUrl}`),n.repository&&t.push(`## Repository: ${n.repository}`),n.npmPackage&&t.push(`## npm: https://www.npmjs.com/package/${n.npmPackage}`);const o=e.filter(n=>n.startsWith("guides/")).map(n=>n.replace("guides/","")),i=e.filter(n=>n.startsWith("api/")).map(n=>n.replace("api/",""));if(o.length>0){t.push("","## Documentation","");for(const e of o)t.push(`- ${e}: ${n.siteUrl}/#/docs/guides/${e}`)}if(i.length>0){t.push("","## API Reference","");for(const e of i)t.push(`- ${e}: ${n.siteUrl}/#/docs/api/${e}`)}return n.npmPackage&&t.push("","## Install","","```",`npm install ${n.npmPackage}`,"```"),n.license&&t.push("",`## License: ${n.license}`),n.author&&t.push(`## Author: ${n.author}`),t.join("\n")}(t,r);if(n.writeFileSync(e.join(o,"llms.txt"),p),t.jsonLd){const i=e.join(o,"index.html");if(n.existsSync(i)){let e=n.readFileSync(i,"utf-8");const o=(Array.isArray(t.jsonLd)?t.jsonLd:[t.jsonLd]).map(n=>`<script type="application/ld+json">${JSON.stringify(n)}<\/script>`).join("\n ");e=e.replace("</head>",` ${o}\n </head>`),n.writeFileSync(i,e,"utf-8")}}const l=t.jsonLd?", JSON-LD":"";console.log(`Generated: sitemap.xml (${s.length} URLs), robots.txt, llms.txt${l}`)}}}function o(n){let e=n,t="";for(let n=0;n<10&&e!==t;n++)t=e,e=e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script\s*>/gi,""),e=e.replace(/<button\b[^>]*>([\s\S]*?)<\/button\s*>/gi,"$1"),e=e.replace(/<input\b[^>]*\/?>/gi,""),e=e.replace(/<select\b[^<]*(?:(?!<\/select>)<[^<]*)*<\/select\s*>/gi,""),e=e.replace(/<textarea\b[^<]*(?:(?!<\/textarea>)<[^<]*)*<\/textarea\s*>/gi,""),e=e.replace(/<\/?form\b[^>]*>/gi,"");return e=e.replace(/\s+on[a-z]+\s*=\s*"[^"]*"/gi,""),e=e.replace(/\s+on[a-z]+\s*=\s*'[^']*'/gi,""),e=e.replace(/\s+style\s*=\s*"[^"]*javascript\s*:[^"]*"/gi,""),e=e.replace(/\s+style\s*=\s*'[^']*javascript\s*:[^']*'/gi,""),e}function i(n){const e=n.classPrefix??"ns",t=n.sections;if(0===t.length)return"";const i=t.map(n=>`<a href="#${n.id}" class="${e}-nav-link">${s(n.title)}</a>`).join("\n "),r=t.map(n=>{const t=o(n.html);return`\n <section id="${n.id}" class="${e}-section">\n <h2 class="${e}-section-title">${s(n.title)}</h2>\n <div class="${e}-section-content">\n ${t}\n </div>\n <p class="${e}-back-to-top"><a href="#${e}-top">Back to top</a></p>\n </section>`}).join("\n"),c=n.title?`<h1 class="${e}-title">${s(n.title)}</h1>`:"",a=n.description?`<p class="${e}-desc">${s(n.description)}</p>`:"",p=n.copyright?`<footer class="${e}-footer"><p>${s(n.copyright)}</p></footer>`:"";return`\n <noscript>\n <style>\n .${e}-container {\n max-width: 900px;\n margin: 0 auto;\n padding: 20px;\n font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;\n line-height: 1.6;\n color: #1f2937;\n }\n .${e}-title {\n font-size: 2rem;\n margin-bottom: 0.5rem;\n color: #0f172a;\n }\n .${e}-desc {\n font-size: 1.1rem;\n color: #64748b;\n margin-bottom: 1.5rem;\n }\n .${e}-nav {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n padding: 12px 0;\n border-bottom: 1px solid #e2e8f0;\n margin-bottom: 2rem;\n position: sticky;\n top: 0;\n background: white;\n z-index: 10;\n }\n .${e}-nav-link {\n padding: 6px 14px;\n border-radius: 6px;\n background: #f1f5f9;\n color: #3b82f6;\n text-decoration: none;\n font-size: 14px;\n font-weight: 500;\n }\n .${e}-nav-link:hover {\n background: #3b82f6;\n color: white;\n }\n .${e}-section {\n margin-bottom: 3rem;\n padding-bottom: 2rem;\n border-bottom: 1px solid #f1f5f9;\n }\n .${e}-section-title {\n font-size: 1.5rem;\n color: #1e293b;\n margin-bottom: 1rem;\n padding-top: 1rem;\n }\n .${e}-section-content h3 {\n font-size: 1.2rem;\n margin-top: 1.5rem;\n color: #334155;\n }\n .${e}-section-content p {\n margin: 0.5rem 0;\n }\n .${e}-section-content pre {\n background: #1e293b;\n color: #e2e8f0;\n padding: 12px 16px;\n border-radius: 6px;\n overflow-x: auto;\n font-size: 13px;\n line-height: 1.5;\n }\n .${e}-section-content code {\n background: #f1f5f9;\n padding: 2px 6px;\n border-radius: 3px;\n font-size: 0.9em;\n }\n .${e}-section-content pre code {\n background: none;\n padding: 0;\n }\n .${e}-section-content table {\n width: 100%;\n border-collapse: collapse;\n margin: 1rem 0;\n }\n .${e}-section-content th,\n .${e}-section-content td {\n padding: 8px 12px;\n border: 1px solid #e2e8f0;\n text-align: left;\n }\n .${e}-section-content th {\n background: #f8fafc;\n font-weight: 600;\n }\n .${e}-section-content img {\n max-width: 100%;\n height: auto;\n }\n .${e}-back-to-top {\n font-size: 13px;\n margin-top: 1.5rem;\n }\n .${e}-back-to-top a {\n color: #3b82f6;\n text-decoration: none;\n }\n .${e}-footer {\n margin-top: 3rem;\n padding-top: 1rem;\n border-top: 1px solid #e2e8f0;\n color: #94a3b8;\n font-size: 13px;\n text-align: center;\n }\n .${e}-js-notice {\n background: #fef3c7;\n border: 1px solid #f59e0b;\n border-radius: 6px;\n padding: 12px 16px;\n margin-bottom: 1.5rem;\n font-size: 14px;\n color: #92400e;\n }\n </style>\n <div id="${e}-top" class="${e}-container">\n ${c}\n ${a}\n <div class="${e}-js-notice">\n This page works best with JavaScript enabled. You are viewing a\n static version of the content.\n </div>\n <nav class="${e}-nav" aria-label="Section navigation">\n ${i}\n </nav>\n ${r}\n ${p}\n </div>\n </noscript>`}function s(n){return n.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function r(t){return{name:"specifyjs-noscript",closeBundle(){const o=e.resolve(process.cwd(),"dist"),s=e.join(o,"index.html");if(!n.existsSync(s))return void console.warn("[specifyjs-noscript] index.html not found in dist/");const r=i(t);if(!r)return void console.warn("[specifyjs-noscript] No sections provided, skipping.");const c=t.maxContentSize??524288,a=Buffer.byteLength(r,"utf-8");a>c&&console.warn(`[specifyjs-noscript] Noscript content is ${(a/1024).toFixed(0)}KB (limit: ${(c/1024).toFixed(0)}KB). Consider reducing section content.`);let p=n.readFileSync(s,"utf-8");p=p.replace("</body>",`${r}\n</body>`),n.writeFileSync(s,p,"utf-8"),console.log(`Generated: noscript fallback (${t.sections.length} sections, ${(a/1024).toFixed(1)}KB)`)}}}export{i as generateNoscriptHtml,r as specifyJsNoscriptPlugin,t as specifyJsSeoPlugin,o as stripInteractiveElements};
2
2
  //# sourceMappingURL=specifyjs-build.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"specifyjs-build.esm.js","sources":["../../src/build/seo-plugin.ts","../../src/build/noscript-plugin.ts"],"sourcesContent":[null,null],"names":["specifyJsSeoPlugin","config","name","closeBundle","distDir","path","resolve","process","cwd","today","Date","toISOString","split","routes","docPaths","docsDir","fs","existsSync","rootDir","results","stack","dir","prefix","length","pop","entries","readdirSync","withFileTypes","entry","isDirectory","push","join","endsWith","replace","walkDocs","dp","sitemap","siteUrl","map","r","generateSitemap","writeFileSync","robots","extraRules","lines","generateRobots","robotsRules","llmsTxt","title","description","descLines","dl","repository","npmPackage","guideNames","filter","p","startsWith","apiNames","g","a","license","author","generateLlmsTxt","console","log","stripInteractiveElements","html","result","prev","pass","generateNoscriptHtml","classPrefix","sections","navLinks","s","id","escapeHtml","sectionBlocks","cleanHtml","desc","copyright","str","specifyJsNoscriptPlugin","indexPath","warn","noscriptHtml","maxSize","maxContentSize","noscriptSize","Buffer","byteLength","toFixed","readFileSync"],"mappings":"sCAqJM,SAAUA,EAAmBC,GACjC,MAAO,CACLC,KAAM,gBACN,WAAAC,GACE,MAAMC,EAAUC,EAAKC,QAAQC,QAAQC,MAAO,QACtCC,GAAQ,IAAIC,MAAOC,cAAcC,MAAM,KAAK,IAAM,GAGlDC,EAAS,IAAKZ,EAAOY,QAAU,CAAC,MAGhCC,EAAqB,GAC3B,GAAIb,EAAOc,SAAWC,EAAGC,WAAWhB,EAAOc,SAAU,EAtH3D,SAAkBG,EAAiBC,GACjC,MAAMC,EAAgD,CAAC,CAAEC,IAAKH,EAASI,OAAQ,KAC/E,KAAOF,EAAMG,OAAS,GAAG,CACvB,MAAMF,IAAEA,EAA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cACAG,kCAGV,CAMA,SAASJ,EAAWK,GAClB,OAAOA,EACJjD,QAAQ,KAAM,SACdA,QAAQ,KAAM,QACdA,QAAQ,KAAM,QACdA,QAAQ,KAAM,SACnB,CAMM,SAAUkD,EAAwBlF,GACtC,MAAO,CACLC,KAAM,qBAEN,WAAAC,GACE,MAAMC,EAAUC,EAAKC,QAAQC,QAAQC,MAAO,QACtC4E,EAAY/E,EAAK0B,KAAK3B,EAAS,cAErC,IAAKY,EAAGC,WAAWmE,GAEjB,YADApB,QAAQqB,KAAK,sDAIf,MAAMC,EAAef,EAAqBtE,GAE1C,IAAKqF,EAEH,YADAtB,QAAQqB,KAAK,wDAKf,MAAME,EAAUtF,EAAOuF,gBAAkB,OACnCC,EAAeC,OAAOC,WAAWL,EAAc,SACjDG,EAAeF,GACjBvB,QAAQqB,KACN,6CAA6CI,EAAe,MAAMG,QAAQ,iBAC5DL,EAAU,MAAMK,QAAQ,6CAK1C,IAAIzB,EAAOnD,EAAG6E,aAAaT,EAAW,SACtCjB,EAAOA,EAAKlC,QAAQ,UAAW,GAAGqD,cAClCtE,EAAGyB,cAAc2C,EAAWjB,EAAM,SAElCH,QAAQC,IACN,iCAAiChE,EAAOwE,SAASlD,qBAC3CkE,EAAe,MAAMG,QAAQ,QAEvC,EAGJ"}
1
+ {"version":3,"file":"specifyjs-build.esm.js","sources":["../../src/build/seo-plugin.ts","../../src/build/noscript-plugin.ts"],"sourcesContent":[null,null],"names":["specifyJsSeoPlugin","config","name","closeBundle","distDir","path","resolve","process","cwd","today","Date","toISOString","split","routes","docPaths","docsDir","fs","existsSync","rootDir","results","stack","dir","prefix","length","pop","entries","readdirSync","withFileTypes","entry","isDirectory","push","join","endsWith","replace","walkDocs","dp","sitemap","siteUrl","map","r","generateSitemap","writeFileSync","robots","extraRules","lines","generateRobots","robotsRules","llmsTxt","title","description","descLines","dl","repository","npmPackage","guideNames","filter","p","startsWith","apiNames","g","a","license","author","generateLlmsTxt","jsonLd","indexPath","html","readFileSync","ldBlocks","Array","isArray","s","JSON","stringify","extras","console","log","stripInteractiveElements","result","prev","pass","generateNoscriptHtml","classPrefix","sections","navLinks","id","escapeHtml","sectionBlocks","cleanHtml","desc","copyright","str","specifyJsNoscriptPlugin","warn","noscriptHtml","maxSize","maxContentSize","noscriptSize","Buffer","byteLength","toFixed"],"mappings":"sCAyJM,SAAUA,EAAmBC,GACjC,MAAO,CACLC,KAAM,gBACN,WAAAC,GACE,MAAMC,EAAUC,EAAKC,QAAQC,QAAQC,MAAO,QACtCC,GAAQ,IAAIC,MAAOC,cAAcC,MAAM,KAAK,IAAM,GAGlDC,EAAS,IAAKZ,EAAOY,QAAU,CAAC,MAGhCC,EAAqB,GAC3B,GAAIb,EAAOc,SAAWC,EAAGC,WAAWhB,EAAOc,SAAU,EAtH3D,SAAkBG,EAAiBC,GACjC,MAAMC,EAAgD,CAAC,CAAEC,IAAKH,EAASI,OAAQ,KAC/E,KAAOF,EAAMG,OAAS,GAAG,CACvB,MAAMF,IAAEA,EAAGC,OAAEA,GAAWF,EAAMI,MACxBC,EAAUT,EAAGU,YAAYL,EAAK,CAAEM,eAAe,IACrD,IAAK,MAAMC,KAASH,EACdG,EAAMC,cACRT,EAAMU,KAAK,CAAET,IAAKhB,EAAK0B,KAAKV,EAAKO,EAAM1B,MAAOoB,OAAQA,EAASM,EAAM1B,KAAO,MACnE0B,EAAM1B,KAAK8B,SAAS,QAC7Bb,EAAQW,KAAKR,EAASM,EAAM1B,KAAK+B,QAAQ,MAAO,IAGtD,CACF,CA0GQC,CAASjC,EAAOc,QAASD,GACzB,IAAK,MAAMqB,KAAMrB,EACfD,EAAOiB,KAAK,WAAWK,IAE3B,CAGA,MAAMC,EA5GZ,SAAyBC,EAAiBxB,EAAkBJ,GAI1D,MAAO,CACL,yCACA,kEALqBI,EAAOyB,IAC3BC,GAAM,eAAeF,IAAUE,mBAAmB9B,qBAMnD,aACAsB,KAAK,KACT,CAkGsBS,CAAgBvC,EAAOoC,QAASxB,EAA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AwB3F,GACtC,MAAO,CACLC,KAAM,qBAEN,WAAAC,GACE,MAAMC,EAAUC,EAAKC,QAAQC,QAAQC,MAAO,QACtCyD,EAAY5D,EAAK0B,KAAK3B,EAAS,cAErC,IAAKY,EAAGC,WAAWgD,GAEjB,YADAU,QAAQkB,KAAK,sDAIf,MAAMC,EAAeb,EAAqBhF,GAE1C,IAAK6F,EAEH,YADAnB,QAAQkB,KAAK,wDAKf,MAAME,EAAU9F,EAAO+F,gBAAkB,OACnCC,EAAeC,OAAOC,WAAWL,EAAc,SACjDG,EAAeF,GACjBpB,QAAQkB,KACN,6CAA6CI,EAAe,MAAMG,QAAQ,iBAC5DL,EAAU,MAAMK,QAAQ,6CAK1C,IAAIlC,EAAOlD,EAAGmD,aAAaF,EAAW,SACtCC,EAAOA,EAAKjC,QAAQ,UAAW,GAAG6D,cAClC9E,EAAGyB,cAAcwB,EAAWC,EAAM,SAElCS,QAAQC,IACN,iCAAiC3E,EAAOkF,SAAS5D,qBAC3C0E,EAAe,MAAMG,QAAQ,QAEvC,EAGJ"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asymmetric-effort/specifyjs",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "description": "A declarative TypeScript UI framework built for performance and simplicity",
5
5
  "publishConfig": {
6
6
  "access": "public"