ziko 0.38.0 → 0.39.0

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 (36) hide show
  1. package/dist/ziko.cjs +165 -759
  2. package/dist/ziko.js +165 -759
  3. package/dist/ziko.min.js +2 -2
  4. package/dist/ziko.mjs +164 -756
  5. package/package.json +2 -1
  6. package/src/__helpers__/composition-dep/compose-class.js +46 -0
  7. package/src/__helpers__/register/index.js +6 -0
  8. package/src/__helpers__/register/register-to-class.js +16 -0
  9. package/src/__helpers__/register/register-to-instance.js +18 -0
  10. package/src/__ziko__/index.js +12 -11
  11. package/src/events/types/clipboard.d.ts +2 -2
  12. package/src/events/types/focus.d.ts +2 -2
  13. package/src/events/types/pointer.d.ts +2 -2
  14. package/src/hooks/use-state.js +5 -0
  15. package/src/reactivity/hooks/UI/index.js +1 -1
  16. package/src/ui/__methods__/attrs.js +46 -0
  17. package/src/ui/__methods__/index.js +5 -0
  18. package/src/ui/__methods__/style.js +14 -0
  19. package/src/ui/__utils__/index.js +2 -2
  20. package/src/ui/constructors/{ZikoUIElement.js → UIElement.js} +30 -82
  21. package/src/ui/constructors/{ZikoUINode.js → UINode.js} +2 -2
  22. package/src/ui/flex/index.js +8 -8
  23. package/src/ui/graphics/canvas.js +2 -2
  24. package/src/ui/graphics/svg.js +2 -2
  25. package/src/ui/grid/index.js +4 -4
  26. package/src/ui/index.js +2 -2
  27. package/src/ui/suspense/index.js +3 -3
  28. package/src/ui/tags/index.d.ts.txt +125 -125
  29. package/src/ui/tags/index.js +28 -18
  30. package/src/ui/text/index.js +2 -2
  31. package/src/ui/wrapper/index.js +3 -3
  32. package/src/__helpers__/composition/compose-class.js +0 -28
  33. /package/src/__helpers__/{composition → composition-dep}/compose-instance.js +0 -0
  34. /package/src/__helpers__/{composition → composition-dep}/compose.js +0 -0
  35. /package/src/__helpers__/{composition → composition-dep}/index.js +0 -0
  36. /package/src/ui/constructors/{ZikoUIElementMethodesToBeMoved.js → ZikoUIElementMethodesToBeMoved-dep.js} +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ziko",
3
- "version": "0.38.0",
3
+ "version": "0.39.0",
4
4
  "description": "A versatile JavaScript library offering a rich set of Hyperscript Based UI components, advanced mathematical utilities, interactivity ,animations, client side routing and more ...",
5
5
  "keywords": [
6
6
  "front-end",
@@ -60,6 +60,7 @@
60
60
  "./time": {},
61
61
  "./components": {}
62
62
  },
63
+ "sideEffects" : false,
63
64
  "bin": {
64
65
  "create-ziko-app": "starter/bin/index.js"
65
66
  },
