@vicinae/api 0.16.0 → 0.16.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.
- package/bin/run.js +1 -1
- package/dist/api/ai.d.ts +2 -2
- package/dist/api/ai.js +2 -2
- package/dist/api/bus.d.ts +7 -2
- package/dist/api/cache.js +18 -12
- package/dist/api/clipboard.js +2 -2
- package/dist/api/command.js +2 -2
- package/dist/api/components/action-pannel.js +1 -1
- package/dist/api/components/actions.d.ts +21 -0
- package/dist/api/components/actions.js +25 -1
- package/dist/api/components/dropdown.js +2 -2
- package/dist/api/components/form.d.ts +19 -1
- package/dist/api/components/form.js +34 -11
- package/dist/api/components/grid.d.ts +1 -1
- package/dist/api/components/grid.js +11 -11
- package/dist/api/context/navigation-provider.js +1 -4
- package/dist/api/controls.js +6 -4
- package/dist/api/environment.d.ts +4 -0
- package/dist/api/file-search.d.ts +18 -18
- package/dist/api/file-search.js +18 -19
- package/dist/api/keyboard.d.ts +1 -1
- package/dist/api/keyboard.js +15 -17
- package/dist/api/lib/result.js +7 -1
- package/dist/api/oauth.d.ts +3 -8
- package/dist/api/oauth.js +51 -21
- package/dist/api/preference.js +2 -2
- package/dist/api/proto/application.d.ts +10 -0
- package/dist/api/proto/application.js +150 -3
- package/dist/api/proto/manager.d.ts +2 -0
- package/dist/api/proto/manager.js +32 -0
- package/dist/api/proto/oauth.d.ts +42 -0
- package/dist/api/proto/oauth.js +620 -5
- package/dist/api/proto/wm.d.ts +20 -0
- package/dist/api/proto/wm.js +291 -7
- package/dist/api/utils.d.ts +43 -0
- package/dist/api/utils.js +25 -2
- package/dist/api/window-management.d.ts +31 -2
- package/dist/api/window-management.js +29 -10
- package/dist/commands/develop/index.js +13 -11
- package/dist/schemas/manifest.d.ts +1 -1
- package/dist/schemas/manifest.js +5 -3
- package/package.json +73 -76
- package/types/jsx.d.ts +189 -170
|
@@ -7,7 +7,7 @@ const transformWorkspace = (proto) => {
|
|
|
7
7
|
id: proto.id,
|
|
8
8
|
name: proto.name,
|
|
9
9
|
active: proto.active,
|
|
10
|
-
monitorId: proto.monitor
|
|
10
|
+
monitorId: proto.monitor,
|
|
11
11
|
};
|
|
12
12
|
};
|
|
13
13
|
const transformWindow = (proto) => {
|
|
@@ -15,8 +15,11 @@ const transformWindow = (proto) => {
|
|
|
15
15
|
id: proto.id,
|
|
16
16
|
workspaceId: proto.workspaceId,
|
|
17
17
|
active: proto.active,
|
|
18
|
-
bounds: {
|
|
19
|
-
|
|
18
|
+
bounds: {
|
|
19
|
+
position: { x: proto.x, y: proto.y },
|
|
20
|
+
size: { width: proto.width, height: proto.height },
|
|
21
|
+
},
|
|
22
|
+
application: proto.app,
|
|
20
23
|
};
|
|
21
24
|
};
|
|
22
25
|
/**
|
|
@@ -38,22 +41,39 @@ const transformWindow = (proto) => {
|
|
|
38
41
|
var WindowManagement;
|
|
39
42
|
(function (WindowManagement) {
|
|
40
43
|
async function ping() {
|
|
41
|
-
const res = await bus_1.bus.turboRequest(
|
|
44
|
+
const res = await bus_1.bus.turboRequest("wm.ping", {});
|
|
42
45
|
return res.unwrap().ok;
|
|
43
46
|
}
|
|
44
47
|
WindowManagement.ping = ping;
|
|
45
48
|
async function getWindows(options = {}) {
|
|
46
|
-
const res = await bus_1.bus.turboRequest(
|
|
49
|
+
const res = await bus_1.bus.turboRequest("wm.getWindows", options);
|
|
47
50
|
return res.unwrap().windows.map(transformWindow);
|
|
48
51
|
}
|
|
49
52
|
WindowManagement.getWindows = getWindows;
|
|
53
|
+
/**
|
|
54
|
+
* Return the list of screens (physical and virtual) currently attached to the computer.
|
|
55
|
+
*/
|
|
56
|
+
async function getScreens() {
|
|
57
|
+
const res = await bus_1.bus.turboRequest("wm.getScreens", {});
|
|
58
|
+
return res.unwrap().screens.map((sc) => ({
|
|
59
|
+
name: sc.name,
|
|
60
|
+
make: sc.make,
|
|
61
|
+
model: sc.model,
|
|
62
|
+
serial: sc.serial,
|
|
63
|
+
bounds: {
|
|
64
|
+
position: { x: sc.x, y: sc.y },
|
|
65
|
+
size: { width: sc.width, height: sc.height },
|
|
66
|
+
},
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
WindowManagement.getScreens = getScreens;
|
|
50
70
|
async function getActiveWorkspace() {
|
|
51
|
-
const res = await bus_1.bus.turboRequest(
|
|
71
|
+
const res = await bus_1.bus.turboRequest("wm.getActiveWorkspace", {});
|
|
52
72
|
return transformWorkspace(res.unwrap().workspace);
|
|
53
73
|
}
|
|
54
74
|
WindowManagement.getActiveWorkspace = getActiveWorkspace;
|
|
55
75
|
async function getWorkspaces() {
|
|
56
|
-
const res = await bus_1.bus.turboRequest(
|
|
76
|
+
const res = await bus_1.bus.turboRequest("wm.getWorkspaces", {});
|
|
57
77
|
return res.unwrap().workspaces.map(transformWorkspace);
|
|
58
78
|
}
|
|
59
79
|
WindowManagement.getWorkspaces = getWorkspaces;
|
|
@@ -63,13 +83,12 @@ var WindowManagement;
|
|
|
63
83
|
}
|
|
64
84
|
WindowManagement.getWindowsOnActiveWorkspace = getWindowsOnActiveWorkspace;
|
|
65
85
|
async function setWindowBounds(payload) {
|
|
66
|
-
await bus_1.bus.turboRequest(
|
|
86
|
+
await bus_1.bus.turboRequest("wm.setWindowBounds", payload);
|
|
67
87
|
}
|
|
68
88
|
WindowManagement.setWindowBounds = setWindowBounds;
|
|
69
89
|
async function getActiveWindow() {
|
|
70
|
-
const res = await bus_1.bus.turboRequest(
|
|
90
|
+
const res = await bus_1.bus.turboRequest("wm.getActiveWindow", {});
|
|
71
91
|
return transformWindow(res.unwrap().window);
|
|
72
92
|
}
|
|
73
93
|
WindowManagement.getActiveWindow = getActiveWindow;
|
|
74
94
|
})(WindowManagement || (exports.WindowManagement = WindowManagement = {}));
|
|
75
|
-
;
|
|
@@ -94,16 +94,18 @@ class Develop extends core_1.Command {
|
|
|
94
94
|
};
|
|
95
95
|
const build = async (outDir) => {
|
|
96
96
|
/*
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
const entryPoints = manifest.commands
|
|
97
|
+
logger.logInfo("Started type checking in background thread");
|
|
98
|
+
typeCheck().then(({ error, ok }) => {
|
|
99
|
+
if (!ok) {
|
|
100
|
+
logger.logInfo(`Type checking error: ${error}`);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
logger.logInfo("Done type checking");
|
|
104
|
+
});
|
|
105
|
+
*/
|
|
106
|
+
const entryPoints = manifest.commands
|
|
107
|
+
.map((cmd) => (0, node_path_1.join)("src", `${cmd.name}.tsx`))
|
|
108
|
+
.filter(node_fs_1.existsSync);
|
|
107
109
|
logger.logInfo(`entrypoints [${entryPoints.join(", ")}]`);
|
|
108
110
|
const promises = manifest.commands.map((cmd) => {
|
|
109
111
|
const base = (0, node_path_1.join)(process.cwd(), "src", `${cmd.name}`);
|
|
@@ -190,7 +192,7 @@ class Develop extends core_1.Command {
|
|
|
190
192
|
ignoreInitial: true,
|
|
191
193
|
})
|
|
192
194
|
.on("all", async (_, path) => {
|
|
193
|
-
if (path.endsWith(
|
|
195
|
+
if (path.endsWith("package.json")) {
|
|
194
196
|
manifest = parseManifest();
|
|
195
197
|
}
|
|
196
198
|
logger.logEvent(`changed file ${path}`);
|
package/dist/schemas/manifest.js
CHANGED
|
@@ -194,7 +194,8 @@ exports.default = zod_1.z.object({
|
|
|
194
194
|
.any()
|
|
195
195
|
.describe("Extensions can contribute preferences that are shown in Vicinae Preferences > Extensions. You can use preferences for configuration values and passwords or personal access tokens.")
|
|
196
196
|
.optional(),
|
|
197
|
-
categories: zod_1.z
|
|
197
|
+
categories: zod_1.z
|
|
198
|
+
.array(zod_1.z.enum([
|
|
198
199
|
"Applications",
|
|
199
200
|
"Communication",
|
|
200
201
|
"Data",
|
|
@@ -209,8 +210,9 @@ exports.default = zod_1.z.object({
|
|
|
209
210
|
"Security",
|
|
210
211
|
"System",
|
|
211
212
|
"Web",
|
|
212
|
-
"Other"
|
|
213
|
-
]))
|
|
213
|
+
"Other",
|
|
214
|
+
]))
|
|
215
|
+
.optional(),
|
|
214
216
|
contributors: zod_1.z
|
|
215
217
|
.array(zod_1.z
|
|
216
218
|
.string()
|
package/package.json
CHANGED
|
@@ -1,78 +1,75 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
"topics": {}
|
|
76
|
-
},
|
|
77
|
-
"repository": "vicinaehq/vicinae"
|
|
2
|
+
"name": "@vicinae/api",
|
|
3
|
+
"version": "0.16.2",
|
|
4
|
+
"description": "TypeScript SDK to build Vicinae extensions",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
7
|
+
"build": "tsc --outDir dist",
|
|
8
|
+
"protogen": "mkdir -p ./src/api/proto && protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto -I../../proto ../../proto/*.proto --ts_proto_out ./src/api/proto",
|
|
9
|
+
"pack": "npm run build && npm pack",
|
|
10
|
+
"docgen-html": "typedoc src/api/index.ts",
|
|
11
|
+
"docgen-md": "typedoc src/api/index.ts --disableSources --readme none --plugin typedoc-plugin-markdown --out ./docs",
|
|
12
|
+
"format": "biome format --write"
|
|
13
|
+
},
|
|
14
|
+
"bin": {
|
|
15
|
+
"vici": "./bin/run.js"
|
|
16
|
+
},
|
|
17
|
+
"files": [
|
|
18
|
+
"dist",
|
|
19
|
+
"types"
|
|
20
|
+
],
|
|
21
|
+
"keywords": [],
|
|
22
|
+
"author": "",
|
|
23
|
+
"license": "ISC",
|
|
24
|
+
"types": [
|
|
25
|
+
"./dist/index.d.ts"
|
|
26
|
+
],
|
|
27
|
+
"publishConfig": {
|
|
28
|
+
"access": "public"
|
|
29
|
+
},
|
|
30
|
+
"main": "dist/index.js",
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@jgoz/esbuild-plugin-typecheck": "^4.0.3",
|
|
33
|
+
"@oclif/core": "^4",
|
|
34
|
+
"@oclif/plugin-help": "^6",
|
|
35
|
+
"@oclif/plugin-plugins": "^5",
|
|
36
|
+
"@types/node": ">=18",
|
|
37
|
+
"@types/react": "19.0.10",
|
|
38
|
+
"chalk": "^5.6.0",
|
|
39
|
+
"chokidar": "^4.0.3",
|
|
40
|
+
"esbuild": "^0.25.2",
|
|
41
|
+
"react": "19.0.0",
|
|
42
|
+
"zod": "^4.0.17"
|
|
43
|
+
},
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"@types/node": ">=18",
|
|
46
|
+
"@types/react": "19.0.10"
|
|
47
|
+
},
|
|
48
|
+
"devDependencies": {
|
|
49
|
+
"@biomejs/biome": "2.3.2",
|
|
50
|
+
"@bufbuild/protobuf": "^2.7.0",
|
|
51
|
+
"@oclif/test": "^4",
|
|
52
|
+
"@types/chai": "^4",
|
|
53
|
+
"@types/mocha": "^10",
|
|
54
|
+
"chai": "^4",
|
|
55
|
+
"mocha": "^10",
|
|
56
|
+
"oclif": "^4",
|
|
57
|
+
"shx": "^0.3.3",
|
|
58
|
+
"ts-node": "^10",
|
|
59
|
+
"ts-proto": "^2.7.5",
|
|
60
|
+
"typedoc": "^0.28.13",
|
|
61
|
+
"typedoc-plugin-markdown": "^4.8.1",
|
|
62
|
+
"typescript": "^5"
|
|
63
|
+
},
|
|
64
|
+
"oclif": {
|
|
65
|
+
"bin": "vici",
|
|
66
|
+
"dirname": "vici",
|
|
67
|
+
"commands": "./dist/commands",
|
|
68
|
+
"plugins": [
|
|
69
|
+
"@oclif/plugin-help"
|
|
70
|
+
],
|
|
71
|
+
"topicSeparator": " ",
|
|
72
|
+
"topics": {}
|
|
73
|
+
},
|
|
74
|
+
"repository": "vicinaehq/vicinae"
|
|
78
75
|
}
|