ziko 0.0.20 → 0.0.21

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/ziko.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  /*
3
3
  Project: ziko.js
4
4
  Author: Zakaria Elalaoui
5
- Date : Sat Nov 16 2024 22:09:26 GMT+0100 (UTC+01:00)
5
+ Date : Sun Dec 08 2024 12:19:40 GMT+0100 (UTC+01:00)
6
6
  Git-Repo : https://github.com/zakarialaoui10/ziko.js
7
7
  Git-Wiki : https://github.com/zakarialaoui10/ziko.js/wiki
8
8
  Released under MIT License
@@ -27,36 +27,46 @@ const __RemoveAll__ =(obj)=> {
27
27
  }
28
28
  };
29
29
 
30
- const { PI, E } = Math;
30
+ const { PI: PI$1, E } = Math;
31
31
  const EPSILON=Number.EPSILON;
32
32
 
33
33
  var __Const__ = /*#__PURE__*/Object.freeze({
34
34
  __proto__: null,
35
35
  E: E,
36
36
  EPSILON: EPSILON,
37
- PI: PI
37
+ PI: PI$1
38
38
  });
39
39
 
40
- const Fixed={
41
- cos:x=>+Math.cos(x).toFixed(15),
42
- sin:x=>+Math.sin(x).toFixed(15),
43
- tan:x=>+Math.tan(x).toFixed(31),
44
- sinc:x=>+Math.sin(Math.PI*x)/(Math.PI*x),
45
- sec:x=>+1/Math.cos(x).toFixed(15),
46
- csc:x=>+1/Math.sin(x).toFixed(15),
47
- cot:x=>+1/Math.tan(x).toFixed(15),
48
- acos:x=>+Math.acos(x).toFixed(15),
49
- asin:x=>+Math.asin(x).toFixed(15),
50
- atan:x=>+Math.atan(x).toFixed(15),
51
- acot:x=>+Math.PI/2-Math.atan(x).toFixed(15),
52
- cosh:x=>+Math.cosh(x).toFixed(15),
53
- sinh:x=>+Math.sinh(x).toFixed(15),
54
- tanh:x=>+Math.tanh(x).toFixed(15),
55
- coth:n=>+(1/2*Math.log((1+n)/(1-n))).toFixed(15),
56
- acosh:x=>+Math.acosh(x).toFixed(15),
57
- asinh:x=>+Math.asinh(x).toFixed(15),
58
- atanh:x=>+Math.atanh(x).toFixed(15),
59
- };
40
+ const {PI, cos: cos$1, sin: sin$1, tan: tan$1, acos: acos$1, asin: asin$1, atan: atan$1, cosh: cosh$1, sinh: sinh$1, tanh: tanh$1, acosh: acosh$1, asinh: asinh$1, atanh: atanh$1, log} = Math;
41
+ let Fixed={
42
+ cos: cos$1,
43
+ sin: sin$1,
44
+ tan: tan$1,
45
+ sinc: x => sin$1(PI*x)/(PI*x),
46
+ sec: x => 1/cos$1(x),
47
+ csc: x => 1/sin$1(x),
48
+ cot: x => 1/tan$1(x),
49
+ acos: acos$1,
50
+ asin: asin$1,
51
+ atan: atan$1,
52
+ acot: x => PI/2-atan$1(x),
53
+ cosh: cosh$1,
54
+ sinh: sinh$1,
55
+ tanh: tanh$1,
56
+ coth: n => (1/2*log((1+n)/(1-n))),
57
+ acosh: acosh$1,
58
+ asinh: asinh$1,
59
+ atanh: atanh$1,
60
+ };
61
+
62
+ Fixed = new Proxy(Fixed, {
63
+ get(target, prop) {
64
+ if(prop in target){
65
+ return x => + target[prop](x).toFixed(15);
66
+ }
67
+ return undefined;
68
+ }
69
+ });
60
70
 
61
71
  class ZikoMath {}
62
72
 
@@ -100,8 +110,9 @@ const mapfun$1=(fun,...X)=>{
100
110
  default : return fun(x)
101
111
  }
102
112
  }
103
- else if(x instanceof Object)return Object.fromEntries(Object.entries(x).map(n=>n=[n[0],mapfun$1(fun,n[1])]))
104
-
113
+ else if(x instanceof Object){
114
+ return fun(Object) || Object.fromEntries(Object.entries(x).map(n=>n=[n[0],mapfun$1(fun,n[1])]))
115
+ }
105
116
  });
106
117
  return Y.length==1?Y[0]:Y;
107
118
  };
