@vicinae/api 0.13.3 → 0.14.0
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/dist/api/bus.d.ts +2 -0
- package/dist/api/clipboard.d.ts +34 -4
- package/dist/api/clipboard.js +38 -4
- package/dist/api/components/action-pannel.js +2 -6
- package/dist/api/components/actions.js +3 -13
- package/dist/api/components/dropdown.js +1 -2
- package/dist/api/components/empty-view.js +2 -6
- package/dist/api/components/form.js +1 -2
- package/dist/api/components/grid.d.ts +36 -40
- package/dist/api/components/grid.js +4 -35
- package/dist/api/components/list.d.ts +48 -47
- package/dist/api/components/list.js +3 -17
- package/dist/api/components/metadata.js +1 -5
- package/dist/api/components/tag.js +1 -5
- package/dist/api/controls.js +1 -0
- package/dist/api/image.d.ts +0 -7
- package/dist/api/image.js +1 -11
- package/dist/api/proto/clipboard.d.ts +23 -0
- package/dist/api/proto/clipboard.js +318 -3
- package/dist/api/proto/daemon.d.ts +23 -0
- package/dist/api/proto/daemon.js +332 -7
- package/package.json +2 -2
- package/types/jsx.d.ts +13 -11
- package/dist/api/raycast/components/action-panel.d.ts +0 -18
- package/dist/api/raycast/components/action-panel.js +0 -41
- package/dist/api/raycast/index.d.ts +0 -26
- package/dist/api/raycast/index.js +0 -50
- package/dist/api/raycast/local-storage.d.ts +0 -9
- package/dist/api/raycast/local-storage.js +0 -13
- package/dist/api/raycast/system.d.ts +0 -20
- package/dist/api/raycast/system.js +0 -73
- package/dist/api/raycast/utils.d.ts +0 -2
- package/dist/api/raycast/utils.js +0 -6
- package/dist/api/raycast/window-management.d.ts +0 -42
- package/dist/api/raycast/window-management.js +0 -82
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LocalStorage = exports.clearLocalStorage = exports.removeLocalStorageItem = exports.setLocalStorageItem = exports.getLocalStorageItem = exports.allLocalStorageItems = void 0;
|
|
4
|
-
const local_storage_1 = require("../local-storage");
|
|
5
|
-
// We support deprecated local storage methods:
|
|
6
|
-
// https://developers.raycast.com/misc/migration/v1.28.0#storage
|
|
7
|
-
exports.allLocalStorageItems = local_storage_1.LocalStorage.allItems;
|
|
8
|
-
exports.getLocalStorageItem = local_storage_1.LocalStorage.getItem;
|
|
9
|
-
exports.setLocalStorageItem = local_storage_1.LocalStorage.setItem;
|
|
10
|
-
exports.removeLocalStorageItem = local_storage_1.LocalStorage.removeItem;
|
|
11
|
-
exports.clearLocalStorage = local_storage_1.LocalStorage.clear;
|
|
12
|
-
var local_storage_2 = require("../local-storage");
|
|
13
|
-
Object.defineProperty(exports, "LocalStorage", { enumerable: true, get: function () { return local_storage_2.LocalStorage; } });
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { PathLike } from 'fs';
|
|
2
|
-
import * as vicinae from '..';
|
|
3
|
-
export type RaycastApplication = {
|
|
4
|
-
name: string;
|
|
5
|
-
path: string;
|
|
6
|
-
bundleId: string;
|
|
7
|
-
localizedName: string;
|
|
8
|
-
windowsAppId: string;
|
|
9
|
-
};
|
|
10
|
-
export declare const transformApp: (app: vicinae.Application) => RaycastApplication;
|
|
11
|
-
export declare const getApplications: (path?: PathLike) => Promise<RaycastApplication[]>;
|
|
12
|
-
export declare const getDefaultApplication: (path: PathLike) => Promise<RaycastApplication>;
|
|
13
|
-
export declare const open: (target: string, app?: vicinae.Application | string) => Promise<void>;
|
|
14
|
-
export declare const trash: (path: PathLike | PathLike[]) => Promise<void>;
|
|
15
|
-
export declare const getFrontmostApplication: () => Promise<RaycastApplication>;
|
|
16
|
-
export declare const captureException: (exception: unknown) => void;
|
|
17
|
-
export declare const showInFinder: (path: PathLike) => Promise<void>;
|
|
18
|
-
export declare const getSelectedFinderItems: () => Promise<{
|
|
19
|
-
path: string;
|
|
20
|
-
}[]>;
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.getSelectedFinderItems = exports.showInFinder = exports.captureException = exports.getFrontmostApplication = exports.trash = exports.open = exports.getDefaultApplication = exports.getApplications = exports.transformApp = void 0;
|
|
37
|
-
const vicinae = __importStar(require(".."));
|
|
38
|
-
const transformApp = (app) => {
|
|
39
|
-
return {
|
|
40
|
-
bundleId: app.id,
|
|
41
|
-
name: app.name,
|
|
42
|
-
path: app.path,
|
|
43
|
-
localizedName: app.name,
|
|
44
|
-
windowsAppId: app.id,
|
|
45
|
-
};
|
|
46
|
-
};
|
|
47
|
-
exports.transformApp = transformApp;
|
|
48
|
-
const getApplications = async (path) => {
|
|
49
|
-
const apps = await vicinae.getApplications(path?.toString());
|
|
50
|
-
return apps.map(exports.transformApp);
|
|
51
|
-
};
|
|
52
|
-
exports.getApplications = getApplications;
|
|
53
|
-
const getDefaultApplication = async (path) => {
|
|
54
|
-
return (0, exports.transformApp)(await vicinae.getDefaultApplication(path.toString()));
|
|
55
|
-
};
|
|
56
|
-
exports.getDefaultApplication = getDefaultApplication;
|
|
57
|
-
exports.open = vicinae.open;
|
|
58
|
-
exports.trash = vicinae.trash;
|
|
59
|
-
const getFrontmostApplication = async () => {
|
|
60
|
-
return (0, exports.transformApp)(await vicinae.getFrontmostApplication());
|
|
61
|
-
};
|
|
62
|
-
exports.getFrontmostApplication = getFrontmostApplication;
|
|
63
|
-
const captureException = (exception) => {
|
|
64
|
-
// maybe one day, if we have a developer hub...
|
|
65
|
-
console.error("captureException called on", exception);
|
|
66
|
-
};
|
|
67
|
-
exports.captureException = captureException;
|
|
68
|
-
const showInFinder = (path) => vicinae.showInFileBrowser(path);
|
|
69
|
-
exports.showInFinder = showInFinder;
|
|
70
|
-
const getSelectedFinderItems = async () => {
|
|
71
|
-
throw new Error('getSelectedFinderItems is not implemented');
|
|
72
|
-
};
|
|
73
|
-
exports.getSelectedFinderItems = getSelectedFinderItems;
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { RaycastApplication } from './system';
|
|
2
|
-
type RaycastWindow = {
|
|
3
|
-
active: boolean;
|
|
4
|
-
bounds: {
|
|
5
|
-
position: {
|
|
6
|
-
x: number;
|
|
7
|
-
y: number;
|
|
8
|
-
};
|
|
9
|
-
size: {
|
|
10
|
-
height: number;
|
|
11
|
-
width: number;
|
|
12
|
-
};
|
|
13
|
-
} | "fullscreen";
|
|
14
|
-
desktopId: string;
|
|
15
|
-
fullScreenSettable: boolean;
|
|
16
|
-
id: string;
|
|
17
|
-
positionable: boolean;
|
|
18
|
-
resizable: boolean;
|
|
19
|
-
application?: RaycastApplication;
|
|
20
|
-
};
|
|
21
|
-
declare enum DesktopType {
|
|
22
|
-
User = 0,
|
|
23
|
-
FullScreen = 1
|
|
24
|
-
}
|
|
25
|
-
type RaycastDesktop = {
|
|
26
|
-
id: string;
|
|
27
|
-
screenId: string;
|
|
28
|
-
size: {
|
|
29
|
-
height: number;
|
|
30
|
-
width: number;
|
|
31
|
-
};
|
|
32
|
-
active: boolean;
|
|
33
|
-
type: DesktopType;
|
|
34
|
-
};
|
|
35
|
-
declare class RaycastWindowManagement {
|
|
36
|
-
getActiveWindow(): Promise<RaycastWindow>;
|
|
37
|
-
getDesktops(): Promise<RaycastDesktop[]>;
|
|
38
|
-
getWindowsOnActiveDesktop(): Promise<RaycastWindow[]>;
|
|
39
|
-
constructor();
|
|
40
|
-
}
|
|
41
|
-
export declare const WindowManagement: RaycastWindowManagement;
|
|
42
|
-
export {};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.WindowManagement = void 0;
|
|
37
|
-
const system_1 = require("./system");
|
|
38
|
-
const vicinae = __importStar(require(".."));
|
|
39
|
-
var DesktopType;
|
|
40
|
-
(function (DesktopType) {
|
|
41
|
-
DesktopType[DesktopType["User"] = 0] = "User";
|
|
42
|
-
DesktopType[DesktopType["FullScreen"] = 1] = "FullScreen";
|
|
43
|
-
})(DesktopType || (DesktopType = {}));
|
|
44
|
-
;
|
|
45
|
-
const transformNativeDesktop = (win) => {
|
|
46
|
-
return {
|
|
47
|
-
id: win.id,
|
|
48
|
-
screenId: win.monitorId,
|
|
49
|
-
size: { width: 0, height: 0 }, // FIXME: implement
|
|
50
|
-
active: win.active,
|
|
51
|
-
type: DesktopType.User
|
|
52
|
-
};
|
|
53
|
-
};
|
|
54
|
-
const transformNativeWindow = (win) => {
|
|
55
|
-
return {
|
|
56
|
-
id: win.id,
|
|
57
|
-
fullScreenSettable: true,
|
|
58
|
-
positionable: true,
|
|
59
|
-
resizable: true,
|
|
60
|
-
active: win.active,
|
|
61
|
-
bounds: win.bounds,
|
|
62
|
-
desktopId: win.workspaceId ?? '0',
|
|
63
|
-
application: win.application && (0, system_1.transformApp)(win.application)
|
|
64
|
-
};
|
|
65
|
-
};
|
|
66
|
-
class RaycastWindowManagement {
|
|
67
|
-
async getActiveWindow() {
|
|
68
|
-
const window = await vicinae.WindowManagement.getActiveWindow();
|
|
69
|
-
return transformNativeWindow(window);
|
|
70
|
-
}
|
|
71
|
-
async getDesktops() {
|
|
72
|
-
const workspaces = await vicinae.WindowManagement.getWorkspaces();
|
|
73
|
-
return workspaces.map(transformNativeDesktop);
|
|
74
|
-
}
|
|
75
|
-
async getWindowsOnActiveDesktop() {
|
|
76
|
-
const wins = await vicinae.WindowManagement.getWindowsOnActiveWorkspace();
|
|
77
|
-
return wins.map(transformNativeWindow);
|
|
78
|
-
}
|
|
79
|
-
constructor() { }
|
|
80
|
-
}
|
|
81
|
-
;
|
|
82
|
-
exports.WindowManagement = new RaycastWindowManagement;
|