ziko 0.0.23 → 0.0.24

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 (156) hide show
  1. package/dist/ziko.cjs +78 -2817
  2. package/dist/ziko.js +78 -2817
  3. package/dist/ziko.min.js +2 -2
  4. package/dist/ziko.mjs +76 -2755
  5. package/package.json +1 -1
  6. package/src/app/globals.js +4 -2
  7. package/src/data/converter/index.js +2 -6
  8. package/src/graphics/canvas/index.js +176 -2
  9. package/src/graphics/canvas/utils/floodFill.js +0 -1
  10. package/src/graphics/svg/index.js +69 -2
  11. package/src/reactivity/hooks/index.js +1 -1
  12. package/src/ui/elements/{primitives/ZikoUIElement.js → ZikoUIElement.js} +8 -9
  13. package/src/ui/elements/derived ( To Be Moved)/index.js +12 -0
  14. package/src/ui/elements/{derived/flex → flex}/index.js +2 -2
  15. package/src/ui/elements/{derived/grid → grid}/index.js +2 -2
  16. package/src/ui/elements/{primitives/index.js → index.js} +3 -1
  17. package/src/ui/elements/{primitives/io → io}/Form/index.js +1 -1
  18. package/src/ui/elements/{primitives/io → io}/Inputs/__helpers__.js +1 -1
  19. package/src/ui/elements/{primitives/io → io}/Inputs/input/index.js +1 -1
  20. package/src/ui/elements/{primitives/list → list}/index.js +2 -3
  21. package/src/ui/elements/{primitives/misc → misc}/index.js +2 -3
  22. package/src/ui/elements/{primitives/semantic → semantic}/index.js +8 -8
  23. package/src/ui/elements/{primitives/table → table}/table.js +1 -1
  24. package/src/ui/elements/{primitives/text → text}/__ZikoUIText__.js +3 -4
  25. package/src/ui/index.js +21 -21
  26. package/src/ui/utils/index.js +1 -1
  27. package/src/data/parser/markdown.js +0 -0
  28. package/src/graphics/canvas/canvas.js +0 -176
  29. package/src/graphics/svg/svg.js +0 -69
  30. package/src/reactivity/hooks/Interactions/useSerial.js +0 -0
  31. package/src/types.js +0 -73
  32. package/src/ui/elements/derived/index.js +0 -12
  33. package/src/ui/elements/primitives/ZikoUIContainerElement.js +0 -123
  34. /package/src/{global → _global (To Be Replaced )}/_themes/dark.js +0 -0
  35. /package/src/{global → _global (To Be Replaced )}/_themes/index.js +0 -0
  36. /package/src/{global → _global (To Be Replaced )}/_themes/light.js +0 -0
  37. /package/src/{global → _global (To Be Replaced )}/app/index.js +0 -0
  38. /package/src/{global → _global (To Be Replaced )}/component/index.js +0 -0
  39. /package/src/{global → _global (To Be Replaced )}/globals/index.js +0 -0
  40. /package/src/{global → _global (To Be Replaced )}/index.js +0 -0
  41. /package/src/{global → _global (To Be Replaced )}/params/index.js +0 -0
  42. /package/src/{global → _global (To Be Replaced )}/router/index.js +0 -0
  43. /package/src/{global → _global (To Be Replaced )}/seo/index.js +0 -0
  44. /package/src/{global → _global (To Be Replaced )}/style/index.js +0 -0
  45. /package/src/data/converter/{adoc.js → __(To Be Moved)adoc.js} +0 -0
  46. /package/src/data/converter/{markdown.js → __(To Be Moved)markdown.js} +0 -0
  47. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/arc.js +0 -0
  48. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/image.js +0 -0
  49. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/line.js +0 -0
  50. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/path.js +0 -0
  51. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/points.js +0 -0
  52. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/polygon.js +0 -0
  53. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/polyline.js +0 -0
  54. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/rect.js +0 -0
  55. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Basic/text.js +0 -0
  56. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Chart/histogram.js +0 -0
  57. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Chart/plot.js +0 -0
  58. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Chart/scatter.js +0 -0
  59. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Chart/stem.js +0 -0
  60. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/Element.js +0 -0
  61. /package/src/graphics/canvas/{elements → elements ( To Be Moved )}/index.js +0 -0
  62. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/circle.js +0 -0
  63. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/ellipse.js +0 -0
  64. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/foreign-object.js +0 -0
  65. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/groupe.js +0 -0
  66. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/image.js +0 -0
  67. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/index.js +0 -0
  68. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/line.js +0 -0
  69. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/link.js +0 -0
  70. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/path.js +0 -0
  71. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/polygon.js +0 -0
  72. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/polyline.js +0 -0
  73. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/rect.js +0 -0
  74. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Basic/text.js +0 -0
  75. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Derived/grid.js +0 -0
  76. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/Derived/index.js +0 -0
  77. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/index.js +0 -0
  78. /package/src/graphics/svg/{Elements → Elements ( To Be Moved )}/ziko-svg-element.js +0 -0
  79. /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/index.js +0 -0
  80. /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/useBattery.js +0 -0
  81. /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/useCamera.js +0 -0
  82. /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/useGeolocation.js +0 -0
  83. /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/useMicro.js +0 -0
  84. /package/src/reactivity/hooks/{Sensors → Sensors ( To Be Moved )}/useOrientation.js +0 -0
  85. /package/src/ui/elements/{derived → derived ( To Be Moved)}/accordion/accordion.js +0 -0
  86. /package/src/ui/elements/{derived → derived ( To Be Moved)}/accordion/collapsible.js +0 -0
  87. /package/src/ui/elements/{derived → derived ( To Be Moved)}/accordion/index.js +0 -0
  88. /package/src/ui/elements/{derived → derived ( To Be Moved)}/alert/alert.js +0 -0
  89. /package/src/ui/elements/{derived → derived ( To Be Moved)}/alert/index.js +0 -0
  90. /package/src/ui/elements/{derived → derived ( To Be Moved)}/alert/palette.js +0 -0
  91. /package/src/ui/elements/{derived → derived ( To Be Moved)}/carousel/index.js +0 -0
  92. /package/src/ui/elements/{derived → derived ( To Be Moved)}/code-note/SubElements.js.txt +0 -0
  93. /package/src/ui/elements/{derived → derived ( To Be Moved)}/code-note/code-cell.js +0 -0
  94. /package/src/ui/elements/{derived → derived ( To Be Moved)}/code-note/code-note.js +0 -0
  95. /package/src/ui/elements/{derived → derived ( To Be Moved)}/code-note/index.js +0 -0
  96. /package/src/ui/elements/{derived → derived ( To Be Moved)}/code-note/sub-elements.js +0 -0
  97. /package/src/ui/elements/{derived → derived ( To Be Moved)}/menu/index.js +0 -0
  98. /package/src/ui/elements/{derived → derived ( To Be Moved)}/menu/menu3d.js +0 -0
  99. /package/src/ui/elements/{derived → derived ( To Be Moved)}/modal/index.js +0 -0
  100. /package/src/ui/elements/{derived → derived ( To Be Moved)}/pagination/breadcrumbs.js +0 -0
  101. /package/src/ui/elements/{derived → derived ( To Be Moved)}/pagination/index.js +0 -0
  102. /package/src/ui/elements/{derived → derived ( To Be Moved)}/slider/__ZikoUISlider__.js +0 -0
  103. /package/src/ui/elements/{derived → derived ( To Be Moved)}/slider/hSlider.js +0 -0
  104. /package/src/ui/elements/{derived → derived ( To Be Moved)}/slider/index.js +0 -0
  105. /package/src/ui/elements/{derived → derived ( To Be Moved)}/slider/vSlider.js +0 -0
  106. /package/src/ui/elements/{derived → derived ( To Be Moved)}/splitter/__ZikoUISplitter__.js +0 -0
  107. /package/src/ui/elements/{derived → derived ( To Be Moved)}/splitter/hsplitter.js +0 -0
  108. /package/src/ui/elements/{derived → derived ( To Be Moved)}/splitter/index.js +0 -0
  109. /package/src/ui/elements/{derived → derived ( To Be Moved)}/splitter/vsplitter.js +0 -0
  110. /package/src/ui/elements/{derived → derived ( To Be Moved)}/tabs/index.js +0 -0
  111. /package/src/ui/elements/{primitives/embaded → embaded}/html.js +0 -0
  112. /package/src/ui/elements/{primitives/embaded → embaded}/index.js +0 -0
  113. /package/src/ui/elements/{primitives/embaded → embaded}/pdf.js +0 -0
  114. /package/src/ui/elements/{primitives/embaded → embaded}/youtube.js +0 -0
  115. /package/src/ui/elements/{primitives/hydrate.js → hydrate.js} +0 -0
  116. /package/src/ui/elements/{primitives/io → io}/Form/index.js.txt +0 -0
  117. /package/src/ui/elements/{primitives/io → io}/Inputs/index.js +0 -0
  118. /package/src/ui/elements/{primitives/io → io}/Inputs/input-camera/index.js +0 -0
  119. /package/src/ui/elements/{primitives/io → io}/Inputs/input-checkbox/index.js +0 -0
  120. /package/src/ui/elements/{primitives/io → io}/Inputs/input-color/index.js +0 -0
  121. /package/src/ui/elements/{primitives/io → io}/Inputs/input-date-time/index.js +0 -0
  122. /package/src/ui/elements/{primitives/io → io}/Inputs/input-date-time/input-date-time.js +0 -0
  123. /package/src/ui/elements/{primitives/io → io}/Inputs/input-date-time/input-date.js +0 -0
  124. /package/src/ui/elements/{primitives/io → io}/Inputs/input-date-time/input-time.js +0 -0
  125. /package/src/ui/elements/{primitives/io → io}/Inputs/input-email-password/index.js +0 -0
  126. /package/src/ui/elements/{primitives/io → io}/Inputs/input-email-password/input-email.js +0 -0
  127. /package/src/ui/elements/{primitives/io → io}/Inputs/input-email-password/input-password.js +0 -0
  128. /package/src/ui/elements/{primitives/io → io}/Inputs/input-file/index.js +0 -0
  129. /package/src/ui/elements/{primitives/io → io}/Inputs/input-file/input-file.js +0 -0
  130. /package/src/ui/elements/{primitives/io → io}/Inputs/input-file/input-image.js +0 -0
  131. /package/src/ui/elements/{primitives/io → io}/Inputs/input-number/index.js +0 -0
  132. /package/src/ui/elements/{primitives/io → io}/Inputs/input-radio/index.js +0 -0
  133. /package/src/ui/elements/{primitives/io → io}/Inputs/input-search/index.js +0 -0
  134. /package/src/ui/elements/{primitives/io → io}/Inputs/input-slider/index.js +0 -0
  135. /package/src/ui/elements/{primitives/io → io}/Select/index.js +0 -0
  136. /package/src/ui/elements/{primitives/io → io}/Textarea/index.js +0 -0
  137. /package/src/ui/elements/{primitives/io → io}/index.js +0 -0
  138. /package/src/ui/elements/{primitives/list → list}/elements.js +0 -0
  139. /package/src/ui/elements/{primitives/media → media}/Audio/index.js +0 -0
  140. /package/src/ui/elements/{primitives/media → media}/Image/figure.js +0 -0
  141. /package/src/ui/elements/{primitives/media → media}/Image/image.js +0 -0
  142. /package/src/ui/elements/{primitives/media → media}/Image/index.js +0 -0
  143. /package/src/ui/elements/{primitives/media → media}/Video/index.js +0 -0
  144. /package/src/ui/elements/{primitives/media → media}/__ZikoUIDynamicMediaELement__.js +0 -0
  145. /package/src/ui/elements/{primitives/media → media}/index.js +0 -0
  146. /package/src/ui/elements/{primitives/misc → misc}/hyperscript.js +0 -0
  147. /package/src/ui/elements/{primitives/misc → misc}/suspense.js +0 -0
  148. /package/src/ui/elements/{primitives/misc → misc}/xml-wrapper.js +0 -0
  149. /package/src/ui/elements/{primitives/table → table}/elements.js +0 -0
  150. /package/src/ui/elements/{primitives/table → table}/index.js +0 -0
  151. /package/src/ui/elements/{primitives/table → table}/utils.js +0 -0
  152. /package/src/ui/elements/{primitives/text → text}/heading.js +0 -0
  153. /package/src/ui/elements/{primitives/text → text}/index.js +0 -0
  154. /package/src/ui/elements/{primitives/text → text}/p.js +0 -0
  155. /package/src/ui/elements/{primitives/text → text}/pre.js +0 -0
  156. /package/src/ui/elements/{primitives/text → text}/text.js +0 -0
