ziko 0.0.5 → 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/README.md +171 -182
- package/dist/ziko.cjs +10022 -9853
- package/dist/ziko.js +10023 -9854
- package/dist/ziko.min.js +2 -2
- package/dist/ziko.mjs +10021 -9853
- package/package.json +12 -4
- package/starter/bin/index.js +11 -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/README.md
CHANGED
|
@@ -4,6 +4,81 @@
|
|
|
4
4
|
|
|
5
5
|
<br>
|
|
6
6
|
|
|
7
|
+
# Architecture
|
|
8
|
+
|
|
9
|
+
```mermaid
|
|
10
|
+
mindmap
|
|
11
|
+
root((Ziko))
|
|
12
|
+
Core
|
|
13
|
+
Math
|
|
14
|
+
Utils
|
|
15
|
+
Functions
|
|
16
|
+
Complex
|
|
17
|
+
Matrix
|
|
18
|
+
Random
|
|
19
|
+
Calculus
|
|
20
|
+
Signal
|
|
21
|
+
Discret
|
|
22
|
+
Statistics
|
|
23
|
+
UI
|
|
24
|
+
Elements
|
|
25
|
+
Text
|
|
26
|
+
text
|
|
27
|
+
p
|
|
28
|
+
h1...h6
|
|
29
|
+
List
|
|
30
|
+
ol
|
|
31
|
+
ul
|
|
32
|
+
Table
|
|
33
|
+
Inputs
|
|
34
|
+
Semantic
|
|
35
|
+
Main
|
|
36
|
+
Header
|
|
37
|
+
Footer
|
|
38
|
+
Section
|
|
39
|
+
Article
|
|
40
|
+
Nav
|
|
41
|
+
Aside
|
|
42
|
+
Custom Elements
|
|
43
|
+
Flex
|
|
44
|
+
Grid
|
|
45
|
+
Accordion
|
|
46
|
+
Carousel
|
|
47
|
+
Tabs
|
|
48
|
+
CodeCell
|
|
49
|
+
CodeNote
|
|
50
|
+
Time
|
|
51
|
+
Animation
|
|
52
|
+
Ease functions
|
|
53
|
+
Loop
|
|
54
|
+
Data
|
|
55
|
+
Api
|
|
56
|
+
Converter
|
|
57
|
+
Decorator
|
|
58
|
+
Parser
|
|
59
|
+
Reactivity
|
|
60
|
+
Events
|
|
61
|
+
Observer
|
|
62
|
+
Use
|
|
63
|
+
Graphics
|
|
64
|
+
Svg
|
|
65
|
+
Canvas
|
|
66
|
+
App
|
|
67
|
+
Router
|
|
68
|
+
Seo
|
|
69
|
+
Config
|
|
70
|
+
Themes
|
|
71
|
+
Addons
|
|
72
|
+
Zikogl
|
|
73
|
+
Ziko-lottie
|
|
74
|
+
Wrapper
|
|
75
|
+
React
|
|
76
|
+
Svelte
|
|
77
|
+
Vue
|
|
78
|
+
Lit
|
|
79
|
+
Solid
|
|
80
|
+
Preact
|
|
81
|
+
```
|
|
7
82
|
# Install
|
|
8
83
|
```bash
|
|
9
84
|
npm install ziko
|
|
@@ -55,205 +130,134 @@ npm install ziko
|
|
|
55
130
|
|
|
56
131
|
## 📃 [wiki](https://github.com/zakarialaoui10/ziko.js/wiki)
|
|
57
132
|
|
|
58
|
-
## 💡 [Features]()
|
|
59
|
-
|
|
60
|
-
<summary>
|
|
61
|
-
<strong> 🔰 Methodes Extracting </strong>
|
|
62
|
-
</summary>
|
|
63
|
-
|
|
64
|
-
```js
|
|
65
|
-
Ziko.ExtractAll()
|
|
66
|
-
// if you want to extract only UI methodes you can use Ziko.UI.Extractll()
|
|
67
|
-
```
|
|
68
|
-
🏷️ This method simplifies syntax by extracting all UI, Math, Time, Graphics, and other methods within the Ziko framework. Instead of writing specific namespace prefixes like `Ziko.UI.text("Hi")` , `Ziko.Math.complex(1,2)` , `Ziko.Math.matrix([[1,2],[2,3]])`, you can directly use simplified syntax such as `text("Hi")` , `complex(1,1)` and `matrix([[1,2],[2,3]])`.
|
|
133
|
+
## 💡 [Features]()
|
|
134
|
+
### 🔰 No Template Engines :
|
|
69
135
|
|
|
70
|
-
|
|
71
|
-
|
|
136
|
+
zikojs UI module adopts a distinctive approach to building and updating user interfaces.
|
|
137
|
+
It doesn't rely on predefined markup templates. Instead, it leverages a hyperscript-like syntax to dynamically create and update user interfaces.
|
|
72
138
|
|
|
73
139
|
<details>
|
|
74
|
-
|
|
75
|
-
<strong> 🔰 Mathematical Utilities & Tips </strong>
|
|
76
|
-
</summary>
|
|
140
|
+
<summary> See More </summary>
|
|
77
141
|
|
|
78
|
-
|
|
79
|
-
|
|
142
|
+
For instance, consider the following JavaScript code using zikojs:
|
|
143
|
+
```js
|
|
144
|
+
para=p(
|
|
145
|
+
text("hello"),
|
|
146
|
+
text("world")
|
|
147
|
+
)
|
|
148
|
+
.style({
|
|
149
|
+
color:"darkblue"
|
|
150
|
+
})
|
|
151
|
+
.forEach(n=>n.onPtrEnter(e=>{
|
|
152
|
+
console.log(e.target.text)
|
|
153
|
+
}));
|
|
154
|
+
```
|
|
155
|
+
`p(...)` - This line creates a paragraph element (<p>) using zikojs. Inside the p() function, we pass in two text() function calls, which create text nodes containing "hello" and "world" respectively. These will be the contents of the paragraph.
|
|
80
156
|
|
|
81
|
-
|
|
157
|
+
`.style({...})` - This method sets the style of the paragraph element. In this case, it sets the color to "darkblue".
|
|
82
158
|
|
|
83
|
-
|
|
159
|
+
`.forEach(...)` - This method iterates over the two items of the paragraph element. Inside the callback function, it sets up an event listener for the "pointerenter" event on each child element. When the pointer enters any child element, it logs the text content of that element to the console.
|
|
84
160
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|-|-|
|
|
88
|
-
|`sqrt(9)`|`sqrt(9)`|
|
|
89
|
-
|`sqrt(4,9,16)`|`[Math.sqrt(4),Math.sqrt(9),Math.sqrt(16)]`|
|
|
90
|
-
|`sqrt([4,9,16])`|`[Math.sqrt(4),Math.sqrt(9),Math.sqrt(16)]`|
|
|
91
|
-
|`sqrt([4,9],16)`|`[[Math.sqrt(4),Math.sqrt(9)],Math.sqrt(16)]`|
|
|
92
|
-
|`sqrt({x:4,y:9})`|`{x:sqrt(4),sqrt(9)}`|
|
|
161
|
+
>[!TIP]
|
|
162
|
+
To acces the para items you can use Array like syntaxe , `para[index]` or `para.at(index)` (index can positive or negative integer)
|
|
93
163
|
|
|
164
|
+
This code snippet produces the equivalent HTML structure:
|
|
165
|
+
```html
|
|
166
|
+
<p style="color:darkblue">
|
|
167
|
+
<span>hello</span>
|
|
168
|
+
<span>world</span>
|
|
169
|
+
</p>
|
|
170
|
+
<script>
|
|
171
|
+
para=document.querySelector(p);
|
|
172
|
+
[...a.children].forEach(
|
|
173
|
+
n=>n.addEventListener("pointerenter",e=>{
|
|
174
|
+
console.log(e.target.textContent)
|
|
175
|
+
}))
|
|
176
|
+
</script>
|
|
177
|
+
```
|
|
178
|
+
In summary, zikojs UI module enables dynamic creation and manipulation of user interfaces without relying on static markup templates, offering flexibility and control over UI elements.
|
|
94
179
|
|
|
95
|
-
|
|
180
|
+
</details>
|
|
96
181
|
|
|
97
|
-
📋 For Example :
|
|
98
|
-
```js
|
|
99
|
-
sqrt({
|
|
100
|
-
a:1,
|
|
101
|
-
b:2,
|
|
102
|
-
c:[3,4],
|
|
103
|
-
d:[[
|
|
104
|
-
[5,6]
|
|
105
|
-
]],
|
|
106
|
-
e:{
|
|
107
|
-
f:[
|
|
108
|
-
{g:7}
|
|
109
|
-
]
|
|
110
|
-
},
|
|
111
|
-
h:new Map([["i",8],["j",9]]),
|
|
112
|
-
k:{
|
|
113
|
-
l:{
|
|
114
|
-
m:new Set([10,11])
|
|
115
|
-
},
|
|
116
|
-
n:[12]
|
|
117
|
-
}
|
|
118
|
-
})
|
|
119
|
-
```
|
|
120
|
-
This would return :
|
|
121
|
-
```js
|
|
122
|
-
{
|
|
123
|
-
a:sqrt(1),
|
|
124
|
-
b:sqrt(2),
|
|
125
|
-
c:[sqrt(3),sqrt(4)],
|
|
126
|
-
d:[[
|
|
127
|
-
[sqrt(5),sqrt(6)]
|
|
128
|
-
]],
|
|
129
|
-
e:{
|
|
130
|
-
f:[
|
|
131
|
-
{g:sqrt(7)}
|
|
132
|
-
]
|
|
133
|
-
},
|
|
134
|
-
h:new Map([["i",sqrt(8)],["j",sqrt(9)]]),
|
|
135
|
-
k:{
|
|
136
|
-
l:{
|
|
137
|
-
m:new Set([sqrt(10),sqrt(11)])
|
|
138
|
-
},
|
|
139
|
-
n:[sqrt(12)]
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
```
|
|
143
182
|
|
|
144
|
-
💡 You can apply this approach to build your custom function ;
|
|
145
|
-
```js
|
|
146
|
-
import {mapfun} from "ziko";
|
|
147
|
-
const parabolic_func=(a,b,c,x)=>a*(x**2)+b*x+c;
|
|
148
|
-
const parabol=(a,b,c,...X)=>mapfun(n=>parabolic_func(a,b,c,n),...X)
|
|
149
|
-
const a=-1.5,b=2,c=3;
|
|
150
|
-
X0=[0,1,2,3];
|
|
151
|
-
X1={x10:0,x11:1,x12:2,x13:3}
|
|
152
|
-
console.log(parabol(a,b,c,X0));
|
|
153
|
-
// [3,3,1,3]
|
|
154
|
-
console.log(parabol(a,b,c,X1));
|
|
155
|
-
// {x10: 3,x11: 3,x12: 1,x13: -3}
|
|
156
|
-
console.log(parabol(a,b,c,X0,X1))
|
|
157
|
-
/*
|
|
158
|
-
[
|
|
159
|
-
[3,3,1,3],
|
|
160
|
-
{x10: 3,x11: 3,x12: 1,x13: -3}
|
|
161
|
-
]
|
|
162
|
-
*/
|
|
163
|
-
```
|
|
164
|
-
Or you can use the currying syntaxe :
|
|
165
|
-
```js
|
|
166
|
-
import {mapfun} from "ziko";
|
|
167
|
-
const parabolic_func=(a,b,c,x)=>a*(x**2)+b*x+c;
|
|
168
|
-
const map_parabolic_func=(a,b,c)=>(...X)=>mapfun(n=>parabolic_func(a,b,c,n),...X);
|
|
169
|
-
const a=-1.5,b=2,c=3;
|
|
170
|
-
const X=[0,1,2,3];
|
|
171
|
-
console.log(parabolic_func(a,b,c)(X));
|
|
172
|
-
// [3,3,1,3]
|
|
173
|
-
```
|
|
174
183
|
|
|
175
|
-
|
|
184
|
+
### 🔰 Flexible Integration with Popular Frameworks/Libraries
|
|
176
185
|
|
|
177
|
-
|
|
186
|
+
You can integrate it inside other frameworks/libraries like React , Vue , Svelte ... To do so, all you need to do is install the [ziko-wrapper](https://www.npmjs.com/package/ziko-wrapper) package.
|
|
178
187
|
|
|
179
|
-
|
|
188
|
+
### 🔰 Extensive Add-On Ecosystem
|
|
189
|
+
|
|
190
|
+
|Addon|Purpose|Dependecy|Links|
|
|
191
|
+
|-|-|-|-|
|
|
192
|
+
|zikogl|-|Threejs|[NPM](https://www.npmjs.com/package/zikogl) [GITHUB](https://github.com/zakarialaoui10/zikogl/)|
|
|
193
|
+
|ziko-lottie|render Lottie file within zikojs app|Lottie-web|[NPM](https://www.npmjs.com/package/ziko-lottie) [GITHUB](https://github.com/zakarialaoui10/ziko-lottie/)|
|
|
194
|
+
### 🔰 The capability to function in both browser-based and Node.js environments
|
|
195
|
+
### 🔰 Methodes Extracting
|
|
180
196
|
|
|
181
|
-
### Matrix
|
|
182
|
-
### Complex
|
|
183
|
-
</details>
|
|
184
|
-
<details>
|
|
185
|
-
<summary>
|
|
186
|
-
<strong> 🔰 Rich UI elements </strong>
|
|
187
|
-
</summary>
|
|
188
|
-
</details>
|
|
189
197
|
<details>
|
|
190
198
|
<summary>
|
|
191
|
-
|
|
199
|
+
See More
|
|
192
200
|
</summary>
|
|
193
201
|
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
.onPtrMove(useThrottle(() => console.log("hi")));
|
|
202
|
+
```js
|
|
203
|
+
Ziko.ExtractAll()
|
|
204
|
+
// if you want to extract only UI methodes you can use Ziko.UI.Extractll()
|
|
198
205
|
```
|
|
199
|
-
|
|
206
|
+
🏷️ This method simplifies syntax by extracting all UI, Math, Time, Graphics, and other methods within the Ziko framework. Instead of writing specific namespace prefixes like `Ziko.UI.text("Hi")` , `Ziko.Math.complex(1,2)` , `Ziko.Math.matrix([[1,2],[2,3]])`, you can directly use simplified syntax such as `text("Hi")` , `complex(1,1)` and `matrix([[1,2],[2,3]])`.
|
|
200
207
|
|
|
208
|
+
⚠️ Be careful with this method because it will overwrite any existing global or local variables and functions with the same names as the extracted methods.
|
|
209
|
+
</details>
|
|
210
|
+
|
|
211
|
+
### 🔰 Mathematical Utilities & Tips
|
|
212
|
+
### 🔰 Rich UI elements
|
|
213
|
+
### 🔰 Methodes Chaining
|
|
214
|
+
It allows multiple methods to be called sequentially on an object, enhancing code readability and conciseness.
|
|
201
215
|
<details>
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
216
|
+
<summary> See More </summary>
|
|
217
|
+
</details>
|
|
218
|
+
|
|
219
|
+
### 🔰 Events Handling
|
|
205
220
|
|
|
206
|
-
|
|
221
|
+
<details>
|
|
222
|
+
<summary>
|
|
223
|
+
See More
|
|
224
|
+
</summary>
|
|
225
|
+
|
|
226
|
+
Example of creating simple Paint sketch using canvas and pointer events :
|
|
207
227
|
```js
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
map(e.dx,0,
|
|
213
|
-
map(e.dy,0,
|
|
228
|
+
Scene=Canvas().size("500px","500px")
|
|
229
|
+
Scene.onPtrDown(e=>{
|
|
230
|
+
e.target.ctx.beginPath()
|
|
231
|
+
e.target.ctx.moveTo(
|
|
232
|
+
map(e.dx,0,e.target.element.offsetWidth,e.target.Xmin,e.target.Xmax),
|
|
233
|
+
map(e.dy,0,e.target.element.offseHeight,e.target.Ymin,e.target.Ymax)
|
|
214
234
|
)
|
|
215
235
|
})
|
|
216
|
-
|
|
236
|
+
Scene.onPtrMove(e=>{
|
|
217
237
|
if(e.isDown){
|
|
218
|
-
const x=map(e.mx,0,
|
|
219
|
-
const y=map(e.my,0,
|
|
220
|
-
|
|
221
|
-
}
|
|
222
|
-
|
|
238
|
+
const x=map(e.mx,0,e.target.element.offsetWidth,e.target.axisMatrix[0][0],e.target.axisMatrix[1][0])
|
|
239
|
+
const y=map(e.my,0,e.target.element.offsetHeight,e.target.axisMatrix[1][1],e.target.axisMatrix[0][1])
|
|
240
|
+
e.target.append(canvasCircle(x,y,1).color({fill:"#5555AA"}).fill())
|
|
241
|
+
}})
|
|
242
|
+
|
|
243
|
+
Scene.onPtrUp(()=>{})
|
|
223
244
|
```
|
|
224
245
|
</details>
|
|
225
246
|
|
|
226
|
-
|
|
227
|
-
<summary>
|
|
228
|
-
<strong> 🔰 Functions decorators </strong>
|
|
229
|
-
</summary>
|
|
247
|
+
### 🔰 Functions decorators
|
|
230
248
|
|
|
231
|
-
|
|
249
|
+
```js
|
|
232
250
|
const inp=input().onKeyDown(throttle(e=>console.log(e.kd),1000));
|
|
233
|
-
|
|
234
|
-
</details>
|
|
235
|
-
|
|
236
|
-
<details>
|
|
237
|
-
<summary>
|
|
238
|
-
<strong> 🔰 Reactivity </strong>
|
|
239
|
-
</summary>
|
|
240
|
-
|
|
241
|
-
### Events
|
|
242
|
-
### Observers
|
|
243
|
-
### Use
|
|
251
|
+
```
|
|
244
252
|
|
|
245
|
-
|
|
253
|
+
### 🔰 Reactivity
|
|
254
|
+
### 🔰 Routing for Single Page Applications (SPA)
|
|
246
255
|
|
|
247
|
-
|
|
248
|
-
<summary>
|
|
249
|
-
<strong> 🔰 Rich UI Elements Based on Math modules </strong>
|
|
250
|
-
</summary>
|
|
251
|
-
for example in `Table` you can use methodes like `hsatck` `vstack` `transpose` ...
|
|
252
|
-
</details>
|
|
256
|
+
Zikojs has a built-in Single page application router based on history browser api
|
|
253
257
|
|
|
254
258
|
<details>
|
|
255
259
|
<summary>
|
|
256
|
-
<strong>
|
|
260
|
+
<strong> See More </strong>
|
|
257
261
|
</summary>
|
|
258
262
|
|
|
259
263
|
```js
|
|
@@ -283,10 +287,8 @@ S.get(
|
|
|
283
287
|
```
|
|
284
288
|
</details>
|
|
285
289
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
<strong>🔰 Multithreading supports</strong>
|
|
289
|
-
</summary>
|
|
290
|
+
|
|
291
|
+
### 🔰 Multithreading supports
|
|
290
292
|
|
|
291
293
|
```js
|
|
292
294
|
useThread(() => {
|
|
@@ -295,21 +297,9 @@ useThread(() => {
|
|
|
295
297
|
return s;
|
|
296
298
|
}, console.log);
|
|
297
299
|
```
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
<summary>
|
|
302
|
-
<strong> 🔰 Responsive Design using Flex element and resize observer </strong>
|
|
303
|
-
</summary>
|
|
304
|
-
</details>
|
|
305
|
-
|
|
306
|
-
<details>
|
|
307
|
-
<summary>
|
|
308
|
-
<strong> 🔰 Loop and animations support </strong>
|
|
309
|
-
</summary>
|
|
310
|
-
</details>
|
|
311
|
-
|
|
312
|
-
|
|
300
|
+
|
|
301
|
+
### 🔰 Responsive Design based on Flex element and resize observer
|
|
302
|
+
### 🔰 Loop and animations support
|
|
313
303
|
|
|
314
304
|
## ⭐️ Show your support <a name="support"></a>
|
|
315
305
|
|
|
@@ -326,4 +316,3 @@ This projet is licensed under the terms of MIT License
|
|
|
326
316
|
|
|
327
317
|
|
|
328
318
|
|
|
329
|
-
|