@ktjs/core 0.6.17 → 0.7.0
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/dist/index.d.ts +2 -6
- package/dist/index.iife.js +4 -4
- package/dist/index.legacy.js +4 -4
- package/dist/index.mjs +4 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -85,15 +85,11 @@ interface KTBaseAttribute {
|
|
|
85
85
|
method?: 'POST' | 'GET' | 'PUT' | 'DELETE' | 'PATCH' | 'HEAD' | 'OPTIONS' | 'CONNECT' | 'TRACE' | otherstring;
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
type KTEventHandlersOrAttribute = {
|
|
89
|
-
[EventName in keyof HTMLElementEventMap]?: ((ev: HTMLElementEventMap[EventName]) => void) | string;
|
|
90
|
-
};
|
|
91
|
-
|
|
92
88
|
type KTPrefixedEventHandlers = {
|
|
93
89
|
[EventName in keyof HTMLElementEventMap as `on:${EventName}`]?: (ev: HTMLElementEventMap[EventName]) => void;
|
|
94
90
|
};
|
|
95
91
|
|
|
96
|
-
type KTAttribute = KTBaseAttribute &
|
|
92
|
+
type KTAttribute = KTBaseAttribute & KTPrefixedEventHandlers;
|
|
97
93
|
|
|
98
94
|
type HTML<T extends HTMLTag & otherstring> = T extends HTMLTag ? HTMLElementTagNameMap[T] : HTMLElement;
|
|
99
95
|
/**
|
|
@@ -106,7 +102,7 @@ type HTML<T extends HTMLTag & otherstring> = T extends HTMLTag ? HTMLElementTagN
|
|
|
106
102
|
* ## About
|
|
107
103
|
* @package @ktjs/core
|
|
108
104
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
109
|
-
* @version 0.
|
|
105
|
+
* @version 0.7.0 (Last Update: 2025.12.25 09:28:15.987)
|
|
110
106
|
* @license MIT
|
|
111
107
|
* @link https://github.com/baendlorel/kt.js
|
|
112
108
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
package/dist/index.iife.js
CHANGED
|
@@ -149,11 +149,11 @@ var __ktjs_core__ = (function (exports) {
|
|
|
149
149
|
element.addEventListener(key.slice(3), o); // chop off the `@`
|
|
150
150
|
continue;
|
|
151
151
|
}
|
|
152
|
-
if (typeof o
|
|
153
|
-
(handlers[key] || defaultHandler)(element, key, o);
|
|
152
|
+
if (typeof o === 'function') {
|
|
153
|
+
(handlers[key] || defaultHandler)(element, key, o());
|
|
154
154
|
}
|
|
155
155
|
else {
|
|
156
|
-
|
|
156
|
+
(handlers[key] || defaultHandler)(element, key, o);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
if (classValue !== undefined) {
|
|
@@ -199,7 +199,7 @@ var __ktjs_core__ = (function (exports) {
|
|
|
199
199
|
* ## About
|
|
200
200
|
* @package @ktjs/core
|
|
201
201
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
202
|
-
* @version 0.
|
|
202
|
+
* @version 0.7.0 (Last Update: 2025.12.25 09:28:15.987)
|
|
203
203
|
* @license MIT
|
|
204
204
|
* @link https://github.com/baendlorel/kt.js
|
|
205
205
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
package/dist/index.legacy.js
CHANGED
|
@@ -160,11 +160,11 @@ var __ktjs_core__ = (function (exports) {
|
|
|
160
160
|
element.addEventListener(key.slice(3), o); // chop off the `@`
|
|
161
161
|
continue;
|
|
162
162
|
}
|
|
163
|
-
if (typeof o
|
|
164
|
-
(handlers[key] || defaultHandler)(element, key, o);
|
|
163
|
+
if (typeof o === 'function') {
|
|
164
|
+
(handlers[key] || defaultHandler)(element, key, o());
|
|
165
165
|
}
|
|
166
166
|
else {
|
|
167
|
-
|
|
167
|
+
(handlers[key] || defaultHandler)(element, key, o);
|
|
168
168
|
}
|
|
169
169
|
}
|
|
170
170
|
if (classValue !== undefined) {
|
|
@@ -210,7 +210,7 @@ var __ktjs_core__ = (function (exports) {
|
|
|
210
210
|
* ## About
|
|
211
211
|
* @package @ktjs/core
|
|
212
212
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
213
|
-
* @version 0.
|
|
213
|
+
* @version 0.7.0 (Last Update: 2025.12.25 09:28:15.987)
|
|
214
214
|
* @license MIT
|
|
215
215
|
* @link https://github.com/baendlorel/kt.js
|
|
216
216
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
package/dist/index.mjs
CHANGED
|
@@ -146,11 +146,11 @@ function attrIsObject(element, attr) {
|
|
|
146
146
|
element.addEventListener(key.slice(3), o); // chop off the `@`
|
|
147
147
|
continue;
|
|
148
148
|
}
|
|
149
|
-
if (typeof o
|
|
150
|
-
(handlers[key] || defaultHandler)(element, key, o);
|
|
149
|
+
if (typeof o === 'function') {
|
|
150
|
+
(handlers[key] || defaultHandler)(element, key, o());
|
|
151
151
|
}
|
|
152
152
|
else {
|
|
153
|
-
|
|
153
|
+
(handlers[key] || defaultHandler)(element, key, o);
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
if (classValue !== undefined) {
|
|
@@ -196,7 +196,7 @@ function applyContent(element, content) {
|
|
|
196
196
|
* ## About
|
|
197
197
|
* @package @ktjs/core
|
|
198
198
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
199
|
-
* @version 0.
|
|
199
|
+
* @version 0.7.0 (Last Update: 2025.12.25 09:28:15.987)
|
|
200
200
|
* @license MIT
|
|
201
201
|
* @link https://github.com/baendlorel/kt.js
|
|
202
202
|
* @link https://baendlorel.github.io/ Welcome to my site!
|