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.
Files changed (233) hide show
  1. package/core/App/Globals/index.js +18 -0
  2. package/{src → core}/App/app.js +1 -1
  3. package/{src → core}/App/index.js +1 -0
  4. package/{src → core}/Graphics/Canvas/canvas.js +1 -1
  5. package/{src → core}/Reactivity/Events/index.js +1 -1
  6. package/{src → core}/UI/CustomElement/Elements/Accordion/index.js +2 -2
  7. package/{src → core}/UI/CustomElement/Elements/CodeNote/CodeCell.js +1 -1
  8. package/{src → core}/UI/CustomElement/Elements/CodeNote/SubElements.js +4 -4
  9. package/{src → core}/UI/Inputs/Primitives/btn.js +1 -2
  10. package/{src → core}/UI/Inputs/Primitives/inputs.js +0 -10
  11. package/{src → core}/UI/Inputs/Primitives/select.js +0 -1
  12. package/{src → core}/UI/Inputs/Primitives/textarea.js +0 -1
  13. package/{src → core}/UI/List/index.js +0 -3
  14. package/{src → core}/UI/Media/Audio/index.js +0 -1
  15. package/{src → core}/UI/Media/Image/figure.js +0 -1
  16. package/{src → core}/UI/Media/Image/image.js +0 -1
  17. package/{src → core}/UI/Media/Video/index.js +0 -1
  18. package/{src → core}/UI/Misc/index.js +5 -9
  19. package/{src → core}/UI/Semantic/index.js +0 -7
  20. package/{src → core}/UI/Table/table.js +0 -1
  21. package/{src → core}/UI/Text/heading.js +0 -1
  22. package/{src → core}/UI/Text/p.js +0 -1
  23. package/{src → core}/UI/Text/text.js +0 -1
  24. package/{src → core}/UI/ZikoUIElement.js +3 -1
  25. package/{src → core}/UI/index.js +3 -3
  26. package/{src → core}/index.js +3 -1
  27. package/dist/ziko.cjs +33 -53
  28. package/dist/ziko.js +33 -53
  29. package/dist/ziko.min.js +2 -2
  30. package/dist/ziko.mjs +32 -53
  31. package/package.json +5 -3
  32. package/wrapper/react/index.jsx +16 -0
  33. package/wrapper/react/readme.md +19 -0
  34. package/wrapper/vue/ZikoUI.vue +17 -0
  35. package/src/App/Globals/index.js +0 -3
  36. /package/{src → core}/App/Accessibility/index.js +0 -0
  37. /package/{src → core}/App/Globals/__Target__.js +0 -0
  38. /package/{src → core}/App/Globals/__UI__.js +0 -0
  39. /package/{src → core}/App/Globals/__init__.js +0 -0
  40. /package/{src → core}/App/Router/index.js +0 -0
  41. /package/{src → core}/App/Seo/index.js +0 -0
  42. /package/{src → core}/App/Themes/dark.js +0 -0
  43. /package/{src → core}/App/Themes/index.js +0 -0
  44. /package/{src → core}/App/Themes/light.js +0 -0
  45. /package/{src → core}/Data/Api/fetchdom.js +0 -0
  46. /package/{src → core}/Data/Api/index.js +0 -0
  47. /package/{src → core}/Data/Api/preload.js +0 -0
  48. /package/{src → core}/Data/Converter/canvas.js +0 -0
  49. /package/{src → core}/Data/Converter/csv.js +0 -0
  50. /package/{src → core}/Data/Converter/index.js +0 -0
  51. /package/{src → core}/Data/Converter/json.js +0 -0
  52. /package/{src → core}/Data/Converter/markdown.js +0 -0
  53. /package/{src → core}/Data/Converter/svg.js +0 -0
  54. /package/{src → core}/Data/Parser/markdown.js +0 -0
  55. /package/{src → core}/Data/Parser/xml.js +0 -0
  56. /package/{src → core}/Data/Strings/index.js +0 -0
  57. /package/{src → core}/Data/decorators.js +0 -0
  58. /package/{src → core}/Data/index.js +0 -0
  59. /package/{src → core}/Graphics/Canvas/Elements/Basic/arc.js +0 -0
  60. /package/{src → core}/Graphics/Canvas/Elements/Basic/image.js +0 -0
  61. /package/{src → core}/Graphics/Canvas/Elements/Basic/line.js +0 -0
  62. /package/{src → core}/Graphics/Canvas/Elements/Basic/path.js +0 -0
  63. /package/{src → core}/Graphics/Canvas/Elements/Basic/points.js +0 -0
  64. /package/{src → core}/Graphics/Canvas/Elements/Basic/polygon.js +0 -0
  65. /package/{src → core}/Graphics/Canvas/Elements/Basic/polyline.js +0 -0
  66. /package/{src → core}/Graphics/Canvas/Elements/Basic/rect.js +0 -0
  67. /package/{src → core}/Graphics/Canvas/Elements/Basic/text.js +0 -0
  68. /package/{src → core}/Graphics/Canvas/Elements/Chart/histogram.js +0 -0
  69. /package/{src → core}/Graphics/Canvas/Elements/Chart/plot.js +0 -0
  70. /package/{src → core}/Graphics/Canvas/Elements/Chart/scatter.js +0 -0
  71. /package/{src → core}/Graphics/Canvas/Elements/Chart/stem.js +0 -0
  72. /package/{src → core}/Graphics/Canvas/Elements/Element.js +0 -0
  73. /package/{src → core}/Graphics/Canvas/Elements/Groupe.js +0 -0
  74. /package/{src → core}/Graphics/Canvas/Elements/grid.js +0 -0
  75. /package/{src → core}/Graphics/Canvas/Elements/index.js +0 -0
  76. /package/{src → core}/Graphics/Canvas/Filter/index.js +0 -0
  77. /package/{src → core}/Graphics/Canvas/Paint/index.js +0 -0
  78. /package/{src → core}/Graphics/Canvas/Utils/color.js +0 -0
  79. /package/{src → core}/Graphics/Canvas/Utils/floodFill.js +0 -0
  80. /package/{src → core}/Graphics/Canvas/_canvas_offscreen +0 -0
  81. /package/{src → core}/Graphics/Canvas/index.js +0 -0
  82. /package/{src → core}/Graphics/Svg/Elements/ZikoSvgElement.js +0 -0
  83. /package/{src → core}/Graphics/Svg/Elements/circle.js +0 -0
  84. /package/{src → core}/Graphics/Svg/Elements/ellipse.js +0 -0
  85. /package/{src → core}/Graphics/Svg/Elements/foreignObject.js +0 -0
  86. /package/{src → core}/Graphics/Svg/Elements/grid.js +0 -0
  87. /package/{src → core}/Graphics/Svg/Elements/groupe.js +0 -0
  88. /package/{src → core}/Graphics/Svg/Elements/image.js +0 -0
  89. /package/{src → core}/Graphics/Svg/Elements/line.js +0 -0
  90. /package/{src → core}/Graphics/Svg/Elements/path.js +0 -0
  91. /package/{src → core}/Graphics/Svg/Elements/polygon.js +0 -0
  92. /package/{src → core}/Graphics/Svg/Elements/polyline.js +0 -0
  93. /package/{src → core}/Graphics/Svg/Elements/rect.js +0 -0
  94. /package/{src → core}/Graphics/Svg/Elements/text.js +0 -0
  95. /package/{src → core}/Graphics/Svg/index.js +0 -0
  96. /package/{src → core}/Graphics/Svg/svg.js +0 -0
  97. /package/{src → core}/Graphics/index.js +0 -0
  98. /package/{src → core}/Math/Calculus/Special Functions/bessel.js +0 -0
  99. /package/{src → core}/Math/Calculus/Special Functions/beta.js +0 -0
  100. /package/{src → core}/Math/Calculus/Special Functions/gamma.js +0 -0
  101. /package/{src → core}/Math/Calculus/Special Functions/index.js +0 -0
  102. /package/{src → core}/Math/Calculus/index.js +0 -0
  103. /package/{src → core}/Math/Complex/Fractals/julia.js +0 -0
  104. /package/{src → core}/Math/Complex/index.js +0 -0
  105. /package/{src → core}/Math/Discret/Combinaison/index.js +0 -0
  106. /package/{src → core}/Math/Discret/Conversion/index.js +0 -0
  107. /package/{src → core}/Math/Discret/Logic/index.js +0 -0
  108. /package/{src → core}/Math/Discret/Permutation/index.js +0 -0
  109. /package/{src → core}/Math/Discret/Set/index.js +0 -0
  110. /package/{src → core}/Math/Discret/Set/powerSet.js +0 -0
  111. /package/{src → core}/Math/Discret/Set/subSet.js +0 -0
  112. /package/{src → core}/Math/Discret/index.js +0 -0
  113. /package/{src → core}/Math/Functions/index.js +0 -0
  114. /package/{src → core}/Math/Matrix/Decomposition.js +0 -0
  115. /package/{src → core}/Math/Matrix/LinearSystem.js +0 -0
  116. /package/{src → core}/Math/Matrix/Matrix.js +0 -0
  117. /package/{src → core}/Math/Matrix/index.js +0 -0
  118. /package/{src → core}/Math/Numeric/index.js +0 -0
  119. /package/{src → core}/Math/Random/index.js +0 -0
  120. /package/{src → core}/Math/Signal/__np.py.txt +0 -0
  121. /package/{src → core}/Math/Signal/conv.js +0 -0
  122. /package/{src → core}/Math/Signal/fft.js +0 -0
  123. /package/{src → core}/Math/Signal/filter.js +0 -0
  124. /package/{src → core}/Math/Signal/functions.js +0 -0
  125. /package/{src → core}/Math/Signal/index.js +0 -0
  126. /package/{src → core}/Math/Statistics/Functions/index.js +0 -0
  127. /package/{src → core}/Math/Statistics/index.js +0 -0
  128. /package/{src → core}/Math/Utils/arithmetic.js +0 -0
  129. /package/{src → core}/Math/Utils/checkers.js +0 -0
  130. /package/{src → core}/Math/Utils/comparaison.js +0 -0
  131. /package/{src → core}/Math/Utils/conversions.js +0 -0
  132. /package/{src → core}/Math/Utils/discret.js +0 -0
  133. /package/{src → core}/Math/Utils/index.js +0 -0
  134. /package/{src → core}/Math/Utils/mapfun.js +0 -0
  135. /package/{src → core}/Math/absract.js +0 -0
  136. /package/{src → core}/Math/const.js +0 -0
  137. /package/{src → core}/Math/index.js +0 -0
  138. /package/{src → core}/Reactivity/Events/Global/Click.js +0 -0
  139. /package/{src → core}/Reactivity/Events/Global/Clipboard.js +0 -0
  140. /package/{src → core}/Reactivity/Events/Global/CustomEvent.js +0 -0
  141. /package/{src → core}/Reactivity/Events/Global/Drag.js +0 -0
  142. /package/{src → core}/Reactivity/Events/Global/Focus.js +0 -0
  143. /package/{src → core}/Reactivity/Events/Global/Key.js +0 -0
  144. /package/{src → core}/Reactivity/Events/Global/Mouse.js +0 -0
  145. /package/{src → core}/Reactivity/Events/Global/Pointer.js +0 -0
  146. /package/{src → core}/Reactivity/Events/Global/Touch.js +0 -0
  147. /package/{src → core}/Reactivity/Events/Global/Wheel.js +0 -0
  148. /package/{src → core}/Reactivity/Events/Partiel/Hash.js +0 -0
  149. /package/{src → core}/Reactivity/Events/Partiel/Input.js +0 -0
  150. /package/{src → core}/Reactivity/Events/Partiel/MediaEvent.js +0 -0
  151. /package/{src → core}/Reactivity/Events/ZikoEvent.js +0 -0
  152. /package/{src → core}/Reactivity/Observer/index.js +0 -0
  153. /package/{src → core}/Reactivity/Observer/intersection.js +0 -0
  154. /package/{src → core}/Reactivity/Observer/mutation.js +0 -0
  155. /package/{src → core}/Reactivity/Observer/resize.js +0 -0
  156. /package/{src → core}/Reactivity/Use/Contexte/index.js +0 -0
  157. /package/{src → core}/Reactivity/Use/Contexte/useSuccesifKeys.js +0 -0
  158. /package/{src → core}/Reactivity/Use/Decorators/index.js +0 -0
  159. /package/{src → core}/Reactivity/Use/Interactions/index.js +0 -0
  160. /package/{src → core}/Reactivity/Use/Interactions/useBluetooth.js +0 -0
  161. /package/{src → core}/Reactivity/Use/Interactions/useChannel.js +0 -0
  162. /package/{src → core}/Reactivity/Use/Interactions/useEventEmmiter.js +0 -0
  163. /package/{src → core}/Reactivity/Use/Interactions/useSerial.js +0 -0
  164. /package/{src → core}/Reactivity/Use/Interactions/useThread.js +0 -0
  165. /package/{src → core}/Reactivity/Use/Interactions/useUsb.js +0 -0
  166. /package/{src → core}/Reactivity/Use/Sensors/index.js +0 -0
  167. /package/{src → core}/Reactivity/Use/Sensors/useBattery.js +0 -0
  168. /package/{src → core}/Reactivity/Use/Sensors/useCamera.js +0 -0
  169. /package/{src → core}/Reactivity/Use/Sensors/useGeolocation.js +0 -0
  170. /package/{src → core}/Reactivity/Use/Sensors/useMicro.js +0 -0
  171. /package/{src → core}/Reactivity/Use/Sensors/useOrientation.js +0 -0
  172. /package/{src → core}/Reactivity/Use/Storage/index.js +0 -0
  173. /package/{src → core}/Reactivity/Use/Storage/useCookie.js +0 -0
  174. /package/{src → core}/Reactivity/Use/Storage/useIndexedDb.js +0 -0
  175. /package/{src → core}/Reactivity/Use/Storage/useStorage.js +0 -0
  176. /package/{src → core}/Reactivity/Use/UI/index.js +0 -0
  177. /package/{src → core}/Reactivity/Use/UI/useCssLink.js +0 -0
  178. /package/{src → core}/Reactivity/Use/UI/useCssText.js +0 -0
  179. /package/{src → core}/Reactivity/Use/UI/useFavIcon.js +0 -0
  180. /package/{src → core}/Reactivity/Use/UI/useLinearGradient.js +0 -0
  181. /package/{src → core}/Reactivity/Use/UI/useMediaQuery.js +0 -0
  182. /package/{src → core}/Reactivity/Use/UI/useRadialGradient.js +0 -0
  183. /package/{src → core}/Reactivity/Use/UI/useStyle.js +0 -0
  184. /package/{src → core}/Reactivity/Use/UI/useTheme.js +0 -0
  185. /package/{src → core}/Reactivity/Use/UI/useTitle.js +0 -0
  186. /package/{src → core}/Reactivity/Use/index.js +0 -0
  187. /package/{src → core}/Reactivity/Use/todo.md +0 -0
  188. /package/{src → core}/Reactivity/index.js +0 -0
  189. /package/{src → core}/Time/animation.js +0 -0
  190. /package/{src → core}/Time/index.js +0 -0
  191. /package/{src → core}/Time/loop.js +0 -0
  192. /package/{src → core}/Time/utils/decorators.js +0 -0
  193. /package/{src → core}/Time/utils/ease.js +0 -0
  194. /package/{src → core}/Time/utils/index.js +0 -0
  195. /package/{src → core}/Time/utils/performance.js +0 -0
  196. /package/{src → core}/Time/utils/ui.js +0 -0
  197. /package/{src → core}/UI/CustomElement/Elements/Carousel/index.js +0 -0
  198. /package/{src → core}/UI/CustomElement/Elements/CodeNote/CodeNote.js +0 -0
  199. /package/{src → core}/UI/CustomElement/Elements/CodeNote/index.js +0 -0
  200. /package/{src → core}/UI/CustomElement/Elements/Columns.js +0 -0
  201. /package/{src → core}/UI/CustomElement/Elements/FAB.js +0 -0
  202. /package/{src → core}/UI/CustomElement/Elements/Menu.js +0 -0
  203. /package/{src → core}/UI/CustomElement/Elements/Notification.js +0 -0
  204. /package/{src → core}/UI/CustomElement/Elements/Popover.js +0 -0
  205. /package/{src → core}/UI/CustomElement/Elements/Popup.js +0 -0
  206. /package/{src → core}/UI/CustomElement/Elements/Swipper.js +0 -0
  207. /package/{src → core}/UI/CustomElement/Elements/Tabs/index.js +0 -0
  208. /package/{src → core}/UI/CustomElement/Elements/Timeline.js +0 -0
  209. /package/{src → core}/UI/CustomElement/Elements/Toast.js +0 -0
  210. /package/{src → core}/UI/CustomElement/Elements/Treeview.js +0 -0
  211. /package/{src → core}/UI/CustomElement/Elements/index.js +0 -0
  212. /package/{src → core}/UI/CustomElement/Flex.js +0 -0
  213. /package/{src → core}/UI/CustomElement/Grid.js +0 -0
  214. /package/{src → core}/UI/CustomElement/index.js +0 -0
  215. /package/{src → core}/UI/Embaded/index.js +0 -0
  216. /package/{src → core}/UI/Inputs/Primitives/elements.js +0 -0
  217. /package/{src → core}/UI/Inputs/camera.js +0 -0
  218. /package/{src → core}/UI/Inputs/index.js +0 -0
  219. /package/{src → core}/UI/List/elements.js +0 -0
  220. /package/{src → core}/UI/Media/Image/index.js +0 -0
  221. /package/{src → core}/UI/Media/index.js +0 -0
  222. /package/{src → core}/UI/Style/index.js +0 -0
  223. /package/{src → core}/UI/Table/elements.js +0 -0
  224. /package/{src → core}/UI/Table/index.js +0 -0
  225. /package/{src → core}/UI/Table/utils.js +0 -0
  226. /package/{src → core}/UI/Text/index.js +0 -0
  227. /package/{src → core}/UI/Text/pre.js +0 -0
  228. /package/{src → core}/UI/Utils/index.js +0 -0
  229. /package/{src → core}/__proto__/Array.js +0 -0
  230. /package/{src → core}/__proto__/Function.js +0 -0
  231. /package/{src → core}/__proto__/Number.js +0 -0
  232. /package/{src → core}/__proto__/Object.js +0 -0
  233. /package/{src → core}/__proto__/String.js +0 -0
