@ktjs/core 0.15.3 → 0.15.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 +1 -1
- package/dist/index.iife.js +7 -8
- package/dist/index.legacy.js +7 -8
- package/dist/index.mjs +7 -8
- package/dist/jsx/index.d.ts +1 -1
- package/dist/jsx/index.mjs +7 -8
- package/dist/jsx/jsx-runtime.d.ts +1 -1
- package/dist/jsx/jsx-runtime.mjs +7 -8
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -150,7 +150,7 @@ type HTML<T extends (HTMLTag | SVGTag) & otherstring> = T extends SVGTag ? SVGEl
|
|
|
150
150
|
* ## About
|
|
151
151
|
* @package @ktjs/core
|
|
152
152
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
153
|
-
* @version 0.15.
|
|
153
|
+
* @version 0.15.5 (Last Update: 2026.01.25 18:25:48.373)
|
|
154
154
|
* @license MIT
|
|
155
155
|
* @link https://github.com/baendlorel/kt.js
|
|
156
156
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
package/dist/index.iife.js
CHANGED
|
@@ -58,7 +58,7 @@ var __ktjs_core__ = (function (exports) {
|
|
|
58
58
|
function attrIsObject(element, attr) {
|
|
59
59
|
const classValue = attr.class;
|
|
60
60
|
if (classValue !== undefined) {
|
|
61
|
-
element.
|
|
61
|
+
element.setAttribute('class', classValue);
|
|
62
62
|
}
|
|
63
63
|
const style = attr.style;
|
|
64
64
|
if (style) {
|
|
@@ -195,7 +195,6 @@ var __ktjs_core__ = (function (exports) {
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
const defaultCreator = (tag) => document.createElement(tag);
|
|
198
|
-
const svgCreator = (tag) => document.createElementNS('http://www.w3.org/2000/svg', tag);
|
|
199
198
|
let creator = defaultCreator;
|
|
200
199
|
/**
|
|
201
200
|
* Create an enhanced HTMLElement.
|
|
@@ -207,7 +206,7 @@ var __ktjs_core__ = (function (exports) {
|
|
|
207
206
|
* ## About
|
|
208
207
|
* @package @ktjs/core
|
|
209
208
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
210
|
-
* @version 0.15.
|
|
209
|
+
* @version 0.15.5 (Last Update: 2026.01.25 18:25:48.373)
|
|
211
210
|
* @license MIT
|
|
212
211
|
* @link https://github.com/baendlorel/kt.js
|
|
213
212
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
@@ -218,16 +217,16 @@ var __ktjs_core__ = (function (exports) {
|
|
|
218
217
|
if (typeof tag !== 'string') {
|
|
219
218
|
$throw('tagName must be a string.');
|
|
220
219
|
}
|
|
221
|
-
let lastCreator = creator;
|
|
222
|
-
if (tag === 'svg') {
|
|
223
|
-
creator = svgCreator;
|
|
224
|
-
}
|
|
225
220
|
// * start creating the element
|
|
226
221
|
const element = creator(tag);
|
|
227
222
|
// * Handle content
|
|
228
223
|
applyAttr(element, attr);
|
|
229
224
|
applyContent(element, content);
|
|
230
|
-
|
|
225
|
+
if (tag === 'svg') {
|
|
226
|
+
const div = document.createElement('div');
|
|
227
|
+
div.innerHTML = element.outerHTML;
|
|
228
|
+
return div.firstChild;
|
|
229
|
+
}
|
|
231
230
|
return element;
|
|
232
231
|
};
|
|
233
232
|
|
package/dist/index.legacy.js
CHANGED
|
@@ -70,7 +70,7 @@ var __ktjs_core__ = (function (exports) {
|
|
|
70
70
|
function attrIsObject(element, attr) {
|
|
71
71
|
var classValue = attr.class;
|
|
72
72
|
if (classValue !== undefined) {
|
|
73
|
-
element.
|
|
73
|
+
element.setAttribute('class', classValue);
|
|
74
74
|
}
|
|
75
75
|
var style = attr.style;
|
|
76
76
|
if (style) {
|
|
@@ -220,7 +220,6 @@ var __ktjs_core__ = (function (exports) {
|
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
var defaultCreator = function (tag) { return document.createElement(tag); };
|
|
223
|
-
var svgCreator = function (tag) { return document.createElementNS('http://www.w3.org/2000/svg', tag); };
|
|
224
223
|
var creator = defaultCreator;
|
|
225
224
|
/**
|
|
226
225
|
* Create an enhanced HTMLElement.
|
|
@@ -232,7 +231,7 @@ var __ktjs_core__ = (function (exports) {
|
|
|
232
231
|
* ## About
|
|
233
232
|
* @package @ktjs/core
|
|
234
233
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
235
|
-
* @version 0.15.
|
|
234
|
+
* @version 0.15.5 (Last Update: 2026.01.25 18:25:48.373)
|
|
236
235
|
* @license MIT
|
|
237
236
|
* @link https://github.com/baendlorel/kt.js
|
|
238
237
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
@@ -243,16 +242,16 @@ var __ktjs_core__ = (function (exports) {
|
|
|
243
242
|
if (typeof tag !== 'string') {
|
|
244
243
|
$throw('tagName must be a string.');
|
|
245
244
|
}
|
|
246
|
-
var lastCreator = creator;
|
|
247
|
-
if (tag === 'svg') {
|
|
248
|
-
creator = svgCreator;
|
|
249
|
-
}
|
|
250
245
|
// * start creating the element
|
|
251
246
|
var element = creator(tag);
|
|
252
247
|
// * Handle content
|
|
253
248
|
applyAttr(element, attr);
|
|
254
249
|
applyContent(element, content);
|
|
255
|
-
|
|
250
|
+
if (tag === 'svg') {
|
|
251
|
+
var div = document.createElement('div');
|
|
252
|
+
div.innerHTML = element.outerHTML;
|
|
253
|
+
return div.firstChild;
|
|
254
|
+
}
|
|
256
255
|
return element;
|
|
257
256
|
};
|
|
258
257
|
|
package/dist/index.mjs
CHANGED
|
@@ -55,7 +55,7 @@ const defaultHandler = (element, key, value) => element.setAttribute(key, value)
|
|
|
55
55
|
function attrIsObject(element, attr) {
|
|
56
56
|
const classValue = attr.class;
|
|
57
57
|
if (classValue !== undefined) {
|
|
58
|
-
element.
|
|
58
|
+
element.setAttribute('class', classValue);
|
|
59
59
|
}
|
|
60
60
|
const style = attr.style;
|
|
61
61
|
if (style) {
|
|
@@ -192,7 +192,6 @@ function applyContent(element, content) {
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
const defaultCreator = (tag) => document.createElement(tag);
|
|
195
|
-
const svgCreator = (tag) => document.createElementNS('http://www.w3.org/2000/svg', tag);
|
|
196
195
|
let creator = defaultCreator;
|
|
197
196
|
/**
|
|
198
197
|
* Create an enhanced HTMLElement.
|
|
@@ -204,7 +203,7 @@ let creator = defaultCreator;
|
|
|
204
203
|
* ## About
|
|
205
204
|
* @package @ktjs/core
|
|
206
205
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
207
|
-
* @version 0.15.
|
|
206
|
+
* @version 0.15.5 (Last Update: 2026.01.25 18:25:48.373)
|
|
208
207
|
* @license MIT
|
|
209
208
|
* @link https://github.com/baendlorel/kt.js
|
|
210
209
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
@@ -215,16 +214,16 @@ const h = (tag, attr, content) => {
|
|
|
215
214
|
if (typeof tag !== 'string') {
|
|
216
215
|
$throw('tagName must be a string.');
|
|
217
216
|
}
|
|
218
|
-
let lastCreator = creator;
|
|
219
|
-
if (tag === 'svg') {
|
|
220
|
-
creator = svgCreator;
|
|
221
|
-
}
|
|
222
217
|
// * start creating the element
|
|
223
218
|
const element = creator(tag);
|
|
224
219
|
// * Handle content
|
|
225
220
|
applyAttr(element, attr);
|
|
226
221
|
applyContent(element, content);
|
|
227
|
-
|
|
222
|
+
if (tag === 'svg') {
|
|
223
|
+
const div = document.createElement('div');
|
|
224
|
+
div.innerHTML = element.outerHTML;
|
|
225
|
+
return div.firstChild;
|
|
226
|
+
}
|
|
228
227
|
return element;
|
|
229
228
|
};
|
|
230
229
|
|
package/dist/jsx/index.d.ts
CHANGED
|
@@ -136,7 +136,7 @@ type HTML<T extends (HTMLTag | SVGTag) & otherstring> = T extends SVGTag ? SVGEl
|
|
|
136
136
|
* ## About
|
|
137
137
|
* @package @ktjs/core
|
|
138
138
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
139
|
-
* @version 0.15.
|
|
139
|
+
* @version 0.15.5 (Last Update: 2026.01.25 18:25:48.373)
|
|
140
140
|
* @license MIT
|
|
141
141
|
* @link https://github.com/baendlorel/kt.js
|
|
142
142
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
package/dist/jsx/index.mjs
CHANGED
|
@@ -55,7 +55,7 @@ const defaultHandler = (element, key, value) => element.setAttribute(key, value)
|
|
|
55
55
|
function attrIsObject(element, attr) {
|
|
56
56
|
const classValue = attr.class;
|
|
57
57
|
if (classValue !== undefined) {
|
|
58
|
-
element.
|
|
58
|
+
element.setAttribute('class', classValue);
|
|
59
59
|
}
|
|
60
60
|
const style = attr.style;
|
|
61
61
|
if (style) {
|
|
@@ -192,7 +192,6 @@ function applyContent(element, content) {
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
const defaultCreator = (tag) => document.createElement(tag);
|
|
195
|
-
const svgCreator = (tag) => document.createElementNS('http://www.w3.org/2000/svg', tag);
|
|
196
195
|
let creator = defaultCreator;
|
|
197
196
|
/**
|
|
198
197
|
* Create an enhanced HTMLElement.
|
|
@@ -204,7 +203,7 @@ let creator = defaultCreator;
|
|
|
204
203
|
* ## About
|
|
205
204
|
* @package @ktjs/core
|
|
206
205
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
207
|
-
* @version 0.15.
|
|
206
|
+
* @version 0.15.5 (Last Update: 2026.01.25 18:25:48.373)
|
|
208
207
|
* @license MIT
|
|
209
208
|
* @link https://github.com/baendlorel/kt.js
|
|
210
209
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
@@ -215,16 +214,16 @@ const h = (tag, attr, content) => {
|
|
|
215
214
|
if (typeof tag !== 'string') {
|
|
216
215
|
$throw('tagName must be a string.');
|
|
217
216
|
}
|
|
218
|
-
let lastCreator = creator;
|
|
219
|
-
if (tag === 'svg') {
|
|
220
|
-
creator = svgCreator;
|
|
221
|
-
}
|
|
222
217
|
// * start creating the element
|
|
223
218
|
const element = creator(tag);
|
|
224
219
|
// * Handle content
|
|
225
220
|
applyAttr(element, attr);
|
|
226
221
|
applyContent(element, content);
|
|
227
|
-
|
|
222
|
+
if (tag === 'svg') {
|
|
223
|
+
const div = document.createElement('div');
|
|
224
|
+
div.innerHTML = element.outerHTML;
|
|
225
|
+
return div.firstChild;
|
|
226
|
+
}
|
|
228
227
|
return element;
|
|
229
228
|
};
|
|
230
229
|
|
|
@@ -130,7 +130,7 @@ type HTML<T extends (HTMLTag | SVGTag) & otherstring> = T extends SVGTag ? SVGEl
|
|
|
130
130
|
* ## About
|
|
131
131
|
* @package @ktjs/core
|
|
132
132
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
133
|
-
* @version 0.15.
|
|
133
|
+
* @version 0.15.5 (Last Update: 2026.01.25 18:25:48.373)
|
|
134
134
|
* @license MIT
|
|
135
135
|
* @link https://github.com/baendlorel/kt.js
|
|
136
136
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
package/dist/jsx/jsx-runtime.mjs
CHANGED
|
@@ -55,7 +55,7 @@ const defaultHandler = (element, key, value) => element.setAttribute(key, value)
|
|
|
55
55
|
function attrIsObject(element, attr) {
|
|
56
56
|
const classValue = attr.class;
|
|
57
57
|
if (classValue !== undefined) {
|
|
58
|
-
element.
|
|
58
|
+
element.setAttribute('class', classValue);
|
|
59
59
|
}
|
|
60
60
|
const style = attr.style;
|
|
61
61
|
if (style) {
|
|
@@ -192,7 +192,6 @@ function applyContent(element, content) {
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
const defaultCreator = (tag) => document.createElement(tag);
|
|
195
|
-
const svgCreator = (tag) => document.createElementNS('http://www.w3.org/2000/svg', tag);
|
|
196
195
|
let creator = defaultCreator;
|
|
197
196
|
/**
|
|
198
197
|
* Create an enhanced HTMLElement.
|
|
@@ -204,7 +203,7 @@ let creator = defaultCreator;
|
|
|
204
203
|
* ## About
|
|
205
204
|
* @package @ktjs/core
|
|
206
205
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
207
|
-
* @version 0.15.
|
|
206
|
+
* @version 0.15.5 (Last Update: 2026.01.25 18:25:48.373)
|
|
208
207
|
* @license MIT
|
|
209
208
|
* @link https://github.com/baendlorel/kt.js
|
|
210
209
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
|
@@ -215,16 +214,16 @@ const h = (tag, attr, content) => {
|
|
|
215
214
|
if (typeof tag !== 'string') {
|
|
216
215
|
$throw('tagName must be a string.');
|
|
217
216
|
}
|
|
218
|
-
let lastCreator = creator;
|
|
219
|
-
if (tag === 'svg') {
|
|
220
|
-
creator = svgCreator;
|
|
221
|
-
}
|
|
222
217
|
// * start creating the element
|
|
223
218
|
const element = creator(tag);
|
|
224
219
|
// * Handle content
|
|
225
220
|
applyAttr(element, attr);
|
|
226
221
|
applyContent(element, content);
|
|
227
|
-
|
|
222
|
+
if (tag === 'svg') {
|
|
223
|
+
const div = document.createElement('div');
|
|
224
|
+
div.innerHTML = element.outerHTML;
|
|
225
|
+
return div.firstChild;
|
|
226
|
+
}
|
|
228
227
|
return element;
|
|
229
228
|
};
|
|
230
229
|
|