ziko 0.0.2 → 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.
Files changed (235) hide show
  1. package/README.md +11 -15
  2. package/core/App/Globals/index.js +18 -0
  3. package/{src → core}/App/app.js +10 -1
  4. package/{src → core}/App/index.js +1 -0
  5. package/{src → core}/Graphics/Canvas/canvas.js +1 -1
  6. package/{src → core}/Reactivity/Events/Global/CustomEvent.js +2 -2
  7. package/core/Reactivity/Events/Global/Mouse.js +230 -0
  8. package/core/Reactivity/Events/Global/Wheel.js +44 -0
  9. package/core/Reactivity/Events/Partiel/Hash.js +44 -0
  10. package/core/Reactivity/Events/Partiel/MediaEvent.js +1 -0
  11. package/{src → core}/Reactivity/Events/index.js +12 -3
  12. package/{src → core}/UI/CustomElement/Elements/Accordion/index.js +2 -2
  13. package/{src → core}/UI/CustomElement/Elements/CodeNote/CodeCell.js +1 -1
  14. package/{src → core}/UI/CustomElement/Elements/CodeNote/SubElements.js +4 -4
  15. package/{src → core}/UI/CustomElement/Flex.js +22 -22
  16. package/{src → core}/UI/Inputs/Primitives/btn.js +1 -2
  17. package/{src → core}/UI/Inputs/Primitives/inputs.js +0 -10
  18. package/{src → core}/UI/Inputs/Primitives/select.js +0 -1
  19. package/{src → core}/UI/Inputs/Primitives/textarea.js +0 -1
  20. package/{src → core}/UI/List/index.js +0 -3
  21. package/{src → core}/UI/Media/Audio/index.js +14 -2
  22. package/{src → core}/UI/Media/Image/figure.js +0 -1
  23. package/{src → core}/UI/Media/Image/image.js +0 -1
  24. package/{src → core}/UI/Media/Video/index.js +13 -1
  25. package/{src → core}/UI/Misc/index.js +5 -9
  26. package/{src → core}/UI/Semantic/index.js +0 -7
  27. package/{src → core}/UI/Table/table.js +0 -1
  28. package/{src → core}/UI/Text/heading.js +0 -1
  29. package/{src → core}/UI/Text/p.js +0 -1
  30. package/{src → core}/UI/Text/text.js +0 -1
  31. package/{src → core}/UI/ZikoUIElement.js +55 -30
  32. package/{src → core}/UI/index.js +3 -3
  33. package/core/__proto__/String.js +0 -0
  34. package/{src → core}/index.js +3 -1
  35. package/dist/ziko.cjs +491 -134
  36. package/dist/ziko.js +491 -134
  37. package/dist/ziko.min.js +2 -2
  38. package/dist/ziko.mjs +490 -134
  39. package/package.json +9 -9
  40. package/wrapper/react/index.jsx +16 -0
  41. package/wrapper/react/readme.md +19 -0
  42. package/wrapper/vue/ZikoUI.vue +17 -0
  43. package/src/App/Globals/index.js +0 -3
  44. package/starter/bin/index.js +0 -10
  45. /package/{src → core}/App/Accessibility/index.js +0 -0
  46. /package/{src → core}/App/Globals/__Target__.js +0 -0
  47. /package/{src → core}/App/Globals/__UI__.js +0 -0
  48. /package/{src → core}/App/Globals/__init__.js +0 -0
  49. /package/{src → core}/App/Router/index.js +0 -0
  50. /package/{src → core}/App/Seo/index.js +0 -0
  51. /package/{src → core}/App/Themes/dark.js +0 -0
  52. /package/{src → core}/App/Themes/index.js +0 -0
  53. /package/{src → core}/App/Themes/light.js +0 -0
  54. /package/{src → core}/Data/Api/fetchdom.js +0 -0
  55. /package/{src → core}/Data/Api/index.js +0 -0
  56. /package/{src → core}/Data/Api/preload.js +0 -0
  57. /package/{src → core}/Data/Converter/canvas.js +0 -0
  58. /package/{src → core}/Data/Converter/csv.js +0 -0
  59. /package/{src → core}/Data/Converter/index.js +0 -0
  60. /package/{src → core}/Data/Converter/json.js +0 -0
  61. /package/{src → core}/Data/Converter/markdown.js +0 -0
  62. /package/{src → core}/Data/Converter/svg.js +0 -0
  63. /package/{src → core}/Data/Parser/markdown.js +0 -0
  64. /package/{src → core}/Data/Parser/xml.js +0 -0
  65. /package/{src → core}/Data/Strings/index.js +0 -0
  66. /package/{src → core}/Data/decorators.js +0 -0
  67. /package/{src → core}/Data/index.js +0 -0
  68. /package/{src → core}/Graphics/Canvas/Elements/Basic/arc.js +0 -0
  69. /package/{src → core}/Graphics/Canvas/Elements/Basic/image.js +0 -0
  70. /package/{src → core}/Graphics/Canvas/Elements/Basic/line.js +0 -0
  71. /package/{src → core}/Graphics/Canvas/Elements/Basic/path.js +0 -0
  72. /package/{src → core}/Graphics/Canvas/Elements/Basic/points.js +0 -0
  73. /package/{src → core}/Graphics/Canvas/Elements/Basic/polygon.js +0 -0
  74. /package/{src → core}/Graphics/Canvas/Elements/Basic/polyline.js +0 -0
  75. /package/{src → core}/Graphics/Canvas/Elements/Basic/rect.js +0 -0
  76. /package/{src → core}/Graphics/Canvas/Elements/Basic/text.js +0 -0
  77. /package/{src → core}/Graphics/Canvas/Elements/Chart/histogram.js +0 -0
  78. /package/{src → core}/Graphics/Canvas/Elements/Chart/plot.js +0 -0
  79. /package/{src → core}/Graphics/Canvas/Elements/Chart/scatter.js +0 -0
  80. /package/{src → core}/Graphics/Canvas/Elements/Chart/stem.js +0 -0
  81. /package/{src → core}/Graphics/Canvas/Elements/Element.js +0 -0
  82. /package/{src → core}/Graphics/Canvas/Elements/Groupe.js +0 -0
  83. /package/{src → core}/Graphics/Canvas/Elements/grid.js +0 -0
  84. /package/{src → core}/Graphics/Canvas/Elements/index.js +0 -0
  85. /package/{src → core}/Graphics/Canvas/Filter/index.js +0 -0
  86. /package/{src → core}/Graphics/Canvas/Paint/index.js +0 -0
  87. /package/{src → core}/Graphics/Canvas/Utils/color.js +0 -0
  88. /package/{src → core}/Graphics/Canvas/Utils/floodFill.js +0 -0
  89. /package/{src → core}/Graphics/Canvas/_canvas_offscreen +0 -0
  90. /package/{src → core}/Graphics/Canvas/index.js +0 -0
  91. /package/{src → core}/Graphics/Svg/Elements/ZikoSvgElement.js +0 -0
  92. /package/{src → core}/Graphics/Svg/Elements/circle.js +0 -0
  93. /package/{src → core}/Graphics/Svg/Elements/ellipse.js +0 -0
  94. /package/{src → core}/Graphics/Svg/Elements/foreignObject.js +0 -0
  95. /package/{src → core}/Graphics/Svg/Elements/grid.js +0 -0
  96. /package/{src → core}/Graphics/Svg/Elements/groupe.js +0 -0
  97. /package/{src → core}/Graphics/Svg/Elements/image.js +0 -0
  98. /package/{src → core}/Graphics/Svg/Elements/line.js +0 -0
  99. /package/{src → core}/Graphics/Svg/Elements/path.js +0 -0
  100. /package/{src → core}/Graphics/Svg/Elements/polygon.js +0 -0
  101. /package/{src → core}/Graphics/Svg/Elements/polyline.js +0 -0
  102. /package/{src → core}/Graphics/Svg/Elements/rect.js +0 -0
  103. /package/{src → core}/Graphics/Svg/Elements/text.js +0 -0
  104. /package/{src → core}/Graphics/Svg/index.js +0 -0
  105. /package/{src → core}/Graphics/Svg/svg.js +0 -0
  106. /package/{src → core}/Graphics/index.js +0 -0
  107. /package/{src → core}/Math/Calculus/Special Functions/bessel.js +0 -0
  108. /package/{src → core}/Math/Calculus/Special Functions/beta.js +0 -0
  109. /package/{src → core}/Math/Calculus/Special Functions/gamma.js +0 -0
  110. /package/{src → core}/Math/Calculus/Special Functions/index.js +0 -0
  111. /package/{src → core}/Math/Calculus/index.js +0 -0
  112. /package/{src → core}/Math/Complex/Fractals/julia.js +0 -0
  113. /package/{src → core}/Math/Complex/index.js +0 -0
  114. /package/{src → core}/Math/Discret/Combinaison/index.js +0 -0
  115. /package/{src → core}/Math/Discret/Conversion/index.js +0 -0
  116. /package/{src → core}/Math/Discret/Logic/index.js +0 -0
  117. /package/{src → core}/Math/Discret/Permutation/index.js +0 -0
  118. /package/{src → core}/Math/Discret/Set/index.js +0 -0
  119. /package/{src → core}/Math/Discret/Set/powerSet.js +0 -0
  120. /package/{src → core}/Math/Discret/Set/subSet.js +0 -0
  121. /package/{src → core}/Math/Discret/index.js +0 -0
  122. /package/{src → core}/Math/Functions/index.js +0 -0
  123. /package/{src → core}/Math/Matrix/Decomposition.js +0 -0
  124. /package/{src → core}/Math/Matrix/LinearSystem.js +0 -0
  125. /package/{src → core}/Math/Matrix/Matrix.js +0 -0
  126. /package/{src → core}/Math/Matrix/index.js +0 -0
  127. /package/{src → core}/Math/Numeric/index.js +0 -0
  128. /package/{src → core}/Math/Random/index.js +0 -0
  129. /package/{src → core}/Math/Signal/__np.py.txt +0 -0
  130. /package/{src → core}/Math/Signal/conv.js +0 -0
  131. /package/{src → core}/Math/Signal/fft.js +0 -0
  132. /package/{src → core}/Math/Signal/filter.js +0 -0
  133. /package/{src → core}/Math/Signal/functions.js +0 -0
  134. /package/{src → core}/Math/Signal/index.js +0 -0
  135. /package/{src → core}/Math/Statistics/Functions/index.js +0 -0
  136. /package/{src → core}/Math/Statistics/index.js +0 -0
  137. /package/{src → core}/Math/Utils/arithmetic.js +0 -0
  138. /package/{src → core}/Math/Utils/checkers.js +0 -0
  139. /package/{src → core}/Math/Utils/comparaison.js +0 -0
  140. /package/{src → core}/Math/Utils/conversions.js +0 -0
  141. /package/{src → core}/Math/Utils/discret.js +0 -0
  142. /package/{src → core}/Math/Utils/index.js +0 -0
  143. /package/{src → core}/Math/Utils/mapfun.js +0 -0
  144. /package/{src → core}/Math/absract.js +0 -0
  145. /package/{src → core}/Math/const.js +0 -0
  146. /package/{src → core}/Math/index.js +0 -0
  147. /package/{src → core}/Reactivity/Events/Global/Click.js +0 -0
  148. /package/{src → core}/Reactivity/Events/Global/Clipboard.js +0 -0
  149. /package/{src → core}/Reactivity/Events/Global/Drag.js +0 -0
  150. /package/{src → core}/Reactivity/Events/Global/Focus.js +0 -0
  151. /package/{src → core}/Reactivity/Events/Global/Key.js +0 -0
  152. /package/{src → core}/Reactivity/Events/Global/Pointer.js +0 -0
  153. /package/{src/Reactivity/Use/Interactions/useSerial.js → core/Reactivity/Events/Global/Touch.js} +0 -0
  154. /package/{src → core}/Reactivity/Events/Partiel/Input.js +0 -0
  155. /package/{src → core}/Reactivity/Events/ZikoEvent.js +0 -0
  156. /package/{src → core}/Reactivity/Observer/index.js +0 -0
  157. /package/{src → core}/Reactivity/Observer/intersection.js +0 -0
  158. /package/{src → core}/Reactivity/Observer/mutation.js +0 -0
  159. /package/{src → core}/Reactivity/Observer/resize.js +0 -0
  160. /package/{src → core}/Reactivity/Use/Contexte/index.js +0 -0
  161. /package/{src → core}/Reactivity/Use/Contexte/useSuccesifKeys.js +0 -0
  162. /package/{src → core}/Reactivity/Use/Decorators/index.js +0 -0
  163. /package/{src → core}/Reactivity/Use/Interactions/index.js +0 -0
  164. /package/{src → core}/Reactivity/Use/Interactions/useBluetooth.js +0 -0
  165. /package/{src → core}/Reactivity/Use/Interactions/useChannel.js +0 -0
  166. /package/{src → core}/Reactivity/Use/Interactions/useEventEmmiter.js +0 -0
  167. /package/{src/Reactivity/Use/Interactions/useUsb.js → core/Reactivity/Use/Interactions/useSerial.js} +0 -0
  168. /package/{src → core}/Reactivity/Use/Interactions/useThread.js +0 -0
  169. /package/{src/Reactivity/Use/Sensors/useCamera.js → core/Reactivity/Use/Interactions/useUsb.js} +0 -0
  170. /package/{src → core}/Reactivity/Use/Sensors/index.js +0 -0
  171. /package/{src → core}/Reactivity/Use/Sensors/useBattery.js +0 -0
  172. /package/{src/Reactivity/Use/Sensors/useMicro.js → core/Reactivity/Use/Sensors/useCamera.js} +0 -0
  173. /package/{src → core}/Reactivity/Use/Sensors/useGeolocation.js +0 -0
  174. /package/{src/Reactivity/Use/Sensors/useOrientation.js → core/Reactivity/Use/Sensors/useMicro.js} +0 -0
  175. /package/{src/Reactivity/Use/Storage/useCookie.js → core/Reactivity/Use/Sensors/useOrientation.js} +0 -0
  176. /package/{src → core}/Reactivity/Use/Storage/index.js +0 -0
  177. /package/{src/Reactivity/Use/Storage/useIndexedDb.js → core/Reactivity/Use/Storage/useCookie.js} +0 -0
  178. /package/{src/Reactivity/Use/UI/useCssLink.js → core/Reactivity/Use/Storage/useIndexedDb.js} +0 -0
  179. /package/{src → core}/Reactivity/Use/Storage/useStorage.js +0 -0
  180. /package/{src → core}/Reactivity/Use/UI/index.js +0 -0
  181. /package/{src/Reactivity/Use/UI/useLinearGradient.js → core/Reactivity/Use/UI/useCssLink.js} +0 -0
  182. /package/{src → core}/Reactivity/Use/UI/useCssText.js +0 -0
  183. /package/{src → core}/Reactivity/Use/UI/useFavIcon.js +0 -0
  184. /package/{src/Reactivity/Use/UI/useRadialGradient.js → core/Reactivity/Use/UI/useLinearGradient.js} +0 -0
  185. /package/{src → core}/Reactivity/Use/UI/useMediaQuery.js +0 -0
  186. /package/{src/UI/CustomElement/Elements/FAB.js → core/Reactivity/Use/UI/useRadialGradient.js} +0 -0
  187. /package/{src → core}/Reactivity/Use/UI/useStyle.js +0 -0
  188. /package/{src → core}/Reactivity/Use/UI/useTheme.js +0 -0
  189. /package/{src → core}/Reactivity/Use/UI/useTitle.js +0 -0
  190. /package/{src → core}/Reactivity/Use/index.js +0 -0
  191. /package/{src → core}/Reactivity/Use/todo.md +0 -0
  192. /package/{src → core}/Reactivity/index.js +0 -0
  193. /package/{src → core}/Time/animation.js +0 -0
  194. /package/{src → core}/Time/index.js +0 -0
  195. /package/{src → core}/Time/loop.js +0 -0
  196. /package/{src → core}/Time/utils/decorators.js +0 -0
  197. /package/{src → core}/Time/utils/ease.js +0 -0
  198. /package/{src → core}/Time/utils/index.js +0 -0
  199. /package/{src → core}/Time/utils/performance.js +0 -0
  200. /package/{src → core}/Time/utils/ui.js +0 -0
  201. /package/{src → core}/UI/CustomElement/Elements/Carousel/index.js +0 -0
  202. /package/{src → core}/UI/CustomElement/Elements/CodeNote/CodeNote.js +0 -0
  203. /package/{src → core}/UI/CustomElement/Elements/CodeNote/index.js +0 -0
  204. /package/{src → core}/UI/CustomElement/Elements/Columns.js +0 -0
  205. /package/{src/UI/CustomElement/Elements/Menu.js → core/UI/CustomElement/Elements/FAB.js} +0 -0
  206. /package/{src/UI/CustomElement/Elements/Notification.js → core/UI/CustomElement/Elements/Menu.js} +0 -0
  207. /package/{src/UI/CustomElement/Elements/Popover.js → core/UI/CustomElement/Elements/Notification.js} +0 -0
  208. /package/{src/UI/CustomElement/Elements/Popup.js → core/UI/CustomElement/Elements/Popover.js} +0 -0
  209. /package/{src/UI/CustomElement/Elements/Timeline.js → core/UI/CustomElement/Elements/Popup.js} +0 -0
  210. /package/{src → core}/UI/CustomElement/Elements/Swipper.js +0 -0
  211. /package/{src → core}/UI/CustomElement/Elements/Tabs/index.js +0 -0
  212. /package/{src/UI/CustomElement/Elements/Toast.js → core/UI/CustomElement/Elements/Timeline.js} +0 -0
  213. /package/{src/UI/CustomElement/Elements/Treeview.js → core/UI/CustomElement/Elements/Toast.js} +0 -0
  214. /package/{src/UI/List/elements.js → core/UI/CustomElement/Elements/Treeview.js} +0 -0
  215. /package/{src → core}/UI/CustomElement/Elements/index.js +0 -0
  216. /package/{src → core}/UI/CustomElement/Grid.js +0 -0
  217. /package/{src → core}/UI/CustomElement/index.js +0 -0
  218. /package/{src → core}/UI/Embaded/index.js +0 -0
  219. /package/{src → core}/UI/Inputs/Primitives/elements.js +0 -0
  220. /package/{src → core}/UI/Inputs/camera.js +0 -0
  221. /package/{src → core}/UI/Inputs/index.js +0 -0
  222. /package/{src/UI/Text/pre.js → core/UI/List/elements.js} +0 -0
  223. /package/{src → core}/UI/Media/Image/index.js +0 -0
  224. /package/{src → core}/UI/Media/index.js +0 -0
  225. /package/{src → core}/UI/Style/index.js +0 -0
  226. /package/{src → core}/UI/Table/elements.js +0 -0
  227. /package/{src → core}/UI/Table/index.js +0 -0
  228. /package/{src → core}/UI/Table/utils.js +0 -0
  229. /package/{src → core}/UI/Text/index.js +0 -0
  230. /package/{src/__proto__/Function.js → core/UI/Text/pre.js} +0 -0
  231. /package/{src → core}/UI/Utils/index.js +0 -0
  232. /package/{src → core}/__proto__/Array.js +0 -0
  233. /package/{src/__proto__/Object.js → core/__proto__/Function.js} +0 -0
  234. /package/{src → core}/__proto__/Number.js +0 -0
  235. /package/{src/__proto__/String.js → core/__proto__/Object.js} +0 -0
