@ktjs/core 0.11.2 → 0.12.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 CHANGED
@@ -25,7 +25,7 @@ interface KTRef<T> {
25
25
  * - can alse be used to store normal values, but it is not reactive.
26
26
  * @param value mostly an HTMLElement
27
27
  */
28
- declare function ktref<T = HTMLElement>(value?: T): KTRef<T>;
28
+ declare function ref<T = HTMLElement>(value?: T): KTRef<T>;
29
29
 
30
30
  type KTAvailableContent =
31
31
  | KTRef<any>
@@ -134,7 +134,7 @@ type H = (<T extends HTMLTag>(tag: T, attr?: KTRawAttr, content?: KTRawContent)
134
134
  * ## About
135
135
  * @package @ktjs/core
136
136
  * @author Kasukabe Tsumugi <futami16237@gmail.com>
137
- * @version 0.11.2 (Last Update: 2026.01.14 15:29:14.301)
137
+ * @version 0.12.0 (Last Update: 2026.01.14 15:48:26.320)
138
138
  * @license MIT
139
139
  * @link https://github.com/baendlorel/kt.js
140
140
  * @link https://baendlorel.github.io/ Welcome to my site!
@@ -191,9 +191,10 @@ declare global {
191
191
  type ExtractComponentProps<T> = T extends (props: infer P) => any ? Omit<P, 'ref' | 'children'> : {};
192
192
  declare function KTAsync<T extends KTComponent>(props: {
193
193
  ref?: KTRef<HTMLElement>;
194
+ skeleton?: HTMLElement;
194
195
  component: T;
195
196
  children?: KTRawContent;
196
197
  } & ExtractComponentProps<T>): HTMLElement;
197
198
 
198
- export { Fragment, KTAsync, h as createElement, h, jsx, jsxDEV, jsxs, ktref };
199
+ export { Fragment, KTAsync, h as createElement, h, jsx, jsxDEV, jsxs, ref };
199
200
  export type { EventHandler, HTMLTag, KTAttribute, KTRawAttr, KTRawContent, KTRawContents, KTRef, KTRuntime };
@@ -225,7 +225,7 @@ var __ktjs_core__ = (function (exports) {
225
225
  * ## About
226
226
  * @package @ktjs/core
227
227
  * @author Kasukabe Tsumugi <futami16237@gmail.com>
228
- * @version 0.11.2 (Last Update: 2026.01.14 15:29:14.301)
228
+ * @version 0.12.0 (Last Update: 2026.01.14 15:48:26.320)
229
229
  * @license MIT
230
230
  * @link https://github.com/baendlorel/kt.js
231
231
  * @link https://baendlorel.github.io/ Welcome to my site!
@@ -321,13 +321,13 @@ var __ktjs_core__ = (function (exports) {
321
321
  * - can alse be used to store normal values, but it is not reactive.
322
322
  * @param value mostly an HTMLElement
323
323
  */
324
- function ktref(value) {
324
+ function ref(value) {
325
325
  return { value: value, isKT: true };
326
326
  }
327
327
 
328
328
  function KTAsync(props) {
329
329
  const raw = props.component(props);
330
- let comp = document.createComment('ktjs-suspense-placeholder');
330
+ let comp = props.skeleton ?? document.createComment('ktjs-suspense-placeholder');
331
331
  if ($isThenable(raw)) {
332
332
  raw.then((resolved) => comp.replaceWith(resolved));
333
333
  }
@@ -344,7 +344,7 @@ var __ktjs_core__ = (function (exports) {
344
344
  exports.jsx = jsx;
345
345
  exports.jsxDEV = jsxDEV;
346
346
  exports.jsxs = jsxs;
347
- exports.ktref = ktref;
347
+ exports.ref = ref;
348
348
 
349
349
  return exports;
350
350
 
@@ -241,7 +241,7 @@ var __ktjs_core__ = (function (exports) {
241
241
  * ## About
242
242
  * @package @ktjs/core
243
243
  * @author Kasukabe Tsumugi <futami16237@gmail.com>
244
- * @version 0.11.2 (Last Update: 2026.01.14 15:29:14.301)
244
+ * @version 0.12.0 (Last Update: 2026.01.14 15:48:26.320)
245
245
  * @license MIT
246
246
  * @link https://github.com/baendlorel/kt.js
247
247
  * @link https://baendlorel.github.io/ Welcome to my site!
@@ -377,13 +377,14 @@ var __ktjs_core__ = (function (exports) {
377
377
  * - can alse be used to store normal values, but it is not reactive.
378
378
  * @param value mostly an HTMLElement
379
379
  */
380
- function ktref(value) {
380
+ function ref(value) {
381
381
  return { value: value, isKT: true };
382
382
  }
383
383
 
384
384
  function KTAsync(props) {
385
+ var _a;
385
386
  var raw = props.component(props);
386
- var comp = document.createComment('ktjs-suspense-placeholder');
387
+ var comp = (_a = props.skeleton) !== null && _a !== void 0 ? _a : document.createComment('ktjs-suspense-placeholder');
387
388
  if ($isThenable(raw)) {
388
389
  raw.then(function (resolved) { return comp.replaceWith(resolved); });
389
390
  }
@@ -400,7 +401,7 @@ var __ktjs_core__ = (function (exports) {
400
401
  exports.jsx = jsx;
401
402
  exports.jsxDEV = jsxDEV;
402
403
  exports.jsxs = jsxs;
403
- exports.ktref = ktref;
404
+ exports.ref = ref;
404
405
 
405
406
  return exports;
406
407
 
package/dist/index.mjs CHANGED
@@ -222,7 +222,7 @@ function applyContent(element, content) {
222
222
  * ## About
223
223
  * @package @ktjs/core
224
224
  * @author Kasukabe Tsumugi <futami16237@gmail.com>
225
- * @version 0.11.2 (Last Update: 2026.01.14 15:29:14.301)
225
+ * @version 0.12.0 (Last Update: 2026.01.14 15:48:26.320)
226
226
  * @license MIT
227
227
  * @link https://github.com/baendlorel/kt.js
228
228
  * @link https://baendlorel.github.io/ Welcome to my site!
@@ -318,13 +318,13 @@ const jsxs = jsx;
318
318
  * - can alse be used to store normal values, but it is not reactive.
319
319
  * @param value mostly an HTMLElement
320
320
  */
321
- function ktref(value) {
321
+ function ref(value) {
322
322
  return { value: value, isKT: true };
323
323
  }
324
324
 
325
325
  function KTAsync(props) {
326
326
  const raw = props.component(props);
327
- let comp = document.createComment('ktjs-suspense-placeholder');
327
+ let comp = props.skeleton ?? document.createComment('ktjs-suspense-placeholder');
328
328
  if ($isThenable(raw)) {
329
329
  raw.then((resolved) => comp.replaceWith(resolved));
330
330
  }
@@ -334,4 +334,4 @@ function KTAsync(props) {
334
334
  return comp;
335
335
  }
336
336
 
337
- export { Fragment, KTAsync, h as createElement, h, jsx, jsxDEV, jsxs, ktref };
337
+ export { Fragment, KTAsync, h as createElement, h, jsx, jsxDEV, jsxs, ref };
@@ -14,7 +14,7 @@ interface KTRef<T> {
14
14
  * - can alse be used to store normal values, but it is not reactive.
15
15
  * @param value mostly an HTMLElement
16
16
  */
17
- declare function ktref<T = HTMLElement>(value?: T): KTRef<T>;
17
+ declare function ref<T = HTMLElement>(value?: T): KTRef<T>;
18
18
 
19
19
  type KTAvailableContent =
20
20
  | KTRef<any>
@@ -109,7 +109,7 @@ type H = (<T extends HTMLTag>(tag: T, attr?: KTRawAttr, content?: KTRawContent)
109
109
  * ## About
110
110
  * @package @ktjs/core
111
111
  * @author Kasukabe Tsumugi <futami16237@gmail.com>
112
- * @version 0.11.2 (Last Update: 2026.01.14 15:29:14.301)
112
+ * @version 0.12.0 (Last Update: 2026.01.14 15:48:26.320)
113
113
  * @license MIT
114
114
  * @link https://github.com/baendlorel/kt.js
115
115
  * @link https://baendlorel.github.io/ Welcome to my site!
@@ -160,5 +160,5 @@ declare global {
160
160
  }
161
161
  }
162
162
 
163
- export { Fragment, h as createElement, jsx, jsxDEV, jsxs, ktref };
163
+ export { Fragment, h as createElement, jsx, jsxDEV, jsxs, ref };
164
164
  export type { KTRef };
@@ -205,7 +205,7 @@ function applyContent(element, content) {
205
205
  * ## About
206
206
  * @package @ktjs/core
207
207
  * @author Kasukabe Tsumugi <futami16237@gmail.com>
208
- * @version 0.11.2 (Last Update: 2026.01.14 15:29:14.301)
208
+ * @version 0.12.0 (Last Update: 2026.01.14 15:48:26.320)
209
209
  * @license MIT
210
210
  * @link https://github.com/baendlorel/kt.js
211
211
  * @link https://baendlorel.github.io/ Welcome to my site!
@@ -301,8 +301,8 @@ const jsxs = jsx;
301
301
  * - can alse be used to store normal values, but it is not reactive.
302
302
  * @param value mostly an HTMLElement
303
303
  */
304
- function ktref(value) {
304
+ function ref(value) {
305
305
  return { value: value, isKT: true };
306
306
  }
307
307
 
308
- export { Fragment, h as createElement, jsx, jsxDEV, jsxs, ktref };
308
+ export { Fragment, h as createElement, jsx, jsxDEV, jsxs, ref };
@@ -103,7 +103,7 @@ type H = (<T extends HTMLTag>(tag: T, attr?: KTRawAttr, content?: KTRawContent)
103
103
  * ## About
104
104
  * @package @ktjs/core
105
105
  * @author Kasukabe Tsumugi <futami16237@gmail.com>
106
- * @version 0.11.2 (Last Update: 2026.01.14 15:29:14.301)
106
+ * @version 0.12.0 (Last Update: 2026.01.14 15:48:26.320)
107
107
  * @license MIT
108
108
  * @link https://github.com/baendlorel/kt.js
109
109
  * @link https://baendlorel.github.io/ Welcome to my site!
@@ -205,7 +205,7 @@ function applyContent(element, content) {
205
205
  * ## About
206
206
  * @package @ktjs/core
207
207
  * @author Kasukabe Tsumugi <futami16237@gmail.com>
208
- * @version 0.11.2 (Last Update: 2026.01.14 15:29:14.301)
208
+ * @version 0.12.0 (Last Update: 2026.01.14 15:48:26.320)
209
209
  * @license MIT
210
210
  * @link https://github.com/baendlorel/kt.js
211
211
  * @link https://baendlorel.github.io/ Welcome to my site!
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ktjs/core",
3
- "version": "0.11.2",
3
+ "version": "0.12.0",
4
4
  "description": "Core functionality for kt.js - DOM manipulation utilities with JSX/TSX support",
5
5
  "type": "module",
6
6
  "module": "./dist/index.mjs",