@lynx-js/lynxtron 0.0.1 → 0.0.3

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 (51) hide show
  1. package/README.md +80 -0
  2. package/apis/api/app.d.ts +1848 -0
  3. package/apis/api/asar.d.ts +124 -0
  4. package/apis/api/base-window.d.ts +1712 -0
  5. package/apis/api/clipboard.d.ts +54 -0
  6. package/apis/api/command-line.d.ts +46 -0
  7. package/apis/api/context-bridge.d.ts +8 -0
  8. package/apis/api/devtool.d.ts +34 -0
  9. package/apis/api/dialog.d.ts +633 -0
  10. package/apis/api/dock.d.ts +88 -0
  11. package/apis/api/environment.d.ts +9 -0
  12. package/apis/api/event.d.ts +8 -0
  13. package/apis/api/jump-list-item.d.ts +83 -0
  14. package/apis/api/lynx-library.d.ts +7 -0
  15. package/apis/api/lynx-template-bundle.d.ts +32 -0
  16. package/apis/api/lynx-template-data.d.ts +10 -0
  17. package/apis/api/lynx-update-meta.d.ts +16 -0
  18. package/apis/api/lynx-window.d.ts +405 -0
  19. package/apis/api/menu.d.ts +96 -0
  20. package/apis/api/native-image.d.ts +268 -0
  21. package/apis/api/notification-response.d.ts +26 -0
  22. package/apis/api/notification.d.ts +242 -0
  23. package/apis/api/power-monitor.d.ts +121 -0
  24. package/apis/api/process-metric.d.ts +93 -0
  25. package/apis/api/protocol.d.ts +54 -0
  26. package/apis/api/screen.d.ts +222 -0
  27. package/apis/api/shell.d.ts +124 -0
  28. package/apis/api/task.d.ts +39 -0
  29. package/apis/api/touch-bar.d.ts +206 -0
  30. package/apis/api/tray.d.ts +44 -0
  31. package/apis/api/utility-process.d.ts +73 -0
  32. package/apis/lynx.d.ts +15 -0
  33. package/apis/lynxtron.d.ts +39 -0
  34. package/apis/structures/point.d.ts +10 -0
  35. package/apis/structures/rectangle.d.ts +22 -0
  36. package/apis/structures/size.d.ts +8 -0
  37. package/apis/web-host.d.ts +24 -0
  38. package/cli.js +28 -0
  39. package/context-bridge.js +6 -0
  40. package/fuses-cli.js +143 -0
  41. package/fuses.js +299 -0
  42. package/install.js +127 -0
  43. package/lynx.js +1 -0
  44. package/lynxtron.js +43 -0
  45. package/lynxtron_bin.js +10 -0
  46. package/native-paths.cjs +38 -0
  47. package/package.json +71 -4
  48. package/utils/download.js +72 -0
  49. package/utils/env-config.js +35 -0
  50. package/web-host/index.js +110 -0
  51. package/web-worker.js +12 -0
