@raycast/api 1.38.0 → 1.38.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/api.d.ts CHANGED
@@ -126,8 +126,9 @@ export declare namespace Action {
126
126
  * sections and can have keyboard shortcuts assigned.
127
127
  *
128
128
  * The first and second action become the primary and secondary action. They automatically get the default keyboard shortcuts assigned.
129
- * In {@link List} and {@link Detail}, this is `↵` for the primary and `⌘` `↵` for the secondary action. In {@link Form} it's `⌘` `↵` for the primary and
129
+ * In {@link List}, {@link Grid}, and {@link Detail}, this is `↵` for the primary and `⌘` `↵` for the secondary action. In {@link Form} it's `⌘` `↵` for the primary and
130
130
  * `⌘` `⇧` `↵` for the secondary.
131
+ * Keep in mind that while you can specify an alternative shortcut for the primary and secondary actions, it won't be displayed in the Action Panel.
131
132
  *
132
133
  * @example
133
134
  * ```typescript
@@ -198,9 +199,7 @@ declare type ActionPanelChildren_2 = ReactElement<ActionPanel.Section.Props> | R
198
199
  * @deprecated Use {@link Action} instead.
199
200
  */
200
201
  export declare const ActionPanelItem: FunctionComponent<ActionProps> & ConvenienceActions & {
201
- Style: ActionStyle; /**
202
- * @deprecated Use {@link Image.ImageLike} instead
203
- */
202
+ Style: ActionStyle;
204
203
  };
205
204
 
206
205
  /**
@@ -382,7 +381,8 @@ declare interface ActionProps {
382
381
  *
383
382
  * @remarks
384
383
  * The first and second action in an {@link ActionPanel} become the primary and secondary action. They automatically get the default keyboard shortcuts assigned.
385
- * In {@link List} and {@link Detail}, this is `↵` for the primary and `⌘` `↵` for the secondary action. In {@link Form} it's `⌘` `↵` for the primary and `⌘` `⇧` `↵` for the secondary.
384
+ * In {@link List}, {@link Grid} ,and {@link Detail}, this is `↵` for the primary and `⌘` `↵` for the secondary action. In {@link Form} it's `⌘` `↵` for the primary and `⌘` `⇧` `↵` for the secondary.
385
+ * Keep in mind that while you can specify an alternative shortcut for the primary and secondary actions, it won't be displayed in the Action Panel.
386
386
  */
387
387
  shortcut?: Keyboard.Shortcut | undefined | null;
388
388
  /**
@@ -537,7 +537,6 @@ export declare interface Application {
537
537
  }
538
538
 
539
539
  /**
540
- * @beta
541
540
  * A record type holding the arguments (entered in Raycast Root Search Bar) that have been passed to the command.
542
541
  */
543
542
  declare interface Arguments {
@@ -548,7 +547,6 @@ declare interface Arguments {
548
547
  }
549
548
 
550
549
  /**
551
- * @beta
552
550
  * An interface describing top-level props for arguments
553
551
  */
554
552
  export declare interface ArgumentsLaunchProps {
@@ -2131,7 +2129,6 @@ export declare interface Environment {
2131
2129
  */
2132
2130
  theme: "light" | "dark";
2133
2131
  /**
2134
- * @beta
2135
2132
  * The type of launch for the command (user initiated or background).
2136
2133
  */
2137
2134
  launchType: LaunchType;
@@ -4281,8 +4278,16 @@ export declare enum Icon {
4281
4278
  Network = "network-16",
4282
4279
  NewDocument = "new-document-16",
4283
4280
  NewFolder = "new-folder-16",
4284
- Number = "number-01-16",
4285
4281
  Number00 = "number-00-16",
4282
+ Number01 = "number-01-16",
4283
+ Number02 = "number-02-16",
4284
+ Number03 = "number-03-16",
4285
+ Number04 = "number-04-16",
4286
+ Number05 = "number-05-16",
4287
+ Number06 = "number-06-16",
4288
+ Number07 = "number-07-16",
4289
+ Number08 = "number-08-16",
4290
+ Number09 = "number-09-16",
4286
4291
  Number10 = "number-10-16",
4287
4292
  Number11 = "number-11-16",
4288
4293
  Number12 = "number-12-16",
@@ -4684,7 +4689,6 @@ declare const Item: FunctionComponent<ItemProps> & ItemMembers;
4684
4689
  declare const Item_2: FunctionComponent<ItemProps_2>;
4685
4690
 
4686
4691
  /**
4687
- * @beta
4688
4692
  * See {@link MenuBarExtra.Item}
4689
4693
  */
4690
4694
  declare const Item_3: FunctionComponent<ItemProps_3>;
@@ -4846,9 +4850,6 @@ declare interface ItemProps_2 extends ActionsInterface {
4846
4850
  actions?: ReactNode | null;
4847
4851
  }
4848
4852
 
4849
- /**
4850
- * @beta
4851
- */
4852
4853
  declare interface ItemProps_3 {
4853
4854
  title: string;
4854
4855
  icon?: Image.ImageLike;
@@ -4973,14 +4974,10 @@ declare interface LabelProps_2 {
4973
4974
  }
4974
4975
 
4975
4976
  /**
4976
- * @beta
4977
4977
  * The top-level props that a Command receives on launch
4978
4978
  */
4979
4979
  export declare type LaunchProps = ArgumentsLaunchProps | FormLaunchProps;
4980
4980
 
4981
- /**
4982
- * @beta
4983
- */
4984
4981
  export declare enum LaunchType {
4985
4982
  /**
4986
4983
  * A regular launch through user interaction
@@ -5484,30 +5481,18 @@ export declare type LocalStorageValue = LocalStorage.Value;
5484
5481
  export declare interface LocalStorageValues extends LocalStorage.Values {
5485
5482
  }
5486
5483
 
5487
- /**
5488
- * @beta
5489
- */
5490
5484
  export declare const MenuBarExtra: FunctionComponent<MenuBarExtraProps> & MenuBarExtraMembers;
5491
5485
 
5492
- /**
5493
- * @beta
5494
- */
5495
5486
  export declare namespace MenuBarExtra {
5496
5487
  export type Props = MenuBarExtraProps;
5497
5488
  }
5498
5489
 
5499
- /**
5500
- * @beta
5501
- */
5502
5490
  declare interface MenuBarExtraMembers {
5503
5491
  Item: typeof Item_3;
5504
5492
  Separator: typeof Separator_4;
5505
5493
  Submenu: typeof Submenu_2;
5506
5494
  }
5507
5495
 
5508
- /**
5509
- * @beta
5510
- */
5511
5496
  declare interface MenuBarExtraProps {
5512
5497
  /**
5513
5498
  * @defaultValue `false`
@@ -6482,7 +6467,6 @@ declare const Separator_2: FunctionComponent<SeparatorProps_2>;
6482
6467
  declare const Separator_3: FunctionComponent<SeparatorProps_3>;
6483
6468
 
6484
6469
  /**
6485
- * @beta
6486
6470
  * See {@link MenuBarExtra.Separator}
6487
6471
  */
6488
6472
  declare const Separator_4: FunctionComponent<SeparatorProps_4>;
@@ -6499,9 +6483,6 @@ declare interface SeparatorProps_2 {
6499
6483
  declare interface SeparatorProps_3 {
6500
6484
  }
6501
6485
 
6502
- /**
6503
- * @beta
6504
- */
6505
6486
  declare interface SeparatorProps_4 {
6506
6487
  }
6507
6488
 
@@ -6667,7 +6648,6 @@ export declare const specialKeys: any;
6667
6648
  declare const Submenu: FunctionComponent<SubmenuProps>;
6668
6649
 
6669
6650
  /**
6670
- * @beta
6671
6651
  * See {@link MenuBarExtra.Submenu}
6672
6652
  */
6673
6653
  declare const Submenu_2: FunctionComponent<SubmenuProps_2>;
@@ -6729,9 +6709,6 @@ declare interface SubmenuProps {
6729
6709
  onOpen?: () => void;
6730
6710
  }
6731
6711
 
6732
- /**
6733
- * @beta
6734
- */
6735
6712
  declare interface SubmenuProps_2 {
6736
6713
  title: string | {
6737
6714
  value: string;
@@ -7211,7 +7188,6 @@ declare interface TrashProps {
7211
7188
  }
7212
7189
 
7213
7190
  /**
7214
- * @beta
7215
7191
  * Update the values of properties declared in the manifest of a command.
7216
7192
  *
7217
7193
  * @param metadata - An object with the values for the manifest properties to update.
package/bin/arm64/ray CHANGED
Binary file
package/bin/x86/ray CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@raycast/api",
3
- "version": "1.38.0",
3
+ "version": "1.38.1",
4
4
  "description": "Build extensions for Raycast with React and Node.js.",
5
5
  "author": "Raycast Technologies Ltd.",
6
6
  "homepage": "https://developers.raycast.com",
package/types/index.d.ts CHANGED
@@ -126,8 +126,9 @@ export declare namespace Action {
126
126
  * sections and can have keyboard shortcuts assigned.
127
127
  *
128
128
  * The first and second action become the primary and secondary action. They automatically get the default keyboard shortcuts assigned.
129
- * In {@link List} and {@link Detail}, this is `↵` for the primary and `⌘` `↵` for the secondary action. In {@link Form} it's `⌘` `↵` for the primary and
129
+ * In {@link List}, {@link Grid}, and {@link Detail}, this is `↵` for the primary and `⌘` `↵` for the secondary action. In {@link Form} it's `⌘` `↵` for the primary and
130
130
  * `⌘` `⇧` `↵` for the secondary.
131
+ * Keep in mind that while you can specify an alternative shortcut for the primary and secondary actions, it won't be displayed in the Action Panel.
131
132
  *
132
133
  * @example
133
134
  * ```typescript
@@ -198,9 +199,7 @@ declare type ActionPanelChildren_2 = ReactElement<ActionPanel.Section.Props> | R
198
199
  * @deprecated Use {@link Action} instead.
199
200
  */
200
201
  export declare const ActionPanelItem: FunctionComponent<ActionProps> & ConvenienceActions & {
201
- Style: ActionStyle; /**
202
- * @deprecated Use {@link Image.ImageLike} instead
203
- */
202
+ Style: ActionStyle;
204
203
  };
205
204
 
206
205
  /**
@@ -382,7 +381,8 @@ declare interface ActionProps {
382
381
  *
383
382
  * @remarks
384
383
  * The first and second action in an {@link ActionPanel} become the primary and secondary action. They automatically get the default keyboard shortcuts assigned.
385
- * In {@link List} and {@link Detail}, this is `↵` for the primary and `⌘` `↵` for the secondary action. In {@link Form} it's `⌘` `↵` for the primary and `⌘` `⇧` `↵` for the secondary.
384
+ * In {@link List}, {@link Grid} ,and {@link Detail}, this is `↵` for the primary and `⌘` `↵` for the secondary action. In {@link Form} it's `⌘` `↵` for the primary and `⌘` `⇧` `↵` for the secondary.
385
+ * Keep in mind that while you can specify an alternative shortcut for the primary and secondary actions, it won't be displayed in the Action Panel.
386
386
  */
387
387
  shortcut?: Keyboard.Shortcut | undefined | null;
388
388
  /**
@@ -536,6 +536,26 @@ export declare interface Application {
536
536
  bundleId?: string;
537
537
  }
538
538
 
539
+ /**
540
+ * A record type holding the arguments (entered in Raycast Root Search Bar) that have been passed to the command.
541
+ */
542
+ declare interface Arguments {
543
+ /**
544
+ * The representation of arguments given that key here is the `name` defined in manifest file and value is the user's input
545
+ */
546
+ [item: string]: any;
547
+ }
548
+
549
+ /**
550
+ * An interface describing top-level props for arguments
551
+ */
552
+ export declare interface ArgumentsLaunchProps {
553
+ /**
554
+ * Use these values to populate the initial state for your command.
555
+ */
556
+ arguments?: Arguments;
557
+ }
558
+
539
559
  /**
540
560
  * Caching abstraction that stores data on disk and supports LRU (least recently used) access.
541
561
  * Since extensions can only consume up to a max. heap memory size, the cache only maintains a lightweight index in memory
@@ -2108,7 +2128,10 @@ export declare interface Environment {
2108
2128
  * The theme used by the Raycast application.
2109
2129
  */
2110
2130
  theme: "light" | "dark";
2111
-
2131
+ /**
2132
+ * The type of launch for the command (user initiated or background).
2133
+ */
2134
+ launchType: LaunchType;
2112
2135
  }
