import { HTMLTag, KTRawAttr, KTRawContent, ktnull, KTAttribute } from '@ktjs/core'; export { h as createElement, h } from '@ktjs/core'; /** * @param tag html tag * @param props properties/attributes * @param _metadata metadata is ignored */ declare function jsx(tag: T, props: KTRawAttr, ..._metadata: any[]): HTMLElementTagNameMap[T]; /** * Fragment support - returns an array of children * Note: kt.js doesn't have a real Fragment concept, * so we return ktnull for empty fragments or flatten children */ declare function Fragment(props: { children?: KTRawContent; }): HTMLElement | typeof ktnull; /** * JSX Development runtime - same as jsx but with additional dev checks */ declare const jsxDEV: typeof jsx; /** * JSX runtime for React 17+ automatic runtime * This is called when using jsx: "react-jsx" or "react-jsxdev" */ declare const jsxs: typeof jsx; declare global { namespace JSX { type Element = HTMLElementTagNameMap[keyof HTMLElementTagNameMap]; // 为常用元素提供更精确的类型 interface IntrinsicElements { [tag: string]: KTAttribute & { children?: KTRawContent }; } interface IntrinsicAttributes { key?: string | number; } interface ElementChildrenAttribute { children: {}; } } } /** * @ktjs/jsx - JSX/TSX support for KT.js * * This package provides JSX transformation support for KT.js, * allowing you to write UI code with JSX syntax while maintaining * the direct DOM manipulation philosophy of KT.js. * * @example * ```tsx * import { h } from '@ktjs/jsx'; * * const App = ( *
*

Hello KT.js with JSX!

* *
* ); * ``` * * ## About * @package @ktjs/jsx * @author Kasukabe Tsumugi * @version 0.7.3 (Last Update: 2025.12.25 09:51:04.128) * @license MIT * @link https://github.com/baendlorel/kt.js * @link https://baendlorel.github.io/ Welcome to my site! * @description JSX/TSX support for KT.js - Build UIs with JSX syntax while keeping direct DOM control * @copyright Copyright (c) 2025 Kasukabe Tsumugi. All rights reserved. */ interface Ref { /** * Current value of the referenced element */ value: T; /** * Update function to re-render the referenced element */ update: () => T; } declare function ref(): Ref; export { Fragment, jsx, jsxDEV, jsxs, ref };