@ktjs/core 0.10.3 → 0.11.1
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 +6 -9
- package/dist/index.iife.js +6 -2
- package/dist/index.legacy.js +6 -2
- package/dist/index.mjs +6 -2
- package/dist/jsx/index.d.ts +5 -8
- package/dist/jsx/index.mjs +6 -2
- package/dist/jsx/jsx-runtime.d.ts +5 -8
- package/dist/jsx/jsx-runtime.mjs +6 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -27,14 +27,11 @@ interface KTRef<T> {
|
|
|
27
27
|
*/
|
|
28
28
|
declare function ktref<T = HTMLElement>(value?: T): KTRef<T>;
|
|
29
29
|
|
|
30
|
-
type KTAvailableContent = KTRef<any> | HTMLElement | string | number | undefined;
|
|
31
|
-
type
|
|
32
|
-
|
|
33
|
-
| KTAvailableContent
|
|
34
|
-
| Promise<KTAvailableContent[]>
|
|
35
|
-
| Promise<KTAvailableContent>;
|
|
30
|
+
type KTAvailableContent = KTRef<any> | HTMLElement | Element | string | number | boolean | null | undefined;
|
|
31
|
+
type KTAvailableContents = KTAvailableContent[] | KTAvailableContent;
|
|
32
|
+
type KTRawContent = KTAvailableContents | Promise<KTAvailableContents>;
|
|
36
33
|
type KTRawAttr = KTAttribute | string;
|
|
37
|
-
type KTRawContents =
|
|
34
|
+
type KTRawContents = KTAvailableContents;
|
|
38
35
|
|
|
39
36
|
/**
|
|
40
37
|
* Event handler type for DOM events
|
|
@@ -129,12 +126,12 @@ type H = (<T extends HTMLTag>(tag: T, attr?: KTRawAttr, content?: KTRawContent)
|
|
|
129
126
|
* ## About
|
|
130
127
|
* @package @ktjs/core
|
|
131
128
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
132
|
-
* @version 0.
|
|
129
|
+
* @version 0.11.1 (Last Update: 2026.01.14 15:13:36.162)
|
|
133
130
|
* @license MIT
|
|
134
131
|
* @link https://github.com/baendlorel/kt.js
|
|
135
132
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
136
133
|
* @description Core functionality for kt.js - DOM manipulation utilities with JSX/TSX support
|
|
137
|
-
* @copyright Copyright (c)
|
|
134
|
+
* @copyright Copyright (c) 2026 Kasukabe Tsumugi. All rights reserved.
|
|
138
135
|
*/
|
|
139
136
|
declare const h: H;
|
|
140
137
|
|
package/dist/index.iife.js
CHANGED
|
@@ -170,6 +170,10 @@ var __ktjs_core__ = (function (exports) {
|
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
function apdSingle(element, c) {
|
|
173
|
+
// & JSX should ignore false, undefined, and null
|
|
174
|
+
if (c === false || c === undefined || c === null) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
173
177
|
if (typeof c === 'object' && c !== null && 'isKT' in c) {
|
|
174
178
|
$append.call(element, c.value);
|
|
175
179
|
}
|
|
@@ -221,12 +225,12 @@ var __ktjs_core__ = (function (exports) {
|
|
|
221
225
|
* ## About
|
|
222
226
|
* @package @ktjs/core
|
|
223
227
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
224
|
-
* @version 0.
|
|
228
|
+
* @version 0.11.1 (Last Update: 2026.01.14 15:13:36.162)
|
|
225
229
|
* @license MIT
|
|
226
230
|
* @link https://github.com/baendlorel/kt.js
|
|
227
231
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
228
232
|
* @description Core functionality for kt.js - DOM manipulation utilities with JSX/TSX support
|
|
229
|
-
* @copyright Copyright (c)
|
|
233
|
+
* @copyright Copyright (c) 2026 Kasukabe Tsumugi. All rights reserved.
|
|
230
234
|
*/
|
|
231
235
|
const h = ((tag, attr = '', content = '') => {
|
|
232
236
|
if (typeof tag !== 'string') {
|
package/dist/index.legacy.js
CHANGED
|
@@ -183,6 +183,10 @@ var __ktjs_core__ = (function (exports) {
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
function apdSingle(element, c) {
|
|
186
|
+
// & JSX should ignore false, undefined, and null
|
|
187
|
+
if (c === false || c === undefined || c === null) {
|
|
188
|
+
return;
|
|
189
|
+
}
|
|
186
190
|
if (typeof c === 'object' && c !== null && 'isKT' in c) {
|
|
187
191
|
$append.call(element, c.value);
|
|
188
192
|
}
|
|
@@ -237,12 +241,12 @@ var __ktjs_core__ = (function (exports) {
|
|
|
237
241
|
* ## About
|
|
238
242
|
* @package @ktjs/core
|
|
239
243
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
240
|
-
* @version 0.
|
|
244
|
+
* @version 0.11.1 (Last Update: 2026.01.14 15:13:36.162)
|
|
241
245
|
* @license MIT
|
|
242
246
|
* @link https://github.com/baendlorel/kt.js
|
|
243
247
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
244
248
|
* @description Core functionality for kt.js - DOM manipulation utilities with JSX/TSX support
|
|
245
|
-
* @copyright Copyright (c)
|
|
249
|
+
* @copyright Copyright (c) 2026 Kasukabe Tsumugi. All rights reserved.
|
|
246
250
|
*/
|
|
247
251
|
var h = (function (tag, attr, content) {
|
|
248
252
|
if (attr === void 0) { attr = ''; }
|
package/dist/index.mjs
CHANGED
|
@@ -167,6 +167,10 @@ function applyAttr(element, attr) {
|
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
function apdSingle(element, c) {
|
|
170
|
+
// & JSX should ignore false, undefined, and null
|
|
171
|
+
if (c === false || c === undefined || c === null) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
170
174
|
if (typeof c === 'object' && c !== null && 'isKT' in c) {
|
|
171
175
|
$append.call(element, c.value);
|
|
172
176
|
}
|
|
@@ -218,12 +222,12 @@ function applyContent(element, content) {
|
|
|
218
222
|
* ## About
|
|
219
223
|
* @package @ktjs/core
|
|
220
224
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
221
|
-
* @version 0.
|
|
225
|
+
* @version 0.11.1 (Last Update: 2026.01.14 15:13:36.162)
|
|
222
226
|
* @license MIT
|
|
223
227
|
* @link https://github.com/baendlorel/kt.js
|
|
224
228
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
225
229
|
* @description Core functionality for kt.js - DOM manipulation utilities with JSX/TSX support
|
|
226
|
-
* @copyright Copyright (c)
|
|
230
|
+
* @copyright Copyright (c) 2026 Kasukabe Tsumugi. All rights reserved.
|
|
227
231
|
*/
|
|
228
232
|
const h = ((tag, attr = '', content = '') => {
|
|
229
233
|
if (typeof tag !== 'string') {
|
package/dist/jsx/index.d.ts
CHANGED
|
@@ -16,12 +16,9 @@ interface KTRef<T> {
|
|
|
16
16
|
*/
|
|
17
17
|
declare function ktref<T = HTMLElement>(value?: T): KTRef<T>;
|
|
18
18
|
|
|
19
|
-
type KTAvailableContent = KTRef<any> | HTMLElement | string | number | undefined;
|
|
20
|
-
type
|
|
21
|
-
|
|
22
|
-
| KTAvailableContent
|
|
23
|
-
| Promise<KTAvailableContent[]>
|
|
24
|
-
| Promise<KTAvailableContent>;
|
|
19
|
+
type KTAvailableContent = KTRef<any> | HTMLElement | Element | string | number | boolean | null | undefined;
|
|
20
|
+
type KTAvailableContents = KTAvailableContent[] | KTAvailableContent;
|
|
21
|
+
type KTRawContent = KTAvailableContents | Promise<KTAvailableContents>;
|
|
25
22
|
type KTRawAttr = KTAttribute | string;
|
|
26
23
|
|
|
27
24
|
/**
|
|
@@ -104,12 +101,12 @@ type H = (<T extends HTMLTag>(tag: T, attr?: KTRawAttr, content?: KTRawContent)
|
|
|
104
101
|
* ## About
|
|
105
102
|
* @package @ktjs/core
|
|
106
103
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
107
|
-
* @version 0.
|
|
104
|
+
* @version 0.11.1 (Last Update: 2026.01.14 15:13:36.162)
|
|
108
105
|
* @license MIT
|
|
109
106
|
* @link https://github.com/baendlorel/kt.js
|
|
110
107
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
111
108
|
* @description Core functionality for kt.js - DOM manipulation utilities with JSX/TSX support
|
|
112
|
-
* @copyright Copyright (c)
|
|
109
|
+
* @copyright Copyright (c) 2026 Kasukabe Tsumugi. All rights reserved.
|
|
113
110
|
*/
|
|
114
111
|
declare const h: H;
|
|
115
112
|
|
package/dist/jsx/index.mjs
CHANGED
|
@@ -150,6 +150,10 @@ function applyAttr(element, attr) {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
function apdSingle(element, c) {
|
|
153
|
+
// & JSX should ignore false, undefined, and null
|
|
154
|
+
if (c === false || c === undefined || c === null) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
153
157
|
if (typeof c === 'object' && c !== null && 'isKT' in c) {
|
|
154
158
|
$append.call(element, c.value);
|
|
155
159
|
}
|
|
@@ -201,12 +205,12 @@ function applyContent(element, content) {
|
|
|
201
205
|
* ## About
|
|
202
206
|
* @package @ktjs/core
|
|
203
207
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
204
|
-
* @version 0.
|
|
208
|
+
* @version 0.11.1 (Last Update: 2026.01.14 15:13:36.162)
|
|
205
209
|
* @license MIT
|
|
206
210
|
* @link https://github.com/baendlorel/kt.js
|
|
207
211
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
208
212
|
* @description Core functionality for kt.js - DOM manipulation utilities with JSX/TSX support
|
|
209
|
-
* @copyright Copyright (c)
|
|
213
|
+
* @copyright Copyright (c) 2026 Kasukabe Tsumugi. All rights reserved.
|
|
210
214
|
*/
|
|
211
215
|
const h = ((tag, attr = '', content = '') => {
|
|
212
216
|
if (typeof tag !== 'string') {
|
|
@@ -10,12 +10,9 @@ interface KTRef<T> {
|
|
|
10
10
|
isKT: true;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
type KTAvailableContent = KTRef<any> | HTMLElement | string | number | undefined;
|
|
14
|
-
type
|
|
15
|
-
|
|
16
|
-
| KTAvailableContent
|
|
17
|
-
| Promise<KTAvailableContent[]>
|
|
18
|
-
| Promise<KTAvailableContent>;
|
|
13
|
+
type KTAvailableContent = KTRef<any> | HTMLElement | Element | string | number | boolean | null | undefined;
|
|
14
|
+
type KTAvailableContents = KTAvailableContent[] | KTAvailableContent;
|
|
15
|
+
type KTRawContent = KTAvailableContents | Promise<KTAvailableContents>;
|
|
19
16
|
type KTRawAttr = KTAttribute | string;
|
|
20
17
|
|
|
21
18
|
/**
|
|
@@ -98,12 +95,12 @@ type H = (<T extends HTMLTag>(tag: T, attr?: KTRawAttr, content?: KTRawContent)
|
|
|
98
95
|
* ## About
|
|
99
96
|
* @package @ktjs/core
|
|
100
97
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
101
|
-
* @version 0.
|
|
98
|
+
* @version 0.11.1 (Last Update: 2026.01.14 15:13:36.162)
|
|
102
99
|
* @license MIT
|
|
103
100
|
* @link https://github.com/baendlorel/kt.js
|
|
104
101
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
105
102
|
* @description Core functionality for kt.js - DOM manipulation utilities with JSX/TSX support
|
|
106
|
-
* @copyright Copyright (c)
|
|
103
|
+
* @copyright Copyright (c) 2026 Kasukabe Tsumugi. All rights reserved.
|
|
107
104
|
*/
|
|
108
105
|
declare const h: H;
|
|
109
106
|
|
package/dist/jsx/jsx-runtime.mjs
CHANGED
|
@@ -150,6 +150,10 @@ function applyAttr(element, attr) {
|
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
function apdSingle(element, c) {
|
|
153
|
+
// & JSX should ignore false, undefined, and null
|
|
154
|
+
if (c === false || c === undefined || c === null) {
|
|
155
|
+
return;
|
|
156
|
+
}
|
|
153
157
|
if (typeof c === 'object' && c !== null && 'isKT' in c) {
|
|
154
158
|
$append.call(element, c.value);
|
|
155
159
|
}
|
|
@@ -201,12 +205,12 @@ function applyContent(element, content) {
|
|
|
201
205
|
* ## About
|
|
202
206
|
* @package @ktjs/core
|
|
203
207
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
204
|
-
* @version 0.
|
|
208
|
+
* @version 0.11.1 (Last Update: 2026.01.14 15:13:36.162)
|
|
205
209
|
* @license MIT
|
|
206
210
|
* @link https://github.com/baendlorel/kt.js
|
|
207
211
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
208
212
|
* @description Core functionality for kt.js - DOM manipulation utilities with JSX/TSX support
|
|
209
|
-
* @copyright Copyright (c)
|
|
213
|
+
* @copyright Copyright (c) 2026 Kasukabe Tsumugi. All rights reserved.
|
|
210
214
|
*/
|
|
211
215
|
const h = ((tag, attr = '', content = '') => {
|
|
212
216
|
if (typeof tag !== 'string') {
|