cascivo 1.7.0 → 1.8.0

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.
Files changed (178) hide show
  1. package/README.md +1 -0
  2. package/dist/app-DDq0Utmj.mjs +5 -0
  3. package/dist/app-DDq0Utmj.mjs.map +1 -0
  4. package/dist/{args-DEL5BZq7.mjs → args-B4PN85cC.mjs} +2 -2
  5. package/dist/{args-DEL5BZq7.mjs.map → args-B4PN85cC.mjs.map} +1 -1
  6. package/dist/blueprint-eOLGuyAi.mjs +2 -0
  7. package/dist/blueprint-eOLGuyAi.mjs.map +1 -0
  8. package/dist/cmdspec.json +107 -2
  9. package/dist/config-CTk7uDrh.mjs +2 -0
  10. package/dist/config-CTk7uDrh.mjs.map +1 -0
  11. package/dist/create-BA9GQ8nl.mjs +1991 -0
  12. package/dist/create-BA9GQ8nl.mjs.map +1 -0
  13. package/dist/{email-BzLRydvR.mjs → email-Drn2bDlp.mjs} +2 -2
  14. package/dist/{email-BzLRydvR.mjs.map → email-Drn2bDlp.mjs.map} +1 -1
  15. package/dist/generated/audit-contract.json +38 -38
  16. package/dist/index.d.mts.map +1 -1
  17. package/dist/index.mjs +64 -49
  18. package/dist/index.mjs.map +1 -1
  19. package/dist/mcp-CqX_Yi06.mjs +2 -0
  20. package/dist/mcp-CqX_Yi06.mjs.map +1 -0
  21. package/dist/merge-D332dc_m.mjs +8 -0
  22. package/dist/merge-D332dc_m.mjs.map +1 -0
  23. package/dist/rolldown-runtime-DT7IzrpZ.mjs +1 -0
  24. package/package.json +5 -4
  25. package/readme.body.md +1 -0
  26. package/recipes/README.md +21 -0
  27. package/recipes/accounts/recipe.json +12 -0
  28. package/recipes/accounts/src/auth.ts +7 -0
  29. package/recipes/agent/recipe.json +16 -0
  30. package/recipes/agent/src/assistant.module.css +33 -0
  31. package/recipes/agent/src/assistant.ts +26 -0
  32. package/recipes/agent/src/routes/assistant.tsx +130 -0
  33. package/recipes/agent/worker/assistant.ts +55 -0
  34. package/recipes/agent/worker/scripted-model.ts +102 -0
  35. package/recipes/auth-email/recipe.json +7 -0
  36. package/recipes/auth-email/src/routes/signin/verify.tsx +50 -0
  37. package/recipes/auth-email/worker/auth.ts +37 -0
  38. package/recipes/billing/recipe.json +14 -0
  39. package/recipes/billing/src/billing.ts +90 -0
  40. package/recipes/billing/src/routes/billing.tsx +150 -0
  41. package/recipes/billing/worker/billing.ts +325 -0
  42. package/recipes/block-auth-login/recipe.json +7 -0
  43. package/recipes/block-auth-login/src/blocks/auth-login.module.css +86 -0
  44. package/recipes/block-auth-login/src/blocks/auth-login.tsx +80 -0
  45. package/recipes/block-auth-signup/recipe.json +7 -0
  46. package/recipes/block-auth-signup/src/blocks/auth-signup.module.css +80 -0
  47. package/recipes/block-auth-signup/src/blocks/auth-signup.tsx +118 -0
  48. package/recipes/block-dashboard-charts/recipe.json +9 -0
  49. package/recipes/block-dashboard-charts/src/blocks/dashboard-charts.tsx +80 -0
  50. package/recipes/block-dashboard-overview/recipe.json +7 -0
  51. package/recipes/block-dashboard-overview/src/blocks/dashboard-overview.module.css +83 -0
  52. package/recipes/block-dashboard-overview/src/blocks/dashboard-overview.tsx +53 -0
  53. package/recipes/block-dashboard-table/recipe.json +7 -0
  54. package/recipes/block-dashboard-table/src/blocks/dashboard-table.module.css +74 -0
  55. package/recipes/block-dashboard-table/src/blocks/dashboard-table.tsx +203 -0
  56. package/recipes/block-empty-dashboard/recipe.json +6 -0
  57. package/recipes/block-empty-dashboard/src/blocks/empty-dashboard.tsx +20 -0
  58. package/recipes/block-faq/recipe.json +7 -0
  59. package/recipes/block-faq/src/blocks/faq.module.css +35 -0
  60. package/recipes/block-faq/src/blocks/faq.tsx +55 -0
  61. package/recipes/block-login-page/recipe.json +6 -0
  62. package/recipes/block-login-page/src/blocks/login-page.tsx +51 -0
  63. package/recipes/block-marketing-features/recipe.json +7 -0
  64. package/recipes/block-marketing-features/src/blocks/marketing-features.module.css +77 -0
  65. package/recipes/block-marketing-features/src/blocks/marketing-features.tsx +71 -0
  66. package/recipes/block-marketing-hero/recipe.json +7 -0
  67. package/recipes/block-marketing-hero/src/blocks/marketing-hero.module.css +51 -0
  68. package/recipes/block-marketing-hero/src/blocks/marketing-hero.tsx +38 -0
  69. package/recipes/block-notification-center/recipe.json +6 -0
  70. package/recipes/block-notification-center/src/blocks/notification-center.tsx +62 -0
  71. package/recipes/block-page-with-breadcrumb/recipe.json +6 -0
  72. package/recipes/block-page-with-breadcrumb/src/blocks/page-with-breadcrumb.tsx +23 -0
  73. package/recipes/block-pricing/recipe.json +7 -0
  74. package/recipes/block-pricing/src/blocks/pricing.module.css +102 -0
  75. package/recipes/block-pricing/src/blocks/pricing.tsx +90 -0
  76. package/recipes/block-settings-form-page/recipe.json +6 -0
  77. package/recipes/block-settings-form-page/src/blocks/settings-form-page.tsx +85 -0
  78. package/recipes/block-settings-profile/recipe.json +7 -0
  79. package/recipes/block-settings-profile/src/blocks/settings-profile.module.css +92 -0
  80. package/recipes/block-settings-profile/src/blocks/settings-profile.tsx +127 -0
  81. package/recipes/block-site-footer/recipe.json +7 -0
  82. package/recipes/block-site-footer/src/blocks/site-footer.module.css +83 -0
  83. package/recipes/block-site-footer/src/blocks/site-footer.tsx +72 -0
  84. package/recipes/block-stats-cards/recipe.json +6 -0
  85. package/recipes/block-stats-cards/src/blocks/stats-cards.tsx +49 -0
  86. package/recipes/block-testimonials/recipe.json +7 -0
  87. package/recipes/block-testimonials/src/blocks/testimonials.module.css +67 -0
  88. package/recipes/block-testimonials/src/blocks/testimonials.tsx +57 -0
  89. package/recipes/block-users-table-page/recipe.json +6 -0
  90. package/recipes/block-users-table-page/src/blocks/users-table-page.tsx +60 -0
  91. package/recipes/board/recipe.json +14 -0
  92. package/recipes/board/src/board.module.css +40 -0
  93. package/recipes/board/src/board.ts +51 -0
  94. package/recipes/board/src/routes/board.tsx +124 -0
  95. package/recipes/checkout/recipe.json +15 -0
  96. package/recipes/checkout/src/checkout.ts +93 -0
  97. package/recipes/checkout/src/routes/checkout/[order].tsx +131 -0
  98. package/recipes/checkout/src/routes/checkout.tsx +70 -0
  99. package/recipes/checkout/worker/checkout.ts +357 -0
  100. package/recipes/cloudflare/recipe.json +10 -0
  101. package/recipes/cloudflare/src/LiveCard.tsx +55 -0
  102. package/recipes/cloudflare/src/live.ts +43 -0
  103. package/recipes/cloudflare/src/main.tsx +17 -0
  104. package/recipes/cloudflare/src/router.ts +6 -0
  105. package/recipes/cloudflare/src/routes/404.tsx +5 -0
  106. package/recipes/crud/recipe.json +16 -0
  107. package/recipes/crud/src/customers-page.ts +55 -0
  108. package/recipes/crud/src/customers.ts +76 -0
  109. package/recipes/crud/src/routes/customers.tsx +180 -0
  110. package/recipes/crud/worker/customers.ts +69 -0
  111. package/recipes/crud/worker/migrations.ts +50 -0
  112. package/recipes/digest/recipe.json +14 -0
  113. package/recipes/digest/src/digest.ts +47 -0
  114. package/recipes/digest/src/routes/digest.tsx +82 -0
  115. package/recipes/digest/worker/digest.ts +129 -0
  116. package/recipes/export/recipe.json +12 -0
  117. package/recipes/export/src/routes/report.tsx +68 -0
  118. package/recipes/files/recipe.json +15 -0
  119. package/recipes/files/src/files.module.css +16 -0
  120. package/recipes/files/src/files.ts +37 -0
  121. package/recipes/files/src/routes/files.tsx +81 -0
  122. package/recipes/files/src/upload-policy.ts +12 -0
  123. package/recipes/import/recipe.json +15 -0
  124. package/recipes/import/src/import-job.ts +60 -0
  125. package/recipes/import/src/import-page.ts +36 -0
  126. package/recipes/import/src/routes/import.tsx +112 -0
  127. package/recipes/import/worker/import-job.ts +86 -0
  128. package/recipes/live/recipe.json +13 -0
  129. package/recipes/live/src/ops.ts +22 -0
  130. package/recipes/live/src/routes/ops.tsx +123 -0
  131. package/recipes/newsletter/recipe.json +22 -0
  132. package/recipes/newsletter/src/newsletter.ts +139 -0
  133. package/recipes/newsletter/src/routes/newsletter/confirm.tsx +58 -0
  134. package/recipes/newsletter/src/routes/newsletter/send.tsx +192 -0
  135. package/recipes/newsletter/src/routes/newsletter/unsubscribe.tsx +56 -0
  136. package/recipes/newsletter/src/routes/newsletter.tsx +82 -0
  137. package/recipes/newsletter/worker/newsletter-email.ts +90 -0
  138. package/recipes/newsletter/worker/newsletter.ts +455 -0
  139. package/recipes/notes/recipe.json +13 -0
  140. package/recipes/notes/src/notes.ts +61 -0
  141. package/recipes/notes/src/routes/notes.tsx +76 -0
  142. package/recipes/publish/recipe.json +16 -0
  143. package/recipes/publish/src/pages.ts +72 -0
  144. package/recipes/publish/src/routes/p/[slug].tsx +50 -0
  145. package/recipes/publish/src/routes/publish.tsx +160 -0
  146. package/recipes/publish/worker/page-html.ts +126 -0
  147. package/recipes/publish/worker/pages.ts +65 -0
  148. package/recipes/publish-preview/recipe.json +6 -0
  149. package/recipes/publish-preview/worker/page-preview.ts +57 -0
  150. package/recipes/search/recipe.json +15 -0
  151. package/recipes/search/src/routes/search.tsx +128 -0
  152. package/recipes/search/src/search.ts +64 -0
  153. package/recipes/search/worker/articles.ts +126 -0
  154. package/recipes/search/worker/search.ts +146 -0
  155. package/recipes/social/recipe.json +15 -0
  156. package/recipes/social/src/routes/social.tsx +456 -0
  157. package/recipes/social/src/social.ts +349 -0
  158. package/recipes/social/worker/social-post.ts +199 -0
  159. package/recipes/social/worker/social.ts +719 -0
  160. package/recipes/usage/recipe.json +14 -0
  161. package/recipes/usage/src/routes/usage.tsx +88 -0
  162. package/recipes/usage/src/usage.ts +61 -0
  163. package/recipes/usage/worker/usage.ts +75 -0
  164. package/recipes/voice/recipe.json +15 -0
  165. package/recipes/voice/src/routes/voice.tsx +117 -0
  166. package/recipes/voice/src/voice.ts +91 -0
  167. package/recipes/voice/worker/scripted-voice.ts +46 -0
  168. package/recipes/voice/worker/voice.ts +64 -0
  169. package/recipes/webhooks/recipe.json +14 -0
  170. package/recipes/webhooks/src/routes/webhooks.tsx +106 -0
  171. package/recipes/webhooks/src/webhooks.ts +43 -0
  172. package/recipes/webhooks/worker/webhooks.ts +118 -0
  173. package/dist/config-CpoAu8C-.mjs +0 -2
  174. package/dist/config-CpoAu8C-.mjs.map +0 -1
  175. package/dist/create-BcfPWm1F.mjs +0 -9976
  176. package/dist/create-BcfPWm1F.mjs.map +0 -1
  177. package/dist/mcp-jwnfOQIt.mjs +0 -2
  178. package/dist/mcp-jwnfOQIt.mjs.map +0 -1
