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.
Files changed (43) hide show
  1. package/README.md +88 -40
  2. package/dist/cli.cjs +5 -5
  3. package/dist/cli.cjs.map +1 -1
  4. package/dist/index.cjs +2 -2
  5. package/dist/index.mjs +2 -2
  6. package/dist/native/linux-amd64/muon-builder +0 -0
  7. package/dist/native/linux-amd64/muon-launcher +0 -0
  8. package/dist/native/linux-amd64/muon-plugin-inspector +0 -0
  9. package/dist/native/linux-amd64/muon-runtime-helper +0 -0
  10. package/dist/native/linux-arm64/muon-builder +0 -0
  11. package/dist/native/linux-arm64/muon-launcher +0 -0
  12. package/dist/native/linux-arm64/muon-plugin-inspector +0 -0
  13. package/dist/native/linux-arm64/muon-runtime-helper +0 -0
  14. package/dist/native/linux-armhf/muon-builder +0 -0
  15. package/dist/native/linux-armhf/muon-launcher +0 -0
  16. package/dist/native/linux-armhf/muon-plugin-inspector +0 -0
  17. package/dist/native/linux-armhf/muon-runtime-helper +0 -0
  18. package/dist/native/muon-256.png +0 -0
  19. package/dist/native/windows-amd64/muon-builder.exe +0 -0
  20. package/dist/native/windows-amd64/muon-launcher.exe +0 -0
  21. package/dist/native/windows-amd64/muon-plugin-inspector.exe +0 -0
  22. package/dist/native/windows-i686/muon-builder.exe +0 -0
  23. package/dist/native/windows-i686/muon-launcher.exe +0 -0
  24. package/dist/native/windows-i686/muon-plugin-inspector.exe +0 -0
  25. package/dist/runtime/linux-amd64/muon-core +0 -0
  26. package/dist/runtime/linux-arm64/muon-core +0 -0
  27. package/dist/runtime/linux-armhf/muon-core +0 -0
  28. package/dist/runtime/windows-amd64/libcardio.dll +0 -0
  29. package/dist/runtime/windows-amd64/libmuon-ui.dll +0 -0
  30. package/dist/runtime/windows-amd64/muon-core.exe +0 -0
  31. package/dist/runtime/windows-i686/libcardio.dll +0 -0
  32. package/dist/runtime/windows-i686/libmuon-ui.dll +0 -0
  33. package/dist/runtime/windows-i686/muon-core.exe +0 -0
  34. package/dist/{vite-internals-BNuD6EFm.cjs → vite-internals-BOAXlmwz.cjs} +13 -4
  35. package/dist/{vite-internals-BNuD6EFm.cjs.map → vite-internals-BOAXlmwz.cjs.map} +1 -1
  36. package/dist/vite.cjs +241 -16
  37. package/dist/vite.cjs.map +1 -1
  38. package/dist/vite.mjs +261 -30
  39. package/dist/vite.mjs.map +1 -1
  40. package/images/muon-120.png +0 -0
  41. package/muon.d.ts +2 -1
  42. package/package.json +7 -7
  43. 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 This?
12
+ ## What is this?
13
13
 
14
- Have you ever thought about how to update an outdated native GUI application into a modern one?
15
- Replacing applications is extremely complex and has always been a challenge for us.
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
- Since the causes are so varied, there is no "magic solution" that promises, "Use this method, and it'll be easily solved!"
18
- Even so, everyone wants to modernize their applications at the lowest possible cost.
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 (/ˈmjuːɒn/) is a multiplatform GUI application framework that uses CEF (Chromium Embedded Framework).
21
- You’ve probably heard of several similar projects, such as [Electron](https://www.electronjs.org/).
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
- To put it simply, muon is a framework that occupies the same niche as those projects.
24
- In other words, it’s software that allows you to implement locally running GUI applications as web applications.
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 advanced and widely used browser-based UI frameworks, such as React and Vue.
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
  ![vscode](./images/vscode.png)
29
29
 
30
- So, how does muon differ from earlier framework solutions?
30
+ So how is muon different from earlier framework software?
31
31
 
32
- It specializes in GUI application development within a local environment by using a whitelist approach (with a "deny-by-default" policy)
33
- for accessing external web resources.
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 might think, "It's a waste to use CEF without being able to access websites around the world!"
36
- However, I believe that is precisely the biggest problem with existing solutions—they've become extremely complex and difficult to manage.
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
- Furthermore, muon isn't completely unable to access external resources; since it uses a whitelist approach,
39
- you can still access permitted websites.
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
- It also features a plugin system that supports fully asynchronous processing, enabling interoperability with native libraries.
42
- Since these features become available based on pre-configured settings, there's no risk of unused functionality running unchecked.
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
- Since it's CEF-based, you can naturally use features expected in Chromium, such as WebGL, WebGPU, WebAssembly, Web Workers, and Local Storage.
45
- You can also display DevTools. Because it supports CDP (Chromium DevTools Protocol), you can debug using tools like VS Code or connect and control it via Playwright.
46
- You can also use remote DevTools from Chromium/Chrome via `chrome://inspect/`.
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, by clearly eliminating one of the major issues that arise when migrating native GTK/Qt/Windows applications to web applications,
49
- you can develop modern local GUI applications using the web-based technology ecosystem.
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
- - By restricting all network access with a whitelist filter, you can completely block problematic content.
54
- - It is provided as an easy-to-use NPM package, allowing you to easily turn your web application project into a native GUI application. No complex configuration or modifications are required.
55
- - The browser responsible for rendering is CEF (Chromium Embedded Framework). This means that, from the perspective of the web application, it is virtually equivalent to using Chromium or Chrome.
56
- - It supports Vite plugins. Since it supports Vite’s HMR, you can preview real-time updates during development.
57
- - With `muon run`, you can launch a development environment that uses local assets directly without starting an HTTP server.
58
- - You can include the Linux desktop launcher and icon metadata in your distribution build.
59
- - You can use DevTools. Furthermore, since it supports CDP (Chromium DevTools Protocol), you can perform remote debugging from an external source.
60
- - You can display multiple browser windows. Browser windows can also be organized into a parent-child hierarchy.
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 among those supported by the official CEF binaries:
68
- - Linux: amd64, armv7l, arm64
67
+ - Supports the following architectures from the official CEF binary architectures:
68
+ - Linux: amd64, armhf, arm64
69
69
  - Windows: i686, amd64
70
- - Build Environment
70
+ - Build environment
71
71
  - Node.js 20 or later
72
- - Vite 5 or later (optional)
72
+ - Vite 5 or later
73
73
 
74
74
  ---
75
75
 
76
- TODO:
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.15.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: a54e20c0496ee705422cfec16a02933146163e63
9
+ * git.commit.hash: 1092f3c406f2ebfe9f5938ec51b70bea9f84a6ca
10
10
  */
11
- const require_vite_internals = require("./vite-internals-BNuD6EFm.cjs");
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.15.0";
1097
- var git_commit_hash = "a54e20c0496ee705422cfec16a02933146163e63";
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) => {