@bobfrankston/msger 0.1.425 → 0.1.426
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/cli.js +16 -4
- package/msger-native/bin/msgernative.exe +0 -0
- package/package.json +1 -1
- package/shower.d.ts +3 -1
package/cli.js
CHANGED
|
@@ -46,8 +46,10 @@ Options:
|
|
|
46
46
|
-size <width,height> Set window size (e.g., -size 800,600)
|
|
47
47
|
-zoom <percent> Set zoom level as percentage (e.g., -zoom 150 for 150%)
|
|
48
48
|
-pos <x,y> Set window position (e.g., -pos 100,200)
|
|
49
|
-
-screen <number> Screen index for multi-monitor.
|
|
50
|
-
|
|
49
|
+
-screen <number> Screen index for multi-monitor. On its own it centers the
|
|
50
|
+
window on that screen; with -pos it offsets the coordinates
|
|
51
|
+
into it; and it picks which screen -fullscreen covers.
|
|
52
|
+
Indices follow the
|
|
51
53
|
physical layout (bottom row first, then left to right), NOT the
|
|
52
54
|
OS display numbering — index 0 is whichever monitor sorts first,
|
|
53
55
|
which is often NOT the primary. Run -list to see the mapping.
|
|
@@ -64,7 +66,14 @@ Options:
|
|
|
64
66
|
-fullscreen -screen <n> to cover one display, e.g.
|
|
65
67
|
msger -overlay -fullscreen -screen 1 -timeout 3 "2"
|
|
66
68
|
With -url/-raw the page must set its own transparent background.
|
|
67
|
-
-
|
|
69
|
+
-escape <mode> What the Escape key does:
|
|
70
|
+
exit = dismiss the window
|
|
71
|
+
noexit = Escape only goes to the page
|
|
72
|
+
auto = (default) decide from the window kind —
|
|
73
|
+
a dialog is dismissed, a -url window is not
|
|
74
|
+
In a -url window Escape belongs to the page (closing its
|
|
75
|
+
own menu/autocomplete), so msger no longer quits on it.
|
|
76
|
+
-no-escape-closes Same as -escape noexit (still exits fullscreen)
|
|
68
77
|
-reset Clear localStorage on startup (useful for resetting web content state)
|
|
69
78
|
-ontop Keep window always on top of other windows
|
|
70
79
|
-load <file> Load options from JSON file (supports comments)
|
|
@@ -116,7 +125,10 @@ Examples:
|
|
|
116
125
|
Notes:
|
|
117
126
|
- If no options are provided, all non-option arguments are concatenated as the message
|
|
118
127
|
- Message text supports ANSI color codes (automatically converted to HTML)
|
|
119
|
-
- Press ESC to dismiss
|
|
128
|
+
- Press ESC to dismiss a dialog (returns dismissed: true). ESC does NOT close a
|
|
129
|
+
-url window by default — use -escape exit if you want it to
|
|
130
|
+
- Every result carries exitReason (escape / closeRequested / timeout / page /
|
|
131
|
+
render) so you can tell why a window went away; set MSGER_DIAG=1 to also log it
|
|
120
132
|
- Press Enter to click the last (default) button
|
|
121
133
|
- Default button is OK if no buttons specified
|
|
122
134
|
- Much faster than Electron-based msgview (~50-200ms vs ~2-3s startup)
|
|
Binary file
|
package/package.json
CHANGED
package/shower.d.ts
CHANGED
|
@@ -43,7 +43,8 @@ export interface MessageBoxOptions {
|
|
|
43
43
|
timeout?: number; /** Auto-close the message box after specified seconds */
|
|
44
44
|
detach?: boolean; /** Launch the message box detached from parent process */
|
|
45
45
|
fullscreen?: boolean; /** Start window in fullscreen mode (F11 to toggle, Escape to exit) */
|
|
46
|
-
escapeCloses?: boolean; /**
|
|
46
|
+
escapeCloses?: boolean; /** Legacy boolean form of `escape`: true = Escape dismisses the window, false = it never does. Leave it UNDEFINED to get `escape: 'auto'`. Always exits fullscreen first either way. */
|
|
47
|
+
escape?: 'exit' | 'noexit' | 'auto'; /** What the Escape key does. 'exit' = dismiss the window; 'noexit' = Escape only goes to the page; 'auto' (default) = decide from the window kind — a dialog (message/html/prompt) is dismissed, a `url` window is NOT, because there Esc belongs to the page (closing its menu, autocomplete, lightbox) and a host that quits on it looks like msger "exiting spontaneously". Service mode never exits on Escape. Overrides `escapeCloses` when both are given. */
|
|
47
48
|
reset?: boolean; /** Clear localStorage on startup (default: false) */
|
|
48
49
|
icon?: string; /** Path to window icon. Decoded for the runtime title-bar / taskbar icon. PNG decodes most reliably; the `image` crate's ICO+PNG path is fragile. */
|
|
49
50
|
relaunchIcon?: string; /** Optional path forwarded to `PKEY_AppUserModel_RelaunchIconResource` so pinned taskbar shortcuts get the app's own icon. Must be a `.ico`. Path is consumed verbatim (no decode). */
|
|
@@ -89,6 +90,7 @@ export interface MessageBoxResult {
|
|
|
89
90
|
};
|
|
90
91
|
render?: RenderResult; /** Captured screenshot (render mode) */
|
|
91
92
|
renderError?: string; /** Why render mode produced no image — the result promise rejects with this */
|
|
93
|
+
exitReason?: string; /** WHY the window went away: 'escape', 'closeRequested', 'timeout', 'render', or 'page' (the page posted a result — button click, msgapi.close(), form submit). Answers "it exited spontaneously" without guessing; MSGER_DIAG=1 logs the same line to msger-diag.log. */
|
|
92
94
|
}
|
|
93
95
|
/** Set the app name used for the per-user bin dir AND the per-app exe filename.
|
|
94
96
|
* Call before showService/showMessageBox — e.g. `setAppName("mailx")` makes
|