neo.mjs 6.18.2 → 6.19.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 (108) hide show
  1. package/README.md +28 -214
  2. package/apps/ServiceWorker.mjs +2 -2
  3. package/apps/colors/view/ViewportController.mjs +7 -3
  4. package/apps/portal/data/blog.json +13 -0
  5. package/apps/portal/view/HeaderToolbar.mjs +2 -2
  6. package/apps/portal/view/Viewport.mjs +4 -2
  7. package/apps/portal/view/ViewportController.mjs +89 -8
  8. package/apps/portal/view/blog/Container.mjs +8 -8
  9. package/apps/portal/view/blog/List.mjs +6 -6
  10. package/apps/portal/view/home/MainContainer.mjs +9 -10
  11. package/apps/portal/view/home/parts/BaseContainer.mjs +8 -1
  12. package/apps/portal/view/home/parts/Colors.mjs +4 -4
  13. package/apps/portal/view/home/parts/Helix.mjs +2 -2
  14. package/apps/portal/view/home/parts/How.mjs +3 -3
  15. package/apps/portal/view/home/parts/MainNeo.mjs +6 -7
  16. package/apps/portal/view/home/parts/References.mjs +88 -0
  17. package/apps/portal/view/learn/ContentView.mjs +3 -1
  18. package/apps/portal/view/learn/MainContainer.mjs +3 -2
  19. package/apps/portal/view/learn/MainContainerController.mjs +11 -0
  20. package/apps/portal/view/learn/PageContainer.mjs +5 -3
  21. package/apps/portal/view/services/Component.mjs +73 -0
  22. package/apps/website/data/blog.json +13 -0
  23. package/examples/ServiceWorker.mjs +2 -2
  24. package/examples/component/carousel/MainContainer.mjs +42 -33
  25. package/examples/layout/cube/MainContainer.mjs +217 -0
  26. package/examples/layout/cube/app.mjs +6 -0
  27. package/examples/layout/cube/index.html +11 -0
  28. package/examples/layout/cube/neo-config.json +6 -0
  29. package/package.json +7 -7
  30. package/resources/data/deck/learnneo/pages/2023-10-14T19-25-08-153Z.md +2 -2
  31. package/resources/data/deck/learnneo/pages/ComponentModels.md +6 -6
  32. package/resources/data/deck/learnneo/pages/ComponentsAndContainers.md +10 -10
  33. package/resources/data/deck/learnneo/pages/Config.md +6 -6
  34. package/resources/data/deck/learnneo/pages/CustomComponents.md +4 -4
  35. package/resources/data/deck/learnneo/pages/DescribingTheUI.md +4 -4
  36. package/resources/data/deck/learnneo/pages/Earthquakes-01-goals.md +32 -0
  37. package/resources/data/deck/learnneo/pages/Earthquakes-Lab-01-generate-a-workspace.md +47 -0
  38. package/resources/data/deck/learnneo/pages/Earthquakes-Lab-02-generate-the-starter-app.md +150 -0
  39. package/resources/data/deck/learnneo/pages/Earthquakes-Lab-03-debugging.md +136 -0
  40. package/resources/data/deck/learnneo/pages/Earthquakes-Lab-04-fetch-data.md +146 -0
  41. package/resources/data/deck/learnneo/pages/Earthquakes-Lab-05-refactor-the-table.md +146 -0
  42. package/resources/data/deck/learnneo/pages/Earthquakes-Lab-06-use-a-view-model.md +301 -0
  43. package/resources/data/deck/learnneo/pages/Earthquakes-Lab-07-use-the-google-maps-addon.md +175 -0
  44. package/resources/data/deck/learnneo/pages/Earthquakes-Lab-08-events.md +38 -0
  45. package/resources/data/deck/learnneo/pages/Earthquakes.md +10 -10
  46. package/resources/data/deck/learnneo/pages/Events.md +7 -7
  47. package/resources/data/deck/learnneo/pages/Extending.md +7 -7
  48. package/resources/data/deck/learnneo/pages/Glossary.md +0 -0
  49. package/resources/data/deck/learnneo/pages/GuideEvents.md +97 -19
  50. package/resources/data/deck/learnneo/pages/GuideViewModels.md +21 -21
  51. package/resources/data/deck/learnneo/pages/References.md +8 -8
  52. package/resources/data/deck/learnneo/pages/TestLivePreview.md +5 -4
  53. package/resources/data/deck/learnneo/pages/TodoList.md +9 -9
  54. package/resources/data/deck/learnneo/pages/Welcome.md +3 -3
  55. package/resources/data/deck/learnneo/pages/WhyNeo-Multi-Window.md +2 -2
  56. package/resources/data/deck/learnneo/pages/WhyNeo-Speed.md +2 -2
  57. package/resources/data/deck/learnneo/tree.json +2 -1
  58. package/resources/images/apps/portal/neo-references.png +0 -0
  59. package/resources/scss/src/apps/portal/HeaderToolbar.scss +0 -46
  60. package/resources/scss/src/apps/portal/Viewport.scss +16 -1
  61. package/resources/scss/src/apps/portal/blog/Container.scss +7 -7
  62. package/resources/scss/src/apps/portal/blog/List.scss +20 -16
  63. package/resources/scss/src/apps/portal/home/parts/BaseContainer.scss +33 -4
  64. package/resources/scss/src/apps/portal/home/parts/MainNeo.scss +4 -5
  65. package/resources/scss/src/apps/portal/home/parts/References.scss +46 -0
  66. package/resources/scss/src/apps/portal/learn/ContentTreeList.scss +20 -0
  67. package/resources/scss/src/apps/portal/learn/ContentView.scss +4 -0
  68. package/resources/scss/src/apps/portal/learn/MainContainer.scss +1 -1
  69. package/resources/scss/src/apps/portal/learn/PageContainer.scss +22 -16
  70. package/resources/scss/src/apps/portal/services/Component.scss +20 -0
  71. package/resources/scss/src/{apps/portal/learn → code}/LivePreview.scss +1 -1
  72. package/resources/scss/src/component/Carousel.scss +21 -0
  73. package/resources/scss/src/component/Helix.scss +1 -2
  74. package/resources/scss/src/examples/layout/cube/MainContainer.scss +7 -0
  75. package/resources/scss/src/layout/Cube.scss +80 -0
  76. package/resources/scss/src/tab/Container.scss +10 -10
  77. package/resources/scss/theme-neo-light/apps/portal/blog/Container.scss +3 -0
  78. package/resources/scss/theme-neo-light/form/field/Search.scss +1 -1
  79. package/resources/scss/theme-neo-light/tooltip/Base.scss +1 -1
  80. package/src/DefaultConfig.mjs +2 -2
  81. package/src/Main.mjs +15 -1
  82. package/src/Neo.mjs +14 -3
  83. package/{apps/portal/view/learn → src/code}/LivePreview.mjs +43 -27
  84. package/src/component/Base.mjs +18 -1
  85. package/src/container/Base.mjs +3 -1
  86. package/src/dialog/Base.mjs +1 -2
  87. package/src/layout/Base.mjs +43 -6
  88. package/src/layout/Card.mjs +21 -59
  89. package/src/layout/Cube.mjs +428 -0
  90. package/src/layout/Fit.mjs +9 -38
  91. package/src/layout/Flexbox.mjs +16 -17
  92. package/src/layout/Form.mjs +13 -70
  93. package/src/layout/Grid.mjs +6 -18
  94. package/src/main/addon/ResizeObserver.mjs +18 -2
  95. package/src/main/mixin/DeltaUpdates.mjs +16 -3
  96. package/src/util/Array.mjs +36 -0
  97. package/src/vdom/Helper.mjs +328 -445
  98. package/src/vdom/VNode.mjs +12 -1
  99. package/test/siesta/siesta.js +16 -1
  100. package/test/siesta/tests/VdomCalendar.mjs +2111 -37
  101. package/test/siesta/tests/VdomHelper.mjs +283 -47
  102. package/test/siesta/tests/vdom/Advanced.mjs +367 -0
  103. package/test/siesta/tests/vdom/layout/Cube.mjs +189 -0
  104. package/test/siesta/tests/vdom/table/Container.mjs +133 -0
  105. package/apps/portal/view/home/parts/HelloWorld.mjs +0 -83
  106. package/apps/portal/view/home/preview/PageCodeContainer.mjs +0 -55
  107. package/resources/scss/src/apps/portal/home/preview/PageCodeContainer.scss +0 -115
  108. package/resources/scss/theme-neo-light/apps/portal/learn/ContentTreeList.scss +0 -23