@@ -1,5 +1,5 @@
1
- import{n as e,t}from"./args-DEL5BZq7.mjs";import{stdin as n}from"node:process";import{existsSync as r,mkdirSync as i,readFileSync as a,statSync as o,writeFileSync as s}from"node:fs";import{dirname as c,join as l}from"node:path";import{tmpdir as u}from"node:os";const d=`https://www.caniemail.com/api/data.json`,f=l(u(),`cascivo-caniemail.json`);async function p(){try{return await import(`@cascivo/email`)}catch{throw Error(`cascivo email lint needs @cascivo/email, which is not installed here.
1
+ import{n as e,t}from"./args-B4PN85cC.mjs";import{stdin as n}from"node:process";import{existsSync as r,mkdirSync as i,readFileSync as a,statSync as o,writeFileSync as s}from"node:fs";import{dirname as c,join as l}from"node:path";import{tmpdir as u}from"node:os";const d=`https://www.caniemail.com/api/data.json`,f=l(u(),`cascivo-caniemail.json`);async function p(){try{return await import(`@cascivo/email`)}catch{throw Error(`cascivo email lint needs @cascivo/email, which is not installed here.
2
2
  pnpm add @cascivo/email`)}}async function m(){let e=[];for await(let t of n)e.push(t);return Buffer.concat(e).toString(`utf8`)}function h(e,t){let n=e=>{throw Error(`The Can I email matrix from ${t} is not usable: ${e}`)};(typeof e!=`object`||!e)&&n(`not a JSON object`);let r=e;Array.isArray(r.data)||n("no `data` array");let i=r.data;i.length===0&&n("`data` is empty");let a=i.map((e,t)=>{if(typeof e!=`object`||!e)return n(`data[${t}] is not an object`);let r=e;return typeof r.slug==`string`?typeof r.stats!=`object`||r.stats===null?n(`data[${t}] (${r.slug}) has no \`stats\``):{slug:r.slug,title:typeof r.title==`string`?r.title:r.slug,category:typeof r.category==`string`?r.category:`unknown`,...typeof r.keywords==`string`?{keywords:r.keywords}:{},stats:r.stats}:n(`data[${t}] has no \`slug\``)});return{api_version:typeof r.api_version==`string`?r.api_version:`unknown`,last_update_date:typeof r.last_update_date==`string`?r.last_update_date:`unknown`,data:a}}async function g(e){let n=t(e,`data`);if(n!==void 0){if(!r(n))throw Error(`No such file: ${n}`);return h(JSON.parse(a(n,`utf8`)),n)}if(!e.includes(`--refresh`)&&r(f)&&Date.now()-o(f).mtimeMs<864e5)return h(JSON.parse(a(f,`utf8`)),f);let l=await fetch(d).catch(e=>{throw Error(`Could not fetch the Can I email matrix from ${d}: ${e instanceof Error?e.message:String(e)}\n Offline? Download it once and pass --data <file>.`)});if(!l.ok)throw Error(`Could not fetch ${d}: ${l.status} ${l.statusText}`);let u=await l.text();return i(c(f),{recursive:!0}),s(f,u),h(JSON.parse(u),d)}function _(e,t){let n=[t];for(let t of e)n.push(` ${t.level===`blocked`?`✗`:`!`} ${t.slug} ${t.source}\n ${t.clients.join(`, `)}`);return n.join(`
3
3
  `)}function v(e){return e.map(e=>` ${e.level===`blocked`?`✗`:`!`} link ${e.message}`).join(`
4
4
  `)}async function y(e,t=fetch){let n=/* @__PURE__ */ new Map,r=[...new Set(e)],i=async e=>{let r=n=>t(e,{method:n,redirect:`follow`,signal:AbortSignal.timeout(1e4)});try{let t=await r(`HEAD`);t.ok||(t=await r(`GET`)),t.ok||n.set(e,`answered ${t.status} ${t.statusText}`.trim())}catch(t){n.set(e,`could not be reached: ${t instanceof Error?t.message:String(t)}`)}},a=Array.from({length:Math.min(8,r.length)},async()=>{for(let e=r.shift();e!==void 0;e=r.shift())await i(e)});return await Promise.all(a),n}async function b(t){let n=[...e(t,[`data`]),...t.includes(`-`)?[`-`]:[]];if(n.length===0)throw Error("cascivo email lint needs a file, or `-` to read rendered HTML from stdin.");let{checkLinks:r,lint:i,linkUrls:o,indexFeatures:s,CASCIVO_ALLOW:c}=await p(),l=s(await g(t)),u=t.includes(`--no-allowlist`)?{}:c,d=0,f=0;for(let e of n){let n=e===`-`?await m():a(e,`utf8`),s=i(n,l,{allow:u}),c=s.filter(e=>e.level===`blocked`),p=s.filter(e=>e.level===`caveat`),h=r(n);if(t.includes(`--check-links`)){let e=new Set(h.map(e=>e.value)),t=o(n).filter(t=>t.url!==null&&/^https?:/i.test(t.url)&&!e.has(t.url)),r=await y(t.map(e=>e.url));for(let{element:e,url:n}of t){let t=r.get(n);t!==void 0&&(r.delete(n),h.unshift({level:`blocked`,problem:`unreachable`,value:n,element:e,message:`<${e}> "${n}" ${t}`}))}}let g=h.filter(e=>e.level===`blocked`).length;d+=c.length+g,f+=p.length+h.length-g;let b=e===`-`?`(stdin)`:e;if(s.length===0&&h.length===0){console.log(`✓ ${b}`);continue}let x=c.length+g>0;console.log(_([...c,...p],`${x?`✗`:`✓`} ${b}`)),h.length>0&&console.log(v(h))}let h=`\n${n.length} file${n.length===1?``:`s`}, ${d} blocked, ${f} caveat${f===1?``:`s`}.`;console.log(h),d>0&&(process.exitCode=1)}async function x(e){let[t,...n]=e;if(t===`lint`){await b(n);return}console.error(t===void 0?"cascivo email needs a subcommand. Try `cascivo email lint --help`.":`Unknown email subcommand: ${t}`),process.exitCode=1}export{x as email};
