kt.js 0.0.5 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/README.zh.md +1 -1
- package/dist/index.d.ts +14 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
For more awesome packages, check out [my homepage💛](https://baendlorel.github.io/?repoType=npm)
|
|
6
6
|
|
|
7
|
-
> Note:
|
|
7
|
+
> Note: This framework is still under development. APIs, type declarations, and other parts may change. If you use it, please watch for updates in the near future.
|
|
8
8
|
|
|
9
9
|
KT.js is a tiny, high-performance DOM utility focused on minimal re-rendering and direct DOM manipulation. It favors not forcing re-renders and aims to keep DOM updates to the absolute minimum for maximum performance.
|
|
10
10
|
|
package/README.zh.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ declare function h<Tag extends HTMLElementTag>(tag: Tag, attr?: KAttribute | str
|
|
|
10
10
|
* ## About
|
|
11
11
|
* @package Kt.js
|
|
12
12
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
13
|
-
* @version 0.0.
|
|
13
|
+
* @version 0.0.7 (Last Update: 2025.09.19 21:53:16.950)
|
|
14
14
|
* @license MIT
|
|
15
15
|
* @link https://github.com/baendlorel/kt.js
|
|
16
16
|
* @description A simple and easy-to-use web framework, never re-render. Abbreviation of Kasukabe Tsumugi.
|
|
@@ -26,9 +26,11 @@ declare function createApp(rootElement: HTMLKEnhancedElement, mountTo?: HTMLElem
|
|
|
26
26
|
export { createApp, h };
|
|
27
27
|
|
|
28
28
|
// # from: src/global.d.ts
|
|
29
|
-
declare const __IS_DEV__: boolean;
|
|
30
29
|
|
|
31
|
-
|
|
30
|
+
/**
|
|
31
|
+
* Used to create enhanced HTML elements
|
|
32
|
+
*/
|
|
33
|
+
export interface KAttribute {
|
|
32
34
|
[k: string]: any;
|
|
33
35
|
|
|
34
36
|
id?: string;
|
|
@@ -73,9 +75,9 @@ type KListener<E extends HTMLElement, K extends keyof HTMLElementEventMap> = (
|
|
|
73
75
|
) => unknown;
|
|
74
76
|
|
|
75
77
|
// # from: src/types/enhance.d.ts
|
|
76
|
-
type HTMLElementTag = keyof HTMLElementTagNameMap;
|
|
78
|
+
export type HTMLElementTag = keyof HTMLElementTagNameMap;
|
|
77
79
|
|
|
78
|
-
type KChildren = HTMLKEnhancedElement | Text;
|
|
80
|
+
export type KChildren = HTMLKEnhancedElement | Text;
|
|
79
81
|
|
|
80
82
|
interface KEnhanced {
|
|
81
83
|
/**
|
|
@@ -160,6 +162,12 @@ type NonSpecialTags = {
|
|
|
160
162
|
[K in keyof HTMLElementTagNameMap]: HTMLElement extends HTMLElementTagNameMap[K] ? K : never;
|
|
161
163
|
}[keyof HTMLElementTagNameMap];
|
|
162
164
|
|
|
163
|
-
|
|
165
|
+
/**
|
|
166
|
+
* This is the core feature of KT.js - enhanced HTML elements.
|
|
167
|
+
*
|
|
168
|
+
* It combines the standard HTMLElement properties and methods
|
|
169
|
+
* with KT.js enhancements defined in KEnhanced.
|
|
170
|
+
*/
|
|
171
|
+
export type HTMLKEnhancedElement<T extends HTMLElementTag = NonSpecialTags> =
|
|
164
172
|
(HTMLElement extends HTMLElementTagNameMap[T] ? HTMLElement : HTMLElementTagNameMap[T]) &
|
|
165
173
|
KEnhanced;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kt.js",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.7",
|
|
4
4
|
"author": {
|
|
5
5
|
"name": "Kasukabe Tsumugi",
|
|
6
6
|
"email": "futami16237@gmail.com"
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"rimraf": "^6.0.1",
|
|
59
59
|
"rollup": "^4.50.2",
|
|
60
60
|
"rollup-plugin-dts": "^6.2.3",
|
|
61
|
-
"rollup-plugin-dts-merger": "^1.
|
|
61
|
+
"rollup-plugin-dts-merger": "^1.3.0",
|
|
62
62
|
"tinyrainbow": "^3.0.3",
|
|
63
63
|
"tslib": "^2.8.1",
|
|
64
64
|
"typescript": "^5.9.2",
|