2113
2136
 
2114
2137
  /**
@@ -4255,8 +4278,16 @@ export declare enum Icon {
4255
4278
  Network = "network-16",
4256
4279
  NewDocument = "new-document-16",
4257
4280
  NewFolder = "new-folder-16",
4258
- Number = "number-01-16",
4259
4281
  Number00 = "number-00-16",
4282
+ Number01 = "number-01-16",
4283
+ Number02 = "number-02-16",
4284
+ Number03 = "number-03-16",
4285
+ Number04 = "number-04-16",
4286
+ Number05 = "number-05-16",
4287
+ Number06 = "number-06-16",
4288
+ Number07 = "number-07-16",
4289
+ Number08 = "number-08-16",
4290
+ Number09 = "number-09-16",
4260
4291
  Number10 = "number-10-16",
4261
4292
  Number11 = "number-11-16",
4262
4293
  Number12 = "number-12-16",
@@ -4657,6 +4688,11 @@ declare const Item: FunctionComponent<ItemProps> & ItemMembers;
4657
4688
  */
4658
4689
  declare const Item_2: FunctionComponent<ItemProps_2>;
4659
4690
 
4691
+ /**
4692
+ * See {@link MenuBarExtra.Item}
4693
+ */
4694
+ declare const Item_3: FunctionComponent<ItemProps_3>;
4695
+
4660
4696
  declare type ItemAccessory = ({
4661
4697
  /**
4662
4698
  * An optional text that will be used as the label.
@@ -4814,6 +4850,14 @@ declare interface ItemProps_2 extends ActionsInterface {
4814
4850
  actions?: ReactNode | null;
4815
4851
  }
4816
4852
 
4853
+ declare interface ItemProps_3 {
4854
+ title: string;
4855
+ icon?: Image.ImageLike;
4856
+ tooltip?: string;
4857
+ onAction?: () => void;
4858
+ shortcut?: Keyboard.Shortcut;
4859
+ }
4860
+
4817
4861
  export declare namespace Keyboard {
4818
4862
  /**
4819
4863
  * A keyboard shortcut is defined by one or more modifier keys (command, control, etc.) and a single key equivalent (a character or special key).
@@ -4929,6 +4973,22 @@ declare interface LabelProps_2 {
4929
4973
  text?: string;
4930
4974
  }
4931
4975
 
4976
+ /**
4977
+ * The top-level props that a Command receives on launch
4978
+ */
4979
+ export declare type LaunchProps = ArgumentsLaunchProps | FormLaunchProps;
4980
+
4981
+ export declare enum LaunchType {
4982
+ /**
4983
+ * A regular launch through user interaction
4984
+ */
4985
+ UserInitiated = "userInitiated",
4986
+ /**
4987
+ * Scheduled through an interval and launched from background
4988
+ */
4989
+ Background = "background"
4990
+ }
4991
+
4932
4992
  /**
4933
4993
  * See {@link Detail.Metadata.Link}
4934
4994
  */
@@ -5421,6 +5481,29 @@ export declare type LocalStorageValue = LocalStorage.Value;
5421
5481
  export declare interface LocalStorageValues extends LocalStorage.Values {
5422
5482
  }
5423
5483
 
5484
+ export declare const MenuBarExtra: FunctionComponent<MenuBarExtraProps> & MenuBarExtraMembers;
5485
+
5486
+ export declare namespace MenuBarExtra {
5487
+ export type Props = MenuBarExtraProps;
5488
+ }
5489
+
5490
+ declare interface MenuBarExtraMembers {
5491
+ Item: typeof Item_3;
5492
+ Separator: typeof Separator_4;
5493
+ Submenu: typeof Submenu_2;
5494
+ }
5495
+
5496
+ declare interface MenuBarExtraProps {
5497
+ /**
5498
+ * @defaultValue `false`
5499
+ */
5500
+ isLoading?: boolean;
5501
+ title?: string;
5502
+ tooltip?: string;
5503
+ icon?: Image.ImageLike;
5504
+ children?: ReactNode;
5505
+ }
5506
+
5424
5507
  /**
5425
5508
  * See {@link Detail.Metadata}
5426
5509
  */
@@ -6383,6 +6466,11 @@ declare const Separator_2: FunctionComponent<SeparatorProps_2>;
6383
6466
  */
6384
6467
  declare const Separator_3: FunctionComponent<SeparatorProps_3>;
6385
6468
 
6469
+ /**
6470
+ * See {@link MenuBarExtra.Separator}
6471
+ */
6472
+ declare const Separator_4: FunctionComponent<SeparatorProps_4>;
6473
+
6386
6474
  /**
6387
6475
  * See {@link Form.Separator.Props}
6388
6476
  */
@@ -6395,6 +6483,9 @@ declare interface SeparatorProps_2 {
6395
6483
  declare interface SeparatorProps_3 {
6396
6484
  }
6397
6485
 
6486
+ declare interface SeparatorProps_4 {
6487
+ }
6488
+
6398
6489
  /**
6399
6490
  * @deprecated Use {@link LocalStorage.setItem} instead
6400
6491
  */
@@ -6556,6 +6647,11 @@ export declare const specialKeys: any;
6556
6647
  */
6557
6648
  declare const Submenu: FunctionComponent<SubmenuProps>;
6558
6649
 
6650
+ /**
6651
+ * See {@link MenuBarExtra.Submenu}
6652
+ */
6653
+ declare const Submenu_2: FunctionComponent<SubmenuProps_2>;
6654
+
6559
6655
  declare type SubmenuChildren = ReactElement<SectionProps> | ReactElement<SectionProps>[] | SectionChildren | null;
6560
6656
 
6561
6657
  /**
@@ -6613,6 +6709,15 @@ declare interface SubmenuProps {
6613
6709
  onOpen?: () => void;
6614
6710
  }
6615
6711
 
6712
+ declare interface SubmenuProps_2 {
6713
+ title: string | {
6714
+ value: string;
6715
+ tooltip: string;
6716
+ };
6717
+ icon?: Image.ImageLike;
6718
+ children?: ReactNode;
6719
+ }
6720
+
6616
6721
  /**
6617
6722
  * See {@link Action.SubmitForm.Props}
6618
6723
  */
@@ -7082,6 +7187,28 @@ declare interface TrashProps {
7082
7187
  onTrash?: (paths: PathLike | PathLike[]) => void;
7083
7188
  }
7084
7189
 
7190
+ /**
7191
+ * Update the values of properties declared in the manifest of a command.
7192
+ *
7193
+ * @param metadata - An object with the values for the manifest properties to update.
7194
+ * Note that currently only `subtitle` is supported. Pass `null` to clear the custom subtitle.
7195
+ * @returns A Promise that resolves when the metadata has been updated.
7196
+ *
7197
+ * @example
7198
+ * ```typescript
7199
+ * import { open } from "@raycast/api";
7200
+ *
7201
+ * export default async () => {
7202
+ * await updateCommandMetadata({ subtitle: "My new subtitle" });
7203
+ * };
7204
+ * ```
7205
+ * @remarks The actual manifest file is not modified, so the update applies as
7206
+ * long as the command remains installed.
7207
+ */
7208
+ export declare function updateCommandMetadata(metadata: {
7209
+ subtitle?: string | null;
7210
+ }): Promise<void>;
7211
+
7085
7212
  /**
7086
7213
  * @deprecated No alternative :(
7087
7214
  */