@ktjs/core 0.26.4 → 0.26.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.
- package/dist/index.d.ts +5 -13
- package/dist/index.iife.js +2 -4
- package/dist/index.legacy.js +2 -4
- package/dist/index.mjs +2 -4
- package/dist/jsx/index.d.ts +3 -10
- package/dist/jsx/index.mjs +2 -4
- package/dist/jsx/jsx-runtime.d.ts +2 -9
- package/dist/jsx/jsx-runtime.mjs +2 -4
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Normal HTML tags like `div`, `span`, `a`, etc.
|
|
5
|
-
*/
|
|
6
|
-
type HTMLTag = keyof HTMLElementTagNameMap;
|
|
7
|
-
type SVGTag = keyof SVGElementTagNameMap;
|
|
8
|
-
type MathMLTag = keyof MathMLElementTagNameMap;
|
|
9
|
-
|
|
10
|
-
type InputElementTag = 'input' | 'select' | 'textarea';
|
|
1
|
+
import { otherstring, HTMLTag, SVGTag, MathMLTag } from '@ktjs/shared';
|
|
2
|
+
export { HTMLTag, InputElementTag, MathMLTag, SVGTag } from '@ktjs/shared';
|
|
11
3
|
|
|
12
4
|
declare class KTComputed<T> {
|
|
13
5
|
/**
|
|
@@ -55,7 +47,7 @@ declare function effect(effectFn: () => void, reactives: Array<KTReactive<any>>,
|
|
|
55
47
|
|
|
56
48
|
type KTReactive<T> = KTRef<T> | KTComputed<T>;
|
|
57
49
|
declare const toReactive: <T>(value: T | KTReactive<T>, onChange?: ReactiveChangeHandler<T>) => KTReactive<T>;
|
|
58
|
-
type KTReactify<T> = T extends any ? KTReactive<T> : never;
|
|
50
|
+
type KTReactify<T> = T extends boolean ? KTReactive<boolean> : T extends any ? KTReactive<T> : never;
|
|
59
51
|
type KTReactifyObject<T extends object> = {
|
|
60
52
|
[K in keyof T]: KTReactify<T[K]>;
|
|
61
53
|
};
|
|
@@ -248,7 +240,7 @@ type KTComponent = (
|
|
|
248
240
|
* ## About
|
|
249
241
|
* @package @ktjs/core
|
|
250
242
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
251
|
-
* @version 0.26.
|
|
243
|
+
* @version 0.26.6 (Last Update: 2026.02.06 11:48:09.349)
|
|
252
244
|
* @license MIT
|
|
253
245
|
* @link https://github.com/baendlorel/kt.js
|
|
254
246
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
@@ -1412,4 +1404,4 @@ interface KTForProps<T> {
|
|
|
1412
1404
|
declare function KTFor<T>(props: KTForProps<T>): KTForElement;
|
|
1413
1405
|
|
|
1414
1406
|
export { $modelOrRef, Fragment, KTAsync, KTComputed, KTFor, KTReactiveType, KTRef, computed, h as createElement, createRedrawable, deref, effect, h, isComputed, isKT, isRef, jsx, jsxDEV, jsxs, ref, surfaceRef, toReactive, toRef };
|
|
1415
|
-
export type { EventHandler,
|
|
1407
|
+
export type { EventHandler, KTAttribute, KTForElement, KTForProps, KTPrefixedEventAttribute, KTRawAttr, KTRawContent, KTRawContents, KTReactify, KTReactifyObject, KTReactifyProps, KTReactive, KTSurfaceRef, ReactiveChangeHandler };
|
package/dist/index.iife.js
CHANGED
|
@@ -91,7 +91,7 @@ var __ktjs_core__ = (function (exports) {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
// Shared utilities and cached native methods for kt.js framework
|
|
94
|
-
Object.defineProperty(window, '__ktjs__', { value: '0.23.
|
|
94
|
+
Object.defineProperty(window, '__ktjs__', { value: '0.23.1' });
|
|
95
95
|
|
|
96
96
|
const isKT = (obj) => obj?.isKT;
|
|
97
97
|
const isRef = (obj) => obj?.ktType === 1 /* KTReactiveType.REF */;
|
|
@@ -159,7 +159,6 @@ var __ktjs_core__ = (function (exports) {
|
|
|
159
159
|
element.setAttribute('class', classValue);
|
|
160
160
|
}
|
|
161
161
|
}
|
|
162
|
-
// todo 这里加入reactive支持
|
|
163
162
|
const style = attr.style;
|
|
164
163
|
if (style) {
|
|
165
164
|
if (typeof style === 'string') {
|
|
@@ -238,7 +237,6 @@ var __ktjs_core__ = (function (exports) {
|
|
|
238
237
|
c.addOnChange((newValue, oldValue) => {
|
|
239
238
|
if ($isNode(newValue) && $isNode(oldValue)) {
|
|
240
239
|
// & this case is handled automically in `class KTRef`
|
|
241
|
-
// todo 2 cases might be able to merge into 1
|
|
242
240
|
return;
|
|
243
241
|
}
|
|
244
242
|
const oldNode = node;
|
|
@@ -597,7 +595,7 @@ var __ktjs_core__ = (function (exports) {
|
|
|
597
595
|
* ## About
|
|
598
596
|
* @package @ktjs/core
|
|
599
597
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
600
|
-
* @version 0.26.
|
|
598
|
+
* @version 0.26.6 (Last Update: 2026.02.06 11:48:09.349)
|
|
601
599
|
* @license MIT
|
|
602
600
|
* @link https://github.com/baendlorel/kt.js
|
|
603
601
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
package/dist/index.legacy.js
CHANGED
|
@@ -91,7 +91,7 @@ var __ktjs_core__ = (function (exports) {
|
|
|
91
91
|
}
|
|
92
92
|
|
|
93
93
|
// Shared utilities and cached native methods for kt.js framework
|
|
94
|
-
Object.defineProperty(window, '__ktjs__', { value: '0.23.
|
|
94
|
+
Object.defineProperty(window, '__ktjs__', { value: '0.23.1' });
|
|
95
95
|
|
|
96
96
|
var isKT = function (obj) { return obj === null || obj === void 0 ? void 0 : obj.isKT; };
|
|
97
97
|
var isRef = function (obj) { return (obj === null || obj === void 0 ? void 0 : obj.ktType) === 1 /* KTReactiveType.REF */; };
|
|
@@ -161,7 +161,6 @@ var __ktjs_core__ = (function (exports) {
|
|
|
161
161
|
element.setAttribute('class', classValue);
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
-
// todo 这里加入reactive支持
|
|
165
164
|
var style = attr.style;
|
|
166
165
|
if (style) {
|
|
167
166
|
if (typeof style === 'string') {
|
|
@@ -243,7 +242,6 @@ var __ktjs_core__ = (function (exports) {
|
|
|
243
242
|
c.addOnChange(function (newValue, oldValue) {
|
|
244
243
|
if ($isNode(newValue) && $isNode(oldValue)) {
|
|
245
244
|
// & this case is handled automically in `class KTRef`
|
|
246
|
-
// todo 2 cases might be able to merge into 1
|
|
247
245
|
return;
|
|
248
246
|
}
|
|
249
247
|
var oldNode = node_1;
|
|
@@ -600,7 +598,7 @@ var __ktjs_core__ = (function (exports) {
|
|
|
600
598
|
* ## About
|
|
601
599
|
* @package @ktjs/core
|
|
602
600
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
603
|
-
* @version 0.26.
|
|
601
|
+
* @version 0.26.6 (Last Update: 2026.02.06 11:48:09.349)
|
|
604
602
|
* @license MIT
|
|
605
603
|
* @link https://github.com/baendlorel/kt.js
|
|
606
604
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
package/dist/index.mjs
CHANGED
|
@@ -88,7 +88,7 @@ if (typeof Symbol === 'undefined') {
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
// Shared utilities and cached native methods for kt.js framework
|
|
91
|
-
Object.defineProperty(window, '__ktjs__', { value: '0.23.
|
|
91
|
+
Object.defineProperty(window, '__ktjs__', { value: '0.23.1' });
|
|
92
92
|
|
|
93
93
|
const isKT = (obj) => obj?.isKT;
|
|
94
94
|
const isRef = (obj) => obj?.ktType === 1 /* KTReactiveType.REF */;
|
|
@@ -156,7 +156,6 @@ function attrIsObject(element, attr) {
|
|
|
156
156
|
element.setAttribute('class', classValue);
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
// todo 这里加入reactive支持
|
|
160
159
|
const style = attr.style;
|
|
161
160
|
if (style) {
|
|
162
161
|
if (typeof style === 'string') {
|
|
@@ -235,7 +234,6 @@ function apdSingle(element, c) {
|
|
|
235
234
|
c.addOnChange((newValue, oldValue) => {
|
|
236
235
|
if ($isNode(newValue) && $isNode(oldValue)) {
|
|
237
236
|
// & this case is handled automically in `class KTRef`
|
|
238
|
-
// todo 2 cases might be able to merge into 1
|
|
239
237
|
return;
|
|
240
238
|
}
|
|
241
239
|
const oldNode = node;
|
|
@@ -594,7 +592,7 @@ let creator = htmlCreator;
|
|
|
594
592
|
* ## About
|
|
595
593
|
* @package @ktjs/core
|
|
596
594
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
597
|
-
* @version 0.26.
|
|
595
|
+
* @version 0.26.6 (Last Update: 2026.02.06 11:48:09.349)
|
|
598
596
|
* @license MIT
|
|
599
597
|
* @link https://github.com/baendlorel/kt.js
|
|
600
598
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
package/dist/jsx/index.d.ts
CHANGED
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Normal HTML tags like `div`, `span`, `a`, etc.
|
|
5
|
-
*/
|
|
6
|
-
type HTMLTag = keyof HTMLElementTagNameMap;
|
|
7
|
-
type SVGTag = keyof SVGElementTagNameMap;
|
|
8
|
-
type MathMLTag = keyof MathMLElementTagNameMap;
|
|
1
|
+
import { otherstring, HTMLTag, SVGTag, MathMLTag } from '@ktjs/shared';
|
|
9
2
|
|
|
10
3
|
declare class KTComputed<T> {
|
|
11
4
|
/**
|
|
@@ -32,7 +25,7 @@ declare class KTComputed<T> {
|
|
|
32
25
|
}
|
|
33
26
|
|
|
34
27
|
type KTReactive<T> = KTRef<T> | KTComputed<T>;
|
|
35
|
-
type KTReactify<T> = T extends any ? KTReactive<T> : never;
|
|
28
|
+
type KTReactify<T> = T extends boolean ? KTReactive<boolean> : T extends any ? KTReactive<T> : never;
|
|
36
29
|
type KTReactifyProps<T extends object> = {
|
|
37
30
|
[K in keyof T]: KTReactify<Exclude<T[K], undefined>> | T[K];
|
|
38
31
|
};
|
|
@@ -171,7 +164,7 @@ type KTAttribute = KTBaseAttribute & KTPrefixedEventAttribute;
|
|
|
171
164
|
* ## About
|
|
172
165
|
* @package @ktjs/core
|
|
173
166
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
174
|
-
* @version 0.26.
|
|
167
|
+
* @version 0.26.6 (Last Update: 2026.02.06 11:48:09.349)
|
|
175
168
|
* @license MIT
|
|
176
169
|
* @link https://github.com/baendlorel/kt.js
|
|
177
170
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
package/dist/jsx/index.mjs
CHANGED
|
@@ -81,7 +81,7 @@ if (typeof Symbol === 'undefined') {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
// Shared utilities and cached native methods for kt.js framework
|
|
84
|
-
Object.defineProperty(window, '__ktjs__', { value: '0.23.
|
|
84
|
+
Object.defineProperty(window, '__ktjs__', { value: '0.23.1' });
|
|
85
85
|
|
|
86
86
|
const isKT = (obj) => obj?.isKT;
|
|
87
87
|
const isRef = (obj) => obj?.ktType === 1 /* KTReactiveType.REF */;
|
|
@@ -149,7 +149,6 @@ function attrIsObject(element, attr) {
|
|
|
149
149
|
element.setAttribute('class', classValue);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
// todo 这里加入reactive支持
|
|
153
152
|
const style = attr.style;
|
|
154
153
|
if (style) {
|
|
155
154
|
if (typeof style === 'string') {
|
|
@@ -228,7 +227,6 @@ function apdSingle(element, c) {
|
|
|
228
227
|
c.addOnChange((newValue, oldValue) => {
|
|
229
228
|
if ($isNode(newValue) && $isNode(oldValue)) {
|
|
230
229
|
// & this case is handled automically in `class KTRef`
|
|
231
|
-
// todo 2 cases might be able to merge into 1
|
|
232
230
|
return;
|
|
233
231
|
}
|
|
234
232
|
const oldNode = node;
|
|
@@ -383,7 +381,7 @@ let creator = htmlCreator;
|
|
|
383
381
|
* ## About
|
|
384
382
|
* @package @ktjs/core
|
|
385
383
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
386
|
-
* @version 0.26.
|
|
384
|
+
* @version 0.26.6 (Last Update: 2026.02.06 11:48:09.349)
|
|
387
385
|
* @license MIT
|
|
388
386
|
* @link https://github.com/baendlorel/kt.js
|
|
389
387
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
@@ -1,11 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Normal HTML tags like `div`, `span`, `a`, etc.
|
|
5
|
-
*/
|
|
6
|
-
type HTMLTag = keyof HTMLElementTagNameMap;
|
|
7
|
-
type SVGTag = keyof SVGElementTagNameMap;
|
|
8
|
-
type MathMLTag = keyof MathMLElementTagNameMap;
|
|
1
|
+
import { otherstring, HTMLTag, SVGTag, MathMLTag } from '@ktjs/shared';
|
|
9
2
|
|
|
10
3
|
declare const enum KTReactiveType {
|
|
11
4
|
REF = 1,
|
|
@@ -141,7 +134,7 @@ type KTAttribute = KTBaseAttribute & KTPrefixedEventAttribute;
|
|
|
141
134
|
* ## About
|
|
142
135
|
* @package @ktjs/core
|
|
143
136
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
144
|
-
* @version 0.26.
|
|
137
|
+
* @version 0.26.6 (Last Update: 2026.02.06 11:48:09.349)
|
|
145
138
|
* @license MIT
|
|
146
139
|
* @link https://github.com/baendlorel/kt.js
|
|
147
140
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
package/dist/jsx/jsx-runtime.mjs
CHANGED
|
@@ -81,7 +81,7 @@ if (typeof Symbol === 'undefined') {
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
// Shared utilities and cached native methods for kt.js framework
|
|
84
|
-
Object.defineProperty(window, '__ktjs__', { value: '0.23.
|
|
84
|
+
Object.defineProperty(window, '__ktjs__', { value: '0.23.1' });
|
|
85
85
|
|
|
86
86
|
const isKT = (obj) => obj?.isKT;
|
|
87
87
|
const isRef = (obj) => obj?.ktType === 1 /* KTReactiveType.REF */;
|
|
@@ -149,7 +149,6 @@ function attrIsObject(element, attr) {
|
|
|
149
149
|
element.setAttribute('class', classValue);
|
|
150
150
|
}
|
|
151
151
|
}
|
|
152
|
-
// todo 这里加入reactive支持
|
|
153
152
|
const style = attr.style;
|
|
154
153
|
if (style) {
|
|
155
154
|
if (typeof style === 'string') {
|
|
@@ -228,7 +227,6 @@ function apdSingle(element, c) {
|
|
|
228
227
|
c.addOnChange((newValue, oldValue) => {
|
|
229
228
|
if ($isNode(newValue) && $isNode(oldValue)) {
|
|
230
229
|
// & this case is handled automically in `class KTRef`
|
|
231
|
-
// todo 2 cases might be able to merge into 1
|
|
232
230
|
return;
|
|
233
231
|
}
|
|
234
232
|
const oldNode = node;
|
|
@@ -383,7 +381,7 @@ let creator = htmlCreator;
|
|
|
383
381
|
* ## About
|
|
384
382
|
* @package @ktjs/core
|
|
385
383
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
386
|
-
* @version 0.26.
|
|
384
|
+
* @version 0.26.6 (Last Update: 2026.02.06 11:48:09.349)
|
|
387
385
|
* @license MIT
|
|
388
386
|
* @link https://github.com/baendlorel/kt.js
|
|
389
387
|
* @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.26.
|
|
3
|
+
"version": "0.26.6",
|
|
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",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"directory": "packages/core"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@ktjs/shared": "0.23.
|
|
47
|
+
"@ktjs/shared": "0.23.1"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "rollup -c rollup.config.mjs",
|