kt.js 0.0.5 → 0.0.6

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.
Files changed (2) hide show
  1. package/dist/index.d.ts +15 -6
  2. package/package.json +2 -2
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.5 (Last Update: 2025.09.19 20:12:57.938)
13
+ * @version 0.0.6 (Last Update: 2025.09.19 21:44:17.681)
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,12 @@ 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
- interface KAttribute {
30
+
31
+ /**
32
+ * Used to create enhanced HTML elements
33
+ */
34
+ export interface KAttribute {
32
35
  [k: string]: any;
33
36
 
34
37
  id?: string;
@@ -73,9 +76,9 @@ type KListener<E extends HTMLElement, K extends keyof HTMLElementEventMap> = (
73
76
  ) => unknown;
74
77
 
75
78
  // # from: src/types/enhance.d.ts
76
- type HTMLElementTag = keyof HTMLElementTagNameMap;
79
+ export type HTMLElementTag = keyof HTMLElementTagNameMap;
77
80
 
78
- type KChildren = HTMLKEnhancedElement | Text;
81
+ export type KChildren = HTMLKEnhancedElement | Text;
79
82
 
80
83
  interface KEnhanced {
81
84
  /**
@@ -160,6 +163,12 @@ type NonSpecialTags = {
160
163
  [K in keyof HTMLElementTagNameMap]: HTMLElement extends HTMLElementTagNameMap[K] ? K : never;
161
164
  }[keyof HTMLElementTagNameMap];
162
165
 
163
- type HTMLKEnhancedElement<T extends HTMLElementTag = NonSpecialTags> =
166
+ /**
167
+ * This is the core feature of KT.js - enhanced HTML elements.
168
+ *
169
+ * It combines the standard HTMLElement properties and methods
170
+ * with KT.js enhancements defined in KEnhanced.
171
+ */
172
+ export type HTMLKEnhancedElement<T extends HTMLElementTag = NonSpecialTags> =
164
173
  (HTMLElement extends HTMLElementTagNameMap[T] ? HTMLElement : HTMLElementTagNameMap[T]) &
165
174
  KEnhanced;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "kt.js",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
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.2.4",
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",