@@ -1,176 +0,0 @@
1
- import ZikoUIContainerElement from "../../ui/elements/primitives/ZikoUIContainerElement.js";
2
- import {Matrix} from "../../math/matrix/index.js"
3
- // import { convolute } from "../../math/signal/conv.js";
4
- class ZikoUICanvas extends ZikoUIContainerElement{
5
- constructor(w,h){
6
- super("canvas","canvas");
7
- this.ctx = this.element?.getContext("2d");
8
- this.style({
9
- border:"1px red solid",
10
- })
11
- this.transformMatrix=new Matrix([
12
- [1,0,0],
13
- [0,1,0],
14
- [0,0,1]
15
- ])
16
- this.axisMatrix=new Matrix([
17
- [-10,-10],
18
- [10,10]
19
- ])
20
- // setTimeout(()=>this.resize(w,h),0);
21
- requestAnimationFrame(()=>this.resize(w,h),0);
22
- this.on("sizeupdated",()=>this.adjust())
23
- }
24
- get Xmin(){
25
- return this.axisMatrix[0][0];
26
- }
27
- get Ymin(){
28
- return this.axisMatrix[0][1];
29
- }
30
- get Xmax(){
31
- return this.axisMatrix[1][0];
32
- }
33
- get Ymax(){
34
- return this.axisMatrix[1][1];
35
- }
36
- get ImageData(){
37
- return this.ctx.getImageData(0,0,c.Width,c.Height);
38
- }
39
- draw(all=true){
40
- if(all){
41
- this.clear();
42
- this.items.forEach(element => {
43
- element.parent=this;
44
- element.draw(this.ctx)
45
- });
46
- }
47
- else {
48
- this.items.at(-1).parent=this;
49
- this.items.at(-1).draw(this.ctx);
50
- }
51
- this.maintain();
52
- return this;
53
- }
54
- applyTransformMatrix(){
55
- this.ctx.setTransform(
56
- this.transformMatrix[0][0],
57
- this.transformMatrix[1][0],
58
- this.transformMatrix[0][1],
59
- this.transformMatrix[1][1],
60
- this.transformMatrix[0][2],
61
- this.transformMatrix[1][2],
62
- );
63
- return this;
64
- }
65
- resize(w,h){
66
- this.size(w,h)
67
- this.lineWidth();
68
- this.view(this.axisMatrix[0][0], this.axisMatrix[0][1], this.axisMatrix[1][0], this.axisMatrix[1][1]);
69
- this.emit("sizeupdated");
70
- return this;
71
- }
72
- adjust(){
73
- this.element.width =this.element?.getBoundingClientRect().width;
74
- this.element.height =this.element?.getBoundingClientRect().height;
75
- this.view(this.axisMatrix[0][0], this.axisMatrix[0][1], this.axisMatrix[1][0], this.axisMatrix[1][1]);
76
- return this;
77
- }
78
- view(xMin,yMin,xMax,yMax){
79
- this.transformMatrix[0][0]=this.width/(xMax-xMin); // scaleX
80
- this.transformMatrix[1][1]=-this.height/(yMax-yMin); // scaleY
81
- this.transformMatrix[0][2]=this.width/2;
82
- this.transformMatrix[1][2]=this.height/2;
83
- this.axisMatrix=new Matrix([
84
- [xMin,yMin],
85
- [xMax,yMax]
86
- ])
87
-
88
- this.applyTransformMatrix();
89
- this.clear();
90
- this.lineWidth(1);
91
- this.draw();
92
- return this;
93
- }
94
- reset(){
95
- this.ctx.setTransform(1,0,0,0,0,0);
96
- return this;
97
- }
98
- append(element){
99
- this.items.push(element);
100
- this.draw(false);
101
- return this;
102
- }
103
- background(color){
104
- this.ctx.fillStyle = color;
105
- this.ctx.setTransform(1, 0, 0, 1, 0, 0);
106
- this.ctx.fillRect(0, 0, this.width, this.height);
107
- this.applyTransformMatrix();
108
- this.draw();
109
- }
110
- lineWidth(w){
111
- this.ctx.lineWidth=w/this.transformMatrix[0][0];
112
- return this
113
- }
114
- getImageData(x=0,y=0,w=this.width,h=this.height){
115
- return this.ctx.getImageData(x,y,w,h);
116
- }
117
- clear(){
118
- this.ctx.setTransform(1, 0, 0, 1, 0, 0);
119
- this.ctx.clearRect(0, 0, this.width, this.height);
120
- this.applyTransformMatrix();
121
- return this;
122
- }
123
- clone(){
124
- console.log(this.width)
125
- const canvas=new ZikoUICanvas();
126
- canvas.items=this.items;
127
- canvas.transformMatrix=this.transformMatrix;
128
- canvas.axisMatrix=this.axisMatrix;
129
- Object.assign(canvas.cache,{...this.cache});
130
- //waitForUIElm(this)
131
- //console.log(element)
132
- this.size(this.element.style.width,this.element.style.width);
133
- this.applyTransformMatrix();
134
- this.draw();
135
- this.adjust();
136
- return canvas;
137
- }
138
- toImage() {
139
- this.img = document?.createElement("img");
140
- this.img.src = this.element?.toDataURL("image/png");
141
- return this;
142
- }
143
- toBlob() {
144
- var canvas = this.element;
145
- canvas.toBlob(function (blob) {
146
- var newImg = document?.createElement("img"),
147
- url = URL.createObjectURL(blob);
148
- newImg.onload = function () {
149
- URL.revokeObjectURL(url);
150
- };
151
- newImg.src = url;
152
- console.log(newImg);
153
- });
154
- }
155
- zoomIn(){
156
-
157
- }
158
- zoomOut(){
159
-
160
- }
161
- undo(n){
162
-
163
- }
164
- redo(n){
165
-
166
- }
167
- stream(){
168
-
169
- }
170
- }
171
-
172
- const Canvas=(w,h)=>new ZikoUICanvas(w,h);
173
- export{
174
- ZikoUICanvas,
175
- Canvas
176
- }
@@ -1,69 +0,0 @@
1
- import { ZikoUIContainerElement } from "../../ui/index.js";
2
- class ZikoUISvg extends ZikoUIContainerElement {
3
- constructor(w=360,h=300) {
4
- super("svg","svg");
5
- //this.cache={};
6
- // this.setAttr("width",w);
7
- // this.setAttr("height",h);
8
- // this.setAttr({
9
- // width : w,
10
- // height : h
11
- // })
12
- this.style({border:"1px black solid"});
13
- //this.view(-w/2,-h/2,w/2,h/2);
14
- this.size(w, h)
15
- this.view(-10,-10,10,10);
16
- }
17
- size(w, h){
18
- this.setAttr({
19
- width : w,
20
- height : h
21
- });
22
- return this
23
- }
24
- view(x1,y1,x2,y2){
25
- let width=Math.abs(x2-x1);
26
- let height=Math.abs(y2-y1);
27
- this.setAttr("viewBox",[x1,y1,width,height].join(" "));
28
- this.st.scaleY(-1);
29
- return this;
30
- }
31
- add(...svgElement){
32
- for(let i=0;i<svgElement.length;i++){
33
- this.element.append(svgElement[i].element);
34
- this.items.push(svgElement[i])
35
- }
36
- this.maintain()
37
- return this;
38
- }
39
- remove(...svgElement){
40
- for(let i=0;i<svgElement.length;i++){
41
- this.element?.removeChild(svgElement[i].element);
42
- this.items=this.items.filter(n=>!svgElement)
43
- }
44
- this.maintain();
45
- return this;
46
- }
47
- mask(){
48
-
49
- }
50
- toString(){
51
- return (new XMLSerializer()).serializeToString(this.element);
52
- }
53
- btoa(){
54
- return btoa(this.toString())
55
- }
56
- toImg(){
57
- return 'data:image/svg+xml;base64,'+this.btoa()
58
- }
59
- toImg2(){
60
- return "data:image/svg+xml;charset=utf8,"+this.toString().replaceAll("<","%3C").replaceAll(">","%3E").replaceAll("#","%23").replaceAll('"',"'");
61
- }
62
-
63
- }
64
-
65
- const Svg =(w,h)=>new ZikoUISvg(w,h);
66
- export{
67
- Svg,
68
- ZikoUISvg,
69
- }
File without changes
package/src/types.js DELETED
@@ -1,73 +0,0 @@
1
- // import ZikoUIElement from "./ui/elements/primitives/ZikoUIElement";
2
- // import ZikoUIContainerElement from "./ui/elements/primitives/ZikoUIContainerElement";
3
-
4
- // export {
5
- // ZikoUIElement,
6
- // ZikoUIContainerElement
7
- // }
8
- // export {
9
- // ZikoUIAbbrText,
10
- // ZikoUIAccordion,
11
- // ZikoUIArticle,
12
- // ZikoUIAside,
13
- // ZikoUIAudio,
14
- // ZikoUIBlockQuote,
15
- // ZikoUIBr,
16
- // ZikoUIBreadcrumbs,
17
- // ZikoUICodeNote,
18
- // ZikoUICodeText,
19
- // ZikoUIDefintion,
20
- // ZikoUIFigure,
21
- // ZikoUIFlex,
22
- // ZikoUIFooter,
23
- // ZikoUIForm,
24
- // ZikoUIGrid,
25
- // ZikoUIHeader,
26
- // ZikoUIHeading,
27
- // ZikoUIHorizontalSplitter,
28
- // ZikoUIHorizontalSlider,
29
- // ZikoUIHr,
30
- // ZikoUIHtmlTag,
31
- // ZikoUIImage,
32
- // ZikoUIInput,
33
- // ZikoUIInputCheckbox,
34
- // ZikoUIInputColor,
35
- // ZikoUIInputDatalist,
36
- // ZikoUIInputDate,
37
- // ZikoUIInputDateTime,
38
- // ZikoUIInputEmail,
39
- // ZikoUIInputImage,
40
- // ZikoUIInputNumber,
41
- // ZikoUIInputOption,
42
- // ZikoUIInputPassword,
43
- // ZikoUIInputRadio,
44
- // ZikoUIInputSearch,
45
- // ZikoUIInputSlider,
46
- // ZikoUIInputTime,
47
- // ZikoUILabel,
48
- // ZikoUILink,
49
- // ZikoUIMain,
50
- // ZikoUIMenu3d,
51
- // ZikoUIModal,
52
- // ZikoUINav,
53
- // ZikoUIParagraphe,
54
- // ZikoUIQuote,
55
- // ZikoUISection,
56
- // ZikoUISelect,
57
- // ZikoUISubText,
58
- // ZikoUISupText,
59
- // ZikoUIText,
60
- // ZikoUITextArea,
61
- // ZikoUIVerticalSplitter,
62
- // ZikoUIVerticalSlider,
63
- // ZikoUIVideo,
64
- // } from "./ui/index.js"
65
-
66
- // export{
67
- // Matrix,
68
- // LinearSystem,
69
- // Complex,
70
- // Random,
71
- // } from "./math/index.js"
72
-
73
-
@@ -1,12 +0,0 @@
1
- export * from "./flex";
2
- export * from "./grid";
3
- export * from "./accordion";
4
- export * from "./carousel";
5
- export * from "./code-note";
6
- export * from "./tabs";
7
- export * from "./alert";
8
- export * from "./splitter";
9
- export * from "./pagination";
10
- export * from "./menu";
11
- export * from "./modal"
12
- export * from "./slider"
@@ -1,123 +0,0 @@
1
- import ZikoUIElement from "./ZikoUIElement";
2
- import { text } from "./text";
3
- class ZikoUIContainerElement extends ZikoUIElement {
4
- constructor(element, name = "") {
5
- super(element, name);
6
- this.items = [];
7
- }
8
- // maintain() {
9
- // for (let i = 0; i < this.items.length; i++)
10
- // Object.assign(this, { [[i]]: this.items[i] });
11
- // this.length = this.items.length;
12
- // return this;
13
- // }
14
- // at(index) {
15
- // return this.items.at(index);
16
- // }
17
- // #addItem(adder, pusher, ...ele) {
18
- // if (this.cache.isFrozzen) {
19
- // console.warn("You can't append new item to frozzen element");
20
- // return this;
21
- // }
22
- // for (let i = 0; i < ele.length; i++) {
23
- // if (["number", "string"].includes(typeof ele[i])) ele[i] = text(ele[i]);
24
- // if (ele[i] instanceof ZikoUIElement) {
25
- // ele[i].cache.parent = this;
26
- // this.element[adder](ele[i].element);
27
- // ele[i].target = this.element;
28
- // this.items[pusher](ele[i]);
29
- // } else if (ele[i] instanceof Object) {
30
- // if (ele[i]?.style) this.style(ele[i]?.style);
31
- // if (ele[i]?.attr) {
32
- // Object.entries(ele[i].attr).forEach((n) =>
33
- // this.setAttr("" + n[0], n[1]),
34
- // );
35
- // }
36
- // }
37
- // }
38
- // this.maintain();
39
- // return this;
40
- // }
41
- // append(...ele) {
42
- // this.#addItem("append", "push", ...ele);
43
- // return this;
44
- // }
45
- // prepend(...ele) {
46
- // this.#addItem("prepend", "unshift", ...ele);
47
- // return this;
48
- // }
49
- // insertAt(index, ...ele) {
50
- // if (index >= this.element.children.length) this.append(...ele);
51
- // else
52
- // for (let i = 0; i < ele.length; i++) {
53
- // if (["number", "string"].includes(typeof ele[i])) ele[i] = text(ele[i]);
54
- // this.element?.insertBefore(ele[i].element, this.items[index].element);
55
- // this.items.splice(index, 0, ele[i]);
56
- // }
57
- // return this;
58
- // }
59
- // remove(...ele) {
60
- // const remove = (ele) => {
61
- // if (typeof ele === "number") ele = this.items[ele];
62
- // if (ele instanceof ZikoUIElement) this.element?.removeChild(ele.element);
63
- // this.items = this.items.filter((n) => n !== ele);
64
- // };
65
- // for (let i = 0; i < ele.length; i++) remove(ele[i]);
66
- // for (let i = 0; i < this.items.length; i++)
67
- // Object.assign(this, { [[i]]: this.items[i] });
68
- // // Remove from item
69
- // return this;
70
- // }
71
- // forEach(callback) {
72
- // this.items.forEach(callback);
73
- // return this;
74
- // }
75
- // map(callback) {
76
- // return this.items.map(callback);
77
- // }
78
- // find(condition) {
79
- // return this.items.filter(condition);
80
- // }
81
- // filter(condition_callback, if_callback = () => {}, else_callback = () => {}) {
82
- // const FilterItems = this.items.filter(condition_callback);
83
- // FilterItems.forEach(if_callback);
84
- // this.items
85
- // .filter((item) => !FilterItems.includes(item))
86
- // .forEach(else_callback);
87
- // return this;
88
- // }
89
- // filterByTextContent(text, exactMatch = false) {
90
- // this.items.forEach((n) => n.render());
91
- // this.filter(
92
- // (n) => !(exactMatch ? n.text === text : n.text.includes(text)),
93
- // (e) => e.unrender(),
94
- // );
95
- // // this.items.filter(n=>{
96
- // // const content=n.element.textContent;
97
- // // return !(exactMatch?content===text:content.includes(text))
98
- // // }).map(n=>n.unrender());
99
- // // return this;
100
- // }
101
- // filterByClass(value) {
102
- // this.items.map((n) => n.render());
103
- // this.items
104
- // .filter((n) => !n.classes.includes(value))
105
- // .map((n) => n.unrender());
106
- // return this;
107
- // }
108
- // sortByTextContent(value, displays) {
109
- // let item = this.children;
110
- // item
111
- // .filter((n) => !n.textContent.toLowerCase().includes(value.toLowerCase()))
112
- // .map((n) => {
113
- // n.style.display = "none";
114
- // });
115
- // item
116
- // .filter((n) => n.textContent.toLowerCase().includes(value.toLowerCase()))
117
- // .map((n, i) => (n.style.display = displays[i]));
118
- // //return item.filter(n=>n.style.display!="none")
119
- // item.filter((n) => n.style.display != "none");
120
- // return this;
121
- // }
122
- }
123
- export default ZikoUIContainerElement;