ziko 0.42.1 → 0.43.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.
- package/package.json +1 -1
- package/src/__ziko__/__state__.js +1 -1
- package/src/ui/__methods__/style.js +18 -18
- package/src/ui/__utils__/index.js +1 -1
- package/src/ui/constructors/UIElement.js +2 -21
- package/src/ui/constructors/UINode.js +2 -2
- package/src/ui/flex/index.js +1 -1
- package/src/ui/graphics/canvas.js +1 -1
- package/src/ui/graphics/svg.js +1 -1
- package/src/ui/grid/index.js +1 -1
- package/src/ui/index.js +2 -2
- package/src/ui/suspense/index.js +1 -1
- package/src/ui/tags/index.d.ts.txt +1 -1
- package/src/ui/tags/index.js +2 -2
- package/src/ui/text/index.js +1 -1
- package/src/ui/wrapper/index.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ziko",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.43.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",
|
|
@@ -3,7 +3,7 @@ export const __State__ = {
|
|
|
3
3
|
index : import.meta.hot?.data?.__Ziko__?.__State__?.index ?? 0,
|
|
4
4
|
register: function(state){
|
|
5
5
|
console.log({
|
|
6
|
-
hmr : import.meta.hot?.data.__Ziko__.__State__.index,
|
|
6
|
+
// hmr : import.meta.hot?.data.__Ziko__.__State__.index,
|
|
7
7
|
index : this.index
|
|
8
8
|
})
|
|
9
9
|
this.store.set(this.index++, state)
|
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import { isStateGetter } from '../../hooks/use-state.js'
|
|
2
2
|
export const StyleMethods = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
3
|
+
style(styles){
|
|
4
|
+
for(let key in styles){
|
|
5
|
+
const value = styles[key];
|
|
6
|
+
if(isStateGetter(value)){
|
|
7
|
+
const getter = value()
|
|
8
|
+
Object.assign(this.element.style, {[key] : getter.value})
|
|
9
|
+
getter._subscribe(
|
|
10
|
+
(newValue) => {
|
|
11
|
+
console.log({newValue})
|
|
12
|
+
Object.assign(this.element.style, {[key] : newValue})
|
|
13
|
+
},
|
|
14
|
+
// this
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
else Object.assign(this.element.style, {[key] : value})
|
|
18
|
+
}
|
|
19
|
+
return this;
|
|
20
|
+
},
|
|
21
21
|
size(width, height){
|
|
22
22
|
return this.style({width, height})
|
|
23
23
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import UINode from "./UINode.js";
|
|
1
|
+
import {UINode} from "./UINode.js";
|
|
2
2
|
import { register } from "../../__helpers__/register/index.js";
|
|
3
3
|
import {
|
|
4
4
|
AttrsMethods,
|
|
@@ -7,7 +7,6 @@ import {
|
|
|
7
7
|
EventsMethodes,
|
|
8
8
|
StyleMethods
|
|
9
9
|
} from "../__methods__/index.js";
|
|
10
|
-
import { isStateGetter } from "../../hooks/use-state.js";
|
|
11
10
|
import {
|
|
12
11
|
useCustomEvent,
|
|
13
12
|
useSwipeEvent,
|
|
@@ -106,24 +105,6 @@ class UIElement extends UINode{
|
|
|
106
105
|
isZikoUIElement(){
|
|
107
106
|
return true;
|
|
108
107
|
}
|
|
109
|
-
style(styles){
|
|
110
|
-
for(let key in styles){
|
|
111
|
-
const value = styles[key];
|
|
112
|
-
if(isStateGetter(value)){
|
|
113
|
-
const getter = value()
|
|
114
|
-
Object.assign(this.element.style, {[key] : getter.value})
|
|
115
|
-
getter._subscribe(
|
|
116
|
-
(newValue) => {
|
|
117
|
-
console.log({newValue})
|
|
118
|
-
Object.assign(this.element.style, {[key] : newValue})
|
|
119
|
-
},
|
|
120
|
-
// this
|
|
121
|
-
);
|
|
122
|
-
}
|
|
123
|
-
else Object.assign(this.element.style, {[key] : value})
|
|
124
|
-
}
|
|
125
|
-
return this;
|
|
126
|
-
}
|
|
127
108
|
get st(){
|
|
128
109
|
return this.cache.style;
|
|
129
110
|
}
|
|
@@ -271,4 +252,4 @@ class UIElement extends UINode{
|
|
|
271
252
|
}
|
|
272
253
|
|
|
273
254
|
}
|
|
274
|
-
export
|
|
255
|
+
export { UIElement }
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export
|
|
1
|
+
export class UINode {
|
|
2
2
|
constructor(node){
|
|
3
3
|
this.cache = {
|
|
4
4
|
node
|
|
@@ -12,4 +12,4 @@ export default class UINode {
|
|
|
12
12
|
}
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
globalThis.node = (node) => new UINode(node);
|
|
15
|
+
// globalThis.node = (node) => new UINode(node);
|
package/src/ui/flex/index.js
CHANGED
package/src/ui/graphics/svg.js
CHANGED
package/src/ui/grid/index.js
CHANGED
package/src/ui/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export * from "./constructors/UIElement.js"
|
|
2
|
+
export * 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';
|
package/src/ui/suspense/index.js
CHANGED
package/src/ui/tags/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import UIElement from "../constructors/UIElement.js";
|
|
1
|
+
import {UIElement} from "../constructors/UIElement.js";
|
|
2
2
|
import { HTMLTags, SVGTags } from "./tags-list.js";
|
|
3
|
-
import { isStateGetter } from "../../hooks/use-state.js";
|
|
3
|
+
// import { isStateGetter } from "../../hooks/use-state.js";
|
|
4
4
|
const _h=(tag, type, attributes, ...children)=>{
|
|
5
5
|
const { name, style, ...attrs } = attributes;
|
|
6
6
|
let element = new UIElement(tag, name, type);
|
package/src/ui/text/index.js
CHANGED
package/src/ui/wrapper/index.js
CHANGED