nodality 1.0.220 → 1.0.224

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 (279) hide show
  1. package/API.md +227 -0
  2. package/bin/nodality.js +64 -0
  3. package/dist/animator.cjs.js +1 -1
  4. package/dist/animator.cjs.js.LICENSE.txt +1 -1
  5. package/dist/animator.esm.js +1 -1
  6. package/dist/animator.esm.js.LICENSE.txt +1 -1
  7. package/dist/audionew.cjs.js +1 -1
  8. package/dist/audionew.cjs.js.LICENSE.txt +1 -1
  9. package/dist/audionew.esm.js +1 -1
  10. package/dist/audionew.esm.js.LICENSE.txt +1 -1
  11. package/dist/base.cjs.js +1 -1
  12. package/dist/base.cjs.js.LICENSE.txt +1 -1
  13. package/dist/base.esm.js +1 -1
  14. package/dist/base.esm.js.LICENSE.txt +1 -1
  15. package/dist/beta-desktop-bar.cjs.js +1 -1
  16. package/dist/beta-desktop-bar.cjs.js.LICENSE.txt +1 -1
  17. package/dist/beta-desktop-bar.esm.js +1 -1
  18. package/dist/beta-desktop-bar.esm.js.LICENSE.txt +1 -1
  19. package/dist/beta-mobile-bar.cjs.js +1 -1
  20. package/dist/beta-mobile-bar.cjs.js.LICENSE.txt +1 -1
  21. package/dist/beta-mobile-bar.esm.js +1 -1
  22. package/dist/beta-mobile-bar.esm.js.LICENSE.txt +1 -1
  23. package/dist/bundle.umd.js +1 -1
  24. package/dist/bundle.umd.js.LICENSE.txt +131 -1
  25. package/dist/button.cjs.js +1 -1
  26. package/dist/button.cjs.js.LICENSE.txt +1 -1
  27. package/dist/button.esm.js +1 -1
  28. package/dist/button.esm.js.LICENSE.txt +1 -1
  29. package/dist/card-getter.cjs.js.LICENSE.txt +1 -1
  30. package/dist/card-getter.esm.js.LICENSE.txt +1 -1
  31. package/dist/center.cjs.js +1 -1
  32. package/dist/center.cjs.js.LICENSE.txt +1 -1
  33. package/dist/center.esm.js +1 -1
  34. package/dist/center.esm.js.LICENSE.txt +1 -1
  35. package/dist/checkbox.cjs.js +1 -1
  36. package/dist/checkbox.cjs.js.LICENSE.txt +1 -1
  37. package/dist/checkbox.esm.js +1 -1
  38. package/dist/checkbox.esm.js.LICENSE.txt +1 -1
  39. package/dist/code.cjs.js +1 -1
  40. package/dist/code.cjs.js.LICENSE.txt +1 -1
  41. package/dist/code.esm.js +1 -1
  42. package/dist/code.esm.js.LICENSE.txt +1 -1
  43. package/dist/container.cjs.js +1 -1
  44. package/dist/container.cjs.js.LICENSE.txt +1 -1
  45. package/dist/container.esm.js +1 -1
  46. package/dist/container.esm.js.LICENSE.txt +1 -1
  47. package/dist/data-list.cjs.js +1 -1
  48. package/dist/data-list.cjs.js.LICENSE.txt +1 -1
  49. package/dist/data-list.esm.js +1 -1
  50. package/dist/data-list.esm.js.LICENSE.txt +1 -1
  51. package/dist/designer.cjs.js +1 -1
  52. package/dist/designer.cjs.js.LICENSE.txt +97 -1
  53. package/dist/designer.esm.js +1 -1
  54. package/dist/designer.esm.js.LICENSE.txt +97 -1
  55. package/dist/element-mapper.cjs.js +1 -1
  56. package/dist/element-mapper.cjs.js.LICENSE.txt +17 -1
  57. package/dist/element-mapper.esm.js +1 -1
  58. package/dist/element-mapper.esm.js.LICENSE.txt +17 -1
  59. package/dist/finalresult.esm.js +1 -1
  60. package/dist/finalresult.esm.js.LICENSE.txt +158 -1
  61. package/dist/flex-card.cjs.js +1 -1
  62. package/dist/flex-card.cjs.js.LICENSE.txt +1 -1
  63. package/dist/flex-card.esm.js +1 -1
  64. package/dist/flex-card.esm.js.LICENSE.txt +1 -1
  65. package/dist/flex-grid.cjs.js +1 -1
  66. package/dist/flex-grid.cjs.js.LICENSE.txt +1 -1
  67. package/dist/flex-grid.esm.js +1 -1
  68. package/dist/flex-grid.esm.js.LICENSE.txt +1 -1
  69. package/dist/flex-row.cjs.js +1 -1
  70. package/dist/flex-row.cjs.js.LICENSE.txt +1 -1
  71. package/dist/flex-row.esm.js +1 -1
  72. package/dist/flex-row.esm.js.LICENSE.txt +1 -1
  73. package/dist/floating-input.cjs.js +1 -1
  74. package/dist/floating-input.cjs.js.LICENSE.txt +1 -1
  75. package/dist/floating-input.esm.js +1 -1
  76. package/dist/floating-input.esm.js.LICENSE.txt +1 -1
  77. package/dist/free.cjs.js +1 -1
  78. package/dist/free.cjs.js.LICENSE.txt +1 -1
  79. package/dist/free.esm.js +1 -1
  80. package/dist/free.esm.js.LICENSE.txt +1 -1
  81. package/dist/horizontal-scroller.cjs.js.LICENSE.txt +1 -1
  82. package/dist/horizontal-scroller.esm.js.LICENSE.txt +1 -1
  83. package/dist/image-picker.cjs.js +1 -1
  84. package/dist/image-picker.cjs.js.LICENSE.txt +1 -1
  85. package/dist/image-picker.esm.js +1 -1
  86. package/dist/image-picker.esm.js.LICENSE.txt +1 -1
  87. package/dist/image.cjs.js +1 -1
  88. package/dist/image.cjs.js.LICENSE.txt +1 -1
  89. package/dist/image.esm.js +1 -1
  90. package/dist/image.esm.js.LICENSE.txt +1 -1
  91. package/dist/index.cjs.js +1 -1
  92. package/dist/index.cjs.js.LICENSE.txt +158 -1
  93. package/dist/index.d.ts +962 -0
  94. package/dist/index.esm.js +1 -1
  95. package/dist/index.esm.js.LICENSE.txt +158 -1
  96. package/dist/keyframe-animation.cjs.js.LICENSE.txt +1 -1
  97. package/dist/keyframe-animation.esm.js.LICENSE.txt +1 -1
  98. package/dist/link-getter.cjs.js +1 -1
  99. package/dist/link-getter.cjs.js.LICENSE.txt +1 -1
  100. package/dist/link-getter.esm.js +1 -1
  101. package/dist/link-getter.esm.js.LICENSE.txt +1 -1
  102. package/dist/link.cjs.js +1 -1
  103. package/dist/link.cjs.js.LICENSE.txt +1 -1
  104. package/dist/link.esm.js +1 -1
  105. package/dist/link.esm.js.LICENSE.txt +1 -1
  106. package/dist/meta-adder.cjs.js +1 -1
  107. package/dist/meta-adder.cjs.js.LICENSE.txt +1 -1
  108. package/dist/meta-adder.esm.js +1 -1
  109. package/dist/meta-adder.esm.js.LICENSE.txt +1 -1
  110. package/dist/modal-2025.cjs.js +1 -1
  111. package/dist/modal-2025.cjs.js.LICENSE.txt +1 -1
  112. package/dist/modal-2025.esm.js +1 -1
  113. package/dist/modal-2025.esm.js.LICENSE.txt +1 -1
  114. package/dist/multiswitcher.cjs.js +1 -1
  115. package/dist/multiswitcher.cjs.js.LICENSE.txt +1 -1
  116. package/dist/multiswitcher.esm.js +1 -1
  117. package/dist/multiswitcher.esm.js.LICENSE.txt +1 -1
  118. package/dist/new-nav-bar.cjs.js +1 -1
  119. package/dist/new-nav-bar.cjs.js.LICENSE.txt +1 -1
  120. package/dist/new-nav-bar.esm.js +1 -1
  121. package/dist/new-nav-bar.esm.js.LICENSE.txt +1 -1
  122. package/dist/picker.cjs.js +1 -1
  123. package/dist/picker.cjs.js.LICENSE.txt +1 -1
  124. package/dist/picker.esm.js +1 -1
  125. package/dist/picker.esm.js.LICENSE.txt +1 -1
  126. package/dist/progress.cjs.js +1 -1
  127. package/dist/progress.cjs.js.LICENSE.txt +1 -1
  128. package/dist/progress.esm.js +1 -1
  129. package/dist/progress.esm.js.LICENSE.txt +1 -1
  130. package/dist/radio.cjs.js +1 -1
  131. package/dist/radio.cjs.js.LICENSE.txt +1 -1
  132. package/dist/radio.esm.js +1 -1
  133. package/dist/radio.esm.js.LICENSE.txt +1 -1
  134. package/dist/range.cjs.js +1 -1
  135. package/dist/range.cjs.js.LICENSE.txt +1 -1
  136. package/dist/range.esm.js +1 -1
  137. package/dist/range.esm.js.LICENSE.txt +1 -1
  138. package/dist/scroll-video.cjs.js.LICENSE.txt +1 -1
  139. package/dist/scroll-video.esm.js.LICENSE.txt +1 -1
  140. package/dist/side-bar.cjs.js +1 -1
  141. package/dist/side-bar.cjs.js.LICENSE.txt +1 -1
  142. package/dist/side-bar.esm.js +1 -1
  143. package/dist/side-bar.esm.js.LICENSE.txt +1 -1
  144. package/dist/side-nav-bar.cjs.js +1 -1
  145. package/dist/side-nav-bar.cjs.js.LICENSE.txt +1 -1
  146. package/dist/side-nav-bar.esm.js +1 -1
  147. package/dist/side-nav-bar.esm.js.LICENSE.txt +1 -1
  148. package/dist/simple-bar.cjs.js +1 -1
  149. package/dist/simple-bar.cjs.js.LICENSE.txt +1 -1
  150. package/dist/simple-bar.esm.js +1 -1
  151. package/dist/simple-bar.esm.js.LICENSE.txt +1 -1
  152. package/dist/slider-2025.cjs.js +1 -1
  153. package/dist/slider-2025.cjs.js.LICENSE.txt +1 -1
  154. package/dist/slider-2025.esm.js +1 -1
  155. package/dist/slider-2025.esm.js.LICENSE.txt +1 -1
  156. package/dist/spacer.cjs.js +1 -1
  157. package/dist/spacer.cjs.js.LICENSE.txt +1 -1
  158. package/dist/spacer.esm.js +1 -1
  159. package/dist/spacer.esm.js.LICENSE.txt +1 -1
  160. package/dist/stack.cjs.js +1 -1
  161. package/dist/stack.cjs.js.LICENSE.txt +1 -1
  162. package/dist/stack.esm.js +1 -1
  163. package/dist/stack.esm.js.LICENSE.txt +1 -1
  164. package/dist/stacker.cjs.js.LICENSE.txt +1 -1
  165. package/dist/stacker.esm.js.LICENSE.txt +1 -1
  166. package/dist/table.cjs.js +1 -1
  167. package/dist/table.cjs.js.LICENSE.txt +1 -1
  168. package/dist/table.esm.js +1 -1
  169. package/dist/table.esm.js.LICENSE.txt +1 -1
  170. package/dist/text-field.cjs.js +1 -1
  171. package/dist/text-field.cjs.js.LICENSE.txt +1 -1
  172. package/dist/text-field.esm.js +1 -1
  173. package/dist/text-field.esm.js.LICENSE.txt +1 -1
  174. package/dist/text.cjs.js +1 -1
  175. package/dist/text.cjs.js.LICENSE.txt +1 -1
  176. package/dist/text.esm.js +1 -1
  177. package/dist/text.esm.js.LICENSE.txt +1 -1
  178. package/dist/theme.cjs.js.LICENSE.txt +1 -1
  179. package/dist/theme.esm.js.LICENSE.txt +1 -1
  180. package/dist/transform-anim.cjs.js.LICENSE.txt +1 -1
  181. package/dist/transform-anim.esm.js.LICENSE.txt +1 -1
  182. package/dist/ulist.cjs.js +1 -1
  183. package/dist/ulist.cjs.js.LICENSE.txt +1 -1
  184. package/dist/ulist.esm.js +1 -1
  185. package/dist/ulist.esm.js.LICENSE.txt +1 -1
  186. package/dist/video.cjs.js +1 -1
  187. package/dist/video.cjs.js.LICENSE.txt +1 -1
  188. package/dist/video.esm.js +1 -1
  189. package/dist/video.esm.js.LICENSE.txt +1 -1
  190. package/dist/wrap.cjs.js +1 -1
  191. package/dist/wrap.cjs.js.LICENSE.txt +1 -1
  192. package/dist/wrap.esm.js +1 -1
  193. package/dist/wrap.esm.js.LICENSE.txt +1 -1
  194. package/dist/zoom-card.cjs.js +1 -1
  195. package/dist/zoom-card.cjs.js.LICENSE.txt +1 -1
  196. package/dist/zoom-card.esm.js +1 -1
  197. package/dist/zoom-card.esm.js.LICENSE.txt +1 -1
  198. package/examples/custom-raster-op.js +174 -0
  199. package/layout/animator.js +48 -2
  200. package/layout/audio.js +1 -1
  201. package/layout/audionew.js +1 -1
  202. package/layout/base.js +8 -3
  203. package/layout/beta-desktop-bar.js +1 -1
  204. package/layout/beta-mobile-bar.js +3 -2
  205. package/layout/button.js +3 -11
  206. package/layout/center.js +1 -1
  207. package/layout/checkbox.js +2 -2
  208. package/layout/circle.js +3 -2
  209. package/layout/code.js +3 -2
  210. package/layout/container.js +4 -8
  211. package/layout/dropdown-2025.js +1 -1
  212. package/layout/flex-card.js +1 -16
  213. package/layout/flex-grid.js +3 -6
  214. package/layout/flex-row.js +7 -12
  215. package/layout/form-components/custom.js +1 -1
  216. package/layout/form-components/data-list.js +2 -2
  217. package/layout/form-components/floating-input.js +2 -2
  218. package/layout/form-components/form-all.js +2 -2
  219. package/layout/form-components/form.js +1 -1
  220. package/layout/form-components/image-picker.js +1 -1
  221. package/layout/form-components/picker.js +2 -2
  222. package/layout/form-components/radio.js +2 -2
  223. package/layout/form-components/radiogroup.js +2 -2
  224. package/layout/form-components/range.js +2 -2
  225. package/layout/free.js +3 -4
  226. package/layout/grid-switcher.js +16 -7
  227. package/layout/grid.js +7 -2
  228. package/layout/horizontal-scroller.js +1 -1
  229. package/layout/image.js +1 -1
  230. package/layout/index.js +1 -1
  231. package/layout/link.js +6 -25
  232. package/layout/list.js +14 -6
  233. package/layout/meta-adder.js +8 -3
  234. package/layout/modal-2025.js +7 -2
  235. package/layout/morph.js +1003 -0
  236. package/layout/multiswitcher.js +11 -3
  237. package/layout/nav-bar.js +50 -46
  238. package/layout/nav-factor/custom-div.js +2 -2
  239. package/layout/new-nav-bar.js +11 -4
  240. package/layout/polygon.js +3 -4
  241. package/layout/prerender-site.js +1 -1
  242. package/layout/prerender.js +1 -1
  243. package/layout/progress.js +7 -2
  244. package/layout/row.js +7 -2
  245. package/layout/scroll-video.js +7 -2
  246. package/layout/side-bar.js +15 -10
  247. package/layout/side-nav-bar.js +1 -1
  248. package/layout/simple-bar.js +1 -1
  249. package/layout/slider-2025.js +1 -1
  250. package/layout/spacer.js +7 -2
  251. package/layout/stack.js +7 -2
  252. package/layout/svg.js +3 -4
  253. package/layout/switcher.js +7 -2
  254. package/layout/table.js +1 -1
  255. package/layout/text-field.js +3 -13
  256. package/layout/text.js +5 -15
  257. package/layout/ulist.js +1 -1
  258. package/layout/video.js +1 -1
  259. package/layout/wrap.js +7 -2
  260. package/layout/zoom-card.js +1 -1
  261. package/lib/card-getter.js +1 -1
  262. package/lib/codegen.js +62 -0
  263. package/lib/data.js +37 -1
  264. package/lib/designer.js +18 -1
  265. package/lib/element-mapper.js +351 -247
  266. package/lib/keyframe-animation.js +1 -1
  267. package/lib/link-getter.js +1 -1
  268. package/lib/morph-node.js +424 -0
  269. package/lib/raster-inspect.js +409 -0
  270. package/lib/raster-ops.js +1902 -80
  271. package/lib/raster-presets.js +314 -0
  272. package/lib/scroll-video.js +1 -1
  273. package/lib/seo.js +28 -1
  274. package/lib/stacker.js +1 -1
  275. package/lib/suggest.js +66 -0
  276. package/lib/theme.js +1 -1
  277. package/lib/transform-anim.js +1 -1
  278. package/lib/transition.js +205 -0
  279. package/package.json +20 -7
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -16,9 +16,14 @@ class /*Multi*/Switcher extends Animator {
16
16
  this.resizeListener = null;
17
17
  }
