plusui-native-core 0.1.104 → 0.1.106

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 (49) hide show
  1. package/Core/.claude/settings.local.json +7 -0
  2. package/Core/CMakeLists.txt +1 -1
  3. package/Core/Features/API/Connect_API.ts +20 -52
  4. package/Core/Features/API/app-api.ts +28 -28
  5. package/Core/Features/API/browser-api.ts +38 -38
  6. package/Core/Features/API/clipboard-api.ts +21 -21
  7. package/Core/Features/API/display-api.ts +33 -33
  8. package/Core/Features/API/keyboard-api.ts +33 -33
  9. package/Core/Features/API/menu-api.ts +39 -39
  10. package/Core/Features/API/router-api.ts +23 -23
  11. package/Core/Features/API/tray-api.ts +22 -22
  12. package/Core/Features/API/webgpu-api.ts +55 -55
  13. package/Core/Features/App/app.cpp +128 -102
  14. package/Core/Features/Browser/browser.cpp +227 -227
  15. package/Core/Features/Browser/browser.ts +161 -161
  16. package/Core/Features/Clipboard/clipboard.cpp +235 -235
  17. package/Core/Features/Display/display.cpp +212 -212
  18. package/Core/Features/FileDrop/filedrop.cpp +448 -324
  19. package/Core/Features/FileDrop/filedrop.css +421 -421
  20. package/Core/Features/FileDrop/filedrop.ts +5 -9
  21. package/Core/Features/Keyboard/keyboard_linux.cpp +4 -0
  22. package/Core/Features/Router/router.cpp +62 -62
  23. package/Core/Features/Router/router.ts +113 -113
  24. package/Core/Features/Tray/tray.cpp +328 -324
  25. package/Core/Features/WebGPU/webgpu.cpp +948 -948
  26. package/Core/Features/Window/webview.cpp +1026 -1014
  27. package/Core/Features/Window/webview.ts +516 -516
  28. package/Core/Features/Window/window.cpp +2265 -1988
  29. package/Core/include/plusui/api.hpp +237 -237
  30. package/Core/include/plusui/app.hpp +33 -33
  31. package/Core/include/plusui/browser.hpp +67 -67
  32. package/Core/include/plusui/clipboard.hpp +41 -41
  33. package/Core/include/plusui/connect.hpp +340 -340
  34. package/Core/include/plusui/connection.hpp +3 -3
  35. package/Core/include/plusui/display.hpp +90 -90
  36. package/Core/include/plusui/filedrop.hpp +92 -77
  37. package/Core/include/plusui/keyboard.hpp +112 -112
  38. package/Core/include/plusui/menu.hpp +153 -153
  39. package/Core/include/plusui/plusui +18 -18
  40. package/Core/include/plusui/router.hpp +42 -42
  41. package/Core/include/plusui/tray.hpp +94 -94
  42. package/Core/include/plusui/webgpu.hpp +434 -434
  43. package/Core/include/plusui/window.hpp +180 -177
  44. package/Core/scripts/generate-umbrella-header.mjs +77 -77
  45. package/Core/vendor/WebView2EnvironmentOptions.h +406 -406
  46. package/Core/vendor/webview.h +487 -487
  47. package/Core/vendor/webview2.h +52079 -52079
  48. package/README.md +19 -19
  49. package/package.json +1 -1
@@ -0,0 +1,7 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(cmake:*)"
5
+ ]
6
+ }
7
+ }
@@ -231,7 +231,7 @@ else()
231
231
  pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
232
232
  pkg_check_modules(WEBKIT2 REQUIRED webkit2gtk-4.0)
233
233
  target_include_directories(plusui PRIVATE ${GTK3_INCLUDE_DIRS} ${WEBKIT2_INCLUDE_DIRS})
