nodality 1.0.0-beta.4 → 1.0.0-beta.41

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 (278) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +108 -0
  3. package/dist/animator.cjs.js +2 -1
  4. package/dist/animator.cjs.js.LICENSE.txt +5 -0
  5. package/dist/animator.esm.js +2 -1
  6. package/dist/animator.esm.js.LICENSE.txt +5 -0
  7. package/dist/appleanim.cjs.js +2 -0
  8. package/dist/appleanim.cjs.js.LICENSE.txt +5 -0
  9. package/dist/appleanim.esm.js +2 -0
  10. package/dist/appleanim.esm.js.LICENSE.txt +5 -0
  11. package/dist/audionew.cjs.js +2 -1
  12. package/dist/audionew.cjs.js.LICENSE.txt +5 -0
  13. package/dist/audionew.esm.js +2 -1
  14. package/dist/audionew.esm.js.LICENSE.txt +5 -0
  15. package/dist/base.cjs.js +2 -1
  16. package/dist/base.cjs.js.LICENSE.txt +5 -0
  17. package/dist/base.esm.js +2 -1
  18. package/dist/base.esm.js.LICENSE.txt +5 -0
  19. package/dist/betaDesktopBar.esm.js +2 -1
  20. package/dist/betaDesktopBar.esm.js.LICENSE.txt +5 -0
  21. package/dist/betaMobileBar.esm.js +2 -1
  22. package/dist/betaMobileBar.esm.js.LICENSE.txt +5 -0
  23. package/dist/bundle.umd.js +2 -1
  24. package/dist/bundle.umd.js.LICENSE.txt +5 -0
  25. package/dist/button.cjs.js +2 -1
  26. package/dist/button.cjs.js.LICENSE.txt +5 -0
  27. package/dist/button.esm.js +2 -1
  28. package/dist/button.esm.js.LICENSE.txt +5 -0
  29. package/dist/cardGetter.cjs.js +2 -1
  30. package/dist/cardGetter.cjs.js.LICENSE.txt +5 -0
  31. package/dist/cardGetter.esm.js +2 -1
  32. package/dist/cardGetter.esm.js.LICENSE.txt +5 -0
  33. package/dist/center.cjs.js +2 -1
  34. package/dist/center.cjs.js.LICENSE.txt +5 -0
  35. package/dist/center.esm.js +2 -1
  36. package/dist/center.esm.js.LICENSE.txt +5 -0
  37. package/dist/checkbox.cjs.js +2 -1
  38. package/dist/checkbox.cjs.js.LICENSE.txt +5 -0
  39. package/dist/checkbox.esm.js +2 -1
  40. package/dist/checkbox.esm.js.LICENSE.txt +5 -0
  41. package/dist/code.cjs.js +2 -1
  42. package/dist/code.cjs.js.LICENSE.txt +5 -0
  43. package/dist/code.esm.js +2 -1
  44. package/dist/code.esm.js.LICENSE.txt +5 -0
  45. package/dist/container.cjs.js +2 -1
  46. package/dist/container.cjs.js.LICENSE.txt +5 -0
  47. package/dist/container.esm.js +2 -1
  48. package/dist/container.esm.js.LICENSE.txt +5 -0
  49. package/dist/datalist.cjs.js +2 -1
  50. package/dist/datalist.cjs.js.LICENSE.txt +5 -0
  51. package/dist/datalist.esm.js +2 -1
  52. package/dist/datalist.esm.js.LICENSE.txt +5 -0
  53. package/dist/designer.cjs.js +2 -1
  54. package/dist/designer.cjs.js.LICENSE.txt +5 -0
  55. package/dist/designer.esm.js +2 -1
  56. package/dist/designer.esm.js.LICENSE.txt +5 -0
  57. package/dist/dropdown.cjs.js +2 -1
  58. package/dist/dropdown.cjs.js.LICENSE.txt +5 -0
  59. package/dist/dropdown.esm.js +2 -1
  60. package/dist/dropdown.esm.js.LICENSE.txt +5 -0
  61. package/dist/elementMapper.cjs.js +2 -1
  62. package/dist/elementMapper.cjs.js.LICENSE.txt +5 -0
  63. package/dist/elementMapper.esm.js +2 -1
  64. package/dist/elementMapper.esm.js.LICENSE.txt +5 -0
  65. package/dist/finalresult.esm.js +2 -1
  66. package/dist/finalresult.esm.js.LICENSE.txt +5 -0
  67. package/dist/flexCard.cjs.js +2 -1
  68. package/dist/flexCard.cjs.js.LICENSE.txt +5 -0
  69. package/dist/flexCard.esm.js +2 -1
  70. package/dist/flexCard.esm.js.LICENSE.txt +5 -0
  71. package/dist/flexGrid.cjs.js +2 -1
  72. package/dist/flexGrid.cjs.js.LICENSE.txt +5 -0
  73. package/dist/flexGrid.esm.js +2 -1
  74. package/dist/flexGrid.esm.js.LICENSE.txt +5 -0
  75. package/dist/flexRow.cjs.js +2 -1
  76. package/dist/flexRow.cjs.js.LICENSE.txt +5 -0
  77. package/dist/flexRow.esm.js +2 -1
  78. package/dist/flexRow.esm.js.LICENSE.txt +5 -0
  79. package/dist/floatingInput.cjs.js +2 -1
  80. package/dist/floatingInput.cjs.js.LICENSE.txt +5 -0
  81. package/dist/floatingInput.esm.js +2 -1
  82. package/dist/floatingInput.esm.js.LICENSE.txt +5 -0
  83. package/dist/free.cjs.js +2 -1
  84. package/dist/free.cjs.js.LICENSE.txt +5 -0
  85. package/dist/free.esm.js +2 -1
  86. package/dist/free.esm.js.LICENSE.txt +5 -0
  87. package/dist/horizontalScroller.esm.js +2 -1
  88. package/dist/horizontalScroller.esm.js.LICENSE.txt +5 -0
  89. package/dist/image.cjs.js +2 -1
  90. package/dist/image.cjs.js.LICENSE.txt +5 -0
  91. package/dist/image.esm.js +2 -1
  92. package/dist/image.esm.js.LICENSE.txt +5 -0
  93. package/dist/imagePicker.cjs.js +2 -1
  94. package/dist/imagePicker.cjs.js.LICENSE.txt +5 -0
  95. package/dist/imagePicker.esm.js +2 -1
  96. package/dist/imagePicker.esm.js.LICENSE.txt +5 -0
  97. package/dist/index.cjs.js +2 -1
  98. package/dist/index.cjs.js.LICENSE.txt +5 -0
  99. package/dist/index.esm.js +2 -1
  100. package/dist/index.esm.js.LICENSE.txt +5 -0
  101. package/dist/link.cjs.js +2 -1
  102. package/dist/link.cjs.js.LICENSE.txt +5 -0
  103. package/dist/link.esm.js +2 -1
  104. package/dist/link.esm.js.LICENSE.txt +5 -0
  105. package/dist/linkGetter.cjs.js +2 -1
  106. package/dist/linkGetter.cjs.js.LICENSE.txt +5 -0
  107. package/dist/linkGetter.esm.js +2 -1
  108. package/dist/linkGetter.esm.js.LICENSE.txt +5 -0
  109. package/dist/metaAdder.cjs.js +2 -1
  110. package/dist/metaAdder.cjs.js.LICENSE.txt +5 -0
  111. package/dist/metaAdder.esm.js +2 -1
  112. package/dist/metaAdder.esm.js.LICENSE.txt +5 -0
  113. package/dist/modal2025.cjs.js +2 -1
  114. package/dist/modal2025.cjs.js.LICENSE.txt +5 -0
  115. package/dist/modal2025.esm.js +2 -1
  116. package/dist/modal2025.esm.js.LICENSE.txt +5 -0
  117. package/dist/multiswitchers.esm.js +2 -1
  118. package/dist/multiswitchers.esm.js.LICENSE.txt +5 -0
  119. package/dist/newNavBar.cjs.js +2 -1
  120. package/dist/newNavBar.cjs.js.LICENSE.txt +5 -0
  121. package/dist/newNavBar.esm.js +2 -1
  122. package/dist/newNavBar.esm.js.LICENSE.txt +5 -0
  123. package/dist/picker.cjs.js +2 -1
  124. package/dist/picker.cjs.js.LICENSE.txt +5 -0
  125. package/dist/picker.esm.js +2 -1
  126. package/dist/picker.esm.js.LICENSE.txt +5 -0
  127. package/dist/progress.cjs.js +2 -1
  128. package/dist/progress.cjs.js.LICENSE.txt +5 -0
  129. package/dist/progress.esm.js +2 -1
  130. package/dist/progress.esm.js.LICENSE.txt +5 -0
  131. package/dist/radio.cjs.js +2 -1
  132. package/dist/radio.cjs.js.LICENSE.txt +5 -0
  133. package/dist/radio.esm.js +2 -1
  134. package/dist/radio.esm.js.LICENSE.txt +5 -0
  135. package/dist/range.cjs.js +2 -1
  136. package/dist/range.cjs.js.LICENSE.txt +5 -0
  137. package/dist/range.esm.js +2 -1
  138. package/dist/range.esm.js.LICENSE.txt +5 -0
  139. package/dist/scrollvideo.cjs.js +2 -0
  140. package/dist/scrollvideo.cjs.js.LICENSE.txt +5 -0
  141. package/dist/scrollvideo.esm.js +2 -0
  142. package/dist/scrollvideo.esm.js.LICENSE.txt +5 -0
  143. package/dist/sideBar.cjs.js +2 -1
  144. package/dist/sideBar.cjs.js.LICENSE.txt +5 -0
  145. package/dist/sideBar.esm.js +2 -1
  146. package/dist/sideBar.esm.js.LICENSE.txt +5 -0
  147. package/dist/sideNavBar.cjs.js +2 -1
  148. package/dist/sideNavBar.cjs.js.LICENSE.txt +5 -0
  149. package/dist/sideNavBar.esm.js +2 -1
  150. package/dist/sideNavBar.esm.js.LICENSE.txt +5 -0
  151. package/dist/simpleBar.cjs.js +2 -1
  152. package/dist/simpleBar.cjs.js.LICENSE.txt +5 -0
  153. package/dist/simpleBar.esm.js +2 -1
  154. package/dist/simpleBar.esm.js.LICENSE.txt +5 -0
  155. package/dist/stack.cjs.js +2 -1
  156. package/dist/stack.cjs.js.LICENSE.txt +5 -0
  157. package/dist/stack.esm.js +2 -1
  158. package/dist/stack.esm.js.LICENSE.txt +5 -0
  159. package/dist/stacker.cjs.js +2 -0
  160. package/dist/stacker.cjs.js.LICENSE.txt +5 -0
  161. package/dist/stacker.esm.js +2 -0
  162. package/dist/stacker.esm.js.LICENSE.txt +5 -0
  163. package/dist/table.cjs.js +2 -1
  164. package/dist/table.cjs.js.LICENSE.txt +5 -0
  165. package/dist/table.esm.js +2 -1
  166. package/dist/table.esm.js.LICENSE.txt +5 -0
  167. package/dist/text.cjs.js +2 -1
  168. package/dist/text.cjs.js.LICENSE.txt +5 -0
  169. package/dist/text.esm.js +2 -1
  170. package/dist/text.esm.js.LICENSE.txt +5 -0
  171. package/dist/textField.cjs.js +2 -1
  172. package/dist/textField.cjs.js.LICENSE.txt +5 -0
  173. package/dist/textField.esm.js +2 -1
  174. package/dist/textField.esm.js.LICENSE.txt +5 -0
  175. package/dist/transformanim.cjs.js +2 -0
  176. package/dist/transformanim.cjs.js.LICENSE.txt +5 -0
  177. package/dist/transformanim.esm.js +2 -0
  178. package/dist/transformanim.esm.js.LICENSE.txt +5 -0
  179. package/dist/wrap.cjs.js +2 -1
  180. package/dist/wrap.cjs.js.LICENSE.txt +5 -0
  181. package/dist/wrap.esm.js +2 -1
  182. package/dist/wrap.esm.js.LICENSE.txt +5 -0
  183. package/dist/zoomCard.cjs.js +2 -1
  184. package/dist/zoomCard.cjs.js.LICENSE.txt +5 -0
  185. package/dist/zoomCard.esm.js +2 -1
  186. package/dist/zoomCard.esm.js.LICENSE.txt +5 -0
  187. package/layout/DEPRECATED-PARAGRAPH.js +6 -0
  188. package/layout/animator.js +6 -0
  189. package/layout/audio.js +6 -0
  190. package/layout/audionew.js +6 -0
  191. package/layout/base-2.js +6 -0
  192. package/layout/base.js +6 -0
  193. package/layout/betaDesktopBar.js +6 -0
  194. package/layout/betaMobileBar.js +6 -0
  195. package/layout/box.js +6 -0
  196. package/layout/button.js +6 -0
  197. package/layout/cards.js +6 -0
  198. package/layout/center.js +6 -0
  199. package/layout/checkbox.js +6 -0
  200. package/layout/cleanRow.js +6 -0
  201. package/layout/code.js +6 -0
  202. package/layout/container.js +6 -0
  203. package/layout/custom.js +6 -0
  204. package/layout/divImage.js +6 -0
  205. package/layout/dropdown.js +6 -0
  206. package/layout/dropdown2025.js +6 -0
  207. package/layout/emptyElement.js +6 -0
  208. package/layout/externalStylesheet.js +6 -0
  209. package/layout/flexCard.js +6 -0
  210. package/layout/flexGrid.js +6 -0
  211. package/layout/flexrow.js +6 -0
  212. package/layout/footer.js +6 -0
  213. package/layout/formComponents/custom.js +6 -0
  214. package/layout/formComponents/dataList.js +6 -0
  215. package/layout/formComponents/floatingInput.js +6 -0
  216. package/layout/formComponents/form-all.js +6 -0
  217. package/layout/formComponents/form.js +6 -0
  218. package/layout/formComponents/imagePicker.js +6 -0
  219. package/layout/formComponents/picker.js +6 -0
  220. package/layout/formComponents/radio.js +6 -0
  221. package/layout/formComponents/radiogroup.js +6 -0
  222. package/layout/formComponents/range.js +6 -0
  223. package/layout/free.js +6 -0
  224. package/layout/grid-new.js +6 -0
  225. package/layout/grid.js +6 -0
  226. package/layout/gridSwitcher.js +6 -0
  227. package/layout/group.js +6 -0
  228. package/layout/header.js +6 -0
  229. package/layout/horizontalScroller.js +6 -0
  230. package/layout/image-old.js +6 -0
  231. package/layout/image.js +6 -0
  232. package/layout/index.js +22 -0
  233. package/layout/label.js +6 -0
  234. package/layout/link.js +6 -0
  235. package/layout/list-OLD.js +6 -0
  236. package/layout/list.js +6 -0
  237. package/layout/metaAdder.js +6 -0
  238. package/layout/modal2025.js +6 -0
  239. package/layout/modernwrap.js +6 -0
  240. package/layout/multiswitcher.js +6 -0
  241. package/layout/multiswitcherBeta.js +6 -0
  242. package/layout/navBar-OLD.js +6 -0
  243. package/layout/navBar.js +6 -0
  244. package/layout/navFactor/customDiv.js +6 -0
  245. package/layout/newFlatAdder.js +6 -0
  246. package/layout/newNavBar copy 2.js +6 -0
  247. package/layout/newNavBar copy.js +6 -0
  248. package/layout/newNavBar.js +6 -0
  249. package/layout/offsetContainer.js +6 -0
  250. package/layout/progress.js +6 -0
  251. package/layout/row.js +6 -0
  252. package/layout/savedNewNavBar.js +6 -0
  253. package/layout/scrollvideo.js +6 -0
  254. package/layout/sideBar.js +6 -0
  255. package/layout/sideNavBar.js +7 -1
  256. package/layout/simpleBar.js +6 -0
  257. package/layout/slider2025.js +6 -0
  258. package/layout/spacer.js +6 -0
  259. package/layout/stack.js +6 -0
  260. package/layout/styler.js +6 -0
  261. package/layout/switcher.js +6 -0
  262. package/layout/table.js +6 -0
  263. package/layout/text.js +9 -1
  264. package/layout/textField.js +6 -0
  265. package/layout/ulist.js +6 -0
  266. package/layout/video.js +6 -0
  267. package/layout/withoutNew.js +6 -0
  268. package/layout/wrap.js +6 -0
  269. package/layout/zoomCard.js +6 -0
  270. package/lib/AppleAnim.js +795 -0
  271. package/lib/Stacker.js +42 -0
  272. package/lib/TransformAnim.js +520 -0
  273. package/lib/cardGetter.js +6 -0
  274. package/lib/designer.js +241 -14
  275. package/lib/elementMapper.js +15 -31
  276. package/lib/linkGetter.js +6 -0
  277. package/lib/scrollvideo.js +131 -0
  278. package/package.json +23 -4
package/lib/designer.js CHANGED
@@ -1,3 +1,9 @@
1
+ /*!
2
+ * nodality v1.0.0-beta.41
3
+ * (c) 2025 Filip Vabrousek
4
+ * License: MIT
5
+ */
6
+
1
7
  /* Classes:
2
8
  ElementMapper
3
9
  */
@@ -52,6 +58,12 @@ import { LinkStyler } from "../lib/linkGetter.js";
52
58
  import { CardGen } from "../lib/cardGetter.js";
53
59
  import {Simple} from "../layout/gridSwitcher.js";
54
60
 
61
+ // ANIM
62
+ import {KeyframeAnim} from "../lib/appleAnim.js";
63
+ import {TransformAnim} from "../lib/transformanim.js";
64
+ import {Stacker} from "../lib/stacker.js";
65
+ import {ScrollVideo} from "../lib/scrollvideo.js";
66
+
55
67
  // Audio, progress, TextField, import navFactor
56
68
  class Des {
57
69
  constructor() {
@@ -84,26 +96,41 @@ class Des {
84
96
  complex: {
85
97
  code: `new Wrapper()
86
98
  .set({
87
- background: "orange",
99
+
88
100
  responsive: {
89
101
  ranges: ["700px", "1200px", "1400px"],
90
102
  sequence: "col-row-col"
91
103
  }
92
104
  })
93
105
  .add([
94
- new Image("mountains.jpg").set({
95
- width: "auto",
96
- height: "100%",
106
+ new Image("img/wix.jpeg").set({
107
+ width: "100%",
108
+ height: "200px",
109
+ objectFit: "cover"
97
110
  }),
98
111
 
99
- new Wrapper().set({}).add([
100
- new Text("Title").set({
101
- fluidc: "S3",
112
+ new Wrapper().set({
113
+ responsive: {
114
+ ranges: ["700px", "1200px", "1400px"],
115
+ sequence: "col-col-row"
116
+ }
117
+ }).add([
118
+ new Text("Running in the desert").set({
119
+ size: "S3",
120
+ font: "Arial",
121
+ color: "orange"
122
+ }),
123
+
124
+ new Text("This is example content").set({
125
+ exact: "1rem",
102
126
  font: "Arial"
103
127
  }),
104
128
 
105
- new Image("sea.png").set({
106
- width: "100%"
129
+
130
+ new Image("img/wix.jpeg").set({
131
+ width: "100%",
132
+ height: "300px",
133
+ objectFit: "cover"
107
134
  })
108
135
  ])
109
136
  ])`
@@ -150,7 +177,144 @@ class Des {
150
177
  },
151
178
 
152
179
  grid: {
153
- code: `new Simple().set({...}).react([...]).add([...])`, // Rest omitted for brevity
180
+ code: ` new Simple()
181
+ .set({
182
+ gap: "1rem"
183
+ })
184
+ .react([{
185
+ at: "0px",
186
+ template: [
187
+ "eeeeee",
188
+ "eeeeee",
189
+ "abbbbb",
190
+ "abbbbb",
191
+ "abbbbb",
192
+ "cccccc",
193
+ "cccccc",
194
+ "dddddd"
195
+ ]
196
+ },
197
+
198
+ {
199
+ at: "900px",
200
+ color: "orange",
201
+ template: [
202
+ "aaaccc",
203
+ "aaaccc",
204
+ "bbbbbb",
205
+ "dddddd",
206
+ "eeeeee"
207
+ ]
208
+ },
209
+
210
+ {
211
+ at: "1200px",
212
+ color: "purple",
213
+ template: [
214
+ "cccaaa",
215
+ "cccaaa",
216
+ "bbbbbb",
217
+ "dddddd",
218
+ "eeeeee"
219
+ ]
220
+ },
221
+ ])
222
+ .add([
223
+ new Wrapper().set({
224
+ pad: [{
225
+ a: 20
226
+ }],
227
+ background: "#ecf0f1",
228
+ radius: "1.7rem"
229
+ }).add([
230
+ new Text("NEW PRODUCT").set({
231
+ exact: "1rem",
232
+ font: "Oswald",
233
+ width: "100%"
234
+ }),
235
+ new Text("Feel").set({
236
+ fluidc: "S2",
237
+ font: "Oswald",
238
+ width: "100%",
239
+ color: "black"
240
+ }),
241
+ new Text("Speed").set({
242
+ exact: "7rem",
243
+ font: "Oswald",
244
+ width: "100%",
245
+ color: "#3498db"
246
+ }),
247
+ ]),
248
+
249
+ new Wrapper().set({
250
+ pad: [{
251
+ a: 20
252
+ }],
253
+ background: "#ecf0f1",
254
+ radius: "1.7rem"
255
+ }).add([
256
+ new Text("TOP QUALITY").set({
257
+ exact: "1rem",
258
+ font: "Oswald",
259
+ width: "100%"
260
+ }),
261
+ new Text("Amazing animals").set({
262
+ fluidc: "S2",
263
+ font: "Oswald",
264
+ width: "100%",
265
+ color: "black"
266
+ }),
267
+
268
+ new Text("Seals are intelligent, agile marine mammals found in oceans around the world, known for their streamlined bodies, flippers, and ability to thrive both in water and on land. Belonging to the pinniped family, they are divided into true seals, which lack external ears, and eared seals like sea lions, which are more mobile on land. Seals feed primarily on fish and squid, using their sensitive whiskers to detect prey underwater, and can dive to great depths while holding their breath for extended periods. Adapted to cold environments with thick blubber for insulation, seals play a crucial role in marine ecosystems but face threats from climate change, pollution, and human activity, making conservation efforts increasingly important.")
269
+ .set({
270
+ font: "Arial",
271
+ exact: "1.3rem"
272
+ })
273
+
274
+ ]),
275
+
276
+ new Wrapper().set({
277
+ radius: "1.7rem",
278
+ overflow: "hidden"
279
+
280
+ }).add([
281
+
282
+ new Image("https://cdn.pixabay.com/photo/2017/02/09/18/40/seal-2053165_640.jpg", "exact").set({
283
+ width: "100%",
284
+ height: "420px",
285
+ minHeight: "100px",
286
+ objectFit: "cover"
287
+
288
+ })
289
+ ]),
290
+
291
+ new Wrapper().set({
292
+ pad: [{
293
+ a: 20
294
+ }],
295
+ background: "#ecf0f1",
296
+ radius: "1.7rem",
297
+ }).add([
298
+ new Text("Welcome seals").set({
299
+ fluidc: "S3",
300
+ font: "Oswald",
301
+ color: "black"
302
+ }),
303
+
304
+ ]),
305
+ new Wrapper().set({
306
+ mc: true,
307
+ pad: [{
308
+ a: 20
309
+ }],
310
+ background: "#ecf0f1",
311
+ radius: "1.7rem",
312
+
313
+ }).add([new Text("Top line").set({
314
+ font: "Arial",
315
+ exact: "1.3rem"
316
+ }), ]),
317
+ ])`, // Rest omitted for brevity
154
318
  },
155
319
 
156
320
  flexRow: (colat) => ({
@@ -158,7 +322,23 @@ class Des {
158
322
  code: `new FlexRow().set({border: ["all", "3px"], colat: "600px"}).items([new Image(...), new Image(...), new Image(...)])`,
159
323
  },
160
324
  text: {
161
- code: `new FlexRow().set({...}).items([new Text(...), new Text(...), new Text(...)])`,
325
+ code: `new FlexRow().set({}).items([
326
+
327
+ new Text("This").set({
328
+ size: "S3"
329
+ }),
330
+
331
+ new Text("is").set({
332
+ size: "S3",
333
+ text: "Hello"
334
+ }),
335
+
336
+ new Text("row.").set({
337
+ size: "S3",
338
+ text: "Hello"
339
+ })
340
+
341
+ ])`,
162
342
  },
163
343
  }),
164
344
 
@@ -584,9 +764,9 @@ console.log(duration);
584
764
  console.log(`----------------------------LLL ${i} ${customOptions.length}`);
585
765
 
586
766
 
587
- const matchEls = ["h1", "h2", "h3", "h4", "h5", "h6"].includes(el.type) || el.type === "img" || el.type === "a" || /*el.type == "modal" ||*/ el.type == "slider" || el.type == "table";
767
+ const matchEls = ["h1", "h2", "h3", "h4", "h5", "h6", "p"].includes(el.type) || el.type === "img" || el.type === "a" || /*el.type == "modal" ||*/ el.type == "slider" /*|| el.type == "table"*/;
588
768
 
589
- if (matchEls) {
769
+ if (matchEls) {
590
770
 
591
771
  ela = ElementMapper.mapType({
592
772
  el: el,
@@ -603,6 +783,29 @@ console.log(duration);
603
783
  this.ready2Render.push(ela);
604
784
  ela = ela.render();
605
785
 
786
+ } else if (el.type === "table"){
787
+ this.code.push(`
788
+ new Table()
789
+ .add([
790
+ { abbr: "AUIUI/AK9PT", name: "Pokročilé mobilní technologie", grade: "A", date: "09.01.2024" },
791
+ { abbr: "AUIUI/AK9PT", name: "Pokročilé mobilní technologie", grade: "A", date: "09.01.2024" },
792
+ { abbr: "AUIUI/AK9PT", name: "Pokročilé mobilní technologie", grade: "A", date: "09.01.2024" }
793
+ ])
794
+ .set({
795
+ cellPadding: "0.3em",
796
+ cellAlign: "center",
797
+ style: {
798
+ font: "Arial"
799
+ },
800
+ headStyle: {
801
+ color: "white",
802
+ background: "#ff6d22"
803
+ },
804
+ border: "2px solid black",
805
+ center: true,
806
+ borderRadius: 2.2
807
+ })
808
+ `);
606
809
  } else if (el.type === "grid") {
607
810
  this.code.push(
608
811
  this.stor.grid.code
@@ -865,6 +1068,7 @@ console.log(duration);
865
1068
 
866
1069
  let preo = document.createElement("pre");
867
1070
  preo.style.marginTop = "100px";
1071
+ preo.style.overflow = "scroll";
868
1072
  return this;
869
1073
  }
870
1074
 
@@ -885,11 +1089,34 @@ console.log(duration);
885
1089
  }
886
1090
  }
887
1091
 
1092
+ const layout = {
1093
+ Text, Image, Link, FlexRow, UINavBar, Free, Audio, Progress, Center, Code,
1094
+ Stack, Wrapper, MetaAdder, Table, Dropdown, Modal, TextField, Card,
1095
+ Wrap, FlexGrid, ZoomCard, Switcher, MobileBar, DesktopBar, SideNav, Spacer,
1096
+ };
1097
+
1098
+ const formComponents = {
1099
+ FloatingInput, Range, RadioGroup, Picker, FilePickera,
1100
+ DataList, Base, Form, Button, Slider, Video, Checkbox,
1101
+ };
1102
+
1103
+ const libs = {
1104
+ ElementMapper, Animator, LinkStyler, CardGen, Simple,
1105
+ };
1106
+
1107
+
1108
+ const components = {
1109
+ ...layout,
1110
+ ...formComponents,
1111
+ ...libs,
1112
+ };
1113
+
888
1114
  for (var i = 0; i < this.code.length; i++) {
889
1115
  let sub = this.code[i];
890
1116
  console.log("SUBO");
891
1117
  console.log(sub);
892
- eval(`${sub}`);
1118
+ new Function(...Object.keys(components), sub)(...Object.values(components));
1119
+ // eval(`${sub}`);
893
1120
  }
894
1121
  }
895
1122
  }
@@ -1,3 +1,9 @@
1
+ /*!
2
+ * nodality v1.0.0-beta.41
3
+ * (c) 2025 Filip Vabrousek
4
+ * License: MIT
5
+ */
6
+
1
7
  import {Animator} from "../layout/animator.js";
2
8
  import {Text} from "../layout/text.js";
3
9
  import {Image} from "../layout/image.js";
@@ -41,7 +47,7 @@ class ElementMapper { // 22:09:58 04/11/2024
41
47
  static mapType(obj) {
42
48
  // console.log("LOBJ");
43
49
  // console.log(obj);
44
- let headings = ["h1", "h2", "h3", "h4", "h5", "h6"];
50
+ let headings = ["h1", "h2", "h3", "h4", "h5", "h6", "p"];
45
51
  if (headings.includes(obj.el.type)) {
46
52
  return this.mapText(obj);
47
53
  } else if (obj.el.type === "img"){
@@ -58,9 +64,9 @@ class ElementMapper { // 22:09:58 04/11/2024
58
64
  return this.protoNav(obj);
59
65
  } else if (obj.el.type === "sideNav"){
60
66
  return this.sideNav(obj);
61
- } else if (obj.el.type === "row"){
67
+ } /*else if (obj.el.type === "row"){
62
68
  return this.row(obj);
63
- } else if (obj.el.type === "dropdown"){
69
+ } */ else if (obj.el.type === "dropdown"){
64
70
  return this.dropdown(obj);
65
71
  } else if (obj.el.type === "modal"){
66
72
  return this.modal(obj);
@@ -103,7 +109,7 @@ class ElementMapper { // 22:09:58 04/11/2024
103
109
  return this.stack(obj);
104
110
  } else if (obj.el.type === "simple"){
105
111
  return this.simple(obj);
106
- }
112
+ }
107
113
  }
108
114
 
109
115
 
@@ -244,29 +250,6 @@ class ElementMapper { // 22:09:58 04/11/2024
244
250
  return new Slider(texts, null);//.render("#mount");
245
251
  }
246
252
 
247
- static table(obj){
248
- return new Table()
249
- .add([
250
- { abbr: "AUIUI/AK9PT", name: "Pokročilé mobilní technologie", grade: "A", date: "09.01.2024" },
251
- { abbr: "AUIUI/AK9PT", name: "Pokročilé mobilní technologie", grade: "A", date: "09.01.2024" },
252
- { abbr: "AUIUI/AK9PT", name: "Pokročilé mobilní technologie", grade: "A", date: "09.01.2024" }
253
- ])
254
- .set({
255
- cellPadding: "0.3em",
256
- cellAlign: "center",
257
- style: {
258
- font: "Arial"
259
- },
260
- headStyle: {
261
- color: "white",
262
- background: "#ff6d22"
263
- },
264
- border: "2px solid black",
265
- center: true,
266
- borderRadius: 2.2
267
- })
268
- }
269
-
270
253
  static dropdown(obj){
271
254
  if (!obj.el.items){
272
255
  obj.el.items = ["Flower", "Car", "Maseratti"];
@@ -334,9 +317,9 @@ class ElementMapper { // 22:09:58 04/11/2024
334
317
  ])
335
318
  }
336
319
 
337
- static row(obj){
320
+ /* static row(obj){
338
321
  const customOptions = obj.customOptions;
339
-
322
+ alert("PP")
340
323
  let ret = new FlexRow()
341
324
  .set({
342
325
  borderObj: {
@@ -366,7 +349,7 @@ class ElementMapper { // 22:09:58 04/11/2024
366
349
 
367
350
  return ret;
368
351
 
369
- }
352
+ }*/
370
353
 
371
354
  static protoNav(obj){
372
355
 
@@ -1070,7 +1053,7 @@ if (obj.el.dropdown){
1070
1053
  id: el.id,
1071
1054
  class: el.class,
1072
1055
  color: el.color,
1073
- fluidc: this.getElType(el.type),
1056
+ size: this.getElType(el.type), // update 23/07/2025
1074
1057
  font: el.font ?? "Arial",
1075
1058
  // index: obj.i + "",
1076
1059
  // keySet: {key: "border", value: "3px solid green"},
@@ -1082,6 +1065,7 @@ if (obj.el.dropdown){
1082
1065
  backgroundOp: this.filtero("background", el.id, obj.customOptions),
1083
1066
  marginOp: this.filtero("margin", el.id, obj.customOptions),
1084
1067
  transform: this.filtero("transform", el.id, obj.customOptions),
1068
+ filtera: this.filtero("filter", el.id, obj.customOptions),
1085
1069
  });
1086
1070
  }
1087
1071
 
package/lib/linkGetter.js CHANGED
@@ -1,3 +1,9 @@
1
+ /*!
2
+ * nodality v1.0.0-beta.41
3
+ * (c) 2025 Filip Vabrousek
4
+ * License: MIT
5
+ */
6
+
1
7
  class LinkStyler {
2
8
  static style(obj){
3
9
  let bst = obj.bst;
@@ -0,0 +1,131 @@
1
+ /*!
2
+ * nodality v1.0.0-beta.41
3
+ * (c) 2025 Filip Vabrousek
4
+ * License: MIT
5
+ */
6
+
7
+
8
+
9
+ class ScrollVideo {
10
+ constructor() {
11
+ this.frameNumber = 0; // Start video at frame 0
12
+ this.res = document.createElement("div");
13
+ this.vid = null;
14
+ this.minScrollHeight = 0; // Default minimum scroll height
15
+ this.maxScrollHeight = 1000; // Default maximum scroll height
16
+ this.videoUrl = ""; // Default video URL
17
+ }
18
+
19
+ set({ minScrollHeight = 0, maxScrollHeight = 1000, videoUrl = "" } = {}) {
20
+ this.minScrollHeight = minScrollHeight;
21
+ this.maxScrollHeight = maxScrollHeight;
22
+ this.videoUrl = videoUrl;
23
+
24
+ // Create elements after settings are provided
25
+ this.createElements("V0");
26
+
27
+ // Select video element after creation
28
+ this.vid = this.res.children[0];
29
+
30
+ // Initialize event listeners and behavior
31
+ this.init();
32
+ return this; // Allow chaining
33
+ }
34
+
35
+ createElements(videoElementId) {
36
+ // Create and style the video element
37
+ const video = document.createElement("video");
38
+ video.id = videoElementId;
39
+ video.setAttribute("tabindex", "0");
40
+ video.setAttribute("autobuffer", "autobuffer");
41
+ video.setAttribute("preload", "preload");
42
+ video.style.position = "sticky";
43
+ video.style.top = "0";
44
+ video.style.left = "0";
45
+ video.style.width = "100%";
46
+ video.style.height = "100vh";
47
+ video.style.border = "1px solid orange";
48
+
49
+ // Create and append the source element to the video
50
+ const source = document.createElement("source");
51
+ source.type = 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"';
52
+ source.src = this.videoUrl;
53
+ video.appendChild(source);
54
+
55
+ // Append the video element to the container
56
+ this.res.appendChild(video);
57
+
58
+ // Create and style the paragraph element
59
+ const paragraph = document.createElement("p");
60
+ paragraph.id = "time";
61
+ paragraph.style.fontFamily = "Helvetica, Arial, sans-serif";
62
+ paragraph.style.fontSize = "24px";
63
+ this.res.appendChild(paragraph);
64
+
65
+ // Create and style the set-height div element
66
+ const setHeight = document.createElement("div");
67
+ setHeight.id = "set-height";
68
+ setHeight.style.display = "block";
69
+ this.setop = setHeight;
70
+ this.res.appendChild(setHeight);
71
+ }
72
+
73
+ sticky() {
74
+ this.res.style.position = "sticky";
75
+ this.res.style.top = 0;
76
+ return this;
77
+ }
78
+
79
+ init() {
80
+ // Set up event listener for when the video metadata is loaded
81
+ this.vid.addEventListener("loadedmetadata", () => {
82
+ // Dynamically set the page height based on video duration
83
+ const setHeight = this.setop;//document.getElementById("set-height");
84
+ if (setHeight) {
85
+ const scrollableHeight = this.maxScrollHeight - this.minScrollHeight;
86
+ setHeight.style.height = `${scrollableHeight}px`;
87
+ } else {
88
+ console.error("Error: 'set-height' element not found.");
89
+ }
90
+ });
91
+
92
+ // Start the scroll-play functionality
93
+ this.scrollPlay();
94
+ }
95
+ scrollPlay() {
96
+ // Ensure the video duration is loaded before trying to calculate currentTime
97
+ if (!this.vid || isNaN(this.vid.duration)) {
98
+ window.requestAnimationFrame(() => this.scrollPlay());
99
+ return;
100
+ }
101
+
102
+ // Calculate the frame number based on scroll position
103
+ const scrollPosition = Math.max(
104
+ this.minScrollHeight,
105
+ Math.min(window.pageYOffset, this.maxScrollHeight)
106
+ );
107
+
108
+ const scrollRange = this.maxScrollHeight - this.minScrollHeight;
109
+ const normalizedScroll = (scrollPosition - this.minScrollHeight) / scrollRange;
110
+
111
+ // Update the video currentTime property
112
+ this.vid.currentTime = normalizedScroll * this.vid.duration;
113
+
114
+ // Request the next animation frame for smooth playback
115
+ window.requestAnimationFrame(() => this.scrollPlay());
116
+ }
117
+
118
+ toCode() {
119
+ return [""];
120
+ }
121
+ render(div) {
122
+ if (div){
123
+ document.querySelector(div).appendChild(this.res);
124
+ return;
125
+ }
126
+ // Return the container div with all elements
127
+ return this.res;
128
+ }
129
+ }
130
+
131
+ export { ScrollVideo };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nodality",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-beta.41",
4
4
  "description": "A lightweight library for declarative UI elements.",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.esm.js",
@@ -16,9 +16,19 @@
16
16
  }
17
17
  },
18
18
  "scripts": {
19
- "build": "webpack --config webpack.config.js"
19
+ "build": "webpack --config webpack.config.js",
20
+ "test:jest": "jest",
21
+ "test:playwright": "playwright test",
22
+ "test": "node generatePlaywright.js && playwright test",
23
+ "postpublish": "git add . && git commit -m \"release: v$npm_package_version\" && git tag v$npm_package_version && git push --set-upstream origin main && git push origin v$npm_package_version",
24
+ "inject-license": "node scripts/injectLicense.js"
25
+ },
26
+ "jest": {
27
+ "testEnvironment": "jsdom",
28
+ "transform": {
29
+ "^.+\\.js$": "babel-jest"
30
+ }
20
31
  },
21
- "dependencies": {},
22
32
  "license": "MIT",
23
33
  "repository": {
24
34
  "type": "git",
@@ -35,5 +45,14 @@
35
45
  "library",
36
46
  "declarative",
37
47
  "nodality"
38
- ]
48
+ ],
49
+ "devDependencies": {
50
+ "@babel/core": "^7.28.0",
51
+ "@babel/preset-env": "^7.28.0",
52
+ "@playwright/test": "^1.54.1",
53
+ "babel-jest": "^29.7.0",
54
+ "jest": "^29.7.0",
55
+ "jest-environment-jsdom": "^29.7.0",
56
+ "playwright": "^1.54.1"
57
+ }
39
58
  }