package/dist/ziko.mjs CHANGED
@@ -2,7 +2,7 @@
2
2
  /*
3
3
  Project: ziko.js
4
4
  Author: Zakaria Elalaoui
5
- Date : Mon Mar 18 2024 11:29:55 GMT+0000 (UTC)
5
+ Date : Thu Mar 21 2024 19:27:32 GMT+0000 (UTC)
6
6
  Git-Repo : https://github.com/zakarialaoui10/ziko.js
7
7
  Git-Wiki : https://github.com/zakarialaoui10/ziko.js/wiki
8
8
  Released under MIT License
@@ -4251,7 +4251,7 @@ const Events = {
4251
4251
  Focus,
4252
4252
  Input: Input$1,
4253
4253
  HashEvent,
4254
- CustomEvent,
4254
+ customEvent,
4255
4255
  ExtractAll: function () {
4256
4256
  const keys = Object.keys(this);
4257
4257
  for (let i = 0; i < keys.length; i++) {
@@ -6428,7 +6428,8 @@ const Use = {
6428
6428
 
6429
6429
  class ZikoUIElement {
6430
6430
  constructor(element, name = "") {
6431
- this.target = globalThis.__Target__ || globalThis.document.body;
6431
+ //this.target = globalThis.__Target__||globalThis.document.body;
6432
+ this.target = globalThis.__ZikoConfig__.default.target || globalThis.document.body;
6432
6433
  if (typeof element === "string") element = globalThis.document.createElement(element);
6433
6434
  this.element = element;
6434
6435
  this.uuid = this.constructor.name + "-" + Random.string(10);
@@ -6470,6 +6471,7 @@ class ZikoUIElement {
6470
6471
  });
6471
6472
  this.size("auto", "auto");
6472
6473
  globalThis.__UI__[this.cache.name]?.push(this);
6474
+ this.render(globalThis.__ZikoConfig__.default.render);
6473
6475
  }
6474
6476
  get st() {
6475
6477
  return this.cache.style;
@@ -6955,7 +6957,6 @@ class ZikoUIText extends ZikoUIElement {
6955
6957
  this.text = "";
6956
6958
  this.addValue(...value);
6957
6959
  this.st.display("inline-block");
6958
- this.render();
6959
6960
  }
6960
6961
  clear() {
6961
6962
  this.element.textContent = "";
@@ -7012,7 +7013,6 @@ class ZikoUIParagraphe extends ZikoUIElement {
7012
7013
  margin: 0,
7013
7014
  padding: 0
7014
7015
  });
7015
- this.render();
7016
7016
  }
7017
7017
  addValue(...value) {
7018
7018
  for (let i = 0; i < value.length; i++) {
@@ -7040,7 +7040,6 @@ class ZikoUIHeading extends ZikoUIElement {
7040
7040
  super(`h${type}`, `h${type}`);
7041
7041
  this.element = document.createElement("h" + type);
7042
7042
  this.element.textContent = value;
7043
- this.render();
7044
7043
  }
7045
7044
  get value() {
7046
7045
  return this.element.innerText;
@@ -7063,21 +7062,18 @@ const h6 = (text = "") => new ZikoUIHeading(6, text);
7063
7062
 
7064
7063
  class ZikoUIHtmlTag extends ZikoUIElement {
7065
7064
  constructor(element) {
7066
- super(element, "ZikoHtml");
7067
- this.render();
7065
+ super(element, "html");
7068
7066
  }
7069
7067
  }
7070
7068
  class ZikoUIBr extends ZikoUIElement {
7071
7069
  constructor() {
7072
7070
  super("br", "br");
7073
- this.render();
7074
7071
  delete this.append;
7075
7072
  }
7076
7073
  }
7077
7074
  class ZikoUIHr extends ZikoUIElement {
7078
7075
  constructor() {
7079
7076
  super("hr", "hr");
7080
- this.render();
7081
7077
  delete this.append;
7082
7078
  }
7083
7079
  }
@@ -7085,7 +7081,6 @@ class ZikoUILink extends ZikoUIElement {
7085
7081
  constructor(href) {
7086
7082
  super("a", "link");
7087
7083
  this.setHref(href);
7088
- this.render();
7089
7084
  }
7090
7085
  setHref(href) {
7091
7086
  this.element.href = href;
@@ -7096,14 +7091,13 @@ const hr = () => new ZikoUIHr();
7096
7091
  const brs = (n = 1) => new Array(n).fill(new ZikoUIBr());
7097
7092
  const hrs = (n = 1) => new Array(n).fill(new ZikoUIHr());
7098
7093
  const link = (href, ...UIElement) => new ZikoUILink(href).append(...UIElement);
7099
- const ZikoHtml = (tag, ...UIElement) => new ZikoUIHtmlTag(tag).append(...UIElement);
7094
+ const html = (tag, ...UIElement) => new ZikoUIHtmlTag(tag).append(...UIElement);
7100
7095
 
7101
7096
  class ZikoUILI extends ZikoUIElement {
7102
7097
  constructor(UI) {
7103
7098
  super();
7104
7099
  this.element = document.createElement("li");
7105
7100
  this.append(UI);
7106
- this.render();
7107
7101
  }
7108
7102
  }
7109
7103
  class ZikoUIList extends ZikoUIElement {
@@ -7187,7 +7181,6 @@ class ZikoUIOList extends ZikoUIList {
7187
7181
  constructor(...arr) {
7188
7182
  super("ol", "ol");
7189
7183
  this.append(...arr);
7190
- this.render();
7191
7184
  }
7192
7185
  type(tp = 1) {
7193
7186
  this.element.setAttribute("type", tp);
@@ -7202,7 +7195,6 @@ class ZikoUIUList extends ZikoUIList {
7202
7195
  constructor(...arr) {
7203
7196
  super("ul", "ul");
7204
7197
  this.append(...arr);
7205
- this.render();
7206
7198
  }
7207
7199
  }
7208
7200
  const li = UI => new ZikoUILI(UI);
@@ -7211,10 +7203,9 @@ const ul = (...arr) => new ZikoUIUList(...arr);
7211
7203
 
7212
7204
  class ZikoUIBtn extends ZikoUIElement {
7213
7205
  constructor(value = "button") {
7214
- super();
7206
+ super("button", "btn");
7215
7207
  this.element = document.createElement("button");
7216
7208
  this.setValue(value);
7217
- this.render();
7218
7209
  this.st.cursor("pointer");
7219
7210
  }
7220
7211
  setValue(value) {
@@ -7260,7 +7251,6 @@ class ZikoUITextArea extends ZikoUIElement {
7260
7251
  super();
7261
7252
  this.element = document.createElement("textarea");
7262
7253
  //Object.assign(this,inputComposer.call(this));
7263
- this.render();
7264
7254
  }
7265
7255
  get value() {
7266
7256
  return this.element.textContent;
@@ -7280,7 +7270,6 @@ class ZikoUIInput extends ZikoUIElement {
7280
7270
  });
7281
7271
  this.setValue(value);
7282
7272
  if (datalist) this.linkDatalist(datalist);
7283
- this.render();
7284
7273
  }
7285
7274
  onInput(...callbacks) {
7286
7275
  if (!this.events.input) this.events.input = Input$1(this);
@@ -7389,7 +7378,6 @@ class ZikoUIInputNumber extends ZikoUIInput {
7389
7378
  super();
7390
7379
  this._setType("number");
7391
7380
  this.setMin(min).setMax(max).setStep(step);
7392
- this.render();
7393
7381
  }
7394
7382
  get value() {
7395
7383
  return +this.element.value;
@@ -7412,7 +7400,6 @@ class ZikoUIInputSlider extends ZikoUIInputNumber {
7412
7400
  super();
7413
7401
  this._setType("range");
7414
7402
  this.setMin(min).setMax(max).setValue(val).setStep(step);
7415
- this.render();
7416
7403
  }
7417
7404
  }
7418
7405
  class ZikoUIInputColor extends ZikoUIInput {
@@ -7420,7 +7407,6 @@ class ZikoUIInputColor extends ZikoUIInput {
7420
7407
  super();
7421
7408
  this._setType("color");
7422
7409
  this.background(this.value);
7423
- this.render();
7424
7410
  this.onInput(() => this.background(this.value));
7425
7411
  }
7426
7412
  }
@@ -7428,35 +7414,30 @@ class ZikoUIInputPassword extends ZikoUIInput {
7428
7414
  constructor() {
7429
7415
  super();
7430
7416
  this._setType("password");
7431
- this.render();
7432
7417
  }
7433
7418
  }
7434
7419
  class ZikoUIInputEmail extends ZikoUIInput {
7435
7420
  constructor() {
7436
7421
  super();
7437
7422
  this._setType("email");
7438
- this.render();
7439
7423
  }
7440
7424
  }
7441
7425
  class ZikoUIInputTime extends ZikoUIInput {
7442
7426
  constructor() {
7443
7427
  super();
7444
7428
  this._setType("time");
7445
- this.render();
7446
7429
  }
7447
7430
  }
7448
7431
  class ZikoUIInputDate extends ZikoUIInput {
7449
7432
  constructor() {
7450
7433
  super();
7451
7434
  this._setType("date");
7452
- this.render();
7453
7435
  }
7454
7436
  }
7455
7437
  class ZikoUIInputDateTime extends ZikoUIInput {
7456
7438
  constructor() {
7457
7439
  super();
7458
7440
  this._setType("datetime-local");
7459
- this.render();
7460
7441
  }
7461
7442
  }
7462
7443
  class ZikoUIInputCheckbox extends ZikoUIInput {
@@ -7532,7 +7513,6 @@ class ZikoUIInputDatalist extends ZikoUIElement {
7532
7513
  super();
7533
7514
  this.element = document.createElement("datalist");
7534
7515
  this.addOptions(...options).setId("ziko-datalist-id" + Random.string(10));
7535
- this.render();
7536
7516
  }
7537
7517
  addOptions(...options) {
7538
7518
  options.map(n => this.append(new ZikoUIInputOption(n)));
@@ -7591,7 +7571,6 @@ class ZikoUISelect extends ZikoUIElement {
7591
7571
  constructor() {
7592
7572
  super();
7593
7573
  this.element = document.createElement("select");
7594
- this.render();
7595
7574
  }
7596
7575
  addOptions(...options) {
7597
7576
  options.map(n => this.append(new ZikoUIInputOption(n)));
@@ -7612,7 +7591,6 @@ class ZikoUIImage extends ZikoUIElement {
7612
7591
  width: w,
7613
7592
  height: h
7614
7593
  });
7615
- this.render();
7616
7594
  }
7617
7595
  updateSrc(url) {
7618
7596
  this.value = url;
@@ -7640,7 +7618,6 @@ class ZikoUIFigure extends ZikoUIElement {
7640
7618
  this.caption.append(caption.element);
7641
7619
  this.element.append(this.img);
7642
7620
  this.element.append(this.caption);
7643
- this.render();
7644
7621
  }
7645
7622
  }
7646
7623
  const figure = (image, caption) => new ZikoUIFigure(image, caption);
@@ -7655,7 +7632,6 @@ class ZikoUIVideo extends ZikoUIElement {
7655
7632
  width: w,
7656
7633
  height: h
7657
7634
  });
7658
- this.render();
7659
7635
  }
7660
7636
  get t() {
7661
7637
  return this.element.currentTime;
@@ -7693,7 +7669,6 @@ class ZikoUIAudio extends ZikoUIElement {
7693
7669
  constructor(src) {
7694
7670
  super("audio", "audio");
7695
7671
  this.element.setAttribute("src", src);
7696
- this.render();
7697
7672
  this.useControls();
7698
7673
  }
7699
7674
  get t() {
@@ -7906,7 +7881,7 @@ const Grid$1 = (...ZikoUIElement) => new ZikoUIGrid("div").append(...ZikoUIEleme
7906
7881
  class ZikoUIAccordion extends ZikoUIElement {
7907
7882
  constructor(summary, content, icon = "😁") {
7908
7883
  super("details", "Accordion");
7909
- this.summary = ZikoHtml("summary", summary).style({
7884
+ this.summary = html("summary", summary).style({
7910
7885
  fontSize: "1.1em",
7911
7886
  padding: "0.625rem",
7912
7887
  fontWeight: "bold",
@@ -8058,7 +8033,7 @@ class ZikoUICodeNote extends ZikoUIFlex {
8058
8033
  }
8059
8034
  const CodeNote = () => new ZikoUICodeNote();
8060
8035
 
8061
- const Input = (codeText = "") => ZikoHtml("code", codeText).style({
8036
+ const Input = (codeText = "") => html("code", codeText).style({
8062
8037
  width: "100%",
8063
8038
  height: "auto",
8064
8039
  padding: "10px",
@@ -8072,7 +8047,7 @@ const Input = (codeText = "") => ZikoHtml("code", codeText).style({
8072
8047
  background: "#f6f8fa",
8073
8048
  color: "#0062C3"
8074
8049
  }).setAttr("contenteditable", true).setAttr("spellcheck", false);
8075
- const Output = () => ZikoHtml("output").style({
8050
+ const Output = () => html("output").style({
8076
8051
  width: "100%",
8077
8052
  height: "auto",
8078
8053
  padding: "5px 0"
@@ -8096,7 +8071,7 @@ const BTN_STYLE = {
8096
8071
  const Right = ctx => Flex(text$1('▶️').style(BTN_STYLE).onClick(e => {
8097
8072
  if (ctx.parent instanceof ZikoUICodeNote) ctx.parent.setCurrentNote(ctx);
8098
8073
  ctx.execute();
8099
- globalThis.__Target__ = e.target.parent.parent[1][1];
8074
+ globalThis.__ZikoConfig__.default.target = e.target.parent.parent[1][1];
8100
8075
  }), text$1('📋').style(BTN_STYLE).onClick(() => {
8101
8076
  navigator.clipboard.writeText(ctx.codeText);
8102
8077
  }), text$1('✖️').style(BTN_STYLE).onClick(() => ctx.remove()), text$1('✖️').style(BTN_STYLE).onClick(() => ctx.remove())).style({
@@ -8228,7 +8203,7 @@ class ZikoUICodeCell extends ZikoUIFlex {
8228
8203
  #evaluateMd() {}
8229
8204
  #evaluateHtml() {}
8230
8205
  evaluate(order) {
8231
- globalThis.__Target__ = this.Output.element;
8206
+ globalThis.__ZikoConfig__.default.target = this.Output.element;
8232
8207
  switch (this.cache.type) {
8233
8208
  case "js":
8234
8209
  this.#evaluateJs(order);
@@ -8365,19 +8340,16 @@ const Tabs = (Controllers, Contents) => new ZikoUITabs(Controllers, Contents);
8365
8340
  class ZikoUIMain extends ZikoUIElement {
8366
8341
  constructor() {
8367
8342
  super("main", "Main");
8368
- this.render();
8369
8343
  }
8370
8344
  }
8371
8345
  class ZikoUIHeader extends ZikoUIElement {
8372
8346
  constructor() {
8373
8347
  super("header", "Header");
8374
- this.render();
8375
8348
  }
8376
8349
  }
8377
8350
  class ZikoUINav extends ZikoUIElement {
8378
8351
  constructor() {
8379
8352
  super("nav", "Nav");
8380
- this.render();
8381
8353
  }
8382
8354
  }
8383
8355
  class ZikoUISection extends ZikoUIElement {
@@ -8386,26 +8358,22 @@ class ZikoUISection extends ZikoUIElement {
8386
8358
  this.style({
8387
8359
  position: "relative"
8388
8360
  });
8389
- this.render();
8390
8361
  }
8391
8362
  }
8392
8363
  class ZikoUIArticle extends ZikoUIElement {
8393
8364
  constructor() {
8394
8365
  super("article", "Article");
8395
- this.render();
8396
8366
  }
8397
8367
  }
8398
8368
  class ZikoUIAside extends ZikoUIElement {
8399
8369
  constructor() {
8400
8370
  super("aside", "Aside");
8401
- this.render();
8402
8371
  }
8403
8372
  }
8404
8373
  class ZikoUIFooter extends ZikoUIElement {
8405
8374
  constructor() {
8406
8375
  super("footer", "Footer");
8407
8376
  this.element = document.createElement("footer");
8408
- this.render();
8409
8377
  }
8410
8378
  }
8411
8379
  const Section$1 = (...ZikoUIElement) => new ZikoUISection().append(...ZikoUIElement);
@@ -8496,7 +8464,6 @@ class ZikoUITable extends ZikoUIElement {
8496
8464
  };
8497
8465
  if (body) this.fromMatrix(body);
8498
8466
  if (caption) this.setCaption(caption);
8499
- this.render();
8500
8467
  }
8501
8468
  get caption() {
8502
8469
  return this.structure.caption;
@@ -8595,7 +8562,7 @@ class ZikoUITable extends ZikoUIElement {
8595
8562
  const Table = (matrix, config) => new ZikoUITable(matrix, config);
8596
8563
 
8597
8564
  const UI$1 = {
8598
- ZikoHtml,
8565
+ html,
8599
8566
  text: text$1,
8600
8567
  p,
8601
8568
  h1,
@@ -9326,7 +9293,7 @@ class ZikoUICanvas extends ZikoUIElement {
9326
9293
  });
9327
9294
  this.transformMatrix = new Matrix([[1, 0, 0], [0, 1, 0], [0, 0, 1]]);
9328
9295
  this.axisMatrix = new Matrix([[-10, -10], [10, 10]]);
9329
- this.render();
9296
+ this.render(globalThis.__ZikoConfig__.default.render);
9330
9297
  setTimeout(() => this.resize(w, h), 0);
9331
9298
  this.on("sizeupdated", () => this.adjust());
9332
9299
  }
@@ -9822,8 +9789,20 @@ const SPA = (root_UI, routes, patterns) => new ZikoSPA(root_UI, routes, patterns
9822
9789
 
9823
9790
  const __init__ = () => document.documentElement.setAttribute("data-engine", "zikojs");
9824
9791
 
9825
- var __Target__ = null;
9826
- if (globalThis?.document?.body) __Target__ = document.body;
9792
+ // var __Target__=null;
9793
+ // if(globalThis?.document?.body)__Target__=document.body;
9794
+ const __ZikoConfig__ = {
9795
+ default: {
9796
+ target: null,
9797
+ render: true
9798
+ },
9799
+ setDefault: function (pairs) {
9800
+ const keys = Object.keys(pairs);
9801
+ const values = Object.values(pairs);
9802
+ for (let i = 0; i < keys.length; i++) this.default[keys[i]] = values[i];
9803
+ },
9804
+ init: () => document.documentElement.setAttribute("data-engine", "zikojs")
9805
+ };
9827
9806
 
9828
9807
  class ZikoSeo {
9829
9808
  constructor(app) {
@@ -9882,7 +9861,7 @@ class ZikoUIApp extends ZikoUIFlex {
9882
9861
  theme: null,
9883
9862
  isRoot: true
9884
9863
  });
9885
- this.render();
9864
+ this.render(globalThis.__ZikoConfig__.default.render);
9886
9865
  }
9887
9866
  #init() {
9888
9867
  this.root.setAttribute("data-engine", "zikojs");
@@ -9920,7 +9899,7 @@ const Ziko = {
9920
9899
  };
9921
9900
  globalThis.__Ziko__ = Ziko;
9922
9901
  globalThis.__UI__ = __UI__;
9923
- globalThis.__Target__ = __Target__;
9902
+ globalThis.__ZikoConfig__ = __ZikoConfig__;
9924
9903
  function ExtractAll() {
9925
9904
  UI$1.ExtractAll();
9926
9905
  Math$1.ExtractAll();
@@ -9941,4 +9920,4 @@ function RemoveAll() {
9941
9920
  Data.RemoveAll();
9942
9921
  }
9943
9922
 
9944
- export { Accordion, App, Article, Aside, Base, Canvas, Carousel, CodeCell, CodeNote, Combinaison, Complex, DarkThemes, Data, E, EPSILON, Ease, Events, ExtractAll, Fixed, Flex, Footer, Graphics, Grid$1 as Grid, Header, LightThemes, LinearSystem, Logic$1 as Logic, Main, Math$1 as Math, Matrix, Nav, PI, Permutation, Random, RemoveAll, SPA, Section$1 as Section, Signal, Svg, Table, Tabs, Themes, Time, UI$1 as UI, Utils, ZikoHtml, ZikoUIArticle, ZikoUIAside, ZikoUIAudio, ZikoUIBr, ZikoUICanvas, ZikoUICodeNote, ZikoUIElement, ZikoUIFigure, ZikoUIFooter, ZikoUIHeader, ZikoUIHr, ZikoUIHtmlTag, ZikoUIImage, ZikoUILink, ZikoUIMain, ZikoUINav, ZikoUISection, ZikoUISvg, ZikoUIVideo, __init__, abs, accum, acos, acosh, acot, add, animation, arange, asin, asinh, atan, atan2, atanh, audio, bessel, beta, br, brs, btn, canvasArc, canvasCircle, canvasLine, canvasPoints, canvasRect, cartesianProduct, ceil, checkbox, choleskyDecomposition, clamp, complex, cos, cosh, cot, coth, csc, csv2arr, csv2json, csv2matrix, csv2object, csv2sql, datalist, Ziko as default, deg2rad, div, e, fact, figure, floor, gamma, geomspace, h1, h2, h3, h4, h5, h6, hr, hrs, hypot, image, inRange, input, inputCamera, inputColor, inputDate, inputDateTime, inputEmail, inputImage, inputNumber, inputPassword, inputTime, isApproximatlyEqual, json2arr, json2csv, json2csvFile, json2xml, json2xmlFile, json2yml, json2ymlFile, lerp, li, link, linspace, ln, logspace, loop, luDecomposition, map, mapfun, markdown2html, matrix, matrix2, matrix3, matrix4, max, min, modulo, mul, norm, nums, ol, ones, p, pgcd, pow, powerSet, ppcm, prod, qrDecomposition, rad2deg, radio, round, search, sec, select, sig, sign, sin, sinc, sinh, slider, sqrt, sqrtn, sub, subSet, sum, svg2ascii, svg2img, svg2imgUrl, svg2str, svgCircle, svgEllipse, svgGroupe, svgImage, svgLine, svgPolygon, svgRect, svgText, tan, tanh, text$1 as text, textarea, timeTaken, time_memory_Taken, ul, useDebounce, useThrottle, video, wait, waitForUIElm, waitForUIElmSync, zeros };
9923
+ export { Accordion, App, Article, Aside, Base, Canvas, Carousel, CodeCell, CodeNote, Combinaison, Complex, DarkThemes, Data, E, EPSILON, Ease, Events, ExtractAll, Fixed, Flex, Footer, Graphics, Grid$1 as Grid, Header, LightThemes, LinearSystem, Logic$1 as Logic, Main, Math$1 as Math, Matrix, Nav, PI, Permutation, Random, RemoveAll, SPA, Section$1 as Section, Signal, Svg, Table, Tabs, Themes, Time, UI$1 as UI, Utils, ZikoUIArticle, ZikoUIAside, ZikoUIAudio, ZikoUIBr, ZikoUICanvas, ZikoUICodeNote, ZikoUIElement, ZikoUIFigure, ZikoUIFooter, ZikoUIHeader, ZikoUIHr, ZikoUIHtmlTag, ZikoUIImage, ZikoUILink, ZikoUIMain, ZikoUINav, ZikoUISection, ZikoUISvg, ZikoUIVideo, __ZikoConfig__, __init__, abs, accum, acos, acosh, acot, add, animation, arange, asin, asinh, atan, atan2, atanh, audio, bessel, beta, br, brs, btn, canvasArc, canvasCircle, canvasLine, canvasPoints, canvasRect, cartesianProduct, ceil, checkbox, choleskyDecomposition, clamp, complex, cos, cosh, cot, coth, csc, csv2arr, csv2json, csv2matrix, csv2object, csv2sql, datalist, Ziko as default, deg2rad, div, e, fact, figure, floor, gamma, geomspace, h1, h2, h3, h4, h5, h6, hr, hrs, html, hypot, image, inRange, input, inputCamera, inputColor, inputDate, inputDateTime, inputEmail, inputImage, inputNumber, inputPassword, inputTime, isApproximatlyEqual, json2arr, json2csv, json2csvFile, json2xml, json2xmlFile, json2yml, json2ymlFile, lerp, li, link, linspace, ln, logspace, loop, luDecomposition, map, mapfun, markdown2html, matrix, matrix2, matrix3, matrix4, max, min, modulo, mul, norm, nums, ol, ones, p, pgcd, pow, powerSet, ppcm, prod, qrDecomposition, rad2deg, radio, round, search, sec, select, sig, sign, sin, sinc, sinh, slider, sqrt, sqrtn, sub, subSet, sum, svg2ascii, svg2img, svg2imgUrl, svg2str, svgCircle, svgEllipse, svgGroupe, svgImage, svgLine, svgPolygon, svgRect, svgText, tan, tanh, text$1 as text, textarea, timeTaken, time_memory_Taken, ul, useDebounce, useThrottle, video, wait, waitForUIElm, waitForUIElmSync, zeros };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ziko",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "a versatile JavaScript library offering a rich set of UI components, advanced mathematical utilities,Reactivity,animations,client side routing and graphics capabilities",
5
5
  "keywords": [
6
6
  "Zikojs",
@@ -15,11 +15,13 @@
15
15
  "Single Page Application"
16
16
  ],
17
17
  "type": "module",
18
- "source": "src/index.js",
18
+ "source": "core/index.js",
19
19
  "main": "dist/ziko.cjs",
20
20
  "module": "dist/ziko.mjs",
21
+ "unpkg": "dist/ziko.min.js",
21
22
  "files": [
22
- "src",
23
+ "core",
24
+ "wrapper",
23
25
  "dist",
24
26
  "LICENCE"
25
27
  ],
@@ -0,0 +1,16 @@
1
+ import React, { useRef, useEffect } from "react";
2
+ import {ZikoUIElement} from "ziko";
3
+ function ZikoUI({ ui }) {
4
+ const containerRef = useRef(null);
5
+ useEffect(() => {
6
+ console.log(globalThis.__ZikoConfig__)
7
+ if (containerRef.current && ui && ui instanceof ZikoUIElement) {
8
+ containerRef.current.innerHTML = "";
9
+ containerRef.current.appendChild(ui.element);
10
+ }
11
+ }, [ui]);
12
+ return (
13
+ <ziko-ui ref={containerRef} data-engine="ziko"></ziko-ui>
14
+ );
15
+ }
16
+ export default ZikoUI;
@@ -0,0 +1,19 @@
1
+ # Overview
2
+ is a tool designed for rendering [ziko](https://github.com/zakarialaoui10/ziko.js) elements within a React application.
3
+
4
+ # Usage
5
+ ```jsx
6
+ import ZikoUI from "react-ziko";
7
+ import { text } from "ziko";
8
+ const ui = text("Hello World").style({
9
+ color:"darkblue"
10
+ });
11
+ export default function App() {
12
+ return (
13
+ <main>
14
+ <ZikoUI ui={ui.render(false)} />
15
+ </main>
16
+ );
17
+ }
18
+
19
+ ```
@@ -0,0 +1,17 @@
1
+ <template>
2
+ <div ref="containerRef" data-engine="ziko">Test</div>
3
+ </template>
4
+ <script>
5
+ import {ZikoUIElement} from "ziko"
6
+ export default {
7
+ props: {
8
+ ui: Object
9
+ },
10
+ mounted() {
11
+ if (this.$refs.containerRef && this.ui instanceof ZikoUIElement) {
12
+ this.$refs.containerRef.innerHTML = "";
13
+ this.$refs.containerRef.appendChild(this.ui.element);
14
+ }
15
+ }
16
+ };
17
+ </script>
@@ -1,3 +0,0 @@
1
- export * from "./__init__";
2
- export * from "./__Target__";
3
- export * from "./__UI__"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes