woby
Version:
A high-performance framework with fine-grained observable/signal-based reactivity for building rich applications.
27 lines (26 loc) • 1 kB
JavaScript
import { F } from "./fragment-CrJfXftf.js";
import { c as createElement } from "./create_element.ssr-B59OYen7.js";
import { w as wrapCloneElement } from "./wrap_clone_element-CPcdGL7P.js";
import { S as SYMBOL_CLONE } from "./setters-Ddu0s6oK.js";
function jsx(component, props, ...children) {
if (typeof children === "string")
return wrapCloneElement(createElement(component, props ?? {}, children), component, props);
if (!props) props = {};
if (typeof children === "string")
Object.assign(props, { children });
return wrapCloneElement(createElement(component, props, props == null ? void 0 : props.key), component, props);
}
const jsxDEV = (component, props, key, isStatic, source, self) => {
if (key)
Object.assign(props, { key });
return wrapCloneElement(createElement(component, props), component, props);
};
const getMeta = (target) => target[SYMBOL_CLONE];
export {
F as Fragment,
getMeta,
jsx,
jsxDEV,
jsx as jsxs
};
//# sourceMappingURL=ssr-runtime.es.js.map