neo.mjs 6.9.11 → 6.10.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/BACKERS.md +0 -30
- package/apps/ServiceWorker.mjs +2 -2
- package/apps/learnneo/index.html +7 -2
- package/apps/learnneo/neo-config.json +1 -4
- package/apps/learnneo/view/LivePreview.mjs +171 -0
- package/apps/learnneo/view/Viewport.mjs +11 -4
- package/apps/learnneo/view/ViewportController.mjs +2 -2
- package/apps/learnneo/view/home/ContentTreeList.mjs +93 -5
- package/apps/learnneo/view/home/MainContainer.mjs +16 -16
- package/apps/learnneo/view/home/MainContainerController.mjs +5 -20
- package/apps/learnneo/view/home/MainContainerModel.mjs +3 -5
- package/apps/newwebsite/index.html +3 -0
- package/buildScripts/convertDesignTokens.mjs +173 -0
- package/examples/ServiceWorker.mjs +2 -2
- package/package.json +5 -8
- package/resources/data/deck/learnneo/p/2023-10-01T18-29-19-158Z.md +14 -16
- package/resources/data/deck/learnneo/p/2023-10-07T19-18-28-517Z.md +9 -17
- package/resources/data/deck/learnneo/p/2023-10-08T20-20-07-934Z.md +7 -5
- package/resources/data/deck/learnneo/p/2023-10-08T20-20-37-336Z.md +17 -10
- package/resources/data/deck/learnneo/p/2023-10-14T19-25-08-153Z.md +18 -22
- package/resources/data/deck/learnneo/p/2023-10-31T13-59-37-550Z.md +31 -0
- package/resources/data/deck/learnneo/p/MainThreadAddonExample.md +15 -0
- package/resources/data/deck/learnneo/p/MainThreadAddonIntro.md +46 -0
- package/resources/data/deck/learnneo/p/TestLivePreview.md +10 -0
- package/resources/data/deck/learnneo/p/stylesheet.md +22 -8
- package/resources/data/deck/learnneo/t.json +126 -56
- package/resources/data/deck/training/p/2023-01-10T02-21-54-303Z.md +1 -1
- package/resources/data/deck/training/t.json +1276 -1
- package/resources/design-tokens/json/component.json +288 -0
- package/resources/design-tokens/json/core.json +352 -0
- package/resources/design-tokens/json/semantic.json +231 -0
- package/resources/images/logos/Github-logo-black.svg +1 -0
- package/resources/images/logos/Slack-logo-black.svg +17 -0
- package/resources/scss/src/apps/learnneo/Viewport.scss +3 -0
- package/resources/scss/src/apps/learnneo/home/ContentTreeList.scss +60 -13
- package/resources/scss/src/apps/learnneo/home/ContentView.scss +11 -2
- package/resources/scss/src/apps/newwebsite/MainContainer.scss +14 -15
- package/resources/scss/src/list/Base.scss +4 -0
- package/resources/scss/theme-neo-light/Global.scss +36 -16
- package/resources/scss/theme-neo-light/button/Base.scss +46 -45
- package/resources/scss/theme-neo-light/design-tokens/Component.scss +66 -1
- package/resources/scss/theme-neo-light/design-tokens/Core.scss +66 -5
- package/resources/scss/theme-neo-light/design-tokens/Semantic.scss +64 -0
- package/resources/scss/theme-neo-light/list/Base.scss +27 -6
- package/resources/scss/theme-neo-light/tab/header/Button.scss +1 -1
- package/src/DefaultConfig.mjs +2 -2
- package/src/component/StatusBadge.mjs +194 -246
- package/src/component/Video.mjs +19 -25
- package/src/controller/Base.mjs +33 -26
- package/src/core/Base.mjs +2 -2
- package/src/data/connection/Xhr.mjs +1 -1
- package/src/form/field/TextArea.mjs +3 -3
- package/src/main/DomAccess.mjs +64 -70
- package/src/main/DomEvents.mjs +1 -1
- package/src/main/addon/HighlightJS.mjs +16 -1
- package/src/main/addon/Mwc.mjs +6 -1
- package/src/worker/Manager.mjs +8 -3
- package/examples/container/dialog/MainContainer.mjs +0 -68
- package/examples/container/dialog/MainContainerController.mjs +0 -84
- package/examples/container/dialog/app.mjs +0 -6
- package/examples/container/dialog/index.html +0 -11
- package/examples/container/dialog/neo-config.json +0 -7
- package/src/container/Dialog.mjs +0 -205
- package/src/main/addon/Dialog.mjs +0 -68
@@ -0,0 +1,46 @@
|
|
1
|
+
Neo.mjs is multi-threaded. There are app worker threads
|
2
|
+
that handle data access, application logic,
|
3
|
+
and keeping track of DOM updates. Practically all your
|
4
|
+
application logic is run in parallel in these threads.
|
5
|
+
However, anything that needs to actually reference or update
|
6
|
+
the DOM, or use the `window` object, must be done in the main
|
7
|
+
application thread.
|
8
|
+
|
9
|
+
That's the purpose of main thread addons. These are classes whose
|
10
|
+
methods can be accessed from other web workers, but are
|
11
|
+
actually executed in the main thread.
|
12
|
+
|
13
|
+
For example, what if you needed to read the browser's
|
14
|
+
URL? That information is in `window.location`.
|
15
|
+
But `window` is a main thread variable! To access that
|
16
|
+
from a web-worker our code has to say "hey main thread,
|
17
|
+
please return a specified `window` property." Neo.mjs
|
18
|
+
lets you do that via `Neo.Main.getByPath()`. For
|
19
|
+
example, the following statement logs the URL query string.
|
20
|
+
|
21
|
+
|
22
|
+
<pre data-javascript>
|
23
|
+
Neo.Main.getByPath('window.location.search')
|
24
|
+
.then(value=>console.log(value)); // Logs the search string
|
25
|
+
</pre>
|
26
|
+
|
27
|
+
`Neo.Main` has some simple methods for accessing the
|
28
|
+
main thread, but for something with a non-trivial API
|
29
|
+
you'd use a _main thread addon_.
|
30
|
+
|
31
|
+
Google Maps is a good example of this. In Neo.mjs, most
|
32
|
+
views are responsible for updating their own vdom, but
|
33
|
+
the responsibility for rendering maps and markers is handled
|
34
|
+
by Google Maps itself — we _ask_ Google Maps to do
|
35
|
+
certain things via the Google Maps API. Therefore, in Neo.mjs,
|
36
|
+
Google Maps is implemented as a main thread addon which
|
37
|
+
loads the libraries and exposes whatever methods we'll need
|
38
|
+
to run from the other Neo.mjs threads. In addition, in a
|
39
|
+
Neo.mjs application we want to use Google maps like any other
|
40
|
+
component, so Neo.mjs also provides a component wrapper. In
|
41
|
+
summary:
|
42
|
+
- The main-thread addon contains the code run in the main thread,
|
43
|
+
and exposes what methods can be run by other web-workders,
|
44
|
+
and
|
45
|
+
- The component wrapper lets you use it like any other component,
|
46
|
+
internally calling the main thread methods as needed.
|
@@ -1,9 +1,6 @@
|
|
1
|
-
###Advice
|
2
|
-
|
3
|
-
Training content is different than self-study content.
|
4
|
-
|
5
1
|
<details>
|
6
|
-
<summary>Training material</summary>
|
2
|
+
<summary>Training material advice</summary>
|
3
|
+
Training content is different than self-study content.
|
7
4
|
Training material _augments_ the lecture. The audience should be focused on what the speaker is
|
8
5
|
saying; the slides support the lecture. An important concept in writing
|
9
6
|
training material is to avoid a _wall of words_, where there are lengthy
|
@@ -12,6 +9,7 @@ with a lot of text, your audience will be reading while you are lecturing,
|
|
12
9
|
and information is lost.
|
13
10
|
</details>
|
14
11
|
|
12
|
+
|
15
13
|
# This is an h1
|
16
14
|
## This is an h2
|
17
15
|
### This is an h3
|
@@ -19,13 +17,29 @@ and information is lost.
|
|
19
17
|
|
20
18
|
<br>
|
21
19
|
|
22
|
-
|
20
|
+
To show highlighted Neo.mjs source code use
|
21
|
+
<pre>
|
22
|
+
<pre data-javascript>
|
23
|
+
// Source code goes here
|
24
|
+
</pre>
|
25
|
+
|
26
|
+
<pre data-javascript>
|
27
|
+
import Base from '../../../node_modules/neo.mjs/src/core/Base.mjs';
|
28
|
+
|
29
|
+
class Mammal extends Base {
|
30
|
+
static config = {
|
31
|
+
className: 'Simple.example.Mammal'
|
32
|
+
}
|
33
|
+
}
|
34
|
+
</pre>
|
35
|
+
|
36
|
+
For short in-line statements of code use <code> or backticks.
|
23
37
|
|
24
|
-
|
38
|
+
When definining variables avoid `var` — use `let` or `const` instead.
|
25
39
|
|
26
40
|
<br>
|
27
41
|
|
28
|
-
|
42
|
+
For expandable bullet points and lab steps use a <details> tag
|
29
43
|
<pre>
|
30
44
|
<details>
|
31
45
|
<summary>This describes the item</summary>
|
@@ -7,124 +7,188 @@
|
|
7
7
|
"name": "Why Neo.mjs? "
|
8
8
|
},
|
9
9
|
{
|
10
|
-
"id": "
|
10
|
+
"id": "GettingStarted",
|
11
11
|
"parentId": null,
|
12
12
|
"isLeaf": false,
|
13
13
|
"name": "Getting Started"
|
14
14
|
},
|
15
15
|
{
|
16
|
-
"id": "
|
17
|
-
"parentId":
|
18
|
-
"isLeaf":
|
19
|
-
"name": "
|
16
|
+
"id": "Setup",
|
17
|
+
"parentId": "GettingStarted",
|
18
|
+
"isLeaf": true,
|
19
|
+
"name": "Setup"
|
20
20
|
},
|
21
21
|
{
|
22
22
|
"id": "2023-10-14T19-25-08-153Z",
|
23
|
-
"parentId": "
|
23
|
+
"parentId": "GettingStarted",
|
24
24
|
"isLeaf": true,
|
25
|
-
"name": "
|
25
|
+
"name": "Workspaces and Applications"
|
26
26
|
},
|
27
27
|
{
|
28
|
-
"id": "
|
29
|
-
"parentId":
|
30
|
-
"isLeaf":
|
31
|
-
"name": "
|
28
|
+
"id": "DescribingTheUI",
|
29
|
+
"parentId": "GettingStarted",
|
30
|
+
"isLeaf": true,
|
31
|
+
"name": "Describing a View"
|
32
32
|
},
|
33
33
|
{
|
34
|
-
"id": "
|
35
|
-
"parentId": "
|
36
|
-
"isLeaf":
|
37
|
-
"name": "
|
34
|
+
"id": "Events",
|
35
|
+
"parentId": "GettingStarted",
|
36
|
+
"isLeaf": true,
|
37
|
+
"name": "Events"
|
38
38
|
},
|
39
39
|
{
|
40
|
-
"id": "
|
41
|
-
"parentId": "
|
40
|
+
"id": "ComponentState",
|
41
|
+
"parentId": "GettingStarted",
|
42
42
|
"isLeaf": true,
|
43
|
-
"name": "
|
43
|
+
"name": "Updating View State"
|
44
44
|
},
|
45
45
|
{
|
46
|
-
"id": "
|
47
|
-
"parentId": "
|
46
|
+
"id": "Extending",
|
47
|
+
"parentId": "GettingStarted",
|
48
48
|
"isLeaf": true,
|
49
|
-
"name": "
|
49
|
+
"name": "Extending Components"
|
50
50
|
},
|
51
51
|
{
|
52
|
-
"id": "
|
53
|
-
"parentId": "
|
52
|
+
"id": "ExtendingAddingProperties",
|
53
|
+
"parentId": "GettingStarted",
|
54
54
|
"isLeaf": true,
|
55
|
-
"name": "
|
55
|
+
"name": "Adding Properties"
|
56
56
|
},
|
57
57
|
{
|
58
|
-
"id": "
|
59
|
-
"parentId": "
|
58
|
+
"id": "ComponentModels",
|
59
|
+
"parentId": "GettingStarted",
|
60
60
|
"isLeaf": true,
|
61
|
-
"name": "
|
61
|
+
"name": "Component Models and Binding"
|
62
62
|
},
|
63
63
|
{
|
64
|
-
"id": "
|
65
|
-
"parentId": "
|
64
|
+
"id": "WhatAboutHTML",
|
65
|
+
"parentId": "GettingStarted",
|
66
66
|
"isLeaf": true,
|
67
|
-
"name": "
|
67
|
+
"name": "What about HTML tags?"
|
68
68
|
},
|
69
69
|
{
|
70
|
-
"id": "
|
71
|
-
"parentId":
|
70
|
+
"id": "Tutorials",
|
71
|
+
"parentId": null,
|
72
|
+
"isLeaf": false,
|
73
|
+
"expanded": false,
|
74
|
+
"name": "Tutorials"
|
75
|
+
},
|
76
|
+
{
|
77
|
+
"id": "RSP",
|
78
|
+
"parentId": "Tutorials",
|
72
79
|
"isLeaf": true,
|
73
|
-
"
|
80
|
+
"expanded": false,
|
81
|
+
"name": "Rock Scissors Paper"
|
74
82
|
},
|
75
83
|
{
|
76
|
-
"id": "
|
84
|
+
"id": "Earthquakes",
|
85
|
+
"parentId": "Tutorials",
|
86
|
+
"isLeaf": false,
|
87
|
+
"expanded": false,
|
88
|
+
"name": "Earthquakes"
|
89
|
+
},
|
90
|
+
{
|
91
|
+
"id": "InDepth",
|
77
92
|
"parentId": null,
|
78
93
|
"isLeaf": false,
|
94
|
+
"expanded": false,
|
95
|
+
"name": "Cookbook"
|
96
|
+
},
|
97
|
+
{
|
98
|
+
"id": "Config",
|
99
|
+
"parentId": "InDepth",
|
100
|
+
"isLeaf": false,
|
79
101
|
"name": "Config"
|
80
102
|
},
|
81
103
|
{
|
82
|
-
"id": "
|
83
|
-
"parentId":
|
104
|
+
"id": "InstanceLifecycle",
|
105
|
+
"parentId": "InDepth",
|
84
106
|
"isLeaf": false,
|
85
|
-
"name": "
|
107
|
+
"name": "Instance Lifecycle"
|
86
108
|
},
|
87
109
|
{
|
88
|
-
"id": "
|
89
|
-
"parentId":
|
110
|
+
"id": "Forms",
|
111
|
+
"parentId": "InDepth",
|
90
112
|
"isLeaf": false,
|
91
113
|
"name": "User Input (Forms)"
|
92
114
|
},
|
93
115
|
{
|
94
|
-
"id": "
|
95
|
-
"parentId":
|
116
|
+
"id": "CustomComponents",
|
117
|
+
"parentId": "InDepth",
|
96
118
|
"isLeaf": false,
|
97
|
-
"name": "
|
119
|
+
"name": "Custom Components"
|
98
120
|
},
|
99
121
|
{
|
100
|
-
"id": "
|
101
|
-
"parentId":
|
122
|
+
"id": "Tables",
|
123
|
+
"parentId": "InDepth",
|
102
124
|
"isLeaf": false,
|
103
|
-
"name": "
|
125
|
+
"name": "Tables (Stores)"
|
104
126
|
},
|
105
127
|
{
|
106
|
-
"id": "
|
107
|
-
"parentId":
|
128
|
+
"id": "InDepthComponentModels",
|
129
|
+
"parentId": "InDepth",
|
108
130
|
"isLeaf": false,
|
109
|
-
"name": "
|
131
|
+
"name": "Shared Binable Data (Component Models)"
|
110
132
|
},
|
111
133
|
{
|
112
|
-
"id": "
|
113
|
-
"parentId":
|
134
|
+
"id": "MultiWindow",
|
135
|
+
"parentId": "InDepth",
|
114
136
|
"isLeaf": false,
|
115
|
-
"name": "
|
137
|
+
"name": "Multi-Window Applicaitons"
|
116
138
|
},
|
117
139
|
{
|
118
|
-
"id": "
|
119
|
-
"parentId":
|
140
|
+
"id": "MainThreadAddons",
|
141
|
+
"parentId": "InDepth",
|
120
142
|
"isLeaf": false,
|
121
|
-
"name": "
|
143
|
+
"name": "Main Thread Addons"
|
122
144
|
},
|
123
145
|
{
|
124
|
-
"id": "
|
146
|
+
"id": "mainThreadAddonIntro",
|
147
|
+
"parentId": "MainThreadAddons",
|
148
|
+
"isLeaf": true,
|
149
|
+
"name": "Introduction"
|
150
|
+
},
|
151
|
+
{
|
152
|
+
"id": "mainThreadAddonExample",
|
153
|
+
"parentId": "MainThreadAddons",
|
154
|
+
"isLeaf": true,
|
155
|
+
"name": "Example"
|
156
|
+
},
|
157
|
+
{
|
158
|
+
"id": "Mixins",
|
159
|
+
"parentId": "InDepth",
|
160
|
+
"isLeaf": false,
|
161
|
+
"name": "Mixins"
|
162
|
+
},
|
163
|
+
{
|
164
|
+
"id": "JavaScriptClasses",
|
125
165
|
"parentId": null,
|
126
166
|
"isLeaf": false,
|
127
|
-
"name": "
|
167
|
+
"name": "JavaScript Classes"
|
168
|
+
},
|
169
|
+
{
|
170
|
+
"id": "2023-10-07T19-18-28-517Z",
|
171
|
+
"parentId": "JavaScriptClasses",
|
172
|
+
"isLeaf": true,
|
173
|
+
"name": "Classes, Properties, and Methods"
|
174
|
+
},
|
175
|
+
{
|
176
|
+
"id": "2023-10-08T20-20-07-934Z",
|
177
|
+
"parentId": "JavaScriptClasses",
|
178
|
+
"isLeaf": true,
|
179
|
+
"name": "Overriding Methods"
|
180
|
+
},
|
181
|
+
{
|
182
|
+
"id": "2023-10-08T20-20-37-336Z",
|
183
|
+
"parentId": "Class Basics",
|
184
|
+
"isLeaf": true,
|
185
|
+
"name": "Other JavaScript Class Features"
|
186
|
+
},
|
187
|
+
{
|
188
|
+
"id": "2023-10-08T21-58-25-809Z",
|
189
|
+
"parentId": "JavaScriptClasses",
|
190
|
+
"isLeaf": true,
|
191
|
+
"name": "Super"
|
128
192
|
},
|
129
193
|
{
|
130
194
|
"id": "2023-10-31T13-59-37-550Z",
|
@@ -142,6 +206,12 @@
|
|
142
206
|
"parentId": "appendix",
|
143
207
|
"name": "Stylesheet",
|
144
208
|
"isLeaf": true
|
209
|
+
},
|
210
|
+
{
|
211
|
+
"id": "TestLivePreview",
|
212
|
+
"parentId": "appendix",
|
213
|
+
"name": "Test",
|
214
|
+
"isLeaf": true
|
145
215
|
}
|
146
216
|
]
|
147
217
|
}
|
@@ -5,6 +5,6 @@
|
|
5
5
|
meeting app will have its own frame rate.)
|
6
6
|
|
7
7
|
Run the the prod version of one of the demos, like
|
8
|
-
the <a href="https://neomjs.github.io/pages/node_modules/neo.mjs/dist/production/examples/component/coronaHelix/index.html" target="">COVID-19 Helix</a> example. Note the delta-updates per second information
|
8
|
+
the <a href="https://neomjs.github.io/pages/node_modules/neo.mjs/dist/production/examples/component/coronaHelix/index.html" target="_blank">COVID-19 Helix</a> example. Note the delta-updates per second information
|
9
9
|
at the upper right. You're seeing 10,000 or 20,000 delta updates per
|
10
10
|
second as you zoom in and out and pan.
|