5
- //# sourceMappingURL=email-BzLRydvR.mjs.map
5
+ //# sourceMappingURL=email-Drn2bDlp.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"email-BzLRydvR.mjs","names":["positionalArgs","SOURCE","CACHE","join","tmpdir","loadEmail","readStdin","chunks","chunk","stdin","parseMatrix","bad","source","why","raw","root","\"data\"","entries","data","entry","i","feature","\"slug\"","\"stats\"","\"title\"","\"category\"","\"keywords\"","\"api_version\"","\"last_update_date\"","loadMatrix","supplied","flagValue","args","existsSync","readFileSync","statSync","response","error","text","mkdirSync","dirname","writeFileSync","format","lines","label","finding","findings","formatLinks","f","probeUrls","failures","queue","urls","probe","attempt","fetchImpl","url","workers","emailLint","files","features","indexFeatures","allow","CASCIVO_ALLOW","blockedTotal","caveatTotal","file","html","lint","blocked","caveats","links","checkLinks","flagged","linkUrls","u","element","linksBlocked","name","failed","summary","email","subcommand","rest"],"sources":["../src/commands/email.ts"],"sourcesContent":["/**\n * `cascivo email lint` — the conformance check, without the boilerplate.\n *\n * `lint()` is the most compelling thing in `@cascivo/email` and it cannot run out of the\n * box: it needs the Can I email support matrix, which the package deliberately does not\n * bundle (~483 KB of test data in every adopter's `node_modules`). The README says where to\n * fetch it, and every adopter then writes the same dozen lines — fetch, cache, index, lint,\n * decide an exit code. This is those lines, once.\n *\n * It lints **rendered HTML**, not templates. Rendering a `.tsx` would mean a compiler this\n * CLI has no business carrying, and every project already renders in its own build; piping\n * the output here costs nothing and keeps the command honest about what it checks — the\n * finished document, which is the only thing a client ever sees.\n */\nimport { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'node:fs'\nimport { dirname, join } from 'node:path'\nimport { tmpdir } from 'node:os'\nimport { stdin } from 'node:process'\nimport type { CanIEmailData, Feature, Finding, LinkFinding } from '@cascivo/email'\nimport { flagValue, positionalArgs } from '../utils/args.js'\n\n/** Upstream, and the URL the README and the preview both name. MIT, hteumeuleu/caniemail. */\nconst SOURCE = 'https://www.caniemail.com/api/data.json'\n\n/**\n * Where a fetched copy is kept.\n *\n * In the temp directory rather than the project: it is a cache of somebody else's data, it\n * is large, and a stale copy is a correctness problem rather than a disk one — so it lives\n * somewhere that gets cleaned up, and `--refresh` exists for when it should not be trusted.\n */\nconst CACHE = join(tmpdir(), 'cascivo-caniemail.json')\n\n/** A day. Long enough that a CI run does not re-download; short enough to notice a retest. */\nconst MAX_AGE_MS = 24 * 60 * 60 * 1000\n\n/**\n * Load `@cascivo/email` from the caller's project.\n *\n * An optional peer, resolved at call time. Making it a real dependency would put the whole\n * email package into the download for `cascivo add button`; anyone who wants this command\n * has it installed already, and the failure below says so if they do not.\n *\n * `@cascivo/email` is a devDependency here purely so these types resolve — nothing in the\n * published bundle imports it except this line.\n */\nasync function loadEmail(): Promise<typeof import('@cascivo/email')> {\n try {\n return await import('@cascivo/email')\n } catch {\n throw new Error(\n 'cascivo email lint needs @cascivo/email, which is not installed here.\\n' +\n ' pnpm add @cascivo/email',\n )\n }\n}\n\nasync function readStdin(): Promise<string> {\n const chunks: Buffer[] = []\n for await (const chunk of stdin) chunks.push(chunk as Buffer)\n return Buffer.concat(chunks).toString('utf8')\n}\n\n/**\n * Turn the downloaded payload into a `CanIEmailData`, or say why it is not one.\n *\n * `res.json()` hands back `any`, so `as CanIEmailData` would type-check and prove nothing —\n * and this payload is the definition of one you did not produce: third-party, fetched over\n * the network, and cached to disk where anything could edit it. A bad file would otherwise\n * surface as an unreadable `TypeError` from inside `indexFeatures`.\n *\n * Structural failures throw; a feature missing the optional fields is coerced rather than\n * rejected, so an upstream addition cannot break the command.\n */\nexport function parseMatrix(raw: unknown, source: string): CanIEmailData {\n const bad = (why: string): never => {\n throw new Error(`The Can I email matrix from ${source} is not usable: ${why}`)\n }\n if (typeof raw !== 'object' || raw === null) bad('not a JSON object')\n const root = raw as Record<string, unknown>\n if (!Array.isArray(root['data'])) bad('no `data` array')\n const entries = root['data'] as unknown[]\n if (entries.length === 0) bad('`data` is empty')\n\n const data: Feature[] = entries.map((entry, i) => {\n if (typeof entry !== 'object' || entry === null) return bad(`data[${i}] is not an object`)\n const feature = entry as Record<string, unknown>\n if (typeof feature['slug'] !== 'string') return bad(`data[${i}] has no \\`slug\\``)\n if (typeof feature['stats'] !== 'object' || feature['stats'] === null) {\n return bad(`data[${i}] (${feature['slug']}) has no \\`stats\\``)\n }\n return {\n slug: feature['slug'],\n title: typeof feature['title'] === 'string' ? feature['title'] : feature['slug'],\n category: typeof feature['category'] === 'string' ? feature['category'] : 'unknown',\n ...(typeof feature['keywords'] === 'string' ? { keywords: feature['keywords'] } : {}),\n stats: feature['stats'] as Feature['stats'],\n }\n })\n\n return {\n api_version: typeof root['api_version'] === 'string' ? root['api_version'] : 'unknown',\n last_update_date:\n typeof root['last_update_date'] === 'string' ? root['last_update_date'] : 'unknown',\n data,\n }\n}\n\n/** The matrix, from `--data`, from a fresh-enough cache, or from upstream. */\nasync function loadMatrix(args: string[]): Promise<CanIEmailData> {\n const supplied = flagValue(args, 'data')\n if (supplied !== undefined) {\n if (!existsSync(supplied)) throw new Error(`No such file: ${supplied}`)\n return parseMatrix(JSON.parse(readFileSync(supplied, 'utf8')), supplied)\n }\n\n const refresh = args.includes('--refresh')\n if (!refresh && existsSync(CACHE) && Date.now() - statSync(CACHE).mtimeMs < MAX_AGE_MS) {\n return parseMatrix(JSON.parse(readFileSync(CACHE, 'utf8')), CACHE)\n }\n\n const response = await fetch(SOURCE).catch((error: unknown) => {\n throw new Error(\n `Could not fetch the Can I email matrix from ${SOURCE}: ` +\n `${error instanceof Error ? error.message : String(error)}\\n` +\n ' Offline? Download it once and pass --data <file>.',\n )\n })\n if (!response.ok) {\n throw new Error(`Could not fetch ${SOURCE}: ${response.status} ${response.statusText}`)\n }\n const text = await response.text()\n // Cache before parsing so a malformed payload is inspectable rather than just gone.\n mkdirSync(dirname(CACHE), { recursive: true })\n writeFileSync(CACHE, text)\n return parseMatrix(JSON.parse(text), SOURCE)\n}\n\nfunction format(findings: Finding[], label: string): string {\n const lines = [label]\n for (const finding of findings) {\n lines.push(\n ` ${finding.level === 'blocked' ? '✗' : '!'} ${finding.slug} ${finding.source}` +\n `\\n ${finding.clients.join(', ')}`,\n )\n }\n return lines.join('\\n')\n}\n\nfunction formatLinks(findings: LinkFinding[]): string {\n return findings.map((f) => ` ${f.level === 'blocked' ? '✗' : '!'} link ${f.message}`).join('\\n')\n}\n\n/** How long one URL gets before it counts as unreachable. */\nconst PROBE_TIMEOUT_MS = 10_000\n\n/** Requests in flight at once — enough to be quick, few enough not to look like a scan. */\nconst PROBE_CONCURRENCY = 8\n\n/**\n * Request every URL once and report the ones that do not answer with a success.\n *\n * `HEAD` first, because it does not download the page; some servers refuse it (405, 501) or\n * mishandle it, so a failed `HEAD` is retried as `GET` before it is reported. Redirects are\n * followed, since a tracked or shortened link is normally a redirect.\n *\n * `fetchImpl` exists for the tests: they cannot reach the network, and should not.\n */\nexport async function probeUrls(\n urls: readonly string[],\n fetchImpl: typeof fetch = fetch,\n): Promise<Map<string, string>> {\n const failures = new Map<string, string>()\n const queue = [...new Set(urls)]\n\n const probe = async (url: string): Promise<void> => {\n const attempt = (method: 'HEAD' | 'GET') =>\n fetchImpl(url, { method, redirect: 'follow', signal: AbortSignal.timeout(PROBE_TIMEOUT_MS) })\n try {\n let response = await attempt('HEAD')\n if (!response.ok) response = await attempt('GET')\n if (!response.ok)\n failures.set(url, `answered ${response.status} ${response.statusText}`.trim())\n } catch (error) {\n failures.set(\n url,\n `could not be reached: ${error instanceof Error ? error.message : String(error)}`,\n )\n }\n }\n\n const workers = Array.from({ length: Math.min(PROBE_CONCURRENCY, queue.length) }, async () => {\n for (let url = queue.shift(); url !== undefined; url = queue.shift()) await probe(url)\n })\n await Promise.all(workers)\n return failures\n}\n\n/**\n * Lint one or more rendered emails.\n *\n * Exits non-zero on a blocked finding and only on a blocked finding: a caveat is partial\n * support an author wants to know about, not a reason to fail a build.\n */\nexport async function emailLint(args: string[]): Promise<void> {\n // `positionalArgs` rather than a filter on `-`: a plain filter also keeps the *value* of\n // `--data <file>`, so the matrix itself got linted as if it were an email. The symptom was\n // spectacular — 28 blocked findings against a clean template, because the scanner read\n // slugs like `html-dfn` out of the JSON and took them for tags.\n //\n // A bare `-` is stdin by long convention and looks like a flag to any such parser, so it\n // is added back by name.\n const files = [...positionalArgs(args, ['data']), ...(args.includes('-') ? ['-'] : [])]\n if (files.length === 0) {\n throw new Error('cascivo email lint needs a file, or `-` to read rendered HTML from stdin.')\n }\n\n const { checkLinks, lint, linkUrls, indexFeatures, CASCIVO_ALLOW } = await loadEmail()\n const features = indexFeatures(await loadMatrix(args))\n const allow = args.includes('--no-allowlist') ? {} : CASCIVO_ALLOW\n\n let blockedTotal = 0\n let caveatTotal = 0\n\n for (const file of files) {\n const html = file === '-' ? await readStdin() : readFileSync(file, 'utf8')\n const findings = lint(html, features, { allow })\n const blocked = findings.filter((f) => f.level === 'blocked')\n const caveats = findings.filter((f) => f.level === 'caveat')\n const links = checkLinks(html)\n if (args.includes('--check-links')) {\n // Only what the static check passed: a placeholder or a local host is already reported,\n // and requesting `localhost` from CI would only add a second, more confusing finding.\n const flagged = new Set(links.map((f) => f.value))\n const urls = linkUrls(html).filter(\n (u): u is { element: 'a' | 'img'; url: string } =>\n u.url !== null && /^https?:/i.test(u.url) && !flagged.has(u.url),\n )\n const failures = await probeUrls(urls.map((u) => u.url))\n for (const { element, url } of urls) {\n const why = failures.get(url)\n if (why === undefined) continue\n failures.delete(url)\n links.unshift({\n level: 'blocked',\n problem: 'unreachable',\n value: url,\n element,\n message: `<${element}> \"${url}\" ${why}`,\n })\n }\n }\n const linksBlocked = links.filter((f) => f.level === 'blocked').length\n blockedTotal += blocked.length + linksBlocked\n caveatTotal += caveats.length + links.length - linksBlocked\n\n const name = file === '-' ? '(stdin)' : file\n if (findings.length === 0 && links.length === 0) {\n console.log(`✓ ${name}`)\n continue\n }\n const failed = blocked.length + linksBlocked > 0\n console.log(format([...blocked, ...caveats], `${failed ? '✗' : '✓'} ${name}`))\n if (links.length > 0) console.log(formatLinks(links))\n }\n\n const summary =\n `\\n${files.length} file${files.length === 1 ? '' : 's'}, ` +\n `${blockedTotal} blocked, ${caveatTotal} caveat${caveatTotal === 1 ? '' : 's'}.`\n console.log(summary)\n if (blockedTotal > 0) process.exitCode = 1\n}\n\n/** Dispatch `cascivo email <subcommand>`. */\nexport async function email(args: string[]): Promise<void> {\n const [subcommand, ...rest] = args\n if (subcommand === 'lint') {\n await emailLint(rest)\n return\n }\n console.error(\n subcommand === undefined\n ? 'cascivo email needs a subcommand. Try `cascivo email lint --help`.'\n : `Unknown email subcommand: ${subcommand}`,\n )\n process.exitCode = 1\n}\n"],"mappings":"qQAsBA,MAAMC,EAAS,0CASTC,EAAQC,EAAKC,EAAO,EAAG,wBAAwB,EAerD,eAAeC,GAAsD,CACnE,GAAI,CACF,OAAO,MAAM,OAAO,iB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I,KAAKO,GAAM,EACvB,QACF,CACA,IAAMC,EAASV,EAAQ,OAASQ,EAAe,EAC/C,QAAQ,IAAInC,EAAO,CAAC,GAAG2B,EAAS,GAAGC,CAAO,EAAG,GAAGS,EAAS,IAAM,IAAI,GAAGD,GAAM,CAAC,EACzEP,EAAM,OAAS,GAAG,QAAQ,IAAIxB,EAAYwB,CAAK,CAAC,CACtD,CAEA,IAAMS,EACJ,KAAKrB,EAAM,OAAO,OAAOA,EAAM,SAAW,EAAI,GAAK,IAAI,IACpDK,EAAa,YAAYC,EAAY,SAASA,IAAgB,EAAI,GAAK,IAAI,GAChF,QAAQ,IAAIe,CAAO,EACfhB,EAAe,IAAG,QAAQ,SAAW,EAC3C,CAGA,eAAsBiB,EAAM,EAA+B,CACzD,GAAM,CAACC,EAAY,GAAGC,GAAQnD,EAC9B,GAAIkD,IAAe,OAAQ,CACzB,MAAMxB,EAAUyB,CAAI,EACpB,MACF,CACA,QAAQ,MACND,IAAe,IAAA,GACX,qEACA,6BAA6BA,GACnC,EACA,QAAQ,SAAW,CACrB"}
1
+ {"version":3,"file":"email-Drn2bDlp.mjs","names":["positionalArgs","SOURCE","CACHE","join","tmpdir","loadEmail","readStdin","chunks","chunk","stdin","parseMatrix","bad","source","why","raw","root","\"data\"","entries","data","entry","i","feature","\"slug\"","\"stats\"","\"title\"","\"category\"","\"keywords\"","\"api_version\"","\"last_update_date\"","loadMatrix","supplied","flagValue","args","existsSync","readFileSync","statSync","response","error","text","mkdirSync","dirname","writeFileSync","format","lines","label","finding","findings","formatLinks","f","probeUrls","failures","queue","urls","probe","attempt","fetchImpl","url","workers","emailLint","files","features","indexFeatures","allow","CASCIVO_ALLOW","blockedTotal","caveatTotal","file","html","lint","blocked","caveats","links","checkLinks","flagged","linkUrls","u","element","linksBlocked","name","failed","summary","email","subcommand","rest"],"sources":["../src/commands/email.ts"],"sourcesContent":["/**\n * `cascivo email lint` — the conformance check, without the boilerplate.\n *\n * `lint()` is the most compelling thing in `@cascivo/email` and it cannot run out of the\n * box: it needs the Can I email support matrix, which the package deliberately does not\n * bundle (~483 KB of test data in every adopter's `node_modules`). The README says where to\n * fetch it, and every adopter then writes the same dozen lines — fetch, cache, index, lint,\n * decide an exit code. This is those lines, once.\n *\n * It lints **rendered HTML**, not templates. Rendering a `.tsx` would mean a compiler this\n * CLI has no business carrying, and every project already renders in its own build; piping\n * the output here costs nothing and keeps the command honest about what it checks — the\n * finished document, which is the only thing a client ever sees.\n */\nimport { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from 'node:fs'\nimport { dirname, join } from 'node:path'\nimport { tmpdir } from 'node:os'\nimport { stdin } from 'node:process'\nimport type { CanIEmailData, Feature, Finding, LinkFinding } from '@cascivo/email'\nimport { flagValue, positionalArgs } from '../utils/args.js'\n\n/** Upstream, and the URL the README and the preview both name. MIT, hteumeuleu/caniemail. */\nconst SOURCE = 'https://www.caniemail.com/api/data.json'\n\n/**\n * Where a fetched copy is kept.\n *\n * In the temp directory rather than the project: it is a cache of somebody else's data, it\n * is large, and a stale copy is a correctness problem rather than a disk one — so it lives\n * somewhere that gets cleaned up, and `--refresh` exists for when it should not be trusted.\n */\nconst CACHE = join(tmpdir(), 'cascivo-caniemail.json')\n\n/** A day. Long enough that a CI run does not re-download; short enough to notice a retest. */\nconst MAX_AGE_MS = 24 * 60 * 60 * 1000\n\n/**\n * Load `@cascivo/email` from the caller's project.\n *\n * An optional peer, resolved at call time. Making it a real dependency would put the whole\n * email package into the download for `cascivo add button`; anyone who wants this command\n * has it installed already, and the failure below says so if they do not.\n *\n * `@cascivo/email` is a devDependency here purely so these types resolve — nothing in the\n * published bundle imports it except this line.\n */\nasync function loadEmail(): Promise<typeof import('@cascivo/email')> {\n try {\n return await import('@cascivo/email')\n } catch {\n throw new Error(\n 'cascivo email lint needs @cascivo/email, which is not installed here.\\n' +\n ' pnpm add @cascivo/email',\n )\n }\n}\n\nasync function readStdin(): Promise<string> {\n const chunks: Buffer[] = []\n for await (const chunk of stdin) chunks.push(chunk as Buffer)\n return Buffer.concat(chunks).toString('utf8')\n}\n\n/**\n * Turn the downloaded payload into a `CanIEmailData`, or say why it is not one.\n *\n * `res.json()` hands back `any`, so `as CanIEmailData` would type-check and prove nothing —\n * and this payload is the definition of one you did not produce: third-party, fetched over\n * the network, and cached to disk where anything could edit it. A bad file would otherwise\n * surface as an unreadable `TypeError` from inside `indexFeatures`.\n *\n * Structural failures throw; a feature missing the optional fields is coerced rather than\n * rejected, so an upstream addition cannot break the command.\n */\nexport function parseMatrix(raw: unknown, source: string): CanIEmailData {\n const bad = (why: string): never => {\n throw new Error(`The Can I email matrix from ${source} is not usable: ${why}`)\n }\n if (typeof raw !== 'object' || raw === null) bad('not a JSON object')\n const root = raw as Record<string, unknown>\n if (!Array.isArray(root['data'])) bad('no `data` array')\n const entries = root['data'] as unknown[]\n if (entries.length === 0) bad('`data` is empty')\n\n const data: Feature[] = entries.map((entry, i) => {\n if (typeof entry !== 'object' || entry === null) return bad(`data[${i}] is not an object`)\n const feature = entry as Record<string, unknown>\n if (typeof feature['slug'] !== 'string') return bad(`data[${i}] has no \\`slug\\``)\n if (typeof feature['stats'] !== 'object' || feature['stats'] === null) {\n return bad(`data[${i}] (${feature['slug']}) has no \\`stats\\``)\n }\n return {\n slug: feature['slug'],\n title: typeof feature['title'] === 'string' ? feature['title'] : feature['slug'],\n category: typeof feature['category'] === 'string' ? feature['category'] : 'unknown',\n ...(typeof feature['keywords'] === 'string' ? { keywords: feature['keywords'] } : {}),\n stats: feature['stats'] as Feature['stats'],\n }\n })\n\n return {\n api_version: typeof root['api_version'] === 'string' ? root['api_version'] : 'unknown',\n last_update_date:\n typeof root['last_update_date'] === 'string' ? root['last_update_date'] : 'unknown',\n data,\n }\n}\n\n/** The matrix, from `--data`, from a fresh-enough cache, or from upstream. */\nasync function loadMatrix(args: string[]): Promise<CanIEmailData> {\n const supplied = flagValue(args, 'data')\n if (supplied !== undefined) {\n if (!existsSync(supplied)) throw new Error(`No such file: ${supplied}`)\n return parseMatrix(JSON.parse(readFileSync(supplied, 'utf8')), supplied)\n }\n\n const refresh = args.includes('--refresh')\n if (!refresh && existsSync(CACHE) && Date.now() - statSync(CACHE).mtimeMs < MAX_AGE_MS) {\n return parseMatrix(JSON.parse(readFileSync(CACHE, 'utf8')), CACHE)\n }\n\n const response = await fetch(SOURCE).catch((error: unknown) => {\n throw new Error(\n `Could not fetch the Can I email matrix from ${SOURCE}: ` +\n `${error instanceof Error ? error.message : String(error)}\\n` +\n ' Offline? Download it once and pass --data <file>.',\n )\n })\n if (!response.ok) {\n throw new Error(`Could not fetch ${SOURCE}: ${response.status} ${response.statusText}`)\n }\n const text = await response.text()\n // Cache before parsing so a malformed payload is inspectable rather than just gone.\n mkdirSync(dirname(CACHE), { recursive: true })\n writeFileSync(CACHE, text)\n return parseMatrix(JSON.parse(text), SOURCE)\n}\n\nfunction format(findings: Finding[], label: string): string {\n const lines = [label]\n for (const finding of findings) {\n lines.push(\n ` ${finding.level === 'blocked' ? '✗' : '!'} ${finding.slug} ${finding.source}` +\n `\\n ${finding.clients.join(', ')}`,\n )\n }\n return lines.join('\\n')\n}\n\nfunction formatLinks(findings: LinkFinding[]): string {\n return findings.map((f) => ` ${f.level === 'blocked' ? '✗' : '!'} link ${f.message}`).join('\\n')\n}\n\n/** How long one URL gets before it counts as unreachable. */\nconst PROBE_TIMEOUT_MS = 10_000\n\n/** Requests in flight at once — enough to be quick, few enough not to look like a scan. */\nconst PROBE_CONCURRENCY = 8\n\n/**\n * Request every URL once and report the ones that do not answer with a success.\n *\n * `HEAD` first, because it does not download the page; some servers refuse it (405, 501) or\n * mishandle it, so a failed `HEAD` is retried as `GET` before it is reported. Redirects are\n * followed, since a tracked or shortened link is normally a redirect.\n *\n * `fetchImpl` exists for the tests: they cannot reach the network, and should not.\n */\nexport async function probeUrls(\n urls: readonly string[],\n fetchImpl: typeof fetch = fetch,\n): Promise<Map<string, string>> {\n const failures = new Map<string, string>()\n const queue = [...new Set(urls)]\n\n const probe = async (url: string): Promise<void> => {\n const attempt = (method: 'HEAD' | 'GET') =>\n fetchImpl(url, { method, redirect: 'follow', signal: AbortSignal.timeout(PROBE_TIMEOUT_MS) })\n try {\n let response = await attempt('HEAD')\n if (!response.ok) response = await attempt('GET')\n if (!response.ok)\n failures.set(url, `answered ${response.status} ${response.statusText}`.trim())\n } catch (error) {\n failures.set(\n url,\n `could not be reached: ${error instanceof Error ? error.message : String(error)}`,\n )\n }\n }\n\n const workers = Array.from({ length: Math.min(PROBE_CONCURRENCY, queue.length) }, async () => {\n for (let url = queue.shift(); url !== undefined; url = queue.shift()) await probe(url)\n })\n await Promise.all(workers)\n return failures\n}\n\n/**\n * Lint one or more rendered emails.\n *\n * Exits non-zero on a blocked finding and only on a blocked finding: a caveat is partial\n * support an author wants to know about, not a reason to fail a build.\n */\nexport async function emailLint(args: string[]): Promise<void> {\n // `positionalArgs` rather than a filter on `-`: a plain filter also keeps the *value* of\n // `--data <file>`, so the matrix itself got linted as if it were an email. The symptom was\n // spectacular — 28 blocked findings against a clean template, because the scanner read\n // slugs like `html-dfn` out of the JSON and took them for tags.\n //\n // A bare `-` is stdin by long convention and looks like a flag to any such parser, so it\n // is added back by name.\n const files = [...positionalArgs(args, ['data']), ...(args.includes('-') ? ['-'] : [])]\n if (files.length === 0) {\n throw new Error('cascivo email lint needs a file, or `-` to read rendered HTML from stdin.')\n }\n\n const { checkLinks, lint, linkUrls, indexFeatures, CASCIVO_ALLOW } = await loadEmail()\n const features = indexFeatures(await loadMatrix(args))\n const allow = args.includes('--no-allowlist') ? {} : CASCIVO_ALLOW\n\n let blockedTotal = 0\n let caveatTotal = 0\n\n for (const file of files) {\n const html = file === '-' ? await readStdin() : readFileSync(file, 'utf8')\n const findings = lint(html, features, { allow })\n const blocked = findings.filter((f) => f.level === 'blocked')\n const caveats = findings.filter((f) => f.level === 'caveat')\n const links = checkLinks(html)\n if (args.includes('--check-links')) {\n // Only what the static check passed: a placeholder or a local host is already reported,\n // and requesting `localhost` from CI would only add a second, more confusing finding.\n const flagged = new Set(links.map((f) => f.value))\n const urls = linkUrls(html).filter(\n (u): u is { element: 'a' | 'img'; url: string } =>\n u.url !== null && /^https?:/i.test(u.url) && !flagged.has(u.url),\n )\n const failures = await probeUrls(urls.map((u) => u.url))\n for (const { element, url } of urls) {\n const why = failures.get(url)\n if (why === undefined) continue\n failures.delete(url)\n links.unshift({\n level: 'blocked',\n problem: 'unreachable',\n value: url,\n element,\n message: `<${element}> \"${url}\" ${why}`,\n })\n }\n }\n const linksBlocked = links.filter((f) => f.level === 'blocked').length\n blockedTotal += blocked.length + linksBlocked\n caveatTotal += caveats.length + links.length - linksBlocked\n\n const name = file === '-' ? '(stdin)' : file\n if (findings.length === 0 && links.length === 0) {\n console.log(`✓ ${name}`)\n continue\n }\n const failed = blocked.length + linksBlocked > 0\n console.log(format([...blocked, ...caveats], `${failed ? '✗' : '✓'} ${name}`))\n if (links.length > 0) console.log(formatLinks(links))\n }\n\n const summary =\n `\\n${files.length} file${files.length === 1 ? '' : 's'}, ` +\n `${blockedTotal} blocked, ${caveatTotal} caveat${caveatTotal === 1 ? '' : 's'}.`\n console.log(summary)\n if (blockedTotal > 0) process.exitCode = 1\n}\n\n/** Dispatch `cascivo email <subcommand>`. */\nexport async function email(args: string[]): Promise<void> {\n const [subcommand, ...rest] = args\n if (subcommand === 'lint') {\n await emailLint(rest)\n return\n }\n console.error(\n subcommand === undefined\n ? 'cascivo email needs a subcommand. Try `cascivo email lint --help`.'\n : `Unknown email subcommand: ${subcommand}`,\n )\n process.exitCode = 1\n}\n"],"mappings":"qQAsBA,MAAMC,EAAS,0CASTC,EAAQC,EAAKC,EAAO,EAAG,wBAAwB,EAerD,eAAeC,GAAsD,CACnE,GAAI,CACF,OAAO,MAAM,OAAO,iBACtB,MAAQ,CACN,MAAU,MACR;0BAEF,CACF,CACF,CAEA,eAAeC,GAA6B,CAC1C,IAAMC,EAAmB,CAAC,EAC1B,UAAW,IAAMC,KAASC,EAAOF,E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AAG,GAAGS,EAAS,IAAM,IAAI,GAAGD,GAAM,CAAC,EACzEP,EAAM,OAAS,GAAG,QAAQ,IAAIxB,EAAYwB,CAAK,CAAC,CACtD,CAEA,IAAMS,EACJ,KAAKrB,EAAM,OAAO,OAAOA,EAAM,SAAW,EAAI,GAAK,IAAI,IACpDK,EAAa,YAAYC,EAAY,SAASA,IAAgB,EAAI,GAAK,IAAI,GAChF,QAAQ,IAAIe,CAAO,EACfhB,EAAe,IAAG,QAAQ,SAAW,EAC3C,CAGA,eAAsBiB,EAAM,EAA+B,CACzD,GAAM,CAACC,EAAY,GAAGC,GAAQnD,EAC9B,GAAIkD,IAAe,OAAQ,CACzB,MAAMxB,EAAUyB,CAAI,EACpB,MACF,CACA,QAAQ,MACND,IAAe,IAAA,GACX,qEACA,6BAA6BA,GACnC,EACA,QAAQ,SAAW,CACrB"}
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.7.0",
2
+ "version": "1.9.0",
3
3
  "tokens": [
4
4
  { "name": "--cascivo-gray-0", "resolvedDefault": "oklch(1 0 0)" },
5
5
  { "name": "--cascivo-gray-50", "resolvedDefault": "oklch(0.985 0.002 264)" },
@@ -240,6 +240,40 @@
240
240
  { "name": "--cascivo-chart-bar-radius", "resolvedDefault": "2px" },
241
241
  { "name": "--cascivo-color-accent-text", "resolvedDefault": "oklch(0.52 0.2 250)" },
242
242
  { "name": "--cascivo-color-accent-text-hover", "resolvedDefault": "oklch(0.45 0.2 250)" },
243
+ { "name": "--cascivo-brand-primary", "resolvedDefault": "oklch( 0.55 0.15 240 )" },
244
+ { "name": "--cascivo-brand-accent", "resolvedDefault": "oklch(0.72 0.13 195)" },
245
+ { "name": "--cascivo-brand-ink", "resolvedDefault": "oklch( 0.22 0.03 250 )" },
246
+ { "name": "--cascivo-brand-paper", "resolvedDefault": "oklch(0.99 0.005 250)" },
247
+ { "name": "--cascivo-brand-gradient-start", "resolvedDefault": "oklch(0.55 0.15 240)" },
248
+ { "name": "--cascivo-brand-gradient-end", "resolvedDefault": "oklch(0.72 0.13 195)" },
249
+ { "name": "--cascivo-z-base", "resolvedDefault": "0" },
250
+ { "name": "--cascivo-z-raised", "resolvedDefault": "10" },
251
+ { "name": "--cascivo-z-dropdown", "resolvedDefault": "100" },
252
+ { "name": "--cascivo-z-overlay", "resolvedDefault": "200" },
253
+ { "name": "--cascivo-z-modal", "resolvedDefault": "300" },
254
+ { "name": "--cascivo-z-toast", "resolvedDefault": "400" },
255
+ { "name": "--cascivo-z-tooltip", "resolvedDefault": "500" },
256
+ { "name": "--cascivo-shell-header-block-size", "resolvedDefault": "3rem" },
257
+ { "name": "--cascivo-shell-panel-inline-size", "resolvedDefault": "20rem" },
258
+ { "name": "--cascivo-shell-aside-inline-size", "resolvedDefault": "18rem" },
259
+ { "name": "--cascivo-search-width", "resolvedDefault": "100%" },
260
+ { "name": "--cascivo-screen-sm", "resolvedDefault": "30rem" },
261
+ { "name": "--cascivo-screen-md", "resolvedDefault": "40rem" },
262
+ { "name": "--cascivo-screen-lg", "resolvedDefault": "64rem" },
263
+ { "name": "--cascivo-screen-xl", "resolvedDefault": "80rem" },
264
+ {
265
+ "name": "--cascivo-text-2xl-fluid",
266
+ "resolvedDefault": "clamp(1.25rem, 1rem + 1.25vw, 1.5rem)"
267
+ },
268
+ {
269
+ "name": "--cascivo-text-3xl-fluid",
270
+ "resolvedDefault": "clamp(1.5rem, 1.125rem + 1.875vw, 1.875rem)"
271
+ },
272
+ {
273
+ "name": "--cascivo-text-4xl-fluid",
274
+ "resolvedDefault": "clamp(1.875rem, 1.5rem + 1.875vw, 2.25rem)"
275
+ },
276
+ { "name": "--cascivo-target-min-coarse", "resolvedDefault": "2.75rem" },
243
277
  {
244
278
  "name": "--cascivo-editor-bg",
245
279
  "resolvedDefault": "var(--cascivo-color-surface, oklch(0.985 0.002 264))"
@@ -270,7 +304,7 @@
270
304
  },
271
305
  {
272
306
  "name": "--cascivo-editor-syntax-keyword",
273
- "resolvedDefault": "var(--cascivo-color-accent, oklch(0.52 0.2 250))"
307
+ "resolvedDefault": "var(--cascivo-color-accent-text, oklch(0.52 0.2 250))"
274
308
  },
275
309
  { "name": "--cascivo-editor-syntax-string", "resolvedDefault": "oklch(0.53 0.13 135)" },
276
310
  { "name": "--cascivo-editor-syntax-number", "resolvedDefault": "oklch(0.54 0.15 40)" },
@@ -297,47 +331,12 @@
297
331
  },