@@ -2,8 +2,8 @@ As you read in the <a href="#/learn/Events">Getting Started > Events</a> topic,
2
2
 
3
3
 
4
4
  <pre data-neo>
5
- import Container from '../../../../src/container/Base.mjs';
6
- import TextField from '../../../../src/form/field/Text.mjs';
5
+ import Container from '../container/Base.mjs';
6
+ import TextField from '../form/field/Text.mjs';
7
7
 
8
8
  class MainView extends Container {
9
9
  static config = {
@@ -36,8 +36,8 @@ The event listener function can be coded in-line. Normally you want event handle
36
36
  controller, but for very simple situation it can be convenient to use this syntax.
37
37
 
38
38
  <pre data-neo>
39
- import Container from '../../../../src/container/Base.mjs';
40
- import TextField from '../../../../src/form/field/Text.mjs';
39
+ import Container from '../container/Base.mjs';
40
+ import TextField from '../form/field/Text.mjs';
41
41
 
42
42
  class MainView extends Container {
43
43
  static config = {
@@ -63,8 +63,8 @@ in-line syntax you saw above, using the `up.` syntax might be convenient for sim
63
63
  or when you simply haven't gotten around to defining a view's controller.
64
64
 
65
65
  <pre data-neo>
66
- import Container from '../../../../src/container/Base.mjs';
67
- import TextField from '../../../../src/form/field/Text.mjs';
66
+ import Container from '../container/Base.mjs';
67
+ import TextField from '../form/field/Text.mjs';
68
68
 
69
69
  class MainView extends Container {
70
70
  static config = {
@@ -93,7 +93,7 @@ Any view class can specify a controller &mdash; wWhen the view is created a cont
93
93
  also created.
94
94
 
95
95
  <pre data-neo>
96
- import Controller from '../../../../src/controller/Component.mjs';
96
+ import Controller from '../controller/Component.mjs';
97
97
 
98
98
  class MainViewController extends Controller {
99
99
  static config = {
@@ -106,8 +106,8 @@ class MainViewController extends Controller {
106
106
  Neo.setupClass(MainViewController);
107
107
 
108
108
 
109
- import Container from '../../../../src/container/Base.mjs';
110
- import TextField from '../../../../src/form/field/Text.mjs';
109
+ import Container from '../container/Base.mjs';
110
+ import TextField from '../form/field/Text.mjs';
111
111
 
112
112
  class MainView extends Container {
113
113
  static config = {
@@ -132,12 +132,12 @@ Neo.setupClass(MainView);
132
132
  ## Adding listeners procedurally
133
133
 
134
134
  Event listeners are normally specified declaratively, via the `listeners: {}` config. But occasionally you need to add
135
- a listener proccedurally.
135
+ a listener procedurally.
136
136
 
137
- Any obversable class has an `addListener` method, along with an easier-to-type version called `on`.
137
+ Any observable class has an `addListener` method, along with an easier-to-type version called `on`.
138
138
 
139
139
  <pre data-neo>
140
- import Controller from '../../../../src/controller/Component.mjs';
140
+ import Controller from '../controller/Component.mjs';
141
141
 
142
142
  class MainViewController extends Controller {
143
143
  static config = {
@@ -153,8 +153,8 @@ class MainViewController extends Controller {
153
153
  Neo.setupClass(MainViewController);
154
154
 
155
155
 
156
- import Container from '../../../../src/container/Base.mjs';
157
- import TextField from '../../../../src/form/field/Text.mjs';
156
+ import Container from '../container/Base.mjs';
157
+ import TextField from '../form/field/Text.mjs';
158
158
 
159
159
  class MainView extends Container {
160
160
  static config = {
@@ -179,7 +179,7 @@ Neo.setupClass(MainView);
179
179
  The method specified in `on()` doesn't have to be an arrow function; you can use a controller function.
180
180
 
181
181
  <pre data-neo>
182
- import Controller from '../../../../src/controller/Component.mjs';
182
+ import Controller from '../controller/Component.mjs';
183
183
 
184
184
  class MainViewController extends Controller {
185
185
  static config = {
@@ -198,8 +198,8 @@ class MainViewController extends Controller {
198
198
  Neo.setupClass(MainViewController);
199
199
 
200
200
 
201
- import Container from '../../../../src/container/Base.mjs';
202
- import TextField from '../../../../src/form/field/Text.mjs';
201
+ import Container from '../container/Base.mjs';
202
+ import TextField from '../form/field/Text.mjs';
203
203
 
204
204
  class MainView extends Container {
205
205
  static config = {
@@ -220,7 +220,6 @@ Neo.setupClass(MainView);
220
220
  </pre>
221
221
 
222
222
 
223
-
224
223
  ## Events versus binding
225
224
 
226
225
  Events and binding are similar concepts &mdash; both are a way to detect, and react to, some kind of action or change.
@@ -232,6 +231,7 @@ relating to changes to the store. The event handler if a function run when the e
232
231
  A binding detects a changed view model value, and assigns it to a property.
233
232
 
234
233
 
234
+
235
235
  ### When to use an event
236
236
 
237
237
  Events and event handlers are used when you need to run non-trivial logic in response to the event. For example, you
@@ -246,9 +246,87 @@ like a button click or component focus.
246
246
  A binding is a way to keep properties in sync with values in the view model hierarchy. For example, button text,
247
247
  field values, or store properties, can simultaneously reflect the same view model property. That's pretty handy,
248
248
  but keep in mind that a class can define a property as a _lifecycle property_. That means that updating a property
249
- can may result in complex logic being triggered. Furthermore, a _two way binding_ meansx
249
+ can may result in complex logic being triggered. Furthermore, a _two way binding_ means a change to a property
250
+ will automatically be reflected in the view model.
251
+
252
+ ### A simple comparison
253
+
254
+ To contrast syntax, and to illustrate the simplicity of a binding, let's look at two exmaples of updating a component
255
+ to reflect the value of a text field. THe first example uses events; the second uses bindings.
256
+
257
+ <pre data-neo>
258
+ import Container from '../container/Base.mjs';
259
+ import TextField from '../form/field/Text.mjs';
260
+ import Component from '../component/Base.mjs';
261
+
262
+ class MainView extends Container {
263
+ static config = {
264
+ className: 'Example.view.MainView',
265
+ layout : {ntype:'vbox', align:'start'},
266
+
267
+ items: [{
268
+ module : TextField,
269
+ labelText: 'Text',
270
+ reference: 'textFieldOne',
271
+ value: 'Hello',
272
+ listeners: {
273
+ change : 'up.onTextChange'
274
+ }
275
+ }, {
276
+ module : TextField,
277
+ labelText: 'Text',
278
+ reference: 'textFieldTwo',
279
+ value: 'world!',
280
+ listeners: {
281
+ change : 'up.onTextChange'
282
+ }
283
+ }, {
284
+ module: Component,
285
+ reference: 'foo',
286
+ }]
287
+ }
288
+ onTextChange(data){
289
+ this.getReference('foo').html = `${this.getReference('textFieldOne').value} ${this.getReference('textFieldTwo').value}`
290
+ }
291
+ }
292
+ Neo.setupClass(MainView);
293
+ </pre>
250
294
 
295
+ <pre data-neo>
296
+ import Container from '../container/Base.mjs';
297
+ import TextField from '../form/field/Text.mjs';
298
+ import Component from '../component/Base.mjs';
251
299
 
300
+ class MainView extends Container {
301
+ static config = {
302
+ className: 'Example.view.MainView',
303
+ model: {
304
+ data: {
305
+ foo: 'Hello',
306
+ bar: 'world!'
307
+ }
308
+ },
309
+ layout : {ntype:'vbox', align:'start'},
310
+
311
+ items: [{
312
+ module : TextField,
313
+ labelText: 'Text',
314
+ bind: {value: {twoWay: true, value: data => data.foo}}
315
+ }, {
316
+ module : TextField,
317
+ labelText: 'Text',
318
+ bind: {value: {twoWay: true, value: data => data.bar}}
319
+ }, {
320
+ module: Component,
321
+ bind: {html: data => `${data.foo} ${data.bar}`}
322
+ }]
323
+ }
324
+ onTextChange(data){
325
+ this.getReference('foo').html = data.value;
326
+ }
327
+ }
328
+ Neo.setupClass(MainView);
329
+ </pre>
252
330
 
253
331
  ##
254
332
 
@@ -16,9 +16,9 @@ Since we also have Data Stores (tabular data), we chose to use the name VM to av
16
16
  ## Inline Models
17
17
  ### Direct Bindings
18
18
  <pre data-neo>
19
- import Button from '../../../../src/button/Base.mjs';
20
- import Container from '../../../../src/container/Base.mjs';
21
- import Label from '../../../../src/component/Label.mjs';
19
+ import Button from '../button/Base.mjs';
20
+ import Container from '../container/Base.mjs';
21
+ import Label from '../component/Label.mjs';
22
22
 
23
23
  class MainView extends Container {
24
24
  static config = {
@@ -64,9 +64,9 @@ We can easily bind 1:1 to specific data props using the following syntax:</br>
64
64
 
65
65
  ### Bindings with multiple data props
66
66
  <pre data-neo>
67
- import Button from '../../../../src/button/Base.mjs';
68
- import Container from '../../../../src/container/Base.mjs';
69
- import Label from '../../../../src/component/Label.mjs';
67
+ import Button from '../button/Base.mjs';
68
+ import Container from '../container/Base.mjs';
69
+ import Label from '../component/Label.mjs';
70
70
 
71
71
  class MainView extends Container {
72
72
  static config = {
@@ -131,9 +131,9 @@ data.component equals to the Button instance itself. Since the Button instance d
131
131
 
132
132
  ### Nested Inline Models
133
133
  <pre data-neo>
134
- import Button from '../../../../src/button/Base.mjs';
135
- import Container from '../../../../src/container/Base.mjs';
136
- import Label from '../../../../src/component/Label.mjs';
134
+ import Button from '../button/Base.mjs';
135
+ import Container from '../container/Base.mjs';
136
+ import Label from '../component/Label.mjs';
137
137
 
138
138
  class MainView extends Container {
139
139
  static config = {
@@ -206,9 +206,9 @@ Hint: Modify the example code (Button handler) to try it out right away!
206
206
 
207
207
  ### Nested Data Properties
208
208
  <pre data-neo>
209
- import Button from '../../../../src/button/Base.mjs';
210
- import Container from '../../../../src/container/Base.mjs';
211
- import Label from '../../../../src/component/Label.mjs';
209
+ import Button from '../button/Base.mjs';
210
+ import Container from '../container/Base.mjs';
211
+ import Label from '../component/Label.mjs';
212
212
 
213
213
  class MainView extends Container {
214
214
  static config = {
@@ -265,11 +265,11 @@ Hint: This will not override left out nested data props (lastname in this case).
265
265
 
266
266
  ### Dialog connecting to a Container
267
267
  <pre data-neo>
268
- import Controller from '../../../../src/controller/Component.mjs';
269
- import Dialog from '../../../../src/dialog/Base.mjs';
270
- import Panel from '../../../../src/container/Panel.mjs';
271
- import TextField from '../../../../src/form/field/Text.mjs';
272
- import Viewport from '../../../../src/container/Viewport.mjs';
268
+ import Controller from '../controller/Component.mjs';
269
+ import Dialog from '../dialog/Base.mjs';
270
+ import Panel from '../container/Panel.mjs';
271
+ import TextField from '../form/field/Text.mjs';
272
+ import Viewport from '../container/Viewport.mjs';
273
273
 
274
274
  class EditUserDialogController extends Controller {
275
275
  static config = {
@@ -391,10 +391,10 @@ When your models contain many data props or need custom logic, you can easily mo
391
391
 
392
392
  ### Direct Bindings
393
393
  <pre data-neo>
394
- import Button from '../../../../src/button/Base.mjs';
395
- import Container from '../../../../src/container/Base.mjs';
396
- import Label from '../../../../src/component/Label.mjs';
397
- import ViewModel from '../../../../src/model/Component.mjs';
394
+ import Button from '../button/Base.mjs';
395
+ import Container from '../container/Base.mjs';
396
+ import Label from '../component/Label.mjs';
397
+ import ViewModel from '../model/Component.mjs';
398
398
 
399
399
  class MainViewModel extends ViewModel {
400
400
  static config = {
@@ -11,9 +11,9 @@ Here's an example with one button. Clicking on the button will disable it.
11
11
  As you can see, the handler uses the component reference pass in via `data.component`.
12
12
 
13
13
  <pre data-neo>
14
- import Button from '../../../../src/button/Base.mjs';
15
- import Container from '../../../../src/container/Base.mjs';
16
- import Controller from '../../../../src/controller/Component.mjs';
14
+ import Button from '../button/Base.mjs';
15
+ import Container from '../container/Base.mjs';
16
+ import Controller from '../controller/Component.mjs';
17
17
 
18
18
  class MainViewController extends Controller {
19
19
  static config = {
@@ -48,9 +48,9 @@ you tag the component you need with a `reference` config, then use `getReference
48
48
  the controller.
49
49
 
50
50
  <pre data-neo>
51
- import Button from '../../../../src/button/Base.mjs';
52
- import Container from '../../../../src/container/Base.mjs';
53
- import Controller from '../../../../src/controller/Component.mjs';
51
+ import Button from '../button/Base.mjs';
52
+ import Container from '../container/Base.mjs';
53
+ import Controller from '../controller/Component.mjs';
54
54
 
55
55
  class MainViewController extends Controller {
56
56
  static config = {
@@ -103,8 +103,8 @@ The following example gets a reference to the _Learn_ button at the top of this
103
103
  Again &mdash; that use of `Neo.findFirst()` might be handy when debugging, but it should never be used in app logic.
104
104
 
105
105
  <pre data-neo>
106
- import Button from '../../../../src/button/Base.mjs';
107
- import Container from '../../../../src/container/Base.mjs';
106
+ import Button from '../button/Base.mjs';
107
+ import Container from '../container/Base.mjs';
108
108
 
109
109
  class MainView extends Container {
110
110
  static config = {
@@ -4,15 +4,16 @@ To code a live preview, enclose the code in a `pre` tag with the `data-neo` attr
4
4
 
5
5
  Imports are relative to the portal app running within the framework. That means
6
6
  Neo.mjs imports should be coded to go up four levels, then look into the `src`
7
- directory. For example, to import _container_, use `import Base from '../../../../src/container/Base.mjs`
7
+ directory. For example, to import _container_, use `import Base from '../container/Base.mjs`
8
8
 
9
9
  You can define as many classes you need, such as component models and controllers, but the the _last_
10
10
  class being defined is assumed to be the view being rendered. In other words, if the final class definition is a component, it's rendered.
11
11
 
12
12
  <pre data-neo>
13
- import Base from '../../../../src/container/Base.mjs';
14
- import Button from '../../../../src/button/Base.mjs';
15
- import Split from '../../../../src/button/Split.mjs';
13
+ import Base from '../container/Base.mjs';
14
+ import Button from '../button/Base.mjs';
15
+ import Split from '../button/Split.mjs';
16
+
16
17
  class Bar extends Base {
17
18
  static config = {
18
19
  ntype: 'demoFoo',
@@ -4,9 +4,9 @@ In case you did not work with neo yet, but come from a more HTML driven ecosyste
4
4
  you could achieve the task in a similar way.
5
5
 
6
6
  <pre data-neo>
7
- import Component from '../../../../src/component/Base.mjs';
8
- import NeoArray from '../../../../src/util/Array.mjs';
9
- import VdomUtil from '../../../../src/util/VDom.mjs';
7
+ import Component from '../component/Base.mjs';
8
+ import NeoArray from '../util/Array.mjs';
9
+ import VdomUtil from '../util/VDom.mjs';
10
10
 
11
11
  class MainComponent extends Component {
12
12
  static config = {
@@ -117,12 +117,12 @@ Neo.setupClass(MainComponent);
117
117
  content
118
118
 
119
119
  <pre data-neo>
120
- import Container from '../../../../src/container/Base.mjs';
121
- import List from '../../../../src/list/Base.mjs';
122
- import Model from '../../../../src/data/Model.mjs';
123
- import Store from '../../../../src/data/Store.mjs';
124
- import TextField from '../../../../src/form/field/Text.mjs';
125
- import Toolbar from '../../../../src/toolbar/Base.mjs';
120
+ import Container from '../container/Base.mjs';
121
+ import List from '../list/Base.mjs';
122
+ import Model from '../data/Model.mjs';
123
+ import Store from '../data/Store.mjs';
124
+ import TextField from '../form/field/Text.mjs';
125
+ import Toolbar from '../toolbar/Base.mjs';
126
126
 
127
127
  class TodoListModel extends Model {
128
128
  static config = {
@@ -50,8 +50,8 @@ icon on the right <span class="far fa-xs fa-window-maximize"></span>. This web
50
50
  and the ability to launch browser windows &mdash; all integrated within a single app &mdash; is a unique feature of Neo.mjs!
51
51
 
52
52
  <pre data-neo>
53
- import Button from '../../../../src/button/Base.mjs';
54
- import Container from '../../../../src/container/Base.mjs';
53
+ import Button from '../button/Base.mjs';
54
+ import Container from '../container/Base.mjs';
55
55
 
56
56
  class MainView extends Container {
57
57
  static config = {
@@ -65,4 +65,4 @@ class MainView extends Container {
65
65
  }
66
66
 
67
67
  Neo.setupClass(MainView);
68
- </pre>
68
+ </pre>
@@ -15,8 +15,8 @@ running the code. Even though it's running in a new window, it's still part of t
15
15
  seamlessly share events, data, etc. &mdash; the code doesn't care that some code is running in a
16
16
  separate window.
17
17
  <pre data-neo>
18
- import Button from '../../../../src/button/Base.mjs';
19
- import Container from '../../../../src/container/Base.mjs';
18
+ import Button from '../button/Base.mjs';
19
+ import Container from '../container/Base.mjs';
20
20
 
21
21
  class MainView extends Container {
22
22
  static config = {
@@ -21,8 +21,8 @@ If you move quickly, you might reach 20,000 or 30,000 delta updates per second.
21
21
  second &mdash; but we've never actually hit the limit.
22
22
 
23
23
  <pre data-neo>
24
- import Base from '../../../../src/container/Base.mjs';
25
- import Helix from '../../../../src/component/Helix.mjs';
24
+ import Base from '../container/Base.mjs';
25
+ import Helix from '../component/Helix.mjs';
26
26
  class Foo extends Base {
27
27
  static config = {
28
28
  className: 'Foo',
@@ -18,7 +18,8 @@
18
18
  {"name": "Shared Bindable Data", "parentId": "GettingStarted", "isLeaf": true, "id": "ComponentModels"},
19
19
  {"name": "Tutorials", "parentId": null, "isLeaf": false, "expanded": false, "id": "Tutorials", "collapsed": true},
20
20
  {"name": "Rock Scissors Paper", "parentId": "Tutorials", "isLeaf": true, "expanded": false, "id": "RSP", "hidden": true},
21
- {"name": "Earthquakes", "parentId": "Tutorials", "isLeaf": true, "expanded": false, "id": "Earthquakes"},
21
+ {"name": "Earthquakes", "parentId": "Tutorials", "isLeaf": true, "expanded": false, "id": "Earthquakes", "collapsed": true},
22
+
22
23
  {"name": "Todo List", "parentId": "Tutorials", "isLeaf": true, "expanded": false, "id": "TodoList"},
23
24
  {"name": "Guides", "parentId": null, "isLeaf": false, "expanded": false, "id": "InDepth", "collapsed": true},
24
25
  {"name": "Config", "parentId": "InDepth", "isLeaf": false, "id": "Config"},
@@ -82,52 +82,6 @@
82
82
  }
83
83
  }
84
84
 
85
- .hello-world {
86
- animation-timeline: view(block 100% -500%);
87
-
88
- animation-name: appear-animation;
89
- animation-fill-mode: both;
90
- animation-duration: 1ms; /* Firefox requires this to apply the animation */
91
- animation-timing-function: linear;
92
- }
93
-
94
- @keyframes appear-animation {
95
- 0% {
96
- transform: translateX(-400%);
97
- opacity : 0;
98
- }
99
- 90% {
100
- opacity: .3;
101
- }
102
- 100% {
103
- transform: translateX(0);
104
- opacity : 1;
105
- }
106
- }
107
-
108
- .cool-stuff {
109
- animation-timeline : view(block 100% -500%);
110
- animation-name : appear-cool-stuff;
111
- animation-fill-mode : both;
112
- animation-duration : 1ms; /* Firefox requires this to apply the animation */
113
- animation-timing-function: linear;
114
- }
115
-
116
- @keyframes appear-cool-stuff {
117
- 0% {
118
- transform: translateX(400%);
119
- opacity : 0;
120
- }
121
- 90% {
122
- opacity: .3;
123
- }
124
- 100% {
125
- transform: translateX(0);
126
- opacity : 1;
127
- }
128
- }
129
-
130
-
131
85
  //.page {
132
86
  // scroll-timeline: --page block;
133
87
  //}
@@ -1,3 +1,18 @@
1
- .learnneo-viewport {
1
+ .neo-viewport {
2
+ .neo-layout-cube {
3
+ &.neo-animate {
4
+ .neo-box {
5
+ transition: transform 800ms ease-in-out;
6
+ }
7
+ }
2
8
 
9
+ .neo-face {
10
+ opacity: 0.8;
11
+ transition: opacity 50ms ease-out;
12
+ }
13
+
14
+ .neo-plane {
15
+ transform: translateZ(0px);
16
+ }
17
+ }
3
18
  }
@@ -1,18 +1,18 @@
1
- .website-blog-container {
2
- .website-blog-searchfield {
3
- transition: margin var(--website-transition-duration) ease-out;
1
+ .portal-blog-container {
2
+ .portal-blog-searchfield {
3
+ transition: margin var(--portal-transition-duration) ease-out;
4
4
  width : 240px;
5
5
 
6
6
  @media (max-height: 400px), (max-width: 600px) {
7
- margin: 5px;
7
+ margin: 5px auto;
8
8
  }
9
9
 
10
10
  @media (min-height: 401px) and (min-width: 601px) {
11
- margin: 10px;
11
+ margin: 10px auto;
12
12
  }
13
13
  }
14
14
 
15
- .website-blog-toolbar {
16
- background-color: var(--website-blog-toolbar-background-color);
15
+ .portal-blog-toolbar {
16
+ background-color: var(--portal-blog-toolbar-background-color);
17
17
  }
18
18
  }
@@ -1,15 +1,17 @@
1
- .website-blog-list.neo-list {
2
- transition: padding var(--website-transition-duration) ease-out;
1
+ .portal-blog-list.neo-list {
2
+ transition: padding var(--portal-transition-duration) ease-out;
3
3
 
4
4
  .neo-list-item {
5
- cursor : default;
6
- display : flex;
7
- max-width : 800px;
8
- overflow : hidden;
9
- padding : 0;
10
- transition : height var(--website-transition-duration) ease-out, margin-bottom var(--website-transition-duration) ease-out;
11
- white-space: normal;
12
- width : 100%;
5
+ cursor : default;
6
+ display : flex;
7
+ margin-left : auto;
8
+ margin-right: auto;
9
+ max-width : 800px;
10
+ overflow : hidden;
11
+ padding : 0;
12
+ transition : height var(--portal-transition-duration) ease-out, margin-bottom var(--portal-transition-duration) ease-out;
13
+ white-space : normal;
14
+ width : 100%;
13
15
 
14
16
  .content {
15
17
  flex: 1;
@@ -32,7 +34,7 @@
32
34
  display : inline-block;
33
35
  margin-left: 10px;
34
36
  text-shadow: 1px 1px 1px #000, 1px 1px 1px #fff;
35
- transition : font-size var(--website-transition-duration) ease-out;
37
+ transition : font-size var(--portal-transition-duration) ease-out;
36
38
  }
37
39
 
38
40
  .neo-full-size {
@@ -41,13 +43,13 @@
41
43
  }
42
44
 
43
45
  .neo-inner-details {
44
- transition: line-height var(--website-transition-duration) ease-out;
46
+ transition: line-height var(--portal-transition-duration) ease-out;
45
47
  }
46
48
 
47
49
  .neo-item-bottom-position {
48
50
  bottom : 0;
49
51
  left : 0;
50
- transition: margin var(--website-transition-duration) ease-out;
52
+ transition: margin var(--portal-transition-duration) ease-out;
51
53
  }
52
54
 
53
55
  .neo-item-top-position {
@@ -55,11 +57,13 @@
55
57
  right : 0;
56
58
  text-align : end;
57
59
  text-shadow: 1px 1px 1px #000, 1px 1px 1px #fff;
58
- transition : font-size var(--website-transition-duration) ease-out, margin var(--website-transition-duration) ease-out;
60
+ transition : font-size var(--portal-transition-duration) ease-out, margin var(--portal-transition-duration) ease-out;
59
61
  }
60
62
 
61
63
  .neo-relative {
64
+ height : 100%;
62
65
  position: relative;
66
+ width : 100%;
63
67
  }
64
68
 
65
69
  .neo-title {
@@ -78,13 +82,13 @@
78
82
  .neo-top-20 {
79
83
  align-items: center;
80
84
  display : flex;
81
- transition : margin var(--website-transition-duration) ease-out;
85
+ transition : margin var(--portal-transition-duration) ease-out;
82
86
  }
83
87
 
84
88
  .neo-user-image {
85
89
  border-radius: 50%;
86
90
  display : inline-block;
87
- transition : height var(--website-transition-duration) ease-out, width var(--website-transition-duration) ease-out;
91
+ transition : height var(--portal-transition-duration) ease-out, width var(--portal-transition-duration) ease-out;
88
92
  }
89
93
 
90
94
  .preview-image {