@raycast/api 1.45.2 → 1.46.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/api.d.ts +109 -47
- package/package.json +1 -1
- package/types/index.d.ts +105 -47
package/api.d.ts
CHANGED
|
@@ -116,6 +116,12 @@ export declare namespace Action {
|
|
|
116
116
|
*/
|
|
117
117
|
export type Props = ToggleQuickLookProps;
|
|
118
118
|
}
|
|
119
|
+
export namespace PickDate {
|
|
120
|
+
/**
|
|
121
|
+
* Props of the {@link Action.PickDate} React component.
|
|
122
|
+
*/
|
|
123
|
+
export type Props = PickDateProps;
|
|
124
|
+
}
|
|
119
125
|
}
|
|
120
126
|
|
|
121
127
|
/**
|
|
@@ -359,11 +365,11 @@ declare interface ActionProps {
|
|
|
359
365
|
*/
|
|
360
366
|
id?: string;
|
|
361
367
|
/**
|
|
362
|
-
* The title displayed for the
|
|
368
|
+
* The title displayed for the Action.
|
|
363
369
|
*/
|
|
364
370
|
title: string;
|
|
365
371
|
/**
|
|
366
|
-
* The icon displayed for the
|
|
372
|
+
* The icon displayed for the Action.
|
|
367
373
|
*/
|
|
368
374
|
icon?: Image.ImageLike | undefined | null;
|
|
369
375
|
/**
|
|
@@ -377,7 +383,7 @@ declare interface ActionProps {
|
|
|
377
383
|
*/
|
|
378
384
|
style?: ActionStyle;
|
|
379
385
|
/**
|
|
380
|
-
* The keyboard shortcut for the
|
|
386
|
+
* The keyboard shortcut for the Action.
|
|
381
387
|
*
|
|
382
388
|
* @remarks
|
|
383
389
|
* The first and second action in an {@link ActionPanel} become the primary and secondary action. They automatically get the default keyboard shortcuts assigned.
|
|
@@ -386,13 +392,18 @@ declare interface ActionProps {
|
|
|
386
392
|
*/
|
|
387
393
|
shortcut?: Keyboard.Shortcut | undefined | null;
|
|
388
394
|
/**
|
|
389
|
-
* Callback that is triggered when the
|
|
395
|
+
* Callback that is triggered when the Action is selected.
|
|
390
396
|
*/
|
|
391
397
|
onAction?: () => void;
|
|
392
398
|
/**
|
|
393
399
|
* Indicates whether the Action should be focused automatically when the parent ActionPanel (or Actionpanel.Submenu) opens.
|
|
394
400
|
*/
|
|
395
401
|
autoFocus?: boolean;
|
|
402
|
+
/**
|
|
403
|
+
* @internal
|
|
404
|
+
* Some actions require some custom integration on the native side. That's how we recognise them
|
|
405
|
+
*/
|
|
406
|
+
type?: "submit-form" | "date-picker";
|
|
396
407
|
}
|
|
397
408
|
|
|
398
409
|
/**
|
|
@@ -1292,6 +1303,30 @@ declare interface ConvenienceActions {
|
|
|
1292
1303
|
* ```
|
|
1293
1304
|
*/
|
|
1294
1305
|
ToggleQuickLook: typeof ToggleQuickLook;
|
|
1306
|
+
/**
|
|
1307
|
+
* Action to pick a date.
|
|
1308
|
+
*
|
|
1309
|
+
* @example
|
|
1310
|
+
* ```typescript
|
|
1311
|
+
* import { ActionPanel, List, Action } from "@raycast/api";
|
|
1312
|
+
*
|
|
1313
|
+
* export default function Command() {
|
|
1314
|
+
* return (
|
|
1315
|
+
* <List>
|
|
1316
|
+
* <List.Item
|
|
1317
|
+
* title="Todo"
|
|
1318
|
+
* actions={
|
|
1319
|
+
* <ActionPanel>
|
|
1320
|
+
* <Action.PickDate title="Set Due Date…" />
|
|
1321
|
+
* </ActionPanel>
|
|
1322
|
+
* }
|
|
1323
|
+
* />
|
|
1324
|
+
* </ List>
|
|
1325
|
+
* );
|
|
1326
|
+
* }
|
|
1327
|
+
* ```
|
|
1328
|
+
*/
|
|
1329
|
+
PickDate: typeof PickDate;
|
|
1295
1330
|
}
|
|
1296
1331
|
|
|
1297
1332
|
/**
|
|
@@ -1324,17 +1359,17 @@ declare interface CopyToClipboardProps {
|
|
|
1324
1359
|
*/
|
|
1325
1360
|
content: string | number | Clipboard.Content;
|
|
1326
1361
|
/**
|
|
1327
|
-
* An optional title for the
|
|
1362
|
+
* An optional title for the Action.
|
|
1328
1363
|
* @defaultValue `"Copy to Clipboard"`
|
|
1329
1364
|
*/
|
|
1330
1365
|
title?: string;
|
|
1331
1366
|
/**
|
|
1332
|
-
* A optional icon displayed for the
|
|
1367
|
+
* A optional icon displayed for the Action.
|
|
1333
1368
|
* @defaultValue {@link Icon.Clipboard}
|
|
1334
1369
|
*/
|
|
1335
1370
|
icon?: Image.ImageLike;
|
|
1336
1371
|
/**
|
|
1337
|
-
* The keyboard shortcut for the
|
|
1372
|
+
* The keyboard shortcut for the Action.
|
|
1338
1373
|
*/
|
|
1339
1374
|
shortcut?: Keyboard.Shortcut;
|
|
1340
1375
|
/**
|
|
@@ -1357,15 +1392,15 @@ declare interface CreateQuicklinkProps {
|
|
|
1357
1392
|
*/
|
|
1358
1393
|
quicklink: Quicklink;
|
|
1359
1394
|
/**
|
|
1360
|
-
* An optional title for the
|
|
1395
|
+
* An optional title for the Action.
|
|
1361
1396
|
*/
|
|
1362
1397
|
title?: string;
|
|
1363
1398
|
/**
|
|
1364
|
-
* A optional icon displayed for the
|
|
1399
|
+
* A optional icon displayed for the Action. See {@link Image.ImageLike} for the supported formats and types.
|
|
1365
1400
|
*/
|
|
1366
1401
|
icon?: Image.ImageLike;
|
|
1367
1402
|
/**
|
|
1368
|
-
* The keyboard shortcut for the
|
|
1403
|
+
* The keyboard shortcut for the Action.
|
|
1369
1404
|
*/
|
|
1370
1405
|
shortcut?: Keyboard.Shortcut;
|
|
1371
1406
|
}
|
|
@@ -1378,15 +1413,15 @@ declare const CreateSnippet: FunctionComponent<CreateSnippetProps>;
|
|
|
1378
1413
|
declare interface CreateSnippetProps {
|
|
1379
1414
|
snippet: Snippet;
|
|
1380
1415
|
/**
|
|
1381
|
-
* An optional title for the
|
|
1416
|
+
* An optional title for the Action.
|
|
1382
1417
|
*/
|
|
1383
1418
|
title?: string;
|
|
1384
1419
|
/**
|
|
1385
|
-
* A optional icon displayed for the
|
|
1420
|
+
* A optional icon displayed for the Action. See {@link Image.ImageLike} for the supported formats and types.
|
|
1386
1421
|
*/
|
|
1387
1422
|
icon?: Image.ImageLike;
|
|
1388
1423
|
/**
|
|
1389
|
-
* The keyboard shortcut for the
|
|
1424
|
+
* The keyboard shortcut for the Action.
|
|
1390
1425
|
*/
|
|
1391
1426
|
shortcut?: Keyboard.Shortcut;
|
|
1392
1427
|
}
|
|
@@ -1889,7 +1924,7 @@ declare interface DropdownProps extends FormItemProps_2<string>, SearchBarInterf
|
|
|
1889
1924
|
/**
|
|
1890
1925
|
* Placeholder text that will be shown in the dropdown search field.
|
|
1891
1926
|
*
|
|
1892
|
-
* @defaultValue `"Search
|
|
1927
|
+
* @defaultValue `"Search…"`
|
|
1893
1928
|
*/
|
|
1894
1929
|
placeholder?: string;
|
|
1895
1930
|
/**
|
|
@@ -1910,7 +1945,7 @@ declare interface DropdownProps_2 extends SearchBarInterface {
|
|
|
1910
1945
|
/**
|
|
1911
1946
|
* Placeholder text that will be shown in the dropdown search field.
|
|
1912
1947
|
*
|
|
1913
|
-
* @defaultValue `"Search
|
|
1948
|
+
* @defaultValue `"Search…"`
|
|
1914
1949
|
*/
|
|
1915
1950
|
placeholder?: string;
|
|
1916
1951
|
/**
|
|
@@ -4227,7 +4262,7 @@ declare interface GridProps extends ActionsInterface, NavigationChildInterface,
|
|
|
4227
4262
|
/**
|
|
4228
4263
|
* Placeholder text that will be shown in the search bar.
|
|
4229
4264
|
*
|
|
4230
|
-
* @defaultValue `"Search
|
|
4265
|
+
* @defaultValue `"Search…"`
|
|
4231
4266
|
*/
|
|
4232
4267
|
searchBarPlaceholder?: string;
|
|
4233
4268
|
/**
|
|
@@ -5659,7 +5694,7 @@ declare interface ListProps_2 extends ActionsInterface, NavigationChildInterface
|
|
|
5659
5694
|
/**
|
|
5660
5695
|
* Placeholder text that will be shown in the search bar.
|
|
5661
5696
|
*
|
|
5662
|
-
* @defaultValue `"Search
|
|
5697
|
+
* @defaultValue `"Search…"`
|
|
5663
5698
|
*/
|
|
5664
5699
|
searchBarPlaceholder?: string;
|
|
5665
5700
|
/**
|
|
@@ -6095,7 +6130,7 @@ export declare namespace OAuth {
|
|
|
6095
6130
|
* redirectMethod: OAuth.RedirectMethod.Web,
|
|
6096
6131
|
* providerName: "Twitter",
|
|
6097
6132
|
* providerIcon: "twitter-logo.png",
|
|
6098
|
-
* description: "Connect your Twitter account
|
|
6133
|
+
* description: "Connect your Twitter account…",
|
|
6099
6134
|
* });
|
|
6100
6135
|
* ```
|
|
6101
6136
|
*/
|
|
@@ -6421,17 +6456,17 @@ declare interface OpenInBrowserProps {
|
|
|
6421
6456
|
*/
|
|
6422
6457
|
url: string;
|
|
6423
6458
|
/**
|
|
6424
|
-
* An optional title for the
|
|
6459
|
+
* An optional title for the Action.
|
|
6425
6460
|
* @defaultValue `"Open in Browser"`
|
|
6426
6461
|
*/
|
|
6427
6462
|
title?: string;
|
|
6428
6463
|
/**
|
|
6429
|
-
* The icon displayed for the
|
|
6464
|
+
* The icon displayed for the Action.
|
|
6430
6465
|
* @defaultValue {@link Icon.Globe}
|
|
6431
6466
|
*/
|
|
6432
6467
|
icon?: Image.ImageLike;
|
|
6433
6468
|
/**
|
|
6434
|
-
* The optional keyboard shortcut for the
|
|
6469
|
+
* The optional keyboard shortcut for the Action.
|
|
6435
6470
|
*/
|
|
6436
6471
|
shortcut?: Keyboard.Shortcut;
|
|
6437
6472
|
/**
|
|
@@ -6460,16 +6495,16 @@ declare interface OpenProps {
|
|
|
6460
6495
|
*/
|
|
6461
6496
|
application?: Application | string;
|
|
6462
6497
|
/**
|
|
6463
|
-
* The title for the
|
|
6498
|
+
* The title for the Action.
|
|
6464
6499
|
*/
|
|
6465
6500
|
title: string;
|
|
6466
6501
|
/**
|
|
6467
|
-
* The icon displayed for the
|
|
6502
|
+
* The icon displayed for the Action.
|
|
6468
6503
|
* @defaultValue {@link Icon.Finder}
|
|
6469
6504
|
*/
|
|
6470
6505
|
icon?: Image.ImageLike;
|
|
6471
6506
|
/**
|
|
6472
|
-
* The keyboard shortcut for the
|
|
6507
|
+
* The keyboard shortcut for the Action.
|
|
6473
6508
|
*/
|
|
6474
6509
|
shortcut?: Keyboard.Shortcut;
|
|
6475
6510
|
/**
|
|
@@ -6506,17 +6541,17 @@ declare interface OpenWithProps {
|
|
|
6506
6541
|
*/
|
|
6507
6542
|
path: string;
|
|
6508
6543
|
/**
|
|
6509
|
-
* The title for the
|
|
6544
|
+
* The title for the Action.
|
|
6510
6545
|
* @defaultValue `"Open With"`
|
|
6511
6546
|
*/
|
|
6512
6547
|
title?: string;
|
|
6513
6548
|
/**
|
|
6514
|
-
* The icon displayed for the
|
|
6549
|
+
* The icon displayed for the Action.
|
|
6515
6550
|
* @defaultValue {@link Icon.Upload}
|
|
6516
6551
|
*/
|
|
6517
6552
|
icon?: Image.ImageLike;
|
|
6518
6553
|
/**
|
|
6519
|
-
* The keyboard shortcut for the
|
|
6554
|
+
* The keyboard shortcut for the Action.
|
|
6520
6555
|
*/
|
|
6521
6556
|
shortcut?: Keyboard.Shortcut;
|
|
6522
6557
|
/**
|
|
@@ -6573,17 +6608,17 @@ declare interface PasteProps {
|
|
|
6573
6608
|
*/
|
|
6574
6609
|
content: string | number | Clipboard.Content;
|
|
6575
6610
|
/**
|
|
6576
|
-
* An optional title for the
|
|
6611
|
+
* An optional title for the Action.
|
|
6577
6612
|
* @defaultValue `"Paste in Active App"`
|
|
6578
6613
|
*/
|
|
6579
6614
|
title?: string;
|
|
6580
6615
|
/**
|
|
6581
|
-
* The icon displayed for the
|
|
6616
|
+
* The icon displayed for the Action.
|
|
6582
6617
|
* @defaultValue {@link Icon.Clipboard}
|
|
6583
6618
|
*/
|
|
6584
6619
|
icon?: Image.ImageLike;
|
|
6585
6620
|
/**
|
|
6586
|
-
* The keyboard shortcut for the
|
|
6621
|
+
* The keyboard shortcut for the Action.
|
|
6587
6622
|
*/
|
|
6588
6623
|
shortcut?: Keyboard.Shortcut;
|
|
6589
6624
|
/**
|
|
@@ -6600,6 +6635,34 @@ declare interface PasteProps {
|
|
|
6600
6635
|
*/
|
|
6601
6636
|
export declare const pasteText: typeof Clipboard.paste;
|
|
6602
6637
|
|
|
6638
|
+
/**
|
|
6639
|
+
* See {@link Action.PickDate}
|
|
6640
|
+
*/
|
|
6641
|
+
declare const PickDate: FunctionComponent<PickDateProps>;
|
|
6642
|
+
|
|
6643
|
+
/**
|
|
6644
|
+
* See {@link Action.PickDate.Props}
|
|
6645
|
+
*/
|
|
6646
|
+
declare interface PickDateProps {
|
|
6647
|
+
/**
|
|
6648
|
+
* A title for the Action.
|
|
6649
|
+
*/
|
|
6650
|
+
title: string;
|
|
6651
|
+
/**
|
|
6652
|
+
* A optional icon displayed for the Action.
|
|
6653
|
+
* @defaultValue {@link Icon.Calendar}
|
|
6654
|
+
*/
|
|
6655
|
+
icon?: Image.ImageLike;
|
|
6656
|
+
/**
|
|
6657
|
+
* The keyboard shortcut for the Action.
|
|
6658
|
+
*/
|
|
6659
|
+
shortcut?: Keyboard.Shortcut;
|
|
6660
|
+
/**
|
|
6661
|
+
* Callback when the Date was picked
|
|
6662
|
+
*/
|
|
6663
|
+
onChange: (date: Date | null) => void;
|
|
6664
|
+
}
|
|
6665
|
+
|
|
6603
6666
|
/**
|
|
6604
6667
|
* Pops the navigation stack back to root search.
|
|
6605
6668
|
*
|
|
@@ -6760,7 +6823,7 @@ export declare interface PushActionProps extends Action.Push.Props {
|
|
|
6760
6823
|
*/
|
|
6761
6824
|
declare interface PushProps {
|
|
6762
6825
|
/**
|
|
6763
|
-
* The title displayed for the
|
|
6826
|
+
* The title displayed for the Action.
|
|
6764
6827
|
*/
|
|
6765
6828
|
title: string;
|
|
6766
6829
|
/**
|
|
@@ -6768,11 +6831,11 @@ declare interface PushProps {
|
|
|
6768
6831
|
*/
|
|
6769
6832
|
target: ReactNode;
|
|
6770
6833
|
/**
|
|
6771
|
-
* The icon displayed for the
|
|
6834
|
+
* The icon displayed for the Action.
|
|
6772
6835
|
*/
|
|
6773
6836
|
icon?: Image.ImageLike;
|
|
6774
6837
|
/**
|
|
6775
|
-
* The keyboard shortcut for the
|
|
6838
|
+
* The keyboard shortcut for the Action.
|
|
6776
6839
|
*/
|
|
6777
6840
|
shortcut?: Keyboard.Shortcut;
|
|
6778
6841
|
/**
|
|
@@ -7045,17 +7108,17 @@ declare interface ShowInFinderProps {
|
|
|
7045
7108
|
*/
|
|
7046
7109
|
path: PathLike;
|
|
7047
7110
|
/**
|
|
7048
|
-
* An optional title for the
|
|
7111
|
+
* An optional title for the Action.
|
|
7049
7112
|
* @defaultValue `"Show in Finder"`
|
|
7050
7113
|
*/
|
|
7051
7114
|
title?: string;
|
|
7052
7115
|
/**
|
|
7053
|
-
* A optional icon displayed for the
|
|
7116
|
+
* A optional icon displayed for the Action.
|
|
7054
7117
|
* @defaultValue {@link Icon.Finder}
|
|
7055
7118
|
*/
|
|
7056
7119
|
icon?: Image.ImageLike;
|
|
7057
7120
|
/**
|
|
7058
|
-
* The keyboard shortcut for the
|
|
7121
|
+
* The keyboard shortcut for the Action.
|
|
7059
7122
|
*/
|
|
7060
7123
|
shortcut?: Keyboard.Shortcut;
|
|
7061
7124
|
/**
|
|
@@ -7248,21 +7311,20 @@ export declare interface SubmitFormActionProps<T extends Form.Values> extends Ac
|
|
|
7248
7311
|
*/
|
|
7249
7312
|
declare interface SubmitFormProps<T extends Form.Values> {
|
|
7250
7313
|
/**
|
|
7251
|
-
* The title displayed for the
|
|
7314
|
+
* The title displayed for the Action.
|
|
7252
7315
|
* @defaultValue `"Submit Form"`
|
|
7253
7316
|
*/
|
|
7254
7317
|
title?: string;
|
|
7255
7318
|
/**
|
|
7256
|
-
* The icon displayed for the
|
|
7319
|
+
* The icon displayed for the Action.
|
|
7257
7320
|
*/
|
|
7258
7321
|
icon?: Image.ImageLike;
|
|
7259
7322
|
/**
|
|
7260
|
-
* The keyboard shortcut for the
|
|
7323
|
+
* The keyboard shortcut for the Action.
|
|
7261
7324
|
*/
|
|
7262
7325
|
shortcut?: Keyboard.Shortcut;
|
|
7263
7326
|
/**
|
|
7264
|
-
* Callback
|
|
7265
|
-
* Use the handler to perform custom validation logic and call other Raycast API methods.
|
|
7327
|
+
* Callback when the Form was submitted.
|
|
7266
7328
|
* The handler receives a the values object containing the user input.
|
|
7267
7329
|
*
|
|
7268
7330
|
* @returns You can optionally return `false` to indicate that the submit action failed. Raycast will show some subtle feedback to the user that something went wrong. Pair it with the Form inputs' `validation` for a top-notch user experience.
|
|
@@ -7607,17 +7669,17 @@ declare const ToggleQuickLook: FunctionComponent<ToggleQuickLookProps>;
|
|
|
7607
7669
|
*/
|
|
7608
7670
|
declare interface ToggleQuickLookProps {
|
|
7609
7671
|
/**
|
|
7610
|
-
* The title for the
|
|
7672
|
+
* The title for the Action.
|
|
7611
7673
|
* @defaultValue `"Quick Look"`
|
|
7612
7674
|
*/
|
|
7613
7675
|
title?: string;
|
|
7614
7676
|
/**
|
|
7615
|
-
* The icon displayed for the
|
|
7677
|
+
* The icon displayed for the Action.
|
|
7616
7678
|
* @defaultValue {@link Icon.Eye}
|
|
7617
7679
|
*/
|
|
7618
7680
|
icon?: Image.ImageLike;
|
|
7619
7681
|
/**
|
|
7620
|
-
* The keyboard shortcut for the
|
|
7682
|
+
* The keyboard shortcut for the Action.
|
|
7621
7683
|
*
|
|
7622
7684
|
* @remarks
|
|
7623
7685
|
* The recommended system-wide keyboard shortcut is "⌘ + Y".
|
|
@@ -7671,17 +7733,17 @@ declare interface TrashProps {
|
|
|
7671
7733
|
*/
|
|
7672
7734
|
paths: PathLike | PathLike[];
|
|
7673
7735
|
/**
|
|
7674
|
-
* An optional title for the
|
|
7736
|
+
* An optional title for the Action.
|
|
7675
7737
|
* @defaultValue `"Move to Trash"`
|
|
7676
7738
|
*/
|
|
7677
7739
|
title?: string;
|
|
7678
7740
|
/**
|
|
7679
|
-
* A optional icon displayed for the
|
|
7741
|
+
* A optional icon displayed for the Action.
|
|
7680
7742
|
* @defaultValue {@link Icon.Trash}
|
|
7681
7743
|
*/
|
|
7682
7744
|
icon?: Image.ImageLike;
|
|
7683
7745
|
/**
|
|
7684
|
-
* The optional keyboard shortcut for the
|
|
7746
|
+
* The optional keyboard shortcut for the Action.
|
|
7685
7747
|
*/
|
|
7686
7748
|
shortcut?: Keyboard.Shortcut;
|
|
7687
7749
|
/**
|
package/package.json
CHANGED
package/types/index.d.ts
CHANGED
|
@@ -116,6 +116,12 @@ export declare namespace Action {
|
|
|
116
116
|
*/
|
|
117
117
|
export type Props = ToggleQuickLookProps;
|
|
118
118
|
}
|
|
119
|
+
export namespace PickDate {
|
|
120
|
+
/**
|
|
121
|
+
* Props of the {@link Action.PickDate} React component.
|
|
122
|
+
*/
|
|
123
|
+
export type Props = PickDateProps;
|
|
124
|
+
}
|
|
119
125
|
}
|
|
120
126
|
|
|
121
127
|
/**
|
|
@@ -359,11 +365,11 @@ declare interface ActionProps {
|
|
|
359
365
|
*/
|
|
360
366
|
id?: string;
|
|
361
367
|
/**
|
|
362
|
-
* The title displayed for the
|
|
368
|
+
* The title displayed for the Action.
|
|
363
369
|
*/
|
|
364
370
|
title: string;
|
|
365
371
|
/**
|
|
366
|
-
* The icon displayed for the
|
|
372
|
+
* The icon displayed for the Action.
|
|
367
373
|
*/
|
|
368
374
|
icon?: Image.ImageLike | undefined | null;
|
|
369
375
|
/**
|
|
@@ -377,7 +383,7 @@ declare interface ActionProps {
|
|
|
377
383
|
*/
|
|
378
384
|
style?: ActionStyle;
|
|
379
385
|
/**
|
|
380
|
-
* The keyboard shortcut for the
|
|
386
|
+
* The keyboard shortcut for the Action.
|
|
381
387
|
*
|
|
382
388
|
* @remarks
|
|
383
389
|
* The first and second action in an {@link ActionPanel} become the primary and secondary action. They automatically get the default keyboard shortcuts assigned.
|
|
@@ -386,13 +392,14 @@ declare interface ActionProps {
|
|
|
386
392
|
*/
|
|
387
393
|
shortcut?: Keyboard.Shortcut | undefined | null;
|
|
388
394
|
/**
|
|
389
|
-
* Callback that is triggered when the
|
|
395
|
+
* Callback that is triggered when the Action is selected.
|
|
390
396
|
*/
|
|
391
397
|
onAction?: () => void;
|
|
392
398
|
/**
|
|
393
399
|
* Indicates whether the Action should be focused automatically when the parent ActionPanel (or Actionpanel.Submenu) opens.
|
|
394
400
|
*/
|
|
395
401
|
autoFocus?: boolean;
|
|
402
|
+
|
|
396
403
|
}
|
|
397
404
|
|
|
398
405
|
/**
|
|
@@ -1292,6 +1299,30 @@ declare interface ConvenienceActions {
|
|
|
1292
1299
|
* ```
|
|
1293
1300
|
*/
|
|
1294
1301
|
ToggleQuickLook: typeof ToggleQuickLook;
|
|
1302
|
+
/**
|
|
1303
|
+
* Action to pick a date.
|
|
1304
|
+
*
|
|
1305
|
+
* @example
|
|
1306
|
+
* ```typescript
|
|
1307
|
+
* import { ActionPanel, List, Action } from "@raycast/api";
|
|
1308
|
+
*
|
|
1309
|
+
* export default function Command() {
|
|
1310
|
+
* return (
|
|
1311
|
+
* <List>
|
|
1312
|
+
* <List.Item
|
|
1313
|
+
* title="Todo"
|
|
1314
|
+
* actions={
|
|
1315
|
+
* <ActionPanel>
|
|
1316
|
+
* <Action.PickDate title="Set Due Date…" />
|
|
1317
|
+
* </ActionPanel>
|
|
1318
|
+
* }
|
|
1319
|
+
* />
|
|
1320
|
+
* </ List>
|
|
1321
|
+
* );
|
|
1322
|
+
* }
|
|
1323
|
+
* ```
|
|
1324
|
+
*/
|
|
1325
|
+
PickDate: typeof PickDate;
|
|
1295
1326
|
}
|
|
1296
1327
|
|
|
1297
1328
|
/**
|
|
@@ -1324,17 +1355,17 @@ declare interface CopyToClipboardProps {
|
|
|
1324
1355
|
*/
|
|
1325
1356
|
content: string | number | Clipboard.Content;
|
|
1326
1357
|
/**
|
|
1327
|
-
* An optional title for the
|
|
1358
|
+
* An optional title for the Action.
|
|
1328
1359
|
* @defaultValue `"Copy to Clipboard"`
|
|
1329
1360
|
*/
|
|
1330
1361
|
title?: string;
|
|
1331
1362
|
/**
|
|
1332
|
-
* A optional icon displayed for the
|
|
1363
|
+
* A optional icon displayed for the Action.
|
|
1333
1364
|
* @defaultValue {@link Icon.Clipboard}
|
|
1334
1365
|
*/
|
|
1335
1366
|
icon?: Image.ImageLike;
|
|
1336
1367
|
/**
|
|
1337
|
-
* The keyboard shortcut for the
|
|
1368
|
+
* The keyboard shortcut for the Action.
|
|
1338
1369
|
*/
|
|
1339
1370
|
shortcut?: Keyboard.Shortcut;
|
|
1340
1371
|
/**
|
|
@@ -1357,15 +1388,15 @@ declare interface CreateQuicklinkProps {
|
|
|
1357
1388
|
*/
|
|
1358
1389
|
quicklink: Quicklink;
|
|
1359
1390
|
/**
|
|
1360
|
-
* An optional title for the
|
|
1391
|
+
* An optional title for the Action.
|
|
1361
1392
|
*/
|
|
1362
1393
|
title?: string;
|
|
1363
1394
|
/**
|
|
1364
|
-
* A optional icon displayed for the
|
|
1395
|
+
* A optional icon displayed for the Action. See {@link Image.ImageLike} for the supported formats and types.
|
|
1365
1396
|
*/
|
|
1366
1397
|
icon?: Image.ImageLike;
|
|
1367
1398
|
/**
|
|
1368
|
-
* The keyboard shortcut for the
|
|
1399
|
+
* The keyboard shortcut for the Action.
|
|
1369
1400
|
*/
|
|
1370
1401
|
shortcut?: Keyboard.Shortcut;
|
|
1371
1402
|
}
|
|
@@ -1378,15 +1409,15 @@ declare const CreateSnippet: FunctionComponent<CreateSnippetProps>;
|
|
|
1378
1409
|
declare interface CreateSnippetProps {
|
|
1379
1410
|
snippet: Snippet;
|
|
1380
1411
|
/**
|
|
1381
|
-
* An optional title for the
|
|
1412
|
+
* An optional title for the Action.
|
|
1382
1413
|
*/
|
|
1383
1414
|
title?: string;
|
|
1384
1415
|
/**
|
|
1385
|
-
* A optional icon displayed for the
|
|
1416
|
+
* A optional icon displayed for the Action. See {@link Image.ImageLike} for the supported formats and types.
|
|
1386
1417
|
*/
|
|
1387
1418
|
icon?: Image.ImageLike;
|
|
1388
1419
|
/**
|
|
1389
|
-
* The keyboard shortcut for the
|
|
1420
|
+
* The keyboard shortcut for the Action.
|
|
1390
1421
|
*/
|
|
1391
1422
|
shortcut?: Keyboard.Shortcut;
|
|
1392
1423
|
}
|
|
@@ -1889,7 +1920,7 @@ declare interface DropdownProps extends FormItemProps_2<string>, SearchBarInterf
|
|
|
1889
1920
|
/**
|
|
1890
1921
|
* Placeholder text that will be shown in the dropdown search field.
|
|
1891
1922
|
*
|
|
1892
|
-
* @defaultValue `"Search
|
|
1923
|
+
* @defaultValue `"Search…"`
|
|
1893
1924
|
*/
|
|
1894
1925
|
placeholder?: string;
|
|
1895
1926
|
/**
|
|
@@ -1910,7 +1941,7 @@ declare interface DropdownProps_2 extends SearchBarInterface {
|
|
|
1910
1941
|
/**
|
|
1911
1942
|
* Placeholder text that will be shown in the dropdown search field.
|
|
1912
1943
|
*
|
|
1913
|
-
* @defaultValue `"Search
|
|
1944
|
+
* @defaultValue `"Search…"`
|
|
1914
1945
|
*/
|
|
1915
1946
|
placeholder?: string;
|
|
1916
1947
|
/**
|
|
@@ -4227,7 +4258,7 @@ declare interface GridProps extends ActionsInterface, NavigationChildInterface,
|
|
|
4227
4258
|
/**
|
|
4228
4259
|
* Placeholder text that will be shown in the search bar.
|
|
4229
4260
|
*
|
|
4230
|
-
* @defaultValue `"Search
|
|
4261
|
+
* @defaultValue `"Search…"`
|
|
4231
4262
|
*/
|
|
4232
4263
|
searchBarPlaceholder?: string;
|
|
4233
4264
|
/**
|
|
@@ -5659,7 +5690,7 @@ declare interface ListProps_2 extends ActionsInterface, NavigationChildInterface
|
|
|
5659
5690
|
/**
|
|
5660
5691
|
* Placeholder text that will be shown in the search bar.
|
|
5661
5692
|
*
|
|
5662
|
-
* @defaultValue `"Search
|
|
5693
|
+
* @defaultValue `"Search…"`
|
|
5663
5694
|
*/
|
|
5664
5695
|
searchBarPlaceholder?: string;
|
|
5665
5696
|
/**
|
|
@@ -6095,7 +6126,7 @@ export declare namespace OAuth {
|
|
|
6095
6126
|
* redirectMethod: OAuth.RedirectMethod.Web,
|
|
6096
6127
|
* providerName: "Twitter",
|
|
6097
6128
|
* providerIcon: "twitter-logo.png",
|
|
6098
|
-
* description: "Connect your Twitter account
|
|
6129
|
+
* description: "Connect your Twitter account…",
|
|
6099
6130
|
* });
|
|
6100
6131
|
* ```
|
|
6101
6132
|
*/
|
|
@@ -6421,17 +6452,17 @@ declare interface OpenInBrowserProps {
|
|
|
6421
6452
|
*/
|
|
6422
6453
|
url: string;
|
|
6423
6454
|
/**
|
|
6424
|
-
* An optional title for the
|
|
6455
|
+
* An optional title for the Action.
|
|
6425
6456
|
* @defaultValue `"Open in Browser"`
|
|
6426
6457
|
*/
|
|
6427
6458
|
title?: string;
|
|
6428
6459
|
/**
|
|
6429
|
-
* The icon displayed for the
|
|
6460
|
+
* The icon displayed for the Action.
|
|
6430
6461
|
* @defaultValue {@link Icon.Globe}
|
|
6431
6462
|
*/
|
|
6432
6463
|
icon?: Image.ImageLike;
|
|
6433
6464
|
/**
|
|
6434
|
-
* The optional keyboard shortcut for the
|
|
6465
|
+
* The optional keyboard shortcut for the Action.
|
|
6435
6466
|
*/
|
|
6436
6467
|
shortcut?: Keyboard.Shortcut;
|
|
6437
6468
|
/**
|
|
@@ -6460,16 +6491,16 @@ declare interface OpenProps {
|
|
|
6460
6491
|
*/
|
|
6461
6492
|
application?: Application | string;
|
|
6462
6493
|
/**
|
|
6463
|
-
* The title for the
|
|
6494
|
+
* The title for the Action.
|
|
6464
6495
|
*/
|
|
6465
6496
|
title: string;
|
|
6466
6497
|
/**
|
|
6467
|
-
* The icon displayed for the
|
|
6498
|
+
* The icon displayed for the Action.
|
|
6468
6499
|
* @defaultValue {@link Icon.Finder}
|
|
6469
6500
|
*/
|
|
6470
6501
|
icon?: Image.ImageLike;
|
|
6471
6502
|
/**
|
|
6472
|
-
* The keyboard shortcut for the
|
|
6503
|
+
* The keyboard shortcut for the Action.
|
|
6473
6504
|
*/
|
|
6474
6505
|
shortcut?: Keyboard.Shortcut;
|
|
6475
6506
|
/**
|
|
@@ -6506,17 +6537,17 @@ declare interface OpenWithProps {
|
|
|
6506
6537
|
*/
|
|
6507
6538
|
path: string;
|
|
6508
6539
|
/**
|
|
6509
|
-
* The title for the
|
|
6540
|
+
* The title for the Action.
|
|
6510
6541
|
* @defaultValue `"Open With"`
|
|
6511
6542
|
*/
|
|
6512
6543
|
title?: string;
|
|
6513
6544
|
/**
|
|
6514
|
-
* The icon displayed for the
|
|
6545
|
+
* The icon displayed for the Action.
|
|
6515
6546
|
* @defaultValue {@link Icon.Upload}
|
|
6516
6547
|
*/
|
|
6517
6548
|
icon?: Image.ImageLike;
|
|
6518
6549
|
/**
|
|
6519
|
-
* The keyboard shortcut for the
|
|
6550
|
+
* The keyboard shortcut for the Action.
|
|
6520
6551
|
*/
|
|
6521
6552
|
shortcut?: Keyboard.Shortcut;
|
|
6522
6553
|
/**
|
|
@@ -6573,17 +6604,17 @@ declare interface PasteProps {
|
|
|
6573
6604
|
*/
|
|
6574
6605
|
content: string | number | Clipboard.Content;
|
|
6575
6606
|
/**
|
|
6576
|
-
* An optional title for the
|
|
6607
|
+
* An optional title for the Action.
|
|
6577
6608
|
* @defaultValue `"Paste in Active App"`
|
|
6578
6609
|
*/
|
|
6579
6610
|
title?: string;
|
|
6580
6611
|
/**
|
|
6581
|
-
* The icon displayed for the
|
|
6612
|
+
* The icon displayed for the Action.
|
|
6582
6613
|
* @defaultValue {@link Icon.Clipboard}
|
|
6583
6614
|
*/
|
|
6584
6615
|
icon?: Image.ImageLike;
|
|
6585
6616
|
/**
|
|
6586
|
-
* The keyboard shortcut for the
|
|
6617
|
+
* The keyboard shortcut for the Action.
|
|
6587
6618
|
*/
|
|
6588
6619
|
shortcut?: Keyboard.Shortcut;
|
|
6589
6620
|
/**
|
|
@@ -6600,6 +6631,34 @@ declare interface PasteProps {
|
|
|
6600
6631
|
*/
|
|
6601
6632
|
export declare const pasteText: typeof Clipboard.paste;
|
|
6602
6633
|
|
|
6634
|
+
/**
|
|
6635
|
+
* See {@link Action.PickDate}
|
|
6636
|
+
*/
|
|
6637
|
+
declare const PickDate: FunctionComponent<PickDateProps>;
|
|
6638
|
+
|
|
6639
|
+
/**
|
|
6640
|
+
* See {@link Action.PickDate.Props}
|
|
6641
|
+
*/
|
|
6642
|
+
declare interface PickDateProps {
|
|
6643
|
+
/**
|
|
6644
|
+
* A title for the Action.
|
|
6645
|
+
*/
|
|
6646
|
+
title: string;
|
|
6647
|
+
/**
|
|
6648
|
+
* A optional icon displayed for the Action.
|
|
6649
|
+
* @defaultValue {@link Icon.Calendar}
|
|
6650
|
+
*/
|
|
6651
|
+
icon?: Image.ImageLike;
|
|
6652
|
+
/**
|
|
6653
|
+
* The keyboard shortcut for the Action.
|
|
6654
|
+
*/
|
|
6655
|
+
shortcut?: Keyboard.Shortcut;
|
|
6656
|
+
/**
|
|
6657
|
+
* Callback when the Date was picked
|
|
6658
|
+
*/
|
|
6659
|
+
onChange: (date: Date | null) => void;
|
|
6660
|
+
}
|
|
6661
|
+
|
|
6603
6662
|
/**
|
|
6604
6663
|
* Pops the navigation stack back to root search.
|
|
6605
6664
|
*
|
|
@@ -6760,7 +6819,7 @@ export declare interface PushActionProps extends Action.Push.Props {
|
|
|
6760
6819
|
*/
|
|
6761
6820
|
declare interface PushProps {
|
|
6762
6821
|
/**
|
|
6763
|
-
* The title displayed for the
|
|
6822
|
+
* The title displayed for the Action.
|
|
6764
6823
|
*/
|
|
6765
6824
|
title: string;
|
|
6766
6825
|
/**
|
|
@@ -6768,11 +6827,11 @@ declare interface PushProps {
|
|
|
6768
6827
|
*/
|
|
6769
6828
|
target: ReactNode;
|
|
6770
6829
|
/**
|
|
6771
|
-
* The icon displayed for the
|
|
6830
|
+
* The icon displayed for the Action.
|
|
6772
6831
|
*/
|
|
6773
6832
|
icon?: Image.ImageLike;
|
|
6774
6833
|
/**
|
|
6775
|
-
* The keyboard shortcut for the
|
|
6834
|
+
* The keyboard shortcut for the Action.
|
|
6776
6835
|
*/
|
|
6777
6836
|
shortcut?: Keyboard.Shortcut;
|
|
6778
6837
|
/**
|
|
@@ -7045,17 +7104,17 @@ declare interface ShowInFinderProps {
|
|
|
7045
7104
|
*/
|
|
7046
7105
|
path: PathLike;
|
|
7047
7106
|
/**
|
|
7048
|
-
* An optional title for the
|
|
7107
|
+
* An optional title for the Action.
|
|
7049
7108
|
* @defaultValue `"Show in Finder"`
|
|
7050
7109
|
*/
|
|
7051
7110
|
title?: string;
|
|
7052
7111
|
/**
|
|
7053
|
-
* A optional icon displayed for the
|
|
7112
|
+
* A optional icon displayed for the Action.
|
|
7054
7113
|
* @defaultValue {@link Icon.Finder}
|
|
7055
7114
|
*/
|
|
7056
7115
|
icon?: Image.ImageLike;
|
|
7057
7116
|
/**
|
|
7058
|
-
* The keyboard shortcut for the
|
|
7117
|
+
* The keyboard shortcut for the Action.
|
|
7059
7118
|
*/
|
|
7060
7119
|
shortcut?: Keyboard.Shortcut;
|
|
7061
7120
|
/**
|
|
@@ -7248,21 +7307,20 @@ export declare interface SubmitFormActionProps<T extends Form.Values> extends Ac
|
|
|
7248
7307
|
*/
|
|
7249
7308
|
declare interface SubmitFormProps<T extends Form.Values> {
|
|
7250
7309
|
/**
|
|
7251
|
-
* The title displayed for the
|
|
7310
|
+
* The title displayed for the Action.
|
|
7252
7311
|
* @defaultValue `"Submit Form"`
|
|
7253
7312
|
*/
|
|
7254
7313
|
title?: string;
|
|
7255
7314
|
/**
|
|
7256
|
-
* The icon displayed for the
|
|
7315
|
+
* The icon displayed for the Action.
|
|
7257
7316
|
*/
|
|
7258
7317
|
icon?: Image.ImageLike;
|
|
7259
7318
|
/**
|
|
7260
|
-
* The keyboard shortcut for the
|
|
7319
|
+
* The keyboard shortcut for the Action.
|
|
7261
7320
|
*/
|
|
7262
7321
|
shortcut?: Keyboard.Shortcut;
|
|
7263
7322
|
/**
|
|
7264
|
-
* Callback
|
|
7265
|
-
* Use the handler to perform custom validation logic and call other Raycast API methods.
|
|
7323
|
+
* Callback when the Form was submitted.
|
|
7266
7324
|
* The handler receives a the values object containing the user input.
|
|
7267
7325
|
*
|
|
7268
7326
|
* @returns You can optionally return `false` to indicate that the submit action failed. Raycast will show some subtle feedback to the user that something went wrong. Pair it with the Form inputs' `validation` for a top-notch user experience.
|
|
@@ -7607,17 +7665,17 @@ declare const ToggleQuickLook: FunctionComponent<ToggleQuickLookProps>;
|
|
|
7607
7665
|
*/
|
|
7608
7666
|
declare interface ToggleQuickLookProps {
|
|
7609
7667
|
/**
|
|
7610
|
-
* The title for the
|
|
7668
|
+
* The title for the Action.
|
|
7611
7669
|
* @defaultValue `"Quick Look"`
|
|
7612
7670
|
*/
|
|
7613
7671
|
title?: string;
|
|
7614
7672
|
/**
|
|
7615
|
-
* The icon displayed for the
|
|
7673
|
+
* The icon displayed for the Action.
|
|
7616
7674
|
* @defaultValue {@link Icon.Eye}
|
|
7617
7675
|
*/
|
|
7618
7676
|
icon?: Image.ImageLike;
|
|
7619
7677
|
/**
|
|
7620
|
-
* The keyboard shortcut for the
|
|
7678
|
+
* The keyboard shortcut for the Action.
|
|
7621
7679
|
*
|
|
7622
7680
|
* @remarks
|
|
7623
7681
|
* The recommended system-wide keyboard shortcut is "⌘ + Y".
|
|
@@ -7671,17 +7729,17 @@ declare interface TrashProps {
|
|
|
7671
7729
|
*/
|
|
7672
7730
|
paths: PathLike | PathLike[];
|
|
7673
7731
|
/**
|
|
7674
|
-
* An optional title for the
|
|
7732
|
+
* An optional title for the Action.
|
|
7675
7733
|
* @defaultValue `"Move to Trash"`
|
|
7676
7734
|
*/
|
|
7677
7735
|
title?: string;
|
|
7678
7736
|
/**
|
|
7679
|
-
* A optional icon displayed for the
|
|
7737
|
+
* A optional icon displayed for the Action.
|
|
7680
7738
|
* @defaultValue {@link Icon.Trash}
|
|
7681
7739
|
*/
|
|
7682
7740
|
icon?: Image.ImageLike;
|
|
7683
7741
|
/**
|
|
7684
|
-
* The optional keyboard shortcut for the
|
|
7742
|
+
* The optional keyboard shortcut for the Action.
|
|
7685
7743
|
*/
|
|
7686
7744
|
shortcut?: Keyboard.Shortcut;
|
|
7687
7745
|
/**
|