298
332
  {
299
333
  "name": "--cascivo-editor-syntax-tag",
300
- "resolvedDefault": "var(--cascivo-color-accent, oklch(0.52 0.2 250))"
334
+ "resolvedDefault": "var(--cascivo-color-accent-text, oklch(0.52 0.2 250))"
301
335
  },
302
336
  { "name": "--cascivo-editor-syntax-attr", "resolvedDefault": "oklch(0.54 0.15 40)" },
303
337
  { "name": "--cascivo-editor-syntax-regexp", "resolvedDefault": "oklch(0.53 0.13 135)" },
304
338
  { "name": "--cascivo-editor-syntax-boolean", "resolvedDefault": "oklch(0.54 0.15 40)" },
305
339
  { "name": "--cascivo-editor-syntax-property", "resolvedDefault": "oklch(0.53 0.12 240)" },
306
- { "name": "--cascivo-brand-primary", "resolvedDefault": "oklch( 0.55 0.15 240 )" },
307
- { "name": "--cascivo-brand-accent", "resolvedDefault": "oklch(0.72 0.13 195)" },
308
- { "name": "--cascivo-brand-ink", "resolvedDefault": "oklch( 0.22 0.03 250 )" },
309
- { "name": "--cascivo-brand-paper", "resolvedDefault": "oklch(0.99 0.005 250)" },
310
- { "name": "--cascivo-brand-gradient-start", "resolvedDefault": "oklch(0.55 0.15 240)" },
311
- { "name": "--cascivo-brand-gradient-end", "resolvedDefault": "oklch(0.72 0.13 195)" },
312
- { "name": "--cascivo-z-base", "resolvedDefault": "0" },
313
- { "name": "--cascivo-z-raised", "resolvedDefault": "10" },
314
- { "name": "--cascivo-z-dropdown", "resolvedDefault": "100" },
315
- { "name": "--cascivo-z-overlay", "resolvedDefault": "200" },
316
- { "name": "--cascivo-z-modal", "resolvedDefault": "300" },
317
- { "name": "--cascivo-z-toast", "resolvedDefault": "400" },
318
- { "name": "--cascivo-z-tooltip", "resolvedDefault": "500" },
319
- { "name": "--cascivo-shell-header-block-size", "resolvedDefault": "3rem" },
320
- { "name": "--cascivo-shell-panel-inline-size", "resolvedDefault": "20rem" },
321
- { "name": "--cascivo-shell-aside-inline-size", "resolvedDefault": "18rem" },
322
- { "name": "--cascivo-link-color", "resolvedDefault": "oklch(0.52 0.2 250)" },
323
- { "name": "--cascivo-search-width", "resolvedDefault": "100%" },
324
- { "name": "--cascivo-screen-sm", "resolvedDefault": "30rem" },
325
- { "name": "--cascivo-screen-md", "resolvedDefault": "40rem" },
326
- { "name": "--cascivo-screen-lg", "resolvedDefault": "64rem" },
327
- { "name": "--cascivo-screen-xl", "resolvedDefault": "80rem" },
328
- {
329
- "name": "--cascivo-text-2xl-fluid",
330
- "resolvedDefault": "clamp(1.25rem, 1rem + 1.25vw, 1.5rem)"
331
- },
332
- {
333
- "name": "--cascivo-text-3xl-fluid",
334
- "resolvedDefault": "clamp(1.5rem, 1.125rem + 1.875vw, 1.875rem)"
335
- },
336
- {
337
- "name": "--cascivo-text-4xl-fluid",
338
- "resolvedDefault": "clamp(1.875rem, 1.5rem + 1.875vw, 2.25rem)"
339
- },
340
- { "name": "--cascivo-target-min-coarse", "resolvedDefault": "2.75rem" },
341
340
  {
342
341
  "name": "--cascivo-color-ai",
343
342
  "resolvedDefault": "color-mix( in oklch, oklch(0.6 0.2 285) 80%, oklch(from var(--cascivo-color-text) l 0 285) )"
@@ -354,6 +353,7 @@
354
353
  "name": "--cascivo-color-ai-sheen",
355
354
  "resolvedDefault": "oklch(from var(--cascivo-color-ai) l c h / 22%)"
356
355
  },
