@raycast/api 1.78.1 → 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 +15 -9
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -5162,6 +5162,7 @@ export declare enum Icon {
|
|
|
5162
5162
|
WristWatch = "wrist-watch-16",
|
|
5163
5163
|
XMarkCircle = "x-mark-circle-16",
|
|
5164
5164
|
XMarkCircleFilled = "x-mark-circle-filled-16",
|
|
5165
|
+
XMarkCircleHalfDash = "x-mark-circle-half-dash-16",
|
|
5165
5166
|
XMarkTopRightSquare = "x-mark-top-right-square-16",
|
|
5166
5167
|
Xmark = "xmark-16",
|
|
5167
5168
|
/** @deprecated Use {@link Icon.ArrowClockwise} instead. */
|
|
@@ -6693,8 +6694,9 @@ declare interface LabelProps {
|
|
|
6693
6694
|
* Push a new view component to the navigation stack.
|
|
6694
6695
|
*
|
|
6695
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.
|
|
6696
6698
|
*/
|
|
6697
|
-
push: (component: ReactNode) => void;
|
|
6699
|
+
push: (component: ReactNode, onPop?: () => void) => void;
|
|
6698
6700
|
/**
|
|
6699
6701
|
* Pop current view component from the navigation stack.
|
|
6700
6702
|
*/
|
|
@@ -7530,6 +7532,10 @@ declare interface LabelProps {
|
|
|
7530
7532
|
* This is handy when you want to act on the pushed target view, e.g. uprank a selected list item.
|
|
7531
7533
|
*/
|
|
7532
7534
|
onPush?: () => void;
|
|
7535
|
+
/**
|
|
7536
|
+
* Callback when the target view will be popped.
|
|
7537
|
+
*/
|
|
7538
|
+
onPop?: () => void;
|
|
7533
7539
|
}
|
|
7534
7540
|
|
|
7535
7541
|
declare interface Quicklink {
|
|
@@ -8609,10 +8615,10 @@ declare interface LabelProps {
|
|
|
8609
8615
|
*
|
|
8610
8616
|
* @example
|
|
8611
8617
|
* ```typescript
|
|
8612
|
-
* import {
|
|
8618
|
+
* import { WindowManagement, showToast } from "@raycast/api";
|
|
8613
8619
|
*
|
|
8614
8620
|
* export default async function Command() {
|
|
8615
|
-
* const desktops = await getDesktops();
|
|
8621
|
+
* const desktops = await WindowManagement.getDesktops();
|
|
8616
8622
|
* const screens = Set(desktops.map((desktop) => desktop.screenId));
|
|
8617
8623
|
* showToast({title: `Found ${desktops.length} desktops on ${screens.size} screens.`});
|
|
8618
8624
|
* }
|
|
@@ -8627,16 +8633,16 @@ declare interface LabelProps {
|
|
|
8627
8633
|
*
|
|
8628
8634
|
* @example
|
|
8629
8635
|
* ```typescript
|
|
8630
|
-
* import {
|
|
8636
|
+
* import { WindowManagement, showToast } from "@raycast/api";
|
|
8631
8637
|
*
|
|
8632
8638
|
* export default async function Command() {
|
|
8633
|
-
* const windows = await getWindowsOnActiveDesktop();
|
|
8639
|
+
* const windows = await WindowManagement.getWindowsOnActiveDesktop();
|
|
8634
8640
|
* const chrome = windows.find((x) => x.application?.bundleId === "com.google.Chrome");
|
|
8635
8641
|
* if (!chrome) {
|
|
8636
8642
|
* showToast({ title: "Couldn't find chrome", style: Toast.Style.Failure });
|
|
8637
8643
|
* return;
|
|
8638
8644
|
* }
|
|
8639
|
-
* setWindowBounds({ id: chrome.id, bounds: { position: { x: 100 } } })
|
|
8645
|
+
* WindowManagement.setWindowBounds({ id: chrome.id, bounds: { position: { x: 100 } } })
|
|
8640
8646
|
* }
|
|
8641
8647
|
* ```
|
|
8642
8648
|
*/
|
|
@@ -8648,12 +8654,12 @@ declare interface LabelProps {
|
|
|
8648
8654
|
*
|
|
8649
8655
|
* @example
|
|
8650
8656
|
* ```typescript
|
|
8651
|
-
* import {
|
|
8657
|
+
* import { WindowManagement, showToast } from "@raycast/api";
|
|
8652
8658
|
*
|
|
8653
8659
|
* export default async function Command() {
|
|
8654
8660
|
* try {
|
|
8655
|
-
* const window = await getActiveWindow();
|
|
8656
|
-
* setWindowBounds({ id: window.id, bounds: { position: { x: 100 } } })
|
|
8661
|
+
* const window = await WindowManagement.getActiveWindow();
|
|
8662
|
+
* WindowManagement.setWindowBounds({ id: window.id, bounds: { position: { x: 100 } } })
|
|
8657
8663
|
* } catch (error) {
|
|
8658
8664
|
* showToast({ title: "Could not move window", message: error.message, style: Toast.Style.Failure });
|
|
8659
8665
|
* }
|