@ktjs/core 0.26.2 → 0.26.5
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 +4 -13
- package/dist/index.iife.js +5 -4
- package/dist/index.legacy.js +5 -4
- package/dist/index.mjs +5 -4
- package/dist/jsx/index.d.ts +2 -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
|
/**
|
|
@@ -15,7 +7,6 @@ declare class KTComputed<T> {
|
|
|
15
7
|
*/
|
|
16
8
|
isKT: true;
|
|
17
9
|
ktType: KTReactiveType;
|
|
18
|
-
private _subscribe;
|
|
19
10
|
constructor(_calculator: () => T, reactives: Array<KTReactive<unknown>>);
|
|
20
11
|
/**
|
|
21
12
|
* If new value and old value are both nodes, the old one will be replaced in the DOM
|
|
@@ -249,7 +240,7 @@ type KTComponent = (
|
|
|
249
240
|
* ## About
|
|
250
241
|
* @package @ktjs/core
|
|
251
242
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
252
|
-
* @version 0.26.
|
|
243
|
+
* @version 0.26.5 (Last Update: 2026.02.06 09:19:54.618)
|
|
253
244
|
* @license MIT
|
|
254
245
|
* @link https://github.com/baendlorel/kt.js
|
|
255
246
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
@@ -1413,4 +1404,4 @@ interface KTForProps<T> {
|
|
|
1413
1404
|
declare function KTFor<T>(props: KTForProps<T>): KTForElement;
|
|
1414
1405
|
|
|
1415
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 };
|
|
1416
|
-
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.
|
|
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;
|
|
@@ -433,6 +431,9 @@ var __ktjs_core__ = (function (exports) {
|
|
|
433
431
|
* @internal
|
|
434
432
|
*/
|
|
435
433
|
_onChanges = [];
|
|
434
|
+
/**
|
|
435
|
+
* @internal
|
|
436
|
+
*/
|
|
436
437
|
_subscribe(reactives) {
|
|
437
438
|
for (let i = 0; i < reactives.length; i++) {
|
|
438
439
|
const reactive = reactives[i];
|
|
@@ -594,7 +595,7 @@ var __ktjs_core__ = (function (exports) {
|
|
|
594
595
|
* ## About
|
|
595
596
|
* @package @ktjs/core
|
|
596
597
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
597
|
-
* @version 0.26.
|
|
598
|
+
* @version 0.26.5 (Last Update: 2026.02.06 09:19:54.618)
|
|
598
599
|
* @license MIT
|
|
599
600
|
* @link https://github.com/baendlorel/kt.js
|
|
600
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.
|
|
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;
|
|
@@ -435,6 +433,9 @@ var __ktjs_core__ = (function (exports) {
|
|
|
435
433
|
this._value = _calculator();
|
|
436
434
|
this._subscribe(reactives);
|
|
437
435
|
}
|
|
436
|
+
/**
|
|
437
|
+
* @internal
|
|
438
|
+
*/
|
|
438
439
|
KTComputed.prototype._subscribe = function (reactives) {
|
|
439
440
|
var _this = this;
|
|
440
441
|
for (var i = 0; i < reactives.length; i++) {
|
|
@@ -597,7 +598,7 @@ var __ktjs_core__ = (function (exports) {
|
|
|
597
598
|
* ## About
|
|
598
599
|
* @package @ktjs/core
|
|
599
600
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
600
|
-
* @version 0.26.
|
|
601
|
+
* @version 0.26.5 (Last Update: 2026.02.06 09:19:54.618)
|
|
601
602
|
* @license MIT
|
|
602
603
|
* @link https://github.com/baendlorel/kt.js
|
|
603
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.
|
|
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;
|
|
@@ -430,6 +428,9 @@ class KTComputed {
|
|
|
430
428
|
* @internal
|
|
431
429
|
*/
|
|
432
430
|
_onChanges = [];
|
|
431
|
+
/**
|
|
432
|
+
* @internal
|
|
433
|
+
*/
|
|
433
434
|
_subscribe(reactives) {
|
|
434
435
|
for (let i = 0; i < reactives.length; i++) {
|
|
435
436
|
const reactive = reactives[i];
|
|
@@ -591,7 +592,7 @@ let creator = htmlCreator;
|
|
|
591
592
|
* ## About
|
|
592
593
|
* @package @ktjs/core
|
|
593
594
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
594
|
-
* @version 0.26.
|
|
595
|
+
* @version 0.26.5 (Last Update: 2026.02.06 09:19:54.618)
|
|
595
596
|
* @license MIT
|
|
596
597
|
* @link https://github.com/baendlorel/kt.js
|
|
597
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
|
/**
|
|
@@ -13,7 +6,6 @@ declare class KTComputed<T> {
|
|
|
13
6
|
*/
|
|
14
7
|
isKT: true;
|
|
15
8
|
ktType: KTReactiveType;
|
|
16
|
-
private _subscribe;
|
|
17
9
|
constructor(_calculator: () => T, reactives: Array<KTReactive<unknown>>);
|
|
18
10
|
/**
|
|
19
11
|
* If new value and old value are both nodes, the old one will be replaced in the DOM
|
|
@@ -172,7 +164,7 @@ type KTAttribute = KTBaseAttribute & KTPrefixedEventAttribute;
|
|
|
172
164
|
* ## About
|
|
173
165
|
* @package @ktjs/core
|
|
174
166
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
175
|
-
* @version 0.26.
|
|
167
|
+
* @version 0.26.5 (Last Update: 2026.02.06 09:19:54.618)
|
|
176
168
|
* @license MIT
|
|
177
169
|
* @link https://github.com/baendlorel/kt.js
|
|
178
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.
|
|
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.5 (Last Update: 2026.02.06 09:19:54.618)
|
|
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.5 (Last Update: 2026.02.06 09:19:54.618)
|
|
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.
|
|
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.5 (Last Update: 2026.02.06 09:19:54.618)
|
|
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.5",
|
|
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.
|
|
47
|
+
"@ktjs/shared": "0.23.1"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "rollup -c rollup.config.mjs",
|