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.
- package/README.md +15 -1
- package/apps/ServiceWorker.mjs +2 -2
- package/apps/colors/view/ViewportController.mjs +27 -17
- package/apps/portal/view/blog/List.mjs +38 -12
- package/apps/portal/view/home/FeatureSection.mjs +209 -0
- package/apps/portal/view/home/parts/Colors.mjs +34 -84
- package/apps/portal/view/home/parts/Features.mjs +1 -1
- package/apps/portal/view/home/parts/Helix.mjs +36 -95
- package/apps/portal/view/home/parts/How.mjs +31 -48
- package/apps/portal/view/learn/ContentView.mjs +53 -20
- package/examples/ServiceWorker.mjs +2 -2
- package/package.json +3 -3
- package/resources/data/deck/learnneo/pages/benefits/Multi-Threading.md +221 -0
- package/resources/data/deck/learnneo/tree.json +12 -13
- package/resources/scss/src/apps/portal/Viewport.scss +19 -0
- package/resources/scss/src/apps/portal/home/ContentBox.scss +9 -2
- package/resources/scss/src/apps/portal/home/FeatureSection.scss +68 -0
- package/resources/scss/src/apps/portal/home/parts/Colors.scss +0 -11
- package/resources/scss/src/apps/portal/home/parts/Helix.scss +1 -7
- package/resources/scss/src/apps/portal/home/parts/How.scss +0 -22
- package/resources/scss/src/apps/portal/learn/ContentView.scss +8 -0
- package/resources/scss/src/code/LivePreview.scss +1 -0
- package/src/DefaultConfig.mjs +2 -2
- package/src/Neo.mjs +5 -1
- package/src/code/LivePreview.mjs +16 -19
- package/src/component/Base.mjs +2 -2
- package/src/component/Toast.mjs +8 -8
- package/src/component/Video.mjs +22 -28
- package/src/component/wrapper/AmChart.mjs +15 -8
- package/src/main/addon/AmCharts.mjs +1 -1
- package/src/main/addon/IntersectionObserver.mjs +19 -3
- package/src/manager/DomEvent.mjs +1 -1
- package/src/worker/App.mjs +1 -1
- package/src/worker/mixin/RemoteMethodAccess.mjs +1 -3
- package/resources/data/deck/learnneo/pages/WhyNeo-Multi-Threaded.md +0 -15
package/src/manager/DomEvent.mjs
CHANGED
package/src/worker/App.mjs
CHANGED
@@ -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 {
|
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
|
-
|
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.
|