@@ -4839,7 +4850,7 @@ class ZikoUIElement {
4839
4850
  if(typeof element === "string") {
4840
4851
  element === "svg" ? element=globalThis?.document?.createElementNS("http://www.w3.org/2000/svg", "svg"): element = globalThis?.document?.createElement(element);
4841
4852
  }
4842
- if(element)this.element = element;
4853
+ if(element)this.__ele__ = element;
4843
4854
  this.uuid=this.constructor.name+"-"+Random.string(10);
4844
4855
  this.cache = {
4845
4856
  name,
@@ -4875,14 +4886,17 @@ class ZikoUIElement {
4875
4886
  this.style({
4876
4887
  position: "relative",
4877
4888
  boxSizing:"border-box",
4878
- // fontFamily:"verdana",
4879
4889
  margin:0,
4880
4890
  padding:0,
4881
4891
  });
4892
+ this.items = [];
4882
4893
  this.size("auto", "auto");
4883
4894
  globalThis.__Ziko__.__UI__[this.cache.name]?globalThis.__Ziko__.__UI__[this.cache.name]?.push(this):globalThis.__Ziko__.__UI__[this.cache.name]=[this];
4884
4895
  element && globalThis.__Ziko__.__Config__.default.render && this.render();
4885
4896
  }
4897
+ get element(){
4898
+ return this.__ele__
4899
+ }
4886
4900
  get isZikoUIElement(){
4887
4901
  return true
4888
4902
  }
@@ -4904,15 +4918,6 @@ class ZikoUIElement {
4904
4918
  get isBody(){
4905
4919
  return this.element === globalThis?.document.body;
4906
4920
  }
4907
- get __app__(){
4908
- if(this.cache.isRoot)return this;
4909
- let root=this.cache.parent;
4910
- while(1){
4911
- if(!root)return null;
4912
- if(root.cache.isRoot)return root;
4913
- root=root.parent;
4914
- }
4915
- }
4916
4921
  get parent(){
4917
4922
  return this.cache.parent;
4918
4923
  }
@@ -4952,6 +4957,120 @@ class ZikoUIElement {
4952
4957
  this.st.size(width,height);
4953
4958
  return this;
4954
4959
  }
4960
+ maintain() {
4961
+ for (let i = 0; i < this.items.length; i++)
4962
+ Object.assign(this, { [[i]]: this.items[i] });
4963
+ this.length = this.items.length;
4964
+ return this;
4965
+ }
4966
+ at(index) {
4967
+ return this.items.at(index);
4968
+ }
4969
+ #addItem(adder, pusher, ...ele) {
4970
+ if (this.cache.isFrozzen) {
4971
+ console.warn("You can't append new item to frozzen element");
4972
+ return this;
4973
+ }
4974
+ for (let i = 0; i < ele.length; i++) {
4975
+ if (["number", "string"].includes(typeof ele[i])) ele[i] = text(ele[i]);
4976
+ if (ele[i] instanceof ZikoUIElement) {
4977
+ ele[i].cache.parent = this;
4978
+ this.element[adder](ele[i].element);
4979
+ ele[i].target = this.element;
4980
+ this.items[pusher](ele[i]);
4981
+ } else if (ele[i] instanceof Object) {
4982
+ if (ele[i]?.style) this.style(ele[i]?.style);
4983
+ if (ele[i]?.attr) {
4984
+ Object.entries(ele[i].attr).forEach((n) =>
4985
+ this.setAttr("" + n[0], n[1]),
4986
+ );
4987
+ }
4988
+ }
4989
+ }
4990
+ this.maintain();
4991
+ return this;
4992
+ }
4993
+ append(...ele) {
4994
+ this.#addItem("append", "push", ...ele);
4995
+ return this;
4996
+ }
4997
+ prepend(...ele) {
4998
+ this.#addItem("prepend", "unshift", ...ele);
4999
+ return this;
5000
+ }
5001
+ insertAt(index, ...ele) {
5002
+ if (index >= this.element.children.length) this.append(...ele);
5003
+ else
5004
+ for (let i = 0; i < ele.length; i++) {
5005
+ if (["number", "string"].includes(typeof ele[i])) ele[i] = text(ele[i]);
5006
+ this.element?.insertBefore(ele[i].element, this.items[index].element);
5007
+ this.items.splice(index, 0, ele[i]);
5008
+ }
5009
+ return this;
5010
+ }
5011
+ remove(...ele) {
5012
+ const remove = (ele) => {
5013
+ if (typeof ele === "number") ele = this.items[ele];
5014
+ if (ele instanceof ZikoUIElement) this.element?.removeChild(ele.element);
5015
+ this.items = this.items.filter((n) => n !== ele);
5016
+ };
5017
+ for (let i = 0; i < ele.length; i++) remove(ele[i]);
5018
+ for (let i = 0; i < this.items.length; i++)
5019
+ Object.assign(this, { [[i]]: this.items[i] });
5020
+ // Remove from item
5021
+ return this;
5022
+ }
5023
+ forEach(callback) {
5024
+ this.items.forEach(callback);
5025
+ return this;
5026
+ }
5027
+ map(callback) {
5028
+ return this.items.map(callback);
5029
+ }
5030
+ find(condition) {
5031
+ return this.items.filter(condition);
5032
+ }
5033
+ filter(condition_callback, if_callback = () => {}, else_callback = () => {}) {
5034
+ const FilterItems = this.items.filter(condition_callback);
5035
+ FilterItems.forEach(if_callback);
5036
+ this.items
5037
+ .filter((item) => !FilterItems.includes(item))
5038
+ .forEach(else_callback);
5039
+ return this;
5040
+ }
5041
+ filterByTextContent(text, exactMatch = false) {
5042
+ this.items.forEach((n) => n.render());
5043
+ this.filter(
5044
+ (n) => !(exactMatch ? n.text === text : n.text.includes(text)),
5045
+ (e) => e.unrender(),
5046
+ );
5047
+ // this.items.filter(n=>{
5048
+ // const content=n.element.textContent;
5049
+ // return !(exactMatch?content===text:content.includes(text))
5050
+ // }).map(n=>n.unrender());
5051
+ // return this;
5052
+ }
5053
+ filterByClass(value) {
5054
+ this.items.map((n) => n.render());
5055
+ this.items
5056
+ .filter((n) => !n.classes.includes(value))
5057
+ .map((n) => n.unrender());
5058
+ return this;
5059
+ }
5060
+ sortByTextContent(value, displays) {
5061
+ let item = this.children;
5062
+ item
5063
+ .filter((n) => !n.textContent.toLowerCase().includes(value.toLowerCase()))
5064
+ .map((n) => {
5065
+ n.style.display = "none";
5066
+ });
5067
+ item
5068
+ .filter((n) => n.textContent.toLowerCase().includes(value.toLowerCase()))
5069
+ .map((n, i) => (n.style.display = displays[i]));
5070
+ //return item.filter(n=>n.style.display!="none")
5071
+ item.filter((n) => n.style.display != "none");
5072
+ return this;
5073
+ }
4955
5074
  get #SwitchedStyleRTL_LTR(){
4956
5075
  const CalculedStyle = globalThis.getComputedStyle(this.element);
4957
5076
  const SwitchedStyle = {};
@@ -5307,161 +5426,120 @@ class ZikoUIContainerElement extends ZikoUIElement {
5307
5426
  super(element, name);
5308
5427
  this.items = [];
5309
5428
  }
5310
- maintain() {
5311
- for (let i = 0; i < this.items.length; i++)
5312
- Object.assign(this, { [[i]]: this.items[i] });
5313
- this.length = this.items.length;
5314
- return this;
5315
- }
5316
- at(index) {
5317
- return this.items.at(index);
5318
- }
5319
- #addItem(adder, pusher, ...ele) {
5320
- if (this.cache.isFrozzen) {
5321
- console.warn("You can't append new item to frozzen element");
5322
- return this;
5323
- }
5324
- for (let i = 0; i < ele.length; i++) {
5325
- if (["number", "string"].includes(typeof ele[i])) ele[i] = text$1(ele[i]);
5326
- if (ele[i] instanceof ZikoUIElement) {
5327
- ele[i].cache.parent = this;
5328
- this.element[adder](ele[i].element);
5329
- ele[i].target = this.element;
5330
- this.items[pusher](ele[i]);
5331
- } else if (ele[i] instanceof Object) {
5332
- if (ele[i]?.style) this.style(ele[i]?.style);
5333
- if (ele[i]?.attr) {
5334
- Object.entries(ele[i].attr).forEach((n) =>
5335
- this.setAttr("" + n[0], n[1]),
5336
- );
5337
- }
5338
- }
5339
- }
5340
- this.maintain();
5341
- return this;
5342
- }
5343
- append(...ele) {
5344
- this.#addItem("append", "push", ...ele);
5345
- return this;
5346
- }
5347
- prepend(...ele) {
5348
- this.#addItem("prepend", "unshift", ...ele);
5349
- return this;
5350
- }
5351
- // append(...ele) {
5352
- // if(this.cache.isFrozzen){
5353
- // console.warn("You can't append new item to frozzen element");
5354
- // return this;
5355
- // }
5356
- // for (let i = 0; i < ele.length; i++){
5357
- // if(["number","string"].includes(typeof ele[i]))ele[i]=text(ele[i]);
5358
- // if (ele[i] instanceof ZikoUIElement) {
5359
- // ele[i].cache.parent=this;
5360
- // this.element?.appendChild(ele[i].element);
5361
- // ele[i].target = this.element;
5362
- // this.items.push(ele[i]);
5363
- // } else if (ele[i] instanceof Object) {
5364
- // if (ele[i]?.style) this.style(ele[i]?.style);
5365
- // if (ele[i]?.attr) {
5366
- // Object.entries(ele[i].attr).forEach((n) =>
5367
- // this.setAttr("" + n[0], n[1]),
5368
- // );
5369
- // }
5429
+ // maintain() {
5430
+ // for (let i = 0; i < this.items.length; i++)
5431
+ // Object.assign(this, { [[i]]: this.items[i] });
5432
+ // this.length = this.items.length;
5433
+ // return this;
5434
+ // }
5435
+ // at(index) {
5436
+ // return this.items.at(index);
5437
+ // }
5438
+ // #addItem(adder, pusher, ...ele) {
5439
+ // if (this.cache.isFrozzen) {
5440
+ // console.warn("You can't append new item to frozzen element");
5441
+ // return this;
5442
+ // }
5443
+ // for (let i = 0; i < ele.length; i++) {
5444
+ // if (["number", "string"].includes(typeof ele[i])) ele[i] = text(ele[i]);
5445
+ // if (ele[i] instanceof ZikoUIElement) {
5446
+ // ele[i].cache.parent = this;
5447
+ // this.element[adder](ele[i].element);
5448
+ // ele[i].target = this.element;
5449
+ // this.items[pusher](ele[i]);
5450
+ // } else if (ele[i] instanceof Object) {
5451
+ // if (ele[i]?.style) this.style(ele[i]?.style);
5452
+ // if (ele[i]?.attr) {
5453
+ // Object.entries(ele[i].attr).forEach((n) =>
5454
+ // this.setAttr("" + n[0], n[1]),
5455
+ // );
5370
5456
  // }
5371
5457
  // }
5372
- // this.maintain();
5373
- // return this;
5374
5458
  // }
5375
- insertAt(index, ...ele) {
5376
- if (index >= this.element.children.length) this.append(...ele);
5377
- else
5378
- for (let i = 0; i < ele.length; i++) {
5379
- if (["number", "string"].includes(typeof ele[i])) ele[i] = text$1(ele[i]);
5380
- this.element?.insertBefore(ele[i].element, this.items[index].element);
5381
- this.items.splice(index, 0, ele[i]);
5382
- }
5383
- return this;
5384
- }
5459
+ // this.maintain();
5460
+ // return this;
5461
+ // }
5462
+ // append(...ele) {
5463
+ // this.#addItem("append", "push", ...ele);
5464
+ // return this;
5465
+ // }
5466
+ // prepend(...ele) {
5467
+ // this.#addItem("prepend", "unshift", ...ele);
5468
+ // return this;
5469
+ // }
5470
+ // insertAt(index, ...ele) {
5471
+ // if (index >= this.element.children.length) this.append(...ele);
5472
+ // else
5473
+ // for (let i = 0; i < ele.length; i++) {
5474
+ // if (["number", "string"].includes(typeof ele[i])) ele[i] = text(ele[i]);
5475
+ // this.element?.insertBefore(ele[i].element, this.items[index].element);
5476
+ // this.items.splice(index, 0, ele[i]);
5477
+ // }
5478
+ // return this;
5479
+ // }
5385
5480
  // remove(...ele) {
5386
- // if(ele.length==0){
5387
- // if(this.cache.parent)this.cache.parent.remove(this);
5388
- // else if(this.target.children.length && [...this.target.children].includes(this.element)) this.target.removeChild(this.element);
5389
- // }
5390
- // else {
5391
- // const remove = (ele) => {
5392
- // if(typeof ele === "number") ele=this.items[ele];
5393
- // if(ele instanceof ZikoUIElement)this.element?.removeChild(ele.element);
5394
- // this.items=this.items.filter(n=>n!==ele);
5395
- // };
5396
- // for (let i = 0; i < ele.length; i++) remove(ele[i]);
5397
- // for (let i = 0; i < this.items.length; i++)Object.assign(this, { [[i]]: this.items[i] });
5398
- // // Remove from item
5399
- // }
5481
+ // const remove = (ele) => {
5482
+ // if (typeof ele === "number") ele = this.items[ele];
5483
+ // if (ele instanceof ZikoUIElement) this.element?.removeChild(ele.element);
5484
+ // this.items = this.items.filter((n) => n !== ele);
5485
+ // };
5486
+ // for (let i = 0; i < ele.length; i++) remove(ele[i]);
5487
+ // for (let i = 0; i < this.items.length; i++)
5488
+ // Object.assign(this, { [[i]]: this.items[i] });
5489
+ // // Remove from item
5490
+ // return this;
5491
+ // }
5492
+ // forEach(callback) {
5493
+ // this.items.forEach(callback);
5494
+ // return this;
5495
+ // }
5496
+ // map(callback) {
5497
+ // return this.items.map(callback);
5498
+ // }
5499
+ // find(condition) {
5500
+ // return this.items.filter(condition);
5501
+ // }
5502
+ // filter(condition_callback, if_callback = () => {}, else_callback = () => {}) {
5503
+ // const FilterItems = this.items.filter(condition_callback);
5504
+ // FilterItems.forEach(if_callback);
5505
+ // this.items
5506
+ // .filter((item) => !FilterItems.includes(item))
5507
+ // .forEach(else_callback);
5508
+ // return this;
5509
+ // }
5510
+ // filterByTextContent(text, exactMatch = false) {
5511
+ // this.items.forEach((n) => n.render());
5512
+ // this.filter(
5513
+ // (n) => !(exactMatch ? n.text === text : n.text.includes(text)),
5514
+ // (e) => e.unrender(),
5515
+ // );
5516
+ // // this.items.filter(n=>{
5517
+ // // const content=n.element.textContent;
5518
+ // // return !(exactMatch?content===text:content.includes(text))
5519
+ // // }).map(n=>n.unrender());
5520
+ // // return this;
5521
+ // }
5522
+ // filterByClass(value) {
5523
+ // this.items.map((n) => n.render());
5524
+ // this.items
5525
+ // .filter((n) => !n.classes.includes(value))
5526
+ // .map((n) => n.unrender());
5527
+ // return this;
5528
+ // }
5529
+ // sortByTextContent(value, displays) {
5530
+ // let item = this.children;
5531
+ // item
5532
+ // .filter((n) => !n.textContent.toLowerCase().includes(value.toLowerCase()))
5533
+ // .map((n) => {
5534
+ // n.style.display = "none";
5535
+ // });
5536
+ // item
5537
+ // .filter((n) => n.textContent.toLowerCase().includes(value.toLowerCase()))
5538
+ // .map((n, i) => (n.style.display = displays[i]));
5539
+ // //return item.filter(n=>n.style.display!="none")
5540
+ // item.filter((n) => n.style.display != "none");
5400
5541
  // return this;
5401
5542
  // }
5402
- remove(...ele) {
5403
- const remove = (ele) => {
5404
- if (typeof ele === "number") ele = this.items[ele];
5405
- if (ele instanceof ZikoUIElement) this.element?.removeChild(ele.element);
5406
- this.items = this.items.filter((n) => n !== ele);
5407
- };
5408
- for (let i = 0; i < ele.length; i++) remove(ele[i]);
5409
- for (let i = 0; i < this.items.length; i++)
5410
- Object.assign(this, { [[i]]: this.items[i] });
5411
- // Remove from item
5412
- return this;
5413
- }
5414
- forEach(callback) {
5415
- this.items.forEach(callback);
5416
- return this;
5417
- }
5418
- map(callback) {
5419
- return this.items.map(callback);
5420
- }
5421
- find(condition) {
5422
- return this.items.filter(condition);
5423
- }
5424
- filter(condition_callback, if_callback = () => {}, else_callback = () => {}) {
5425
- const FilterItems = this.items.filter(condition_callback);
5426
- FilterItems.forEach(if_callback);
5427
- this.items
5428
- .filter((item) => !FilterItems.includes(item))
5429
- .forEach(else_callback);
5430
- return this;
5431
- }
5432
- filterByTextContent(text, exactMatch = false) {
5433
- this.items.forEach((n) => n.render());
5434
- this.filter(
5435
- (n) => !(exactMatch ? n.text === text : n.text.includes(text)),
5436
- (e) => e.unrender(),
5437
- );
5438
- // this.items.filter(n=>{
5439
- // const content=n.element.textContent;
5440
- // return !(exactMatch?content===text:content.includes(text))
5441
- // }).map(n=>n.unrender());
5442
- // return this;
5443
- }
5444
- filterByClass(value) {
5445
- this.items.map((n) => n.render());
5446
- this.items
5447
- .filter((n) => !n.classes.includes(value))
5448
- .map((n) => n.unrender());
5449
- return this;
5450
- }
5451
- sortByTextContent(value, displays) {
5452
- let item = this.children;
5453
- item
5454
- .filter((n) => !n.textContent.toLowerCase().includes(value.toLowerCase()))
5455
- .map((n) => {
5456
- n.style.display = "none";
5457
- });
5458
- item
5459
- .filter((n) => n.textContent.toLowerCase().includes(value.toLowerCase()))
5460
- .map((n, i) => (n.style.display = displays[i]));
5461
- //return item.filter(n=>n.style.display!="none")
5462
- item.filter((n) => n.style.display != "none");
5463
- return this;
5464
- }
5465
5543
  }
