@ktjs/core 0.6.6 → 0.6.12
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 +2 -2
- package/dist/index.iife.js +1 -1
- package/dist/index.legacy.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -94,7 +94,7 @@ type KTEventHandlersOrAttribute = {
|
|
|
94
94
|
* When key starts with @, it's always registered as an event handler
|
|
95
95
|
*/
|
|
96
96
|
type KTPrefixedEventHandlers = {
|
|
97
|
-
[EventName in keyof HTMLElementEventMap as
|
|
97
|
+
[EventName in keyof HTMLElementEventMap as `on:${EventName}`]?: (ev: HTMLElementEventMap[EventName]) => void;
|
|
98
98
|
};
|
|
99
99
|
|
|
100
100
|
type KTAttribute = KTBaseAttribute & KTEventHandlersOrAttribute & KTPrefixedEventHandlers;
|
|
@@ -110,7 +110,7 @@ type HTML<T extends HTMLTag & otherstring> = T extends HTMLTag ? HTMLElementTagN
|
|
|
110
110
|
* ## About
|
|
111
111
|
* @package @ktjs/core
|
|
112
112
|
* @author Kasukabe Tsumugi <futami16237@gmail.com>
|
|
113
|
-
* @version 0.6.
|
|
113
|
+
* @version 0.6.12 (Last Update: 2025.12.24 21:28:18.471)
|
|
114
114
|
* @license MIT
|
|
115
115
|
* @link https://github.com/baendlorel/kt.js
|
|
116
116
|
* @link https://baendlorel.github.io/ Welcome to my site!
|
package/dist/index.iife.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __ktjs_core__=function(e){"use strict";const t=e=>{throw new Error("kt.js: "
|
|
1
|
+
var __ktjs_core__=function(e){"use strict";const t=e=>{throw new Error("kt.js: "+e)},n=Array.isArray,o=Object.keys,r=Object.defineProperties,s=(e,t)=>r(e,{t:{value:t,configurable:!0}}),i=()=>({});"undefined"==typeof Promise&&(window.Promise={resolve:i,reject:i}),(()=>{const e="__ktjs__";if(e in window)return;const n=Object.create(null);r(n,{throws:{value:t,enumerable:!0},defines:{value:r,enumerable:!0},mark:{value:s,enumerable:!0}}),r(window,{[e]:{value:n,enumerable:!0}})})();const u=Object.create(null),c=HTMLElement.prototype.appendChild,a=HTMLElement.prototype.append,l="function"==typeof a?function(...e){const t=e.filter(e=>e!==u);return a.apply(this,t)}:function(...e){if(e.length<50)for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n?c.call(this,document.createTextNode(n)):n!==u&&c.call(this,n)}else{const t=document.createDocumentFragment();for(let n=0;n<e.length;n++){const o=e[n];"string"==typeof o?c.call(t,document.createTextNode(o)):o!==u&&c.call(t,o)}c.call(this,t)}};function f(e,t,n){t in e?e[t]=!!n:e.setAttribute(t,n)}function d(e,t,n){t in e?e[t]=n:e.setAttribute(t,n)}const m={checked:f,selected:f,value:d,valueAsDate:d,valueAsNumber:d,defaultValue:d,defaultChecked:f,defaultSelected:f,disabled:f,readOnly:f,multiple:f,required:f,autofocus:f,open:f,controls:f,autoplay:f,loop:f,muted:f,defer:f,async:f,hidden:function(e,t,n){e.hidden=!!n}},p=function(e,t,n){return e.setAttribute(t,n)};function b(e,n){"string"==typeof n?e.className=n:"object"==typeof n&&null!==n?function(e,t){const n=t.class,r=t.style;if(void 0!==n&&(e.className=n,delete t.class),r){if("string"==typeof r)e.setAttribute("style",r);else if("object"==typeof r)for(const t in r)e.style[t]=r[t];delete t.style}const s=o(t);for(let n=s.length-1;n>=0;n--){const o=s[n],r=t[o];o.startsWith("on:")?e.addEventListener(o.slice(1),r):"function"!=typeof r?(m[o]||p)(e,o,r):e.addEventListener(o,r)}void 0!==n&&(t.class=n),void 0!==r&&(t.style=r)}(e,n):t("attr must be an object/string.")}const y=(e,o="",r="")=>{"string"!=typeof e&&t("__func__ tagName must be a string.");const s=document.createElement(e);return b(s,o),function(e,t){n(t)?l.apply(e,t):"number"==typeof t?l.call(e,t.toString()):l.call(e,t)}(s,r),s};s(y,"h");const _={area:!0,audio:!0,base:!0,basefont:!0,br:!0,canvas:!0,datalist:!0,details:!0,dialog:!0,frameset:!0,head:!0,iframe:!0,img:!0,input:!0,link:!0,meta:!0,meter:!0,noembed:!0,noframes:!0,noscript:!0,optgroup:!0,param:!0,progress:!0,rp:!0,select:!0,style:!0,template:!0,textarea:!0,title:!0,video:!0,wbr:!0,embed:!0,frame:!0,keygen:!0,option:!0};return e.h=y,e.ktnull=u,e.notSupportTextNode=function(e){return _[e]},e}({});
|
package/dist/index.legacy.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var __ktjs_core__=function(e){"use strict";var t=function(e){throw new Error("kt.js: "
|
|
1
|
+
var __ktjs_core__=function(e){"use strict";var t=function(e){throw new Error("kt.js: "+e)},n=Array.isArray,r=Object.keys,o=Object.defineProperties,a=function(e,t){return o(e,{t:{value:t,configurable:!0}})},i=function(){return{}};"undefined"==typeof Promise&&(window.Promise={resolve:i,reject:i}),function(){var e,n="__ktjs__";if(!(n in window)){var r=Object.create(null);o(r,{throws:{value:t,enumerable:!0},defines:{value:o,enumerable:!0},mark:{value:a,enumerable:!0}}),o(window,((e={})[n]={value:r,enumerable:!0},e))}}();var u=Object.create(null),f=HTMLElement.prototype.appendChild,l=HTMLElement.prototype.append,c="function"==typeof l?function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var n=e.filter(function(e){return e!==u});return l.apply(this,n)}:function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(e.length<50)for(var n=0;n<e.length;n++){"string"==typeof(o=e[n])?f.call(this,document.createTextNode(o)):o!==u&&f.call(this,o)}else{var r=document.createDocumentFragment();for(n=0;n<e.length;n++){var o;"string"==typeof(o=e[n])?f.call(r,document.createTextNode(o)):o!==u&&f.call(r,o)}f.call(this,r)}};function s(e,t,n){t in e?e[t]=!!n:e.setAttribute(t,n)}function d(e,t,n){t in e?e[t]=n:e.setAttribute(t,n)}var v={checked:s,selected:s,value:d,valueAsDate:d,valueAsNumber:d,defaultValue:d,defaultChecked:s,defaultSelected:s,disabled:s,readOnly:s,multiple:s,required:s,autofocus:s,open:s,controls:s,autoplay:s,loop:s,muted:s,defer:s,async:s,hidden:function(e,t,n){e.hidden=!!n}},m=function(e,t,n){return e.setAttribute(t,n)};function p(e,n){"string"==typeof n?e.className=n:"object"==typeof n&&null!==n?function(e,t){var n=t.class,o=t.style;if(void 0!==n&&(e.className=n,delete t.class),o){if("string"==typeof o)e.setAttribute("style",o);else if("object"==typeof o)for(var a in o)e.style[a]=o[a];delete t.style}for(var i=r(t),u=i.length-1;u>=0;u--){var f=t[a=i[u]];a.startsWith("on:")?e.addEventListener(a.slice(1),f):"function"!=typeof f?(v[a]||m)(e,a,f):e.addEventListener(a,f)}void 0!==n&&(t.class=n),void 0!==o&&(t.style=o)}(e,n):t("attr must be an object/string.")}var b=function(e,r,o){void 0===r&&(r=""),void 0===o&&(o=""),"string"!=typeof e&&t("__func__ tagName must be a string.");var a=document.createElement(e);return p(a,r),function(e,t){n(t)?c.apply(e,t):"number"==typeof t?c.call(e,t.toString()):c.call(e,t)}(a,o),a};a(b,"h");var y={area:!0,audio:!0,base:!0,basefont:!0,br:!0,canvas:!0,datalist:!0,details:!0,dialog:!0,frameset:!0,head:!0,iframe:!0,img:!0,input:!0,link:!0,meta:!0,meter:!0,noembed:!0,noframes:!0,noscript:!0,optgroup:!0,param:!0,progress:!0,rp:!0,select:!0,style:!0,template:!0,textarea:!0,title:!0,video:!0,wbr:!0,embed:!0,frame:!0,keygen:!0,option:!0};return e.h=b,e.ktnull=u,e.notSupportTextNode=function(e){return y[e]},e}({});
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=e=>{throw new Error("kt.js: "
|
|
1
|
+
const e=e=>{throw new Error("kt.js: "+e)},t=Array.isArray,n=Object.keys,o=Object.defineProperties,r=(e,t)=>o(e,{t:{value:t,configurable:!0}}),i=()=>({});"undefined"==typeof Promise&&(window.Promise={resolve:i,reject:i}),(()=>{const t="__ktjs__";if(t in window)return;const n=Object.create(null);o(n,{throws:{value:e,enumerable:!0},defines:{value:o,enumerable:!0},mark:{value:r,enumerable:!0}}),o(window,{[t]:{value:n,enumerable:!0}})})();const s=Object.create(null),u=HTMLElement.prototype.appendChild,a=HTMLElement.prototype.append,c="function"==typeof a?function(...e){const t=e.filter(e=>e!==s);return a.apply(this,t)}:function(...e){if(e.length<50)for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n?u.call(this,document.createTextNode(n)):n!==s&&u.call(this,n)}else{const t=document.createDocumentFragment();for(let n=0;n<e.length;n++){const o=e[n];"string"==typeof o?u.call(t,document.createTextNode(o)):o!==s&&u.call(t,o)}u.call(this,t)}};function l(e,t,n){t in e?e[t]=!!n:e.setAttribute(t,n)}function f(e,t,n){t in e?e[t]=n:e.setAttribute(t,n)}const d={checked:l,selected:l,value:f,valueAsDate:f,valueAsNumber:f,defaultValue:f,defaultChecked:l,defaultSelected:l,disabled:l,readOnly:l,multiple:l,required:l,autofocus:l,open:l,controls:l,autoplay:l,loop:l,muted:l,defer:l,async:l,hidden:function(e,t,n){e.hidden=!!n}},m=function(e,t,n){return e.setAttribute(t,n)};function p(t,o){"string"==typeof o?t.className=o:"object"==typeof o&&null!==o?function(e,t){const o=t.class,r=t.style;if(void 0!==o&&(e.className=o,delete t.class),r){if("string"==typeof r)e.setAttribute("style",r);else if("object"==typeof r)for(const t in r)e.style[t]=r[t];delete t.style}const i=n(t);for(let n=i.length-1;n>=0;n--){const o=i[n],r=t[o];o.startsWith("on:")?e.addEventListener(o.slice(1),r):"function"!=typeof r?(d[o]||m)(e,o,r):e.addEventListener(o,r)}void 0!==o&&(t.class=o),void 0!==r&&(t.style=r)}(t,o):e("attr must be an object/string.")}const b=(n,o="",r="")=>{"string"!=typeof n&&e("__func__ tagName must be a string.");const i=document.createElement(n);return p(i,o),function(e,n){t(n)?c.apply(e,n):"number"==typeof n?c.call(e,n.toString()):c.call(e,n)}(i,r),i};r(b,"h");const y={area:!0,audio:!0,base:!0,basefont:!0,br:!0,canvas:!0,datalist:!0,details:!0,dialog:!0,frameset:!0,head:!0,iframe:!0,img:!0,input:!0,link:!0,meta:!0,meter:!0,noembed:!0,noframes:!0,noscript:!0,optgroup:!0,param:!0,progress:!0,rp:!0,select:!0,style:!0,template:!0,textarea:!0,title:!0,video:!0,wbr:!0,embed:!0,frame:!0,keygen:!0,option:!0};function g(e){return y[e]}export{b as h,s as ktnull,g as notSupportTextNode};
|