@lynx-js/lynxtron 0.0.1 → 0.0.2

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,124 @@
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
+ // Docs: electron_common_asar binding
6
+
7
+ export interface SplitPathResultNotAsar {
8
+ /**
9
+ * Whether the input path is an asar path.
10
+ */
11
+ isAsar: false;
12
+ }
13
+
14
+ export interface SplitPathResultAsar {
15
+ /**
16
+ * Whether the input path is an asar path.
17
+ */
18
+ isAsar: true;
19
+ /**
20
+ * The absolute path to the `.asar` archive.
21
+ */
22
+ asarPath: string;
23
+ /**
24
+ * The path inside the `.asar` archive.
25
+ */
26
+ filePath: string;
27
+ }
28
+
29
+ export type SplitPathResult = SplitPathResultNotAsar | SplitPathResultAsar;
30
+
31
+ export declare function splitPath(path: string | Buffer | URL): SplitPathResult;
32
+
33
+ export interface AsarFileIntegrity {
34
+ /**
35
+ * The hash algorithm.
36
+ */
37
+ algorithm: 'SHA256';
38
+ /**
39
+ * The expected hex digest.
40
+ */
41
+ hash: string;
42
+ }
43
+
44
+ export interface AsarFileInfo {
45
+ /**
46
+ * The file size in bytes.
47
+ */
48
+ size: number;
49
+ /**
50
+ * Whether the file is stored unpacked.
51
+ */
52
+ unpacked: boolean;
53
+ /**
54
+ * The byte offset within the archive.
55
+ */
56
+ offset: number;
57
+ /**
58
+ * Optional integrity information.
59
+ */
60
+ integrity?: AsarFileIntegrity;
61
+ }
62
+
63
+ export interface AsarFileStat {
64
+ /**
65
+ * The file size in bytes.
66
+ */
67
+ size: number;
68
+ /**
69
+ * The byte offset within the archive.
70
+ */
71
+ offset: number;
72
+ /**
73
+ * The file type code.
74
+ */
75
+ type: number;
76
+ }
77
+
78
+ export declare class Archive {
79
+ /**
80
+ * Create an archive handle from a `.asar` path.
81
+ */
82
+ constructor(asarPath: string);
83
+ /**
84
+ * Reads the offset and size of file.
85
+ */
86
+ getFileInfo(filePath: string): AsarFileInfo | false;
87
+ /**
88
+ * Returns a fake result of `fs.stat(path)`.
89
+ */
90
+ stat(filePath: string): AsarFileStat | false;
91
+ /**
92
+ * Returns all files under a directory.
93
+ */
94
+ readdir(dirPath: string): string[] | false;
95
+ /**
96
+ * Returns the path of file with symbol link resolved.
97
+ */
98
+ realpath(filePath: string): string | false;
99
+ /**
100
+ * Copy the file out into a temporary file and returns the new path.
101
+ */
102
+ copyFileOut(filePath: string): string | false;
103
+ /**
104
+ * Return the file descriptor.
105
+ */
106
+ getFdAndValidateIntegrityLater(): number;
107
+ }
108
+
109
+ declare global {
110
+ namespace NodeJS {
111
+ interface AsarArchive extends Archive {}
112
+ interface AsarFileInfo {
113
+ size: number;
114
+ unpacked: boolean;
115
+ offset: number;
116
+ integrity?: AsarFileIntegrity;
117
+ }
118
+ interface AsarFileStat {
119
+ size: number;
120
+ offset: number;
121
+ type: number;
122
+ }
123
+ }
124
+ }