nanoshell 1.7.7 → 1.7.9

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 CHANGED
@@ -1,4 +1,4 @@
1
- # NanoShell ⚡ (`nanoshell@1.7.7`)
1
+ # NanoShell ⚡ (`nanoshell@1.7.9`)
2
2
 
3
3
  > **Created & Engineered by Suman Biswas** 👑
4
4
  > *Hyper-lightweight 17MB RAM, 120 FPS Native WebKit Desktop Application Framework & Runtime Engine*
@@ -19,7 +19,30 @@
19
19
 
20
20
  ---
21
21
 
22
- ## 🆕 What's New in v1.7.7
22
+ ## 🚀 Quick Start (Modern `npm create` Standards)
23
+
24
+ ```bash
25
+ # 1. Scaffold a new application project (Always fetches latest release)
26
+ npm create nanoshell my-awesome-app
27
+
28
+ # 2. Start Development Mode (In-Window Hot Reloading on Ctrl+S)
29
+ cd my-awesome-app
30
+ npm start
31
+
32
+ # 3. Build Standalone Production Binary (.exe)
33
+ npm run build
34
+
35
+ # 4. Package Windows Installer (.exe + Setup.exe via Inno Setup)
36
+ npm run package
37
+ ```
38
+
39
+ ---
40
+
41
+ ## 🆕 What's New in v1.7.9
42
+
43
+ ### 🌟 Seamless `npm create nanoshell` & Interactive Prompt
44
+ - **Word-for-Word Scaffolding**: Published `create-nanoshell` package so `npm create nanoshell` works natively without 404 errors or stale `npx` cache issues.
45
+ - **Interactive Scaffolding**: Running `npm create nanoshell` without arguments now interactively prompts for the project name.
23
46
 
24
47
  ### 🪟 Pure Native Win32 Windowing & Full API Control
25
48
  - **Zero Windowing Wrappers**: Fully excised AppCore window wrappers to give direct, un-sandboxed `HWND` control to native Zig code.
@@ -31,10 +54,10 @@
31
54
  - **Pixel-Accurate Hit-Testing**: Mouse input coordinates `(x, y)` are dynamically converted from Windows physical pixels to WebKit logical CSS coordinates (`toLogical = physical / dpi_scale`). Clicks, hovers, and drags land pixel-perfectly on DOM elements at any DPI.
32
55
  - **High-Quality GDI Halftone Blitting**: `SetStretchBltMode(HALFTONE)` ensures razor-sharp text and graphics rendering.
33
56
 
34
- ### 📦 Automatic Out-of-the-Box Windows Installer (`nanoshell package`)
57
+ ### 📦 Automatic Out-of-the-Box Windows Installer (`npm run package`)
35
58
  - Generate full-featured Windows Setup installers (`.exe`) with **one single command**:
36
59
  ```bash
37
- npx nanoshell package
60
+ npm run package
38
61
  ```
39
62
  - **Inno Setup Integration**: Auto-detects local or system Inno Setup (`ISCC.exe`), generates `setup.iss`, and builds single-file installers in `dist/` with Start Menu, Desktop shortcuts, and Control Panel Uninstaller support.
40
63
 
package/SKILL.md CHANGED
@@ -3,7 +3,7 @@ name: nanoshell-desktop-framework
3
3
  description: Build ultra-fast, 120 FPS, 17MB RAM native desktop applications using HTML, CSS, JS, and Zig with the NanoShell runtime engine (nanoshell) created by Suman Biswas. Includes Per-Monitor DPI V2 crisp scaling and Win32 direct windowing.
4
4
  ---
5
5
 
6
- # NanoShell Native Desktop Framework Skill Guide (`nanoshell@1.7.7`)
6
+ # NanoShell Native Desktop Framework Skill Guide (`nanoshell@1.7.9`)
7
7
 
8
8
  **Created & Engineered by Suman Biswas**
9
9
 
@@ -13,22 +13,22 @@ NanoShell is a hyper-lightweight, browser-free native desktop application framew
13
13
 
14
14
  ## Starter Template Scaffolding Command
15
15
 
16
- AI agents or developers can scaffold a new application using:
16
+ AI agents or developers can scaffold a new application using modern `npm create` standards (always fetches `@latest` without stale caching):
17
17
 
