// The CDN snippets the docs hand out, in one place: the page components render them, llms.ts // re-renders them into the /llms.txt endpoints, and the installation page drops the two tags into // a full HTML example. import { site } from '@shared/lib/site.ts' import sri from '@data/sri.json' /** * `integrity` and `crossorigin` for a file of the published core package, so the browser can * verify what the CDN sent. The hashes in shared/data/sri.json come from `pnpm run generate:sri`; * until that runs for the current version the tags are rendered without them, rather than with a * hash that would make the browser block the file. */ const sriAttrs = (file: string): string => { const hash = sri.version === site.version ? (sri.files as Record)[file] : undefined return hash ? ` integrity="${hash}" crossorigin="anonymous"` : '' } /** `` for one stylesheet of the core package, by its path inside the package. */ const cdnLinkTag = (file: string): string => `` /** `` /** `` for the core stylesheet. */ export const cdnCssTag = (): string => cdnLinkTag('dist/css/tabler.min.css') /** `