234
- target_link_libraries(plusui PRIVATE ${GTK3_LIBRARIES} ${WEBKIT2_LIBRARIES})
234
+ target_link_libraries(plusui PRIVATE ${GTK3_LIBRARIES} ${WEBKIT2_LIBRARIES} X11)
235
235
  endif()
236
236
 
237
237
  install(TARGETS plusui ARCHIVE DESTINATION lib)
@@ -1,76 +1,44 @@
1
1
  /**
2
- * PlusUI Connect API — Semantic Frontend ↔ Backend Communication
2
+ * PlusUI Connect API — Custom Frontend ↔ Backend Communication
3
3
  *
4
- * ZERO CONFIG. SEMANTIC SYNTAX. ALL 5 PATTERNS.
5
- *
6
- * IMPORTANT: `connect` is for CUSTOM user-defined communication only!
7
- * Built-in features (window, clipboard, app, etc.) use direct imports:
8
- * import plusui from 'plusui';
9
- * plusui.window.minimize();
10
- * plusui.clipboard.setText('hello');
11
- *
12
- * For custom communication, use `connect.namespace.method()`:
4
+ * Use `connect` for YOUR custom communication channels only!
13
5
  *
14
6
  * import { connect } from 'plusui';
15
7
  *
16
- * // Request/Response — await a call to the backend
8
+ * // Request/Response
17
9
  * const user = await connect.user.fetch(123);
18
10
  *
19
- * // Fire & Forget one-way notification
11
+ * // Fire & Forget (one-way)
20
12
  * connect.files.upload({ file: myFile });
21
13
  *
22
- * // Event Listener — listen for backend events
14
+ * // Subscribe to events
23
15
  * connect.app.onNotify((msg) => console.log(msg));
24
16
  *
25
- * // Register a handler backend can call frontend
17
+ * // Register handler (backend calls frontend)
26
18
  * connect.ui.handlePrompt = async (data) => {
27
19
  * return await Dialog.confirm(data.msg);
28
20
  * };
29
21
  *
30
- * Then run `plusui connect` to generate typed bindings.
22
+ * Run `plusui connect` to generate typed bindings.
31
23
  *
32
- * Pattern detection is automatic:
33
- * - `await connect.x.y()` → CALL (Request/Response)
34
- * - `connect.x.onY(cb)` → EVENT (Subscribe)
35
- * - `connect.x.handleY = fn` → HANDLER (Backend calls frontend)
36
- * - `connect.x.y()` → FIRE (Simplex, one-way)
24
+ * BUILT-IN FEATURES use direct imports:
25
+ * import plusui from 'plusui';
26
+ * plusui.window.minimize();
27
+ * plusui.clipboard.setText('hello');
37
28
  */
38
29
 
39
30
  import { connect, _client, createFeatureConnect } from '../Connection/connect';
40
31
  import type { FeatureConnect, ConnectionKind, ConnectionEnvelope } from '../Connection/connect';
41
32
 
42
- /**
43
- * connect Semantic channel proxy
44
- *
45
- * Usage:
46
- * connect.namespace.method(...args)
47
- *
48
- * The proxy routes to the correct wire format automatically:
49
- * connect.user.fetch(123) → _client.call('user.fetch', 123)
50
- * connect.app.onNotify(cb) → _client.on('app.onNotify', cb)
51
- * connect.ui.handlePrompt = fn → _client.handle('ui.handlePrompt', fn)
52
- * connect.system.minimize() → _client.fire('system.minimize', {})
53
- *
54
- * Works dynamically even before running `plusui connect`.
55
- * After running `plusui connect`, you get IDE autocomplete.
56
- */
57
- export { connect };
58
-
59
- /**
60
- * _client — Low-level connection client
61
- *
62
- * Direct access to the underlying client for advanced use cases.
63
- * Prefer using `connect.namespace.method()` for normal communication.
64
- */
65
- export { _client };
33
+ export { connect, _client, createFeatureConnect };
34
+ export type { FeatureConnect, ConnectionKind, ConnectionEnvelope };
66
35
 
