ziko 0.0.4 → 0.0.5
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/core/App/Globals/index.js +18 -0
- package/{src → core}/App/app.js +1 -1
- package/{src → core}/App/index.js +1 -0
- package/{src → core}/Graphics/Canvas/canvas.js +1 -1
- package/{src → core}/Reactivity/Events/index.js +1 -1
- package/{src → core}/UI/CustomElement/Elements/Accordion/index.js +2 -2
- package/{src → core}/UI/CustomElement/Elements/CodeNote/CodeCell.js +1 -1
- package/{src → core}/UI/CustomElement/Elements/CodeNote/SubElements.js +4 -4
- package/{src → core}/UI/Inputs/Primitives/btn.js +1 -2
- package/{src → core}/UI/Inputs/Primitives/inputs.js +0 -10
- package/{src → core}/UI/Inputs/Primitives/select.js +0 -1
- package/{src → core}/UI/Inputs/Primitives/textarea.js +0 -1
- package/{src → core}/UI/List/index.js +0 -3
- package/{src → core}/UI/Media/Audio/index.js +0 -1
- package/{src → core}/UI/Media/Image/figure.js +0 -1
- package/{src → core}/UI/Media/Image/image.js +0 -1
- package/{src → core}/UI/Media/Video/index.js +0 -1
- package/{src → core}/UI/Misc/index.js +5 -9
- package/{src → core}/UI/Semantic/index.js +0 -7
- package/{src → core}/UI/Table/table.js +0 -1
- package/{src → core}/UI/Text/heading.js +0 -1
- package/{src → core}/UI/Text/p.js +0 -1
- package/{src → core}/UI/Text/text.js +0 -1
- package/{src → core}/UI/ZikoUIElement.js +3 -1
- package/{src → core}/UI/index.js +3 -3
- package/{src → core}/index.js +3 -1
- package/dist/ziko.cjs +33 -53
- package/dist/ziko.js +33 -53
- package/dist/ziko.min.js +2 -2
- package/dist/ziko.mjs +32 -53
- package/package.json +5 -3
- package/wrapper/react/index.jsx +16 -0
- package/wrapper/react/readme.md +19 -0
- package/wrapper/vue/ZikoUI.vue +17 -0
- package/src/App/Globals/index.js +0 -3
- /package/{src → core}/App/Accessibility/index.js +0 -0
- /package/{src → core}/App/Globals/__Target__.js +0 -0
- /package/{src → core}/App/Globals/__UI__.js +0 -0
- /package/{src → core}/App/Globals/__init__.js +0 -0
- /package/{src → core}/App/Router/index.js +0 -0
- /package/{src → core}/App/Seo/index.js +0 -0
- /package/{src → core}/App/Themes/dark.js +0 -0
- /package/{src → core}/App/Themes/index.js +0 -0
- /package/{src → core}/App/Themes/light.js +0 -0
- /package/{src → core}/Data/Api/fetchdom.js +0 -0
- /package/{src → core}/Data/Api/index.js +0 -0
- /package/{src → core}/Data/Api/preload.js +0 -0
- /package/{src → core}/Data/Converter/canvas.js +0 -0
- /package/{src → core}/Data/Converter/csv.js +0 -0
- /package/{src → core}/Data/Converter/index.js +0 -0
- /package/{src → core}/Data/Converter/json.js +0 -0
- /package/{src → core}/Data/Converter/markdown.js +0 -0
- /package/{src → core}/Data/Converter/svg.js +0 -0
- /package/{src → core}/Data/Parser/markdown.js +0 -0
- /package/{src → core}/Data/Parser/xml.js +0 -0
- /package/{src → core}/Data/Strings/index.js +0 -0
- /package/{src → core}/Data/decorators.js +0 -0
- /package/{src → core}/Data/index.js +0 -0
- /package/{src → core}/Graphics/Canvas/Elements/Basic/arc.js +0 -0
- /package/{src → core}/Graphics/Canvas/Elements/Basic/image.js +0 -0
- /package/{src → core}/Graphics/Canvas/Elements/Basic/line.js +0 -0
- /package/{src → core}/Graphics/Canvas/Elements/Basic/path.js +0 -0
- /package/{src → core}/Graphics/Canvas/Elements/Basic/points.js +0 -0
- /package/{src → core}/Graphics/Canvas/Elements/Basic/polygon.js +0 -0
- /package/{src → core}/Graphics/Canvas/Elements/Basic/polyline.js +0 -0
- /package/{src → core}/Graphics/Canvas/Elements/Basic/rect.js +0 -0
- /package/{src → core}/Graphics/Canvas/Elements/Basic/text.js +0 -0
- /package/{src → core}/Graphics/Canvas/Elements/Chart/histogram.js +0 -0
- /package/{src → core}/Graphics/Canvas/Elements/Chart/plot.js +0 -0
- /package/{src → core}/Graphics/Canvas/Elements/Chart/scatter.js +0 -0
- /package/{src → core}/Graphics/Canvas/Elements/Chart/stem.js +0 -0
- /package/{src → core}/Graphics/Canvas/Elements/Element.js +0 -0
- /package/{src → core}/Graphics/Canvas/Elements/Groupe.js +0 -0
- /package/{src → core}/Graphics/Canvas/Elements/grid.js +0 -0
- /package/{src → core}/Graphics/Canvas/Elements/index.js +0 -0
- /package/{src → core}/Graphics/Canvas/Filter/index.js +0 -0
- /package/{src → core}/Graphics/Canvas/Paint/index.js +0 -0
- /package/{src → core}/Graphics/Canvas/Utils/color.js +0 -0
- /package/{src → core}/Graphics/Canvas/Utils/floodFill.js +0 -0
- /package/{src → core}/Graphics/Canvas/_canvas_offscreen +0 -0
- /package/{src → core}/Graphics/Canvas/index.js +0 -0
- /package/{src → core}/Graphics/Svg/Elements/ZikoSvgElement.js +0 -0
- /package/{src → core}/Graphics/Svg/Elements/circle.js +0 -0
- /package/{src → core}/Graphics/Svg/Elements/ellipse.js +0 -0
- /package/{src → core}/Graphics/Svg/Elements/foreignObject.js +0 -0
- /package/{src → core}/Graphics/Svg/Elements/grid.js +0 -0
- /package/{src → core}/Graphics/Svg/Elements/groupe.js +0 -0
- /package/{src → core}/Graphics/Svg/Elements/image.js +0 -0
- /package/{src → core}/Graphics/Svg/Elements/line.js +0 -0
- /package/{src → core}/Graphics/Svg/Elements/path.js +0 -0
- /package/{src → core}/Graphics/Svg/Elements/polygon.js +0 -0
- /package/{src → core}/Graphics/Svg/Elements/polyline.js +0 -0
- /package/{src → core}/Graphics/Svg/Elements/rect.js +0 -0
- /package/{src → core}/Graphics/Svg/Elements/text.js +0 -0
- /package/{src → core}/Graphics/Svg/index.js +0 -0
- /package/{src → core}/Graphics/Svg/svg.js +0 -0
- /package/{src → core}/Graphics/index.js +0 -0
- /package/{src → core}/Math/Calculus/Special Functions/bessel.js +0 -0
- /package/{src → core}/Math/Calculus/Special Functions/beta.js +0 -0
- /package/{src → core}/Math/Calculus/Special Functions/gamma.js +0 -0
- /package/{src → core}/Math/Calculus/Special Functions/index.js +0 -0
- /package/{src → core}/Math/Calculus/index.js +0 -0
- /package/{src → core}/Math/Complex/Fractals/julia.js +0 -0
- /package/{src → core}/Math/Complex/index.js +0 -0
- /package/{src → core}/Math/Discret/Combinaison/index.js +0 -0
- /package/{src → core}/Math/Discret/Conversion/index.js +0 -0
- /package/{src → core}/Math/Discret/Logic/index.js +0 -0
- /package/{src → core}/Math/Discret/Permutation/index.js +0 -0
- /package/{src → core}/Math/Discret/Set/index.js +0 -0
- /package/{src → core}/Math/Discret/Set/powerSet.js +0 -0
- /package/{src → core}/Math/Discret/Set/subSet.js +0 -0
- /package/{src → core}/Math/Discret/index.js +0 -0
- /package/{src → core}/Math/Functions/index.js +0 -0
- /package/{src → core}/Math/Matrix/Decomposition.js +0 -0
- /package/{src → core}/Math/Matrix/LinearSystem.js +0 -0
- /package/{src → core}/Math/Matrix/Matrix.js +0 -0
- /package/{src → core}/Math/Matrix/index.js +0 -0
- /package/{src → core}/Math/Numeric/index.js +0 -0
- /package/{src → core}/Math/Random/index.js +0 -0
- /package/{src → core}/Math/Signal/__np.py.txt +0 -0
- /package/{src → core}/Math/Signal/conv.js +0 -0
- /package/{src → core}/Math/Signal/fft.js +0 -0
- /package/{src → core}/Math/Signal/filter.js +0 -0
- /package/{src → core}/Math/Signal/functions.js +0 -0
- /package/{src → core}/Math/Signal/index.js +0 -0
- /package/{src → core}/Math/Statistics/Functions/index.js +0 -0
- /package/{src → core}/Math/Statistics/index.js +0 -0
- /package/{src → core}/Math/Utils/arithmetic.js +0 -0
- /package/{src → core}/Math/Utils/checkers.js +0 -0
- /package/{src → core}/Math/Utils/comparaison.js +0 -0
- /package/{src → core}/Math/Utils/conversions.js +0 -0
- /package/{src → core}/Math/Utils/discret.js +0 -0
- /package/{src → core}/Math/Utils/index.js +0 -0
- /package/{src → core}/Math/Utils/mapfun.js +0 -0
- /package/{src → core}/Math/absract.js +0 -0
- /package/{src → core}/Math/const.js +0 -0
- /package/{src → core}/Math/index.js +0 -0
- /package/{src → core}/Reactivity/Events/Global/Click.js +0 -0
- /package/{src → core}/Reactivity/Events/Global/Clipboard.js +0 -0
- /package/{src → core}/Reactivity/Events/Global/CustomEvent.js +0 -0
- /package/{src → core}/Reactivity/Events/Global/Drag.js +0 -0
- /package/{src → core}/Reactivity/Events/Global/Focus.js +0 -0
- /package/{src → core}/Reactivity/Events/Global/Key.js +0 -0
- /package/{src → core}/Reactivity/Events/Global/Mouse.js +0 -0
- /package/{src → core}/Reactivity/Events/Global/Pointer.js +0 -0
- /package/{src → core}/Reactivity/Events/Global/Touch.js +0 -0
- /package/{src → core}/Reactivity/Events/Global/Wheel.js +0 -0
- /package/{src → core}/Reactivity/Events/Partiel/Hash.js +0 -0
- /package/{src → core}/Reactivity/Events/Partiel/Input.js +0 -0
- /package/{src → core}/Reactivity/Events/Partiel/MediaEvent.js +0 -0
- /package/{src → core}/Reactivity/Events/ZikoEvent.js +0 -0
- /package/{src → core}/Reactivity/Observer/index.js +0 -0
- /package/{src → core}/Reactivity/Observer/intersection.js +0 -0
- /package/{src → core}/Reactivity/Observer/mutation.js +0 -0
- /package/{src → core}/Reactivity/Observer/resize.js +0 -0
- /package/{src → core}/Reactivity/Use/Contexte/index.js +0 -0
- /package/{src → core}/Reactivity/Use/Contexte/useSuccesifKeys.js +0 -0
- /package/{src → core}/Reactivity/Use/Decorators/index.js +0 -0
- /package/{src → core}/Reactivity/Use/Interactions/index.js +0 -0
- /package/{src → core}/Reactivity/Use/Interactions/useBluetooth.js +0 -0
- /package/{src → core}/Reactivity/Use/Interactions/useChannel.js +0 -0
- /package/{src → core}/Reactivity/Use/Interactions/useEventEmmiter.js +0 -0
- /package/{src → core}/Reactivity/Use/Interactions/useSerial.js +0 -0
- /package/{src → core}/Reactivity/Use/Interactions/useThread.js +0 -0
- /package/{src → core}/Reactivity/Use/Interactions/useUsb.js +0 -0
- /package/{src → core}/Reactivity/Use/Sensors/index.js +0 -0
- /package/{src → core}/Reactivity/Use/Sensors/useBattery.js +0 -0
- /package/{src → core}/Reactivity/Use/Sensors/useCamera.js +0 -0
- /package/{src → core}/Reactivity/Use/Sensors/useGeolocation.js +0 -0
- /package/{src → core}/Reactivity/Use/Sensors/useMicro.js +0 -0
- /package/{src → core}/Reactivity/Use/Sensors/useOrientation.js +0 -0
- /package/{src → core}/Reactivity/Use/Storage/index.js +0 -0
- /package/{src → core}/Reactivity/Use/Storage/useCookie.js +0 -0
- /package/{src → core}/Reactivity/Use/Storage/useIndexedDb.js +0 -0
- /package/{src → core}/Reactivity/Use/Storage/useStorage.js +0 -0
- /package/{src → core}/Reactivity/Use/UI/index.js +0 -0
- /package/{src → core}/Reactivity/Use/UI/useCssLink.js +0 -0
- /package/{src → core}/Reactivity/Use/UI/useCssText.js +0 -0
- /package/{src → core}/Reactivity/Use/UI/useFavIcon.js +0 -0
- /package/{src → core}/Reactivity/Use/UI/useLinearGradient.js +0 -0
- /package/{src → core}/Reactivity/Use/UI/useMediaQuery.js +0 -0
- /package/{src → core}/Reactivity/Use/UI/useRadialGradient.js +0 -0
- /package/{src → core}/Reactivity/Use/UI/useStyle.js +0 -0
- /package/{src → core}/Reactivity/Use/UI/useTheme.js +0 -0
- /package/{src → core}/Reactivity/Use/UI/useTitle.js +0 -0
- /package/{src → core}/Reactivity/Use/index.js +0 -0
- /package/{src → core}/Reactivity/Use/todo.md +0 -0
- /package/{src → core}/Reactivity/index.js +0 -0
- /package/{src → core}/Time/animation.js +0 -0
- /package/{src → core}/Time/index.js +0 -0
- /package/{src → core}/Time/loop.js +0 -0
- /package/{src → core}/Time/utils/decorators.js +0 -0
- /package/{src → core}/Time/utils/ease.js +0 -0
- /package/{src → core}/Time/utils/index.js +0 -0
- /package/{src → core}/Time/utils/performance.js +0 -0
- /package/{src → core}/Time/utils/ui.js +0 -0
- /package/{src → core}/UI/CustomElement/Elements/Carousel/index.js +0 -0
- /package/{src → core}/UI/CustomElement/Elements/CodeNote/CodeNote.js +0 -0
- /package/{src → core}/UI/CustomElement/Elements/CodeNote/index.js +0 -0
- /package/{src → core}/UI/CustomElement/Elements/Columns.js +0 -0
- /package/{src → core}/UI/CustomElement/Elements/FAB.js +0 -0
- /package/{src → core}/UI/CustomElement/Elements/Menu.js +0 -0
- /package/{src → core}/UI/CustomElement/Elements/Notification.js +0 -0
- /package/{src → core}/UI/CustomElement/Elements/Popover.js +0 -0
- /package/{src → core}/UI/CustomElement/Elements/Popup.js +0 -0
- /package/{src → core}/UI/CustomElement/Elements/Swipper.js +0 -0
- /package/{src → core}/UI/CustomElement/Elements/Tabs/index.js +0 -0
- /package/{src → core}/UI/CustomElement/Elements/Timeline.js +0 -0
- /package/{src → core}/UI/CustomElement/Elements/Toast.js +0 -0
- /package/{src → core}/UI/CustomElement/Elements/Treeview.js +0 -0
- /package/{src → core}/UI/CustomElement/Elements/index.js +0 -0
- /package/{src → core}/UI/CustomElement/Flex.js +0 -0
- /package/{src → core}/UI/CustomElement/Grid.js +0 -0
- /package/{src → core}/UI/CustomElement/index.js +0 -0
- /package/{src → core}/UI/Embaded/index.js +0 -0
- /package/{src → core}/UI/Inputs/Primitives/elements.js +0 -0
- /package/{src → core}/UI/Inputs/camera.js +0 -0
- /package/{src → core}/UI/Inputs/index.js +0 -0
- /package/{src → core}/UI/List/elements.js +0 -0
- /package/{src → core}/UI/Media/Image/index.js +0 -0
- /package/{src → core}/UI/Media/index.js +0 -0
- /package/{src → core}/UI/Style/index.js +0 -0
- /package/{src → core}/UI/Table/elements.js +0 -0
- /package/{src → core}/UI/Table/index.js +0 -0
- /package/{src → core}/UI/Table/utils.js +0 -0
- /package/{src → core}/UI/Text/index.js +0 -0
- /package/{src → core}/UI/Text/pre.js +0 -0
- /package/{src → core}/UI/Utils/index.js +0 -0
- /package/{src → core}/__proto__/Array.js +0 -0
- /package/{src → core}/__proto__/Function.js +0 -0
- /package/{src → core}/__proto__/Number.js +0 -0
- /package/{src → core}/__proto__/Object.js +0 -0
- /package/{src → core}/__proto__/String.js +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// var __Target__=null;
|
|
2
|
+
// if(globalThis?.document?.body)__Target__=document.body;
|
|
3
|
+
const __ZikoConfig__={
|
|
4
|
+
default:{
|
|
5
|
+
target:null,
|
|
6
|
+
render:true
|
|
7
|
+
},
|
|
8
|
+
setDefault:function(pairs){
|
|
9
|
+
const keys=Object.keys(pairs);
|
|
10
|
+
const values=Object.values(pairs);
|
|
11
|
+
for(let i=0;i<keys.length;i++)this.default[keys[i]]=values[i];
|
|
12
|
+
},
|
|
13
|
+
init:()=>document.documentElement.setAttribute("data-engine","zikojs")
|
|
14
|
+
}
|
|
15
|
+
export * from "./__init__";
|
|
16
|
+
export * from "./__Target__";
|
|
17
|
+
export * from "./__UI__";
|
|
18
|
+
export {__ZikoConfig__}
|
package/{src → core}/App/app.js
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import ZikoUIElement from "../../../ZikoUIElement";
|
|
2
2
|
import { ZikoUIFlex } from "../../Flex";
|
|
3
|
-
import {
|
|
3
|
+
import { html } from "../../../Misc";
|
|
4
4
|
class ZikoUIAccordion extends ZikoUIElement{
|
|
5
5
|
constructor(summary,content,icon="😁"){
|
|
6
6
|
super("details","Accordion")
|
|
7
|
-
this.summary=
|
|
7
|
+
this.summary=html("summary",summary).style({
|
|
8
8
|
fontSize:"1.1em",
|
|
9
9
|
padding:"0.625rem",
|
|
10
10
|
fontWeight:"bold",
|
|
@@ -142,7 +142,7 @@ class ZikoUICodeCell extends ZikoUIFlex{
|
|
|
142
142
|
|
|
143
143
|
}
|
|
144
144
|
evaluate(order){
|
|
145
|
-
globalThis.
|
|
145
|
+
globalThis.__ZikoConfig__.default.target=this.Output.element;
|
|
146
146
|
switch(this.cache.type){
|
|
147
147
|
case "js":this.#evaluateJs(order);break;
|
|
148
148
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { html } from "../../../Misc";
|
|
2
2
|
import { Flex } from "../../Flex";
|
|
3
3
|
import { text } from "../../../Text";
|
|
4
4
|
import { ZikoUICodeNote } from "./CodeNote";
|
|
5
|
-
const Input=(codeText="")=>
|
|
5
|
+
const Input=(codeText="")=>html("code",codeText).style({
|
|
6
6
|
width:"100%",
|
|
7
7
|
height:"auto",
|
|
8
8
|
padding:"10px",
|
|
@@ -16,7 +16,7 @@ const Input=(codeText="")=>ZikoHtml("code",codeText).style({
|
|
|
16
16
|
background:"#f6f8fa",
|
|
17
17
|
color:"#0062C3"
|
|
18
18
|
}).setAttr("contenteditable",true).setAttr("spellcheck",false);
|
|
19
|
-
const Output=()=>
|
|
19
|
+
const Output=()=>html("output").style({
|
|
20
20
|
width:"100%",
|
|
21
21
|
height:"auto",
|
|
22
22
|
padding:"5px 0",
|
|
@@ -43,7 +43,7 @@ const Right=(ctx)=>Flex(
|
|
|
43
43
|
text('▶️').style(BTN_STYLE).onClick(e=>{
|
|
44
44
|
if(ctx.parent instanceof ZikoUICodeNote)ctx.parent.setCurrentNote(ctx);
|
|
45
45
|
ctx.execute();
|
|
46
|
-
globalThis.
|
|
46
|
+
globalThis.__ZikoConfig__.default.target=e.target.parent.parent[1][1];
|
|
47
47
|
}),
|
|
48
48
|
text('📋').style(BTN_STYLE).onClick(()=>{
|
|
49
49
|
navigator.clipboard.writeText(ctx.codeText)
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import ZikoUIElement from "../../ZikoUIElement.js";
|
|
2
2
|
class ZikoUIBtn extends ZikoUIElement {
|
|
3
3
|
constructor(value = "button") {
|
|
4
|
-
super();
|
|
4
|
+
super("button","btn");
|
|
5
5
|
this.element = document.createElement("button");
|
|
6
6
|
this.setValue(value);
|
|
7
|
-
this.render();
|
|
8
7
|
this.st.cursor("pointer");
|
|
9
8
|
}
|
|
10
9
|
setValue(value) {
|
|
@@ -13,7 +13,6 @@ class ZikoUIInput extends ZikoUIElement {
|
|
|
13
13
|
Object.assign(this.events,{input:null})
|
|
14
14
|
this.setValue(value);
|
|
15
15
|
if(datalist)this.linkDatalist(datalist)
|
|
16
|
-
this.render();
|
|
17
16
|
}
|
|
18
17
|
onInput(...callbacks){
|
|
19
18
|
if(!this.events.input)this.events.input = Input(this);
|
|
@@ -124,7 +123,6 @@ class ZikoUIInputNumber extends ZikoUIInput {
|
|
|
124
123
|
super();
|
|
125
124
|
this._setType("number");
|
|
126
125
|
this.setMin(min).setMax(max).setStep(step);
|
|
127
|
-
this.render();
|
|
128
126
|
}
|
|
129
127
|
get value() {
|
|
130
128
|
return +this.element.value;
|
|
@@ -147,7 +145,6 @@ class ZikoUIInputSlider extends ZikoUIInputNumber {
|
|
|
147
145
|
super();
|
|
148
146
|
this._setType("range");
|
|
149
147
|
this.setMin(min).setMax(max).setValue(val).setStep(step);
|
|
150
|
-
this.render();
|
|
151
148
|
}
|
|
152
149
|
}
|
|
153
150
|
class ZikoUIInputColor extends ZikoUIInput {
|
|
@@ -155,7 +152,6 @@ class ZikoUIInputColor extends ZikoUIInput {
|
|
|
155
152
|
super();
|
|
156
153
|
this._setType("color");
|
|
157
154
|
this.background(this.value);
|
|
158
|
-
this.render();
|
|
159
155
|
this.onInput(() => this.background(this.value));
|
|
160
156
|
}
|
|
161
157
|
}
|
|
@@ -163,35 +159,30 @@ class ZikoUIInputPassword extends ZikoUIInput {
|
|
|
163
159
|
constructor() {
|
|
164
160
|
super();
|
|
165
161
|
this._setType("password");
|
|
166
|
-
this.render();
|
|
167
162
|
}
|
|
168
163
|
}
|
|
169
164
|
class ZikoUIInputEmail extends ZikoUIInput {
|
|
170
165
|
constructor() {
|
|
171
166
|
super();
|
|
172
167
|
this._setType("email");
|
|
173
|
-
this.render();
|
|
174
168
|
}
|
|
175
169
|
}
|
|
176
170
|
class ZikoUIInputTime extends ZikoUIInput {
|
|
177
171
|
constructor() {
|
|
178
172
|
super();
|
|
179
173
|
this._setType("time");
|
|
180
|
-
this.render();
|
|
181
174
|
}
|
|
182
175
|
}
|
|
183
176
|
class ZikoUIInputDate extends ZikoUIInput {
|
|
184
177
|
constructor() {
|
|
185
178
|
super();
|
|
186
179
|
this._setType("date");
|
|
187
|
-
this.render();
|
|
188
180
|
}
|
|
189
181
|
}
|
|
190
182
|
class ZikoUIInputDateTime extends ZikoUIInput {
|
|
191
183
|
constructor() {
|
|
192
184
|
super();
|
|
193
185
|
this._setType("datetime-local");
|
|
194
|
-
this.render();
|
|
195
186
|
}
|
|
196
187
|
}
|
|
197
188
|
class ZikoUIInputCheckbox extends ZikoUIInput {
|
|
@@ -271,7 +262,6 @@ class ZikoUIInputDatalist extends ZikoUIElement {
|
|
|
271
262
|
super();
|
|
272
263
|
this.element = document.createElement("datalist");
|
|
273
264
|
this.addOptions(...options).setId("ziko-datalist-id"+Random.string(10));
|
|
274
|
-
this.render();
|
|
275
265
|
}
|
|
276
266
|
addOptions(...options) {
|
|
277
267
|
options.map((n) => this.append(new ZikoUIInputOption(n)));
|
|
@@ -5,7 +5,6 @@ class ZikoUILI extends ZikoUIElement{
|
|
|
5
5
|
super();
|
|
6
6
|
this.element=document.createElement("li");
|
|
7
7
|
this.append(UI);
|
|
8
|
-
this.render()
|
|
9
8
|
}
|
|
10
9
|
}
|
|
11
10
|
class ZikoUIList extends ZikoUIElement {
|
|
@@ -105,7 +104,6 @@ class ZikoUIOList extends ZikoUIList{
|
|
|
105
104
|
constructor(...arr){
|
|
106
105
|
super("ol","ol");
|
|
107
106
|
this.append(...arr);
|
|
108
|
-
this.render();
|
|
109
107
|
}
|
|
110
108
|
type(tp = 1) {
|
|
111
109
|
this.element.setAttribute("type", tp);
|
|
@@ -120,7 +118,6 @@ class ZikoUIUList extends ZikoUIList{
|
|
|
120
118
|
constructor(...arr){
|
|
121
119
|
super("ul","ul");
|
|
122
120
|
this.append(...arr);
|
|
123
|
-
this.render();
|
|
124
121
|
}
|
|
125
122
|
}
|
|
126
123
|
const li=UI=>new ZikoUILI(UI)
|
|
@@ -1,29 +1,25 @@
|
|
|
1
1
|
import ZikoUIElement from "../ZikoUIElement.js";
|
|
2
2
|
class ZikoUIHtmlTag extends ZikoUIElement {
|
|
3
3
|
constructor(element) {
|
|
4
|
-
super(element,"
|
|
5
|
-
this.render();
|
|
4
|
+
super(element,"html");
|
|
6
5
|
}
|
|
7
6
|
}
|
|
8
7
|
class ZikoUIBr extends ZikoUIElement {
|
|
9
8
|
constructor() {
|
|
10
9
|
super("br","br");
|
|
11
|
-
|
|
12
|
-
delete this.append
|
|
10
|
+
delete this.append
|
|
13
11
|
}
|
|
14
12
|
}
|
|
15
13
|
class ZikoUIHr extends ZikoUIElement {
|
|
16
14
|
constructor() {
|
|
17
15
|
super("hr","hr");
|
|
18
|
-
|
|
19
|
-
delete this.append
|
|
16
|
+
delete this.append
|
|
20
17
|
}
|
|
21
18
|
}
|
|
22
19
|
class ZikoUILink extends ZikoUIElement{
|
|
23
20
|
constructor(href){
|
|
24
21
|
super("a","link");
|
|
25
22
|
this.setHref(href);
|
|
26
|
-
this.render();
|
|
27
23
|
}
|
|
28
24
|
setHref(href){
|
|
29
25
|
this.element.href=href;
|
|
@@ -34,9 +30,9 @@ class ZikoUIBr extends ZikoUIElement {
|
|
|
34
30
|
const brs = (n=1)=> new Array(n).fill(new ZikoUIBr());
|
|
35
31
|
const hrs = (n=1)=> new Array(n).fill(new ZikoUIHr());
|
|
36
32
|
const link=(href,...UIElement)=>new ZikoUILink(href).append(...UIElement);
|
|
37
|
-
const
|
|
33
|
+
const html=(tag,...UIElement)=>new ZikoUIHtmlTag(tag).append(...UIElement);
|
|
38
34
|
export{
|
|
39
|
-
|
|
35
|
+
html,
|
|
40
36
|
br,
|
|
41
37
|
hr,
|
|
42
38
|
brs,
|
|
@@ -2,45 +2,38 @@ import ZikoUIElement from "../ZikoUIElement.js";
|
|
|
2
2
|
class ZikoUIMain extends ZikoUIElement{
|
|
3
3
|
constructor(){
|
|
4
4
|
super("main","Main");
|
|
5
|
-
this.render();
|
|
6
5
|
}
|
|
7
6
|
}
|
|
8
7
|
class ZikoUIHeader extends ZikoUIElement{
|
|
9
8
|
constructor(){
|
|
10
9
|
super("header","Header");
|
|
11
|
-
this.render();
|
|
12
10
|
}
|
|
13
11
|
}
|
|
14
12
|
class ZikoUINav extends ZikoUIElement{
|
|
15
13
|
constructor(){
|
|
16
14
|
super("nav","Nav");
|
|
17
|
-
this.render();
|
|
18
15
|
}
|
|
19
16
|
}
|
|
20
17
|
class ZikoUISection extends ZikoUIElement{
|
|
21
18
|
constructor(){
|
|
22
19
|
super("section","Section");
|
|
23
20
|
this.style({position:"relative"})
|
|
24
|
-
this.render();
|
|
25
21
|
}
|
|
26
22
|
}
|
|
27
23
|
class ZikoUIArticle extends ZikoUIElement{
|
|
28
24
|
constructor(){
|
|
29
25
|
super("article","Article");
|
|
30
|
-
this.render();
|
|
31
26
|
}
|
|
32
27
|
}
|
|
33
28
|
class ZikoUIAside extends ZikoUIElement{
|
|
34
29
|
constructor(){
|
|
35
30
|
super("aside","Aside");
|
|
36
|
-
this.render();
|
|
37
31
|
}
|
|
38
32
|
}
|
|
39
33
|
class ZikoUIFooter extends ZikoUIElement{
|
|
40
34
|
constructor(){
|
|
41
35
|
super("footer","Footer");
|
|
42
36
|
this.element=document.createElement("footer");
|
|
43
|
-
this.render();
|
|
44
37
|
}
|
|
45
38
|
}
|
|
46
39
|
const Section = (...ZikoUIElement) => new ZikoUISection().append(...ZikoUIElement);
|
|
@@ -19,7 +19,8 @@ import { text } from "./Text";
|
|
|
19
19
|
import { Random } from "../Math/Random";
|
|
20
20
|
class ZikoUIElement {
|
|
21
21
|
constructor(element,name="") {
|
|
22
|
-
this.target = globalThis.__Target__||globalThis.document.body;
|
|
22
|
+
//this.target = globalThis.__Target__||globalThis.document.body;
|
|
23
|
+
this.target = globalThis.__ZikoConfig__.default.target||globalThis.document.body
|
|
23
24
|
if(typeof element === "string") element = globalThis.document.createElement(element);
|
|
24
25
|
this.element = element;
|
|
25
26
|
this.uuid=this.constructor.name+"-"+Random.string(10);
|
|
@@ -61,6 +62,7 @@ class ZikoUIElement {
|
|
|
61
62
|
});
|
|
62
63
|
this.size("auto", "auto");
|
|
63
64
|
globalThis.__UI__[this.cache.name]?.push(this);
|
|
65
|
+
this.render(globalThis.__ZikoConfig__.default.render);
|
|
64
66
|
}
|
|
65
67
|
get st(){
|
|
66
68
|
return this.cache.style;
|
package/{src → core}/UI/index.js
RENAMED
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
brs,
|
|
15
15
|
hrs,
|
|
16
16
|
link,
|
|
17
|
-
|
|
17
|
+
html
|
|
18
18
|
} from "./Misc";
|
|
19
19
|
import {
|
|
20
20
|
ol,
|
|
@@ -66,7 +66,7 @@ import{
|
|
|
66
66
|
} from "./Semantic";
|
|
67
67
|
import { Table } from "./Table";
|
|
68
68
|
const UI={
|
|
69
|
-
|
|
69
|
+
html,
|
|
70
70
|
text,
|
|
71
71
|
p,
|
|
72
72
|
h1,
|
|
@@ -149,6 +149,6 @@ export * from "./Semantic";
|
|
|
149
149
|
export * from "./Misc";
|
|
150
150
|
export * from "./CustomElement";
|
|
151
151
|
export {
|
|
152
|
-
|
|
152
|
+
html
|
|
153
153
|
}
|
|
154
154
|
export default UI;
|
package/{src → core}/index.js
RENAMED
|
@@ -9,6 +9,7 @@ import {SPA} from "./App/Router";
|
|
|
9
9
|
import {
|
|
10
10
|
__UI__,
|
|
11
11
|
__Target__,
|
|
12
|
+
__ZikoConfig__
|
|
12
13
|
} from "./App/Globals";
|
|
13
14
|
import ZikoUIElement from "./UI/ZikoUIElement.js";
|
|
14
15
|
import { App } from "./App";
|
|
@@ -25,7 +26,7 @@ const Ziko={
|
|
|
25
26
|
}
|
|
26
27
|
globalThis.__Ziko__=Ziko;
|
|
27
28
|
globalThis.__UI__=__UI__;
|
|
28
|
-
globalThis.
|
|
29
|
+
globalThis.__ZikoConfig__=__ZikoConfig__;
|
|
29
30
|
function ExtractAll(){
|
|
30
31
|
UI.ExtractAll();
|
|
31
32
|
Math.ExtractAll();
|
|
@@ -61,6 +62,7 @@ export {
|
|
|
61
62
|
Data,
|
|
62
63
|
ZikoUIElement,
|
|
63
64
|
SPA,
|
|
65
|
+
__ZikoConfig__,
|
|
64
66
|
ExtractAll,
|
|
65
67
|
RemoveAll
|
|
66
68
|
};
|