mirror of
https://github.com/jaandrle/deka-dom-el
synced 2024-11-24 17:39:36 +01:00
🚚
This commit is contained in:
parent
dfcb98bfbe
commit
9c5ac96ab8
13
jsdom.js
13
jsdom.js
@ -1,3 +1,4 @@
|
|||||||
|
//TODO: https://www.npmjs.com/package/html-element
|
||||||
import { prop_process } from './src/dom-common.js';
|
import { prop_process } from './src/dom-common.js';
|
||||||
const { setDelete }= prop_process;
|
const { setDelete }= prop_process;
|
||||||
/** @param {HTMLElement} obj */
|
/** @param {HTMLElement} obj */
|
||||||
@ -8,9 +9,16 @@ prop_process.setDelete= function(obj, prop, value){
|
|||||||
};
|
};
|
||||||
const keys= [ "HTMLElement", "SVGElement", "DocumentFragment", "MutationObserver", "document" ];
|
const keys= [ "HTMLElement", "SVGElement", "DocumentFragment", "MutationObserver", "document" ];
|
||||||
let dom_last;
|
let dom_last;
|
||||||
|
|
||||||
|
export let namespace;
|
||||||
|
export let createElement;
|
||||||
export let el;
|
export let el;
|
||||||
export let assign;
|
export let assign;
|
||||||
|
export let classListDeclarative;
|
||||||
|
export let empty;
|
||||||
export let on;
|
export let on;
|
||||||
|
export let dispatchEvent;
|
||||||
|
|
||||||
export async function register(dom, keys_aditional= []){
|
export async function register(dom, keys_aditional= []){
|
||||||
if(dom_last===dom)
|
if(dom_last===dom)
|
||||||
return import("./index.js");
|
return import("./index.js");
|
||||||
@ -22,9 +30,14 @@ export async function register(dom, keys_aditional= []){
|
|||||||
w.console= globalThis.console;
|
w.console= globalThis.console;
|
||||||
|
|
||||||
const m= await import("./index.js");
|
const m= await import("./index.js");
|
||||||
|
namespace= m.namespace;
|
||||||
|
createElement= m.createElement;
|
||||||
el= m.el;
|
el= m.el;
|
||||||
assign= m.assign;
|
assign= m.assign;
|
||||||
|
classListDeclarative= m.classListDeclarative;
|
||||||
|
empty= m.empty;
|
||||||
on= m.on;
|
on= m.on;
|
||||||
|
dispatchEvent= m.dispatchEvent;
|
||||||
return m;
|
return m;
|
||||||
}
|
}
|
||||||
export function unregister(){
|
export function unregister(){
|
||||||
|
25
package.json
25
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "deka-dom-el",
|
"name": "deka-dom-el",
|
||||||
"version": "0.1.3",
|
"version": "0.2.0",
|
||||||
"description": "A low-code library that simplifies the creation of native DOM elements/components using small wrappers and tweaks.",
|
"description": "A low-code library that simplifies the creation of native DOM elements/components using small wrappers and tweaks.",
|
||||||
"author": "Jan Andrle <andrle.jan@centrum.cz>",
|
"author": "Jan Andrle <andrle.jan@centrum.cz>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
@ -16,6 +16,10 @@
|
|||||||
"types": "./index.d.ts",
|
"types": "./index.d.ts",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
".": {
|
||||||
|
"import": "./index.js",
|
||||||
|
"types": "./index.d.ts"
|
||||||
|
},
|
||||||
"./jsdom": {
|
"./jsdom": {
|
||||||
"import": "./jsdom.js",
|
"import": "./jsdom.js",
|
||||||
"types": "./jsdom.d.ts"
|
"types": "./jsdom.d.ts"
|
||||||
@ -24,24 +28,11 @@
|
|||||||
"import": "./signals.js",
|
"import": "./signals.js",
|
||||||
"types": "./signals.d.ts"
|
"types": "./signals.d.ts"
|
||||||
},
|
},
|
||||||
"./signals-lib": {
|
"./src/signals-lib": {
|
||||||
"import": "./src/signals-lib.js",
|
"import": "./src/signals-lib.js",
|
||||||
"types": "./src/signals.d.ts"
|
"types": "./src/signals.d.ts"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"typesVersions": {
|
|
||||||
"*": {
|
|
||||||
"./jsdom": [
|
|
||||||
"./jsdom.d.ts"
|
|
||||||
],
|
|
||||||
"./signals": [
|
|
||||||
"./signals.d.ts"
|
|
||||||
],
|
|
||||||
"./signals-lib": [
|
|
||||||
"./src/signals.d.ts"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"files": [
|
"files": [
|
||||||
"*.js",
|
"*.js",
|
||||||
"*.d.ts",
|
"*.d.ts",
|
||||||
@ -70,12 +61,12 @@
|
|||||||
"gzip": false
|
"gzip": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./src/signals.js",
|
"path": "./signals.js",
|
||||||
"limit": "4 kB",
|
"limit": "4 kB",
|
||||||
"gzip": false
|
"gzip": false
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./src/jsdom.js",
|
"path": "./jsdom.js",
|
||||||
"limit": "8 kB",
|
"limit": "8 kB",
|
||||||
"gzip": false
|
"gzip": false
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user