18
18
 
19
- set({ breakpoints }) {
19
+ //@ id: DOM id for the switcher's own box. The views are swapped in and out, so an id belongs here rather than on a view that may not be mounted.
20
+ //@ area: The switcher's grid-area — the name of a cell declared in the parent's `areas`. It goes here because the switcher's box IS the grid item; the views live inside it, so an area set on a view would never reach the grid.
21
+ set({ breakpoints, id, area }) {
20
22
 
21
23
  this.options = {breakpoints: breakpoints};
24
+ // Applied in render(): the box does not exist until then.
25
+ this._id = id;
26
+ this._area = area;
22
27
 
23
28
  if (!Array.isArray(breakpoints)) {
24
29
  throw new Error("Breakpoints should be an array of objects with 'at' and 'view' properties.");
@@ -64,7 +69,10 @@ str += `{ at: "${this.options.breakpoints[i].at}", view: ${this.options.breakpoi
64
69
  //alert(val)
65
70
  // Create an internal div for switching content
66
71
  this.internalDiv = document.createElement("div");
67
-
72
+ this.res = this.internalDiv;
73
+ if (this._id) this.internalDiv.setAttribute("id", this._id);
74
+ if (this._area) this.internalDiv.style.gridArea = this._area;
75
+
68
76
  // Apply the initial view
69
77
  this.applyView();
70
78
 
package/layout/nav-bar.js CHANGED
@@ -1,12 +1,17 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
6
6
 
7
- class NavBar {
7
+ import {Animator} from "./animator.js";
8
+ class NavBar extends Animator{
8
9
  constructor(els){
9
- this.ele = null;
10
+ super();
11
+ // Converted from a standalone class; opting out of Theme keeps rendering
12
+ // byte-identical to the pre-conversion behaviour.
13
+ this._noTheme = true;
14
+ this.res = null;
10
15
  this.titleText = "";
11
16
  this.hasHamburger = false;
12
17
  this.setup(); // should nt be eited 2024
@@ -34,7 +39,7 @@ class NavBar {
34
39
  el.style.margin = 0;
35
40
  el.style.paddingTop = "1em";
36
41
  el.style.paddingBottom = "1em";
37
- this.ele = el;
42
+ this.res = el;
38
43
  // EVIL LINE
39
44
 
40
45
  return this;
@@ -51,17 +56,17 @@ class NavBar {
51
56
 
52
57
  let paddingObject = pado;// paddingValues[0]; // Assuming only one object in the array
53
58
  if (paddingObject.hasOwnProperty('top')) {
54
- this.ele.style.marginTop = paddingObject['top'];
59
+ this.res.style.marginTop = paddingObject['top'];
55
60
  }
56
61
  if (paddingObject.hasOwnProperty('right')) {
57
62
  //alert("P")
58
- this.ele.style.marginRight = paddingObject['right'];
63
+ this.res.style.marginRight = paddingObject['right'];
59
64
  }
60
65
  if (paddingObject.hasOwnProperty('bottom')) {
61
- this.ele.style.marginBottom = paddingObject['bottom'];
66
+ this.res.style.marginBottom = paddingObject['bottom'];
62
67
  }
63
68
  if (paddingObject.hasOwnProperty('left')) {
64
- this.ele.style.marginLeft = paddingObject['left'];
69
+ this.res.style.marginLeft = paddingObject['left'];
65
70
  }
66
71
  }
67
72
 
@@ -74,7 +79,7 @@ class NavBar {
74
79
  }
75
80
 
76
81
  radius(rad){
77
- this.ele.style.borderRadius = rad;
82
+ this.res.style.borderRadius = rad;
78
83
  return this;
79
84
  }
80
85
 
@@ -101,7 +106,7 @@ class NavBar {
101
106
 
102
107
 
103
108
 
104
- this.ele.appendChild(item.render());
109
+ this.res.appendChild(item.render());
105
110
 
106
111
 
107
112
 
@@ -125,14 +130,14 @@ class NavBar {
125
130
 
126
131
 
127
132
  sticky(){
128
- this.ele.style.position = "fixed";
133
+ this.res.style.position = "fixed";
129
134
  return this;
130
135
  }
131
136
 
132
137
  font(family){
133
138
 
134
- for (var i = 0; i < this.ele.children; i++){
135
- this.ele.children[i].style.fontFamily = family;
139
+ for (var i = 0; i < this.res.children; i++){
140
+ this.res.children[i].style.fontFamily = family;
136
141
  }
137
142
 
138
143
  return this;
@@ -142,8 +147,8 @@ class NavBar {
142
147
 
143
148
 
144
149
  background(obj){
145
- this.ele.style.backgroundColor = obj.color;
146
- this.ele.style.opacity = obj.opacity;
150
+ this.res.style.backgroundColor = obj.color;
151
+ this.res.style.opacity = obj.opacity;
147
152
  return this;
148
153
  }
149
154
 
@@ -156,10 +161,10 @@ adjust(w) {
156
161
  let media2 = window.matchMedia(`(max-device-width: 415px)`);
157
162
 
158
163
  if (media.matches || media2.matches) {
159
- this.ele.style.flexDirection = "column";
164
+ this.res.style.flexDirection = "column";
160
165
  } else {
161
- this.ele.style.flexDirection = "row";
162
- this.ele.style.marginLeft = 0;
166
+ this.res.style.flexDirection = "row";
167
+ this.res.style.marginLeft = 0;
163
168
  }
164
169
 
165
170
  const addHamburger = () => {
@@ -180,8 +185,8 @@ adjust(w) {
180
185
 
181
186
  const adjustFontSize = () => {
182
187
  // alert("NOT USED IN VIEWPORT")
183
- for (var i = 0; i < this.ele.children.length; i++) {
184
- let el = this.ele.children[i];
188
+ for (var i = 0; i < this.res.children.length; i++) {
189
+ let el = this.res.children[i];
185
190
  el.style.fontSize = media2.matches ? "1.2em" : "1em";
186
191
 
187
192
 
@@ -209,9 +214,9 @@ adjust(w) {
209
214
  }
210
215
 
211
216
  const toWideScreen = () => {
212
- for (var i = 0; i < this.ele.children.length; i++) {
217
+ for (var i = 0; i < this.res.children.length; i++) {
213
218
 
214
- let child = this.ele.children[i];
219
+ let child = this.res.children[i];
215
220
 
216
221
  child.style.marginTop = "0em";
217
222
  child.style.display = "block";
@@ -220,14 +225,14 @@ adjust(w) {
220
225
  child.style.fontSize = "2em";
221
226
  }
222
227
 
223
- if (this.ele.childNodes[i].textContent == "☰") {
224
- this.ele.removeChild(this.ele.childNodes[i]);
228
+ if (this.res.childNodes[i].textContent == "☰") {
229
+ this.res.removeChild(this.res.childNodes[i]);
225
230
  }
226
231
 
227
232
  }
228
233
 
229
234
 
230
- this.ele.style.flexDirection = "row";
235
+ this.res.style.flexDirection = "row";
231
236
  }
232
237
 
233
238
 
@@ -239,17 +244,17 @@ adjust(w) {
239
244
  var closed = false;
240
245
  var btn = addHamburger();
241
246
 
242
- /*(((this.ele.children.length == this.itemCount + 1)||*/
243
- if (this.ele.children.length == this.itemCount) {
244
- this.ele.insertBefore(btn, this.ele.firstChild);
247
+ /*(((this.res.children.length == this.itemCount + 1)||*/
248
+ if (this.res.children.length == this.itemCount) {
249
+ this.res.insertBefore(btn, this.res.firstChild);
245
250
  }
246
251
 
247
- this.ele.style.flexDirection = "column";
248
- for (var i = 0; i < this.ele.children.length; i++) {
249
- if (this.ele.children[i].textContent == "☰" || this.ele.children[i].textContent == /*"Lands"*/ this.keepItem){
250
- this.ele.children[i].style.display = "block";
252
+ this.res.style.flexDirection = "column";
253
+ for (var i = 0; i < this.res.children.length; i++) {
254
+ if (this.res.children[i].textContent == "☰" || this.res.children[i].textContent == /*"Lands"*/ this.keepItem){
255
+ this.res.children[i].style.display = "block";
251
256
  } else {
252
- this.ele.children[i].style.display = "none";
257
+ this.res.children[i].style.display = "none";
253
258
  }
254
259
  }
255
260
 
@@ -257,21 +262,21 @@ adjust(w) {
257
262
  // alert
258
263
  closed = !closed;
259
264
 
260
- for (var i = 0; i < this.ele.children.length; i++) {
261
- if (i != 0 && this.ele.children[i].textContent != /*"Lands"*/ this.keepItem) {
265
+ for (var i = 0; i < this.res.children.length; i++) {
266
+ if (i != 0 && this.res.children[i].textContent != /*"Lands"*/ this.keepItem) {
262
267
 
263
268
  if (!closed) {
264
- this.ele.children[i].style.display = "none";
265
- this.ele.children[i].style.marginTop = "0em";
269
+ this.res.children[i].style.display = "none";
270
+ this.res.children[i].style.marginTop = "0em";
266
271
  } else {
267
272
 
268
273
 
269
- if (this.ele.children[i].getAttribute("class") === "innerHider"){
274
+ if (this.res.children[i].getAttribute("class") === "innerHider"){
270
275
  // alert("WOW");
271
- this.ele.children[i].style.display = "none";
276
+ this.res.children[i].style.display = "none";
272
277
  } else {
273
- this.ele.children[i].style.display = "block";
274
- this.ele.children[i].style.marginTop = "3em";
278
+ this.res.children[i].style.display = "block";
279
+ this.res.children[i].style.marginTop = "3em";
275
280
  }
276
281
 
277
282
 
@@ -306,14 +311,13 @@ adjust(w) {
306
311
  if (div){
307
312
  document.querySelector(div).style.padding = 0;
308
313
  document.querySelector(div).style.margin = 0;
309
- document.querySelector(div).appendChild(this.ele);
314
+ document.querySelector(div).appendChild(this.res);
310
315
  } else {
311
- return this.ele;
316
+ return this.res;
312
317
  }
313
- return this.ele;
318
+ return this.res;
314
319
  }
315
320
  }
316
321
 
317
- window.NavBar = NavBar;
318
-
322
+ if (typeof window !== "undefined") window.NavBar = NavBar;
319
323
  export { NavBar };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -60,5 +60,5 @@ class CustomDivRenderer {
60
60
  }
61
61
  }
62
62
 
63
- window.CustomDivRenderer = CustomDivRenderer;
63
+ if (typeof window !== "undefined") window.CustomDivRenderer = CustomDivRenderer;
64
64
  export { CustomDivRenderer };
@@ -1,10 +1,11 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import {Animator} from "./animator.js";
8
+ import { toObjectSource } from "../lib/codegen.js";
8
9
  // import {CustomDivRenderer} from "./navFactor/customDiv.js";
9
10
  // CORRECT
10
11
  class CustomDivRenderer {
@@ -80,7 +81,7 @@ class UINavBar extends Animator {
80
81
  // 16:01:09 09/11/24 What????
81
82
  // Convert attributes to .set({...}) format if there are any attributes
82
83
  if (Object.keys(this.attributes).length > 0) {
83
- codeStr += `.setup(${JSON.stringify(this.attributes, null, 2).replace(/"([^"]+)":/g, '$1:')})`;
84
+ codeStr += `.setup(${toObjectSource(this.attributes, 2)})`;
84
85
 
85
86
  } else {
86
87
  codeStr += `.setup({})`;
@@ -95,8 +96,14 @@ class UINavBar extends Animator {
95
96
 
96
97
  codeStr += `\n])`;
97
98
 
98
- return codeStr;
99
-
99
+ // An ARRAY, like every other class's toCode(). Returning a bare
100
+ // string meant a bar could never be a child of a Wrapper at all:
101
+ // Wrapper.add() does `el.toCode().flatMap(...)`, and a string has
102
+ // no flatMap, so building the tree threw. Consumers that push the
103
+ // result and flatten later (designer.js) are unaffected, and a
104
+ // one-element array concatenates to exactly what the string did.
105
+ return [codeStr];
106
+
100
107
  }
101
108
 
102
109
  styled(obj) {
package/layout/polygon.js CHANGED
@@ -1,11 +1,12 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import { Animator } from "./animator.js";
8
8
 
9
+ import { toObjectSource } from "../lib/codegen.js";
9
10
  class Polygon extends Animator {
10
11
  constructor(obj = {}) {
11
12
  super();
@@ -32,9 +33,7 @@ class Polygon extends Animator {
32
33
  toCode(){
33
34
  const codeObj = this.options || {};
34
35
  // stringify with indentation
35
- let str = JSON.stringify(codeObj, null, 2);
36
- // remove quotes around keys
37
- str = str.replace(/"([^"]+)":/g, '$1:');
36
+ let str = toObjectSource(codeObj, 2);
38
37
  return `new Polygon().set(${str})`;
39
38
  }
40
39
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,13 +1,18 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
6
6
 
7
+ import {Animator} from "./animator.js";
7
8
  // changed on 26/12/2020
8
9
 
9
- class Progress {
10
+ class Progress extends Animator {
10
11
  constructor(value){
12
+ super();
13
+ // Converted from a standalone class. Opting out of Theme keeps rendering
14
+ // byte-identical to the pre-conversion behaviour; opt in per component.
15
+ this._noTheme = true;
11
16
  this.res = null;
12
17
  this.value = value;
13
18
  this.setup();
package/layout/row.js CHANGED
@@ -1,11 +1,16 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
6
6
 
7
- class Row {
7
+ import {Animator} from "./animator.js";
8
+ class Row extends Animator {
8
9
  constructor(frs, saveEl) {
10
+ super();
11
+ // Converted from a standalone class. Opting out of Theme keeps rendering
12
+ // byte-identical to the pre-conversion behaviour; opt in per component.
13
+ this._noTheme = true;
9
14
  this.saveEl = saveEl;
10
15
  this.frs = frs;
11
16
  this.res = null;
@@ -1,11 +1,16 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
6
6
 
7
- class ScrollVideo {
7
+ import {Animator} from "./animator.js";
8
+ class ScrollVideo extends Animator {
8
9
  constructor() {
10
+ super();
11
+ // Converted from a standalone class. Opting out of Theme keeps rendering
12
+ // byte-identical to the pre-conversion behaviour; opt in per component.
13
+ this._noTheme = true;
9
14
  this.frameNumber = 0; // Start video at frame 0
10
15
  this.res = document.createElement("div");
11
16
  this.vid = null;
@@ -1,12 +1,17 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
6
6
 
7
- class SideBar {
7
+ import {Animator} from "./animator.js";
8
+ class SideBar extends Animator{
8
9
  constructor(els, obj){
9
- this.ele = null;
10
+ super();
11
+ // Converted from a standalone class; opting out of Theme keeps rendering
12
+ // byte-identical to the pre-conversion behaviour.
13
+ this._noTheme = true;
14
+ this.res = null;
10
15
  this.width = "16em";
11
16
  this.height = "100vh";
12
17
 
@@ -129,7 +134,7 @@ class SideBar {
129
134
  })
130
135
 
131
136
 
132
- this.ele = outer;
137
+ this.res = outer;
133
138
 
134
139
 
135
140
 
@@ -149,15 +154,15 @@ class SideBar {
149
154
  // DO NOT CHANGE WIDTH AFTER
150
155
 
151
156
  background(obj){
152
- this.ele.children[1].style.backgroundColor = obj.color;
153
- this.ele.children[1].style.opacity = obj.opacity;
157
+ this.res.children[1].style.backgroundColor = obj.color;
158
+ this.res.children[1].style.opacity = obj.opacity;
154
159
  return this;
155
160
  }
156
161
 
157
162
  items(items){
158
163
  this.itemCount = items.length;
159
164
  for (var i = 0; i < items.length; i++){
160
- this.ele.children[1].appendChild(items[i].render());
165
+ this.res.children[1].appendChild(items[i].render());
161
166
  }
162
167
 
163
168
  return this;
@@ -169,11 +174,11 @@ class SideBar {
169
174
  if (div){
170
175
  document.querySelector(div).style.padding = 0;
171
176
  document.querySelector(div).style.margin = 0;
172
- document.querySelector(div).appendChild(this.ele);
177
+ document.querySelector(div).appendChild(this.res);
173
178
  } else {
174
- return this.ele;
179
+ return this.res;
175
180
  }
176
- return this.ele;
181
+ return this.res;
177
182
  }
178
183
  }
179
184
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
package/layout/spacer.js CHANGED
@@ -1,11 +1,16 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
6
6
 
7
- class Spacer {
7
+ import {Animator} from "./animator.js";
8
+ class Spacer extends Animator {
8
9
  constructor( hide) {
10
+ super();
11
+ // Converted from a standalone class. Opting out of Theme keeps rendering
12
+ // byte-identical to the pre-conversion behaviour; opt in per component.
13
+ this._noTheme = true;
9
14
 
10
15
 
11
16
 
package/layout/stack.js CHANGED
@@ -1,11 +1,16 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
6
6
 
7
- class Stack {
7
+ import {Animator} from "./animator.js";
8
+ class Stack extends Animator {
8
9
  constructor(st){
10
+ super();
11
+ // Converted from a standalone class. Opting out of Theme keeps rendering
12
+ // byte-identical to the pre-conversion behaviour; opt in per component.
13
+ this._noTheme = true;
9
14
  this.res = null;
10
15
 
11
16
  this.st = st;
package/layout/svg.js CHANGED
@@ -1,11 +1,12 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
6
6
 
7
7
  import { Wrapper } from "./container.js";
8
8
 
9
+ import { toObjectSource } from "../lib/codegen.js";
9
10
  /**
10
11
  * Svg — a Nodality primitive for inline SVG icons.
11
12
  *
@@ -99,9 +100,7 @@ class Svg extends Wrapper {
99
100
  const cleanedObj = Object.fromEntries(
100
101
  Object.entries(this.obj).filter(([k, v]) => v !== null)
101
102
  );
102
- const objString = JSON
103
- .stringify(cleanedObj, null, 2)
104
- .replace(/"([^"]+)":/g, "$1:");
103
+ const objString = toObjectSource(cleanedObj, 2);
105
104
  code += `\n${pad} .set(${objString})`;
106
105
  }
107
106
  code += `\n${pad}`;
@@ -1,11 +1,16 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
6
6
 
7
- class Switcher {
7
+ import {Animator} from "./animator.js";
8
+ class Switcher extends Animator {
8
9
  constructor(obj){
10
+ super();
11
+ // Converted from a standalone class. Opting out of Theme keeps rendering
12
+ // byte-identical to the pre-conversion behaviour; opt in per component.
13
+ this._noTheme = true;
9
14
  this.res = null;
10
15
  this.obj = obj;
11
16
  this.code = [];
package/layout/table.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * nodality v1.0.220
2
+ * nodality v1.0.224
3
3
  * (c) 2026 Filip Vabrousek
4
4
  * License: MIT
5
5
  */
@@ -179,12 +179,8 @@ class TextField extends Animator {
179
179
  this.res.style.border = `${w}px solid ${color}`;
180
180
  return this;
181
181
  }
182
-
183
-
184
- width(w){
185
- this.res.style.width = w;
186
- return this;
187
- }
182
+
183
+
188
184
  /**
189
185
  * Corner radius. A number is pixels; a string is passed through, so
190
186
  * `radius("50%")` and `radius(12)` both work.
@@ -192,12 +188,6 @@ class TextField extends Animator {
192
188
 
193
189
 
194
190
 
195
- //@deprecated round: superseded by `radius()`, which is the same thing under the name the option already uses.
196
- round(v) {
197
- this.deprecatedOption("round()", "radius()");
198
- return this.radius(v);
199
- }
200
-
201
191
 
202
192
  onChange(action){
203
193
  var value = this.res.value;