18
18
  ```bash
19
- npx nanoshell <app-name> # Scaffold new app template
20
- npx nanoshell start # Launch dev engine with hot-reloading
21
- npx nanoshell build # Build production release binary only
22
- npx nanoshell package # Build binary and generate Windows Inno Setup installer (.exe)
19
+ npm create nanoshell <app-name> # Scaffold new app template (or run without args for interactive prompt)
20
+ npm start # Launch dev engine with hot-reloading
21
+ npm run build # Build production release binary only
22
+ npm run package # Build binary and generate Windows Inno Setup installer (.exe)
23
23
  ```
24
24
 
25
- `npx nanoshell package` generates a single-file Windows Setup `.exe` with a installer dialog allowing end-users to choose:
25
+ `npm run package` generates a single-file Windows Setup `.exe` with a installer dialog allowing end-users to choose:
26
26
  - **Per-User Install** (No admin rights required, installs to `%LocalAppData%`)
27
27
  - **System-Wide Install** (Requires admin rights, installs to `Program Files`)
28
28
 
29
29
  ---
30
30
 
31
- ## ⚡ v1.7.7 Engine Architecture & High-DPI Rules for AI Agents
31
+ ## ⚡ v1.7.9 Engine Architecture & High-DPI Rules for AI Agents
32
32
 
33
33
  1. **Pure Win32 Subsystem**: Runs on `.Windows` subsystem with zero background CMD console windows.
34
34
  2. **Per-Monitor DPI V2 Aware**: Integrates `DPI_AWARENESS_CONTEXT_PER_MONITOR_AWARE_V2`. Window client sizes are automatically scaled physically (`physical_size = logical_size * dpi_scale`).
package/cli/index.js CHANGED
@@ -36,7 +36,34 @@ if (!fs.existsSync(exePath)) {
36
36
  exePath = path.join(pkgDir, 'bin', 'nanoshell.exe');
37
37
  }
38
38
 
39
- const args = process.argv.slice(2);
39
+ const readline = require('readline');
40
+
41
+ let args = process.argv.slice(2);
42
+
43
+ // If no arguments provided (e.g. npm create nanoshell), prompt interactively for app name
44
+ if (args.length === 0) {
45
+ const rl = readline.createInterface({
46
+ input: process.stdin,
47
+ output: process.stdout
48
+ });
49
+
50
+ console.log(`\x1b[36m\x1b[1m
51
+ ⚡ NanoShell Native Desktop Framework Scaffolder (v${pkg.version})
52
+ Created & Engineered by Suman Biswas
53
+ \x1b[0m`);
54
+
55
+ const defaultAppName = 'my-nanoshell-app';
56
+ rl.question(`? Project name: \x1b[36m(${defaultAppName})\x1b[0m `, (answer) => {
57
+ rl.close();
58
+ const appName = answer.trim() || defaultAppName;
59
+ console.log(`\n🚀 Scaffolding new NanoShell project in .\\${appName}...\n`);
60
+
61
+ // Re-invoke self with the project name argument
62
+ const execRes = spawnSync(process.execPath, [__filename, appName], { stdio: 'inherit' });
63
+ process.exit(execRes.status || 0);
64
+ });
65
+ return;
66
+ }
40
67
 
41
68
  // Handle "package" command directly in JS CLI runner
42
69
  if (args.length > 0 && (args[0] === 'package' || args[0] === 'installer')) {
package/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "nanoshell",
3
- "version": "1.7.7",
3
+ "version": "1.7.9",
4
4
  "description": "Hyper-lightweight native desktop application framework. 17MB RAM, 120 FPS, pure Win32 DPI-aware windowing with WebKit rendering. No Electron. Created by Suman Biswas.",
5
5
  "main": "cli/index.js",
6
6
  "bin": {
7
7
  "nanoshell": "cli/index.js",
8
+ "create-nanoshell": "cli/index.js",
8
9
  "create-nanoshell-app": "cli/index.js"
9
10
  },
10
11
  "files": [
@@ -24,7 +25,8 @@
24
25
  "build": "zig build -Doptimize=ReleaseFast",
25
26
  "package": "node cli/index.js package",
26
27
  "start": "zig-out/bin/example_app.exe",
27
- "init": "zig-out/bin/nanoshell.exe init"
28
+ "init": "zig-out/bin/nanoshell.exe init",
29
+ "pub": "npm publish --access public && cd create-nanoshell && npm publish --access public && cd .."
28
30
  },
29
31
  "keywords": [
30
32
  "nanoshell",