neo.mjs 6.18.2 → 6.18.3
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/apps/ServiceWorker.mjs +2 -2
- package/apps/portal/view/home/MainContainer.mjs +7 -9
- package/apps/portal/view/home/parts/BaseContainer.mjs +8 -1
- package/apps/portal/view/home/parts/Colors.mjs +2 -2
- package/apps/portal/view/home/parts/Helix.mjs +2 -2
- package/apps/portal/view/learn/ContentView.mjs +3 -1
- package/examples/ServiceWorker.mjs +2 -2
- package/package.json +4 -4
- package/resources/data/deck/learnneo/pages/2023-10-14T19-25-08-153Z.md +2 -2
- package/resources/data/deck/learnneo/pages/ComponentModels.md +6 -6
- package/resources/data/deck/learnneo/pages/ComponentsAndContainers.md +10 -10
- package/resources/data/deck/learnneo/pages/Config.md +6 -6
- package/resources/data/deck/learnneo/pages/CustomComponents.md +4 -4
- package/resources/data/deck/learnneo/pages/DescribingTheUI.md +4 -4
- package/resources/data/deck/learnneo/pages/Earthquakes.md +2 -2
- package/resources/data/deck/learnneo/pages/Events.md +7 -7
- package/resources/data/deck/learnneo/pages/Extending.md +7 -7
- package/resources/data/deck/learnneo/pages/GuideEvents.md +17 -18
- package/resources/data/deck/learnneo/pages/GuideViewModels.md +21 -21
- package/resources/data/deck/learnneo/pages/References.md +8 -8
- package/resources/data/deck/learnneo/pages/TestLivePreview.md +5 -4
- package/resources/data/deck/learnneo/pages/TodoList.md +9 -9
- package/resources/data/deck/learnneo/pages/Welcome.md +3 -3
- package/resources/data/deck/learnneo/pages/WhyNeo-Multi-Window.md +2 -2
- package/resources/data/deck/learnneo/pages/WhyNeo-Speed.md +2 -2
- package/resources/scss/src/apps/portal/HeaderToolbar.scss +0 -46
- package/resources/scss/src/apps/portal/home/parts/BaseContainer.scss +33 -4
- package/resources/scss/src/{apps/portal/learn → code}/LivePreview.scss +1 -1
- package/resources/scss/src/component/Helix.scss +1 -2
- package/src/DefaultConfig.mjs +2 -2
- package/{apps/portal/view/learn → src/code}/LivePreview.mjs +43 -27
- package/src/main/addon/ResizeObserver.mjs +18 -2
- package/apps/portal/view/home/parts/HelloWorld.mjs +0 -83
- package/apps/portal/view/home/preview/PageCodeContainer.mjs +0 -55
- package/resources/scss/src/apps/portal/Viewport.scss +0 -3
- package/resources/scss/src/apps/portal/home/preview/PageCodeContainer.scss +0 -115
@@ -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 '
|
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
|
14
|
-
import Button from '
|
15
|
-
import Split
|
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 '
|
8
|
-
import NeoArray from '
|
9
|
-
import VdomUtil from '
|
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 '
|
121
|
-
import List from '
|
122
|
-
import Model from '
|
123
|
-
import Store from '
|
124
|
-
import TextField from '
|
125
|
-
import Toolbar from '
|
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 — all integrated within a single app — is a unique feature of Neo.mjs!
|
51
51
|
|
52
52
|
<pre data-neo>
|
53
|
-
import Button from '
|
54
|
-
import Container from '
|
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. — 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 '
|
19
|
-
import Container from '
|
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 — but we've never actually hit the limit.
|
22
22
|
|
23
23
|
<pre data-neo>
|
24
|
-
import Base from '
|
25
|
-
import Helix from '
|
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',
|
@@ -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
|
//}
|
@@ -2,6 +2,39 @@
|
|
2
2
|
min-height : 100%;
|
3
3
|
scroll-snap-align: center;
|
4
4
|
|
5
|
+
@keyframes appear-left {
|
6
|
+
0% {opacity: 0; transform: translateX(-400%);}
|
7
|
+
90% {opacity: .3;}
|
8
|
+
100% {opacity: 1; transform: translateX(0);}
|
9
|
+
}
|
10
|
+
|
11
|
+
@keyframes appear-right {
|
12
|
+
0% {opacity: 0; transform: translateX(400%);}
|
13
|
+
90% {opacity: .3;}
|
14
|
+
100% {opacity: 1; transform: translateX(0);}
|
15
|
+
}
|
16
|
+
|
17
|
+
&:not(:first-child) {
|
18
|
+
&:not(:last-child) {
|
19
|
+
animation-timeline : view(block 100% -500%);
|
20
|
+
animation-fill-mode : both;
|
21
|
+
animation-duration : 1ms; /* Firefox requires this to apply the animation */
|
22
|
+
animation-timing-function: linear;
|
23
|
+
|
24
|
+
&:nth-child(even) {
|
25
|
+
animation-name: appear-right;
|
26
|
+
}
|
27
|
+
|
28
|
+
&:nth-child(odd) {
|
29
|
+
animation-name: appear-left;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
.neo-content {
|
35
|
+
font-size: min(max(2.3vw, 16px), 30px);
|
36
|
+
}
|
37
|
+
|
5
38
|
.neo-h1 {
|
6
39
|
font-size : min(max(5.5vw, 30px), 64px);
|
7
40
|
text-align : center;
|
@@ -17,10 +50,6 @@
|
|
17
50
|
line-height: 1em;
|
18
51
|
}
|
19
52
|
|
20
|
-
.neo-content {
|
21
|
-
font-size: min(max(2.3vw, 16px), 30px);
|
22
|
-
}
|
23
|
-
|
24
53
|
.page-live-preview {
|
25
54
|
margin: 0;
|
26
55
|
}
|
@@ -4,7 +4,6 @@
|
|
4
4
|
display : flex;
|
5
5
|
font-family : var(--neo-font-family);
|
6
6
|
margin : 0;
|
7
|
-
overflow : hidden;
|
8
7
|
padding : 0;
|
9
8
|
perspective : 800px;
|
10
9
|
transform : translateZ(0px);
|
@@ -65,7 +64,7 @@
|
|
65
64
|
height : 160px;
|
66
65
|
overflow : hidden;
|
67
66
|
width : 120px;
|
68
|
-
will-change :
|
67
|
+
will-change : auto;
|
69
68
|
|
70
69
|
&:focus {
|
71
70
|
outline: 0;
|
package/src/DefaultConfig.mjs
CHANGED
@@ -260,12 +260,12 @@ const DefaultConfig = {
|
|
260
260
|
useVdomWorker: true,
|
261
261
|
/**
|
262
262
|
* buildScripts/injectPackageVersion.mjs will update this value
|
263
|
-
* @default '6.18.
|
263
|
+
* @default '6.18.3'
|
264
264
|
* @memberOf! module:Neo
|
265
265
|
* @name config.version
|
266
266
|
* @type String
|
267
267
|
*/
|
268
|
-
version: '6.18.
|
268
|
+
version: '6.18.3'
|
269
269
|
};
|
270
270
|
|
271
271
|
Object.assign(DefaultConfig, {
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import Container from '
|
2
|
-
import MonacoEditor from '
|
3
|
-
import TabContainer from '
|
1
|
+
import Container from '../container/Base.mjs';
|
2
|
+
import MonacoEditor from '../component/wrapper/MonacoEditor.mjs'
|
3
|
+
import TabContainer from '../tab/Container.mjs';
|
4
4
|
|
5
5
|
const
|
6
6
|
classDeclarationRegex = /class\s+([a-zA-Z$_][a-zA-Z0-9$_]*)\s*(?:extends\s+[a-zA-Z$_][a-zA-Z0-9$_]*)?\s*{[\s\S]*?}/g,
|
@@ -8,7 +8,7 @@ const
|
|
8
8
|
importRegex = /import\s+([\w-]+)\s+from\s+['"]([^'"]+)['"]/;
|
9
9
|
|
10
10
|
/**
|
11
|
-
* @class
|
11
|
+
* @class Neo.code.LivePreview
|
12
12
|
* @extends Neo.container.Base
|
13
13
|
*/
|
14
14
|
class LivePreview extends Container {
|
@@ -22,10 +22,10 @@ class LivePreview extends Container {
|
|
22
22
|
|
23
23
|
static config = {
|
24
24
|
/**
|
25
|
-
* @member {String} className='
|
25
|
+
* @member {String} className='Neo.code.LivePreview'
|
26
26
|
* @protected
|
27
27
|
*/
|
28
|
-
className: '
|
28
|
+
className: 'Neo.code.LivePreview',
|
29
29
|
/**
|
30
30
|
* @member {String} ntype='live-preview'
|
31
31
|
* @protected
|
@@ -36,14 +36,22 @@ class LivePreview extends Container {
|
|
36
36
|
* @member {String} activeView_='source'
|
37
37
|
*/
|
38
38
|
activeView_: 'source',
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
39
|
+
/**
|
40
|
+
* @member {String[]} baseCls=['neo-code-live-preview']
|
41
|
+
*/
|
42
|
+
baseCls: ['neo-code-live-preview'],
|
43
|
+
/**
|
44
|
+
* @member {Boolean} disableRunSource=false
|
45
|
+
*/
|
44
46
|
disableRunSource: false,
|
45
|
-
|
46
|
-
|
47
|
+
/**
|
48
|
+
* @member {Number} height=400
|
49
|
+
*/
|
50
|
+
height: 400,
|
51
|
+
/**
|
52
|
+
* @member {Object|String} layout='fit'
|
53
|
+
*/
|
54
|
+
layout: 'fit',
|
47
55
|
/**
|
48
56
|
* @member {Object[]} items
|
49
57
|
*/
|
@@ -56,27 +64,21 @@ class LivePreview extends Container {
|
|
56
64
|
items: [{
|
57
65
|
module : MonacoEditor,
|
58
66
|
hideLabel : true,
|
67
|
+
listeners : {editorChange: 'up.onEditorChange'},
|
59
68
|
style : {height: '100%'},
|
60
69
|
reference : 'editor',
|
61
|
-
tabButtonConfig: {
|
62
|
-
text: 'Source'
|
63
|
-
},
|
64
|
-
listeners : {
|
65
|
-
editorChange: data => {
|
66
|
-
let container = data.component.up({className: 'Portal.view.learn.LivePreview'});
|
67
|
-
container.editorValue = data.value;
|
68
|
-
|
69
|
-
if (container.previewContainer) {
|
70
|
-
container.doRunSource()
|
71
|
-
}
|
72
|
-
}
|
73
|
-
}
|
70
|
+
tabButtonConfig: {text: 'Source'}
|
74
71
|
}, {
|
75
72
|
module : Container,
|
76
73
|
reference : 'preview',
|
77
74
|
tabButtonConfig: {text: 'Preview'}
|
78
75
|
}]
|
79
|
-
}]
|
76
|
+
}],
|
77
|
+
/**
|
78
|
+
* The code to display inside the Monaco editor
|
79
|
+
* @member {String|null} value_=null
|
80
|
+
*/
|
81
|
+
value_: null,
|
80
82
|
}
|
81
83
|
|
82
84
|
/**
|
@@ -300,6 +302,20 @@ class LivePreview extends Container {
|
|
300
302
|
me.activeView === 'preview' && me.doRunSource()
|
301
303
|
}
|
302
304
|
|
305
|
+
/**
|
306
|
+
* @param {Object} data
|
307
|
+
*/
|
308
|
+
onEditorChange(data) {
|
309
|
+
let me = this;
|
310
|
+
|
311
|
+
me.editorValue = data.value;
|
312
|
+
|
313
|
+
// We are not using getPreviewContainer(), since we only want to update the LivePreview in case it is visible.
|
314
|
+
if (me.previewContainer) {
|
315
|
+
me.doRunSource()
|
316
|
+
}
|
317
|
+
}
|
318
|
+
|
303
319
|
/**
|
304
320
|
* @param {Object} data
|
305
321
|
*/
|
@@ -19,6 +19,12 @@ class NeoResizeObserver extends Base {
|
|
19
19
|
* @protected
|
20
20
|
*/
|
21
21
|
instance: null,
|
22
|
+
/**
|
23
|
+
* If a target node is not found when calling register(),
|
24
|
+
* we can specify the amount of retries with a 100ms delay.
|
25
|
+
* @member {Number} registerAttempts=3
|
26
|
+
*/
|
27
|
+
registerAttempts: 3,
|
22
28
|
/**
|
23
29
|
* Remote method access for other workers
|
24
30
|
* @member {Object} remote
|
@@ -92,9 +98,19 @@ class NeoResizeObserver extends Base {
|
|
92
98
|
/**
|
93
99
|
* @param {Object} data
|
94
100
|
* @param {String} data.id
|
101
|
+
* @param {Number} count=0
|
95
102
|
*/
|
96
|
-
register(data) {
|
97
|
-
this
|
103
|
+
async register(data, count=0) {
|
104
|
+
let me = this,
|
105
|
+
node = DomAccess.getElement(data.id);
|
106
|
+
|
107
|
+
if (node) {
|
108
|
+
me.instance.observe(node)
|
109
|
+
} else if (count < me.registerAttempts) {
|
110
|
+
await me.timeout(100);
|
111
|
+
count++;
|
112
|
+
me.register(data, count)
|
113
|
+
}
|
98
114
|
}
|
99
115
|
|
100
116
|
/**
|
@@ -1,83 +0,0 @@
|
|
1
|
-
import BaseContainer from './BaseContainer.mjs';
|
2
|
-
import LivePreviewContainer from '../preview/PageCodeContainer.mjs';
|
3
|
-
|
4
|
-
/**
|
5
|
-
* @class Portal.view.home.parts.HelloWorld
|
6
|
-
* @extends Portal.view.home.parts.BaseContainer
|
7
|
-
*/
|
8
|
-
class HelloWorld extends BaseContainer {
|
9
|
-
static config = {
|
10
|
-
/**
|
11
|
-
* @member {String} className='Portal.view.home.parts.HelloWorld'
|
12
|
-
* @protected
|
13
|
-
*/
|
14
|
-
className: 'Portal.view.home.parts.HelloWorld',
|
15
|
-
|
16
|
-
cls: ['page', 'hello-world'],
|
17
|
-
/**
|
18
|
-
* @member {Object} layout=null
|
19
|
-
*/
|
20
|
-
// layout: null,
|
21
|
-
|
22
|
-
responsiveConfig: {
|
23
|
-
oldPhone: {maxWidth: 320},
|
24
|
-
phone : {maxWidth: 480},
|
25
|
-
tablet : {maxWidth: 770},
|
26
|
-
medium : {maxWidth: 840},
|
27
|
-
large : {minWidth: 841}
|
28
|
-
},
|
29
|
-
|
30
|
-
responsive: {
|
31
|
-
medium: {layout: {ntype: 'vbox', align: 'stretch', pack: 'center'}},
|
32
|
-
large : {layout: {ntype: 'hbox', align: 'stretch', pack: 'center'}}
|
33
|
-
},
|
34
|
-
/**
|
35
|
-
* @member {Object[]} items
|
36
|
-
*/
|
37
|
-
items: [{
|
38
|
-
ntype : 'container',
|
39
|
-
flex : '1',
|
40
|
-
style : {padding: '2rem'},
|
41
|
-
layout: {ntype: 'vbox', align: 'center', pack: 'center'},
|
42
|
-
items : [{
|
43
|
-
cls : 'neo-h1',
|
44
|
-
flex: 'none',
|
45
|
-
html: 'Hello World',
|
46
|
-
vdom: {tag: 'h1'}
|
47
|
-
}, {
|
48
|
-
cls : 'neo-h2',
|
49
|
-
flex: 'none',
|
50
|
-
html: 'Your first code snippet',
|
51
|
-
vdom: {tag: 'h2'}
|
52
|
-
}, {
|
53
|
-
cls : 'neo-content',
|
54
|
-
flex: 'none',
|
55
|
-
html: 'If you understand these lines, you are ready to start with Neo.mjs',
|
56
|
-
vdom: {tag: 'p'}
|
57
|
-
}]
|
58
|
-
}, {
|
59
|
-
module: LivePreviewContainer,
|
60
|
-
flex : 0.8,
|
61
|
-
value : [
|
62
|
-
"import Container from '../../../../src/container/Base.mjs';",
|
63
|
-
"",
|
64
|
-
"class MainView extends Container {",
|
65
|
-
" static config = {",
|
66
|
-
" className: 'Portal.view.MainView',",
|
67
|
-
" layout : {ntype:'vbox', align:'stretch'},",
|
68
|
-
" items : [{",
|
69
|
-
" module: Container,",
|
70
|
-
" html : 'Hello World'",
|
71
|
-
" }]",
|
72
|
-
" }",
|
73
|
-
"}",
|
74
|
-
"",
|
75
|
-
"Neo.setupClass(MainView);"
|
76
|
-
].join('\n')
|
77
|
-
}]
|
78
|
-
}
|
79
|
-
}
|
80
|
-
|
81
|
-
Neo.setupClass(HelloWorld);
|
82
|
-
|
83
|
-
export default HelloWorld;
|
@@ -1,55 +0,0 @@
|
|
1
|
-
import Container from '../../../../../src/container/Base.mjs';
|
2
|
-
import LivePreview from '../../learn/LivePreview.mjs';
|
3
|
-
|
4
|
-
/**
|
5
|
-
* @class Portal.view.home.preview.PageCodeContainer
|
6
|
-
* @extends Neo.container.Base
|
7
|
-
*/
|
8
|
-
class PageCodeContainer extends Container {
|
9
|
-
static config = {
|
10
|
-
/**
|
11
|
-
* @member {String} className='Portal.view.home.preview.PageCodeContainer'
|
12
|
-
* @protected
|
13
|
-
*/
|
14
|
-
className: 'Portal.view.home.preview.PageCodeContainer',
|
15
|
-
/**
|
16
|
-
* @member {String} ntype='page-code-container'
|
17
|
-
* @protected
|
18
|
-
*/
|
19
|
-
ntype: 'page-code-container',
|
20
|
-
/**
|
21
|
-
* @member {String[]} cls=['page-code-container']
|
22
|
-
* @protected
|
23
|
-
*/
|
24
|
-
cls: ['page-code-container'],
|
25
|
-
/**
|
26
|
-
* @member {Object} layout={ntype:'vbox',align:'stretch',pack:'center'}
|
27
|
-
*/
|
28
|
-
layout: {ntype: 'vbox', align: 'stretch', pack: 'center'},
|
29
|
-
/**
|
30
|
-
* @member {Object[]} items
|
31
|
-
*/
|
32
|
-
items : [{
|
33
|
-
module: LivePreview,
|
34
|
-
cls : ['live-preview']
|
35
|
-
}],
|
36
|
-
/**
|
37
|
-
* @member {String|null} value_=null
|
38
|
-
*/
|
39
|
-
value_: null,
|
40
|
-
}
|
41
|
-
|
42
|
-
/**
|
43
|
-
* Triggered after the size config got changed
|
44
|
-
* @param {String|null} value
|
45
|
-
* @param {String|null} oldValue
|
46
|
-
* @protected
|
47
|
-
*/
|
48
|
-
afterSetValue(value, oldValue) {
|
49
|
-
this.items[0].value = value
|
50
|
-
}
|
51
|
-
}
|
52
|
-
|
53
|
-
Neo.setupClass(PageCodeContainer);
|
54
|
-
|
55
|
-
export default PageCodeContainer;
|
@@ -1,115 +0,0 @@
|
|
1
|
-
.page-code-container {
|
2
|
-
position: relative;
|
3
|
-
padding: 20px;
|
4
|
-
|
5
|
-
&::before {
|
6
|
-
position:absolute;
|
7
|
-
inset: 0;
|
8
|
-
opacity: .4;
|
9
|
-
content: "";
|
10
|
-
background: {
|
11
|
-
image : url("../../../../../../../../resources/images/logo/neo_logo_secondary.svg");
|
12
|
-
size: auto 90%;
|
13
|
-
repeat: no-repeat;
|
14
|
-
position: center;
|
15
|
-
}
|
16
|
-
}
|
17
|
-
|
18
|
-
.live-preview {
|
19
|
-
opacity: 0.9;
|
20
|
-
|
21
|
-
.live-preview-container {
|
22
|
-
& > .neo-tab-header-toolbar {
|
23
|
-
background: var(--sem-color-surface-primary-background);
|
24
|
-
border-radius: 15px 15px 0 0;
|
25
|
-
padding-right: 10px;
|
26
|
-
padding-left: 14px;
|
27
|
-
|
28
|
-
.neo-button-text {
|
29
|
-
color: slategrey!important;
|
30
|
-
}
|
31
|
-
|
32
|
-
.pressed {
|
33
|
-
border-bottom-right-radius: 0;
|
34
|
-
border-bottom-left-radius: 0;
|
35
|
-
|
36
|
-
.neo-button-text {
|
37
|
-
color: darkslategrey !important;
|
38
|
-
}
|
39
|
-
|
40
|
-
.neo-tab-button-indicator {
|
41
|
-
background-color: darkslategrey;
|
42
|
-
}
|
43
|
-
}
|
44
|
-
|
45
|
-
}
|
46
|
-
|
47
|
-
& > .neo-tab-content-container {
|
48
|
-
.monaco-editor {
|
49
|
-
.margin, .sticky-widget-line-numbers, .active-line-number {
|
50
|
-
background: #263238;
|
51
|
-
color: #cdd3de;
|
52
|
-
}
|
53
|
-
|
54
|
-
.monaco-editor-background, .sticky-widget-lines-scrollable {
|
55
|
-
background: #1B2225;
|
56
|
-
color: #cdd3de;
|
57
|
-
|
58
|
-
// keys
|
59
|
-
.mtk1 {
|
60
|
-
color: #CDFF8E;
|
61
|
-
}
|
62
|
-
|
63
|
-
// class, extends, static
|
64
|
-
.mtk6 {
|
65
|
-
color: #8EDCF5;
|
66
|
-
}
|
67
|
-
|
68
|
-
// numbers
|
69
|
-
.mtk7 {
|
70
|
-
color: #D6FF00
|
71
|
-
}
|
72
|
-
|
73
|
-
// Comment
|
74
|
-
.mtk8 {
|
75
|
-
color: #98A8B5;
|
76
|
-
}
|
77
|
-
|
78
|
-
// strings
|
79
|
-
.mtk20 {
|
80
|
-
color: #D6FF00
|
81
|
-
}
|
82
|
-
|
83
|
-
// Classname: MainView, Container
|
84
|
-
.mtk22 {
|
85
|
-
color: #cccccc;
|
86
|
-
}
|
87
|
-
|
88
|
-
/**
|
89
|
-
* Cursor
|
90
|
-
* not used
|
91
|
-
* - .monaco-mouse-cursor-text
|
92
|
-
* - .cursors-layer
|
93
|
-
* - .cursor-line-style
|
94
|
-
*/
|
95
|
-
.cursor,
|
96
|
-
.cursor-solid {
|
97
|
-
background-color: #ffffff;
|
98
|
-
}
|
99
|
-
|
100
|
-
// not in use
|
101
|
-
.important {
|
102
|
-
color: #FFA9A9;
|
103
|
-
font-style: italic;
|
104
|
-
}
|
105
|
-
|
106
|
-
// not in use
|
107
|
-
.id {
|
108
|
-
color: #F3A5F7;
|
109
|
-
}
|
110
|
-
}
|
111
|
-
}
|
112
|
-
}
|
113
|
-
}
|
114
|
-
}
|
115
|
-
}
|