5466
5544
 
5467
5545
  class __ZikoUIText__ extends ZikoUIContainerElement {
@@ -6130,6 +6208,53 @@ class ZikoUISVGWrapper extends ZikoUIXMLWrapper{
6130
6208
  const HTMLWrapper = (HTMLContent) => new ZikoUIHTMLWrapper(HTMLContent);
6131
6209
  const SVGWrapper = (SVGContent) => new ZikoUISVGWrapper(SVGContent);
6132
6210
 
6211
+ // function loadComponent() {
6212
+ // return new Promise((resolve) => {
6213
+ // setTimeout(() => {
6214
+ // resolve(p(1000))
6215
+ // }, 500);
6216
+ // });
6217
+ // }
6218
+
6219
+ // Suspense(p("Loading ..."),()=>fetch('https://jsonplaceholder.typicode.com/todos/1')
6220
+ // .then(response => response.json())
6221
+ // .then(json => h2(json.title)))
6222
+
6223
+
6224
+
6225
+ class ZikoUISuspense extends ZikoUIElement{
6226
+ constructor(fallback_ui, callback){
6227
+ super("div", "suspense");
6228
+ this.setAttr({
6229
+ dataTemp : "suspense"
6230
+ });
6231
+ this.fallback_ui = fallback_ui;
6232
+ this.append(fallback_ui);
6233
+ (async ()=>{
6234
+ try{
6235
+ const ui = await callback();
6236
+ fallback_ui.unrender();
6237
+ this.append(ui);
6238
+ // console.log(content)
6239
+ }
6240
+ catch(error){
6241
+ console.log({error});
6242
+ }
6243
+ })();
6244
+ }
6245
+ }
6246
+
6247
+ const Suspense = (fallback_ui, callback) => new ZikoUISuspense(fallback_ui, callback);
6248
+
6249
+ function h(tag, attributes = {}, ...children){
6250
+ const {name, style, ...attrs} = attributes;
6251
+ let element = new ZikoUIElement(tag,name);
6252
+ style && element.style(style);
6253
+ attrs && element.setAttr(attrs);
6254
+ children && element.append(...children);
6255
+ return element
6256
+ }
6257
+
6133
6258
  class ZikoUIHtmlTag extends ZikoUIContainerElement {
6134
6259
  constructor(element) {
6135
6260
  super(element,"html");
@@ -6220,16 +6345,19 @@ var Misc = /*#__PURE__*/Object.freeze({
6220
6345
  __proto__: null,
6221
6346
  HTMLWrapper: HTMLWrapper,
6222
6347
  SVGWrapper: SVGWrapper,
6348
+ Suspense: Suspense,
6223
6349
  ZikoUIBr: ZikoUIBr,
6224
6350
  ZikoUIHTMLWrapper: ZikoUIHTMLWrapper,
6225
6351
  ZikoUIHr: ZikoUIHr,
6226
6352
  ZikoUIHtmlTag: ZikoUIHtmlTag,
6227
6353
  ZikoUILink: ZikoUILink,
6228
6354
  ZikoUISVGWrapper: ZikoUISVGWrapper,
6355
+ ZikoUISuspense: ZikoUISuspense,
6229
6356
  ZikoUIXMLWrapper: ZikoUIXMLWrapper,
6230
6357
  br: br,
6231
6358
  brs: brs,
6232
6359
  btn: btn,
6360
+ h: h,
6233
6361
  hr: hr,
6234
6362
  hrs: hrs,
6235
6363
  html: html,
@@ -11610,4 +11738,4 @@ function RemoveAll(){
11610
11738
  Data.RemoveAll();
11611
11739
  }
11612
11740
 
11613
- export { Accordion, App$1 as App, Article, Aside, Base, Breadcrumbs, Canvas, Carousel, CodeCell, CodeNote, Collapsible, Combinaison, Complex, E, EPSILON, Ease, FileBasedRouting, Flex$1 as Flex, Footer, Form, Grid$1 as Grid, HTMLWrapper, Header, LinearSystem, Logic$1 as Logic, Main, Matrix, Modal, Nav, PI, Permutation, Random, SPA, SVGWrapper, Section, Slider, Splitter, Str, Svg, Table$1 as Table, Tabs, Utils$1 as Utils, ZikoApp, ZikoCustomEvent, ZikoEvent, ZikoEventClick, ZikoEventClipboard, ZikoEventHash, ZikoEventInput, ZikoEventKey, ZikoEventMouse, ZikoEventPointer, ZikoEventSwipe, ZikoEventWheel, ZikoHead$1 as ZikoHead, ZikoJsonStyleSheet, ZikoMutationObserver, ZikoSPA, ZikoSvgCircle, ZikoSvgEllipse, ZikoSvgForeignObject, ZikoSvgGroupe, ZikoSvgImage, ZikoSvgLine, ZikoSvgLink, ZikoSvgPath, ZikoSvgRectangle, ZikoSvgText, ZikoUIAbbrText, ZikoUIAccordion, ZikoUIArticle, ZikoUIAside, ZikoUIAudio, ZikoUIBlockQuote, ZikoUIBr, ZikoUIBreadcrumbs, ZikoUICanvas, ZikoUICodeNote, ZikoUICodeText, ZikoUIContainerElement, ZikoUIDefintion, ZikoUIElement, ZikoUIFigure, ZikoUIFlex$1 as ZikoUIFlex, ZikoUIFooter, ZikoUIForm, ZikoUIGrid, ZikoUIHTMLWrapper, ZikoUIHeader, ZikoUIHeading, ZikoUIHorizontalSlider, ZikoUIHorizontalSplitter, ZikoUIHr, ZikoUIHtmlTag, ZikoUIImage, ZikoUIInput, ZikoUIInputCheckbox, ZikoUIInputColor, ZikoUIInputDatalist$1 as ZikoUIInputDatalist, ZikoUIInputDate, ZikoUIInputDateTime, ZikoUIInputEmail, ZikoUIInputImage, ZikoUIInputNumber, ZikoUIInputOption, ZikoUIInputPassword, ZikoUIInputRadio, ZikoUIInputSearch, ZikoUIInputSlider$1 as ZikoUIInputSlider, ZikoUIInputTime, ZikoUILabel, ZikoUILink, ZikoUIMain, ZikoUIMenu3d, ZikoUIModal, ZikoUINav, ZikoUIParagraphe, ZikoUIQuote, ZikoUISVGWrapper, ZikoUISection, ZikoUISelect, ZikoUISubText, ZikoUISupText, ZikoUISvg, ZikoUIText, ZikoUITextArea, ZikoUIVerticalSlider, ZikoUIVerticalSplitter, ZikoUIVideo, ZikoUIXMLWrapper, ZikoUseRoot, ZikoUseStyle, __Config__, __UI__, abbrText, abs, accum, acos, acosh, acot, add, adoc2html, arange, arr2str, asin, asinh, atan, atan2, atanh, audio, bessel, beta, blockQuote, br, brs, btn, canvasArc, canvasCircle, canvasLine, canvasPoints, canvasRect, cartesianProduct, ceil, checkbox, choleskyDecomposition, clamp, codeText, combinaison, complex, cos, cosh, cot, coth, count, countWords, csc, csv2arr, csv2json, csv2matrix, csv2object, csv2sql, dangerAlert, datalist, Ziko as default, defineParamsGetter, deg2rad, dfnText, div, e, fact, figure, floor, gamma, geomspace, h1, h2, h3, h4, h5, h6, hSlider, hSplitter, hr, hrs, html, hypot, image, inRange, infoAlert, input, inputCamera, inputColor, inputDate, inputDateTime, inputEmail, inputImage, inputNumber, inputPassword, inputTime, isApproximatlyEqual, json2arr, json2css, json2csv, json2csvFile, json2xml, json2xmlFile, json2yml, json2ymlFile, jsonStyleSheet, lerp, li, link, linspace, ln, logspace, luDecomposition, map, mapfun$1 as mapfun, markdown2html, matrix, matrix2, matrix3, matrix4, max, menu3d, min, modulo, mul, norm, nums, obj2str, ol, ones, p, pgcd, pow, powerSet, ppcm, preload, prod, qrDecomposition, quote, rad2deg, radio, removeExtraSpace, round, search, sec, select, sig, sign, sin, sinc, sinh, slider, sqrt, sqrtn, str, sub, subSet, subText, successAlert, sum, supText, svg2ascii, svg2img, svg2imgUrl, svg2str, svgCircle, svgEllipse, svgGrid, svgGroupe, svgImage, svgLine, svgLink, svgObject, svgPath, svgPolygon, svgRect, svgText, tan, tanh, text$1 as text, textarea, timeTaken, time_memory_Taken, ul, useAnimation, useBattery, useChannel$1 as useChannel, useClickEvent, useClipboardEvent, useCustomEvent, useDebounce, useDragEvent, useDropEvent, useEventEmitter, useFavIcon$1 as useFavIcon, useFocusEvent, useFps, useGeolocation, useHashEvent, useHead$1 as useHead, useInputEvent, useKeyEvent, useLocaleStorage, useMediaQuery, useMeta$1 as useMeta, useMouseEvent, usePointerEvent, useRoot, useRootValue, useSessionStorage, useStyle, useSuccesifKeys, useSwipeEvent, useThread, useThrottle, useTimeLoop, useTitle$1 as useTitle, useType, useWheelEvent, vSlider, vSplitter, video, wait, waitForUIElm, waitForUIElmSync, warningAlert, watch, watchAttr, watchChildren, watchIntersection, watchScreen, watchSize, zeros };
11741
+ export { Accordion, App$1 as App, Article, Aside, Base, Breadcrumbs, Canvas, Carousel, CodeCell, CodeNote, Collapsible, Combinaison, Complex, E, EPSILON, Ease, FileBasedRouting, Flex$1 as Flex, Footer, Form, Grid$1 as Grid, HTMLWrapper, Header, LinearSystem, Logic$1 as Logic, Main, Matrix, Modal, Nav, PI$1 as PI, Permutation, Random, SPA, SVGWrapper, Section, Slider, Splitter, Str, Suspense, Svg, Table$1 as Table, Tabs, Utils$1 as Utils, ZikoApp, ZikoCustomEvent, ZikoEvent, ZikoEventClick, ZikoEventClipboard, ZikoEventHash, ZikoEventInput, ZikoEventKey, ZikoEventMouse, ZikoEventPointer, ZikoEventSwipe, ZikoEventWheel, ZikoHead$1 as ZikoHead, ZikoJsonStyleSheet, ZikoMutationObserver, ZikoSPA, ZikoSvgCircle, ZikoSvgEllipse, ZikoSvgForeignObject, ZikoSvgGroupe, ZikoSvgImage, ZikoSvgLine, ZikoSvgLink, ZikoSvgPath, ZikoSvgRectangle, ZikoSvgText, ZikoUIAbbrText, ZikoUIAccordion, ZikoUIArticle, ZikoUIAside, ZikoUIAudio, ZikoUIBlockQuote, ZikoUIBr, ZikoUIBreadcrumbs, ZikoUICanvas, ZikoUICodeNote, ZikoUICodeText, ZikoUIContainerElement, ZikoUIDefintion, ZikoUIElement, ZikoUIFigure, ZikoUIFlex$1 as ZikoUIFlex, ZikoUIFooter, ZikoUIForm, ZikoUIGrid, ZikoUIHTMLWrapper, ZikoUIHeader, ZikoUIHeading, ZikoUIHorizontalSlider, ZikoUIHorizontalSplitter, ZikoUIHr, ZikoUIHtmlTag, ZikoUIImage, ZikoUIInput, ZikoUIInputCheckbox, ZikoUIInputColor, ZikoUIInputDatalist$1 as ZikoUIInputDatalist, ZikoUIInputDate, ZikoUIInputDateTime, ZikoUIInputEmail, ZikoUIInputImage, ZikoUIInputNumber, ZikoUIInputOption, ZikoUIInputPassword, ZikoUIInputRadio, ZikoUIInputSearch, ZikoUIInputSlider$1 as ZikoUIInputSlider, ZikoUIInputTime, ZikoUILabel, ZikoUILink, ZikoUIMain, ZikoUIMenu3d, ZikoUIModal, ZikoUINav, ZikoUIParagraphe, ZikoUIQuote, ZikoUISVGWrapper, ZikoUISection, ZikoUISelect, ZikoUISubText, ZikoUISupText, ZikoUISuspense, ZikoUISvg, ZikoUIText, ZikoUITextArea, ZikoUIVerticalSlider, ZikoUIVerticalSplitter, ZikoUIVideo, ZikoUIXMLWrapper, ZikoUseRoot, ZikoUseStyle, __Config__, __UI__, abbrText, abs, accum, acos, acosh, acot, add, adoc2html, arange, arr2str, asin, asinh, atan, atan2, atanh, audio, bessel, beta, blockQuote, br, brs, btn, canvasArc, canvasCircle, canvasLine, canvasPoints, canvasRect, cartesianProduct, ceil, checkbox, choleskyDecomposition, clamp, codeText, combinaison, complex, cos, cosh, cot, coth, count, countWords, csc, csv2arr, csv2json, csv2matrix, csv2object, csv2sql, dangerAlert, datalist, Ziko as default, defineParamsGetter, deg2rad, dfnText, div, e, fact, figure, floor, gamma, geomspace, h, h1, h2, h3, h4, h5, h6, hSlider, hSplitter, hr, hrs, html, hypot, image, inRange, infoAlert, input, inputCamera, inputColor, inputDate, inputDateTime, inputEmail, inputImage, inputNumber, inputPassword, inputTime, isApproximatlyEqual, json2arr, json2css, json2csv, json2csvFile, json2xml, json2xmlFile, json2yml, json2ymlFile, jsonStyleSheet, lerp, li, link, linspace, ln, logspace, luDecomposition, map, mapfun$1 as mapfun, markdown2html, matrix, matrix2, matrix3, matrix4, max, menu3d, min, modulo, mul, norm, nums, obj2str, ol, ones, p, pgcd, pow, powerSet, ppcm, preload, prod, qrDecomposition, quote, rad2deg, radio, removeExtraSpace, round, search, sec, select, sig, sign, sin, sinc, sinh, slider, sqrt, sqrtn, str, sub, subSet, subText, successAlert, sum, supText, svg2ascii, svg2img, svg2imgUrl, svg2str, svgCircle, svgEllipse, svgGrid, svgGroupe, svgImage, svgLine, svgLink, svgObject, svgPath, svgPolygon, svgRect, svgText, tan, tanh, text$1 as text, textarea, timeTaken, time_memory_Taken, ul, useAnimation, useBattery, useChannel$1 as useChannel, useClickEvent, useClipboardEvent, useCustomEvent, useDebounce, useDragEvent, useDropEvent, useEventEmitter, useFavIcon$1 as useFavIcon, useFocusEvent, useFps, useGeolocation, useHashEvent, useHead$1 as useHead, useInputEvent, useKeyEvent, useLocaleStorage, useMediaQuery, useMeta$1 as useMeta, useMouseEvent, usePointerEvent, useRoot, useRootValue, useSessionStorage, useStyle, useSuccesifKeys, useSwipeEvent, useThread, useThrottle, useTimeLoop, useTitle$1 as useTitle, useType, useWheelEvent, vSlider, vSplitter, video, wait, waitForUIElm, waitForUIElmSync, warningAlert, watch, watchAttr, watchChildren, watchIntersection, watchScreen, watchSize, zeros };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ziko",
3
- "version": "0.0.20",
3
+ "version": "0.0.21",
4
4
  "description": "a versatile javaScript framework offering a rich set of UI components, advanced mathematical utilities, reactivity, animations, client side routing and graphics capabilities",
5
5
  "keywords": [
6
6
  "front-end",
@@ -48,6 +48,7 @@
48
48
  "type": "git",
49
49
  "url": "git+https://github.com/zakarialaoui10/ziko.js.git"
50
50
  },
51
+
51
52
  "author": "zakaria elalaoui",
52
53
  "license": "MIT",
53
54
  "bugs": {