neo.mjs 7.4.0 → 7.5.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.
@@ -20,9 +20,9 @@ class ServiceWorker extends ServiceBase {
20
20
  */
21
21
  singleton: true,
22
22
  /**
23
- * @member {String} version='7.4.0'
23
+ * @member {String} version='7.5.0'
24
24
  */
25
- version: '7.4.0'
25
+ version: '7.5.0'
26
26
  }
27
27
 
28
28
  /**
@@ -16,7 +16,7 @@
16
16
  "@type": "Organization",
17
17
  "name": "Neo.mjs"
18
18
  },
19
- "datePublished": "2024-09-15",
19
+ "datePublished": "2024-09-16",
20
20
  "publisher": {
21
21
  "@type": "Organization",
22
22
  "name": "Neo.mjs"
@@ -229,7 +229,13 @@ class List extends BaseList {
229
229
  needsUpdate = true;
230
230
 
231
231
  node.style = {
232
- backgroundImage: `url('${imageBasePath}/blog/${record.image}'), linear-gradient(#777, #333)`
232
+ backgroundImage: [
233
+ `url('${imageBasePath}/blog/${record.image}'),`,
234
+ 'linear-gradient(',
235
+ 'var(--portal-blog-list-gradient-start),',
236
+ 'var(--portal-blog-list-gradient-end)',
237
+ ')'
238
+ ].join('')
233
239
  }
234
240
  }
235
241
  }
@@ -223,7 +223,13 @@ class List extends BaseList {
223
223
  needsUpdate = true;
224
224
 
225
225
  node.style = {
226
- backgroundImage: `url('${imageBasePath}/${record.image}'), linear-gradient(#777, #333)`
226
+ backgroundImage: [
227
+ `url('${imageBasePath}/${record.image}'),`,
228
+ 'linear-gradient(',
229
+ 'var(--portal-examples-list-gradient-start),',
230
+ 'var(--portal-examples-list-gradient-end)',
231
+ ')'
232
+ ].join('')
227
233
  }
228
234
  }
229
235
  }
@@ -111,7 +111,7 @@ class FooterContainer extends Container {
111
111
  }, {
112
112
  module: Component,
113
113
  cls : ['neo-version'],
114
- html : 'v7.4.0'
114
+ html : 'v7.5.0'
115
115
  }]
116
116
  }],
117
117
  /**
@@ -20,9 +20,9 @@ class ServiceWorker extends ServiceBase {
20
20
  */
21
21
  singleton: true,
22
22
  /**
23
- * @member {String} version='7.4.0'
23
+ * @member {String} version='7.5.0'
24
24
  */
25
- version: '7.4.0'
25
+ version: '7.5.0'
26
26
  }
27
27
 
28
28
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo.mjs",
3
- "version": "7.4.0",
3
+ "version": "7.5.0",
4
4
  "description": "The webworkers driven UI framework",
5
5
  "type": "module",
6
6
  "repository": {
@@ -1,4 +1,12 @@
1
+ @property --portal-blog-list-gradient-start {
2
+ syntax : "<color>";
3
+ initial-value: #777;
4
+ inherits : false;
5
+ }
6
+
1
7
  .portal-blog-list.neo-list {
8
+ --portal-blog-list-gradient-end: #333;
9
+
2
10
  transition: padding var(--portal-transition-duration) ease-out;
3
11
 
4
12
  .neo-list-item {
@@ -13,6 +21,20 @@
13
21
  white-space : normal;
14
22
  width : 100%;
15
23
 
24
+ &:focus {
25
+ outline: none;
26
+
27
+ .preview-image {
28
+ --portal-blog-list-gradient-start: darkgreen;
29
+ }
30
+ }
31
+
32
+ &:hover {
33
+ .preview-image {
34
+ --portal-blog-list-gradient-start: #3E63DD;
35
+ }
36
+ }
37
+
16
38
  .content {
17
39
  flex: 1;
18
40
  }
@@ -75,7 +97,7 @@
75
97
  transition : color 250ms ease-out;
76
98
 
77
99
  &:hover {
78
- color: #5d83a7
100
+ color: #8BA6FF
79
101
  }
80
102
  }
81
103
 
@@ -96,6 +118,7 @@
96
118
  background-position : 50% 50%;
97
119
  background-size : cover;
98
120
  height : 100%;
121
+ transition : --portal-blog-list-gradient-start var(--portal-transition-duration) ease-out;
99
122
  }
100
123
  }
101
124
 
