nodality 1.0.218 → 1.0.220
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/dist/animator.cjs.js +1 -1
- package/dist/animator.cjs.js.LICENSE.txt +1 -1
- package/dist/animator.esm.js +1 -1
- package/dist/animator.esm.js.LICENSE.txt +1 -1
- package/dist/audionew.cjs.js +1 -1
- package/dist/audionew.cjs.js.LICENSE.txt +1 -1
- package/dist/audionew.esm.js +1 -1
- package/dist/audionew.esm.js.LICENSE.txt +1 -1
- package/dist/base.cjs.js +1 -1
- package/dist/base.cjs.js.LICENSE.txt +1 -1
- package/dist/base.esm.js +1 -1
- package/dist/base.esm.js.LICENSE.txt +1 -1
- package/dist/beta-desktop-bar.cjs.js +1 -1
- package/dist/beta-desktop-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/beta-desktop-bar.esm.js +1 -1
- package/dist/beta-desktop-bar.esm.js.LICENSE.txt +1 -1
- package/dist/beta-mobile-bar.cjs.js +1 -1
- package/dist/beta-mobile-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/beta-mobile-bar.esm.js +1 -1
- package/dist/beta-mobile-bar.esm.js.LICENSE.txt +1 -1
- package/dist/bundle.umd.js +1 -1
- package/dist/bundle.umd.js.LICENSE.txt +1 -1
- package/dist/button.cjs.js +1 -1
- package/dist/button.cjs.js.LICENSE.txt +1 -1
- package/dist/button.esm.js +1 -1
- package/dist/button.esm.js.LICENSE.txt +1 -1
- package/dist/card-getter.cjs.js.LICENSE.txt +1 -1
- package/dist/card-getter.esm.js.LICENSE.txt +1 -1
- package/dist/center.cjs.js +1 -1
- package/dist/center.cjs.js.LICENSE.txt +1 -1
- package/dist/center.esm.js +1 -1
- package/dist/center.esm.js.LICENSE.txt +1 -1
- package/dist/checkbox.cjs.js +1 -1
- package/dist/checkbox.cjs.js.LICENSE.txt +1 -1
- package/dist/checkbox.esm.js +1 -1
- package/dist/checkbox.esm.js.LICENSE.txt +1 -1
- package/dist/code.cjs.js +1 -1
- package/dist/code.cjs.js.LICENSE.txt +1 -1
- package/dist/code.esm.js +1 -1
- package/dist/code.esm.js.LICENSE.txt +1 -1
- package/dist/container.cjs.js +1 -1
- package/dist/container.cjs.js.LICENSE.txt +1 -1
- package/dist/container.esm.js +1 -1
- package/dist/container.esm.js.LICENSE.txt +1 -1
- package/dist/data-list.cjs.js.LICENSE.txt +1 -1
- package/dist/data-list.esm.js.LICENSE.txt +1 -1
- package/dist/designer.cjs.js +1 -1
- package/dist/designer.cjs.js.LICENSE.txt +1 -1
- package/dist/designer.esm.js +1 -1
- package/dist/designer.esm.js.LICENSE.txt +1 -1
- package/dist/element-mapper.cjs.js +1 -1
- package/dist/element-mapper.cjs.js.LICENSE.txt +1 -1
- package/dist/element-mapper.esm.js +1 -1
- package/dist/element-mapper.esm.js.LICENSE.txt +1 -1
- package/dist/finalresult.esm.js +1 -1
- package/dist/finalresult.esm.js.LICENSE.txt +1 -1
- package/dist/flex-card.cjs.js +1 -1
- package/dist/flex-card.cjs.js.LICENSE.txt +1 -1
- package/dist/flex-card.esm.js +1 -1
- package/dist/flex-card.esm.js.LICENSE.txt +1 -1
- package/dist/flex-grid.cjs.js +1 -1
- package/dist/flex-grid.cjs.js.LICENSE.txt +1 -1
- package/dist/flex-grid.esm.js +1 -1
- package/dist/flex-grid.esm.js.LICENSE.txt +1 -1
- package/dist/flex-row.cjs.js +1 -1
- package/dist/flex-row.cjs.js.LICENSE.txt +1 -1
- package/dist/flex-row.esm.js +1 -1
- package/dist/flex-row.esm.js.LICENSE.txt +1 -1
- package/dist/floating-input.cjs.js +1 -1
- package/dist/floating-input.cjs.js.LICENSE.txt +1 -1
- package/dist/floating-input.esm.js +1 -1
- package/dist/floating-input.esm.js.LICENSE.txt +1 -1
- package/dist/free.cjs.js +1 -1
- package/dist/free.cjs.js.LICENSE.txt +1 -1
- package/dist/free.esm.js +1 -1
- package/dist/free.esm.js.LICENSE.txt +1 -1
- package/dist/horizontal-scroller.cjs.js +1 -1
- package/dist/horizontal-scroller.cjs.js.LICENSE.txt +1 -1
- package/dist/horizontal-scroller.esm.js +1 -1
- package/dist/horizontal-scroller.esm.js.LICENSE.txt +1 -1
- package/dist/image-picker.cjs.js +1 -1
- package/dist/image-picker.cjs.js.LICENSE.txt +1 -1
- package/dist/image-picker.esm.js +1 -1
- package/dist/image-picker.esm.js.LICENSE.txt +1 -1
- package/dist/image.cjs.js +1 -1
- package/dist/image.cjs.js.LICENSE.txt +1 -1
- package/dist/image.esm.js +1 -1
- package/dist/image.esm.js.LICENSE.txt +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.LICENSE.txt +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.LICENSE.txt +1 -1
- package/dist/keyframe-animation.cjs.js.LICENSE.txt +1 -1
- package/dist/keyframe-animation.esm.js.LICENSE.txt +1 -1
- package/dist/link-getter.cjs.js +1 -1
- package/dist/link-getter.cjs.js.LICENSE.txt +1 -1
- package/dist/link-getter.esm.js +1 -1
- package/dist/link-getter.esm.js.LICENSE.txt +1 -1
- package/dist/link.cjs.js +1 -1
- package/dist/link.cjs.js.LICENSE.txt +1 -1
- package/dist/link.esm.js +1 -1
- package/dist/link.esm.js.LICENSE.txt +1 -1
- package/dist/meta-adder.cjs.js +1 -1
- package/dist/meta-adder.cjs.js.LICENSE.txt +1 -1
- package/dist/meta-adder.esm.js +1 -1
- package/dist/meta-adder.esm.js.LICENSE.txt +1 -1
- package/dist/modal-2025.cjs.js +1 -1
- package/dist/modal-2025.cjs.js.LICENSE.txt +1 -1
- package/dist/modal-2025.esm.js +1 -1
- package/dist/modal-2025.esm.js.LICENSE.txt +1 -1
- package/dist/multiswitcher.cjs.js +1 -1
- package/dist/multiswitcher.cjs.js.LICENSE.txt +1 -1
- package/dist/multiswitcher.esm.js +1 -1
- package/dist/multiswitcher.esm.js.LICENSE.txt +1 -1
- package/dist/new-nav-bar.cjs.js +1 -1
- package/dist/new-nav-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/new-nav-bar.esm.js +1 -1
- package/dist/new-nav-bar.esm.js.LICENSE.txt +1 -1
- package/dist/picker.cjs.js +1 -1
- package/dist/picker.cjs.js.LICENSE.txt +1 -1
- package/dist/picker.esm.js +1 -1
- package/dist/picker.esm.js.LICENSE.txt +1 -1
- package/dist/progress.cjs.js +1 -1
- package/dist/progress.cjs.js.LICENSE.txt +1 -1
- package/dist/progress.esm.js +1 -1
- package/dist/progress.esm.js.LICENSE.txt +1 -1
- package/dist/radio.cjs.js.LICENSE.txt +1 -1
- package/dist/radio.esm.js.LICENSE.txt +1 -1
- package/dist/range.cjs.js.LICENSE.txt +1 -1
- package/dist/range.esm.js.LICENSE.txt +1 -1
- package/dist/scroll-video.cjs.js.LICENSE.txt +1 -1
- package/dist/scroll-video.esm.js.LICENSE.txt +1 -1
- package/dist/side-bar.cjs.js +1 -1
- package/dist/side-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/side-bar.esm.js +1 -1
- package/dist/side-bar.esm.js.LICENSE.txt +1 -1
- package/dist/side-nav-bar.cjs.js +1 -1
- package/dist/side-nav-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/side-nav-bar.esm.js +1 -1
- package/dist/side-nav-bar.esm.js.LICENSE.txt +1 -1
- package/dist/simple-bar.cjs.js +1 -1
- package/dist/simple-bar.cjs.js.LICENSE.txt +1 -1
- package/dist/simple-bar.esm.js +1 -1
- package/dist/simple-bar.esm.js.LICENSE.txt +1 -1
- package/dist/slider-2025.cjs.js +1 -1
- package/dist/slider-2025.cjs.js.LICENSE.txt +1 -1
- package/dist/slider-2025.esm.js +1 -1
- package/dist/slider-2025.esm.js.LICENSE.txt +1 -1
- package/dist/spacer.cjs.js +1 -1
- package/dist/spacer.cjs.js.LICENSE.txt +1 -1
- package/dist/spacer.esm.js +1 -1
- package/dist/spacer.esm.js.LICENSE.txt +1 -1
- package/dist/stack.cjs.js +1 -1
- package/dist/stack.cjs.js.LICENSE.txt +1 -1
- package/dist/stack.esm.js +1 -1
- package/dist/stack.esm.js.LICENSE.txt +1 -1
- package/dist/stacker.cjs.js.LICENSE.txt +1 -1
- package/dist/stacker.esm.js.LICENSE.txt +1 -1
- package/dist/table.cjs.js +1 -1
- package/dist/table.cjs.js.LICENSE.txt +1 -1
- package/dist/table.esm.js +1 -1
- package/dist/table.esm.js.LICENSE.txt +1 -1
- package/dist/text-field.cjs.js +1 -1
- package/dist/text-field.cjs.js.LICENSE.txt +1 -1
- package/dist/text-field.esm.js +1 -1
- package/dist/text-field.esm.js.LICENSE.txt +1 -1
- package/dist/text.cjs.js +1 -1
- package/dist/text.cjs.js.LICENSE.txt +1 -1
- package/dist/text.esm.js +1 -1
- package/dist/text.esm.js.LICENSE.txt +1 -1
- package/dist/theme.cjs.js.LICENSE.txt +1 -1
- package/dist/theme.esm.js.LICENSE.txt +1 -1
- package/dist/transform-anim.cjs.js.LICENSE.txt +1 -1
- package/dist/transform-anim.esm.js.LICENSE.txt +1 -1
- package/dist/ulist.cjs.js +1 -1
- package/dist/ulist.cjs.js.LICENSE.txt +1 -1
- package/dist/ulist.esm.js +1 -1
- package/dist/ulist.esm.js.LICENSE.txt +1 -1
- package/dist/video.cjs.js +1 -1
- package/dist/video.cjs.js.LICENSE.txt +1 -1
- package/dist/video.esm.js +1 -1
- package/dist/video.esm.js.LICENSE.txt +1 -1
- package/dist/wrap.cjs.js +1 -1
- package/dist/wrap.cjs.js.LICENSE.txt +1 -1
- package/dist/wrap.esm.js +1 -1
- package/dist/wrap.esm.js.LICENSE.txt +1 -1
- package/dist/zoom-card.cjs.js +1 -1
- package/dist/zoom-card.cjs.js.LICENSE.txt +1 -1
- package/dist/zoom-card.esm.js +1 -1
- package/dist/zoom-card.esm.js.LICENSE.txt +1 -1
- package/layout/animator.js +53 -80
- package/layout/audio.js +1 -95
- package/layout/audionew.js +1 -4
- package/layout/base.js +3 -46
- package/layout/beta-desktop-bar.js +1 -12
- package/layout/beta-mobile-bar.js +1 -43
- package/layout/button.js +5 -87
- package/layout/center.js +1 -41
- package/layout/checkbox.js +6 -10
- package/layout/circle.js +1 -1
- package/layout/code.js +1 -11
- package/layout/container.js +1 -106
- package/layout/dropdown-2025.js +1 -3
- package/layout/flex-card.js +8 -38
- package/layout/flex-grid.js +2 -23
- package/layout/flex-row.js +5 -233
- package/layout/form-components/custom.js +1 -1
- package/layout/form-components/data-list.js +1 -1
- package/layout/form-components/floating-input.js +1 -1
- package/layout/form-components/form-all.js +1 -1
- package/layout/form-components/form.js +1 -1
- package/layout/form-components/image-picker.js +1 -1
- package/layout/form-components/picker.js +1 -1
- package/layout/form-components/radio.js +1 -1
- package/layout/form-components/radiogroup.js +1 -1
- package/layout/form-components/range.js +1 -1
- package/layout/free.js +1 -40
- package/layout/grid-switcher.js +1 -14
- package/layout/grid.js +1 -11
- package/layout/horizontal-scroller.js +1 -7
- package/layout/image.js +3 -217
- package/layout/index.js +1 -1
- package/layout/link.js +7 -281
- package/layout/list.js +1 -8
- package/layout/meta-adder.js +1 -3
- package/layout/modal-2025.js +1 -44
- package/layout/multiswitcher.js +1 -55
- package/layout/nav-bar.js +1 -29
- package/layout/nav-factor/custom-div.js +1 -1
- package/layout/new-nav-bar.js +1 -91
- package/layout/polygon.js +1 -1
- package/layout/prerender-site.js +1 -2
- package/layout/prerender.js +1 -2
- package/layout/progress.js +1 -3
- package/layout/row.js +1 -15
- package/layout/scroll-video.js +1 -4
- package/layout/side-bar.js +1 -11
- package/layout/side-nav-bar.js +1 -66
- package/layout/simple-bar.js +1 -1
- package/layout/slider-2025.js +1 -2
- package/layout/spacer.js +1 -8
- package/layout/stack.js +1 -3
- package/layout/svg.js +1 -1
- package/layout/switcher.js +1 -6
- package/layout/table.js +1 -12
- package/layout/text-field.js +7 -17
- package/layout/text.js +1 -161
- package/layout/ulist.js +1 -13
- package/layout/video.js +1 -12
- package/layout/wrap.js +1 -50
- package/layout/zoom-card.js +1 -69
- package/lib/card-getter.js +1 -1
- package/lib/data.js +1 -1
- package/lib/designer.js +1 -1
- package/lib/element-mapper.js +1 -1
- package/lib/keyframe-animation.js +1 -1
- package/lib/link-getter.js +1 -1
- package/lib/raster-ops.js +1 -1
- package/lib/scroll-video.js +1 -1
- package/lib/seo.js +1 -1
- package/lib/stacker.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/transform-anim.js +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,15 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.0.
|
|
2
|
+
* nodality v1.0.220
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
7
|
import {Animator} from "./animator.js";
|
|
8
|
-
import {Text} from "./text.js";
|
|
9
|
-
|
|
10
8
|
class /*Beta*/MobileBar extends Animator {
|
|
11
9
|
constructor() {
|
|
12
10
|
super();
|
|
13
11
|
|
|
14
12
|
|
|
15
|
-
// this.setStyles();
|
|
16
13
|
}
|
|
17
14
|
|
|
18
15
|
|
|
@@ -36,13 +33,9 @@ class /*Beta*/MobileBar extends Animator {
|
|
|
36
33
|
// I have to call toCode
|
|
37
34
|
// 1st reomve brand key from obj
|
|
38
35
|
|
|
39
|
-
//delete this.obj.brand;
|
|
40
|
-
//this.obj.brand = this.obj.brand.toCode()[0];//.replace(/^"|"$/g, '');
|
|
41
36
|
let repl = this.removeQuotesFromFirstWord(JSON.stringify(this.obj));
|
|
42
37
|
|
|
43
38
|
|
|
44
|
-
|
|
45
|
-
|
|
46
39
|
// 23:38:35 Yes!!! 23/04/2025
|
|
47
40
|
// Alway construct neste in this way
|
|
48
41
|
let codeObj = `
|
|
@@ -68,10 +61,8 @@ radius: ${JSON.stringify(this.obj.radius)},
|
|
|
68
61
|
//console.log(Object.getPrototypeOf(obj.brand));
|
|
69
62
|
//console.log(obj.brand.render());
|
|
70
63
|
|
|
71
|
-
// console.log(this.obj.brand);
|
|
72
64
|
// console.log(obj.brand);
|
|
73
65
|
|
|
74
|
-
// console.log(Object.getPrototypeOf(this.obj.brand));
|
|
75
66
|
|
|
76
67
|
|
|
77
68
|
|
|
@@ -80,22 +71,17 @@ radius: ${JSON.stringify(this.obj.radius)},
|
|
|
80
71
|
// console.log(obj.brand.res); // RES SHOULD BE OK
|
|
81
72
|
// console.log(obj.brand.res); // RES SHOULD BE OK
|
|
82
73
|
|
|
83
|
-
// let t = new Text("A").set({size: "S1"});
|
|
84
74
|
// console.log(t);
|
|
85
75
|
|
|
86
76
|
this.obj = obj;
|
|
87
77
|
this.makeNavbar(obj);
|
|
88
|
-
// obj.background && (this.res.style.backgroundColor = obj.background);
|
|
89
|
-
// obj.brand && this.setBrand(obj.brand);
|
|
90
78
|
|
|
91
79
|
|
|
92
80
|
// Has to be the same
|
|
93
|
-
// obj.background && //(this.res.style.backgroundColor = obj.background);
|
|
94
81
|
obj.mar && super.mar(obj.mar);
|
|
95
82
|
|
|
96
83
|
// console.log("BOOA");
|
|
97
84
|
// console.log(obj.brand);
|
|
98
|
-
// obj.brand && this.setBrand(obj.brand);
|
|
99
85
|
// THANK YOU 215756!!!
|
|
100
86
|
obj.maxHeight && (this.res.style.maxHeight = obj.maxHeight);
|
|
101
87
|
|
|
@@ -120,7 +106,6 @@ radius: ${JSON.stringify(this.obj.radius)},
|
|
|
120
106
|
// console.log(obj.brand);
|
|
121
107
|
|
|
122
108
|
const newTextInstance = obj.brand;
|
|
123
|
-
// const newTextInstance = new Text(data.text).set({color: "orange"});
|
|
124
109
|
// newTextInstance.res.color = "green";
|
|
125
110
|
/*
|
|
126
111
|
// Restore state and other properties
|
|
@@ -141,9 +126,7 @@ console.log(newTextInstance.render());*/
|
|
|
141
126
|
|
|
142
127
|
|
|
143
128
|
|
|
144
|
-
// if (obj.brand && obj.brand instanceof Node) {
|
|
145
129
|
// console.log("APPENDING")
|
|
146
|
-
// let branda = document.createElement("h1");
|
|
147
130
|
// branda.textContent = "h";
|
|
148
131
|
//console.log(obj.brand);
|
|
149
132
|
// console.log(obj.brand.res);
|
|
@@ -153,16 +136,9 @@ console.log(newTextInstance.render());*/
|
|
|
153
136
|
// typeof obj.brand.res;
|
|
154
137
|
// console.log(obj.brand.render());
|
|
155
138
|
|
|
156
|
-
//if (obj.brand.render){
|
|
157
139
|
|
|
158
|
-
// this.brand.appendChild(obj.brand.res);
|
|
159
140
|
// console.log(obj.brand.render());
|
|
160
|
-
//this.brand.style.border = "3px solid orange";
|
|
161
|
-
//this.brand.style.width = "100px";
|
|
162
|
-
//this.brand.style.height = "100px";
|
|
163
|
-
// let t = new Text("A").set({size: "S3"});
|
|
164
141
|
//console.log(obj.brand.res);
|
|
165
|
-
// this.brand.appendChild(obj.brand.res);
|
|
166
142
|
//}
|
|
167
143
|
|
|
168
144
|
if (obj.brand && typeof newTextInstance.render === "function") {
|
|
@@ -202,7 +178,6 @@ if (obj.brand && typeof newTextInstance.render === "function") {
|
|
|
202
178
|
this.navbar.style.flexDirection = 'column';
|
|
203
179
|
this.navbar.style.padding = '1rem';
|
|
204
180
|
this.navbar.style.backgroundColor = obj.background ?? 'orange';
|
|
205
|
-
// this.navbar.style.color = 'white';
|
|
206
181
|
|
|
207
182
|
this.navbarHeader.style.display = 'flex';
|
|
208
183
|
this.navbarHeader.style.alignItems = 'center';
|
|
@@ -222,21 +197,6 @@ if (obj.brand && typeof newTextInstance.render === "function") {
|
|
|
222
197
|
|
|
223
198
|
}
|
|
224
199
|
|
|
225
|
-
/* setBrand(brandElement) {
|
|
226
|
-
|
|
227
|
-
if (brandElement instanceof Node) {
|
|
228
|
-
this.brand.innerHTML = '';
|
|
229
|
-
|
|
230
|
-
this.navContent.appendChild(brandElement);
|
|
231
|
-
// this.brand.appendChild(brandElement);
|
|
232
|
-
}
|
|
233
|
-
|
|
234
|
-
}*/
|
|
235
|
-
|
|
236
|
-
/* addNavItem(navItemElement) {
|
|
237
|
-
this.navContent.appendChild(navItemElement);
|
|
238
|
-
return this;
|
|
239
|
-
}*/
|
|
240
200
|
|
|
241
201
|
add(ele){
|
|
242
202
|
this.items = ele;
|
|
@@ -256,7 +216,6 @@ if (obj.brand && typeof newTextInstance.render === "function") {
|
|
|
256
216
|
if (this.isMobileNavOpen) {
|
|
257
217
|
this.navContent.style.flexDirection = 'column';
|
|
258
218
|
this.navContent.style.gap = '0.5rem';
|
|
259
|
-
// this.navContent.style.backgroundColor = '#444';
|
|
260
219
|
this.navContent.style.padding = '1rem';
|
|
261
220
|
} else {
|
|
262
221
|
this.navContent.style.flexDirection = '';
|
|
@@ -271,7 +230,6 @@ if (obj.brand && typeof newTextInstance.render === "function") {
|
|
|
271
230
|
document.querySelector(container).appendChild(this.navbar);
|
|
272
231
|
}
|
|
273
232
|
return this.navbar;
|
|
274
|
-
// container.appendChild(this.navbar);
|
|
275
233
|
}
|
|
276
234
|
}
|
|
277
235
|
|
package/layout/button.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.0.
|
|
2
|
+
* nodality v1.0.220
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -21,32 +21,6 @@ class Button extends Animator {
|
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
|
|
24
|
-
/*
|
|
25
|
-
hover(obj){
|
|
26
|
-
this.prevColor = this.res.style.backgroundColor;
|
|
27
|
-
this.foreColor = this.res.style.color;
|
|
28
|
-
|
|
29
|
-
if (obj.animation){
|
|
30
|
-
|
|
31
|
-
this.res.style.transition = `${obj.animation}s ease-in-out`; // stop resize ???
|
|
32
|
-
this.res.style.transionProperty = `background, color`;
|
|
33
|
-
// this.transition(obj.animation);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
this.res.onmouseout = () => {
|
|
38
|
-
this.res.style.backgroundColor = `${this.prevColor}`;
|
|
39
|
-
this.res.style.color = `${this.foreColor}`;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
this.res.onmouseover = () => {
|
|
43
|
-
this.res.style.backgroundColor = obj.background;
|
|
44
|
-
this.res.style.color = obj.color;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return this;
|
|
48
|
-
}
|
|
49
|
-
*/
|
|
50
24
|
|
|
51
25
|
|
|
52
26
|
set(obj){
|
|
@@ -88,18 +62,6 @@ this.options = obj;
|
|
|
88
62
|
|
|
89
63
|
this.commonMethods(obj);
|
|
90
64
|
|
|
91
|
-
// obj.hover && this.hover(obj.hover);
|
|
92
|
-
|
|
93
|
-
/* if (obj.url && !obj.img){
|
|
94
|
-
//let node = document.createElement("img");
|
|
95
|
-
//node.setAttribute("src", obj.url);
|
|
96
|
-
//node.style.width = 50;//obj.frame.width; // order?
|
|
97
|
-
//node.style.height = 50;//obj.frame.height;
|
|
98
|
-
//btn.appendChild(node);
|
|
99
|
-
} else {
|
|
100
|
-
let node = document.createTextNode(this.text.replace("$", this.val));
|
|
101
|
-
btn.appendChild(node);
|
|
102
|
-
}*/
|
|
103
65
|
|
|
104
66
|
|
|
105
67
|
|
|
@@ -143,12 +105,9 @@ this.options = obj;
|
|
|
143
105
|
obj.resmar && this.resmar(obj.resmar);
|
|
144
106
|
|
|
145
107
|
|
|
146
|
-
|
|
147
|
-
//this.pad([{"b": "3rem"}]); // add)
|
|
148
108
|
|
|
149
109
|
|
|
150
110
|
if (obj.centered){
|
|
151
|
-
// alert(this.res.width / 2);
|
|
152
111
|
this.res.style.marginRight = "auto";
|
|
153
112
|
this.res.style.marginLeft = "auto"; //`${this.res.style.width / 2}px`;
|
|
154
113
|
|
|
@@ -190,7 +149,6 @@ this.options = obj;
|
|
|
190
149
|
obj.frame && (stra += `\n frame: "${obj.frame}",`);
|
|
191
150
|
|
|
192
151
|
|
|
193
|
-
|
|
194
152
|
obj.keySet && this.keySet(obj.keySet); // 165411 22/01/25 Nice!
|
|
195
153
|
|
|
196
154
|
|
|
@@ -291,7 +249,6 @@ this.options = obj;
|
|
|
291
249
|
}
|
|
292
250
|
|
|
293
251
|
|
|
294
|
-
|
|
295
252
|
const display6 = "calc(1rem + 0.5vw)"; // calc(1rem + 1.2vw)
|
|
296
253
|
|
|
297
254
|
if (name === "S6"){
|
|
@@ -306,26 +263,19 @@ this.options = obj;
|
|
|
306
263
|
this.res.setAttribute("class", classa);
|
|
307
264
|
return this;
|
|
308
265
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
this.res.style.color = color;
|
|
312
|
-
return this;
|
|
313
|
-
}
|
|
266
|
+
|
|
267
|
+
|
|
314
268
|
|
|
315
269
|
background(color){
|
|
316
270
|
this.res.style.background = color;
|
|
317
271
|
return this;
|
|
318
272
|
}
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
this.res.style.width = percentage;
|
|
322
|
-
return this;
|
|
323
|
-
}
|
|
273
|
+
|
|
274
|
+
|
|
324
275
|
|
|
325
276
|
|
|
326
277
|
borderRadius(radius){
|
|
327
278
|
this.res.style.borderRadius = radius;
|
|
328
|
-
// console.warn(this.res);
|
|
329
279
|
return this;
|
|
330
280
|
}
|
|
331
281
|
|
|
@@ -404,9 +354,7 @@ this.options = obj;
|
|
|
404
354
|
|
|
405
355
|
toCode() {
|
|
406
356
|
//console.log("OPTIONS ARE");
|
|
407
|
-
//console.log(this.options);
|
|
408
357
|
|
|
409
|
-
// const objString = JSON.stringify(this.options, null, 4);
|
|
410
358
|
|
|
411
359
|
const objString = JSON.stringify(this.options, (key, value) => {
|
|
412
360
|
if (typeof value === "function") {
|
|
@@ -426,36 +374,6 @@ this.options = obj;
|
|
|
426
374
|
// 22/01/25 09:10:50 thanks for amazing RegEx ChatGPT!
|
|
427
375
|
}
|
|
428
376
|
|
|
429
|
-
/* toCoder() {
|
|
430
|
-
// Initialize the code string with the constructor
|
|
431
|
-
let code = `new Button("${this.text}", ${this.val})`;
|
|
432
|
-
|
|
433
|
-
// Collect the styles applied to the button
|
|
434
|
-
const style = this.res.style;
|
|
435
|
-
const setArgs = {};
|
|
436
|
-
if (style.background) setArgs.background = style.background;
|
|
437
|
-
if (style.color) setArgs.color = style.color;
|
|
438
|
-
if (style.padding) setArgs.padding = style.padding;
|
|
439
|
-
if (style.margin) setArgs.margin = style.margin;
|
|
440
|
-
if (style.border) setArgs.border = style.border;
|
|
441
|
-
if (style.borderRadius) setArgs.radius = style.borderRadius;
|
|
442
|
-
if (style.fontWeight) setArgs.weight = style.fontWeight;
|
|
443
|
-
|
|
444
|
-
// Add `set` call if any style properties exist
|
|
445
|
-
if (Object.keys(setArgs).length > 0) {
|
|
446
|
-
code += `.set(${JSON.stringify(setArgs)})`;
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
// Add event listeners if they exist
|
|
450
|
-
if (this.res.onclick) {
|
|
451
|
-
code += `.onTap(${this.res.onclick.toString()})`;
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
// Add rendering call
|
|
455
|
-
//code += `.render()`;
|
|
456
|
-
|
|
457
|
-
return [code];
|
|
458
|
-
}*/
|
|
459
377
|
|
|
460
378
|
render(el){
|
|
461
379
|
if (el){
|
package/layout/center.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.0.
|
|
2
|
+
* nodality v1.0.220
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -39,14 +39,6 @@ if (obj.id){
|
|
|
39
39
|
// common methods should be defined in animator
|
|
40
40
|
// I can use pad in center, because animator class handles it
|
|
41
41
|
|
|
42
|
-
/*obj.pad && this.pad(obj.pad);
|
|
43
|
-
obj.respad && this.respad(obj.respad);
|
|
44
|
-
obj.resmar && this.resmar(obj.resmar);
|
|
45
|
-
obj.mar && this.mar(obj.mar);
|
|
46
|
-
obj.exact && (this.res.style.fontSize = obj.exact);
|
|
47
|
-
obj.zIndex && (this.res.style.zIndex = obj.zIndex);
|
|
48
|
-
obj.position && (this.res.style.position = position);
|
|
49
|
-
obj.top && (this.res.style.top = top);*/
|
|
50
42
|
|
|
51
43
|
return this;
|
|
52
44
|
}
|
|
@@ -79,38 +71,6 @@ return this;
|
|
|
79
71
|
|
|
80
72
|
|
|
81
73
|
|
|
82
|
-
|
|
83
|
-
itemWidth(w){
|
|
84
|
-
for (var i = 0; i < this.res.childNodes.length; i++){
|
|
85
|
-
let el = this.res.childNodes[i];
|
|
86
|
-
el.style.width = w;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
return this;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
/*arrayPadding(arr, value) {
|
|
95
|
-
if (arr.includes("left")){
|
|
96
|
-
this.res.style.paddingLeft = value;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
if (arr.includes("right")){
|
|
100
|
-
this.res.style.paddingRight = value;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
if (arr.includes("top")){
|
|
104
|
-
this.res.style.paddingTop = value;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
if (arr.includes("bottom")){
|
|
108
|
-
this.res.style.paddingBottom = value;
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
return this;
|
|
113
|
-
}*/
|
|
114
74
|
|
|
115
75
|
render(el) {
|
|
116
76
|
if (el) {
|
package/layout/checkbox.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.0.
|
|
2
|
+
* nodality v1.0.220
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -9,7 +9,7 @@ import { Animator } from "./animator.js";
|
|
|
9
9
|
class Checkbox extends Animator {
|
|
10
10
|
constructor() {
|
|
11
11
|
super();
|
|
12
|
-
this.
|
|
12
|
+
this.res = null;
|
|
13
13
|
|
|
14
14
|
|
|
15
15
|
}
|
|
@@ -19,7 +19,6 @@ class Checkbox extends Animator {
|
|
|
19
19
|
|
|
20
20
|
// Set default clipPath if not provided
|
|
21
21
|
//this.options.clipPath =
|
|
22
|
-
// this.options.clipPath; //|| "polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%)";
|
|
23
22
|
|
|
24
23
|
// Create the container div
|
|
25
24
|
const div = document.createElement("div");
|
|
@@ -135,18 +134,15 @@ obj.resmar && this.resmar(obj.resmar);
|
|
|
135
134
|
|
|
136
135
|
div.appendChild(labelDiv);
|
|
137
136
|
|
|
138
|
-
this.
|
|
137
|
+
this.res = div;
|
|
139
138
|
return this;
|
|
140
139
|
}
|
|
141
140
|
|
|
142
141
|
getValue() {
|
|
143
|
-
return this.
|
|
142
|
+
return this.res.children[0].checked;
|
|
144
143
|
}
|
|
145
144
|
|
|
146
145
|
toCode() {
|
|
147
|
-
/* let objString = JSON.stringify(this.options, null, 4);
|
|
148
|
-
objString = objString.replace(/"(\w+)"(?=\s*:)/g, '$1');
|
|
149
|
-
return [`new Checkbox().set(${objString})`];*/
|
|
150
146
|
|
|
151
147
|
const entries = Object.entries(this.options)
|
|
152
148
|
.map(([key, value]) => {
|
|
@@ -173,9 +169,9 @@ obj.resmar && this.resmar(obj.resmar);
|
|
|
173
169
|
|
|
174
170
|
render(div) {
|
|
175
171
|
if (div) {
|
|
176
|
-
document.querySelector(div).appendChild(this.
|
|
172
|
+
document.querySelector(div).appendChild(this.res);
|
|
177
173
|
} else {
|
|
178
|
-
return this.
|
|
174
|
+
return this.res;
|
|
179
175
|
}
|
|
180
176
|
}
|
|
181
177
|
}
|
package/layout/circle.js
CHANGED
package/layout/code.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.0.
|
|
2
|
+
* nodality v1.0.220
|
|
3
3
|
* (c) 2026 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
import {Animator} from "./animator.js";
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
|
|
11
10
|
class Code extends Animator {
|
|
12
11
|
constructor(){
|
|
13
12
|
super();
|
|
@@ -17,11 +16,9 @@ class Code extends Animator {
|
|
|
17
16
|
this.res.style.display = "block";
|
|
18
17
|
this.res.style.width = "auto";
|
|
19
18
|
this.res.style.height = "auto";
|
|
20
|
-
// this.res.style.color = "white";
|
|
21
19
|
this.res.style.borderRadius = "1rem";
|
|
22
20
|
|
|
23
21
|
this.pre.appendChild(this.res);
|
|
24
|
-
// this.res.style.marginTop = "20rem";
|
|
25
22
|
|
|
26
23
|
}
|
|
27
24
|
|
|
@@ -111,9 +108,6 @@ class Code extends Animator {
|
|
|
111
108
|
keep.push("span");
|
|
112
109
|
}
|
|
113
110
|
|
|
114
|
-
/* if (obj.transform){
|
|
115
|
-
keep.push("transform");
|
|
116
|
-
}*/
|
|
117
111
|
|
|
118
112
|
// console.log("ARA IS " + arr);
|
|
119
113
|
|
|
@@ -122,7 +116,6 @@ class Code extends Animator {
|
|
|
122
116
|
}
|
|
123
117
|
|
|
124
118
|
|
|
125
|
-
|
|
126
119
|
set(obj){
|
|
127
120
|
obj.code && (this.pre.children[0].innerHTML = obj.code);
|
|
128
121
|
obj.class && this.pre.children[0].setAttribute("class", `${obj.class}`);
|
|
@@ -141,10 +134,7 @@ class Code extends Animator {
|
|
|
141
134
|
this.res.style.border = `${obj.borderObj.width} solid ${obj.borderObj.color}`;
|
|
142
135
|
this.res.style.borderRadius = `${obj.borderObj.radius}`;
|
|
143
136
|
|
|
144
|
-
//this.res.style.border = `3px solid transparent`;
|
|
145
|
-
//this.res.style.border = "10px solid yellow";
|
|
146
137
|
|
|
147
|
-
//let rem = this.removeQuotesFromFirstWord(JSON.stringify(obj.borderObj));
|
|
148
138
|
//stra += `\n borderObj: ${rem},`;
|
|
149
139
|
}
|
|
150
140
|
|