@@ -0,0 +1,46 @@
1
+ export function composeClass(Class, mixin) {
2
+ const descriptors = Object.getOwnPropertyDescriptors(mixin);
3
+
4
+ class Composed extends Class {
5
+ constructor(...args) {
6
+ super(...args);
7
+ // ⚠️ Do NOT assign mixin functions to `this`
8
+ }
9
+ }
10
+
11
+ // Copy prototype properties (methods, getters/setters, non-functions)
12
+ for (const key of Reflect.ownKeys(descriptors)) {
13
+ const desc = descriptors[key];
14
+
15
+ if ('get' in desc || 'set' in desc || typeof desc.value !== 'function') {
16
+ Object.defineProperty(Composed.prototype, key, desc);
17
+ } else if (typeof desc.value === 'function') {
18
+ // Only add method if it does NOT already exist
19
+ if (!Composed.prototype.hasOwnProperty(key)) {
20
+ Object.defineProperty(Composed.prototype, key, desc);
21
+ }
22
+ }
23
+ }
24
+
25
+ return Composed;
26
+ }
27
+
28
+ // // Usage
29
+ // class UIBase {
30
+ // log() { console.log('UIBase log'); }
31
+ // }
32
+
33
+ // const mixin = {
34
+ // at() { return 0; },
35
+ // hello() { return 'hello'; }
36
+ // };
37
+
38
+ // const UIComposed = composeClass(UIBase, mixin);
39
+
40
+ // class UI2 extends UIComposed {
41
+ // at() { return 1; } // ✅ correctly overrides mixin
42
+ // }
43
+
44
+ // const ui = new UI2();
45
+ // console.log(ui.at()); // 1
46
+ // console.log(ui.hello()); // 'hello'
@@ -0,0 +1,6 @@
1
+ import { register_to_class } from "./register-to-class.js";
2
+ import { register_to_instance } from "./register-to-instance";
3
+ export const register = (target, ...mixins) => {
4
+ if(typeof target === 'function') register_to_class(target, ...mixins)
5
+ else register_to_instance(target, ...mixins)
6
+ }
@@ -0,0 +1,16 @@
1
+ export function register_to_class(target, ...mixins){
2
+ mixins.forEach(n => _register_to_class_(target, n))
3
+ }
4
+ function _register_to_class_(target, mixin) {
5
+ const descriptors = Object.getOwnPropertyDescriptors(mixin);
6
+ for (const key of Reflect.ownKeys(descriptors)) {
7
+ const desc = descriptors[key];
8
+ if ('get' in desc || 'set' in desc || typeof desc.value !== 'function') {
9
+ Object.defineProperty(Object.getPrototypeOf(target), key, desc);
10
+ } else if (typeof desc.value === 'function') {
11
+ if (!Object.getPrototypeOf(target).hasOwnProperty(key)) {
12
+ Object.defineProperty(Object.getPrototypeOf(target), key, desc);
13
+ }
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,18 @@
1
+ export function register_to_instance(target, ...mixins){
2
+ mixins.forEach(n => _register_to_instance_(target, n))
3
+ }
4
+ function _register_to_instance_(instance, mixin) {
5
+ const descriptors = Object.getOwnPropertyDescriptors(mixin);
6
+
7
+ for (const key of Reflect.ownKeys(descriptors)) {
8
+ const desc = descriptors[key];
9
+
10
+ if ('get' in desc || 'set' in desc) {
11
+ Object.defineProperty(instance, key, desc);
12
+ } else if (typeof desc.value === 'function') {
13
+ instance[key] = desc.value.bind(instance);
14
+ } else {
15
+ instance[key] = desc.value;
16
+ }
17
+ }
18
+ }
@@ -3,14 +3,15 @@ import { __UI__ } from './__ui__.js';
3
3
  import { __Config__ } from './__config__.js';
4
4
  import { __HYDRATION__, __HYDRATION_MAP__ } from './__hydration__.js';
5
5
  import { __CACHE__ } from './__cache__.js';
6
-
7
- if ( !globalThis?.__Ziko__ ){
8
- globalThis.__Ziko__ = {
9
- __UI__,
10
- __HYDRATION__,
11
- __HYDRATION_MAP__,
12
- __Config__,
13
- __CACHE__,
14
- };
15
- defineParamsGetter(__Ziko__)
16
- }
6
+ export function __init__global__(){
7
+ if ( !globalThis?.__Ziko__ ){
8
+ globalThis.__Ziko__ = {
9
+ __UI__,
10
+ __HYDRATION__,
11
+ __HYDRATION_MAP__,
12
+ __Config__,
13
+ __CACHE__,
14
+ };
15
+ defineParamsGetter(__Ziko__)
16
+ }
17
+ }
@@ -1,6 +1,6 @@
1
1
  import { __ZikoEvent__ } from "../__ZikoEvent__.js";
2
2
  import type { Callback, ClipboardEventKeys } from './__Shared__.js';
3
- import { ZikoUIElement } from "../../ui/index.js";
3
+ import { UIElement } from "../../ui/index.js";
4
4
 
5
5
  declare class ZikoEventClipboard extends __ZikoEvent__ {
6
6
  constructor(target: any, customizer?: Function);
@@ -12,7 +12,7 @@ declare class ZikoEventClipboard extends __ZikoEvent__ {
12
12
 
13
13
  }
14
14
 
15
- declare const bindClipboardEvent: (target: ZikoUIElement, customizer?: Function) => ZikoEventClipboard;
15
+ declare const bindClipboardEvent: (target: UIElement, customizer?: Function) => ZikoEventClipboard;
16
16
 
17
17
  export {
18
18
  ZikoEventClipboard,
@@ -1,6 +1,6 @@
1
1
  import { __ZikoEvent__ } from "../__ZikoEvent__.js";
2
2
  import type { Callback } from './__Shared__.js';
3
- import { ZikoUIElement } from "../../ui/index.js";
3
+ import { UIElement } from "../../ui/index.js";
4
4
 
5
5
  declare class ZikoEventFocus extends __ZikoEvent__ {
6
6
  constructor(target: any, customizer?: Function);
@@ -11,7 +11,7 @@ declare class ZikoEventFocus extends __ZikoEvent__ {
11
11
 
12
12
  }
13
13
 
14
- declare const bindFocusEvent: (target: ZikoUIElement, customizer?: Function) => ZikoEventFocus;
14
+ declare const bindFocusEvent: (target: UIElement, customizer?: Function) => ZikoEventFocus;
15
15
 
16
16
  export {
17
17
  ZikoEventFocus,
@@ -1,6 +1,6 @@
1
1
  import { __ZikoEvent__ } from "../__ZikoEvent__.js";
2
2
  import type { EventMethodesBinder, Callback, PointerEventKeys } from './__Shared__.js';
3
- import { ZikoUIElement } from "../../ui/index.js";
3
+ import { UIElement } from "../../ui/index.js";
4
4
 
5
5
  type PointerEventMethodesBinder = EventMethodesBinder<PointerEventKeys, ZikoEventPointer>;
6
6
 
@@ -37,7 +37,7 @@ declare class ZikoEventPointer extends __ZikoEvent__ implements PointerEventMeth
37
37
 
38
38
  }
39
39
 
40
- declare const bindPointerEvent: (target: ZikoUIElement, customizer?: Function) => ZikoEventPointer;
40
+ declare const bindPointerEvent: (target: UIElement, customizer?: Function) => ZikoEventPointer;
41
41
 
42
42
  export {
43
43
  ZikoEventPointer,
@@ -45,3 +45,8 @@ export function useState(initialValue) {
45
45
 
46
46
  return [getValue, setValue, controller];
47
47
  }
48
+
49
+ export const isStateGetter = (arg) => {
50
+ return typeof(arg) === 'function' && arg?.()?.isStateGetter?.()
51
+ }
52
+
@@ -1,4 +1,4 @@
1
- export * from "./useStyle.js";
1
+ // export * from "./useStyle.js";
2
2
  // export * from "./useTheme";
3
3
  // export * from "../Head/useTitle";
4
4
  // export * from "../Head/useFavIcon";
@@ -0,0 +1,46 @@
1
+ import { Str } from "../../data";
2
+ import { isStateGetter } from "../../hooks/use-state.js";
3
+
4
+ // To Do add getter, watchAttr
5
+ export const AttrsMethods = {
6
+ setAttr(name, value) {
7
+ if(name instanceof Object){
8
+ const [names,values]=[Object.keys(name),Object.values(name)];
9
+ for(let i=0;i<names.length;i++){
10
+ if(values[i] instanceof Array)value[i] = values[i].join(" ");
11
+ _set_attrs_.call(this, names[i], values[i])
12
+ }
13
+ }
14
+ else{
15
+ if(value instanceof Array) value = value.join(" ");
16
+ _set_attrs_.call(this, name, value)
17
+ }
18
+ return this;
19
+ },
20
+ removeAttr(...names) {
21
+ for(let i=0;i<names.length;i++)this.element?.removeAttribute(names[i]);
22
+ return this;
23
+ },
24
+ getAttr(name){
25
+ name = Str.isCamelCase(name) ? Str.camel2hyphencase(name) : name;
26
+ return this.element.attributes[name].value;
27
+ },
28
+ setContentEditable(bool = true) {
29
+ this.setAttr("contenteditable", bool);
30
+ return this;
31
+ }
32
+ };
33
+
34
+ function _set_attrs_(name, value){
35
+ if(this.element?.tagName !== "svg") name = Str.isCamelCase(name) ? Str.camel2hyphencase(name) : name;
36
+ if(this?.attr[name] && this?.attr[name]===value) return;
37
+ if(isStateGetter(value)){
38
+ const getter = value()
39
+ getter._subscribe(
40
+ (newValue) => this.element?.setAttribute(name, newValue),
41
+ this
42
+ );
43
+ }
44
+ else this.element?.setAttribute(name, value)
45
+ Object.assign(this.cache.attributes, {[name]:value});
46
+ }
@@ -0,0 +1,5 @@
1
+ export * from './attrs.js'
2
+ export * from './dom.js'
3
+ export * from './events.js'
4
+ export * from './indexing.js'
5
+ export * from './style.js'
@@ -0,0 +1,14 @@
1
+ // Process width and height
2
+ export const StyleMethods = {
3
+ style(styles){
4
+ Object.assign(this.element.style, styles)
5
+ return this;
6
+ },
7
+ size(width, height){
8
+ return this.style({width, height})
9
+ },
10
+ animate(keyframe, {duration=1000, iterations=1, easing="ease"}={}){
11
+ this.element?.animate(keyframe,{duration, iterations, easing});
12
+ return this;
13
+ }
14
+ }
@@ -1,11 +1,11 @@
1
- import ZikoUIElement from "../constructors/ZikoUIElement.js";
1
+ import UIElement from "../constructors/UIElement.js";
2
2
  const Id = (a) => document.getElementById(a);
3
3
  const Class = (a) => [...document.getElementsByClassName(a)];
4
4
  const $=(...selector)=>{
5
5
  var ele=[]
6
6
  for(let i=0;i<selector.length;i++){
7
7
  if(typeof selector[i]=="string")ele.push(...document.querySelectorAll(selector[i]));
8
- if(selector[i] instanceof ZikoUIElement)ele.push(selector[i].element)
8
+ if(selector[i] instanceof UIElement)ele.push(selector[i].element)
9
9
  }
10
10
  return ele.length===1?ele[0]:ele;
11
11
  }
@@ -1,10 +1,13 @@
1
- import ZikoUINode from "./ZikoUINode.js";
2
- import { compose } from "../../__helpers__/index.js";
3
- import { DomMethods } from "../__methods__/dom.js";
4
- import { IndexingMethods } from "../__methods__/indexing.js";
5
- import { EventsMethodes } from "../__methods__/events.js";
6
- import { ZikoUseStyle } from "../../reactivity/hooks/UI/useStyle.js";
7
- import { ZikoUIElementStyle } from "./style/index.js";
1
+ import UINode from "./UINode.js";
2
+ import { register } from "../../__helpers__/register/index.js";
3
+ import {
4
+ AttrsMethods,
5
+ DomMethods,
6
+ IndexingMethods,
7
+ EventsMethodes,
8
+ StyleMethods
9
+ } from "../__methods__/index.js";
10
+
8
11
  import {
9
12
  useCustomEvent,
10
13
  useSwipeEvent,
@@ -14,34 +17,30 @@ import {
14
17
  watchChildren
15
18
  } from "../../reactivity/index.js"
16
19
  import { Random } from "../../math/index.js";
17
- import { Str } from "../../data/index.js";
18
- import '../../__ziko__/index.js';
19
- class ZikoUIElement extends ZikoUINode{
20
- constructor(element, name="", {el_type="html", useDefaultStyle=false}={}){
20
+ import {__init__global__} from '../../__ziko__/index.js';
21
+ __init__global__()
22
+ class UIElement extends UINode{
23
+ constructor({element, name ='', type="html", useDefaultStyle=false}={}){
21
24
  super()
22
25
  this.target = globalThis.__Ziko__.__Config__.default.target||globalThis?.document?.body;
23
26
  if(typeof element === "string") {
24
- switch(el_type){
27
+ switch(type){
25
28
  case "html" : element = globalThis?.document?.createElement(element); break;
26
29
  case "svg" : element = globalThis?.document?.createElementNS("http://www.w3.org/2000/svg", element);
27
30
  default : throw Error("Not supported")
28
31
  }
29
32
  }
30
33
  else{
31
- this.target = element.parentElement;
34
+ this.target = element?.parentElement;
32
35
  }
33
- // if(element)this.__ele__ = element;
34
- compose(
36
+ register(
35
37
  this,
36
- DomMethods,
37
- IndexingMethods,
38
+ AttrsMethods,
39
+ DomMethods,
40
+ StyleMethods,
41
+ IndexingMethods,
38
42
  EventsMethodes
39
- )
40
- // if(false){
41
- // import("../methods/tree.js").then(({ default: ExternalMethods }) => {
42
- // compose(this, ExternalMethods);
43
- // });
44
- // }
43
+ );
45
44
  Object.assign(this.cache, {
46
45
  name,
47
46
  isInteractive : [true, false][Math.floor(2*Math.random())],
@@ -51,7 +50,6 @@ class ZikoUIElement extends ZikoUINode{
51
50
  isHidden: false,
52
51
  isFrozzen:false,
53
52
  legacyParent : null,
54
- style: new ZikoUIElementStyle({}),
55
53
  attributes: {},
56
54
  filters: {},
57
55
  temp:{}
@@ -76,7 +74,6 @@ class ZikoUIElement extends ZikoUINode{
76
74
  if(element)Object.assign(this.cache,{element});
77
75
  this.uuid = `${this.cache.name}-${Random.string(16)}`
78
76
  this.ui_index = globalThis.__Ziko__.__CACHE__.get_ui_index();
79
- this.cache.style.linkTo(this);
80
77
  useDefaultStyle && this.style({
81
78
  position: "relative",
82
79
  boxSizing:"border-box",
@@ -109,10 +106,6 @@ class ZikoUIElement extends ZikoUINode{
109
106
  isZikoUIElement(){
110
107
  return true;
111
108
  }
112
- register(){
113
-
114
- return this;
115
- }
116
109
  get st(){
117
110
  return this.cache.style;
118
111
  }
@@ -162,25 +155,17 @@ class ZikoUIElement extends ZikoUINode{
162
155
  else UI.element=this.element.cloneNode(true);
163
156
  return UI.render(render);
164
157
  }
165
- style(styles){
166
- styles instanceof ZikoUseStyle ? this.st.style(styles.current): this.st.style(styles);
167
- return this;
168
- }
169
- size(width,height){
170
- this.st.size(width,height);
171
- return this;
172
- }
173
158
  [Symbol.iterator]() {
174
159
  return this.items[Symbol.iterator]();
175
160
  }
176
161
  maintain() {
177
- for (let i = 0; i < this.items.length; i++) {
178
- Object.defineProperty(this, i, {
179
- value: this.items[i],
180
- writable: true,
181
- configurable: true,
182
- enumerable: false
183
- });
162
+ for (let i = 0; i < this.items.length; i++) {
163
+ Object.defineProperty(this, i, {
164
+ value: this.items[i],
165
+ writable: true,
166
+ configurable: true,
167
+ enumerable: false
168
+ });
184
169
  }
185
170
  }
186
171
  freeze(freeze){
@@ -198,43 +183,6 @@ class ZikoUIElement extends ZikoUINode{
198
183
  describe(label){
199
184
  if(label)this.setAttr("aria-label",label)
200
185
  }
201
- animate(keyframe, {duration=1000, iterations=1, easing="ease"}={}){
202
- this.element?.animate(keyframe,{duration, iterations, easing});
203
- return this;
204
- }
205
- // Attributes
206
- #setAttr(name, value){
207
- if(this.element?.tagName !== "svg") name = Str.isCamelCase(name) ? Str.camel2hyphencase(name) : name;
208
- if(this?.attr[name] && this?.attr[name]===value) return;
209
- this.element?.setAttribute(name, value)
210
- Object.assign(this.cache.attributes, {[name]:value});
211
- }
212
- setAttr(name, value) {
213
- if(name instanceof Object){
214
- const [names,values]=[Object.keys(name),Object.values(name)];
215
- for(let i=0;i<names.length;i++){
216
- if(values[i] instanceof Array)value[i] = values[i].join(" ");
217
- this.#setAttr(names[i], values[i])
218
- }
219
- }
220
- else{
221
- if(value instanceof Array)value = value.join(" ");
222
- this.#setAttr(name, value)
223
- }
224
- return this;
225
- }
226
- removeAttr(...names) {
227
- for(let i=0;i<names.length;i++)this.element?.removeAttribute(names[i]);
228
- return this;
229
- }
230
- getAttr(name){
231
- name = Str.isCamelCase(name) ? Str.camel2hyphencase(name) : name;
232
- return this.element.attributes[name].value;
233
- }
234
- setContentEditable(bool = true) {
235
- this.setAttr("contenteditable", bool);
236
- return this;
237
- }
238
186
  get children() {
239
187
  return [...this.element.children];
240
188
  }
@@ -306,4 +254,4 @@ class ZikoUIElement extends ZikoUINode{
306
254
  }
307
255
 
308
256
  }
309
- export default ZikoUIElement;
257
+ export default UIElement;
@@ -1,4 +1,4 @@
1
- export default class ZikoUINode {
1
+ export default class UINode {
2
2
  constructor(node){
3
3
  this.cache = {
4
4
  node
@@ -12,4 +12,4 @@ export default class ZikoUINode {
12
12
  }
13
13
  }
14
14
 
15
- globalThis.node = (node) => new ZikoUINode(node);
15
+ globalThis.node = (node) => new UINode(node);
@@ -1,7 +1,7 @@
1
- import ZikoUIElement from "../constructors/ZikoUIElement.js";
2
- class ZikoUIFlex extends ZikoUIElement {
1
+ import UIElement from "../constructors/UIElement.js";
2
+ class ZikoUIFlex extends UIElement {
3
3
  constructor(tag = "div", w = "100%", h = "100%") {
4
- super(tag ,"Flex");
4
+ super({element : tag , name : "Flex"});
5
5
  this.direction = "cols";
6
6
  if (typeof w == "number") w += "%";
7
7
  if (typeof h == "number") h += "%";
@@ -69,13 +69,13 @@ class ZikoUIFlex extends ZikoUIElement {
69
69
  }
70
70
  }
71
71
 
72
- const Flex = (...ZikoUIElement) =>{
72
+ const Flex = (...UIElement) =>{
73
73
  let tag="div";
74
- if(typeof ZikoUIElement[0]==="string"){
75
- tag=ZikoUIElement[0];
76
- ZikoUIElement.pop();
74
+ if(typeof UIElement[0]==="string"){
75
+ tag=UIElement[0];
76
+ UIElement.pop();
77
77
  }
78
- return new ZikoUIFlex(tag).append(...ZikoUIElement);
78
+ return new ZikoUIFlex(tag).append(...UIElement);
79
79
  }
80
80
  function set_vertical(direction){
81
81
  direction == 1
@@ -1,6 +1,6 @@
1
- import ZikoUIElement from "../constructors/ZikoUIElement.js";
1
+ import UIElement from "../constructors/UIElement.js";
2
2
  import {Matrix} from "../../math/matrix/Matrix.js"
3
- class ZikoUICanvas extends ZikoUIElement{
3
+ class ZikoUICanvas extends UIElement{
4
4
  constructor(w,h){
5
5
  super("canvas","canvas");
6
6
  this.ctx = this.element?.getContext("2d");
@@ -1,5 +1,5 @@
1
- import ZikoUIElement from "../constructors/ZikoUIElement.js";
2
- class ZikoUISvg extends ZikoUIElement {
1
+ import UIElement from "../constructors/UIElement.js";
2
+ class ZikoUISvg extends UIElement {
3
3
  constructor(w=360,h=300) {
4
4
  super("svg","svg");
5
5
  //this.cache={};
@@ -1,7 +1,7 @@
1
- import ZikoUIElement from "../constructors/ZikoUIElement.js"
2
- class ZikoUIGrid extends ZikoUIElement {
1
+ import UIElement from "../constructors/UIElement.js"
2
+ class ZikoUIGrid extends UIElement {
3
3
  constructor(tag ="div", w = "50vw", h = "50vh") {
4
- super(tag,"Grid");
4
+ super({element : tag, name : "Grid"});
5
5
  this.direction = "cols";
6
6
  if (typeof w == "number") w += "%";
7
7
  if (typeof h == "number") h += "%";
@@ -29,5 +29,5 @@ class ZikoUIGrid extends ZikoUIElement {
29
29
  return this;
30
30
  }
31
31
  }
32
- const Grid = (...ZikoUIElement) => new ZikoUIGrid("div").append(...ZikoUIElement);
32
+ const Grid = (...UIElement) => new ZikoUIGrid("div").append(...UIElement);
33
33
  export {Grid,ZikoUIGrid};
package/src/ui/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export { default as ZikoUIElement } from "./constructors/ZikoUIElement.js"
2
- export { default as ZikoUINode } from "./constructors/ZikoUINode.js"
1
+ export { default as UIElement } from "./constructors/UIElement.js"
2
+ export { default as UINode } from "./constructors/UINode.js"
3
3
  export * from './tags/index.js';
4
4
  export * from './text/index.js';
5
5
  export * from './flex/index.js';
@@ -1,7 +1,7 @@
1
- import ZikoUIElement from "../constructors/ZikoUIElement";
2
- class ZikoUISuspense extends ZikoUIElement{
1
+ import UIElement from "../constructors/UIElement";
2
+ class ZikoUISuspense extends UIElement{
3
3
  constructor(fallback_ui, callback){
4
- super("div", "suspense")
4
+ super({element : "div", name : "suspense"})
5
5
  this.setAttr({
6
6
  dataTemp : "suspense"
7
7
  })