Aktueller Stand

This commit is contained in:
2026-01-23 01:33:35 +01:00
parent 082dc5e110
commit 2766dd12c5
10109 changed files with 1578841 additions and 77685 deletions

48
backend/node_modules/hono/dist/jsx/dom/context.js generated vendored Normal file
View File

@@ -0,0 +1,48 @@
// src/jsx/dom/context.ts
import { DOM_ERROR_HANDLER } from "../constants.js";
import { globalContexts } from "../context.js";
import { setInternalTagFlag } from "./utils.js";
var createContextProviderFunction = (values) => ({ value, children }) => {
if (!children) {
return void 0;
}
const props = {
children: [
{
tag: setInternalTagFlag(() => {
values.push(value);
}),
props: {}
}
]
};
if (Array.isArray(children)) {
props.children.push(...children.flat());
} else {
props.children.push(children);
}
props.children.push({
tag: setInternalTagFlag(() => {
values.pop();
}),
props: {}
});
const res = { tag: "", props, type: "" };
res[DOM_ERROR_HANDLER] = (err) => {
values.pop();
throw err;
};
return res;
};
var createContext = (defaultValue) => {
const values = [defaultValue];
const context = createContextProviderFunction(values);
context.values = values;
context.Provider = context;
globalContexts.push(context);
return context;
};
export {
createContext,
createContextProviderFunction
};