356
+ { "name": "--cascivo-link-color", "resolvedDefault": "oklch(0.52 0.2 250)" },
357
357
  { "name": "--cascivo-color-background", "resolvedDefault": "oklch(1 0 0)" },
358
358
  { "name": "--cascivo-color-surface", "resolvedDefault": "oklch(0.985 0.002 264)" },
359
359
  { "name": "--cascivo-color-surface-2", "resolvedDefault": "oklch(0.967 0.003 264)" },
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.mts","names":[],"sources":["../src/utils/config.ts","../src/index.ts"],"mappings":";;cAYa;KAeD,oBAAoB;KAEpB;EAEN;EAAa,UAAU;EAAwB,SAAS;;UAE7C;;EAEf;;EAEA;;EAEA,OAAO;;EAEP,aAAa,eAAe;;EAE5B;;;;qBCxBW;wBA8OS,IAAI,iBAAiB"}
1
+ {"version":3,"file":"index.d.mts","names":[],"sources":["../src/utils/config.ts","../src/index.ts"],"mappings":";;cAYa;KAeD,oBAAoB;KAEpB;EAEN;EAAa,UAAU;EAAwB,SAAS;;UAE7C;;EAEf;;EAEA;;EAEA,OAAO;;EAEP,aAAa,eAAe;;EAE5B;;;;qBCxBW;wBAkQS,IAAI,iBAAiB"}