@raycast/api 1.27.1 → 1.28.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/bin/arm64/ray +0 -0
- package/bin/x86/ray +0 -0
- package/package.json +2 -2
- package/types/api/app/app.d.ts +171 -0
- package/types/api/app/clipboard.d.ts +47 -0
- package/types/api/app/index.d.ts +4 -0
- package/types/api/app/keyboard.d.ts +56 -0
- package/types/api/app/localStorage.d.ts +117 -0
- package/types/api/components/ActionPanel.d.ts +297 -0
- package/types/api/components/Detail.d.ts +40 -0
- package/types/api/components/Form.d.ts +992 -0
- package/types/api/components/List.d.ts +275 -0
- package/types/api/components/actions/Action.d.ts +396 -0
- package/types/api/components/actions/CopyToClipboardAction.d.ts +39 -0
- package/types/api/components/actions/OpenAction.d.ts +47 -0
- package/types/api/components/actions/OpenInBrowserAction.d.ts +42 -0
- package/types/api/components/actions/OpenWithAction.d.ts +40 -0
- package/types/api/components/actions/PasteAction.d.ts +39 -0
- package/types/api/components/actions/PushAction.d.ts +38 -0
- package/types/api/components/actions/ShowInFinderAction.d.ts +42 -0
- package/types/api/components/actions/SubmitFormAction.d.ts +34 -0
- package/types/api/components/actions/TrashAction.d.ts +43 -0
- package/types/api/components/actions/index.d.ts +1 -0
- package/types/api/components/index.d.ts +5 -0
- package/types/api/components/propTypes.d.ts +1 -0
- package/types/api/components/types.d.ts +30 -0
- package/types/api/deprecated.d.ts +410 -0
- package/types/api/environment/environment.d.ts +48 -0
- package/types/api/environment/index.d.ts +3 -0
- package/types/api/environment/preferences.d.ts +31 -0
- package/types/api/environment/workspace.d.ts +62 -0
- package/types/api/hooks/index.d.ts +1 -0
- package/types/api/hooks/useNavigation.d.ts +66 -0
- package/types/api/index.d.ts +6 -0
- package/types/api/internal/comm/index.d.ts +1 -0
- package/types/api/internal/components/ErrorBoundary.d.ts +1 -0
- package/types/api/internal/components/Navigation.d.ts +1 -0
- package/types/api/internal/components/Root.d.ts +1 -0
- package/types/api/internal/components/index.d.ts +4 -0
- package/types/api/internal/components/portal/components/portal/Portal.d.ts +4 -0
- package/types/api/internal/components/portal/components/portal/index.d.ts +1 -0
- package/types/api/internal/components/portal/components/portalHost/PortalHost.d.ts +4 -0
- package/types/api/internal/components/portal/components/portalHost/index.d.ts +1 -0
- package/types/api/internal/components/portal/components/portalProvider/PortalProvider.d.ts +4 -0
- package/types/api/internal/components/portal/components/portalProvider/index.d.ts +1 -0
- package/types/api/internal/components/portal/contexts/index.d.ts +1 -0
- package/types/api/internal/components/portal/contexts/portal.d.ts +5 -0
- package/types/api/internal/components/portal/hooks/index.d.ts +2 -0
- package/types/api/internal/components/portal/hooks/usePortal.d.ts +8 -0
- package/types/api/internal/components/portal/hooks/usePortalState.d.ts +1 -0
- package/types/api/internal/components/portal/index.d.ts +5 -0
- package/types/api/internal/components/portal/state/constants.d.ts +9 -0
- package/types/api/internal/components/portal/state/index.d.ts +3 -0
- package/types/api/internal/components/portal/state/reducer.d.ts +3 -0
- package/types/api/internal/components/portal/utilities/logger.d.ts +9 -0
- package/types/api/internal/devtools/index.d.ts +1 -0
- package/types/api/internal/devtools/react.d.ts +1 -0
- package/types/api/internal/hooks/index.d.ts +2 -0
- package/types/api/internal/hooks/useActionPanel.d.ts +1 -0
- package/types/api/internal/hooks/useId.d.ts +1 -0
- package/types/api/internal/index.d.ts +6 -0
- package/types/api/internal/rendering/callbacks.d.ts +1 -0
- package/types/api/internal/rendering/index.d.ts +5 -0
- package/types/api/internal/rendering/node-builders/actions.d.ts +1 -0
- package/types/api/internal/rendering/node-builders/detail.d.ts +1 -0
- package/types/api/internal/rendering/node-builders/forms.d.ts +1 -0
- package/types/api/internal/rendering/node-builders/keyboard.d.ts +1 -0
- package/types/api/internal/rendering/node-builders/list.d.ts +1 -0
- package/types/api/internal/rendering/node-builders/navigationStack.d.ts +1 -0
- package/types/api/internal/rendering/node-builders/root.d.ts +1 -0
- package/types/api/internal/rendering/node-builders/types.d.ts +1 -0
- package/types/api/internal/rendering/node-builders/utils.d.ts +1 -0
- package/types/api/internal/rendering/reconciler.d.ts +1 -0
- package/types/api/internal/rendering/renderer.d.ts +1 -0
- package/types/api/internal/utils/ids.d.ts +1 -0
- package/types/api/internal/utils/index.d.ts +1 -0
- package/types/api/ui/color.d.ts +115 -0
- package/types/api/ui/errors.d.ts +1 -0
- package/types/api/ui/feedback/alert.d.ts +97 -0
- package/types/api/ui/feedback/hud.d.ts +16 -0
- package/types/api/ui/feedback/index.d.ts +3 -0
- package/types/api/ui/feedback/toast.d.ts +171 -0
- package/types/api/ui/icon.d.ts +88 -0
- package/types/api/ui/image.d.ts +161 -0
- package/types/api/ui/index.d.ts +5 -0
- package/types/core/message-types.d.ts +17 -0
- package/types/core/preferences.d.ts +69 -0
- package/types/index.d.ts +2777 -2536
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { Application, Keyboard } from "../../app";
|
|
3
|
+
import { Image } from "../../ui";
|
|
4
|
+
/**
|
|
5
|
+
* See {@link Action.Open.Props}
|
|
6
|
+
*/
|
|
7
|
+
export interface OpenActionProps {
|
|
8
|
+
/**
|
|
9
|
+
* The file, folder or URL to open.
|
|
10
|
+
*/
|
|
11
|
+
target: string;
|
|
12
|
+
/**
|
|
13
|
+
* The application name to use for opening the file.
|
|
14
|
+
*
|
|
15
|
+
* @remarks
|
|
16
|
+
* If no application is specified, the default application as determined by the system is used to open the
|
|
17
|
+
* specified file. Note that you can use the application name, app identifier, or absolute path to the app.
|
|
18
|
+
*/
|
|
19
|
+
application?: Application | string;
|
|
20
|
+
/**
|
|
21
|
+
* The title for the action.
|
|
22
|
+
*/
|
|
23
|
+
title: string;
|
|
24
|
+
/**
|
|
25
|
+
* The icon displayed for the action.
|
|
26
|
+
* @defaultValue {@link Icon.Finder}
|
|
27
|
+
*/
|
|
28
|
+
icon?: Image.ImageLike;
|
|
29
|
+
/**
|
|
30
|
+
* The keyboard shortcut for the action.
|
|
31
|
+
*/
|
|
32
|
+
shortcut?: Keyboard.Shortcut;
|
|
33
|
+
/**
|
|
34
|
+
* Callback when the file or folder was opened.
|
|
35
|
+
*
|
|
36
|
+
* @remarks
|
|
37
|
+
* This is handy when you want to act on an opened file or folder, e.g. store a history of opened items.
|
|
38
|
+
*/
|
|
39
|
+
onOpen?: (target: string) => void;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* See {@link Action.Open}
|
|
43
|
+
*/
|
|
44
|
+
export declare function OpenAction(props: OpenActionProps): ReactElement<OpenActionProps>;
|
|
45
|
+
export declare namespace OpenAction {
|
|
46
|
+
var displayName: string;
|
|
47
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { Keyboard } from "../../app";
|
|
3
|
+
import { Image } from "../../ui";
|
|
4
|
+
/**
|
|
5
|
+
* See {@link Action.OpenInBrowser.Props}
|
|
6
|
+
*/
|
|
7
|
+
export interface OpenInBrowserActionProps {
|
|
8
|
+
/**
|
|
9
|
+
* The URL to open.
|
|
10
|
+
*/
|
|
11
|
+
url: string;
|
|
12
|
+
/**
|
|
13
|
+
* An optional title for the action.
|
|
14
|
+
*/
|
|
15
|
+
title?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The icon displayed for the action.
|
|
18
|
+
* @defaultValue {@link Icon.Globe}
|
|
19
|
+
*/
|
|
20
|
+
icon?: Image.ImageLike;
|
|
21
|
+
/**
|
|
22
|
+
* The optional keyboard shortcut for the menu item
|
|
23
|
+
*/
|
|
24
|
+
shortcut?: Keyboard.Shortcut;
|
|
25
|
+
/**
|
|
26
|
+
* Callback when the URL was opened in the browser.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* This is handy when you want to act on the opened link, e.g. store a history of visited links.
|
|
30
|
+
*/
|
|
31
|
+
onOpen?: (url: string) => void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* See {@link Action.OpenInBrowser}
|
|
35
|
+
*/
|
|
36
|
+
export declare function OpenInBrowserAction(props: OpenInBrowserActionProps): ReactElement<OpenInBrowserActionProps>;
|
|
37
|
+
export declare namespace OpenInBrowserAction {
|
|
38
|
+
var displayName: string;
|
|
39
|
+
}
|
|
40
|
+
export declare namespace OpenInBrowserAction {
|
|
41
|
+
type Props = OpenInBrowserActionProps;
|
|
42
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { Keyboard } from "../../app";
|
|
3
|
+
import { Image } from "../../ui";
|
|
4
|
+
/**
|
|
5
|
+
* See {@link Action.OpenWith.Props}
|
|
6
|
+
*/
|
|
7
|
+
export interface OpenWithActionProps {
|
|
8
|
+
/**
|
|
9
|
+
* The path to open.
|
|
10
|
+
*/
|
|
11
|
+
path: string;
|
|
12
|
+
/**
|
|
13
|
+
* The title for the action.
|
|
14
|
+
* @defaultValue Open With
|
|
15
|
+
*/
|
|
16
|
+
title?: string;
|
|
17
|
+
/**
|
|
18
|
+
* The icon displayed for the action.
|
|
19
|
+
* @defaultValue {@link Icon.Upload}
|
|
20
|
+
*/
|
|
21
|
+
icon?: Image.ImageLike;
|
|
22
|
+
/**
|
|
23
|
+
* The keyboard shortcut for the action.
|
|
24
|
+
*/
|
|
25
|
+
shortcut?: Keyboard.Shortcut;
|
|
26
|
+
/**
|
|
27
|
+
* Callback when the file or folder was opened.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* This is handy when you want to act on an opened file or folder, e.g. store a history of opened items.
|
|
31
|
+
*/
|
|
32
|
+
onOpen?: (path: string) => void;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* See {@link Action.OpenWith}
|
|
36
|
+
*/
|
|
37
|
+
export declare function OpenWithAction(props: OpenWithActionProps): ReactElement<OpenWithActionProps>;
|
|
38
|
+
export declare namespace OpenWithAction {
|
|
39
|
+
var displayName: string;
|
|
40
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { Keyboard } from "../../app";
|
|
3
|
+
import { Image } from "../../ui";
|
|
4
|
+
/**
|
|
5
|
+
* See {@link Action.Paste.Props}
|
|
6
|
+
*/
|
|
7
|
+
export interface PasteActionProps {
|
|
8
|
+
/**
|
|
9
|
+
* The contents that will be written to the clipboard as string.
|
|
10
|
+
*/
|
|
11
|
+
content: string | number;
|
|
12
|
+
/**
|
|
13
|
+
* An optional title for the action.
|
|
14
|
+
*/
|
|
15
|
+
title?: string;
|
|
16
|
+
/**
|
|
17
|
+
* The icon displayed for the action.
|
|
18
|
+
* @defaultValue {@link Icon.Clipboard}
|
|
19
|
+
*/
|
|
20
|
+
icon?: Image.ImageLike;
|
|
21
|
+
/**
|
|
22
|
+
* The keyboard shortcut for the action.
|
|
23
|
+
*/
|
|
24
|
+
shortcut?: Keyboard.Shortcut;
|
|
25
|
+
/**
|
|
26
|
+
* Callback when the content was pasted into the front-most application.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* This is handy when you want to act on the pasted content, e.g. up-rank recently pasted content.
|
|
30
|
+
*/
|
|
31
|
+
onPaste?: (content: string | number) => void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* See {@link Action.Paste.Props}
|
|
35
|
+
*/
|
|
36
|
+
export declare function PasteAction(props: PasteActionProps): ReactElement<PasteActionProps>;
|
|
37
|
+
export declare namespace PasteAction {
|
|
38
|
+
var displayName: string;
|
|
39
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ReactNode, ReactElement } from "react";
|
|
2
|
+
import { Keyboard } from "../../app";
|
|
3
|
+
import { Image } from "../../ui";
|
|
4
|
+
/**
|
|
5
|
+
* See {@link Action.Push.Props}
|
|
6
|
+
*/
|
|
7
|
+
export interface PushActionProps {
|
|
8
|
+
/**
|
|
9
|
+
* The title displayed for the item.
|
|
10
|
+
*/
|
|
11
|
+
title: string;
|
|
12
|
+
/**
|
|
13
|
+
* The target view that will be pushed to the navigation stack.
|
|
14
|
+
*/
|
|
15
|
+
target: ReactNode;
|
|
16
|
+
/**
|
|
17
|
+
* The icon displayed for the action.
|
|
18
|
+
*/
|
|
19
|
+
icon?: Image.ImageLike;
|
|
20
|
+
/**
|
|
21
|
+
* The keyboard shortcut for the action.
|
|
22
|
+
*/
|
|
23
|
+
shortcut?: Keyboard.Shortcut;
|
|
24
|
+
/**
|
|
25
|
+
* Callback when the target view was pushed.
|
|
26
|
+
*
|
|
27
|
+
* @remarks
|
|
28
|
+
* This is handy when you want to act on the pushed target view, e.g. uprank a selected list item.
|
|
29
|
+
*/
|
|
30
|
+
onPush?: () => void;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* See {@link Action.Push.Props}
|
|
34
|
+
*/
|
|
35
|
+
export declare function PushAction(props: PushActionProps): ReactElement<PushActionProps>;
|
|
36
|
+
export declare namespace PushAction {
|
|
37
|
+
var displayName: string;
|
|
38
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { PathLike } from "fs";
|
|
3
|
+
import { ReactElement } from "react";
|
|
4
|
+
import { Image } from "../../ui";
|
|
5
|
+
import { Keyboard } from "../../app";
|
|
6
|
+
/**
|
|
7
|
+
* See {@link Action.ShowInFinder.Props}
|
|
8
|
+
*/
|
|
9
|
+
export interface ShowInFinderActionProps {
|
|
10
|
+
/**
|
|
11
|
+
* The path to open.
|
|
12
|
+
*/
|
|
13
|
+
path: PathLike;
|
|
14
|
+
/**
|
|
15
|
+
* An optional title for the action.
|
|
16
|
+
* @defaultValue Show in Finder
|
|
17
|
+
*/
|
|
18
|
+
title?: string;
|
|
19
|
+
/**
|
|
20
|
+
* A optional icon displayed for the item.
|
|
21
|
+
* @defaultValue {@link Icon.Finder}
|
|
22
|
+
*/
|
|
23
|
+
icon?: Image.ImageLike;
|
|
24
|
+
/**
|
|
25
|
+
* The keyboard shortcut for the action.
|
|
26
|
+
*/
|
|
27
|
+
shortcut?: Keyboard.Shortcut;
|
|
28
|
+
/**
|
|
29
|
+
* Callback when the file or folder was shown in the Finder.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* This is handy when you want to act on revealed files or folders, e.g. up-rank recently opened items.
|
|
33
|
+
*/
|
|
34
|
+
onShow?: (path: PathLike) => void;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* See {@link Action.ShowInFinder.Props}
|
|
38
|
+
*/
|
|
39
|
+
export declare function ShowInFinderAction(props: ShowInFinderActionProps): ReactElement<ShowInFinderActionProps>;
|
|
40
|
+
export declare namespace ShowInFinderAction {
|
|
41
|
+
var displayName: string;
|
|
42
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { ReactElement } from "react";
|
|
2
|
+
import { Keyboard } from "../../app";
|
|
3
|
+
import { Image } from "../../ui";
|
|
4
|
+
import type { Form } from "../Form";
|
|
5
|
+
/**
|
|
6
|
+
* See {@link Action.SubmitForm.Props}
|
|
7
|
+
*/
|
|
8
|
+
export interface SubmitFormActionProps<Values> {
|
|
9
|
+
/**
|
|
10
|
+
* The title displayed for the item.
|
|
11
|
+
*/
|
|
12
|
+
title?: string;
|
|
13
|
+
/**
|
|
14
|
+
* The icon displayed for the action.
|
|
15
|
+
*/
|
|
16
|
+
icon?: Image.ImageLike;
|
|
17
|
+
/**
|
|
18
|
+
* The keyboard shortcut for the action.
|
|
19
|
+
*/
|
|
20
|
+
shortcut?: Keyboard.Shortcut;
|
|
21
|
+
/**
|
|
22
|
+
* Callback that is triggered when the submit was submitted.
|
|
23
|
+
* Use the handler to perform custom validation logic and call other Raycast API methods.
|
|
24
|
+
* The handler receives a the values object containing the user input.
|
|
25
|
+
*/
|
|
26
|
+
onSubmit?: (input: Values) => void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* See {@link Action.SubmitForm.Props}
|
|
30
|
+
*/
|
|
31
|
+
export declare function SubmitFormAction<Values extends Form.Values = Form.Values>(props: SubmitFormActionProps<Values>): ReactElement<SubmitFormActionProps<Values>>;
|
|
32
|
+
export declare namespace SubmitFormAction {
|
|
33
|
+
var displayName: string;
|
|
34
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { PathLike } from "fs";
|
|
3
|
+
import { ReactElement } from "react";
|
|
4
|
+
import { Image } from "../../ui";
|
|
5
|
+
import { Keyboard } from "../../app";
|
|
6
|
+
/**
|
|
7
|
+
* See {@link Action.Trash.Props}
|
|
8
|
+
*/
|
|
9
|
+
export interface TrashActionProps {
|
|
10
|
+
/**
|
|
11
|
+
* The item or items to move to the trash.
|
|
12
|
+
*/
|
|
13
|
+
paths: PathLike | PathLike[];
|
|
14
|
+
/**
|
|
15
|
+
* An optional title for the action.
|
|
16
|
+
* @defaultValue Move to Trash
|
|
17
|
+
*/
|
|
18
|
+
title?: string;
|
|
19
|
+
/**
|
|
20
|
+
* A optional icon displayed for the action.
|
|
21
|
+
* @defaultValue {@link Icon.Trash}
|
|
22
|
+
*/
|
|
23
|
+
icon?: Image.ImageLike;
|
|
24
|
+
/**
|
|
25
|
+
* The optional keyboard shortcut for the action.
|
|
26
|
+
*/
|
|
27
|
+
shortcut?: Keyboard.Shortcut;
|
|
28
|
+
/**
|
|
29
|
+
* Callback when all items were moved to the trash.
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* This is handy when you want to act on a trashed item, e.g. update a list.
|
|
33
|
+
* The callback returns the same `paths` as passed originally.
|
|
34
|
+
*/
|
|
35
|
+
onTrash?: (paths: PathLike | PathLike[]) => void;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* See {@link Action.Trash}
|
|
39
|
+
*/
|
|
40
|
+
export declare function TrashAction(props: TrashActionProps): ReactElement<TrashActionProps>;
|
|
41
|
+
export declare namespace TrashAction {
|
|
42
|
+
var displayName: string;
|
|
43
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Action";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Views that can be embedded in a navigation stack, show a navigation title and support a loading bar.
|
|
4
|
+
* @category User Interface
|
|
5
|
+
*/
|
|
6
|
+
export interface NavigationChildInterface {
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* The main title for that view displayed in Raycast
|
|
10
|
+
*
|
|
11
|
+
* @defaultValue Command title
|
|
12
|
+
*/
|
|
13
|
+
navigationTitle?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Indicates whether a loading bar should be shown or hidden below the search bar
|
|
16
|
+
*
|
|
17
|
+
* @defaultValue false
|
|
18
|
+
*/
|
|
19
|
+
isLoading?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Components that support an Action Panel.
|
|
23
|
+
* @category User Interface
|
|
24
|
+
*/
|
|
25
|
+
export interface ActionsInterface {
|
|
26
|
+
/**
|
|
27
|
+
* A reference to an {@link ActionPanel}.
|
|
28
|
+
*/
|
|
29
|
+
actions?: ReactNode;
|
|
30
|
+
}
|