ziko 0.0.28 → 0.0.30
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.cjs +18 -174
- package/dist/ziko.js +18 -174
- package/dist/ziko.min.js +2 -2
- package/dist/ziko.mjs +18 -173
- package/package.json +24 -3
- package/src/__helpers__/index.js +6 -6
- package/src/app/index.js +10 -10
- package/src/app/json-style-sheet.js +1 -1
- package/src/app/routes.js +0 -1
- package/src/app/spa-file-based-routing.js +2 -2
- package/src/app/spa.js +3 -3
- package/src/app/ziko-app.js +1 -1
- package/src/{reactivity/events-exp → events}/__ZikoEvent__.js +4 -3
- package/src/{reactivity/events-exp → events}/click.js +2 -3
- package/src/events/clipboard.js +16 -0
- package/src/events/custom-event.js +0 -0
- package/src/events/drag.js +16 -0
- package/src/events/focus.js +16 -0
- package/src/events/hash.js +16 -0
- package/src/events/index.d.ts +3 -0
- package/src/events/index.js +15 -0
- package/src/{reactivity/events-exp → events}/key.js +2 -2
- package/src/events/mouse.js +16 -0
- package/src/{reactivity/events-exp → events}/pointer.js +3 -4
- package/src/events/touch.js +16 -0
- package/src/events/types/__Shared__.d.ts +148 -0
- package/src/events/types/clipboard.d.ts +20 -0
- package/src/events/types/focus.d.ts +19 -0
- package/src/events/types/pointer.d.ts +45 -0
- package/src/events/wheel.js +16 -0
- package/src/index.js +14 -14
- package/src/reactivity/index.js +0 -3
- package/src/ui/elements/embaded/html.js +1 -1
- package/src/ui/elements/embaded/youtube.js +2 -2
- package/src/ui/elements/grid/index.js +1 -1
- package/src/ui/index.js +21 -19
- package/src/ui/tags/index.d.ts +144 -0
- package/src/ui/tags/index.js +21 -0
- package/src/_global (To Be Removed )/_themes/dark.js +0 -885
- package/src/_global (To Be Removed )/_themes/index.js +0 -11
- package/src/_global (To Be Removed )/_themes/light.js +0 -255
- package/src/_global (To Be Removed )/app/index.js +0 -46
- package/src/_global (To Be Removed )/component/index.js +0 -38
- package/src/_global (To Be Removed )/globals/index.js +0 -20
- package/src/_global (To Be Removed )/index.js +0 -4
- package/src/_global (To Be Removed )/params/index.js +0 -40
- package/src/_global (To Be Removed )/router/index.js +0 -67
- package/src/_global (To Be Removed )/seo/index.js +0 -43
- package/src/_global (To Be Removed )/style/index.js +0 -1
- package/src/reactivity/events-exp/index.js +0 -5
- /package/src/{reactivity/events-exp → events}/__Events__.js +0 -0
- /package/src/{reactivity/events-exp → events}/utils.js +0 -0
package/dist/ziko.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/*
|
|
3
3
|
Project: ziko.js
|
|
4
4
|
Author: Zakaria Elalaoui
|
|
5
|
-
Date :
|
|
5
|
+
Date : Tue Jul 29 2025 15:18:10 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
|
|
@@ -4608,181 +4608,10 @@ var Hooks = /*#__PURE__*/Object.freeze({
|
|
|
4608
4608
|
useType: useType
|
|
4609
4609
|
});
|
|
4610
4610
|
|
|
4611
|
-
const getEvent=(event = "")=>{
|
|
4612
|
-
if(event.startsWith("Ptr"))return `pointer${event.split("Ptr")[1].toLowerCase()}`;
|
|
4613
|
-
return event.toLowerCase()
|
|
4614
|
-
};
|
|
4615
|
-
|
|
4616
|
-
function event_controller(e, event_name, details_setter, customizer, push_object){
|
|
4617
|
-
this.cache.currentEvent = event_name;
|
|
4618
|
-
this.cache.event = e;
|
|
4619
|
-
details_setter?.call(this);
|
|
4620
|
-
if(customizer?.hasOwnProperty("prototype"))customizer?.call(this);
|
|
4621
|
-
else customizer?.call(null, this);
|
|
4622
|
-
if(this.cache.preventDefault[event_name]) e.preventDefault();
|
|
4623
|
-
if(this.cache.stopPropagation[event_name]) e.stopPropagation();
|
|
4624
|
-
if(this.cache.stopImmediatePropagation[event_name]) e.stopImmediatePropagation();
|
|
4625
|
-
|
|
4626
|
-
if(this.cache.stream.enabled[event_name]&&push_object)this.cache.stream.history[event_name].push(push_object);
|
|
4627
|
-
this.cache.callbacks[event_name]?.map(n=>n(this));
|
|
4628
|
-
}
|
|
4629
|
-
class __ZikoEvent__ {
|
|
4630
|
-
constructor(target = null, Events = [], details_setter, customizer){
|
|
4631
|
-
this.target = target;
|
|
4632
|
-
this.cache = {
|
|
4633
|
-
currentEvent : null,
|
|
4634
|
-
event: null,
|
|
4635
|
-
options : {},
|
|
4636
|
-
preventDefault : {},
|
|
4637
|
-
stopPropagation : {},
|
|
4638
|
-
stopImmediatePropagation : {},
|
|
4639
|
-
event_flow : {},
|
|
4640
|
-
paused : {},
|
|
4641
|
-
stream : {
|
|
4642
|
-
enabled : {},
|
|
4643
|
-
clear : {},
|
|
4644
|
-
history : {}
|
|
4645
|
-
},
|
|
4646
|
-
callbacks : {},
|
|
4647
|
-
__controllers__:{}
|
|
4648
|
-
};
|
|
4649
|
-
const events = Events.map(n=>getEvent(n));
|
|
4650
|
-
events.forEach((event,i)=>{
|
|
4651
|
-
Object.assign(this.cache.preventDefault, {[event] : false});
|
|
4652
|
-
Object.assign(this.cache.options, {[event] : {}});
|
|
4653
|
-
Object.assign(this.cache.paused, {[event] : false});
|
|
4654
|
-
Object.assign(this.cache.stream.enabled, {[event] : false});
|
|
4655
|
-
Object.assign(this.cache.stream.clear, {[event] : false});
|
|
4656
|
-
Object.assign(this.cache.stream.history, {[event] : []});
|
|
4657
|
-
Object.assign(this.cache.__controllers__, {[event] : e=>event_controller.call(this, e, event, details_setter, customizer)});
|
|
4658
|
-
Object.assign(this, { [`on${Events[i]}`] : (...callbacks)=> this.__onEvent(event, this.cache.options[event], {}, ...callbacks)});
|
|
4659
|
-
});
|
|
4660
|
-
}
|
|
4661
|
-
get targetElement(){
|
|
4662
|
-
return this.target?.element;
|
|
4663
|
-
}
|
|
4664
|
-
get isParent(){
|
|
4665
|
-
return this.target?.element === this.event.srcElement;
|
|
4666
|
-
}
|
|
4667
|
-
get item(){
|
|
4668
|
-
return this.target.find(n=>n.element == this.event?.srcElement)?.[0];
|
|
4669
|
-
}
|
|
4670
|
-
get currentEvent(){
|
|
4671
|
-
return this.cache.currentEvent;
|
|
4672
|
-
}
|
|
4673
|
-
get event(){
|
|
4674
|
-
return this.cache.event;
|
|
4675
|
-
}
|
|
4676
|
-
setTarget(UI){
|
|
4677
|
-
this.target=UI;
|
|
4678
|
-
return this;
|
|
4679
|
-
}
|
|
4680
|
-
__handle(event, handler, options, dispose){
|
|
4681
|
-
this.targetElement?.addEventListener(event, handler, options);
|
|
4682
|
-
return this;
|
|
4683
|
-
}
|
|
4684
|
-
__onEvent(event, options, dispose, ...callbacks){
|
|
4685
|
-
if(callbacks.length===0){
|
|
4686
|
-
console.log("00");
|
|
4687
|
-
if(this.cache.callbacks[event]){
|
|
4688
|
-
console.log("Call");
|
|
4689
|
-
// this.cache.callbacks.map(n=>e=>n.call(this,e));
|
|
4690
|
-
this.cache.callbacks[event].map(n=>e=>n.call(this,e));
|
|
4691
|
-
}
|
|
4692
|
-
else {
|
|
4693
|
-
return this;
|
|
4694
|
-
}
|
|
4695
|
-
}
|
|
4696
|
-
else this.cache.callbacks[event] = callbacks.map(n=>e=>n.call(this,e));
|
|
4697
|
-
this.__handle(event, this.cache.__controllers__[event],options, dispose);
|
|
4698
|
-
return this;
|
|
4699
|
-
}
|
|
4700
|
-
#override(methode, overrides, defaultValue){
|
|
4701
|
-
if(defaultValue === "default") Object.assign(this.cache[methode], {...this.cache[methode], ...overrides});
|
|
4702
|
-
const all = defaultValue === "default"
|
|
4703
|
-
? this.cache[methode]
|
|
4704
|
-
: Object.fromEntries(Object.keys(this.cache.preventDefault).map(n=>[n,defaultValue]));
|
|
4705
|
-
Object.assign(this.cache[methode], {...all,...overrides});
|
|
4706
|
-
return this
|
|
4707
|
-
}
|
|
4708
|
-
preventDefault(overrides = {}, defaultValue = "default"){
|
|
4709
|
-
this.#override("preventDefault", overrides, defaultValue);
|
|
4710
|
-
// const all=Object.fromEntries(Object.keys(this.cache.preventDefault).map(n=>[n,defaultValue]))
|
|
4711
|
-
// Object.assign(this.cache.preventDefault, {...all,...overrides});
|
|
4712
|
-
return this;
|
|
4713
|
-
}
|
|
4714
|
-
stopPropagation(overrides = {}, defaultValue = "default"){
|
|
4715
|
-
this.#override("stopPropagation", overrides, defaultValue);
|
|
4716
|
-
return this;
|
|
4717
|
-
}
|
|
4718
|
-
stopImmediatePropagation(overrides = {}, defaultValue = "default"){
|
|
4719
|
-
this.#override("stopImmediatePropagation", overrides, defaultValue);
|
|
4720
|
-
return this;
|
|
4721
|
-
}
|
|
4722
|
-
setEventOptions(event, options){
|
|
4723
|
-
this.pause({[event] : true, }, "default");
|
|
4724
|
-
Object.assign(this.cache.options[getEvent(event)], options);
|
|
4725
|
-
this.resume({[event] : true, }, "default");
|
|
4726
|
-
return this;
|
|
4727
|
-
}
|
|
4728
|
-
pause(overrides = {}, defaultValue = "default"){
|
|
4729
|
-
const all = defaultValue === "default"
|
|
4730
|
-
? this.cache.stream.enabled
|
|
4731
|
-
: Object.entries(Object.keys(this.cache.stream.enabled).map(n=>[n,defaultValue]));
|
|
4732
|
-
overrides={...all,...overrides};
|
|
4733
|
-
for(let key in overrides){
|
|
4734
|
-
if(overrides[key]){
|
|
4735
|
-
this.targetElement?.removeEventListener(key, this.cache.__controllers__[key], this.cache.options[key]);
|
|
4736
|
-
this.cache.paused[key]=true;
|
|
4737
|
-
}
|
|
4738
|
-
}
|
|
4739
|
-
return this;
|
|
4740
|
-
}
|
|
4741
|
-
resume(overrides = {}, defaultValue = "default"){
|
|
4742
|
-
const all = defaultValue === "default"
|
|
4743
|
-
? this.cache.stream.enabled
|
|
4744
|
-
: Object.entries(Object.keys(this.cache.stream.enabled).map(n=>[n,defaultValue]));
|
|
4745
|
-
overrides={...all,...overrides};
|
|
4746
|
-
for(let key in overrides){
|
|
4747
|
-
if(overrides[key]){
|
|
4748
|
-
this.targetElement?.addEventListener(key,this.cache.__controllers__[key], this.cache.options[key]);
|
|
4749
|
-
this.cache.paused[key]=false;
|
|
4750
|
-
}
|
|
4751
|
-
}
|
|
4752
|
-
return this;
|
|
4753
|
-
}
|
|
4754
|
-
stream(overrides = {}, defaultValue = "default"){
|
|
4755
|
-
this.cache.stream.t0=Date.now();
|
|
4756
|
-
const all=Object.fromEntries(Object.keys(this.cache.stream.enabled).map(n=>[n,defaultValue]));
|
|
4757
|
-
overrides={...all,...overrides};
|
|
4758
|
-
Object.assign(this.cache.stream.enabled,overrides);
|
|
4759
|
-
return this;
|
|
4760
|
-
}
|
|
4761
|
-
clear(){
|
|
4762
|
-
|
|
4763
|
-
}
|
|
4764
|
-
dispose(overrides = {}, defaultValue = "default"){
|
|
4765
|
-
this.pause(overrides, defaultValue);
|
|
4766
|
-
|
|
4767
|
-
return this;
|
|
4768
|
-
}
|
|
4769
|
-
}
|
|
4770
|
-
|
|
4771
|
-
// export * from "./click.js";
|
|
4772
|
-
// export * from "./key.js";
|
|
4773
|
-
// export * from "./pointer.js"
|
|
4774
|
-
|
|
4775
|
-
var EventsExp = /*#__PURE__*/Object.freeze({
|
|
4776
|
-
__proto__: null,
|
|
4777
|
-
__ZikoEvent__: __ZikoEvent__,
|
|
4778
|
-
getEvent: getEvent
|
|
4779
|
-
});
|
|
4780
|
-
|
|
4781
4611
|
const Reactivity={
|
|
4782
4612
|
...Events,
|
|
4783
4613
|
...Observer,
|
|
4784
4614
|
...Hooks,
|
|
4785
|
-
...EventsExp,
|
|
4786
4615
|
};
|
|
4787
4616
|
|
|
4788
4617
|
class ZikoUIElement {
|
|
@@ -7101,6 +6930,22 @@ var Grid$2 = /*#__PURE__*/Object.freeze({
|
|
|
7101
6930
|
ZikoUIGrid: ZikoUIGrid
|
|
7102
6931
|
});
|
|
7103
6932
|
|
|
6933
|
+
const tags = new Proxy({}, {
|
|
6934
|
+
get(target, prop) {
|
|
6935
|
+
if (typeof prop !== 'string') return undefined;
|
|
6936
|
+
let tag = prop.replaceAll("_","-").toLowerCase();
|
|
6937
|
+
switch(tag){
|
|
6938
|
+
case "html" :
|
|
6939
|
+
case "head" :
|
|
6940
|
+
case "style" :
|
|
6941
|
+
case "link" :
|
|
6942
|
+
case "meta" :
|
|
6943
|
+
case "srcipt":
|
|
6944
|
+
case "body" : return null; default : return new ZikoUIElement(tag);
|
|
6945
|
+
}
|
|
6946
|
+
}
|
|
6947
|
+
});
|
|
6948
|
+
|
|
7104
6949
|
const UI$1 = {
|
|
7105
6950
|
...Text$1,
|
|
7106
6951
|
...List,
|
|
@@ -9466,4 +9311,4 @@ function RemoveAll(){
|
|
|
9466
9311
|
Data.RemoveAll();
|
|
9467
9312
|
}
|
|
9468
9313
|
|
|
9469
|
-
export { App$1 as App, Article, Aside, Base, Canvas, Combinaison, Complex, E, EPSILON, Ease, FileBasedRouting, Flex, Footer, Form, Grid$1 as Grid, HTMLWrapper, Header, LinearSystem, Logic$1 as Logic, Main, Matrix, Nav, PI$1 as PI, Permutation, Random, SPA, SVGWrapper, Section, Str, Suspense, Svg, Table$1 as Table, Utils$1 as Utils, ZikoApp, ZikoCustomEvent, ZikoEvent, ZikoEventClick, ZikoEventClipboard, ZikoEventHash, ZikoEventInput, ZikoEventKey, ZikoEventMouse, ZikoEventPointer, ZikoEventSwipe, ZikoEventWheel, ZikoHead$1 as ZikoHead, ZikoJsonStyleSheet, ZikoMutationObserver, ZikoSPA, ZikoUIAbbrText, ZikoUIArticle, ZikoUIAside, ZikoUIAudio, ZikoUIBlockQuote, ZikoUIBr, ZikoUICanvas, ZikoUICodeText, ZikoUIDefintion, ZikoUIElement, ZikoUIFigure, ZikoUIFlex, ZikoUIFooter, ZikoUIForm, ZikoUIGrid, ZikoUIHTMLWrapper, ZikoUIHeader, ZikoUIHeading, 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, ZikoUINav, ZikoUIParagraphe, ZikoUIQuote, ZikoUISVGWrapper, ZikoUISection, ZikoUISelect, ZikoUISubText, ZikoUISupText, ZikoUISuspense, ZikoUISvg, ZikoUIText, ZikoUITextArea, ZikoUIVideo, ZikoUIXMLWrapper, ZikoUseRoot, ZikoUseStyle, __CACHE__, __Config__, __HYDRATION_MAP__, __UI__,
|
|
9314
|
+
export { App$1 as App, Article, Aside, Base, Canvas, Combinaison, Complex, E, EPSILON, Ease, FileBasedRouting, Flex, Footer, Form, Grid$1 as Grid, HTMLWrapper, Header, LinearSystem, Logic$1 as Logic, Main, Matrix, Nav, PI$1 as PI, Permutation, Random, SPA, SVGWrapper, Section, Str, Suspense, Svg, Table$1 as Table, Utils$1 as Utils, ZikoApp, ZikoCustomEvent, ZikoEvent, ZikoEventClick, ZikoEventClipboard, ZikoEventHash, ZikoEventInput, ZikoEventKey, ZikoEventMouse, ZikoEventPointer, ZikoEventSwipe, ZikoEventWheel, ZikoHead$1 as ZikoHead, ZikoJsonStyleSheet, ZikoMutationObserver, ZikoSPA, ZikoUIAbbrText, ZikoUIArticle, ZikoUIAside, ZikoUIAudio, ZikoUIBlockQuote, ZikoUIBr, ZikoUICanvas, ZikoUICodeText, ZikoUIDefintion, ZikoUIElement, ZikoUIFigure, ZikoUIFlex, ZikoUIFooter, ZikoUIForm, ZikoUIGrid, ZikoUIHTMLWrapper, ZikoUIHeader, ZikoUIHeading, 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, ZikoUINav, ZikoUIParagraphe, ZikoUIQuote, ZikoUISVGWrapper, ZikoUISection, ZikoUISelect, ZikoUISubText, ZikoUISupText, ZikoUISuspense, ZikoUISvg, ZikoUIText, ZikoUITextArea, ZikoUIVideo, ZikoUIXMLWrapper, ZikoUseRoot, ZikoUseStyle, __CACHE__, __Config__, __HYDRATION_MAP__, __UI__, abbrText, abs, accum, acos, acosh, acot, add, arange, arr2str, asin, asinh, atan, atan2, atanh, audio, bessel, beta, blockQuote, br, brs, btn, cartesianProduct, ceil, checkbox, choleskyDecomposition, clamp, codeText, combinaison, complex, cos, cosh, cot, coth, count, countWords, csc, csv2arr, csv2json, csv2matrix, csv2object, csv2sql, datalist, Ziko as default, defineParamsGetter, deg2rad, dfnText, div, e, fact, figure, floor, gamma, geomspace, h, h1, h2, h3, h4, h5, h6, hTags, hr, hrs, html, hypot, image, inRange, 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, matrix, matrix2, matrix3, matrix4, max, min, modulo, mul, norm, nums, obj2str, ol, ones, p, pgcd, pow, powerSet, ppcm, preload, prod, qrDecomposition, quote, rad2deg, radio, removeExtraSpace, round, s, sTags, search, sec, select, sig, sign, sin, sinc, sinh, slider, sqrt, sqrtn, str, sub, subSet, subText, sum, supText, svg2ascii, svg2img, svg2imgUrl, svg2str, tags, tan, tanh, text, textarea, timeTaken, time_memory_Taken, ul, useAnimation, useChannel$1 as useChannel, useClickEvent, useClipboardEvent, useCustomEvent, useDebounce, useDragEvent, useDropEvent, useEventEmitter, useFavIcon$1 as useFavIcon, useFocusEvent, useFps, 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, video, wait, waitForUIElm, waitForUIElmSync, 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.
|
|
3
|
+
"version": "0.0.30",
|
|
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",
|
|
@@ -31,7 +31,27 @@
|
|
|
31
31
|
".": {
|
|
32
32
|
"import": "./dist/ziko.mjs",
|
|
33
33
|
"require": "./dist/ziko.cjs"
|
|
34
|
-
}
|
|
34
|
+
},
|
|
35
|
+
"./helpers": {
|
|
36
|
+
"import" : "./src/__helpers__.js"
|
|
37
|
+
},
|
|
38
|
+
"./events": {
|
|
39
|
+
"import": "./src/events/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./ui":{
|
|
42
|
+
"import": "./src/ui/index.js",
|
|
43
|
+
"type": "./src/ui/index.d.ts"
|
|
44
|
+
},
|
|
45
|
+
"./tags":{
|
|
46
|
+
"import": "./src/tags/index.js"
|
|
47
|
+
},
|
|
48
|
+
"./src": "./src/index.js",
|
|
49
|
+
"./math": {},
|
|
50
|
+
"./html": {},
|
|
51
|
+
"./app": {},
|
|
52
|
+
"./time": {},
|
|
53
|
+
"./use": {},
|
|
54
|
+
"./components": {}
|
|
35
55
|
},
|
|
36
56
|
"bin": {
|
|
37
57
|
"create-ziko-app": "starter/bin/index.js"
|
|
@@ -59,7 +79,8 @@
|
|
|
59
79
|
"@rollup/plugin-node-resolve": "^15.2.3",
|
|
60
80
|
"@rollup/plugin-terser": "^0.4.4",
|
|
61
81
|
"cross-env": "^7.0.3",
|
|
62
|
-
"eslint": "^8.
|
|
82
|
+
"eslint": "^8.57.1",
|
|
83
|
+
"eslint-plugin-import": "^2.32.0",
|
|
63
84
|
"eslint-plugin-spellcheck": "^0.0.20",
|
|
64
85
|
"jasmine": "^5.3.0",
|
|
65
86
|
"rollup": "^4.1.5",
|
package/src/__helpers__/index.js
CHANGED
|
@@ -46,12 +46,12 @@ class B{
|
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
class AB {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}
|
|
49
|
+
// class AB {
|
|
50
|
+
// constructor() {
|
|
51
|
+
// this.msg="from AB"
|
|
52
|
+
// mixin(this.__proto__, A, B);
|
|
53
|
+
// }
|
|
54
|
+
// }
|
|
55
55
|
|
|
56
56
|
// ab=new AB()
|
|
57
57
|
export{
|
package/src/app/index.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
export * from "./ziko-app";
|
|
2
|
-
export * from "./json-style-sheet";
|
|
3
|
-
export * from "./spa"
|
|
4
|
-
export * from "./params"
|
|
5
|
-
export * from "./globals"
|
|
6
|
-
export * from "./spa-file-based-routing"
|
|
1
|
+
export * from "./ziko-app.js";
|
|
2
|
+
export * from "./json-style-sheet.js";
|
|
3
|
+
export * from "./spa.js"
|
|
4
|
+
export * from "./params.js"
|
|
5
|
+
export * from "./globals.js"
|
|
6
|
+
export * from "./spa-file-based-routing.js"
|
|
7
7
|
|
|
8
|
-
import * as __App__ from "./ziko-app"
|
|
9
|
-
import * as JsonStyleSheet from "./json-style-sheet"
|
|
10
|
-
import * as Spa from "./spa"
|
|
11
|
-
import * as Global from "./globals"
|
|
8
|
+
import * as __App__ from "./ziko-app.js"
|
|
9
|
+
import * as JsonStyleSheet from "./json-style-sheet.js"
|
|
10
|
+
import * as Spa from "./spa.js"
|
|
11
|
+
import * as Global from "./globals.js"
|
|
12
12
|
// import * as Params from "./params"
|
|
13
13
|
|
|
14
14
|
const App={
|
package/src/app/routes.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SPA } from "./spa";
|
|
2
|
-
import { Section } from "../ui";
|
|
1
|
+
import { SPA } from "./spa.js";
|
|
2
|
+
import { Section } from "../ui/index.js";
|
|
3
3
|
// import.meta.glob('./src/pages/**/*.js')
|
|
4
4
|
async function FileBasedRouting(pages /* use import.meta.glob */){
|
|
5
5
|
const routes = Object.keys(pages)
|
package/src/app/spa.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { text } from "../ui";
|
|
2
|
-
import { dynamicRoutesParser,routesMatcher,isDynamic } from "./routes";
|
|
3
|
-
import { ZikoApp } from "./ziko-app";
|
|
1
|
+
import { text } from "../ui/index.js";
|
|
2
|
+
import { dynamicRoutesParser,routesMatcher,isDynamic } from "./routes.js";
|
|
3
|
+
import { ZikoApp } from "./ziko-app.js";
|
|
4
4
|
class ZikoSPA extends ZikoApp{
|
|
5
5
|
constructor({head, wrapper, target, routes}){
|
|
6
6
|
super({head, wrapper, target})
|
package/src/app/ziko-app.js
CHANGED
|
@@ -3,8 +3,9 @@ function event_controller(e, event_name, details_setter, customizer, push_object
|
|
|
3
3
|
this.cache.currentEvent = event_name;
|
|
4
4
|
this.cache.event = e;
|
|
5
5
|
details_setter?.call(this);
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
customizer?.hasOwnProperty("prototype") ? customizer?.call(this) : customizer?.call(null, this);
|
|
7
|
+
// if(customizer?.hasOwnProperty("prototype")) customizer?.call(this)
|
|
8
|
+
// else customizer?.call(null, this)
|
|
8
9
|
if(this.cache.preventDefault[event_name]) e.preventDefault();
|
|
9
10
|
if(this.cache.stopPropagation[event_name]) e.stopPropagation();
|
|
10
11
|
if(this.cache.stopImmediatePropagation[event_name]) e.stopImmediatePropagation();
|
|
@@ -145,7 +146,7 @@ class __ZikoEvent__ {
|
|
|
145
146
|
return this;
|
|
146
147
|
}
|
|
147
148
|
clear(){
|
|
148
|
-
|
|
149
|
+
return this;
|
|
149
150
|
}
|
|
150
151
|
dispose(overrides = {}, defaultValue = "default"){
|
|
151
152
|
this.pause(overrides, defaultValue);
|
|
@@ -10,10 +10,9 @@ function details_setter(){
|
|
|
10
10
|
else this.dx = 1
|
|
11
11
|
// console.log(this.currentEvent)
|
|
12
12
|
}
|
|
13
|
-
const
|
|
13
|
+
const bindClickEvent = (target, customizer) => new ZikoEventClick(target, customizer)
|
|
14
14
|
|
|
15
|
-
globalThis.expClick = __useClickEvent
|
|
16
15
|
export{
|
|
17
|
-
|
|
16
|
+
bindClickEvent,
|
|
18
17
|
ZikoEventClick
|
|
19
18
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __ZikoEvent__ } from "./__ZikoEvent__.js";
|
|
2
|
+
import { Events } from "./__Events__.js";
|
|
3
|
+
class ZikoEventClipboard extends __ZikoEvent__{
|
|
4
|
+
constructor(target, customizer){
|
|
5
|
+
super(target, Events.Clipboard, details_setter, customizer)
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
function details_setter(){
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
const bindClipboardEvent = (target, customizer) => new ZikoEventClipboard(target, customizer)
|
|
12
|
+
|
|
13
|
+
export{
|
|
14
|
+
bindClipboardEvent,
|
|
15
|
+
ZikoEventClipboard
|
|
16
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __ZikoEvent__ } from "./__ZikoEvent__.js";
|
|
2
|
+
import { Events } from "./__Events__.js";
|
|
3
|
+
class ZikoEventDrag extends __ZikoEvent__{
|
|
4
|
+
constructor(target, customizer){
|
|
5
|
+
super(target, Events.Drag, details_setter, customizer)
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
function details_setter(){
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
const bindDragEvent = (target, customizer) => new ZikoEventDrag(target, customizer)
|
|
12
|
+
|
|
13
|
+
export{
|
|
14
|
+
bindDragEvent,
|
|
15
|
+
ZikoEventDrag
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __ZikoEvent__ } from "./__ZikoEvent__.js";
|
|
2
|
+
import { Events } from "./__Events__.js";
|
|
3
|
+
class ZikoEventFocus extends __ZikoEvent__{
|
|
4
|
+
constructor(target, customizer){
|
|
5
|
+
super(target, Events.Focus, details_setter, customizer)
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
function details_setter(){
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
const bindFocusEvent = (target, customizer) => new ZikoEventFocus(target, customizer)
|
|
12
|
+
|
|
13
|
+
export{
|
|
14
|
+
bindFocusEvent,
|
|
15
|
+
ZikoEventFocus
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __ZikoEvent__ } from "./__ZikoEvent__.js";
|
|
2
|
+
import { Events } from "./__Events__.js";
|
|
3
|
+
class ZikoEventHash extends __ZikoEvent__{
|
|
4
|
+
constructor(target, customizer){
|
|
5
|
+
super(target, Events.Hash, details_setter, customizer)
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
function details_setter(){
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
const bindHashEvent = (target, customizer) => new ZikoEventHash(target, customizer)
|
|
12
|
+
|
|
13
|
+
export{
|
|
14
|
+
bindHashEvent,
|
|
15
|
+
ZikoEventHash
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export * from "./click.js";
|
|
2
|
+
export * from "./clipboard.js";
|
|
3
|
+
// export * from "./custom-event.js";
|
|
4
|
+
export * from "./drag.js";
|
|
5
|
+
export * from "./focus.js";
|
|
6
|
+
export * from "./hash.js";
|
|
7
|
+
export * from "./key.js";
|
|
8
|
+
export * from "./mouse.js";
|
|
9
|
+
export * from "./pointer.js";
|
|
10
|
+
export * from "./touch.js";
|
|
11
|
+
export * from "./wheel.js";
|
|
12
|
+
|
|
13
|
+
export * from "./__ZikoEvent__.js";
|
|
14
|
+
export * from "./utils.js";
|
|
15
|
+
|
|
@@ -19,9 +19,9 @@ function details_setter(){
|
|
|
19
19
|
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
|
-
const
|
|
22
|
+
const bindKeyEvent = (target, customizer) => new ZikoEventKey(target, customizer)
|
|
23
23
|
|
|
24
24
|
export{
|
|
25
|
-
|
|
25
|
+
bindKeyEvent,
|
|
26
26
|
ZikoEventKey
|
|
27
27
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __ZikoEvent__ } from "./__ZikoEvent__.js";
|
|
2
|
+
import { Events } from "./__Events__.js";
|
|
3
|
+
class ZikoEventMouse extends __ZikoEvent__{
|
|
4
|
+
constructor(target, customizer){
|
|
5
|
+
super(target, Events.Mouse, details_setter, customizer)
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
function details_setter(){
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
const bindMouseEvent = (target, customizer) => new ZikoEventMouse(target, customizer)
|
|
12
|
+
|
|
13
|
+
export{
|
|
14
|
+
bindMouseEvent,
|
|
15
|
+
ZikoEventMouse
|
|
16
|
+
}
|
|
@@ -16,7 +16,7 @@ function details_setter(){
|
|
|
16
16
|
case "pointermove" : {
|
|
17
17
|
this.mx = parseInt(this.event.offsetX);
|
|
18
18
|
this.my = parseInt(this.event.offsetY);
|
|
19
|
-
this.
|
|
19
|
+
this.isMoving = true
|
|
20
20
|
}; break;
|
|
21
21
|
case "pointerup" : {
|
|
22
22
|
this.ux = parseInt(this.event.offsetX);
|
|
@@ -39,10 +39,9 @@ function details_setter(){
|
|
|
39
39
|
// else this.dx = 1
|
|
40
40
|
// console.log(this.currentEvent)
|
|
41
41
|
}
|
|
42
|
-
const
|
|
42
|
+
const bindPointerEvent = (target, customizer) => new ZikoEventPointer(target, customizer)
|
|
43
43
|
|
|
44
|
-
globalThis.expPointer = __usePointerEvent
|
|
45
44
|
export{
|
|
46
|
-
|
|
45
|
+
bindPointerEvent,
|
|
47
46
|
ZikoEventPointer
|
|
48
47
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __ZikoEvent__ } from "./__ZikoEvent__.js";
|
|
2
|
+
import { Events } from "./__Events__.js";
|
|
3
|
+
class ZikoEventTouch extends __ZikoEvent__{
|
|
4
|
+
constructor(target, customizer){
|
|
5
|
+
super(target, Events.Touch, details_setter, customizer)
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
function details_setter(){
|
|
9
|
+
|
|
10
|
+
}
|
|
11
|
+
const bindTouchEvent = (target, customizer) => new ZikoEventTouch(target, customizer)
|
|
12
|
+
|
|
13
|
+
export{
|
|
14
|
+
bindTouchEvent,
|
|
15
|
+
ZikoEventTouch
|
|
16
|
+
}
|