ziko 0.0.6 → 0.0.7

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 Apr 13 2024 14:35:44 GMT+0000 (UTC)
5
+ Date : Mon May 20 2024 19:37:06 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
@@ -10,10 +10,6 @@
10
10
 
11
11
  class ZikoMath {}
12
12
 
13
- /** @module Math */
14
- /**
15
- * @class
16
- */
17
13
  class Complex extends ZikoMath{
18
14
  constructor(a = 0, b = 0) {
19
15
  super();
@@ -177,13 +173,6 @@ class Complex extends ZikoMath{
177
173
  return "<span>" + this.a + " + i * " + this.b + "</span>";
178
174
  }
179
175
  }
180
- /**
181
- * Performs complex number operations on numbers, arrays, ArrayBuffers, or Matrices.
182
- * @param {number|number[]|ArrayBuffer|Matrix} a
183
- * @param {number|number[]|ArrayBuffer|Matrix} b
184
- * @param {number|number[]|ArrayBuffer|Matrix} b
185
- * @returns {Complex|Complex[]}
186
- */
187
176
  const complex=(a,b)=>{
188
177
  if((a instanceof Array||ArrayBuffer.isView(a)) && (b instanceof Array||ArrayBuffer.isView(a)))return a.map((n,i)=>complex(a[i],b[i]));
189
178
  if(a instanceof Matrix && b instanceof Matrix){
@@ -9934,6 +9923,39 @@ const __Config__={
9934
9923
  init:()=>document.documentElement.setAttribute("data-engine","zikojs")
9935
9924
  };
9936
9925
 
9926
+ class ZikoUIComponent extends HTMLElement{
9927
+ constructor(){
9928
+ super();
9929
+ this.shadowDOM = this.attachShadow({ mode: 'open' });
9930
+ this.wrapper=document.createElement("div");
9931
+ }
9932
+ connectedCallback() {
9933
+ this.setAttribute('role', 'region');
9934
+ this.setAttribute('data-engine',"zikojs");
9935
+ this.shadowDOM.append(this.wrapper);
9936
+ this.observeContentChanges();
9937
+ }
9938
+ observeContentChanges() {
9939
+ const observer = new MutationObserver((mutations) => {
9940
+ mutations.forEach((mutation) => {
9941
+ if (mutation.type === 'childList' || mutation.type === 'characterData') {
9942
+ this.wrapper.innerHTML="";
9943
+ __Ziko__.__Config__.setDefault({ target: this.wrapper });
9944
+ globalThis.eval(this.innerHTML);
9945
+ }
9946
+ });
9947
+ });
9948
+ observer.observe(this, { childList: true, subtree: true, characterData: true });
9949
+ }
9950
+
9951
+ disconnectedCallback() {
9952
+ console.log('ZikoUIComponent removed from page.');
9953
+ }
9954
+ }
9955
+ if(globalThis.document){
9956
+ globalThis.customElements.define('ziko-ui', ZikoUIComponent);
9957
+ }
9958
+
9937
9959
  class ZikoSeo{
9938
9960
  constructor(app){
9939
9961
  this.app=app;
@@ -10066,4 +10088,4 @@ function RemoveAll(){
10066
10088
  Data.RemoveAll();
10067
10089
  }
10068
10090
 
10069
- export { Accordion, App, Article, Aside, Base, Canvas, Carousel, CodeCell, CodeNote, Combinaison, Complex, DarkThemes, Data, E, EPSILON, Ease, Events, ExtractAll, Fixed, Flex, Footer, Graphics, Grid$1 as Grid, Header, LightThemes, LinearSystem, Logic$1 as Logic, Main, Math$1 as Math, Matrix, Nav, PI, Permutation, Random, RemoveAll, SPA, Section$1 as Section, Signal, Svg, Table, Tabs, Themes, Time, UI$1 as UI, Utils, ZikoUIArticle, ZikoUIAside, ZikoUIAudio, ZikoUIBr, ZikoUICanvas, ZikoUICodeNote, ZikoUIElement, ZikoUIFigure, ZikoUIFooter, ZikoUIHeader, ZikoUIHr, ZikoUIHtmlTag, ZikoUIImage, ZikoUILink, ZikoUIMain, ZikoUINav, ZikoUISection, ZikoUISvg, ZikoUIVideo, __Config__, abs, accum, acos, acosh, acot, add, adoc2html, animation, arange, asin, asinh, atan, atan2, atanh, audio, bessel, beta, br, brs, btn, canvasArc, canvasCircle, canvasLine, canvasPoints, canvasRect, cartesianProduct, ceil, checkbox, choleskyDecomposition, clamp, complex, cos, cosh, cot, coth, csc, csv2arr, csv2json, csv2matrix, csv2object, csv2sql, datalist, Ziko as default, deg2rad, div, e, fact, figure, floor, gamma, geomspace, h1, h2, h3, h4, h5, h6, hr, hrs, html, hypot, image, inRange, input, inputCamera, inputColor, inputDate, inputDateTime, inputEmail, inputImage, inputNumber, inputPassword, inputTime, isApproximatlyEqual, json2arr, json2csv, json2csvFile, json2xml, json2xmlFile, json2yml, json2ymlFile, lerp, li, link, linspace, ln, logspace, loop, luDecomposition, map, mapfun$1 as mapfun, markdown2html, matrix, matrix2, matrix3, matrix4, max, min, modulo, mul, norm, nums, ol, ones, p, pgcd, pow, powerSet, ppcm, prod, qrDecomposition, rad2deg, radio, round, search, sec, select, sig, sign, sin, sinc, sinh, slider, sqrt, sqrtn, sub, subSet, sum, svg2ascii, svg2img, svg2imgUrl, svg2str, svgCircle, svgEllipse, svgGroupe, svgImage, svgLine, svgPolygon, svgRect, svgText, tan, tanh, text$1 as text, textarea, timeTaken, time_memory_Taken, ul, useDebounce, useThrottle, video, wait, waitForUIElm, waitForUIElmSync, zeros };
10091
+ export { Accordion, App, Article, Aside, Base, Canvas, Carousel, CodeCell, CodeNote, Combinaison, Complex, DarkThemes, Data, E, EPSILON, Ease, Events, ExtractAll, Fixed, Flex, Footer, Graphics, Grid$1 as Grid, Header, LightThemes, LinearSystem, Logic$1 as Logic, Main, Math$1 as Math, Matrix, Nav, PI, Permutation, Random, RemoveAll, SPA, Section$1 as Section, Signal, Svg, Table, Tabs, Themes, Time, UI$1 as UI, Utils, ZikoUIArticle, ZikoUIAside, ZikoUIAudio, ZikoUIBr, ZikoUICanvas, ZikoUICodeNote, ZikoUIComponent, ZikoUIElement, ZikoUIFigure, ZikoUIFooter, ZikoUIHeader, ZikoUIHr, ZikoUIHtmlTag, ZikoUIImage, ZikoUILink, ZikoUIMain, ZikoUINav, ZikoUISection, ZikoUISvg, ZikoUIVideo, __Config__, abs, accum, acos, acosh, acot, add, adoc2html, animation, arange, asin, asinh, atan, atan2, atanh, audio, bessel, beta, br, brs, btn, canvasArc, canvasCircle, canvasLine, canvasPoints, canvasRect, cartesianProduct, ceil, checkbox, choleskyDecomposition, clamp, complex, cos, cosh, cot, coth, csc, csv2arr, csv2json, csv2matrix, csv2object, csv2sql, datalist, Ziko as default, deg2rad, div, e, fact, figure, floor, gamma, geomspace, h1, h2, h3, h4, h5, h6, hr, hrs, html, hypot, image, inRange, input, inputCamera, inputColor, inputDate, inputDateTime, inputEmail, inputImage, inputNumber, inputPassword, inputTime, isApproximatlyEqual, json2arr, json2csv, json2csvFile, json2xml, json2xmlFile, json2yml, json2ymlFile, lerp, li, link, linspace, ln, logspace, loop, luDecomposition, map, mapfun$1 as mapfun, markdown2html, matrix, matrix2, matrix3, matrix4, max, min, modulo, mul, norm, nums, ol, ones, p, pgcd, pow, powerSet, ppcm, prod, qrDecomposition, rad2deg, radio, round, search, sec, select, sig, sign, sin, sinc, sinh, slider, sqrt, sqrtn, sub, subSet, sum, svg2ascii, svg2img, svg2imgUrl, svg2str, svgCircle, svgEllipse, svgGroupe, svgImage, svgLine, svgPolygon, svgRect, svgText, tan, tanh, text$1 as text, textarea, timeTaken, time_memory_Taken, ul, useDebounce, useThrottle, video, wait, waitForUIElm, waitForUIElmSync, zeros };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ziko",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "a versatile JavaScript library offering a rich set of UI components, advanced mathematical utilities,Reactivity,animations,client side routing and graphics capabilities",
5
5
  "keywords": [
6
6
  "Zikojs",
@@ -7,4 +7,5 @@ const TEMPLATE = path.join(__dirname,"../template");
7
7
  const PROJECT_TITLE = process.argv[2]||"zikojs-project";
8
8
  createFolder(PROJECT_TITLE);
9
9
  copyFolder(TEMPLATE,path.join(process.cwd(),PROJECT_TITLE));
10
- runCommand(`cd ${PROJECT_TITLE} && npm install`);
10
+ runCommand(`cd ${PROJECT_TITLE} && npm install`);
11
+