@@ -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)));
@@ -4,7 +4,6 @@ class ZikoUISelect extends ZikoUIElement {
4
4
  constructor(){
5
5
  super();
6
6
  this.element=document.createElement("select");
7
- this.render()
8
7
  }
9
8
  addOptions(...options) {
10
9
  options.map(n => this.append(new ZikoUIInputOption(n)));
@@ -5,7 +5,6 @@ class ZikoUITextArea extends ZikoUIElement {
5
5
  super();
6
6
  this.element = document.createElement("textarea");
7
7
  //Object.assign(this,inputComposer.call(this));
8
- this.render();
9
8
  }
10
9
  get value(){
11
10
  return this.element.textContent;
@@ -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)
@@ -3,8 +3,10 @@ class ZikoUIAudio extends ZikoUIElement {
3
3
  constructor(src) {
4
4
  super("audio","audio");
5
5
  this.element.setAttribute("src", src);
6
- this.render();
7
- this.controls();
6
+ this.useControls();
7
+ }
8
+ get t(){
9
+ return this.element.currentTime;
8
10
  }
9
11
  useControls(enabled = true) {
10
12
  this.element.controls = enabled;
@@ -18,6 +20,16 @@ class ZikoUIAudio extends ZikoUIElement {
18
20
  this.element.pause();
19
21
  return this;
20
22
  }
23
+ seekTo(time) {
24
+ this.element.currentTime = time;
25
+ return this;
26
+ }
27
+ onPlay(){
28
+
29
+ }
30
+ onPause(){
31
+
32
+ }
21
33
  }
22
34
  const audio = (src) => new ZikoUIAudio(src);
23
35
  export {
@@ -7,7 +7,6 @@ class ZikoUIFigure extends ZikoUIElement{
7
7
  this.caption.append(caption.element)
8
8
  this.element.append(this.img);
9
9
  this.element.append(this.caption);
10
- this.render();
11
10
  }
12
11
  }
13
12
  const figure =(image,caption) =>new ZikoUIFigure(image,caption);
@@ -8,7 +8,6 @@ class ZikoUIImage extends ZikoUIElement {
8
8
  if (typeof w == "number") w += "%";
9
9
  if (typeof h == "number") h += "%";
10
10
  this.style({ border: "1px solid black", width: w, height: h });
11
- this.render();
12
11
  }
13
12
  updateSrc(url){
14
13
  this.value=url;
@@ -7,7 +7,9 @@ class ZikoUIVideo extends ZikoUIElement {
7
7
  if (typeof w == "number") w += "%";
8
8
  if (typeof h == "number") h += "%";
9
9
  this.style({ width: w, height: h });
10
- this.render();
10
+ }
11
+ get t(){
12
+ return this.element.currentTime;
11
13
  }
12
14
  useControls(enabled = true) {
13
15
  this.element.controls = enabled;
@@ -29,6 +31,16 @@ class ZikoUIVideo extends ZikoUIElement {
29
31
  this.element.requestPictureInPicture(e);
30
32
  return this;
31
33
  }
34
+ seekTo(time) {
35
+ this.element.currentTime = time;
36
+ return this;
37
+ }
38
+ onPlay(){
39
+
40
+ }
41
+ onPause(){
42
+
43
+ }
32
44
  }
33
45
  const video = (src, width, height) => new ZikoUIVideo(src, width, height);
34
46
  export {
@@ -1,29 +1,25 @@
1
1
  import ZikoUIElement from "../ZikoUIElement.js";
2
2
  class ZikoUIHtmlTag extends ZikoUIElement {
3
3
  constructor(element) {
4
- super(element,"ZikoHtml");
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
- this.render();
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
- this.render();
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 ZikoHtml=(tag,...UIElement)=>new ZikoUIHtmlTag(tag).append(...UIElement);
33
+ const html=(tag,...UIElement)=>new ZikoUIHtmlTag(tag).append(...UIElement);
38
34
  export{
39
- ZikoHtml,
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);
@@ -13,7 +13,6 @@ class ZikoUITable extends ZikoUIElement {
13
13
  }
14
14
  if(body)this.fromMatrix(body);
15
15
  if(caption)this.setCaption(caption)
16
- this.render();
17
16
  }
18
17
  get caption(){
19
18
  return this.structure.caption;
@@ -4,7 +4,6 @@ class ZikoUIHeading extends ZikoUIElement {
4
4
  super(`h${type}`,`h${type}`);
5
5
  this.element = document.createElement("h" + type);
6
6
  this.element.textContent = value;
7
- this.render();
8
7
  }
9
8
  get value() {
10
9
  return this.element.innerText;
@@ -6,7 +6,6 @@ class ZikoUIParagraphe extends ZikoUIElement {
6
6
  super("p","p");
7
7
  this.addValue(...value);
8
8
  this.style({margin:0,padding:0});
9
- this.render();
10
9
  }
11
10
  addValue(...value) {
12
11
  for (let i = 0; i < value.length; i++) {
@@ -8,7 +8,6 @@ class ZikoUIText extends ZikoUIElement {
8
8
  this.text = "";
9
9
  this.addValue(...value);
10
10
  this.st.display("inline-block");
11
- this.render();
12
11
  }
13
12
  clear() {
14
13
  this.element.textContent = "";
@@ -1,13 +1,15 @@
1
1
  import { ZikoStyle } from "./Style";
2
2
  import {
3
- Pointer,
3
+ Pointer,
4
+ Mouse,
5
+ Wheel,
4
6
  Key,
5
7
  Drag ,
6
8
  Drop,
7
9
  Click ,
8
10
  Clipboard ,
9
11
  Focus,
10
- CustomEvent,
12
+ customEvent,
11
13
  } from "../Reactivity/Events"
12
14
  import {
13
15
  WatchIntersection,
@@ -17,7 +19,8 @@ import { text } from "./Text";
17
19
  import { Random } from "../Math/Random";
18
20
  class ZikoUIElement {
19
21
  constructor(element,name="") {
20
- 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
21
24
  if(typeof element === "string") element = globalThis.document.createElement(element);
22
25
  this.element = element;
23
26
  this.uuid=this.constructor.name+"-"+Random.string(10);
@@ -27,19 +30,16 @@ class ZikoUIElement {
27
30
  isRoot:false,
28
31
  isHidden: false,
29
32
  isFrozzen:false,
30
- // transformMatrix:matrix([
31
- // [0,0,0],
32
- // [0,0,0],
33
- // [1,1,0]
34
- // ]),
35
33
  style: ZikoStyle({}),
36
34
  attributes: {},
37
35
  filters: {},
38
-
36
+ temp:{}
39
37
  };
40
38
  this.items = [];
41
39
  this.events = {
42
40
  ptr:null,
41
+ mouse:null,
42
+ Wheel:null,
43
43
  key:null,
44
44
  drag:null,
45
45
  drop:null,
@@ -61,7 +61,8 @@ class ZikoUIElement {
61
61
  padding:0,
62
62
  });
63
63
  this.size("auto", "auto");
64
- globalThis.__UI__[this.cache.name]?.push(this)
64
+ globalThis.__UI__[this.cache.name]?.push(this);
65
+ this.render(globalThis.__ZikoConfig__.default.render);
65
66
  }
66
67
  get st(){
67
68
  return this.cache.style;
@@ -84,7 +85,7 @@ class ZikoUIElement {
84
85
  root=root.parent;
85
86
  }
86
87
  }
87
- clone() {
88
+ clone(render=false) {
88
89
  // Not working For Table
89
90
  const UI = new this.constructor();
90
91
  UI.__proto__=this.__proto__;
@@ -93,7 +94,7 @@ class ZikoUIElement {
93
94
  UI.append(...items);
94
95
  }
95
96
  else UI.element=this.element.cloneNode(true);
96
- return UI;
97
+ return UI.render(render);
97
98
  }
98
99
  style(styles,{target = "parent", maskVector = null } = {}){
99
100
  this.st.style(styles,{target,maskVector});
@@ -262,14 +263,17 @@ class ZikoUIElement {
262
263
  this.items.forEach(callback);
263
264
  return this;
264
265
  }
265
- filter(condition_callback,if_callback,else_callback){
266
+ where(condition_callback,if_callback,else_callback){
266
267
  this.items.filter(condition_callback).forEach(if_callback)
267
268
  return this;
268
269
  }
270
+ filter(condition){
271
+ return this.items.filter(condition);
272
+ }
269
273
  filterByTextContent(text,exactMatch=false){
270
274
  this.items.map(n=>n.render());
271
275
  this.items.filter(n=>{
272
- const content=n.element.textContent
276
+ const content=n.element.textContent;
273
277
  return !(exactMatch?content===text:content.includes(text))
274
278
  }).map(n=>n.render(false));
275
279
  return this;
@@ -323,6 +327,41 @@ class ZikoUIElement {
323
327
  this.events.ptr.onOut(...callbacks);
324
328
  return this;
325
329
  }
330
+ onMouseMove(...callbacks){
331
+ if(!this.events.mouse)this.events.mouse = Mouse(this);
332
+ this.events.mouse.onMove(...callbacks);
333
+ return this;
334
+ }
335
+ onMouseDown(...callbacks){
336
+ if(!this.events.mouse)this.events.mouse = Mouse(this);
337
+ this.events.mouse.onDown(...callbacks);
338
+ return this;
339
+ }
340
+ onMouseUp(...callbacks){
341
+ if(!this.events.mouse)this.events.mouse = Mouse(this);
342
+ this.events.mouse.onUp(...callbacks);
343
+ return this;
344
+ }
345
+ onMouseEnter(...callbacks){
346
+ if(!this.events.mouse)this.events.mouse = Mouse(this);
347
+ this.events.mouse.onEnter(...callbacks);
348
+ return this;
349
+ }
350
+ onMouseLeave(...callbacks){
351
+ if(!this.events.mouse)this.events.mouse = Mouse(this);
352
+ this.events.mouse.onLeave(...callbacks);
353
+ return this;
354
+ }
355
+ onMouseOut(...callbacks){
356
+ if(!this.events.mouse)this.events.mouse = Mouse(this);
357
+ this.events.mouse.onOut(...callbacks);
358
+ return this;
359
+ }
360
+ onWheel(...callbacks){
361
+ if(!this.events.wheel)this.events.wheel = Wheel(this);
362
+ this.events.wheel.onWheel(...callbacks);
363
+ return this;
364
+ }
326
365
  onKeyDown(...callbacks){
327
366
  if(!this.events.key)this.events.key = Key(this);
328
367
  this.events.key.onDown(...callbacks);
@@ -404,12 +443,12 @@ class ZikoUIElement {
404
443
  return this;
405
444
  }
406
445
  on(event_name,...callbacks){
407
- if(!this.events.custom)this.events.custom = CustomEvent(this);
446
+ if(!this.events.custom)this.events.custom = customEvent(this);
408
447
  this.events.custom.on(event_name,...callbacks);
409
448
  return this;
410
449
  }
411
450
  emit(event_name,detail={}){
412
- if(!this.events.custom)this.events.custom = CustomEvent(this);
451
+ if(!this.events.custom)this.events.custom = customEvent(this);
413
452
  this.events.custom.emit(event_name,detail);
414
453
  return this;
415
454
  }
@@ -446,20 +485,6 @@ class ZikoUIElement {
446
485
  isVisible: topVisible || bottomVisible || rightVisible || leftVisible,
447
486
  };
448
487
  }
449
-
450
-
451
- // toggleSlide() {}
452
-
453
-
454
- // Glassmorphism(background = "rgba(255,255,255,0.1)", blur = "1px") {
455
- // this.style({ background: background, backdropFilter: blur });
456
- // return this;
457
- // }
458
- // Neumorphism(r = "50px", bg = "cyan", box = "13px -13px 49px #5d8fac") {
459
- // this.style({ borderRadius: r, background: bg, boxShadow: box });
460
- // return this;
461
- // }
462
-
463
488
  setFullScreen(set = true, e) {
464
489
  if(!this.element.requestFullscreen){
465
490
  console.error("Fullscreen API is not supported in this browser.");
@@ -14,7 +14,7 @@ import {
14
14
  brs,
15
15
  hrs,
16
16
  link,
17
- ZikoHtml
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
- ZikoHtml,
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
- ZikoHtml
152
+ html
153
153
  }
154
154
  export default UI;
File without changes
@@ -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.__Target__=__Target__;
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
  };