neo.mjs 6.34.0 → 6.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +15 -1
  2. package/apps/ServiceWorker.mjs +2 -2
  3. package/apps/colors/view/ViewportController.mjs +27 -17
  4. package/apps/portal/view/blog/List.mjs +38 -12
  5. package/apps/portal/view/home/FeatureSection.mjs +209 -0
  6. package/apps/portal/view/home/parts/Colors.mjs +34 -84
  7. package/apps/portal/view/home/parts/Features.mjs +1 -1
  8. package/apps/portal/view/home/parts/Helix.mjs +36 -95
  9. package/apps/portal/view/home/parts/How.mjs +31 -48
  10. package/apps/portal/view/learn/ContentView.mjs +53 -20
  11. package/examples/ServiceWorker.mjs +2 -2
  12. package/package.json +3 -3
  13. package/resources/data/deck/learnneo/pages/benefits/Multi-Threading.md +221 -0
  14. package/resources/data/deck/learnneo/tree.json +12 -13
  15. package/resources/scss/src/apps/portal/Viewport.scss +19 -0
  16. package/resources/scss/src/apps/portal/home/ContentBox.scss +9 -2
  17. package/resources/scss/src/apps/portal/home/FeatureSection.scss +68 -0
  18. package/resources/scss/src/apps/portal/home/parts/Colors.scss +0 -11
  19. package/resources/scss/src/apps/portal/home/parts/Helix.scss +1 -7
  20. package/resources/scss/src/apps/portal/home/parts/How.scss +0 -22
  21. package/resources/scss/src/apps/portal/learn/ContentView.scss +8 -0
  22. package/resources/scss/src/code/LivePreview.scss +1 -0
  23. package/src/DefaultConfig.mjs +2 -2
  24. package/src/Neo.mjs +5 -1
  25. package/src/code/LivePreview.mjs +16 -19
  26. package/src/component/Base.mjs +2 -2
  27. package/src/component/Toast.mjs +8 -8
  28. package/src/component/Video.mjs +22 -28
  29. package/src/component/wrapper/AmChart.mjs +15 -8
  30. package/src/main/addon/AmCharts.mjs +1 -1
  31. package/src/main/addon/IntersectionObserver.mjs +19 -3
  32. package/src/manager/DomEvent.mjs +1 -1
  33. package/src/worker/App.mjs +1 -1
  34. package/src/worker/mixin/RemoteMethodAccess.mjs +1 -3
  35. package/resources/data/deck/learnneo/pages/WhyNeo-Multi-Threaded.md +0 -15
@@ -427,7 +427,7 @@ class DomEvent extends Base {
427
427
  })
428
428
  });
429
429
 
430
- if (component.mounted) {
430
+ if (component.mounted && domListeners?.length > 0) {
431
431
  me.timeout(100).then(() => {
432
432
  me.mountDomListeners(component)
433
433
  })
@@ -384,7 +384,7 @@ class App extends Base {
384
384
  * @param {Object} data
385
385
  * @param {Number} data.angle
386
386
  * @param {String} data.layout landscape|portrait
387
- * @param {Number} data.type landscape-primary|landscape-secondary|portrait-primary|portrait-secondary
387
+ * @param {String} data.type landscape-primary|landscape-secondary|portrait-primary|portrait-secondary
388
388
  */
389
389
  onOrientationChange(data) {
390
390
  Object.values(Neo.apps).forEach(app => {
@@ -67,9 +67,7 @@ class RemoteMethodAccess extends Base {
67
67
  throw new Error('Duplicate remote method definition ' + className + '.' + method)
68
68
  }
69
69
 
70
- if (!pkg[method] ) {
71
- pkg[method] = me.generateRemote(remote, method)
72
- }
70
+ pkg[method] ??= me.generateRemote(remote, method)
73
71
  })
74
72
  }
75
73
  }
@@ -1,15 +0,0 @@
1
- When a Neo.mjs application starts, the framework spawns three web-workers, in addition
2
- to the main browser thread, resulting in:
3
-
4
- 1. The <b>main</b> browser thread, where DOM updates are applied
5
- 2. An <b>application</b> web-worker where normal application logic is run
6
- 3. A <b>data</b> web-worker were HTTP and socket calls are run
7
- 4. A <b>view</b> web-worker that manages delta updates
8
-
9
- <img src="https://s3.amazonaws.com/mjs.neo.learning.images/why/IndexHtmlFlow.png" width="120%"></img>
10
-
11
- The benefits of using web workers is that each runs in parallel its own thread. In a typical framework
12
- all code is run in the main thread, so processes compete for CPU cycles.
13
-
14
- Neo.mjs also allows you to easily spawn additional threads in order to have processor-intensive
15
- tasks to be run separately.