@blastlauncher/runtime 1.0.5 → 3.0.0-alpha.1
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/README.md +4 -10
- package/dist/api/action-panel.d.ts +134 -0
- package/dist/api/action-panel.js +36 -0
- package/dist/api/action.d.ts +386 -0
- package/dist/api/action.js +260 -0
- package/dist/api/ai-browser.d.ts +423 -0
- package/dist/api/ai-browser.js +113 -0
- package/dist/api/ai-decide.d.ts +41 -0
- package/dist/api/ai-decide.js +62 -0
- package/dist/api/applications.d.ts +13 -0
- package/dist/api/applications.js +48 -0
- package/dist/api/cache.d.ts +27 -0
- package/dist/api/cache.js +126 -0
- package/dist/api/capability.d.ts +14 -0
- package/dist/api/capability.js +30 -0
- package/dist/api/clipboard.d.ts +57 -0
- package/dist/api/clipboard.js +83 -0
- package/dist/api/detail.d.ts +33 -0
- package/dist/api/detail.js +11 -0
- package/dist/api/diagnostics.d.ts +16 -0
- package/dist/api/diagnostics.js +26 -0
- package/dist/api/dropdown.d.ts +17 -0
- package/dist/api/dropdown.js +48 -0
- package/dist/api/enums.generated.d.ts +750 -0
- package/dist/api/enums.generated.js +719 -0
- package/dist/api/environment.d.ts +44 -0
- package/dist/api/environment.js +61 -0
- package/dist/api/feedback.d.ts +94 -0
- package/dist/api/feedback.js +228 -0
- package/dist/api/form.d.ts +162 -0
- package/dist/api/form.js +345 -0
- package/dist/api/grid.d.ts +293 -0
- package/dist/api/grid.js +36 -0
- package/dist/api/implemented.d.ts +53 -0
- package/dist/api/implemented.js +43 -0
- package/dist/api/index.d.ts +612 -0
- package/dist/api/index.js +82 -0
- package/dist/api/keyboard.d.ts +182 -0
- package/dist/api/keyboard.js +107 -0
- package/dist/api/launch.d.ts +40 -0
- package/dist/api/launch.js +27 -0
- package/dist/api/legacy.d.ts +9 -0
- package/dist/api/legacy.js +25 -0
- package/dist/api/list.d.ts +291 -0
- package/dist/api/list.js +28 -0
- package/dist/api/menu-bar.d.ts +54 -0
- package/dist/api/menu-bar.js +30 -0
- package/dist/api/metadata.d.ts +62 -0
- package/dist/api/metadata.js +33 -0
- package/dist/api/navigation.d.ts +36 -0
- package/dist/api/navigation.js +99 -0
- package/dist/api/oauth.d.ts +84 -0
- package/dist/api/oauth.js +125 -0
- package/dist/api/open.d.ts +18 -0
- package/dist/api/open.js +36 -0
- package/dist/api/preferences.d.ts +43 -0
- package/dist/api/preferences.js +41 -0
- package/dist/api/selection.d.ts +10 -0
- package/dist/api/selection.js +31 -0
- package/dist/api/slot.d.ts +7 -0
- package/dist/api/slot.js +11 -0
- package/dist/api/storage.d.ts +24 -0
- package/dist/api/storage.js +45 -0
- package/dist/api/types.d.ts +46 -0
- package/dist/api/types.js +5 -0
- package/dist/api/unsupported.d.ts +18 -0
- package/dist/api/unsupported.generated.d.ts +1255 -0
- package/dist/api/unsupported.generated.js +56 -0
- package/dist/api/unsupported.js +65 -0
- package/dist/api/window-management.d.ts +97 -0
- package/dist/api/window-management.js +164 -0
- package/dist/api/window.d.ts +16 -0
- package/dist/api/window.js +32 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +339 -0
- package/dist/provider.d.ts +8 -0
- package/dist/provider.js +107 -0
- package/dist/reconciler/index.d.ts +9 -0
- package/dist/reconciler/index.js +186 -0
- package/dist/reconciler/serialize.d.ts +3 -0
- package/dist/reconciler/serialize.js +53 -0
- package/dist/reconciler/types.d.ts +8 -0
- package/dist/reconciler/types.js +1 -0
- package/package.json +38 -23
- package/.eslintrc.js +0 -6
- package/CHANGELOG.md +0 -19
- package/dist/App.d.ts +0 -5
- package/dist/App.js +0 -10
- package/dist/components/CommandList/index.d.ts +0 -1
- package/dist/components/CommandList/index.js +0 -20
- package/dist/components/CommandList/utils.d.ts +0 -1
- package/dist/components/CommandList/utils.js +0 -24
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -11
- package/dist/utils/connectDevtools.d.ts +0 -1
- package/dist/utils/connectDevtools.js +0 -11
- package/dist/utils/run.d.ts +0 -4
- package/dist/utils/run.js +0 -12
- package/dist/utils/window.d.ts +0 -0
- package/dist/utils/window.js +0 -2
- package/src/@types/raycast.d.ts +0 -4
- package/src/@types/react-devtools-core.d.ts +0 -19
- package/src/App.tsx +0 -18
- package/src/components/CommandList/index.tsx +0 -27
- package/src/components/CommandList/utils.ts +0 -26
- package/src/index.ts +0 -13
- package/src/utils/connectDevtools.ts +0 -8
- package/src/utils/run.ts +0 -7
- package/src/utils/window.js +0 -1
- package/tsconfig.json +0 -10
package/README.md
CHANGED
|
@@ -1,11 +1,5 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
`@blastlauncher/runtime` is the runtime of Blast Launcher.
|
|
4
|
-
|
|
5
|
-
In Raycast Launcher, you can build extensions in React.js. In Blast Launcher, we're taking this idea furthur. The **whole application** is build in React.js.
|
|
6
|
-
|
|
7
|
-
The Launcher itself is a huge React.js application, and the extensions are also React.js components. Wrap components inside components, just regular React.js things, right?
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
WIP WIP WIP WIP WIP
|
|
1
|
+
# @blastlauncher/runtime
|
|
11
2
|
|
|
3
|
+
Blast's runtime package.
|
|
4
|
+
Emitted ESM and TypeScript declarations for Node.js 24.20+.
|
|
5
|
+
See https://github.com/BlastLauncher/blast for documentation.
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import type { ImageLike, Shortcut } from "./types.js";
|
|
3
|
+
export interface ActionPanelProps {
|
|
4
|
+
/** Sections or Actions. */
|
|
5
|
+
children?: ReactNode;
|
|
6
|
+
/** The title displayed at the top of the panel. */
|
|
7
|
+
title?: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ActionPanelSectionProps {
|
|
10
|
+
/** Actions of the section. */
|
|
11
|
+
children?: ReactNode;
|
|
12
|
+
/** Title displayed above the section. */
|
|
13
|
+
title?: string;
|
|
14
|
+
}
|
|
15
|
+
/** `SubmenuProps` from the declarations (`ActionPanel.Submenu`). */
|
|
16
|
+
export interface ActionPanelSubmenuProps {
|
|
17
|
+
/** @deprecated Internal prop; kept so legacy scenes round-trip their ids. */
|
|
18
|
+
id?: string;
|
|
19
|
+
/** The title displayed for the submenu. */
|
|
20
|
+
title: string;
|
|
21
|
+
/** The icon displayed for the submenu. */
|
|
22
|
+
icon?: ImageLike;
|
|
23
|
+
/** The keyboard shortcut for the submenu. */
|
|
24
|
+
shortcut?: Shortcut;
|
|
25
|
+
/** Items of the submenu: actions and sections. */
|
|
26
|
+
children?: ReactNode;
|
|
27
|
+
/** Callback that is triggered when the submenu is opened. */
|
|
28
|
+
onOpen?: () => void;
|
|
29
|
+
/**
|
|
30
|
+
* Indicates whether the submenu should be focused automatically when its
|
|
31
|
+
* parent ActionPanel (or submenu) opens.
|
|
32
|
+
*/
|
|
33
|
+
autoFocus?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Toggles filtering of the submenu's search bar; `false` (or a
|
|
36
|
+
* `keepSectionOrder` object) hands filtering to the extension.
|
|
37
|
+
*/
|
|
38
|
+
filtering?: boolean | {
|
|
39
|
+
keepSectionOrder: boolean;
|
|
40
|
+
};
|
|
41
|
+
/** Indicates whether a loading indicator should be shown. */
|
|
42
|
+
isLoading?: boolean;
|
|
43
|
+
/** Throttles `onSearchTextChange` events. */
|
|
44
|
+
throttle?: boolean;
|
|
45
|
+
/** Callback triggered when the submenu's search bar text changes. */
|
|
46
|
+
onSearchTextChange?: (text: string) => void;
|
|
47
|
+
}
|
|
48
|
+
declare function ActionPanelSection(props: ActionPanelSectionProps): import("react").DOMElement<ActionPanelSectionProps, Element>;
|
|
49
|
+
declare function Submenu(props: ActionPanelSubmenuProps): import("react").DOMElement<ActionPanelSubmenuProps, Element>;
|
|
50
|
+
export declare const ActionPanel: ((props: ActionPanelProps) => import("react").DOMElement<ActionPanelProps, Element>) & {
|
|
51
|
+
Section: typeof ActionPanelSection;
|
|
52
|
+
Submenu: typeof Submenu;
|
|
53
|
+
Item: ((props: import("./action.js").ActionProps) => import("react").ReactElement<import("./action.js").ActionProps, string | import("react").JSXElementConstructor<any>>) & {
|
|
54
|
+
CopyToClipboard: typeof import("./action.js").CopyToClipboard;
|
|
55
|
+
CreateQuicklink: typeof import("./action.js").CreateQuicklink;
|
|
56
|
+
CreateSnippet: typeof import("./action.js").CreateSnippet;
|
|
57
|
+
InstallMCPServer: typeof import("./action.js").InstallMCPServer;
|
|
58
|
+
Open: typeof import("./action.js").Open;
|
|
59
|
+
OpenInBrowser: typeof import("./action.js").OpenInBrowser;
|
|
60
|
+
OpenWith: typeof import("./action.js").OpenWith;
|
|
61
|
+
Paste: typeof import("./action.js").Paste;
|
|
62
|
+
PickDate: ((props: import("./action.js").PickDateProps) => import("react").ReactElement<{
|
|
63
|
+
title: string;
|
|
64
|
+
shortcut?: Shortcut;
|
|
65
|
+
type?: import("./action.js").DatePickerTypeValue;
|
|
66
|
+
icon: ImageLike;
|
|
67
|
+
onChange: (value: import("@blastlauncher/protocol").JsonValue) => void;
|
|
68
|
+
min?: string;
|
|
69
|
+
max?: string;
|
|
70
|
+
}, string | import("react").JSXElementConstructor<any>>) & {
|
|
71
|
+
Type: {
|
|
72
|
+
readonly Date: "date";
|
|
73
|
+
readonly DateTime: "date_time";
|
|
74
|
+
};
|
|
75
|
+
isFullDay: (date?: Date | null) => boolean;
|
|
76
|
+
};
|
|
77
|
+
Push: typeof import("./action.js").Push;
|
|
78
|
+
ShowInFinder: typeof import("./action.js").ShowInFinder;
|
|
79
|
+
SubmitForm: typeof import("./form.js").SubmitForm;
|
|
80
|
+
ToggleQuickLook: typeof import("./action.js").ToggleQuickLook;
|
|
81
|
+
Trash: typeof import("./action.js").Trash;
|
|
82
|
+
Style: {
|
|
83
|
+
readonly Regular: "regular";
|
|
84
|
+
readonly Destructive: "destructive";
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
/** Deprecated top-level alias of `Action`. */
|
|
89
|
+
export declare const ActionPanelItem: ((props: import("./action.js").ActionProps) => import("react").ReactElement<import("./action.js").ActionProps, string | import("react").JSXElementConstructor<any>>) & {
|
|
90
|
+
CopyToClipboard: typeof import("./action.js").CopyToClipboard;
|
|
91
|
+
CreateQuicklink: typeof import("./action.js").CreateQuicklink;
|
|
92
|
+
CreateSnippet: typeof import("./action.js").CreateSnippet;
|
|
93
|
+
InstallMCPServer: typeof import("./action.js").InstallMCPServer;
|
|
94
|
+
Open: typeof import("./action.js").Open;
|
|
95
|
+
OpenInBrowser: typeof import("./action.js").OpenInBrowser;
|
|
96
|
+
OpenWith: typeof import("./action.js").OpenWith;
|
|
97
|
+
Paste: typeof import("./action.js").Paste;
|
|
98
|
+
PickDate: ((props: import("./action.js").PickDateProps) => import("react").ReactElement<{
|
|
99
|
+
title: string;
|
|
100
|
+
shortcut?: Shortcut;
|
|
101
|
+
type?: import("./action.js").DatePickerTypeValue;
|
|
102
|
+
icon: ImageLike;
|
|
103
|
+
onChange: (value: import("@blastlauncher/protocol").JsonValue) => void;
|
|
104
|
+
min?: string;
|
|
105
|
+
max?: string;
|
|
106
|
+
}, string | import("react").JSXElementConstructor<any>>) & {
|
|
107
|
+
Type: {
|
|
108
|
+
readonly Date: "date";
|
|
109
|
+
readonly DateTime: "date_time";
|
|
110
|
+
};
|
|
111
|
+
isFullDay: (date?: Date | null) => boolean;
|
|
112
|
+
};
|
|
113
|
+
Push: typeof import("./action.js").Push;
|
|
114
|
+
ShowInFinder: typeof import("./action.js").ShowInFinder;
|
|
115
|
+
SubmitForm: typeof import("./form.js").SubmitForm;
|
|
116
|
+
ToggleQuickLook: typeof import("./action.js").ToggleQuickLook;
|
|
117
|
+
Trash: typeof import("./action.js").Trash;
|
|
118
|
+
Style: {
|
|
119
|
+
readonly Regular: "regular";
|
|
120
|
+
readonly Destructive: "destructive";
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
/** Deprecated top-level alias of `ActionPanel.Submenu`. */
|
|
124
|
+
export declare const ActionPanelSubmenu: typeof Submenu;
|
|
125
|
+
/** `ActionPanelState`: what the deprecated `useActionPanel` returns. */
|
|
126
|
+
export interface ActionPanelState {
|
|
127
|
+
/** @deprecated No alternative :( */
|
|
128
|
+
update: (actionPanel: ReactNode) => void;
|
|
129
|
+
}
|
|
130
|
+
/** The last panel installed through `useActionPanel().update`. */
|
|
131
|
+
export declare function currentActionPanel(): ReactNode;
|
|
132
|
+
/** @deprecated No alternative :( */
|
|
133
|
+
export declare function useActionPanel(): ActionPanelState;
|
|
134
|
+
export {};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { createElement, useMemo } from "react";
|
|
2
|
+
import { Action } from "./action.js";
|
|
3
|
+
function ActionPanelSection(props) {
|
|
4
|
+
return createElement("ActionPanel.Section", props);
|
|
5
|
+
}
|
|
6
|
+
// `onOpen` and `onSearchTextChange` serialize as handler references, so
|
|
7
|
+
// clients can dispatch a submenu opening (the CLI's `submenu <title>` script
|
|
8
|
+
// command) and search text through the scene.
|
|
9
|
+
function Submenu(props) {
|
|
10
|
+
return createElement("ActionPanel.Submenu", props);
|
|
11
|
+
}
|
|
12
|
+
export const ActionPanel = Object.assign(function ActionPanel(props) {
|
|
13
|
+
return createElement("ActionPanel", props);
|
|
14
|
+
},
|
|
15
|
+
// `ActionPanel.Item` is the deprecated name of `Action` (`typeof Action`).
|
|
16
|
+
{ Section: ActionPanelSection, Submenu, Item: Action });
|
|
17
|
+
/** Deprecated top-level alias of `Action`. */
|
|
18
|
+
export const ActionPanelItem = Action;
|
|
19
|
+
/** Deprecated top-level alias of `ActionPanel.Submenu`. */
|
|
20
|
+
export const ActionPanelSubmenu = Submenu;
|
|
21
|
+
// Raycast's legacy hook kept one action panel per view; Blast keeps the last
|
|
22
|
+
// panel a command installed so `update` (and any code reading it back) is not
|
|
23
|
+
// silently discarded. Views pick their panel from props in the scene model.
|
|
24
|
+
let legacyActionPanel = null;
|
|
25
|
+
/** The last panel installed through `useActionPanel().update`. */
|
|
26
|
+
export function currentActionPanel() {
|
|
27
|
+
return legacyActionPanel;
|
|
28
|
+
}
|
|
29
|
+
/** @deprecated No alternative :( */
|
|
30
|
+
export function useActionPanel() {
|
|
31
|
+
return useMemo(() => ({
|
|
32
|
+
update: (actionPanel) => {
|
|
33
|
+
legacyActionPanel = actionPanel;
|
|
34
|
+
},
|
|
35
|
+
}), []);
|
|
36
|
+
}
|
|
@@ -0,0 +1,386 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type ClipboardContent } from "./clipboard.js";
|
|
3
|
+
import { SubmitForm } from "./form.js";
|
|
4
|
+
import { ActionStyle, DatePickerType_2, Icon } from "./enums.generated.js";
|
|
5
|
+
import { type Application } from "./open.js";
|
|
6
|
+
import type { ImageLike, Shortcut } from "./types.js";
|
|
7
|
+
import type { JsonValue } from "../reconciler/index.js";
|
|
8
|
+
export type ActionStyle = (typeof ActionStyle)[keyof typeof ActionStyle];
|
|
9
|
+
export interface ActionProps {
|
|
10
|
+
/** @deprecated Internal prop; kept so legacy scenes round-trip their ids. */
|
|
11
|
+
id?: string;
|
|
12
|
+
/** The title displayed for the Action. */
|
|
13
|
+
title: string;
|
|
14
|
+
/** The icon displayed for the Action. */
|
|
15
|
+
icon?: ImageLike;
|
|
16
|
+
/** Defines the visual style of the Action. */
|
|
17
|
+
style?: ActionStyle;
|
|
18
|
+
/** The keyboard shortcut for the Action. */
|
|
19
|
+
shortcut?: Shortcut;
|
|
20
|
+
/**
|
|
21
|
+
* Indicates whether the Action should be focused automatically when its
|
|
22
|
+
* ActionPanel opens.
|
|
23
|
+
*/
|
|
24
|
+
autoFocus?: boolean;
|
|
25
|
+
/** Callback that is triggered when the Action is selected. */
|
|
26
|
+
onAction?: () => void;
|
|
27
|
+
}
|
|
28
|
+
export interface CopyToClipboardProps {
|
|
29
|
+
/** The contents that will be copied to the clipboard. */
|
|
30
|
+
content: string | number | ClipboardContent;
|
|
31
|
+
/** An optional title for the Action. @defaultValue `"Copy to Clipboard"` */
|
|
32
|
+
title?: string;
|
|
33
|
+
/** An optional icon displayed for the Action. */
|
|
34
|
+
icon?: ImageLike;
|
|
35
|
+
/** The keyboard shortcut for the Action. */
|
|
36
|
+
shortcut?: Shortcut;
|
|
37
|
+
/** @deprecated Use `concealed` instead. */
|
|
38
|
+
transient?: boolean;
|
|
39
|
+
/** Indicates whether the content should be treated as confidential. */
|
|
40
|
+
concealed?: boolean;
|
|
41
|
+
/** Callback when the content was copied to clipboard. */
|
|
42
|
+
onCopy?: (content: string | number | ClipboardContent) => void;
|
|
43
|
+
}
|
|
44
|
+
/** The value type of `Action.PickDate.Type`. */
|
|
45
|
+
export type DatePickerTypeValue = (typeof DatePickerType_2)[keyof typeof DatePickerType_2];
|
|
46
|
+
/** `PickDateProps` from the declarations (`Action.PickDate`). */
|
|
47
|
+
export interface PickDateProps {
|
|
48
|
+
/** A title for the Action. */
|
|
49
|
+
title: string;
|
|
50
|
+
/** The icon displayed for the Action. @defaultValue `Icon.Calendar` */
|
|
51
|
+
icon?: ImageLike;
|
|
52
|
+
/** The keyboard shortcut for the Action. */
|
|
53
|
+
shortcut?: Shortcut;
|
|
54
|
+
/** Callback when the date was picked. */
|
|
55
|
+
onChange: (date: Date | null) => void;
|
|
56
|
+
/** What types of date components can be picked. @defaultValue `Type.DateTime` */
|
|
57
|
+
type?: DatePickerTypeValue;
|
|
58
|
+
/** The minimum date (inclusive) allowed for selection. */
|
|
59
|
+
min?: Date;
|
|
60
|
+
/** The maximum date (inclusive) allowed for selection. */
|
|
61
|
+
max?: Date;
|
|
62
|
+
}
|
|
63
|
+
declare function isFullDay(date?: Date | null): boolean;
|
|
64
|
+
export declare const PickDate: ((props: PickDateProps) => import("react").ReactElement<{
|
|
65
|
+
/** A title for the Action. */
|
|
66
|
+
title: string;
|
|
67
|
+
/** The keyboard shortcut for the Action. */
|
|
68
|
+
shortcut?: Shortcut;
|
|
69
|
+
/** What types of date components can be picked. @defaultValue `Type.DateTime` */
|
|
70
|
+
type?: DatePickerTypeValue;
|
|
71
|
+
icon: ImageLike;
|
|
72
|
+
onChange: (value: JsonValue) => void;
|
|
73
|
+
min?: string;
|
|
74
|
+
max?: string;
|
|
75
|
+
}, string | import("react").JSXElementConstructor<any>>) & {
|
|
76
|
+
Type: {
|
|
77
|
+
readonly Date: "date";
|
|
78
|
+
readonly DateTime: "date_time";
|
|
79
|
+
};
|
|
80
|
+
isFullDay: typeof isFullDay;
|
|
81
|
+
};
|
|
82
|
+
export declare const Action: ((props: ActionProps) => import("react").ReactElement<ActionProps, string | import("react").JSXElementConstructor<any>>) & {
|
|
83
|
+
CopyToClipboard: typeof CopyToClipboard;
|
|
84
|
+
CreateQuicklink: typeof CreateQuicklink;
|
|
85
|
+
CreateSnippet: typeof CreateSnippet;
|
|
86
|
+
InstallMCPServer: typeof InstallMCPServer;
|
|
87
|
+
Open: typeof Open;
|
|
88
|
+
OpenInBrowser: typeof OpenInBrowser;
|
|
89
|
+
OpenWith: typeof OpenWith;
|
|
90
|
+
Paste: typeof Paste;
|
|
91
|
+
PickDate: ((props: PickDateProps) => import("react").ReactElement<{
|
|
92
|
+
/** A title for the Action. */
|
|
93
|
+
title: string;
|
|
94
|
+
/** The keyboard shortcut for the Action. */
|
|
95
|
+
shortcut?: Shortcut;
|
|
96
|
+
/** What types of date components can be picked. @defaultValue `Type.DateTime` */
|
|
97
|
+
type?: DatePickerTypeValue;
|
|
98
|
+
icon: ImageLike;
|
|
99
|
+
onChange: (value: JsonValue) => void;
|
|
100
|
+
min?: string;
|
|
101
|
+
max?: string;
|
|
102
|
+
}, string | import("react").JSXElementConstructor<any>>) & {
|
|
103
|
+
Type: {
|
|
104
|
+
readonly Date: "date";
|
|
105
|
+
readonly DateTime: "date_time";
|
|
106
|
+
};
|
|
107
|
+
isFullDay: typeof isFullDay;
|
|
108
|
+
};
|
|
109
|
+
Push: typeof Push;
|
|
110
|
+
ShowInFinder: typeof ShowInFinder;
|
|
111
|
+
SubmitForm: typeof SubmitForm;
|
|
112
|
+
ToggleQuickLook: typeof ToggleQuickLook;
|
|
113
|
+
Trash: typeof Trash;
|
|
114
|
+
Style: {
|
|
115
|
+
readonly Regular: "regular";
|
|
116
|
+
readonly Destructive: "destructive";
|
|
117
|
+
};
|
|
118
|
+
};
|
|
119
|
+
export declare function CopyToClipboard(props: CopyToClipboardProps): import("react").ReactElement<{
|
|
120
|
+
/** An optional icon displayed for the Action. */
|
|
121
|
+
icon?: ImageLike;
|
|
122
|
+
/** The keyboard shortcut for the Action. */
|
|
123
|
+
shortcut?: Shortcut;
|
|
124
|
+
/** Indicates whether the content should be treated as confidential. */
|
|
125
|
+
concealed?: boolean;
|
|
126
|
+
title: string;
|
|
127
|
+
onAction: () => Promise<void | undefined>;
|
|
128
|
+
}, string | import("react").JSXElementConstructor<any>>;
|
|
129
|
+
export interface OpenInBrowserProps {
|
|
130
|
+
url: string;
|
|
131
|
+
title?: string;
|
|
132
|
+
icon?: ImageLike;
|
|
133
|
+
shortcut?: Shortcut;
|
|
134
|
+
onOpen?: (url: string) => void;
|
|
135
|
+
}
|
|
136
|
+
export interface PasteProps {
|
|
137
|
+
content: string | number | ClipboardContent;
|
|
138
|
+
title?: string;
|
|
139
|
+
icon?: ImageLike;
|
|
140
|
+
shortcut?: Shortcut;
|
|
141
|
+
onPaste?: (content: string | number | ClipboardContent) => void;
|
|
142
|
+
}
|
|
143
|
+
export declare function OpenInBrowser(props: OpenInBrowserProps): import("react").ReactElement<{
|
|
144
|
+
shortcut?: Shortcut;
|
|
145
|
+
title: string;
|
|
146
|
+
icon: ImageLike;
|
|
147
|
+
onAction: () => Promise<void>;
|
|
148
|
+
}, string | import("react").JSXElementConstructor<any>>;
|
|
149
|
+
export declare function Paste(props: PasteProps): import("react").ReactElement<{
|
|
150
|
+
shortcut?: Shortcut;
|
|
151
|
+
title: string;
|
|
152
|
+
icon: ImageLike;
|
|
153
|
+
onAction: () => Promise<void>;
|
|
154
|
+
}, string | import("react").JSXElementConstructor<any>>;
|
|
155
|
+
export { CopyToClipboard as CopyToClipboardAction, Paste as PasteAction };
|
|
156
|
+
export interface PushProps {
|
|
157
|
+
title: string;
|
|
158
|
+
target: ReactNode;
|
|
159
|
+
icon?: ImageLike;
|
|
160
|
+
shortcut?: Shortcut;
|
|
161
|
+
onPush?: () => void;
|
|
162
|
+
onPop?: () => void;
|
|
163
|
+
}
|
|
164
|
+
export declare function Push({ target, onPush, onPop, ...props }: PushProps): import("react").ReactElement<{
|
|
165
|
+
title: string;
|
|
166
|
+
icon?: ImageLike;
|
|
167
|
+
shortcut?: Shortcut;
|
|
168
|
+
onAction: () => void;
|
|
169
|
+
}, string | import("react").JSXElementConstructor<any>>;
|
|
170
|
+
export { Push as PushAction };
|
|
171
|
+
/** `PathLike`, which the declarations take from `node:fs`. */
|
|
172
|
+
export type ActionPathLike = string | Buffer | URL;
|
|
173
|
+
/** `OpenProps` from the declarations (`Action.Open`). */
|
|
174
|
+
export interface OpenProps {
|
|
175
|
+
/** The file, folder or URL to open. */
|
|
176
|
+
target: string;
|
|
177
|
+
/** The application name (or identifier/path) to use for opening the file. */
|
|
178
|
+
application?: Application | string;
|
|
179
|
+
/** The title for the Action. */
|
|
180
|
+
title: string;
|
|
181
|
+
/** The icon displayed for the Action. @defaultValue `Icon.Finder` */
|
|
182
|
+
icon?: ImageLike;
|
|
183
|
+
/** The keyboard shortcut for the Action. */
|
|
184
|
+
shortcut?: Shortcut;
|
|
185
|
+
/** Callback when the file or folder was opened. */
|
|
186
|
+
onOpen?: (target: string) => void;
|
|
187
|
+
}
|
|
188
|
+
export declare function Open(props: OpenProps): import("react").ReactElement<{
|
|
189
|
+
/** The title for the Action. */
|
|
190
|
+
title: string;
|
|
191
|
+
/** The keyboard shortcut for the Action. */
|
|
192
|
+
shortcut?: Shortcut;
|
|
193
|
+
icon: ImageLike;
|
|
194
|
+
onAction: () => Promise<void>;
|
|
195
|
+
}, string | import("react").JSXElementConstructor<any>>;
|
|
196
|
+
/** Deprecated alias of `Action.Open`. */
|
|
197
|
+
export declare const OpenAction: typeof Open;
|
|
198
|
+
/** `OpenWithProps` from the declarations (`Action.OpenWith`). */
|
|
199
|
+
export interface OpenWithProps {
|
|
200
|
+
/** The path to open. */
|
|
201
|
+
path: string;
|
|
202
|
+
/** The title for the Action. @defaultValue `"Open With"` */
|
|
203
|
+
title?: string;
|
|
204
|
+
/** The icon displayed for the Action. @defaultValue `Icon.Upload` */
|
|
205
|
+
icon?: ImageLike;
|
|
206
|
+
/** The keyboard shortcut for the Action. */
|
|
207
|
+
shortcut?: Shortcut;
|
|
208
|
+
/** Callback when the file or folder was opened. */
|
|
209
|
+
onOpen?: (path: string) => void;
|
|
210
|
+
}
|
|
211
|
+
export declare function OpenWith(props: OpenWithProps): import("react").ReactElement<{
|
|
212
|
+
/** The keyboard shortcut for the Action. */
|
|
213
|
+
shortcut?: Shortcut;
|
|
214
|
+
title: string;
|
|
215
|
+
icon: ImageLike;
|
|
216
|
+
onAction: () => Promise<void>;
|
|
217
|
+
}, string | import("react").JSXElementConstructor<any>>;
|
|
218
|
+
/** Deprecated alias of `Action.OpenWith`. */
|
|
219
|
+
export declare const OpenWithAction: typeof OpenWith;
|
|
220
|
+
/** `ShowInFinderProps` from the declarations (`Action.ShowInFinder`). */
|
|
221
|
+
export interface ShowInFinderProps {
|
|
222
|
+
/** The path to reveal. */
|
|
223
|
+
path: ActionPathLike;
|
|
224
|
+
/** The title for the Action. @defaultValue `"Show in Finder"` */
|
|
225
|
+
title?: string;
|
|
226
|
+
/** The icon displayed for the Action. @defaultValue `Icon.Finder` */
|
|
227
|
+
icon?: ImageLike;
|
|
228
|
+
/** The keyboard shortcut for the Action. */
|
|
229
|
+
shortcut?: Shortcut;
|
|
230
|
+
/** Callback when the file or folder was shown in the Finder. */
|
|
231
|
+
onShow?: (path: ActionPathLike) => void;
|
|
232
|
+
}
|
|
233
|
+
export declare function ShowInFinder(props: ShowInFinderProps): import("react").ReactElement<{
|
|
234
|
+
/** The keyboard shortcut for the Action. */
|
|
235
|
+
shortcut?: Shortcut;
|
|
236
|
+
title: string;
|
|
237
|
+
icon: ImageLike;
|
|
238
|
+
onAction: () => Promise<void>;
|
|
239
|
+
}, string | import("react").JSXElementConstructor<any>>;
|
|
240
|
+
/** Deprecated alias of `Action.ShowInFinder`. */
|
|
241
|
+
export declare const ShowInFinderAction: typeof ShowInFinder;
|
|
242
|
+
/** `TrashProps` from the declarations (`Action.Trash`). */
|
|
243
|
+
export interface TrashProps {
|
|
244
|
+
/** The item or items to move to the trash. */
|
|
245
|
+
paths: ActionPathLike | ActionPathLike[];
|
|
246
|
+
/** The title for the Action. @defaultValue `"Move to Trash"` */
|
|
247
|
+
title?: string;
|
|
248
|
+
/** The icon displayed for the Action. @defaultValue `Icon.Trash` */
|
|
249
|
+
icon?: ImageLike;
|
|
250
|
+
/** The keyboard shortcut for the Action. */
|
|
251
|
+
shortcut?: Shortcut;
|
|
252
|
+
/** Callback when all items were moved to the trash. */
|
|
253
|
+
onTrash?: (paths: ActionPathLike | ActionPathLike[]) => void;
|
|
254
|
+
}
|
|
255
|
+
export declare function Trash(props: TrashProps): import("react").ReactElement<{
|
|
256
|
+
/** The keyboard shortcut for the Action. */
|
|
257
|
+
shortcut?: Shortcut;
|
|
258
|
+
title: string;
|
|
259
|
+
icon: ImageLike;
|
|
260
|
+
onAction: () => Promise<void>;
|
|
261
|
+
}, string | import("react").JSXElementConstructor<any>>;
|
|
262
|
+
/** Deprecated alias of `Action.Trash`. */
|
|
263
|
+
export declare const TrashAction: typeof Trash;
|
|
264
|
+
/** `Snippet` from the declarations. */
|
|
265
|
+
export interface Snippet {
|
|
266
|
+
/** The snippet contents. */
|
|
267
|
+
text: string;
|
|
268
|
+
/** The snippet name. */
|
|
269
|
+
name?: string;
|
|
270
|
+
/** The keyword to trigger the snippet. */
|
|
271
|
+
keyword?: string;
|
|
272
|
+
}
|
|
273
|
+
/** `CreateSnippetProps` from the declarations (`Action.CreateSnippet`). */
|
|
274
|
+
export interface CreateSnippetProps {
|
|
275
|
+
/** The snippet to create. */
|
|
276
|
+
snippet: Snippet;
|
|
277
|
+
/** The title for the Action. */
|
|
278
|
+
title?: string;
|
|
279
|
+
/** The icon displayed for the Action. */
|
|
280
|
+
icon?: ImageLike;
|
|
281
|
+
/** The keyboard shortcut for the Action. */
|
|
282
|
+
shortcut?: Shortcut;
|
|
283
|
+
}
|
|
284
|
+
export declare function CreateSnippet(props: CreateSnippetProps): import("react").ReactElement<{
|
|
285
|
+
/** The keyboard shortcut for the Action. */
|
|
286
|
+
shortcut?: Shortcut;
|
|
287
|
+
title: string;
|
|
288
|
+
icon: ImageLike;
|
|
289
|
+
onAction: () => Promise<JsonValue>;
|
|
290
|
+
}, string | import("react").JSXElementConstructor<any>>;
|
|
291
|
+
/** `Quicklink` from the declarations. */
|
|
292
|
+
export interface Quicklink {
|
|
293
|
+
/** The icon to display for the quicklink. */
|
|
294
|
+
icon?: (typeof Icon)[keyof typeof Icon];
|
|
295
|
+
/** The URL or file path, optionally including placeholders such as `{Query}`. */
|
|
296
|
+
link: string;
|
|
297
|
+
/** The quicklink name. */
|
|
298
|
+
name?: string;
|
|
299
|
+
/** The application that the quicklink should be opened in. */
|
|
300
|
+
application?: string | Application;
|
|
301
|
+
}
|
|
302
|
+
/** `CreateQuicklinkProps` from the declarations (`Action.CreateQuicklink`). */
|
|
303
|
+
export interface CreateQuicklinkProps {
|
|
304
|
+
/** The quicklink to create. */
|
|
305
|
+
quicklink: Quicklink;
|
|
306
|
+
/** The title for the Action. */
|
|
307
|
+
title?: string;
|
|
308
|
+
/** The icon displayed for the Action. */
|
|
309
|
+
icon?: ImageLike;
|
|
310
|
+
/** The keyboard shortcut for the Action. */
|
|
311
|
+
shortcut?: Shortcut;
|
|
312
|
+
}
|
|
313
|
+
export declare function CreateQuicklink(props: CreateQuicklinkProps): import("react").ReactElement<{
|
|
314
|
+
/** The keyboard shortcut for the Action. */
|
|
315
|
+
shortcut?: Shortcut;
|
|
316
|
+
title: string;
|
|
317
|
+
icon: ImageLike;
|
|
318
|
+
onAction: () => Promise<JsonValue>;
|
|
319
|
+
}, string | import("react").JSXElementConstructor<any>>;
|
|
320
|
+
/** `ToggleQuickLookProps` from the declarations (`Action.ToggleQuickLook`). */
|
|
321
|
+
export interface ToggleQuickLookProps {
|
|
322
|
+
/** The title for the Action. @defaultValue `"Quick Look"` */
|
|
323
|
+
title?: string;
|
|
324
|
+
/** The icon displayed for the Action. @defaultValue `Icon.Eye` */
|
|
325
|
+
icon?: ImageLike;
|
|
326
|
+
/** The keyboard shortcut for the Action. */
|
|
327
|
+
shortcut?: Shortcut;
|
|
328
|
+
}
|
|
329
|
+
export declare function ToggleQuickLook(props: ToggleQuickLookProps): import("react").ReactElement<{
|
|
330
|
+
title: string;
|
|
331
|
+
icon: ImageLike;
|
|
332
|
+
shortcut: Shortcut | undefined;
|
|
333
|
+
onAction: () => Promise<JsonValue>;
|
|
334
|
+
}, string | import("react").JSXElementConstructor<any>>;
|
|
335
|
+
/** An `Icon` member, as the declarations type `MCPServer.icon`. */
|
|
336
|
+
export type IconValue = (typeof Icon)[keyof typeof Icon];
|
|
337
|
+
/** `MCPServer` from the declarations. */
|
|
338
|
+
export interface MCPServer {
|
|
339
|
+
/** The icon to display for the MCP server. */
|
|
340
|
+
icon?: IconValue;
|
|
341
|
+
/** The name of the MCP server. */
|
|
342
|
+
name: string;
|
|
343
|
+
/** The description of the MCP server. */
|
|
344
|
+
description?: string;
|
|
345
|
+
}
|
|
346
|
+
/** `StdioMCPServer`: an MCP server started as a local process. */
|
|
347
|
+
export interface StdioMCPServer extends MCPServer {
|
|
348
|
+
transport: "stdio";
|
|
349
|
+
/** The command to run the MCP server. */
|
|
350
|
+
command: string;
|
|
351
|
+
/** The arguments to pass to the MCP server. */
|
|
352
|
+
args?: string[];
|
|
353
|
+
/** The environment variables to pass to the MCP server. */
|
|
354
|
+
env?: Record<string, string>;
|
|
355
|
+
}
|
|
356
|
+
/** `SSEMCPServer`: an MCP server reached over HTTP. */
|
|
357
|
+
export interface SSEMCPServer extends MCPServer {
|
|
358
|
+
transport: "sse";
|
|
359
|
+
/** The URL of the MCP server. */
|
|
360
|
+
url: string;
|
|
361
|
+
/** The HTTP headers to use for network requests to the MCP server. */
|
|
362
|
+
headers?: Record<string, string>;
|
|
363
|
+
}
|
|
364
|
+
/** `InstallMCPServerProps` from the declarations (`Action.InstallMCPServer`). */
|
|
365
|
+
export interface InstallMCPServerProps {
|
|
366
|
+
/** The stdio or SSE server to install. */
|
|
367
|
+
server: StdioMCPServer | SSEMCPServer;
|
|
368
|
+
/** The title for the Action. */
|
|
369
|
+
title?: string;
|
|
370
|
+
/** The icon displayed for the Action. */
|
|
371
|
+
icon?: ImageLike;
|
|
372
|
+
/** The keyboard shortcut for the Action. */
|
|
373
|
+
shortcut?: Shortcut;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Installs an MCP server. Blast runs no MCP client, so this is a capability:
|
|
377
|
+
* the host decides, and a headless run denies it unless granted.
|
|
378
|
+
*/
|
|
379
|
+
export declare function InstallMCPServer(props: InstallMCPServerProps): import("react").ReactElement<{
|
|
380
|
+
/** The icon displayed for the Action. */
|
|
381
|
+
icon?: ImageLike;
|
|
382
|
+
/** The keyboard shortcut for the Action. */
|
|
383
|
+
shortcut?: Shortcut;
|
|
384
|
+
title: string;
|
|
385
|
+
onAction: () => Promise<void>;
|
|
386
|
+
}, string | import("react").JSXElementConstructor<any>>;
|