@@ -0,0 +1,54 @@
1
+ // Copyright 2026 The Lynxtron Authors. All rights reserved.
2
+ // Licensed under the Apache License Version 2.0 that can be found in the
3
+ // LICENSE file in the root directory of this source tree.
4
+
5
+ import { NativeImage } from './native-image';
6
+
7
+ export type ClipboardType = 'clipboard';
8
+
9
+ export interface ClipboardWriteData {
10
+ text?: string;
11
+ html?: string;
12
+ image?: NativeImage;
13
+ }
14
+
15
+ export interface Clipboard {
16
+ /**
17
+ * An array of supported formats for the clipboard contents.
18
+ */
19
+ availableFormats(type?: ClipboardType): string[];
20
+ /**
21
+ * Clears the clipboard contents.
22
+ */
23
+ clear(type?: ClipboardType): void;
24
+ /**
25
+ * The content in the clipboard as markup.
26
+ */
27
+ readHTML(type?: ClipboardType): string;
28
+ /**
29
+ * The image content in the clipboard.
30
+ */
31
+ readImage(type?: ClipboardType): NativeImage;
32
+ /**
33
+ * The content in the clipboard as plain text.
34
+ */
35
+ readText(type?: ClipboardType): string;
36
+ /**
37
+ * Writes data to the clipboard.
38
+ */
39
+ write(data: ClipboardWriteData, type?: ClipboardType): void;
40
+ /**
41
+ * Writes markup to the clipboard.
42
+ */
43
+ writeHTML(markup: string, type?: ClipboardType): void;
44
+ /**
45
+ * Writes an image to the clipboard.
46
+ */
47
+ writeImage(image: NativeImage, type?: ClipboardType): void;
48
+ /**
49
+ * Writes text to the clipboard as plain text.
50
+ */
51
+ writeText(text: string, type?: ClipboardType): void;
52
+ }
53
+
54
+ export declare const clipboard: Clipboard;
@@ -0,0 +1,46 @@
1
+ // Copyright 2026 The Lynxtron Authors. All rights reserved.
2
+ // Licensed under the Apache License Version 2.0 that can be found in the
3
+ // LICENSE file in the root directory of this source tree.
4
+
5
+ export declare class CommandLine {
6
+ /**
7
+ * Append an argument to the command line. The argument will be quoted correctly.
8
+ * Switches will precede arguments regardless of appending order.
9
+ *
10
+ * If you're appending an argument like `--switch=value`, consider using
11
+ * `appendSwitch('switch', 'value')` instead.
12
+ *
13
+ * [!NOTE] This will not affect `process.argv`. The intended usage of this
14
+ * function is to control command-line behavior.
15
+ */
16
+ appendArgument(value: string): void;
17
+ /**
18
+ * Append a switch (with optional `value`) to the command line.
19
+ *
20
+ * [!NOTE] This will not affect `process.argv`. The intended usage of this
21
+ * function is to control command-line behavior.
22
+ */
23
+ appendSwitch(the_switch: string, value?: string): void;
24
+ /**
25
+ * The command-line switch value.
26
+ *
27
+ * This function is meant to obtain command-line switches. It is not meant to be
28
+ * used for application-specific command line arguments. For the latter, please use
29
+ * `process.argv`.
30
+ *
31
+ * > [!NOTE] When the switch is not present or has no value, it returns empty
32
+ * string.
33
+ */
34
+ getSwitchValue(the_switch: string): string;
35
+ /**
36
+ * Whether the command-line switch is present.
37
+ */
38
+ hasSwitch(the_switch: string): boolean;
39
+ /**
40
+ * Removes the specified switch from the command line.
41
+ *
42
+ * > [!NOTE] This will not affect `process.argv`. The intended usage of this
43
+ * function is to control command-line behavior.
44
+ */
45
+ removeSwitch(the_switch: string): void;
46
+ }
@@ -0,0 +1,8 @@
1
+ // Copyright 2026 The Lynxtron Authors. All rights reserved.
2
+ // Licensed under the Apache License Version 2.0 that can be found in the
3
+ // LICENSE file in the root directory of this source tree.
4
+
5
+ export interface ContextBridge {
6
+ exposeInLynxBTS(apis: Record<string, any>): void;
7
+ }
8
+ export const contextBridge: ContextBridge;
@@ -0,0 +1,34 @@
1
+ // Copyright 2026 The Lynxtron Authors. All rights reserved.
2
+ // Licensed under the Apache License Version 2.0 that can be found in the
3
+ // LICENSE file in the root directory of this source tree.
4
+
5
+ export interface Devtool {
6
+ /**
7
+ * Set whether to enable the Lynx devtool.
8
+ */
9
+ setDevToolEnabled(enabled: boolean): void;
10
+ /**
11
+ * Get whether the Lynx devtool is enabled.
12
+ */
13
+ isDevtoolEnabled(): boolean;
14
+ /**
15
+ * Set whether to enable the Lynx logbox.
16
+ */
17
+ setLogboxEnabled(enable: boolean): void;
18
+ /**
19
+ * Get whether the Lynx logbox is enabled.
20
+ */
21
+ isLogboxEnabled(): boolean;
22
+ /**
23
+ * Set the callback for handling open-card requests from the Lynx devtool.
24
+ * Pass null to clear the current callback.
25
+ */
26
+ setOpenCardCallback(callback: ((url: string) => void) | null): void;
27
+
28
+ /**
29
+ * Connect to the Lynx devtool.
30
+ */
31
+ connectDevtool(url: string): void;
32
+ }
33
+
34
+ export declare const devtool: Devtool;