@raycast/api 1.78.0 → 1.79.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/meta.json +8327 -0
- package/package.json +1 -1
- package/types/index.d.ts +17 -12
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -2466,7 +2466,6 @@ export declare interface Environment {
|
|
|
2466
2466
|
* console.log(`Is development mode: ${environment.isDevelopment}`);
|
|
2467
2467
|
* console.log(`Raycast appearance: ${environment.appearance}`);
|
|
2468
2468
|
* console.log(`Raycast launchType: ${environment.launchType}`);
|
|
2469
|
-
* console.log(`Raycast launchContext: ${environment.launchContext}`);
|
|
2470
2469
|
* ```
|
|
2471
2470
|
*/
|
|
2472
2471
|
export declare const environment: Environment;
|
|
@@ -5163,6 +5162,7 @@ export declare enum Icon {
|
|
|
5163
5162
|
WristWatch = "wrist-watch-16",
|
|
5164
5163
|
XMarkCircle = "x-mark-circle-16",
|
|
5165
5164
|
XMarkCircleFilled = "x-mark-circle-filled-16",
|
|
5165
|
+
XMarkCircleHalfDash = "x-mark-circle-half-dash-16",
|
|
5166
5166
|
XMarkTopRightSquare = "x-mark-top-right-square-16",
|
|
5167
5167
|
Xmark = "xmark-16",
|
|
5168
5168
|
/** @deprecated Use {@link Icon.ArrowClockwise} instead. */
|
|
@@ -5376,7 +5376,7 @@ declare type InterExtensionLaunchOptions = {
|
|
|
5376
5376
|
type: LaunchType;
|
|
5377
5377
|
/** Optional object for the argument properties and values as defined in the extension's manifest, for example: `{ "argument1": "value1" }` */
|
|
5378
5378
|
arguments?: Arguments | null;
|
|
5379
|
-
/** Arbitrary object for custom data that should be passed to the command and accessible as
|
|
5379
|
+
/** Arbitrary object for custom data that should be passed to the command and accessible as {@link LaunchProps}; the object must be JSON serializable (Dates and Buffers supported) */
|
|
5380
5380
|
context?: LaunchContext | null;
|
|
5381
5381
|
/** Optional string to send as fallback text to the command */
|
|
5382
5382
|
fallbackText?: string | null;
|
|
@@ -5392,7 +5392,7 @@ declare type IntraExtensionLaunchOptions = {
|
|
|
5392
5392
|
type: LaunchType;
|
|
5393
5393
|
/** Optional object for the argument properties and values as defined in the extension's manifest, for example: `{ "argument1": "value1" }` */
|
|
5394
5394
|
arguments?: Arguments | null;
|
|
5395
|
-
/** Arbitrary object for custom data that should be passed to the command and accessible as
|
|
5395
|
+
/** Arbitrary object for custom data that should be passed to the command and accessible as {@link LaunchProps}; the object must be JSON serializable (Dates and Buffers supported) */
|
|
5396
5396
|
context?: LaunchContext | null;
|
|
5397
5397
|
/** Optional string to send as fallback text to the command */
|
|
5398
5398
|
fallbackText?: string | null;
|
|
@@ -6694,8 +6694,9 @@ declare interface LabelProps {
|
|
|
6694
6694
|
* Push a new view component to the navigation stack.
|
|
6695
6695
|
*
|
|
6696
6696
|
* @param component - The React component to push to the navigation stack.
|
|
6697
|
+
* @param onPop - A callback that is called when the component will be popped from the navigation stack.
|
|
6697
6698
|
*/
|
|
6698
|
-
push: (component: ReactNode) => void;
|
|
6699
|
+
push: (component: ReactNode, onPop?: () => void) => void;
|
|
6699
6700
|
/**
|
|
6700
6701
|
* Pop current view component from the navigation stack.
|
|
6701
6702
|
*/
|
|
@@ -7531,6 +7532,10 @@ declare interface LabelProps {
|
|
|
7531
7532
|
* This is handy when you want to act on the pushed target view, e.g. uprank a selected list item.
|
|
7532
7533
|
*/
|
|
7533
7534
|
onPush?: () => void;
|
|
7535
|
+
/**
|
|
7536
|
+
* Callback when the target view will be popped.
|
|
7537
|
+
*/
|
|
7538
|
+
onPop?: () => void;
|
|
7534
7539
|
}
|
|
7535
7540
|
|
|
7536
7541
|
declare interface Quicklink {
|
|
@@ -8610,10 +8615,10 @@ declare interface LabelProps {
|
|
|
8610
8615
|
*
|
|
8611
8616
|
* @example
|
|
8612
8617
|
* ```typescript
|
|
8613
|
-
* import {
|
|
8618
|
+
* import { WindowManagement, showToast } from "@raycast/api";
|
|
8614
8619
|
*
|
|
8615
8620
|
* export default async function Command() {
|
|
8616
|
-
* const desktops = await getDesktops();
|
|
8621
|
+
* const desktops = await WindowManagement.getDesktops();
|
|
8617
8622
|
* const screens = Set(desktops.map((desktop) => desktop.screenId));
|
|
8618
8623
|
* showToast({title: `Found ${desktops.length} desktops on ${screens.size} screens.`});
|
|
8619
8624
|
* }
|
|
@@ -8628,16 +8633,16 @@ declare interface LabelProps {
|
|
|
8628
8633
|
*
|
|
8629
8634
|
* @example
|
|
8630
8635
|
* ```typescript
|
|
8631
|
-
* import {
|
|
8636
|
+
* import { WindowManagement, showToast } from "@raycast/api";
|
|
8632
8637
|
*
|
|
8633
8638
|
* export default async function Command() {
|
|
8634
|
-
* const windows = await getWindowsOnActiveDesktop();
|
|
8639
|
+
* const windows = await WindowManagement.getWindowsOnActiveDesktop();
|
|
8635
8640
|
* const chrome = windows.find((x) => x.application?.bundleId === "com.google.Chrome");
|
|
8636
8641
|
* if (!chrome) {
|
|
8637
8642
|
* showToast({ title: "Couldn't find chrome", style: Toast.Style.Failure });
|
|
8638
8643
|
* return;
|
|
8639
8644
|
* }
|
|
8640
|
-
* setWindowBounds({ id: chrome.id, bounds: { position: { x: 100 } } })
|
|
8645
|
+
* WindowManagement.setWindowBounds({ id: chrome.id, bounds: { position: { x: 100 } } })
|
|
8641
8646
|
* }
|
|
8642
8647
|
* ```
|
|
8643
8648
|
*/
|
|
@@ -8649,12 +8654,12 @@ declare interface LabelProps {
|
|
|
8649
8654
|
*
|
|
8650
8655
|
* @example
|
|
8651
8656
|
* ```typescript
|
|
8652
|
-
* import {
|
|
8657
|
+
* import { WindowManagement, showToast } from "@raycast/api";
|
|
8653
8658
|
*
|
|
8654
8659
|
* export default async function Command() {
|
|
8655
8660
|
* try {
|
|
8656
|
-
* const window = await getActiveWindow();
|
|
8657
|
-
* setWindowBounds({ id: window.id, bounds: { position: { x: 100 } } })
|
|
8661
|
+
* const window = await WindowManagement.getActiveWindow();
|
|
8662
|
+
* WindowManagement.setWindowBounds({ id: window.id, bounds: { position: { x: 100 } } })
|
|
8658
8663
|
* } catch (error) {
|
|
8659
8664
|
* showToast({ title: "Could not move window", message: error.message, style: Toast.Style.Failure });
|
|
8660
8665
|
* }
|