ziko 0.0.6 → 0.0.8
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/README.md +171 -182
- package/dist/ziko.cjs +49 -26
- package/dist/ziko.js +49 -26
- package/dist/ziko.min.js +2 -2
- package/dist/ziko.mjs +49 -27
- package/package.json +1 -1
- package/starter/bin/index.js +2 -1
- package/wrapper/react/README.md +0 -26
- package/wrapper/react/index.jsx +0 -22
- package/wrapper/svelte/ZikoUI.svelte +0 -15
- package/wrapper/vue/ZikoUI.vue +0 -23
package/dist/ziko.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/*
|
|
3
3
|
Project: ziko.js
|
|
4
4
|
Author: Zakaria Elalaoui
|
|
5
|
-
Date :
|
|
5
|
+
Date : Mon May 20 2024 20:27:08 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
|
|
@@ -16,10 +16,6 @@
|
|
|
16
16
|
|
|
17
17
|
class ZikoMath {}
|
|
18
18
|
|
|
19
|
-
/** @module Math */
|
|
20
|
-
/**
|
|
21
|
-
* @class
|
|
22
|
-
*/
|
|
23
19
|
class Complex extends ZikoMath{
|
|
24
20
|
constructor(a = 0, b = 0) {
|
|
25
21
|
super();
|
|
@@ -183,13 +179,6 @@
|
|
|
183
179
|
return "<span>" + this.a + " + i * " + this.b + "</span>";
|
|
184
180
|
}
|
|
185
181
|
}
|
|
186
|
-
/**
|
|
187
|
-
* Performs complex number operations on numbers, arrays, ArrayBuffers, or Matrices.
|
|
188
|
-
* @param {number|number[]|ArrayBuffer|Matrix} a
|
|
189
|
-
* @param {number|number[]|ArrayBuffer|Matrix} b
|
|
190
|
-
* @param {number|number[]|ArrayBuffer|Matrix} b
|
|
191
|
-
* @returns {Complex|Complex[]}
|
|
192
|
-
*/
|
|
193
182
|
const complex=(a,b)=>{
|
|
194
183
|
if((a instanceof Array||ArrayBuffer.isView(a)) && (b instanceof Array||ArrayBuffer.isView(a)))return a.map((n,i)=>complex(a[i],b[i]));
|
|
195
184
|
if(a instanceof Matrix && b instanceof Matrix){
|
|
@@ -7203,8 +7192,8 @@
|
|
|
7203
7192
|
//import { debounce,throttle} from "../../Data/decorators.js";
|
|
7204
7193
|
|
|
7205
7194
|
class ZikoUIInput extends ZikoUIElement {
|
|
7206
|
-
constructor(value = "",datalist) {
|
|
7207
|
-
super();
|
|
7195
|
+
constructor(name , value = "",datalist) {
|
|
7196
|
+
super("input",name);
|
|
7208
7197
|
this.element = document.createElement("input");
|
|
7209
7198
|
Object.assign(this.events,{input:null});
|
|
7210
7199
|
this.setValue(value);
|
|
@@ -7279,7 +7268,7 @@
|
|
|
7279
7268
|
}
|
|
7280
7269
|
class ZikoUIInputSearch extends ZikoUIInput {
|
|
7281
7270
|
constructor() {
|
|
7282
|
-
super();
|
|
7271
|
+
super("inputSearch");
|
|
7283
7272
|
this._setType("search");
|
|
7284
7273
|
this.Length = 0;
|
|
7285
7274
|
}
|
|
@@ -7316,7 +7305,7 @@
|
|
|
7316
7305
|
}
|
|
7317
7306
|
class ZikoUIInputNumber extends ZikoUIInput {
|
|
7318
7307
|
constructor(min, max ,step = 1) {
|
|
7319
|
-
super();
|
|
7308
|
+
super("inpuNumber");
|
|
7320
7309
|
this._setType("number");
|
|
7321
7310
|
this.setMin(min).setMax(max).setStep(step);
|
|
7322
7311
|
}
|
|
@@ -7338,14 +7327,14 @@
|
|
|
7338
7327
|
}
|
|
7339
7328
|
class ZikoUIInputSlider extends ZikoUIInputNumber {
|
|
7340
7329
|
constructor(val = 0, min = 0, max = 10, step = 1) {
|
|
7341
|
-
super();
|
|
7330
|
+
super("inputSlider");
|
|
7342
7331
|
this._setType("range");
|
|
7343
7332
|
this.setMin(min).setMax(max).setValue(val).setStep(step);
|
|
7344
7333
|
}
|
|
7345
7334
|
}
|
|
7346
7335
|
class ZikoUIInputColor extends ZikoUIInput {
|
|
7347
7336
|
constructor() {
|
|
7348
|
-
super();
|
|
7337
|
+
super("inputColor");
|
|
7349
7338
|
this._setType("color");
|
|
7350
7339
|
this.background(this.value);
|
|
7351
7340
|
this.onInput(() => this.background(this.value));
|
|
@@ -7353,37 +7342,37 @@
|
|
|
7353
7342
|
}
|
|
7354
7343
|
class ZikoUIInputPassword extends ZikoUIInput {
|
|
7355
7344
|
constructor() {
|
|
7356
|
-
super();
|
|
7345
|
+
super("inputPassword");
|
|
7357
7346
|
this._setType("password");
|
|
7358
7347
|
}
|
|
7359
7348
|
}
|
|
7360
7349
|
class ZikoUIInputEmail extends ZikoUIInput {
|
|
7361
7350
|
constructor() {
|
|
7362
|
-
super();
|
|
7351
|
+
super("inputEmail");
|
|
7363
7352
|
this._setType("email");
|
|
7364
7353
|
}
|
|
7365
7354
|
}
|
|
7366
7355
|
class ZikoUIInputTime extends ZikoUIInput {
|
|
7367
7356
|
constructor() {
|
|
7368
|
-
super();
|
|
7357
|
+
super("inputTime");
|
|
7369
7358
|
this._setType("time");
|
|
7370
7359
|
}
|
|
7371
7360
|
}
|
|
7372
7361
|
class ZikoUIInputDate extends ZikoUIInput {
|
|
7373
7362
|
constructor() {
|
|
7374
|
-
super();
|
|
7363
|
+
super("inputDate");
|
|
7375
7364
|
this._setType("date");
|
|
7376
7365
|
}
|
|
7377
7366
|
}
|
|
7378
7367
|
class ZikoUIInputDateTime extends ZikoUIInput {
|
|
7379
7368
|
constructor() {
|
|
7380
|
-
super();
|
|
7369
|
+
super("inputDateTime");
|
|
7381
7370
|
this._setType("datetime-local");
|
|
7382
7371
|
}
|
|
7383
7372
|
}
|
|
7384
7373
|
class ZikoUIInputCheckbox extends ZikoUIInput {
|
|
7385
7374
|
constructor() {
|
|
7386
|
-
super();
|
|
7375
|
+
super("inputCheckbox");
|
|
7387
7376
|
this._setType("checkbox");
|
|
7388
7377
|
this.cursor("pointer");
|
|
7389
7378
|
}
|
|
@@ -7401,7 +7390,7 @@
|
|
|
7401
7390
|
}
|
|
7402
7391
|
class ZikoUIInputRadio extends ZikoUIInput {
|
|
7403
7392
|
constructor() {
|
|
7404
|
-
super();
|
|
7393
|
+
super("inputRadio");
|
|
7405
7394
|
this._setType("radio");
|
|
7406
7395
|
this.cursor("pointer");
|
|
7407
7396
|
}
|
|
@@ -7421,7 +7410,7 @@
|
|
|
7421
7410
|
|
|
7422
7411
|
class ZikoUIInputImage extends ZikoUIElement {
|
|
7423
7412
|
constructor(text = "File") {
|
|
7424
|
-
super();
|
|
7413
|
+
super("inputImage");
|
|
7425
7414
|
this._aux_element = btn(text).setTarget(this.Target);
|
|
7426
7415
|
this.element = document.createElement("input");
|
|
7427
7416
|
this.element.setAttribute("type", "file");
|
|
@@ -9940,6 +9929,39 @@
|
|
|
9940
9929
|
init:()=>document.documentElement.setAttribute("data-engine","zikojs")
|
|
9941
9930
|
};
|
|
9942
9931
|
|
|
9932
|
+
class ZikoUIComponent extends HTMLElement{
|
|
9933
|
+
constructor(){
|
|
9934
|
+
super();
|
|
9935
|
+
this.shadowDOM = this.attachShadow({ mode: 'open' });
|
|
9936
|
+
this.wrapper=document.createElement("div");
|
|
9937
|
+
}
|
|
9938
|
+
connectedCallback() {
|
|
9939
|
+
this.setAttribute('role', 'region');
|
|
9940
|
+
this.setAttribute('data-engine',"zikojs");
|
|
9941
|
+
this.shadowDOM.append(this.wrapper);
|
|
9942
|
+
this.observeContentChanges();
|
|
9943
|
+
}
|
|
9944
|
+
observeContentChanges() {
|
|
9945
|
+
const observer = new MutationObserver((mutations) => {
|
|
9946
|
+
mutations.forEach((mutation) => {
|
|
9947
|
+
if (mutation.type === 'childList' || mutation.type === 'characterData') {
|
|
9948
|
+
this.wrapper.innerHTML="";
|
|
9949
|
+
__Ziko__.__Config__.setDefault({ target: this.wrapper });
|
|
9950
|
+
globalThis.eval(this.innerHTML);
|
|
9951
|
+
}
|
|
9952
|
+
});
|
|
9953
|
+
});
|
|
9954
|
+
observer.observe(this, { childList: true, subtree: true, characterData: true });
|
|
9955
|
+
}
|
|
9956
|
+
|
|
9957
|
+
disconnectedCallback() {
|
|
9958
|
+
console.log('ZikoUIComponent removed from page.');
|
|
9959
|
+
}
|
|
9960
|
+
}
|
|
9961
|
+
if(globalThis.document){
|
|
9962
|
+
globalThis.customElements.define('ziko-ui', ZikoUIComponent);
|
|
9963
|
+
}
|
|
9964
|
+
|
|
9943
9965
|
class ZikoSeo{
|
|
9944
9966
|
constructor(app){
|
|
9945
9967
|
this.app=app;
|
|
@@ -10123,6 +10145,7 @@
|
|
|
10123
10145
|
exports.ZikoUIBr = ZikoUIBr;
|
|
10124
10146
|
exports.ZikoUICanvas = ZikoUICanvas;
|
|
10125
10147
|
exports.ZikoUICodeNote = ZikoUICodeNote;
|
|
10148
|
+
exports.ZikoUIComponent = ZikoUIComponent;
|
|
10126
10149
|
exports.ZikoUIElement = ZikoUIElement;
|
|
10127
10150
|
exports.ZikoUIFigure = ZikoUIFigure;
|
|
10128
10151
|
exports.ZikoUIFooter = ZikoUIFooter;
|