67
36
  /**
68
- * createFeatureConnect Scoped connect for framework internals
69
- *
70
- * Creates a connect API scoped to a feature namespace.
71
- * Used internally by PlusUI features like window, clipboard, etc.
37
+ * Low-level client methods (use `connect` instead when possible)
72
38
  */
73
- export { createFeatureConnect };
74
-
75
- export type { FeatureConnect, ConnectionKind, ConnectionEnvelope };
76
- export default connect;
39
+ export type ClientAPI = {
40
+ call: <TOut = unknown, TIn = Record<string, unknown>>(name: string, payload: TIn) => Promise<TOut>;
41
+ fire: <TIn = Record<string, unknown>>(name: string, payload: TIn) => void;
42
+ on: <TData = unknown>(name: string, callback: (payload: TData) => void) => () => void;
43
+ handle: (name: string, handler: (...args: any[]) => any) => () => void;
44
+ };
@@ -1,28 +1,28 @@
1
- /**
2
- * App API
3
- *
4
- * Application lifecycle management: version, paths, badge, and lifecycle events.
5
- *
6
- * Actions:
7
- * app.invoke(name, args) - Call a named native method directly
8
- * app.quit() - Quit the application
9
- * app.getVersion() - Get the application version string
10
- * app.getName() - Get the application name
11
- * app.getPath(name) - Get a well-known path (home, appData, temp, etc.)
12
- * app.setBadge(count) - Set the taskbar/dock badge count
13
- * app.getBadge() - Get the current badge count
14
- * app.emit(event, payload) - Dispatch a custom application event
15
- *
16
- * Events:
17
- * app.onReady(cb) - Fires when the app is fully initialized
18
- * app.onQuit(cb) - Fires when the app is about to quit
19
- * app.onActivate(cb) - Fires when the app is re-activated (macOS dock click)
20
- * app.onWindowAllClosed(cb) - Fires when all windows are closed
21
- * app.onSecondInstance(cb) - Fires when a second instance is launched
22
- * app.on(event, cb) - Listen for any custom app event
23
- * app.once(event, cb) - Listen for a custom app event only once
24
- */
25
-
26
- export type { AppConfig } from '../App/app';
27
-
28
- export { app } from '../App/app';
1
+ /**
2
+ * App API
3
+ *
4
+ * Application lifecycle management: version, paths, badge, and lifecycle events.
5
+ *
6
+ * Actions:
7
+ * app.invoke(name, args) - Call a named native method directly
8
+ * app.quit() - Quit the application
9
+ * app.getVersion() - Get the application version string
10
+ * app.getName() - Get the application name
11
+ * app.getPath(name) - Get a well-known path (home, appData, temp, etc.)
12
+ * app.setBadge(count) - Set the taskbar/dock badge count
13
+ * app.getBadge() - Get the current badge count
14
+ * app.emit(event, payload) - Dispatch a custom application event
15
+ *
16
+ * Events:
17
+ * app.onReady(cb) - Fires when the app is fully initialized
18
+ * app.onQuit(cb) - Fires when the app is about to quit
19
+ * app.onActivate(cb) - Fires when the app is re-activated (macOS dock click)
20
+ * app.onWindowAllClosed(cb) - Fires when all windows are closed
21
+ * app.onSecondInstance(cb) - Fires when a second instance is launched
22
+ * app.on(event, cb) - Listen for any custom app event
23
+ * app.once(event, cb) - Listen for a custom app event only once
24
+ */
25
+
26
+ export type { AppConfig } from '../App/app';
27
+
28
+ export { app } from '../App/app';
@@ -1,38 +1,38 @@
1
- /**
2
- * Browser API
3
- *
4
- * Control in-app browser navigation and receive page lifecycle events.
5
- *
6
- * Actions:
7
- * browser.navigate(url) - Navigate to a URL
8
- * browser.open(url) - Alias for navigate()
9
- * browser.openExternal(url) - Open a URL in the system default browser
10
- * browser.openNewWindow(url) - Open a URL in a new application window
11
- * browser.goBack() - Go back in navigation history
12
- * browser.goForward() - Go forward in navigation history
13
- * browser.reload() - Reload the current page
14
- * browser.stop() - Stop the current page load
15
- * browser.getUrl() - Get the current URL
16
- * browser.getTitle() - Get the current page title
17
- * browser.getState() - Get the full current browser state snapshot
18
- * browser.canGoBack() - Check if back navigation is possible
19
- * browser.canGoForward() - Check if forward navigation is possible
20
- * browser.isLoading() - Check if a page is currently loading
21
- *
22
- * Events:
23
- * browser.onNavigate(cb) - Fires when navigation occurs (URL change)
24
- * browser.onStateChange(cb) - Fires when any browser state changes
25
- * browser.onLoadStart(cb) - Fires when a page begins loading
26
- * browser.onLoadEnd(cb) - Fires when a page finishes loading
27
- * browser.onLoadError(cb) - Fires when a page load fails
28
- */
29
-
30
- export type {
31
- BrowserState,
32
- NavigateCallback,
33
- StateCallback,
34
- LoadCallback,
35
- ErrorCallback,
36
- } from '../Browser/browser';
37
-
38
- export { browser } from '../Browser/browser';
1
+ /**
2
+ * Browser API
3
+ *
4
+ * Control in-app browser navigation and receive page lifecycle events.
5
+ *
6
+ * Actions:
7
+ * browser.navigate(url) - Navigate to a URL
8
+ * browser.open(url) - Alias for navigate()
9
+ * browser.openExternal(url) - Open a URL in the system default browser
10
+ * browser.openNewWindow(url) - Open a URL in a new application window
11
+ * browser.goBack() - Go back in navigation history
12
+ * browser.goForward() - Go forward in navigation history
13
+ * browser.reload() - Reload the current page
14
+ * browser.stop() - Stop the current page load
15
+ * browser.getUrl() - Get the current URL
16
+ * browser.getTitle() - Get the current page title
17
+ * browser.getState() - Get the full current browser state snapshot
18
+ * browser.canGoBack() - Check if back navigation is possible
19
+ * browser.canGoForward() - Check if forward navigation is possible
20
+ * browser.isLoading() - Check if a page is currently loading
21
+ *
22
+ * Events:
23
+ * browser.onNavigate(cb) - Fires when navigation occurs (URL change)
24
+ * browser.onStateChange(cb) - Fires when any browser state changes
25
+ * browser.onLoadStart(cb) - Fires when a page begins loading
26
+ * browser.onLoadEnd(cb) - Fires when a page finishes loading
27
+ * browser.onLoadError(cb) - Fires when a page load fails
28
+ */
29
+
30
+ export type {
31
+ BrowserState,
32
+ NavigateCallback,
33
+ StateCallback,
34
+ LoadCallback,
35
+ ErrorCallback,
36
+ } from '../Browser/browser';
37
+
38
+ export { browser } from '../Browser/browser';
@@ -1,21 +1,21 @@
1
- /**
2
- * Clipboard API
3
- *
4
- * Read from and write to the system clipboard. Supports text and images.
5
- *
6
- * Actions:
7
- * clipboard.getText() - Read text from clipboard
8
- * clipboard.setText(text) - Write text to clipboard
9
- * clipboard.hasText() - Check if clipboard has text
10
- * clipboard.getImage() - Read image as base64 data URL
11
- * clipboard.setImage(b64) - Write image from base64 data URL
12
- * clipboard.hasImage() - Check if clipboard has an image
13
- * clipboard.clear() - Clear the clipboard
14
- *
15
- * Events:
16
- * clipboard.onChange(cb) - Fires when clipboard content changes
17
- */
18
-
19
- export type { ClipboardAPI } from '../Clipboard/clipboard';
20
-
21
- export { clipboard } from '../Clipboard/clipboard';
1
+ /**
2
+ * Clipboard API
3
+ *
4
+ * Read from and write to the system clipboard. Supports text and images.
5
+ *
6
+ * Actions:
7
+ * clipboard.getText() - Read text from clipboard
8
+ * clipboard.setText(text) - Write text to clipboard
9
+ * clipboard.hasText() - Check if clipboard has text
10
+ * clipboard.getImage() - Read image as base64 data URL
11
+ * clipboard.setImage(b64) - Write image from base64 data URL
12
+ * clipboard.hasImage() - Check if clipboard has an image
13
+ * clipboard.clear() - Clear the clipboard
14
+ *
15
+ * Events:
16
+ * clipboard.onChange(cb) - Fires when clipboard content changes
17
+ */
18
+
19
+ export type { ClipboardAPI } from '../Clipboard/clipboard';
20
+
21
+ export { clipboard } from '../Clipboard/clipboard';
@@ -1,33 +1,33 @@
1
- /**
2
- * Display API
3
- *
4
- * Query and control connected monitors/screens.
5
- *
6
- * Actions:
7
- * display.getAllDisplays() - Get all connected displays
8
- * display.getPrimaryDisplay() - Get the primary display
9
- * display.getDisplayAt(x, y) - Get the display at a screen coordinate
10
- * display.getDisplayAtCursor() - Get the display under the cursor
11
- * display.getDisplayById(id) - Get a display by its ID
12
- * display.setDisplayMode(id, mode) - Change resolution/refresh rate
13
- * display.setPosition(id, x, y) - Reposition a display
14
- * display.turnOff(id) - Turn off a display
15
- * display.getScreenWidth() - Get primary screen width in pixels
16
- * display.getScreenHeight() - Get primary screen height in pixels
17
- * display.getScaleFactor() - Get DPI scale factor
18
- * display.getRefreshRate() - Get refresh rate in Hz
19
- *
20
- * Events:
21
- * display.onConnected(cb) - Fires when a display is connected
22
- * display.onDisconnected(cb) - Fires when a display is disconnected
23
- * display.onChanged(cb) - Fires when a display configuration changes
24
- */
25
-
26
- export type {
27
- Display,
28
- DisplayMode,
29
- DisplayBounds,
30
- DisplayResolution,
31
- } from '../Display/display';
32
-
33
- export { display } from '../Display/display';
1
+ /**
2
+ * Display API
3
+ *
4
+ * Query and control connected monitors/screens.
5
+ *
6
+ * Actions:
7
+ * display.getAllDisplays() - Get all connected displays
8
+ * display.getPrimaryDisplay() - Get the primary display
9
+ * display.getDisplayAt(x, y) - Get the display at a screen coordinate
10
+ * display.getDisplayAtCursor() - Get the display under the cursor
11
+ * display.getDisplayById(id) - Get a display by its ID
12
+ * display.setDisplayMode(id, mode) - Change resolution/refresh rate
13
+ * display.setPosition(id, x, y) - Reposition a display
14
+ * display.turnOff(id) - Turn off a display
15
+ * display.getScreenWidth() - Get primary screen width in pixels
16
+ * display.getScreenHeight() - Get primary screen height in pixels
17
+ * display.getScaleFactor() - Get DPI scale factor
18
+ * display.getRefreshRate() - Get refresh rate in Hz
19
+ *
20
+ * Events:
21
+ * display.onConnected(cb) - Fires when a display is connected
22
+ * display.onDisconnected(cb) - Fires when a display is disconnected
23
+ * display.onChanged(cb) - Fires when a display configuration changes
24
+ */
25
+
26
+ export type {
27
+ Display,
28
+ DisplayMode,
29
+ DisplayBounds,
30
+ DisplayResolution,
31
+ } from '../Display/display';
32
+
33
+ export { display } from '../Display/display';
@@ -1,33 +1,33 @@
1
- /**
2
- * Keyboard API
3
- *
4
- * Listen for key events and register global shortcuts.
5
- *
6
- * Actions:
7
- * keyboard.isKeyPressed(key) - Check if a key is currently held down
8
- * keyboard.setAutoRepeat(enabled) - Enable/disable key auto-repeat
9
- * keyboard.getAutoRepeat() - Get auto-repeat state
10
- * keyboard.registerShortcut(id, shortcut, cb) - Register a global keyboard shortcut
11
- * keyboard.unregisterShortcut(id) - Remove a registered shortcut
12
- * keyboard.clearShortcuts() - Remove all registered shortcuts
13
- * keyboard.parseShortcut('Ctrl+S') - Parse a shortcut string into a Shortcut object
14
- * keyboard.keyNameToCode('enter') - Convert a key name string to a KeyCode
15
- *
16
- * Events:
17
- * keyboard.onKeyDown(cb) - Fires when any key is pressed
18
- * keyboard.onKeyUp(cb) - Fires when any key is released
19
- * keyboard.onShortcut(cb) - Fires when a registered shortcut is triggered
20
- *
21
- * Enums:
22
- * KeyCode - Key codes (e.g. KeyCode.Enter, KeyCode.F5)
23
- * KeyMod - Modifier flags (e.g. KeyMod.Control, KeyMod.Shift)
24
- */
25
-
26
- export type {
27
- KeyEvent,
28
- Shortcut,
29
- KeyEventCallback,
30
- ShortcutCallback,
31
- } from '../Keyboard/keyboard';
32
-
33
- export { KeyCode, KeyMod, keyboard } from '../Keyboard/keyboard';
1
+ /**
2
+ * Keyboard API
3
+ *
4
+ * Listen for key events and register global shortcuts.
5
+ *
6
+ * Actions:
7
+ * keyboard.isKeyPressed(key) - Check if a key is currently held down
8
+ * keyboard.setAutoRepeat(enabled) - Enable/disable key auto-repeat
9
+ * keyboard.getAutoRepeat() - Get auto-repeat state
10
+ * keyboard.registerShortcut(id, shortcut, cb) - Register a global keyboard shortcut
11
+ * keyboard.unregisterShortcut(id) - Remove a registered shortcut
12
+ * keyboard.clearShortcuts() - Remove all registered shortcuts
13
+ * keyboard.parseShortcut('Ctrl+S') - Parse a shortcut string into a Shortcut object
14
+ * keyboard.keyNameToCode('enter') - Convert a key name string to a KeyCode
15
+ *
16
+ * Events:
17
+ * keyboard.onKeyDown(cb) - Fires when any key is pressed
18
+ * keyboard.onKeyUp(cb) - Fires when any key is released
19
+ * keyboard.onShortcut(cb) - Fires when a registered shortcut is triggered
20
+ *
21
+ * Enums:
22
+ * KeyCode - Key codes (e.g. KeyCode.Enter, KeyCode.F5)
23
+ * KeyMod - Modifier flags (e.g. KeyMod.Control, KeyMod.Shift)
24
+ */
25
+
26
+ export type {
27
+ KeyEvent,
28
+ Shortcut,
29
+ KeyEventCallback,
30
+ ShortcutCallback,
31
+ } from '../Keyboard/keyboard';
32
+
33
+ export { KeyCode, KeyMod, keyboard } from '../Keyboard/keyboard';
@@ -1,39 +1,39 @@
1
- /**
2
- * Menu API
3
- *
4
- * Build and control native context menus and application menu bars.
5
- *
6
- * Actions:
7
- * menu.create(items) - Create a menu and return its ID
8
- * menu.popup(id, x, y) - Show a menu at a screen position
9
- * menu.popupAtCursor(id) - Show a menu at the current cursor position
10
- * menu.close(id) - Close an open menu
11
- * menu.destroy(id) - Destroy a menu and free resources
12
- * menu.setApplicationMenu(items) - Set the application-level menu bar
13
- * menu.getApplicationMenu() - Get the current application menu items
14
- * menu.appendToMenuBar(item) - Append an item to the menu bar
15
- * menu.showContextMenu(items, options) - Create and show a context menu in one call
16
- * menu.dispose() - Clear all internal click handlers
17
- *
18
- * Builder helpers (return pre-built MenuItem trees):
19
- * menu.createFileMenu(handlers) - Standard File menu (New, Open, Save, Exit)
20
- * menu.createEditMenu(handlers) - Standard Edit menu (Undo, Cut, Copy, Paste)
21
- * menu.createViewMenu(handlers) - Standard View menu (Zoom, Fullscreen, DevTools)
22
- * menu.createTextContextMenu() - Right-click menu for text fields
23
- * menu.createImageContextMenu() - Right-click menu for images
24
- * menu.createLinkContextMenu() - Right-click menu for links
25
- *
26
- * Events:
27
- * menu.onItemClick(cb) - Fires when any menu item is clicked
28
- * menu.onContextOpen(cb) - Fires when a context menu is about to open
29
- */
30
-
31
- export type {
32
- MenuItem,
33
- MenuItemType,
34
- MenuBarData,
35
- ContextMenuOptions,
36
- ContextInfo,
37
- } from '../Menu/menu';
38
-
39
- export { menu } from '../Menu/menu';
1
+ /**
2
+ * Menu API
3
+ *
4
+ * Build and control native context menus and application menu bars.
5
+ *
6
+ * Actions:
7
+ * menu.create(items) - Create a menu and return its ID
8
+ * menu.popup(id, x, y) - Show a menu at a screen position
9
+ * menu.popupAtCursor(id) - Show a menu at the current cursor position
10
+ * menu.close(id) - Close an open menu
11
+ * menu.destroy(id) - Destroy a menu and free resources
12
+ * menu.setApplicationMenu(items) - Set the application-level menu bar
13
+ * menu.getApplicationMenu() - Get the current application menu items
14
+ * menu.appendToMenuBar(item) - Append an item to the menu bar
15
+ * menu.showContextMenu(items, options) - Create and show a context menu in one call
16
+ * menu.dispose() - Clear all internal click handlers
17
+ *
18
+ * Builder helpers (return pre-built MenuItem trees):
19
+ * menu.createFileMenu(handlers) - Standard File menu (New, Open, Save, Exit)
20
+ * menu.createEditMenu(handlers) - Standard Edit menu (Undo, Cut, Copy, Paste)
21
+ * menu.createViewMenu(handlers) - Standard View menu (Zoom, Fullscreen, DevTools)
22
+ * menu.createTextContextMenu() - Right-click menu for text fields
23
+ * menu.createImageContextMenu() - Right-click menu for images
24
+ * menu.createLinkContextMenu() - Right-click menu for links
25
+ *
26
+ * Events:
27
+ * menu.onItemClick(cb) - Fires when any menu item is clicked
28
+ * menu.onContextOpen(cb) - Fires when a context menu is about to open
29
+ */
30
+
31
+ export type {
32
+ MenuItem,
33
+ MenuItemType,
34
+ MenuBarData,
35
+ ContextMenuOptions,
36
+ ContextInfo,
37
+ } from '../Menu/menu';
38
+
39
+ export { menu } from '../Menu/menu';
@@ -1,23 +1,23 @@
1
- /**
2
- * Router API
3
- *
4
- * Map route paths to frontend URLs and navigate between them across windows.
5
- * Works with any frontend router (React Router, TanStack Router, Solid Router, etc.).
6
- *
7
- * Actions:
8
- * router.setRoutes(routes) - Define the route map ({ '/settings': 'http://...' })
9
- * router.getRoutes() - Get the current route map
10
- * router.push(route, windowId?) - Navigate to a route (adds to history)
11
- * router.replace(route, windowId?) - Navigate to a route (replaces history entry)
12
- * router.getCurrentRoute(windowId?) - Get the current route for a window
13
- * router.setInitialRoute(route) - Set the route loaded on app startup
14
- * router.emit(name, payload) - Send a message on a router feature channel
15
- * router.on(name, cb) - Listen on a router feature channel
16
- *
17
- * Events:
18
- * router.onRouteChange(cb) - Fires when the route changes (from backend or other windows)
19
- */
20
-
21
- export type { RouteMap, RouteChangeCallback, RouteConfig } from '../Router/router';
22
-
23
- export { router } from '../Router/router';
1
+ /**
2
+ * Router API
3
+ *
4
+ * Map route paths to frontend URLs and navigate between them across windows.
5
+ * Works with any frontend router (React Router, TanStack Router, Solid Router, etc.).
6
+ *
7
+ * Actions:
8
+ * router.setRoutes(routes) - Define the route map ({ '/settings': 'http://...' })
9
+ * router.getRoutes() - Get the current route map
10
+ * router.push(route, windowId?) - Navigate to a route (adds to history)
11
+ * router.replace(route, windowId?) - Navigate to a route (replaces history entry)
12
+ * router.getCurrentRoute(windowId?) - Get the current route for a window
13
+ * router.setInitialRoute(route) - Set the route loaded on app startup
14
+ * router.emit(name, payload) - Send a message on a router feature channel
15
+ * router.on(name, cb) - Listen on a router feature channel
16
+ *
17
+ * Events:
18
+ * router.onRouteChange(cb) - Fires when the route changes (from backend or other windows)
19
+ */
20
+
21
+ export type { RouteMap, RouteChangeCallback, RouteConfig } from '../Router/router';
22
+
23
+ export { router } from '../Router/router';
@@ -1,22 +1,22 @@
1
- /**
2
- * Tray API
3
- *
4
- * Manage the system tray icon: icon, tooltip, visibility, and context menu.
5
- *
6
- * Actions:
7
- * tray.setIcon(path) - Set the tray icon image
8
- * tray.setTooltip(text) - Set the hover tooltip text
9
- * tray.setVisible(visible) - Show or hide the tray icon
10
- * tray.setMenu(items) - Set the full tray menu
11
- * tray.setContextMenu(items) - Set the right-click context menu
12
- *
13
- * Events:
14
- * tray.onClick(cb) - Fires on left click
15
- * tray.onDoubleClick(cb) - Fires on double click
16
- * tray.onRightClick(cb) - Fires on right click
17
- * tray.onMenuItemClick(cb) - Fires when a menu item is selected
18
- */
19
-
20
- export type { TrayMenuItem, TrayIconData } from '../Tray/tray';
21
-
22
- export { tray } from '../Tray/tray';
1
+ /**
2
+ * Tray API
3
+ *
4
+ * Manage the system tray icon: icon, tooltip, visibility, and context menu.
5
+ *
6
+ * Actions:
7
+ * tray.setIcon(path) - Set the tray icon image
8
+ * tray.setTooltip(text) - Set the hover tooltip text
9
+ * tray.setVisible(visible) - Show or hide the tray icon
10
+ * tray.setMenu(items) - Set the full tray menu
11
+ * tray.setContextMenu(items) - Set the right-click context menu
12
+ *
13
+ * Events:
14
+ * tray.onClick(cb) - Fires on left click
15
+ * tray.onDoubleClick(cb) - Fires on double click
16
+ * tray.onRightClick(cb) - Fires on right click
17
+ * tray.onMenuItemClick(cb) - Fires when a menu item is selected
18
+ */
19
+
20
+ export type { TrayMenuItem, TrayIconData } from '../Tray/tray';
21
+
22
+ export { tray } from '../Tray/tray';