@@ -1,4 +1,12 @@
1
+ @property --portal-examples-list-gradient-start {
2
+ syntax : "<color>";
3
+ initial-value: #777;
4
+ inherits : false;
5
+ }
6
+
1
7
  .portal-examples-list.neo-list {
8
+ --portal-examples-list-gradient-end: #333;
9
+
2
10
  transition: padding var(--portal-transition-duration) ease-out;
3
11
 
4
12
  .neo-list-item {
@@ -12,6 +20,20 @@
12
20
  white-space : normal;
13
21
  width : 100%;
14
22
 
23
+ &:focus {
24
+ outline: none;
25
+
26
+ .preview-image {
27
+ --portal-examples-list-gradient-start: darkgreen;
28
+ }
29
+ }
30
+
31
+ &:hover {
32
+ .preview-image {
33
+ --portal-examples-list-gradient-start: #3E63DD;
34
+ }
35
+ }
36
+
15
37
  .content {
16
38
  flex: 1;
17
39
  }
@@ -29,8 +51,12 @@
29
51
  color : #ddd;
30
52
  text-decoration : none;
31
53
  transition-duration : var(--portal-transition-duration);
32
- transition-property : font-size, height, width;
54
+ transition-property : color, font-size, height, width;
33
55
  transition-timing-function: ease-out;
56
+
57
+ &:hover {
58
+ color: #8BA6FF
59
+ }
34
60
  }
35
61
 
36
62
  .neo-inner-content {
@@ -72,14 +98,16 @@
72
98
 
73
99
  .neo-title {
74
100
  color : #fff;
101
+ display : flex;
75
102
  font-weight : 600;
76
103
  line-height : 1;
77
104
  text-decoration: none;
78
105
  text-shadow : 1px 1px 1px #000, 1px 1px 1px #fff;
79
106
  transition : color 250ms ease-out;
107
+ width : fit-content;
80
108
 
81
109
  &:hover {
82
- color: #5d83a7
110
+ color: #8BA6FF
83
111
  }
84
112
  }
85
113
 
@@ -93,6 +121,7 @@
93
121
  background-blend-mode: overlay;
94
122
  background-size : cover;
95
123
  height : 100%;
124
+ transition : --portal-examples-list-gradient-start var(--portal-transition-duration) ease-out;
96
125
  }
97
126
  }
98
127
 
@@ -0,0 +1,3 @@
1
+ :root .neo-theme-neo-light { // .neo-viewport
2
+ --portal-transition-duration: 300ms;
3
+ }
@@ -262,12 +262,12 @@ const DefaultConfig = {
262
262
  useVdomWorker: true,
263
263
  /**
264
264
  * buildScripts/injectPackageVersion.mjs will update this value
265
- * @default '7.4.0'
265
+ * @default '7.5.0'
266
266
  * @memberOf! module:Neo
267
267
  * @name config.version
268
268
  * @type String
269
269
  */
270
- version: '7.4.0'
270
+ version: '7.5.0'
271
271
  };
272
272
 
273
273
  Object.assign(DefaultConfig, {
@@ -20,7 +20,7 @@ class TestClass extends core.Base {
20
20
  }
21
21
  }
22
22
 
23
- Neo.applyClassConfig(TestClass);
23
+ TestClass = Neo.setupClass(TestClass);
24
24
 
25
25
  StartTest(t => {
26
26
  t.it('Default class fields inside constructors', t => {
@@ -73,7 +73,7 @@ StartTest(t => {
73
73
  }
74
74
  }
75
75
 
76
- Neo.applyClassConfig(NeoCtorTest);
76
+ Neo.setupClass(NeoCtorTest);
77
77
 
78
78
  Neo.create(NeoCtorTest);
79
79
 
@@ -243,9 +243,10 @@ StartTest(t => {
243
243
  fieldB = 1;
244
244
 
245
245
  static config = {
246
- configA_: 0,
247
- configB_: 0,
248
- configC_: 0
246
+ className: 'AdvancedClass',
247
+ configA_ : 0,
248
+ configB_ : 0,
249
+ configC_ : 0
249
250
  }
250
251
 
251
252
  afterSetConfigA(value, oldValue) {
@@ -280,7 +281,7 @@ StartTest(t => {
280
281
  }
281
282
  }
282
283
 
283
- Neo.applyClassConfig(AdvancedClass);
284
+ AdvancedClass = Neo.setupClass(AdvancedClass);
284
285
 
285
286
  let instance = Neo.create(AdvancedClass);
286
287
 
@@ -46,7 +46,7 @@ StartTest(t => {
46
46
  }
47
47
  }
48
48
 
49
- Neo.applyClassConfig(TestClass);
49
+ Neo.setupClass(TestClass);
50
50
 
51
51
  instance = Neo.create(TestClass);
52
52