muon-ui 0.15.0 → 0.17.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/README.md +88 -40
- package/dist/cli.cjs +5 -5
- package/dist/cli.cjs.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.mjs +2 -2
- package/dist/native/linux-amd64/muon-builder +0 -0
- package/dist/native/linux-amd64/muon-launcher +0 -0
- package/dist/native/linux-amd64/muon-plugin-inspector +0 -0
- package/dist/native/linux-amd64/muon-runtime-helper +0 -0
- package/dist/native/linux-arm64/muon-builder +0 -0
- package/dist/native/linux-arm64/muon-launcher +0 -0
- package/dist/native/linux-arm64/muon-plugin-inspector +0 -0
- package/dist/native/linux-arm64/muon-runtime-helper +0 -0
- package/dist/native/linux-armhf/muon-builder +0 -0
- package/dist/native/linux-armhf/muon-launcher +0 -0
- package/dist/native/linux-armhf/muon-plugin-inspector +0 -0
- package/dist/native/linux-armhf/muon-runtime-helper +0 -0
- package/dist/native/muon-256.png +0 -0
- package/dist/native/windows-amd64/muon-builder.exe +0 -0
- package/dist/native/windows-amd64/muon-launcher.exe +0 -0
- package/dist/native/windows-amd64/muon-plugin-inspector.exe +0 -0
- package/dist/native/windows-i686/muon-builder.exe +0 -0
- package/dist/native/windows-i686/muon-launcher.exe +0 -0
- package/dist/native/windows-i686/muon-plugin-inspector.exe +0 -0
- package/dist/runtime/linux-amd64/muon-core +0 -0
- package/dist/runtime/linux-arm64/muon-core +0 -0
- package/dist/runtime/linux-armhf/muon-core +0 -0
- package/dist/runtime/windows-amd64/libcardio.dll +0 -0
- package/dist/runtime/windows-amd64/libmuon-ui.dll +0 -0
- package/dist/runtime/windows-amd64/muon-core.exe +0 -0
- package/dist/runtime/windows-i686/libcardio.dll +0 -0
- package/dist/runtime/windows-i686/libmuon-ui.dll +0 -0
- package/dist/runtime/windows-i686/muon-core.exe +0 -0
- package/dist/{vite-internals-BNuD6EFm.cjs → vite-internals-BOAXlmwz.cjs} +13 -4
- package/dist/{vite-internals-BNuD6EFm.cjs.map → vite-internals-BOAXlmwz.cjs.map} +1 -1
- package/dist/vite.cjs +241 -16
- package/dist/vite.cjs.map +1 -1
- package/dist/vite.mjs +261 -30
- package/dist/vite.mjs.map +1 -1
- package/images/muon-120.png +0 -0
- package/muon.d.ts +2 -1
- package/package.json +7 -7
- package/vite.d.ts +9 -0
package/README.md
CHANGED
|
@@ -9,74 +9,122 @@ A multi-platform GUI application framework that uses CEF as its backend.
|
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
12
|
-
## What is
|
|
12
|
+
## What is this?
|
|
13
13
|
|
|
14
|
-
Have you ever
|
|
15
|
-
|
|
14
|
+
Have you ever wanted to update an aging native GUI application into a modern application?
|
|
15
|
+
Application replacement is extremely complex, and it has always been a hard problem.
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
Even so, everyone wants to modernize
|
|
17
|
+
The causes vary widely, so there is no magic solution that makes everything easy.
|
|
18
|
+
Even so, everyone wants to modernize with as little cost as possible.
|
|
19
19
|
|
|
20
|
-
muon (
|
|
21
|
-
You
|
|
20
|
+
muon (pronounced "muon") is a multi-platform GUI application framework that uses CEF (Chromium Embedded Framework).
|
|
21
|
+
You have probably heard of similar projects such as [Electron](https://www.electronjs.org/).
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
In other words, it
|
|
23
|
+
Roughly speaking, muon is framework software in the same category.
|
|
24
|
+
In other words, it lets you implement local GUI applications as web applications.
|
|
25
25
|
|
|
26
|
-
With muon, you can build native applications using the most
|
|
26
|
+
With muon, you can build native applications using the most mature and widely used browser UI frameworks, such as React and Vue.
|
|
27
27
|
|
|
28
28
|

|
|
29
29
|
|
|
30
|
-
So
|
|
30
|
+
So how is muon different from earlier framework software?
|
|
31
31
|
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
muon specializes in local GUI application development by using a whitelist approach for access to external web resources.
|
|
33
|
+
In practice, access is denied by default.
|
|
34
34
|
|
|
35
|
-
You
|
|
36
|
-
However,
|
|
35
|
+
You may think that using CEF without access to websites around the world is a waste.
|
|
36
|
+
However, we believe that this is the biggest reason existing solutions have become very complex and difficult to handle.
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
muon also does not completely forbid access to external resources.
|
|
39
|
+
Because the policy is whitelist-based, permitted websites remain accessible.
|
|
40
40
|
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
muon also includes a plugin system with fully asynchronous processing for interoperability with native libraries.
|
|
42
|
+
These features are enabled from explicit configuration, so unused capabilities are not left open.
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
You can also use remote DevTools from Chromium/Chrome
|
|
44
|
+
Because muon is based on CEF, Chromium features such as WebGL, WebGPU, WebAssembly, Web workers, and Local storage are available as expected.
|
|
45
|
+
DevTools can be shown. CDP (Chrome DevTools Protocol) is also available, so you can debug with VS Code, connect Playwright, or control the app externally.
|
|
46
|
+
You can also use remote DevTools from Chromium/Chrome through `chrome://inspect/`.
|
|
47
47
|
|
|
48
|
-
In short,
|
|
49
|
-
you
|
|
48
|
+
In short, muon clearly removes one of the major problems that appears when migrating GTK/Qt/Windows native applications to web applications.
|
|
49
|
+
This lets you build modern local GUI applications with the web technology ecosystem.
|
|
50
|
+
|
|
51
|
+
muon also minimizes the steps required to create a muon application, keeping the barrier to entry low.
|
|
52
|
+
With the minimal setup, installing the NPM package and adding one line to the configuration file is enough to launch your first muon app.
|
|
50
53
|
|
|
51
54
|
### Features
|
|
52
55
|
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
- The browser
|
|
56
|
-
-
|
|
57
|
-
-
|
|
58
|
-
-
|
|
59
|
-
-
|
|
60
|
-
-
|
|
61
|
-
- It features a plugin system. Plugin functionality can be restricted using a whitelist filter.
|
|
62
|
-
- Using built-in plugins, you can access local files, open dialogs, launch child processes, and manipulate windows.
|
|
63
|
-
- It supports packages for Linux (deb) and Windows (NSIS), as well as portable operation.
|
|
56
|
+
- Restricts all network access through a whitelist filter, letting you completely exclude problematic content.
|
|
57
|
+
- Provided as an easy-to-use NPM package, so you can turn your web application project into a native GUI application without complex configuration or changes.
|
|
58
|
+
- The rendering browser is CEF (Chromium Embedded Framework). From the web application's point of view, this is almost the same as using Chromium or Chrome.
|
|
59
|
+
- Supports the Vite plugin system. It also supports Vite HMR, so previews update in real time during development.
|
|
60
|
+
- Supports Linux (deb) and Windows (NSIS) package generation, and portable distribution.
|
|
61
|
+
- DevTools can be used. CDP (Chrome DevTools Protocol) is also supported, so remote debugging from external tools is possible.
|
|
62
|
+
- Includes a plugin system. Plugin capabilities can also be restricted by a whitelist filter.
|
|
63
|
+
- Built-in plugins provide access to local files, open dialogs, child process launching, and window operations.
|
|
64
64
|
|
|
65
65
|
### Environment
|
|
66
66
|
|
|
67
|
-
- Supports the following architectures
|
|
68
|
-
- Linux: amd64,
|
|
67
|
+
- Supports the following architectures from the official CEF binary architectures:
|
|
68
|
+
- Linux: amd64, armhf, arm64
|
|
69
69
|
- Windows: i686, amd64
|
|
70
|
-
- Build
|
|
70
|
+
- Build environment
|
|
71
71
|
- Node.js 20 or later
|
|
72
|
-
- Vite 5 or later
|
|
72
|
+
- Vite 5 or later
|
|
73
73
|
|
|
74
74
|
---
|
|
75
75
|
|
|
76
|
-
|
|
76
|
+
## How to enable muon on your project
|
|
77
|
+
|
|
78
|
+
### Install the muon package
|
|
79
|
+
|
|
80
|
+
Install the muon package, officially named `muon-ui`, into `devDependencies`:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm install -D muon-ui
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
The muon package includes the following:
|
|
87
|
+
|
|
88
|
+
- muon CLI
|
|
89
|
+
- muon Vite plugin
|
|
90
|
+
- TypeScript type definitions for muon built-in plugins
|
|
91
|
+
- Platform-specific muon binary assets
|
|
92
|
+
|
|
93
|
+
The CEF binary itself is not included in the NPM package.
|
|
94
|
+
CEF is downloaded from the official CDN when it becomes necessary.
|
|
95
|
+
|
|
96
|
+
### Configure the muon Vite plugin
|
|
97
|
+
|
|
98
|
+
Installing the muon package almost completes the preparation, but you should enable the muon Vite plugin so that HMR (Hot Module Replacement) and muon app builds are available.
|
|
99
|
+
|
|
100
|
+
For anyone unfamiliar with HMR, Vite acts as a development server, lets a browser show the page, and updates the display almost in real time when the page is edited.
|
|
101
|
+
In other words, it is a very useful feature that automatically previews edit results.
|
|
102
|
+
|
|
103
|
+
The muon Vite plugin supports HMR by launching muon instead of a browser and making HMR work inside the muon app.
|
|
104
|
+
Add the following code to `vite.config.ts` to enable it:
|
|
105
|
+
|
|
106
|
+
```ts
|
|
107
|
+
import { defineConfig } from 'vite'
|
|
108
|
+
import react from '@vitejs/plugin-react'
|
|
109
|
+
import muon from 'muon-ui/vite'
|
|
110
|
+
|
|
111
|
+
export default defineConfig({
|
|
112
|
+
plugins: [
|
|
113
|
+
react(), // React plugin
|
|
114
|
+
muon(), // muon plugin (add this)
|
|
115
|
+
],
|
|
116
|
+
})
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
Add `muon()` to the `plugins` array in the `defineConfig()` argument.
|
|
120
|
+
This enables the muon Vite plugin. Preparation is now complete.
|
|
77
121
|
|
|
78
122
|
---
|
|
79
123
|
|
|
124
|
+
## Documents
|
|
125
|
+
|
|
126
|
+
For more information, [please visit the repository](https://github.com/kekyo/muon-ui/).
|
|
127
|
+
|
|
80
128
|
## License
|
|
81
129
|
|
|
82
130
|
Under MIT.
|
package/dist/cli.cjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/*!
|
|
3
3
|
* name: muon-ui
|
|
4
|
-
* version: 0.
|
|
4
|
+
* version: 0.17.0
|
|
5
5
|
* description: A multi-platform GUI application framework that uses CEF as its backend
|
|
6
6
|
* author: Kouji Matsui (@kekyo@mi.kekyo.net)
|
|
7
7
|
* license: MIT
|
|
8
8
|
* repository.url: https://github.com/kekyo/muon-ui.git
|
|
9
|
-
* git.commit.hash:
|
|
9
|
+
* git.commit.hash: 1092f3c406f2ebfe9f5938ec51b70bea9f84a6ca
|
|
10
10
|
*/
|
|
11
|
-
const require_vite_internals = require("./vite-internals-
|
|
11
|
+
const require_vite_internals = require("./vite-internals-BOAXlmwz.cjs");
|
|
12
12
|
let commander = require("commander");
|
|
13
13
|
let node_child_process = require("node:child_process");
|
|
14
14
|
let node_fs = require("node:fs");
|
|
@@ -1093,8 +1093,8 @@ var packMuonApp = async (options) => {
|
|
|
1093
1093
|
};
|
|
1094
1094
|
//#endregion
|
|
1095
1095
|
//#region src/generated/packageMetadata.ts
|
|
1096
|
-
var version = "0.
|
|
1097
|
-
var git_commit_hash = "
|
|
1096
|
+
var version = "0.17.0";
|
|
1097
|
+
var git_commit_hash = "1092f3c406f2ebfe9f5938ec51b70bea9f84a6ca";
|
|
1098
1098
|
//#endregion
|
|
1099
1099
|
//#region src/cli.ts
|
|
1100
1100
|
var readTargetValues = (value) => {
|