blank project

This commit is contained in:
root
2025-10-17 20:17:33 +00:00
commit 14b2d53e8e
9366 changed files with 1515019 additions and 0 deletions

28
node_modules/astro/dist/assets/utils/svg.js generated vendored Normal file
View File

@@ -0,0 +1,28 @@
import { parse, renderSync } from "ultrahtml";
import { dropAttributes } from "../runtime.js";
function parseSvg(contents) {
const root = parse(contents);
const svgNode = root.children.find(
({ name, type }) => type === 1 && name === "svg"
);
if (!svgNode) {
throw new Error("SVG file does not contain an <svg> element");
}
const { attributes, children } = svgNode;
const body = renderSync({ ...root, children });
return { attributes, body };
}
function makeSvgComponent(meta, contents) {
const file = typeof contents === "string" ? contents : contents.toString("utf-8");
const { attributes, body: children } = parseSvg(file);
const props = {
meta,
attributes: dropAttributes(attributes),
children
};
return `import { createSvgComponent } from 'astro/assets/runtime';
export default createSvgComponent(${JSON.stringify(props)})`;
}
export {
makeSvgComponent
};