neo.mjs 8.31.0 → 8.32.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/.github/LLM_PROMPTS.md +463 -0
- package/README.md +138 -55
- package/apps/ServiceWorker.mjs +2 -2
- package/apps/portal/index.html +1 -1
- package/apps/portal/view/home/FooterContainer.mjs +1 -1
- package/apps/portal/view/home/MainContainer.mjs +1 -1
- package/apps/portal/view/home/parts/Colors.mjs +4 -8
- package/apps/portal/view/home/parts/Helix.mjs +5 -1
- package/buildScripts/buildAll.mjs +1 -1
- package/buildScripts/buildThemes.mjs +1 -1
- package/buildScripts/createApp.mjs +1 -1
- package/buildScripts/createAppMinimal.mjs +1 -1
- package/buildScripts/docs/jsdocx.mjs +1 -1
- package/buildScripts/injectPackageVersion.mjs +1 -1
- package/buildScripts/watchThemes.mjs +1 -1
- package/buildScripts/webpack/buildThreads.mjs +1 -1
- package/buildScripts/webpack/development/webpack.config.appworker.mjs +1 -1
- package/buildScripts/webpack/development/webpack.config.main.mjs +1 -1
- package/buildScripts/webpack/development/webpack.config.worker.mjs +1 -1
- package/buildScripts/webpack/production/webpack.config.appworker.mjs +1 -1
- package/buildScripts/webpack/production/webpack.config.main.mjs +1 -1
- package/buildScripts/webpack/production/webpack.config.worker.mjs +1 -1
- package/examples/README.md +5 -14
- package/examples/ServiceWorker.mjs +2 -2
- package/package.json +3 -3
- package/resources/scss/src/grid/plugin/AnimateRows.scss +10 -0
- package/src/DefaultConfig.mjs +2 -2
- package/src/calendar/view/SettingsContainer.mjs +3 -5
- package/src/calendar/view/week/Component.mjs +3 -5
- package/src/component/Base.mjs +3 -6
- package/src/component/Helix.mjs +2 -3
- package/src/controller/Component.mjs +3 -5
- package/src/data/Store.mjs +1 -1
- package/src/dialog/Base.mjs +3 -4
- package/src/grid/Container.mjs +5 -6
- package/src/grid/View.mjs +1 -3
- package/src/grid/column/AnimatedChange.mjs +12 -6
- package/src/grid/plugin/AnimateRows.mjs +9 -31
- package/src/list/Base.mjs +1 -3
- package/src/list/plugin/Animate.mjs +3 -3
- package/src/manager/Component.mjs +1 -1
- package/src/plugin/Base.mjs +23 -3
- package/src/selection/HelixModel.mjs +3 -6
- package/src/tab/Container.mjs +3 -4
- package/src/table/Container.mjs +6 -7
- package/src/util/Css.mjs +6 -6
package/README.md
CHANGED
@@ -11,87 +11,170 @@
|
|
11
11
|
<a href="./CONTRIBUTING.md"><img src="https://img.shields.io/badge/PRs-welcome-green.svg?logo=GitHub&logoColor=white" alt="PRs Welcome"></a>
|
12
12
|
</p>
|
13
13
|
|
14
|
-
#
|
15
|
-
|
16
|
-
component library and harness the power of multi-threading for extreme real-time performance.
|
14
|
+
# Build Ultra-Fast, Scalable, and Extensible Web Apps :zap:
|
15
|
+
:rocket: **Break Free from the Main Thread – Experience True Multi-Threading**
|
17
16
|
|
18
|
-
Neo.mjs
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
you have found the right spot.
|
17
|
+
Neo.mjs enables the creation of highly dynamic web applications by running everything **inside an App Worker**.
|
18
|
+
From components and state providers to view controllers, everything operates within the worker,
|
19
|
+
allowing the main thread to focus only on **DOM updates** and **delegating UI events**.
|
20
|
+
This ensures **high performance, smooth reactivity**, and **extensibility** for both **multi-window** and **SPA applications**.
|
23
21
|
|
24
22
|
<p align="center">
|
25
23
|
<a href="https://youtu.be/pYfM28Pz6_0"><img height="316px" width="400px" src="https://raw.githubusercontent.com/neomjs/pages/master/resources_pub/images/neo33s.png"></a>
|
26
24
|
<a href="https://youtu.be/aEA5333WiWY"><img height="316px" width="400px" src="https://raw.githubusercontent.com/neomjs/pages/master/resources_pub/images/neo-movie.png"></a>
|
27
25
|
</p>
|
28
26
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
27
|
+
</br></br>
|
28
|
+
## 🔍 Why Neo.mjs?
|
29
|
+
Neo is a worker thread-driven frontend framework designed to create multithreaded GUIs using JavaScript.
|
30
|
+
By leveraging the **Off Main Thread (OMT) paradigm**, Neo ensures that your application’s UI remains responsive,
|
31
|
+
even during computationally intensive tasks.
|
32
|
+
|
33
|
+
Unlike traditional single-threaded frameworks, Neo distributes workloads across multiple threads, unlocking new levels of performance and scalability.
|
34
|
+
Whether you’re building a small app or a large-scale enterprise solution, Neo’s architecture grows with your needs.
|
35
|
+
|
36
|
+
Key Benefits of Neo.mjs
|
37
|
+
1. **Multithreading for Performance**:
|
38
|
+
- Neo’s OMT paradigm moves tasks like data processing, state management, and rendering to worker threads, keeping the main thread free for rendering and user interactions.
|
39
|
+
- This approach eliminates UI freezes and ensures a smooth user experience, even for complex applications.
|
40
|
+
2. **Declarative Class Configuration**:
|
41
|
+
- Neo’s class config system allows you to define and manage classes in a clean, reusable way. This reduces boilerplate code and makes your codebase more maintainable.
|
42
|
+
- With declarative configurations, you can focus on building features instead of wrestling with setup and initialization.
|
43
|
+
3. **Modular and Scalable Architecture**:
|
44
|
+
- Neo’s modular design makes it easy to build scalable applications. Components are self-contained and reusable, promoting a clean separation of concerns.
|
45
|
+
- Whether you’re building a small app or a large-scale enterprise solution, Neo’s architecture grows with your needs.
|
46
|
+
4. **Ease of Use**:
|
47
|
+
- Neo’s intuitive API and comprehensive documentation make it easy to get started, even for developers new to multithreaded programming.
|
48
|
+
- The framework’s design prioritizes developer productivity, allowing you to focus on solving real-world problems.
|
49
|
+
5. **Future-Proof Technology**:
|
50
|
+
- Neo is built on modern web standards like JavaScript modules and worker threads, ensuring compatibility with the latest browser features.
|
51
|
+
- By embracing the OMT paradigm, Neo is uniquely positioned to take advantage of future advancements in web development.
|
52
|
+
|
53
|
+
**Real-World Applications**
|
54
|
+
|
55
|
+
Neo is ideal for:
|
56
|
+
- **Data-intensive applications**: Handle large datasets and complex calculations without compromising UI responsiveness.
|
57
|
+
- **Real-time dashboards**: Build dynamic, real-time dashboards that update seamlessly.
|
58
|
+
- **Enterprise solutions**: Scale your application to meet the demands of large organizations.
|
59
|
+
|
60
|
+
**Why Choose Neo Over Traditional Frameworks?**
|
61
|
+
|
62
|
+
Traditional single-threaded frameworks often struggle with performance bottlenecks, especially when handling complex UIs or large datasets.
|
63
|
+
Neo’s **multithreaded architecture** addresses these challenges head-on, delivering a responsive and scalable solution for modern web applications.
|
64
|
+
|
65
|
+
With Neo, you get:
|
66
|
+
- ✅ **Responsive UIs**: No more UI freezes or janky animations.
|
67
|
+
- 🚀 **Scalability**: Build applications that can handle increasing complexity without compromising performance.
|
68
|
+
- 💻 **Developer Productivity**: Spend less time optimizing and more time building features.
|
69
|
+
</br></br>
|
70
|
+
## 🌟 Key Features
|
71
|
+
🎭 **Actor Model**:</br>
|
72
|
+
The App Worker acts as the central actor, handling application state and logic, independent of the main thread.
|
73
|
+
This drives the OMT (off the main thread) paradigm into perfection,
|
74
|
+
since it is keeping the main thread free for non-blocking DOM updates and UI interactions.
|
37
75
|
|
38
|
-
|
39
|
-
Neo.mjs drives the OMT (off the main thread) paradigm into perfection,
|
40
|
-
which is intended to move expensive tasks into Workers.
|
76
|
+
<img src="./resources/images/workers-focus.svg">
|
41
77
|
|
42
|
-
|
78
|
+
🔄 **Reactive State Management**:</br>
|
79
|
+
Built-in reactivity allows dynamic, efficient updates between components and state providers.
|
43
80
|
|
44
|
-
|
81
|
+
⚡ **Instant JavaScript module based Development Mode**:</br>
|
82
|
+
**Zero builds or transpilations** required. Run your app directly in the browser, modify reactive properties in real-time, and see instant updates.
|
83
|
+
This gives you an **unmatched debugging experience**, saving time and reducing development costs.
|
84
|
+
You can even build **entire apps inside the console** if you wish.
|
45
85
|
|
46
|
-
|
47
|
-
|
86
|
+
📊 **Hierarchical State Management**:</br>
|
87
|
+
Seamlessly manage state between parent and child components with nested state providers.
|
88
|
+
Each component binds to the state data from its **closest** provider,
|
89
|
+
even combining data from multiple providers inside one binding.
|
48
90
|
|
49
|
-
|
50
|
-
|
91
|
+
🧩 **Clean Architecture**:</br>
|
92
|
+
View controllers ensure a **separation of concerns**, isolating business logic from UI components for easier maintenance and testing.
|
51
93
|
|
52
|
-
|
94
|
+
🌐 **Multi-Window & SPAs**:</br>
|
95
|
+
Easily build and manage complex, highly interactive applications that require multiple windows or traditional SPAs.
|
96
|
+
No native shell required.
|
53
97
|
|
54
|
-
|
55
|
-
|
98
|
+
🌀 **Dynamic Component Management**:</br>
|
99
|
+
Unmount, move, and remount components across the UI or even in separate browser windows
|
100
|
+
— without losing the component’s state or logic. This **runtime flexibility** is a game-changer, **preserving JS instances** while still updating the UI dynamically.
|
56
101
|
|
57
|
-
|
102
|
+
:dependabot: **No npm dependency hell**:</br>
|
103
|
+
Neo.mjs apps do not need any dependencies at all, just some dev dependencies for tooling.
|
104
|
+
</br></br>
|
105
|
+
## :bulb: Perfect for Complex Use Cases
|
106
|
+
Need a **web-based IDE, banking dashboard**, or an **enterprise-grade multi-window app**? Neo.mjs is built for it.
|
58
107
|
|
108
|
+
</br></br>
|
109
|
+
## 📦 Declarative Class Configuration
|
110
|
+
Neo’s class config system allows you to define and manage classes in a declarative and reusable way.
|
111
|
+
This simplifies class creation, reduces boilerplate code, and improves maintainability.
|
112
|
+
|
113
|
+
```javascript
|
114
|
+
import Component from '../../src/component/Base.mjs';
|
115
|
+
|
116
|
+
class MyComponent extends Component {
|
117
|
+
static config = {
|
118
|
+
className : 'MyComponent',
|
119
|
+
someProperty_: 'defaultValue',
|
120
|
+
domListeners : {
|
121
|
+
click: 'onClick'
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
afterSetSomeProperty(value, oldValue) {
|
126
|
+
console.log('someProperty changed:', value, oldValue)
|
127
|
+
}
|
128
|
+
|
129
|
+
onClick(data) {
|
130
|
+
console.log('Clicked!', data)
|
131
|
+
}
|
132
|
+
}
|
133
|
+
|
134
|
+
export default Neo.setupClass(MyComponent);
|
135
|
+
```
|
136
|
+
With Neo.mjs’s class config system, you can:
|
137
|
+
|
138
|
+
* Define default properties and methods in a clean, structured way.
|
139
|
+
* Easily extend and reuse configurations across classes.
|
140
|
+
* Keep your codebase organized and scalable.
|
141
|
+
|
142
|
+
For more details, check out the <a href="https://neomjs.com/dist/production/apps/portal/index.html#/learn/gettingstarted.Config">Class Config System documentation</a>.
|
59
143
|
|
60
|
-
|
144
|
+
</br></br>
|
145
|
+
## 🚀 Get Started
|
146
|
+
Quick Start
|
61
147
|
|
62
|
-
|
63
|
-
but instead on a super-fast update & navigation experience for returning users.
|
148
|
+
Run the following command in your terminal, and your new Neo app will be created, the local web server will start, and your app will open in a new browser window:
|
64
149
|
|
150
|
+
```bash
|
151
|
+
npx neo-app@latest
|
152
|
+
```
|
153
|
+
This one-liner sets up everything you need to start building with Neo, including:
|
154
|
+
- A new app workspace.
|
155
|
+
- A pre-configured app shell.
|
156
|
+
- A local development server.
|
157
|
+
- Opening your app inside a new browser window
|
65
158
|
|
66
|
-
|
67
|
-
1. Finance (Banking & Trading Apps)
|
68
|
-
2. Data Science
|
69
|
-
3. Web-based IDEs
|
70
|
-
4. Multi-Window Data Visualisation
|
71
|
-
5. Complex dynamic Forms
|
72
|
-
6. "Desktop-like" Apps
|
73
|
-
7. Enterprise Apps in general (e.g. Admin Dashboards)
|
159
|
+
:book: More details? Check out our <a href="./.github/GETTING_STARTED.md">Getting Started Guide</a>
|
74
160
|
|
75
|
-
|
76
|
-
Join our community:</br>
|
77
|
-
<a href="https://join.slack.com/t/neomjs/shared_invite/zt-6c50ueeu-3E1~M4T9xkNnb~M_prEEOA"><img src="https://img.shields.io/badge/Slack-neo.mjs-brightgreen.svg?logo=slack&style=for-the-badge" alt="Join the Slack channel"></a>
|
161
|
+
:student: Make sure to dive into the <a href="https://neomjs.com/dist/production/apps/portal/#/learn/gettingstarted.Setup">Learning Section</a>
|
78
162
|
|
79
|
-
|
80
|
-
|
163
|
+
:brain: The most advanced tutorial to help you with getting up to speed is this one:
|
164
|
+
<a href="https://neomjs.com/dist/production/apps/portal/#/learn/tutorials.Earthquakes">Earthquakes Tutorial</a>
|
81
165
|
|
82
|
-
|
166
|
+
Next steps:
|
167
|
+
* :star: **Explore exciting Examples here**: <a href="https://neomjs.com/dist/production/apps/portal/#/examples">Neo.mjs Examples</a>
|
168
|
+
* Many more are included inside the repos <a href="https://github.com/neomjs/neo/tree/dev/apps">apps</a>
|
169
|
+
& <a href="https://github.com/neomjs/neo/tree/dev/examples">examples</a> folders.
|
170
|
+
* :blue_book: All Blog Posts are listed here: <a href="https://neomjs.com/dist/production/apps/portal/#/blog">Neo.mjs Blog</a>
|
171
|
+
</br></br>
|
172
|
+
## :handshake: Join the Community
|
83
173
|
|
84
|
-
|
85
|
-
* Take a look at the <a href="./.github/GETTING_STARTED.md">Getting Started Guide</a>
|
86
|
-
* Make sure to dive into the <a href="https://neomjs.com/dist/production/apps/portal/#/learn/gettingstarted.Setup">Learning Section</a>
|
87
|
-
* The most advanced tutorial to help you with getting up to speed is this one:</br>
|
88
|
-
<a href="https://neomjs.com/dist/production/apps/portal/#/learn/tutorials.Earthquakes">Earthquakes Tutorial</a>
|
174
|
+
:speech_balloon: Have questions? Join our <a href="https://join.slack.com/t/neomjs/shared_invite/zt-6c50ueeu-3E1~M4T9xkNnb~M_prEEOA">Slack channel</a> and connect with other developers.
|
89
175
|
|
90
|
-
|
91
|
-
You can find an in-depth description here: <a href="./buildScripts/README.md">Neo.mjs CLI</a>
|
176
|
+
:hammer_and_wrench: Want to contribute? Check out our <a href="https://github.com/neomjs/neo/blob/dev/CONTRIBUTING.md">Contributing Guide</a>.
|
92
177
|
|
93
|
-
</br><h2 id="blog">7. Blog</h2>
|
94
|
-
All Blog Posts are listed here: <a href="https://neomjs.com/dist/production/apps/portal/#/blog">Neo.mjs Blog</a>
|
95
178
|
|
96
179
|
</br></br>
|
97
180
|
Copyright (c) 2015 - today, <a href="https://www.linkedin.com/in/tobiasuhlig/">Tobias Uhlig</a>
|
package/apps/ServiceWorker.mjs
CHANGED
package/apps/portal/index.html
CHANGED
@@ -42,18 +42,14 @@ class Colors extends FeatureSection {
|
|
42
42
|
* @member {String} paragraph
|
43
43
|
*/
|
44
44
|
paragraph: [
|
45
|
-
'
|
46
|
-
'
|
47
|
-
'
|
45
|
+
'Click the start button to see the view reflect changes in the data. And the app is multi-window: the table ',
|
46
|
+
'and charts can be undocked into their own windows. In fact, the entire demo can be undocked. ',
|
47
|
+
'All windows share the same data - less traffic and costs.'
|
48
48
|
].join(''),
|
49
49
|
/**
|
50
50
|
* @member {String} subHeadline='Socket Data'
|
51
51
|
*/
|
52
|
-
subHeadline: 'Shared Socket Data'
|
53
|
-
/**
|
54
|
-
* @member {String} textContainerPosition='end'
|
55
|
-
*/
|
56
|
-
textContainerPosition: 'end'
|
52
|
+
subHeadline: 'Shared Socket Data'
|
57
53
|
}
|
58
54
|
}
|
59
55
|
|
@@ -51,7 +51,11 @@ class Helix extends FeatureSection {
|
|
51
51
|
/**
|
52
52
|
* @member {String} subHeadline='40,000 Updates /s'
|
53
53
|
*/
|
54
|
-
subHeadline: '40,000 Updates /s'
|
54
|
+
subHeadline: '40,000 Updates /s',
|
55
|
+
/**
|
56
|
+
* @member {String} textContainerPosition='end'
|
57
|
+
*/
|
58
|
+
textContainerPosition: 'end'
|
55
59
|
}
|
56
60
|
}
|
57
61
|
|
@@ -14,7 +14,7 @@ const __dirname = path.resolve(),
|
|
14
14
|
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
15
15
|
packageJson = requireJson(path.join(__dirname, 'package.json')),
|
16
16
|
program = new Command(),
|
17
|
-
neoPath = path.resolve(packageJson.name
|
17
|
+
neoPath = path.resolve(packageJson.name.includes('neo.mjs') ? './' : './node_modules/neo.mjs/'),
|
18
18
|
webpackPath = path.resolve(neoPath, 'buildScripts/webpack'),
|
19
19
|
programName = `${packageJson.name} buildAll`,
|
20
20
|
questions = [];
|
@@ -14,7 +14,7 @@ const
|
|
14
14
|
cwd = process.cwd(),
|
15
15
|
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
16
16
|
packageJson = requireJson(path.resolve(cwd, 'package.json')),
|
17
|
-
insideNeo = packageJson.name
|
17
|
+
insideNeo = packageJson.name.includes('neo.mjs'),
|
18
18
|
neoPath = path.resolve(insideNeo ? './' : './node_modules/neo.mjs/'),
|
19
19
|
programName = `${packageJson.name} buildThemes`,
|
20
20
|
program = new Command(),
|
@@ -12,7 +12,7 @@ const
|
|
12
12
|
cwd = process.cwd(),
|
13
13
|
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
14
14
|
packageJson = requireJson(path.join(__dirname, 'package.json')),
|
15
|
-
insideNeo = packageJson.name
|
15
|
+
insideNeo = packageJson.name.includes('neo.mjs'),
|
16
16
|
neoPath = insideNeo ? './' : './node_modules/neo.mjs/',
|
17
17
|
addonChoices = fs.readdirSync(path.join(neoPath, '/src/main/addon')).map(item => item.slice(0, -4)),
|
18
18
|
program = new Command(),
|
@@ -11,7 +11,7 @@ const __dirname = path.resolve(),
|
|
11
11
|
cwd = process.cwd(),
|
12
12
|
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
13
13
|
packageJson = requireJson(path.join(__dirname, 'package.json')),
|
14
|
-
insideNeo = packageJson.name
|
14
|
+
insideNeo = packageJson.name.includes('neo.mjs'),
|
15
15
|
neoPath = insideNeo ? './' : './node_modules/neo.mjs/',
|
16
16
|
addonChoices = fs.readdirSync(path.join(neoPath, '/src/main/addon')).map(item => item.slice(0, -4)),
|
17
17
|
program = new Command(),
|
@@ -8,7 +8,7 @@ const __dirname = path.resolve(),
|
|
8
8
|
cwd = process.cwd(),
|
9
9
|
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
10
10
|
packageJson = requireJson(path.resolve(cwd, 'package.json')),
|
11
|
-
insideNeo = packageJson.name
|
11
|
+
insideNeo = packageJson.name.includes('neo.mjs'),
|
12
12
|
neoPath = insideNeo ? '' : 'node_modules/neo.mjs/',
|
13
13
|
appNames = [],
|
14
14
|
options = {
|
@@ -11,7 +11,7 @@ const
|
|
11
11
|
cwd = process.cwd(),
|
12
12
|
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
13
13
|
packageJson = requireJson(path.join(__dirname, 'package.json')),
|
14
|
-
insideNeo = packageJson.name
|
14
|
+
insideNeo = packageJson.name.includes('neo.mjs'),
|
15
15
|
neoPath = insideNeo ? './' : './node_modules/neo.mjs/',
|
16
16
|
programName = `${packageJson.name} inject-package-version`;
|
17
17
|
|
@@ -8,7 +8,7 @@ import * as sass from 'sass';
|
|
8
8
|
let cwd = process.cwd(),
|
9
9
|
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
10
10
|
packageJson = requireJson(path.resolve(cwd, 'package.json')),
|
11
|
-
neoPath = packageJson.name
|
11
|
+
neoPath = packageJson.name.includes('neo.mjs') ? './' : './node_modules/neo.mjs/',
|
12
12
|
mixinPath = path.resolve(neoPath, 'resources/scss/mixins/_all.scss'),
|
13
13
|
scssPath = path.resolve(cwd, 'resources/scss');
|
14
14
|
|
@@ -11,7 +11,7 @@ const __dirname = path.resolve(),
|
|
11
11
|
cpOpts = {env: process.env, cwd: cwd, stdio: 'inherit', shell: true},
|
12
12
|
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
13
13
|
packageJson = requireJson(path.resolve(cwd, 'package.json')),
|
14
|
-
neoPath = packageJson.name
|
14
|
+
neoPath = packageJson.name.includes('neo.mjs') ? './' : './node_modules/neo.mjs/',
|
15
15
|
program = new Command(),
|
16
16
|
webpackPath = path.resolve(neoPath, 'buildScripts/webpack'),
|
17
17
|
programName = `${packageJson.name} buildThreads`,
|
@@ -7,7 +7,7 @@ const cwd = process.cwd(),
|
|
7
7
|
cpOpts = {env: process.env, cwd: cwd, stdio: 'inherit', shell: true},
|
8
8
|
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
9
9
|
packageJson = requireJson(path.resolve(cwd, 'package.json')),
|
10
|
-
neoPath = packageJson.name
|
10
|
+
neoPath = packageJson.name.includes('neo.mjs') ? './' : './node_modules/neo.mjs/',
|
11
11
|
buildTarget = requireJson(path.resolve(neoPath, 'buildScripts/webpack/development/buildTarget.json')),
|
12
12
|
filenameConfig = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
|
13
13
|
plugins = [],
|
@@ -6,7 +6,7 @@ import WebpackHookPlugin from 'webpack-hook-plugin';
|
|
6
6
|
const cwd = process.cwd(),
|
7
7
|
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
8
8
|
packageJson = requireJson(path.resolve(cwd, 'package.json')),
|
9
|
-
insideNeo = packageJson.name
|
9
|
+
insideNeo = packageJson.name.includes('neo.mjs'),
|
10
10
|
neoPath = insideNeo ? './' : './node_modules/neo.mjs/',
|
11
11
|
buildTarget = requireJson(path.resolve(neoPath, 'buildScripts/webpack/development/buildTarget.json')),
|
12
12
|
filenameConfig = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
|
@@ -5,7 +5,7 @@ import webpack from 'webpack';
|
|
5
5
|
const cwd = process.cwd(),
|
6
6
|
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
7
7
|
packageJson = requireJson(path.resolve(cwd, 'package.json')),
|
8
|
-
neoPath = packageJson.name
|
8
|
+
neoPath = packageJson.name.includes('neo.mjs') ? './' : './node_modules/neo.mjs/',
|
9
9
|
buildTarget = requireJson(path.resolve(neoPath, 'buildScripts/webpack/development/buildTarget.json')),
|
10
10
|
filenameConfig = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
|
11
11
|
entry = {};
|
@@ -7,7 +7,7 @@ const cwd = process.cwd(),
|
|
7
7
|
cpOpts = {env: process.env, cwd: cwd, stdio: 'inherit', shell: true},
|
8
8
|
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
9
9
|
packageJson = requireJson(path.resolve(cwd, 'package.json')),
|
10
|
-
neoPath = packageJson.name
|
10
|
+
neoPath = packageJson.name.includes('neo.mjs') ? './' : './node_modules/neo.mjs/',
|
11
11
|
buildTarget = requireJson(path.resolve(neoPath, 'buildScripts/webpack/production/buildTarget.json')),
|
12
12
|
filenameConfig = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
|
13
13
|
plugins = [],
|
@@ -6,7 +6,7 @@ import WebpackHookPlugin from 'webpack-hook-plugin';
|
|
6
6
|
const cwd = process.cwd(),
|
7
7
|
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
8
8
|
packageJson = requireJson(path.resolve(cwd, 'package.json')),
|
9
|
-
insideNeo = packageJson.name
|
9
|
+
insideNeo = packageJson.name.includes('neo.mjs'),
|
10
10
|
neoPath = insideNeo ? './' : './node_modules/neo.mjs/',
|
11
11
|
buildTarget = requireJson(path.resolve(neoPath, 'buildScripts/webpack/production/buildTarget.json')),
|
12
12
|
filenameConfig = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
|
@@ -5,7 +5,7 @@ import webpack from 'webpack';
|
|
5
5
|
const cwd = process.cwd(),
|
6
6
|
requireJson = path => JSON.parse(fs.readFileSync((path))),
|
7
7
|
packageJson = requireJson(path.resolve(cwd, 'package.json')),
|
8
|
-
neoPath = packageJson.name
|
8
|
+
neoPath = packageJson.name.includes('neo.mjs') ? './' : './node_modules/neo.mjs/',
|
9
9
|
buildTarget = requireJson(path.resolve(neoPath, 'buildScripts/webpack/production/buildTarget.json')),
|
10
10
|
filenameConfig = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
|
11
11
|
entry = {};
|
package/examples/README.md
CHANGED
@@ -1,17 +1,8 @@
|
|
1
1
|
# Client Requirements
|
2
2
|
|
3
|
-
Running the examples locally
|
4
|
-
|
5
|
-
other browsers are not there yet (see sticky <a href="https://github.com/neomjs/neo/issues">issues</a>)
|
3
|
+
Running the examples locally works fine in all environments inside all major browsers at this point:
|
4
|
+
Chromium, Safari & Firefox
|
6
5
|
|
7
|
-
- localhost/neo/examples/component/helix/
|
8
|
-
|
9
|
-
More details on JS Modules (and their use within workers) here:
|
10
|
-
https://v8.dev/features/modules
|
11
|
-
|
12
|
-
Without the Chrome flag (or for other browsers like Firefox or Safari), you can run the examples using the webpack build
|
13
|
-
version (which converts JS modules into plain JS files)
|
14
|
-
- localhost/neo/dist/development/examples/component/helix/
|
15
6
|
|
16
7
|
# Local Web-Server Requirements
|
17
8
|
|
@@ -19,13 +10,14 @@ Why do I need a local web-server?
|
|
19
10
|
|
20
11
|
In short: it is possible to run the framework without a local web-server, but this would be a huge security issue.
|
21
12
|
You can start Chrome using a flag (--allow-file-access-from-files), but this will allow the browser to access any
|
22
|
-
file on your hard drive. To avoid this, a local web-server
|
13
|
+
file on your hard drive. To avoid this, a local web-server is the way to go.
|
23
14
|
|
24
15
|
**Webpack Dev Server**
|
25
16
|
`npm run server-start`
|
26
17
|
|
27
18
|
**All Servers**
|
28
|
-
Ensure your server has a mime-type configured for Javascript Modules (.mjs) files. This should be set to the same as
|
19
|
+
Ensure your server has a mime-type configured for Javascript Modules (.mjs) files. This should be set to the same as
|
20
|
+
normal javascript (.js) files, normally 'application/-javascript'.
|
29
21
|
|
30
22
|
**JetBrains IDE**
|
31
23
|
- Go to Preferences -> Build, Execution, Deployment -> Debugger
|
@@ -33,4 +25,3 @@ Ensure your server has a mime-type configured for Javascript Modules (.mjs) file
|
|
33
25
|
|
34
26
|
<br><br>
|
35
27
|
Copyright (c) 2015 - today, <a href="https://www.linkedin.com/in/tobiasuhlig/">Tobias Uhlig</a>
|
36
|
-
& <a href="https://www.linkedin.com/in/richwaters/">Rich Waters</a>
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "neo.mjs",
|
3
|
-
"version": "8.
|
3
|
+
"version": "8.32.0",
|
4
4
|
"description": "The webworkers driven UI framework",
|
5
5
|
"type": "module",
|
6
6
|
"repository": {
|
@@ -56,13 +56,13 @@
|
|
56
56
|
"envinfo": "^7.14.0",
|
57
57
|
"fs-extra": "^11.3.0",
|
58
58
|
"highlightjs-line-numbers.js": "^2.9.0",
|
59
|
-
"inquirer": "^12.
|
59
|
+
"inquirer": "^12.5.0",
|
60
60
|
"marked": "^15.0.7",
|
61
61
|
"monaco-editor": "0.50.0",
|
62
62
|
"neo-jsdoc": "1.0.1",
|
63
63
|
"neo-jsdoc-x": "1.0.5",
|
64
64
|
"postcss": "^8.5.3",
|
65
|
-
"sass": "^1.
|
65
|
+
"sass": "^1.86.0",
|
66
66
|
"siesta-lite": "5.5.2",
|
67
67
|
"url": "^0.11.4",
|
68
68
|
"webpack": "^5.98.0",
|
package/src/DefaultConfig.mjs
CHANGED
@@ -263,12 +263,12 @@ const DefaultConfig = {
|
|
263
263
|
useVdomWorker: true,
|
264
264
|
/**
|
265
265
|
* buildScripts/injectPackageVersion.mjs will update this value
|
266
|
-
* @default '8.
|
266
|
+
* @default '8.32.0'
|
267
267
|
* @memberOf! module:Neo
|
268
268
|
* @name config.version
|
269
269
|
* @type String
|
270
270
|
*/
|
271
|
-
version: '8.
|
271
|
+
version: '8.32.0'
|
272
272
|
};
|
273
273
|
|
274
274
|
Object.assign(DefaultConfig, {
|
@@ -159,16 +159,14 @@ class SettingsContainer extends Container {
|
|
159
159
|
onCardIndexChange(data) {
|
160
160
|
let me = this,
|
161
161
|
container = data.item,
|
162
|
-
mainContainer = me.getMainContainer()
|
163
|
-
listenerId;
|
162
|
+
mainContainer = me.getMainContainer();
|
164
163
|
|
165
164
|
if (mainContainer) {
|
166
165
|
if (Neo.isFunction(container.createContent) && container.items.length < 1) {
|
167
166
|
if (Neo.typeOf(mainContainer[`${container.flag}Component`]) !== 'NeoInstance') {
|
168
|
-
|
169
|
-
mainContainer.un('cardLoaded', listenerId);
|
167
|
+
mainContainer.on('cardLoaded', () => {
|
170
168
|
me.timeout(30).then(() => {container.createContent()})
|
171
|
-
})
|
169
|
+
}, me, {once: true})
|
172
170
|
} else {
|
173
171
|
me.timeout(30).then(() => {container.createContent()})
|
174
172
|
}
|
@@ -359,21 +359,19 @@ class Component extends BaseComponent {
|
|
359
359
|
import('./plugin/DragDrop.mjs'),
|
360
360
|
import('./plugin/EventResizable.mjs')
|
361
361
|
]).then(modules => {
|
362
|
-
let me
|
363
|
-
{appName
|
364
|
-
plugins
|
362
|
+
let me = this,
|
363
|
+
{appName} = me,
|
364
|
+
plugins = me.plugins || [];
|
365
365
|
|
366
366
|
plugins.push({
|
367
367
|
module : modules[0].default,
|
368
368
|
appName,
|
369
|
-
windowId,
|
370
369
|
...me.pluginDragDropConfig
|
371
370
|
}, {
|
372
371
|
module : modules[1].default,
|
373
372
|
appName,
|
374
373
|
delegationCls: 'neo-event',
|
375
374
|
directions : ['b', 't'],
|
376
|
-
windowId,
|
377
375
|
...me.pluginEventResizableConfig
|
378
376
|
});
|
379
377
|
|