full site update

This commit is contained in:
2025-07-24 18:46:24 +02:00
parent bfe2b90d8d
commit 37a6e0ab31
6912 changed files with 540482 additions and 361712 deletions

View File

@@ -8,5 +8,5 @@ export interface AstroVNode {
}
export declare function isVNode(vnode: any): vnode is AstroVNode;
export declare function transformSlots(vnode: AstroVNode): AstroVNode | undefined;
declare function createVNode(type: any, props: Record<string, any>): AstroVNode;
declare function createVNode(type: any, props?: Record<string, any>, key?: string | number): AstroVNode;
export { AstroJSX, Fragment, createVNode as jsx, createVNode as jsxDEV, createVNode as jsxs };

View File

@@ -1,4 +1,4 @@
import { Fragment, Renderer, markHTMLString } from "../runtime/server/index.js";
import { Fragment, markHTMLString, Renderer } from "../runtime/server/index.js";
const AstroJSX = "astro:jsx";
const Empty = Symbol("empty");
const toSlotName = (slotAttr) => slotAttr;
@@ -54,12 +54,15 @@ function transformSetDirectives(vnode) {
return;
}
}
function createVNode(type, props) {
function createVNode(type, props = {}, key) {
if (key) {
props.key = key;
}
const vnode = {
[Renderer]: "astro:jsx",
[AstroJSX]: true,
type,
props: props ?? {}
props
};
transformSetDirectives(vnode);
transformSlots(vnode);