ziko 0.0.5 → 0.0.6
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 +9999 -9853
- package/dist/ziko.js +10000 -9854
- package/dist/ziko.min.js +2 -2
- package/dist/ziko.mjs +9999 -9853
- package/package.json +12 -4
- package/starter/bin/index.js +10 -0
- package/wrapper/react/README.md +26 -0
- package/wrapper/react/index.jsx +7 -1
- package/wrapper/svelte/ZikoUI.svelte +15 -0
- package/wrapper/vue/ZikoUI.vue +8 -2
- package/core/App/Accessibility/index.js +0 -0
- package/core/App/Globals/__Target__.js +0 -3
- package/core/App/Globals/__UI__.js +0 -38
- package/core/App/Globals/__init__.js +0 -8
- package/core/App/Globals/index.js +0 -18
- package/core/App/Router/index.js +0 -40
- package/core/App/Seo/index.js +0 -43
- package/core/App/Themes/dark.js +0 -885
- package/core/App/Themes/index.js +0 -11
- package/core/App/Themes/light.js +0 -255
- package/core/App/app.js +0 -46
- package/core/App/index.js +0 -12
- package/core/Data/Api/fetchdom.js +0 -14
- package/core/Data/Api/index.js +0 -4
- package/core/Data/Api/preload.js +0 -11
- package/core/Data/Converter/canvas.js +0 -25
- package/core/Data/Converter/csv.js +0 -33
- package/core/Data/Converter/index.js +0 -25
- package/core/Data/Converter/json.js +0 -80
- package/core/Data/Converter/markdown.js +0 -83
- package/core/Data/Converter/svg.js +0 -11
- package/core/Data/Parser/markdown.js +0 -0
- package/core/Data/Parser/xml.js +0 -47
- package/core/Data/Strings/index.js +0 -26
- package/core/Data/decorators.js +0 -0
- package/core/Data/index.js +0 -64
- package/core/Graphics/Canvas/Elements/Basic/arc.js +0 -43
- package/core/Graphics/Canvas/Elements/Basic/image.js +0 -0
- package/core/Graphics/Canvas/Elements/Basic/line.js +0 -26
- package/core/Graphics/Canvas/Elements/Basic/path.js +0 -0
- package/core/Graphics/Canvas/Elements/Basic/points.js +0 -48
- package/core/Graphics/Canvas/Elements/Basic/polygon.js +0 -7
- package/core/Graphics/Canvas/Elements/Basic/polyline.js +0 -0
- package/core/Graphics/Canvas/Elements/Basic/rect.js +0 -46
- package/core/Graphics/Canvas/Elements/Basic/text.js +0 -0
- package/core/Graphics/Canvas/Elements/Chart/histogram.js +0 -0
- package/core/Graphics/Canvas/Elements/Chart/plot.js +0 -0
- package/core/Graphics/Canvas/Elements/Chart/scatter.js +0 -2
- package/core/Graphics/Canvas/Elements/Chart/stem.js +0 -0
- package/core/Graphics/Canvas/Elements/Element.js +0 -115
- package/core/Graphics/Canvas/Elements/Groupe.js +0 -0
- package/core/Graphics/Canvas/Elements/grid.js +0 -0
- package/core/Graphics/Canvas/Elements/index.js +0 -13
- package/core/Graphics/Canvas/Filter/index.js +0 -0
- package/core/Graphics/Canvas/Paint/index.js +0 -0
- package/core/Graphics/Canvas/Utils/color.js +0 -8
- package/core/Graphics/Canvas/Utils/floodFill.js +0 -58
- package/core/Graphics/Canvas/_canvas_offscreen +0 -0
- package/core/Graphics/Canvas/canvas.js +0 -189
- package/core/Graphics/Canvas/index.js +0 -15
- package/core/Graphics/Svg/Elements/ZikoSvgElement.js +0 -28
- package/core/Graphics/Svg/Elements/circle.js +0 -34
- package/core/Graphics/Svg/Elements/ellipse.js +0 -29
- package/core/Graphics/Svg/Elements/foreignObject.js +0 -46
- package/core/Graphics/Svg/Elements/grid.js +0 -9
- package/core/Graphics/Svg/Elements/groupe.js +0 -29
- package/core/Graphics/Svg/Elements/image.js +0 -33
- package/core/Graphics/Svg/Elements/line.js +0 -29
- package/core/Graphics/Svg/Elements/path.js +0 -59
- package/core/Graphics/Svg/Elements/polygon.js +0 -31
- package/core/Graphics/Svg/Elements/polyline.js +0 -4
- package/core/Graphics/Svg/Elements/rect.js +0 -43
- package/core/Graphics/Svg/Elements/text.js +0 -26
- package/core/Graphics/Svg/index.js +0 -1
- package/core/Graphics/Svg/svg.js +0 -117
- package/core/Graphics/index.js +0 -61
- package/core/Math/Calculus/Special Functions/bessel.js +0 -31
- package/core/Math/Calculus/Special Functions/beta.js +0 -38
- package/core/Math/Calculus/Special Functions/gamma.js +0 -30
- package/core/Math/Calculus/Special Functions/index.js +0 -4
- package/core/Math/Calculus/index.js +0 -1
- package/core/Math/Complex/Fractals/julia.js +0 -0
- package/core/Math/Complex/index.js +0 -191
- package/core/Math/Discret/Combinaison/index.js +0 -34
- package/core/Math/Discret/Conversion/index.js +0 -86
- package/core/Math/Discret/Logic/index.js +0 -46
- package/core/Math/Discret/Permutation/index.js +0 -31
- package/core/Math/Discret/Set/index.js +0 -2
- package/core/Math/Discret/Set/powerSet.js +0 -15
- package/core/Math/Discret/Set/subSet.js +0 -10
- package/core/Math/Discret/index.js +0 -23
- package/core/Math/Functions/index.js +0 -182
- package/core/Math/Matrix/Decomposition.js +0 -90
- package/core/Math/Matrix/LinearSystem.js +0 -10
- package/core/Math/Matrix/Matrix.js +0 -712
- package/core/Math/Matrix/index.js +0 -3
- package/core/Math/Numeric/index.js +0 -0
- package/core/Math/Random/index.js +0 -173
- package/core/Math/Signal/__np.py.txt +0 -40
- package/core/Math/Signal/conv.js +0 -175
- package/core/Math/Signal/fft.js +0 -55
- package/core/Math/Signal/filter.js +0 -39
- package/core/Math/Signal/functions.js +0 -146
- package/core/Math/Signal/index.js +0 -110
- package/core/Math/Statistics/Functions/index.js +0 -100
- package/core/Math/Statistics/index.js +0 -16
- package/core/Math/Utils/arithmetic.js +0 -139
- package/core/Math/Utils/checkers.js +0 -11
- package/core/Math/Utils/comparaison.js +0 -1
- package/core/Math/Utils/conversions.js +0 -7
- package/core/Math/Utils/discret.js +0 -28
- package/core/Math/Utils/index.js +0 -102
- package/core/Math/Utils/mapfun.js +0 -43
- package/core/Math/absract.js +0 -1
- package/core/Math/const.js +0 -3
- package/core/Math/index.js +0 -193
- package/core/Reactivity/Events/Global/Click.js +0 -56
- package/core/Reactivity/Events/Global/Clipboard.js +0 -84
- package/core/Reactivity/Events/Global/CustomEvent.js +0 -53
- package/core/Reactivity/Events/Global/Drag.js +0 -137
- package/core/Reactivity/Events/Global/Focus.js +0 -56
- package/core/Reactivity/Events/Global/Key.js +0 -104
- package/core/Reactivity/Events/Global/Mouse.js +0 -230
- package/core/Reactivity/Events/Global/Pointer.js +0 -214
- package/core/Reactivity/Events/Global/Touch.js +0 -0
- package/core/Reactivity/Events/Global/Wheel.js +0 -44
- package/core/Reactivity/Events/Partiel/Hash.js +0 -44
- package/core/Reactivity/Events/Partiel/Input.js +0 -59
- package/core/Reactivity/Events/Partiel/MediaEvent.js +0 -1
- package/core/Reactivity/Events/ZikoEvent.js +0 -91
- package/core/Reactivity/Events/index.js +0 -60
- package/core/Reactivity/Observer/index.js +0 -3
- package/core/Reactivity/Observer/intersection.js +0 -40
- package/core/Reactivity/Observer/mutation.js +0 -90
- package/core/Reactivity/Observer/resize.js +0 -47
- package/core/Reactivity/Use/Contexte/index.js +0 -1
- package/core/Reactivity/Use/Contexte/useSuccesifKeys.js +0 -14
- package/core/Reactivity/Use/Decorators/index.js +0 -4
- package/core/Reactivity/Use/Interactions/index.js +0 -4
- package/core/Reactivity/Use/Interactions/useBluetooth.js +0 -48
- package/core/Reactivity/Use/Interactions/useChannel.js +0 -50
- package/core/Reactivity/Use/Interactions/useEventEmmiter.js +0 -64
- package/core/Reactivity/Use/Interactions/useSerial.js +0 -0
- package/core/Reactivity/Use/Interactions/useThread.js +0 -44
- package/core/Reactivity/Use/Interactions/useUsb.js +0 -0
- package/core/Reactivity/Use/Sensors/index.js +0 -2
- package/core/Reactivity/Use/Sensors/useBattery.js +0 -36
- package/core/Reactivity/Use/Sensors/useCamera.js +0 -0
- package/core/Reactivity/Use/Sensors/useGeolocation.js +0 -17
- package/core/Reactivity/Use/Sensors/useMicro.js +0 -0
- package/core/Reactivity/Use/Sensors/useOrientation.js +0 -0
- package/core/Reactivity/Use/Storage/index.js +0 -1
- package/core/Reactivity/Use/Storage/useCookie.js +0 -0
- package/core/Reactivity/Use/Storage/useIndexedDb.js +0 -0
- package/core/Reactivity/Use/Storage/useStorage.js +0 -74
- package/core/Reactivity/Use/UI/index.js +0 -4
- package/core/Reactivity/Use/UI/useCssLink.js +0 -0
- package/core/Reactivity/Use/UI/useCssText.js +0 -21
- package/core/Reactivity/Use/UI/useFavIcon.js +0 -38
- package/core/Reactivity/Use/UI/useLinearGradient.js +0 -0
- package/core/Reactivity/Use/UI/useMediaQuery.js +0 -1
- package/core/Reactivity/Use/UI/useRadialGradient.js +0 -0
- package/core/Reactivity/Use/UI/useStyle.js +0 -54
- package/core/Reactivity/Use/UI/useTheme.js +0 -62
- package/core/Reactivity/Use/UI/useTitle.js +0 -30
- package/core/Reactivity/Use/index.js +0 -82
- package/core/Reactivity/Use/todo.md +0 -26
- package/core/Reactivity/index.js +0 -3
- package/core/Time/animation.js +0 -76
- package/core/Time/index.js +0 -54
- package/core/Time/loop.js +0 -83
- package/core/Time/utils/decorators.js +0 -17
- package/core/Time/utils/ease.js +0 -144
- package/core/Time/utils/index.js +0 -18
- package/core/Time/utils/performance.js +0 -16
- package/core/Time/utils/ui.js +0 -26
- package/core/UI/CustomElement/Elements/Accordion/index.js +0 -62
- package/core/UI/CustomElement/Elements/Carousel/index.js +0 -47
- package/core/UI/CustomElement/Elements/CodeNote/CodeCell.js +0 -176
- package/core/UI/CustomElement/Elements/CodeNote/CodeNote.js +0 -69
- package/core/UI/CustomElement/Elements/CodeNote/SubElements.js +0 -64
- package/core/UI/CustomElement/Elements/CodeNote/index.js +0 -2
- package/core/UI/CustomElement/Elements/Columns.js +0 -1
- package/core/UI/CustomElement/Elements/FAB.js +0 -0
- package/core/UI/CustomElement/Elements/Menu.js +0 -0
- package/core/UI/CustomElement/Elements/Notification.js +0 -0
- package/core/UI/CustomElement/Elements/Popover.js +0 -0
- package/core/UI/CustomElement/Elements/Popup.js +0 -0
- package/core/UI/CustomElement/Elements/Swipper.js +0 -4
- package/core/UI/CustomElement/Elements/Tabs/index.js +0 -111
- package/core/UI/CustomElement/Elements/Timeline.js +0 -0
- package/core/UI/CustomElement/Elements/Toast.js +0 -0
- package/core/UI/CustomElement/Elements/Treeview.js +0 -0
- package/core/UI/CustomElement/Elements/index.js +0 -4
- package/core/UI/CustomElement/Flex.js +0 -97
- package/core/UI/CustomElement/Grid.js +0 -30
- package/core/UI/CustomElement/index.js +0 -3
- package/core/UI/Embaded/index.js +0 -1
- package/core/UI/Inputs/Primitives/btn.js +0 -30
- package/core/UI/Inputs/Primitives/elements.js +0 -28
- package/core/UI/Inputs/Primitives/inputs.js +0 -324
- package/core/UI/Inputs/Primitives/select.js +0 -14
- package/core/UI/Inputs/Primitives/textarea.js +0 -15
- package/core/UI/Inputs/camera.js +0 -23
- package/core/UI/Inputs/index.js +0 -20
- package/core/UI/List/elements.js +0 -0
- package/core/UI/List/index.js +0 -127
- package/core/UI/Media/Audio/index.js +0 -38
- package/core/UI/Media/Image/figure.js +0 -16
- package/core/UI/Media/Image/image.js +0 -33
- package/core/UI/Media/Image/index.js +0 -2
- package/core/UI/Media/Video/index.js +0 -49
- package/core/UI/Media/index.js +0 -3
- package/core/UI/Misc/index.js +0 -45
- package/core/UI/Semantic/index.js +0 -61
- package/core/UI/Style/index.js +0 -499
- package/core/UI/Table/elements.js +0 -94
- package/core/UI/Table/index.js +0 -3
- package/core/UI/Table/table.js +0 -112
- package/core/UI/Table/utils.js +0 -12
- package/core/UI/Text/heading.js +0 -34
- package/core/UI/Text/index.js +0 -3
- package/core/UI/Text/p.js +0 -36
- package/core/UI/Text/pre.js +0 -0
- package/core/UI/Text/text.js +0 -65
- package/core/UI/Utils/index.js +0 -70
- package/core/UI/ZikoUIElement.js +0 -503
- package/core/UI/index.js +0 -154
- package/core/__proto__/Array.js +0 -74
- package/core/__proto__/Function.js +0 -0
- package/core/__proto__/Number.js +0 -76
- package/core/__proto__/Object.js +0 -0
- package/core/__proto__/String.js +0 -0
- package/core/index.js +0 -72
- package/wrapper/react/readme.md +0 -19
package/core/UI/List/index.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import ZikoUIElement from "../ZikoUIElement.js";
|
|
2
|
-
import {text} from "../Text/index.js";
|
|
3
|
-
class ZikoUILI extends ZikoUIElement{
|
|
4
|
-
constructor(UI){
|
|
5
|
-
super();
|
|
6
|
-
this.element=document.createElement("li");
|
|
7
|
-
this.append(UI);
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
class ZikoUIList extends ZikoUIElement {
|
|
11
|
-
constructor(element,name) {
|
|
12
|
-
super(element,name);
|
|
13
|
-
delete this.append;
|
|
14
|
-
//this.style({ listStylePosition: "inside" });
|
|
15
|
-
}
|
|
16
|
-
append(...arr){
|
|
17
|
-
for (let i = 0; i < arr.length; i++) {
|
|
18
|
-
let li = null;
|
|
19
|
-
if(["string","number"].includes(typeof arr[i]))arr[i]=text(arr[i])
|
|
20
|
-
if (arr[i] instanceof ZikoUIElement)li=new ZikoUILI(arr[i]);
|
|
21
|
-
li.setTarget(this.element)
|
|
22
|
-
this.items.push(li[0]);
|
|
23
|
-
this.maintain();
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
remove(...ele) {
|
|
27
|
-
if(ele.length==0){
|
|
28
|
-
if(this.Target.children.length) this.Target.removeChild(this.element);
|
|
29
|
-
}
|
|
30
|
-
else {
|
|
31
|
-
const remove = (ele) => {
|
|
32
|
-
if(typeof ele === "number") ele=this.items[ele];
|
|
33
|
-
if(ele instanceof ZikoUIElement)this.element.removeChild(ele.parent.element);
|
|
34
|
-
this.items=this.items.filter(n=>n!==ele);
|
|
35
|
-
};
|
|
36
|
-
for (let i = 0; i < ele.length; i++) remove(ele[i]);
|
|
37
|
-
for (let i = 0; i < this.items.length; i++)
|
|
38
|
-
Object.assign(this, { [[i]]: this.items[i] });
|
|
39
|
-
}
|
|
40
|
-
return this;
|
|
41
|
-
}
|
|
42
|
-
insertAt(index, ...ele) {
|
|
43
|
-
if (index >= this.element.children.length) this.append(...ele);
|
|
44
|
-
else
|
|
45
|
-
for (let i = 0; i < ele.length; i++) {
|
|
46
|
-
let li = null;
|
|
47
|
-
if(["number","string"].includes(typeof ele[i]))ele[i]=text(ele[i]);
|
|
48
|
-
if (ele[i] instanceof ZikoUIElement)li=new ZikoUILI(ele[i]);
|
|
49
|
-
this.element.insertBefore(li.element, this.items[index].parent.element);
|
|
50
|
-
this.items.splice(index, 0, ele[i][0]);
|
|
51
|
-
}
|
|
52
|
-
return this;
|
|
53
|
-
}
|
|
54
|
-
filterByTextContent(text,exactMatch=false){
|
|
55
|
-
this.items.map(n=>n.parent.render());
|
|
56
|
-
this.items.filter(n=>{
|
|
57
|
-
const content=n.element.textContent
|
|
58
|
-
return !(exactMatch?content===text:content.includes(text))
|
|
59
|
-
}).map(n=>n.parent.render(false));
|
|
60
|
-
return this;
|
|
61
|
-
}
|
|
62
|
-
sortByTextContent(order=1){
|
|
63
|
-
this.items.map(n=>n.parent.render(false));
|
|
64
|
-
// To Fix
|
|
65
|
-
this.sortedItems=this.items.sort((a,b)=>order*a.element.textContent.localeCompare(b.element.textContent))
|
|
66
|
-
this.append(...this.sortedItems);
|
|
67
|
-
return this;
|
|
68
|
-
}
|
|
69
|
-
filterByClass(value) {
|
|
70
|
-
this.items.map(n=>n.parent.render(true));
|
|
71
|
-
this.items.filter(n=>!n.Classes.includes(value)).map(n=>n.parent.render(false));
|
|
72
|
-
return this;
|
|
73
|
-
}
|
|
74
|
-
delete(value) {
|
|
75
|
-
const valueIndex = [...this.element.children].indexOf(value);
|
|
76
|
-
return valueIndex;
|
|
77
|
-
/*if(valueIndex >= 0) {
|
|
78
|
-
return this.list.splice(valueIndex, 1);
|
|
79
|
-
}*/
|
|
80
|
-
}
|
|
81
|
-
push(){
|
|
82
|
-
|
|
83
|
-
}
|
|
84
|
-
pop(){
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
unshift(){
|
|
88
|
-
|
|
89
|
-
}
|
|
90
|
-
shift(){
|
|
91
|
-
|
|
92
|
-
}
|
|
93
|
-
sort(){
|
|
94
|
-
|
|
95
|
-
}
|
|
96
|
-
filter(){
|
|
97
|
-
|
|
98
|
-
}
|
|
99
|
-
slice(){
|
|
100
|
-
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
class ZikoUIOList extends ZikoUIList{
|
|
104
|
-
constructor(...arr){
|
|
105
|
-
super("ol","ol");
|
|
106
|
-
this.append(...arr);
|
|
107
|
-
}
|
|
108
|
-
type(tp = 1) {
|
|
109
|
-
this.element.setAttribute("type", tp);
|
|
110
|
-
return this;
|
|
111
|
-
}
|
|
112
|
-
start(st = 1) {
|
|
113
|
-
this.element.setAttribute("start", st);
|
|
114
|
-
return this;
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
class ZikoUIUList extends ZikoUIList{
|
|
118
|
-
constructor(...arr){
|
|
119
|
-
super("ul","ul");
|
|
120
|
-
this.append(...arr);
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
const li=UI=>new ZikoUILI(UI)
|
|
124
|
-
const ol = (...arr) => new ZikoUIOList(...arr);
|
|
125
|
-
const ul = (...arr) => new ZikoUIUList(...arr);
|
|
126
|
-
|
|
127
|
-
export{ol,ul,li}
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import ZikoUIElement from "../../ZikoUIElement";
|
|
2
|
-
class ZikoUIAudio extends ZikoUIElement {
|
|
3
|
-
constructor(src) {
|
|
4
|
-
super("audio","audio");
|
|
5
|
-
this.element.setAttribute("src", src);
|
|
6
|
-
this.useControls();
|
|
7
|
-
}
|
|
8
|
-
get t(){
|
|
9
|
-
return this.element.currentTime;
|
|
10
|
-
}
|
|
11
|
-
useControls(enabled = true) {
|
|
12
|
-
this.element.controls = enabled;
|
|
13
|
-
return this;
|
|
14
|
-
}
|
|
15
|
-
play() {
|
|
16
|
-
this.element.play();
|
|
17
|
-
return this;
|
|
18
|
-
}
|
|
19
|
-
pause() {
|
|
20
|
-
this.element.pause();
|
|
21
|
-
return this;
|
|
22
|
-
}
|
|
23
|
-
seekTo(time) {
|
|
24
|
-
this.element.currentTime = time;
|
|
25
|
-
return this;
|
|
26
|
-
}
|
|
27
|
-
onPlay(){
|
|
28
|
-
|
|
29
|
-
}
|
|
30
|
-
onPause(){
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
const audio = (src) => new ZikoUIAudio(src);
|
|
35
|
-
export {
|
|
36
|
-
audio,
|
|
37
|
-
ZikoUIAudio
|
|
38
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import ZikoUIElement from "../../ZikoUIElement";
|
|
2
|
-
class ZikoUIFigure extends ZikoUIElement{
|
|
3
|
-
constructor(src,caption){
|
|
4
|
-
super("figure","figure")
|
|
5
|
-
this.img=src.width("100%").element;
|
|
6
|
-
this.caption=document.createElement("figcaption");
|
|
7
|
-
this.caption.append(caption.element)
|
|
8
|
-
this.element.append(this.img);
|
|
9
|
-
this.element.append(this.caption);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
const figure =(image,caption) =>new ZikoUIFigure(image,caption);
|
|
13
|
-
export{
|
|
14
|
-
figure,
|
|
15
|
-
ZikoUIFigure
|
|
16
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import ZikoUIElement from "../../ZikoUIElement.js";
|
|
2
|
-
class ZikoUIImage extends ZikoUIElement {
|
|
3
|
-
constructor(src, w, h) {
|
|
4
|
-
super("image","image");
|
|
5
|
-
this.value=src;
|
|
6
|
-
if (src.nodeName === "IMG")this.element.setAttribute("src", src.src);
|
|
7
|
-
else this.element.setAttribute("src", src);
|
|
8
|
-
if (typeof w == "number") w += "%";
|
|
9
|
-
if (typeof h == "number") h += "%";
|
|
10
|
-
this.style({ border: "1px solid black", width: w, height: h });
|
|
11
|
-
}
|
|
12
|
-
updateSrc(url){
|
|
13
|
-
this.value=url;
|
|
14
|
-
this.element.src=url;
|
|
15
|
-
return this;
|
|
16
|
-
}
|
|
17
|
-
toggleSrc(...values){
|
|
18
|
-
values=values.map(n=>""+n);
|
|
19
|
-
let index=values.indexOf(""+this.value);
|
|
20
|
-
if(index!=-1&&index!=(values.length-1))this.updateSrc(values[index+1]);
|
|
21
|
-
else this.updateSrc(values[0]);
|
|
22
|
-
return this;
|
|
23
|
-
}
|
|
24
|
-
alt(alt){
|
|
25
|
-
this.element.alt=alt;
|
|
26
|
-
return this;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
const image = (src, width, height) => new ZikoUIImage(src, width, height);
|
|
30
|
-
export{
|
|
31
|
-
image,
|
|
32
|
-
ZikoUIImage
|
|
33
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import ZikoUIElement from "../../ZikoUIElement.js";
|
|
2
|
-
class ZikoUIVideo extends ZikoUIElement {
|
|
3
|
-
constructor(src="", w = "100%", h = "50vh") {
|
|
4
|
-
super("video","video");
|
|
5
|
-
if (src.nodeName === "VIDEO") this.element.setAttribute("src", src.src);
|
|
6
|
-
else this.element.setAttribute("src", src);
|
|
7
|
-
if (typeof w == "number") w += "%";
|
|
8
|
-
if (typeof h == "number") h += "%";
|
|
9
|
-
this.style({ width: w, height: h });
|
|
10
|
-
}
|
|
11
|
-
get t(){
|
|
12
|
-
return this.element.currentTime;
|
|
13
|
-
}
|
|
14
|
-
useControls(enabled = true) {
|
|
15
|
-
this.element.controls = enabled;
|
|
16
|
-
return this;
|
|
17
|
-
}
|
|
18
|
-
play() {
|
|
19
|
-
this.element.play();
|
|
20
|
-
return this;
|
|
21
|
-
}
|
|
22
|
-
pause() {
|
|
23
|
-
this.element.pause();
|
|
24
|
-
return this;
|
|
25
|
-
}
|
|
26
|
-
poster(src=""){
|
|
27
|
-
this.element.poster=src;
|
|
28
|
-
return this;
|
|
29
|
-
}
|
|
30
|
-
usePIP(e){
|
|
31
|
-
this.element.requestPictureInPicture(e);
|
|
32
|
-
return this;
|
|
33
|
-
}
|
|
34
|
-
seekTo(time) {
|
|
35
|
-
this.element.currentTime = time;
|
|
36
|
-
return this;
|
|
37
|
-
}
|
|
38
|
-
onPlay(){
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
onPause(){
|
|
42
|
-
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
const video = (src, width, height) => new ZikoUIVideo(src, width, height);
|
|
46
|
-
export {
|
|
47
|
-
video,
|
|
48
|
-
ZikoUIVideo
|
|
49
|
-
}
|
package/core/UI/Media/index.js
DELETED
package/core/UI/Misc/index.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import ZikoUIElement from "../ZikoUIElement.js";
|
|
2
|
-
class ZikoUIHtmlTag extends ZikoUIElement {
|
|
3
|
-
constructor(element) {
|
|
4
|
-
super(element,"html");
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
class ZikoUIBr extends ZikoUIElement {
|
|
8
|
-
constructor() {
|
|
9
|
-
super("br","br");
|
|
10
|
-
delete this.append
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
class ZikoUIHr extends ZikoUIElement {
|
|
14
|
-
constructor() {
|
|
15
|
-
super("hr","hr");
|
|
16
|
-
delete this.append
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
class ZikoUILink extends ZikoUIElement{
|
|
20
|
-
constructor(href){
|
|
21
|
-
super("a","link");
|
|
22
|
-
this.setHref(href);
|
|
23
|
-
}
|
|
24
|
-
setHref(href){
|
|
25
|
-
this.element.href=href;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
const br = () => new ZikoUIBr();
|
|
29
|
-
const hr = () => new ZikoUIHr();
|
|
30
|
-
const brs = (n=1)=> new Array(n).fill(new ZikoUIBr());
|
|
31
|
-
const hrs = (n=1)=> new Array(n).fill(new ZikoUIHr());
|
|
32
|
-
const link=(href,...UIElement)=>new ZikoUILink(href).append(...UIElement);
|
|
33
|
-
const html=(tag,...UIElement)=>new ZikoUIHtmlTag(tag).append(...UIElement);
|
|
34
|
-
export{
|
|
35
|
-
html,
|
|
36
|
-
br,
|
|
37
|
-
hr,
|
|
38
|
-
brs,
|
|
39
|
-
hrs,
|
|
40
|
-
link,
|
|
41
|
-
ZikoUIHtmlTag,
|
|
42
|
-
ZikoUIBr,
|
|
43
|
-
ZikoUIHr,
|
|
44
|
-
ZikoUILink
|
|
45
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import ZikoUIElement from "../ZikoUIElement.js";
|
|
2
|
-
class ZikoUIMain extends ZikoUIElement{
|
|
3
|
-
constructor(){
|
|
4
|
-
super("main","Main");
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
class ZikoUIHeader extends ZikoUIElement{
|
|
8
|
-
constructor(){
|
|
9
|
-
super("header","Header");
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
class ZikoUINav extends ZikoUIElement{
|
|
13
|
-
constructor(){
|
|
14
|
-
super("nav","Nav");
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
class ZikoUISection extends ZikoUIElement{
|
|
18
|
-
constructor(){
|
|
19
|
-
super("section","Section");
|
|
20
|
-
this.style({position:"relative"})
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
class ZikoUIArticle extends ZikoUIElement{
|
|
24
|
-
constructor(){
|
|
25
|
-
super("article","Article");
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
class ZikoUIAside extends ZikoUIElement{
|
|
29
|
-
constructor(){
|
|
30
|
-
super("aside","Aside");
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
class ZikoUIFooter extends ZikoUIElement{
|
|
34
|
-
constructor(){
|
|
35
|
-
super("footer","Footer");
|
|
36
|
-
this.element=document.createElement("footer");
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
const Section = (...ZikoUIElement) => new ZikoUISection().append(...ZikoUIElement);
|
|
40
|
-
const Article = (...ZikoUIElement) => new ZikoUIArticle().append(...ZikoUIElement);
|
|
41
|
-
const Main = (...ZikoUIElement) => new ZikoUIMain().append(...ZikoUIElement);
|
|
42
|
-
const Header = (...ZikoUIElement) => new ZikoUIHeader().append(...ZikoUIElement);
|
|
43
|
-
const Footer = (...ZikoUIElement) => new ZikoUIFooter().append(...ZikoUIElement);
|
|
44
|
-
const Nav = (...ZikoUIElement) => new ZikoUINav().append(...ZikoUIElement);
|
|
45
|
-
const Aside = (...ZikoUIElement) => new ZikoUIAside().append(...ZikoUIElement);
|
|
46
|
-
export{
|
|
47
|
-
Header,
|
|
48
|
-
Main,
|
|
49
|
-
Section,
|
|
50
|
-
Article,
|
|
51
|
-
Aside,
|
|
52
|
-
Nav,
|
|
53
|
-
Footer,
|
|
54
|
-
ZikoUIHeader,
|
|
55
|
-
ZikoUIMain,
|
|
56
|
-
ZikoUISection,
|
|
57
|
-
ZikoUIArticle,
|
|
58
|
-
ZikoUIAside,
|
|
59
|
-
ZikoUINav,
|
|
60
|
-
ZikoUIFooter
|
|
61
|
-
}
|