@lynx-js/lynxtron 0.0.1-alpha.0 → 0.0.1-alpha.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.
|
@@ -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;
|
|
@@ -2,9 +2,6 @@
|
|
|
2
2
|
// Licensed under the Apache License Version 2.0 that can be found in the
|
|
3
3
|
// LICENSE file in the root directory of this source tree.
|
|
4
4
|
|
|
5
|
-
export
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
is_lazy_create: boolean,
|
|
9
|
-
opaque: unknown
|
|
10
|
-
): void;
|
|
5
|
+
export type LynxLibraryRegistry = Record<never, never>;
|
|
6
|
+
|
|
7
|
+
export declare const lynx: LynxLibraryRegistry;
|
package/apis/lynxtron.d.ts
CHANGED
|
@@ -19,13 +19,14 @@ export * from './api/base-window';
|
|
|
19
19
|
export * from './api/clipboard';
|
|
20
20
|
export * from './api/event';
|
|
21
21
|
export * from './api/lynx-window';
|
|
22
|
+
export * from './api/lynx-library';
|
|
22
23
|
export * from './api/touch-bar';
|
|
23
24
|
export * from './api/screen';
|
|
24
25
|
export * from './api/asar';
|
|
25
26
|
export * from './api/dialog';
|
|
27
|
+
export * from './api/devtool';
|
|
26
28
|
export * from './api/shell';
|
|
27
29
|
export * from './api/protocol';
|
|
28
|
-
export * from './api/lynx-extension-utils';
|
|
29
30
|
export * from './api/environment';
|
|
30
31
|
export * from './api/utility-process';
|
|
31
32
|
export * from './api/lynx-template-bundle';
|
package/lynxtron.js
CHANGED
|
@@ -3,6 +3,19 @@
|
|
|
3
3
|
import { createRequire } from 'module';
|
|
4
4
|
const require = createRequire(import.meta.url);
|
|
5
5
|
const lynxtron = require('lynxtron');
|
|
6
|
+
|
|
7
|
+
function resolveRegisterGlobalEnvModule() {
|
|
8
|
+
if (typeof lynxtron.registerGlobalEnvModule === 'function') {
|
|
9
|
+
return lynxtron.registerGlobalEnvModule;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
try {
|
|
13
|
+
return process._linkedBinding('lynx_extension').registerGlobalEnvModule;
|
|
14
|
+
} catch {
|
|
15
|
+
return undefined;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
6
19
|
export const app = lynxtron.app;
|
|
7
20
|
export const LynxWindow = lynxtron.LynxWindow;
|
|
8
21
|
export const Menu = lynxtron.Menu;
|
|
@@ -10,6 +23,7 @@ export const MenuItem = lynxtron.MenuItem;
|
|
|
10
23
|
export const clipboard = lynxtron.clipboard;
|
|
11
24
|
export const shell = lynxtron.shell;
|
|
12
25
|
export const dialog = lynxtron.dialog;
|
|
26
|
+
export const devtool = lynxtron.devtool;
|
|
13
27
|
export const screen = lynxtron.screen;
|
|
14
28
|
export const nativeImage = lynxtron.nativeImage;
|
|
15
29
|
export const protocol = lynxtron.protocol;
|
|
@@ -17,7 +31,7 @@ export const Dock = lynxtron.Dock;
|
|
|
17
31
|
export const CommandLine = lynxtron.CommandLine;
|
|
18
32
|
export const splitPath = lynxtron.splitPath;
|
|
19
33
|
export const Archive = lynxtron.Archive;
|
|
20
|
-
export const registerGlobalEnvModule =
|
|
34
|
+
export const registerGlobalEnvModule = resolveRegisterGlobalEnvModule();
|
|
21
35
|
export const getVar = lynxtron.getVar;
|
|
22
36
|
export const hasVar = lynxtron.hasVar;
|
|
23
37
|
export const setVar = lynxtron.setVar;
|
|
@@ -25,3 +39,5 @@ export const Tray = lynxtron.Tray;
|
|
|
25
39
|
export const LynxTemplateData = lynxtron.LynxTemplateData;
|
|
26
40
|
export const LynxUpdateMeta = lynxtron.LynxUpdateMeta;
|
|
27
41
|
export const powerMonitor = lynxtron.powerMonitor;
|
|
42
|
+
|
|
43
|
+
export const lynx = Object.freeze({});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lynx-js/lynxtron",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.2",
|
|
4
4
|
"description": "lynxtron npm package test",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./apis/lynxtron.d.ts",
|
|
@@ -46,17 +46,24 @@
|
|
|
46
46
|
"package.json"
|
|
47
47
|
],
|
|
48
48
|
"exports": {
|
|
49
|
-
".":
|
|
49
|
+
".": {
|
|
50
|
+
"types": "./apis/lynxtron.d.ts",
|
|
51
|
+
"default": "./lynxtron.js"
|
|
52
|
+
},
|
|
50
53
|
"./lynx": {
|
|
51
54
|
"types": "./apis/lynx.d.ts",
|
|
52
55
|
"default": "./lynx.js"
|
|
53
56
|
},
|
|
54
57
|
"./fuses": "./fuses.js",
|
|
55
58
|
"./context-bridge": {
|
|
59
|
+
"types": "./apis/api/context-bridge.d.ts",
|
|
56
60
|
"browser": "./web-worker.js",
|
|
57
61
|
"default": "./context-bridge.js"
|
|
58
62
|
},
|
|
59
|
-
"./web-host":
|
|
63
|
+
"./web-host": {
|
|
64
|
+
"types": "./apis/web-host.d.ts",
|
|
65
|
+
"default": "./web-host/index.js"
|
|
66
|
+
},
|
|
60
67
|
"./web-worker": "./web-worker.js"
|
|
61
68
|
},
|
|
62
69
|
"engines": {
|
package/utils/env-config.js
CHANGED
|
@@ -22,7 +22,7 @@ function getPlatformPath (platform) {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
export const BASE_URL = '';
|
|
25
|
+
export const BASE_URL = 'https://github.com/lynx-family/lynxtron/releases/download/';
|
|
26
26
|
|
|
27
27
|
const pckJson = JSON.parse(fs.readFileSync(path.join(__dirname, "..", 'package.json'), 'utf8'));
|
|
28
28
|
|