@raycast/api 1.30.3 → 1.32.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/README.md +2 -2
- package/bin/arm64/ray +0 -0
- package/bin/ray +10 -4
- package/bin/x86/ray +0 -0
- package/package.json +2 -2
- package/types/index.d.ts +5192 -4098
- package/types/api/app/app.d.ts +0 -171
- package/types/api/app/clipboard.d.ts +0 -63
- package/types/api/app/index.d.ts +0 -4
- package/types/api/app/keyboard.d.ts +0 -56
- package/types/api/app/localStorage.d.ts +0 -117
- package/types/api/components/ActionPanel.d.ts +0 -261
- package/types/api/components/Detail.d.ts +0 -38
- package/types/api/components/Form.d.ts +0 -1016
- package/types/api/components/List.d.ts +0 -579
- package/types/api/components/actions/Action.d.ts +0 -458
- package/types/api/components/actions/CopyToClipboardAction.d.ts +0 -40
- package/types/api/components/actions/CreateQuicklinkAction.d.ts +0 -42
- package/types/api/components/actions/CreateSnippetAction.d.ts +0 -40
- package/types/api/components/actions/OpenAction.d.ts +0 -47
- package/types/api/components/actions/OpenInBrowserAction.d.ts +0 -43
- package/types/api/components/actions/OpenWithAction.d.ts +0 -40
- package/types/api/components/actions/PasteAction.d.ts +0 -40
- package/types/api/components/actions/PushAction.d.ts +0 -38
- package/types/api/components/actions/ShowInFinderAction.d.ts +0 -42
- package/types/api/components/actions/SubmitFormAction.d.ts +0 -35
- package/types/api/components/actions/TrashAction.d.ts +0 -43
- package/types/api/components/actions/index.d.ts +0 -1
- package/types/api/components/index.d.ts +0 -5
- package/types/api/components/propTypes.d.ts +0 -1
- package/types/api/components/types.d.ts +0 -30
- package/types/api/deprecated.d.ts +0 -415
- package/types/api/environment/environment.d.ts +0 -48
- package/types/api/environment/index.d.ts +0 -3
- package/types/api/environment/preferences.d.ts +0 -31
- package/types/api/environment/workspace.d.ts +0 -62
- package/types/api/hooks/index.d.ts +0 -1
- package/types/api/hooks/useNavigation.d.ts +0 -66
- package/types/api/index.d.ts +0 -6
- package/types/api/internal/comm/index.d.ts +0 -1
- package/types/api/internal/components/ErrorBoundary.d.ts +0 -1
- package/types/api/internal/components/Navigation.d.ts +0 -1
- package/types/api/internal/components/Root.d.ts +0 -1
- package/types/api/internal/components/index.d.ts +0 -3
- package/types/api/internal/devtools/actionPanel.d.ts +0 -1
- package/types/api/internal/devtools/index.d.ts +0 -2
- package/types/api/internal/devtools/react.d.ts +0 -1
- package/types/api/internal/hooks/index.d.ts +0 -1
- package/types/api/internal/hooks/useId.d.ts +0 -1
- package/types/api/internal/index.d.ts +0 -6
- package/types/api/internal/rendering/callbacks.d.ts +0 -1
- package/types/api/internal/rendering/index.d.ts +0 -6
- package/types/api/internal/rendering/logger.d.ts +0 -4
- package/types/api/internal/rendering/node-builders/actions.d.ts +0 -3
- package/types/api/internal/rendering/node-builders/detail.d.ts +0 -2
- package/types/api/internal/rendering/node-builders/forms.d.ts +0 -2
- package/types/api/internal/rendering/node-builders/keyboard.d.ts +0 -1
- package/types/api/internal/rendering/node-builders/list.d.ts +0 -4
- package/types/api/internal/rendering/node-builders/navigationStack.d.ts +0 -1
- package/types/api/internal/rendering/node-builders/root.d.ts +0 -1
- package/types/api/internal/rendering/node-builders/types.d.ts +0 -1
- package/types/api/internal/rendering/node-builders/utils.d.ts +0 -1
- package/types/api/internal/rendering/reconciler/index.d.ts +0 -1
- package/types/api/internal/rendering/reconciler/noHydratation.d.ts +0 -37
- package/types/api/internal/rendering/reconciler/noMutation.d.ts +0 -18
- package/types/api/internal/rendering/renderer.d.ts +0 -1
- package/types/api/internal/utils/ids.d.ts +0 -1
- package/types/api/internal/utils/index.d.ts +0 -3
- package/types/api/internal/utils/internal-children.d.ts +0 -26
- package/types/api/internal/utils/propTypes.d.ts +0 -3
- package/types/api/ui/color.d.ts +0 -115
- package/types/api/ui/errors.d.ts +0 -1
- package/types/api/ui/feedback/alert.d.ts +0 -97
- package/types/api/ui/feedback/hud.d.ts +0 -16
- package/types/api/ui/feedback/index.d.ts +0 -3
- package/types/api/ui/feedback/toast.d.ts +0 -174
- package/types/api/ui/icon.d.ts +0 -88
- package/types/api/ui/image.d.ts +0 -162
- package/types/api/ui/index.d.ts +0 -5
- package/types/core/message-types.d.ts +0 -17
- package/types/core/preferences.d.ts +0 -69
|
@@ -1,458 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
|
-
import PropTypes from "prop-types";
|
|
3
|
-
import { Keyboard } from "../../app";
|
|
4
|
-
import { Image } from "../../ui";
|
|
5
|
-
import { CopyToClipboardAction, CopyToClipboardActionProps } from "./CopyToClipboardAction";
|
|
6
|
-
import { CreateQuicklinkAction, CreateQuicklinkProps } from "./CreateQuicklinkAction";
|
|
7
|
-
import { CreateSnippetAction, CreateSnippetProps } from "./CreateSnippetAction";
|
|
8
|
-
import { OpenAction, OpenActionProps } from "./OpenAction";
|
|
9
|
-
import { OpenInBrowserAction, OpenInBrowserActionProps } from "./OpenInBrowserAction";
|
|
10
|
-
import { OpenWithAction, OpenWithActionProps } from "./OpenWithAction";
|
|
11
|
-
import { PasteAction, PasteActionProps } from "./PasteAction";
|
|
12
|
-
import { PushAction, PushActionProps } from "./PushAction";
|
|
13
|
-
import { ShowInFinderAction, ShowInFinderActionProps } from "./ShowInFinderAction";
|
|
14
|
-
import { SubmitFormAction, SubmitFormActionProps } from "./SubmitFormAction";
|
|
15
|
-
import { TrashAction, TrashActionProps } from "./TrashAction";
|
|
16
|
-
/**
|
|
17
|
-
* A context-specific action that can be performed by the user.
|
|
18
|
-
*
|
|
19
|
-
* @remarks
|
|
20
|
-
* Assign keyboard shortcuts to items to make it easier for users to perform frequently used actions.
|
|
21
|
-
*
|
|
22
|
-
* @example
|
|
23
|
-
* ```typescript
|
|
24
|
-
* import { ActionPanel, Action, List } from "@raycast/api";
|
|
25
|
-
*
|
|
26
|
-
* export default function Command() {
|
|
27
|
-
* return (
|
|
28
|
-
* <List navigationTitle="Open Pull Requests">
|
|
29
|
-
* <List.Item
|
|
30
|
-
* title="Docs: Update API Reference"
|
|
31
|
-
* subtitle="#1"
|
|
32
|
-
* actions={
|
|
33
|
-
* <ActionPanel title="#1 in raycast/extensions">
|
|
34
|
-
* <Action.OpenInBrowser url="https://github.com/raycast/extensions/pull/1" />
|
|
35
|
-
* <Action.CopyToClipboard title="Copy Pull Request Number" content="#1" />
|
|
36
|
-
* <Action title="Close Pull Request" onAction={() => console.log("Close PR #1")} />
|
|
37
|
-
* </ActionPanel>
|
|
38
|
-
* }
|
|
39
|
-
* />
|
|
40
|
-
* </List>
|
|
41
|
-
* );
|
|
42
|
-
* }
|
|
43
|
-
* ```
|
|
44
|
-
*/
|
|
45
|
-
export declare function Action(props: Action.Props): ReactElement<Action.Props>;
|
|
46
|
-
export declare namespace Action {
|
|
47
|
-
var propTypes: {
|
|
48
|
-
id: PropTypes.Requireable<string>;
|
|
49
|
-
title: PropTypes.Validator<string>;
|
|
50
|
-
icon: PropTypes.Requireable<string | Required<PropTypes.InferProps<{
|
|
51
|
-
fileIcon: PropTypes.Validator<string>;
|
|
52
|
-
}>> | PropTypes.InferProps<{
|
|
53
|
-
source: PropTypes.Requireable<string | PropTypes.InferProps<{
|
|
54
|
-
light: PropTypes.Validator<string>;
|
|
55
|
-
dark: PropTypes.Validator<string>;
|
|
56
|
-
}>>;
|
|
57
|
-
fallback: PropTypes.Requireable<string | PropTypes.InferProps<{
|
|
58
|
-
light: PropTypes.Validator<string>;
|
|
59
|
-
dark: PropTypes.Validator<string>;
|
|
60
|
-
}>>;
|
|
61
|
-
mask: PropTypes.Requireable<Image.Mask>;
|
|
62
|
-
tintColor: PropTypes.Requireable<string | PropTypes.InferProps<{
|
|
63
|
-
light: PropTypes.Validator<string>;
|
|
64
|
-
dark: PropTypes.Validator<string>;
|
|
65
|
-
adjustContrast: PropTypes.Requireable<boolean>;
|
|
66
|
-
}>>;
|
|
67
|
-
}>>;
|
|
68
|
-
shortcut: PropTypes.Requireable<Required<PropTypes.InferProps<{
|
|
69
|
-
modifiers: PropTypes.Validator<string[]>;
|
|
70
|
-
key: PropTypes.Validator<string>;
|
|
71
|
-
}>>>;
|
|
72
|
-
onAction: PropTypes.Requireable<(...args: any[]) => any>;
|
|
73
|
-
};
|
|
74
|
-
var displayName: string;
|
|
75
|
-
}
|
|
76
|
-
export declare namespace Action {
|
|
77
|
-
/**
|
|
78
|
-
* Action that copies the content to the clipboard.
|
|
79
|
-
*
|
|
80
|
-
* @remarks
|
|
81
|
-
* The main window is closed, and a HUD is shown after the content was copied to the clipboard.
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* ```typescript
|
|
85
|
-
* import { ActionPanel, Action, Detail } from "@raycast/api";
|
|
86
|
-
*
|
|
87
|
-
* export default function Command() {
|
|
88
|
-
* return (
|
|
89
|
-
* <Detail
|
|
90
|
-
* markdown="Press `⌘ + .` and share some love."
|
|
91
|
-
* actions={
|
|
92
|
-
* <ActionPanel>
|
|
93
|
-
* <Action.CopyToClipboard content="I ❤️ Raycast" shortcut={{ modifiers: ["cmd"], key: "." }} />
|
|
94
|
-
* </ActionPanel>
|
|
95
|
-
* }
|
|
96
|
-
* />
|
|
97
|
-
* );
|
|
98
|
-
* }
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
const CopyToClipboard: typeof CopyToClipboardAction;
|
|
102
|
-
/**
|
|
103
|
-
* An action to open a file or folder with a specific application, just as if you had double-clicked the
|
|
104
|
-
* file's icon.
|
|
105
|
-
*
|
|
106
|
-
* @remarks
|
|
107
|
-
* The main window is closed after the file is opened.
|
|
108
|
-
*
|
|
109
|
-
* @example
|
|
110
|
-
* ```typescript
|
|
111
|
-
* import { ActionPanel, Detail, Action } from "@raycast/api";
|
|
112
|
-
*
|
|
113
|
-
* export default function Command() {
|
|
114
|
-
* return (
|
|
115
|
-
* <Detail
|
|
116
|
-
* markdown="Check out your extension code."
|
|
117
|
-
* actions={
|
|
118
|
-
* <ActionPanel>
|
|
119
|
-
* <Action.Open title="Open Folder" target={__dirname} />
|
|
120
|
-
* </ActionPanel>
|
|
121
|
-
* }
|
|
122
|
-
* />
|
|
123
|
-
* );
|
|
124
|
-
* }
|
|
125
|
-
* ```
|
|
126
|
-
*/
|
|
127
|
-
const Open: typeof OpenAction;
|
|
128
|
-
/**
|
|
129
|
-
* Action that opens a URL in the default browser.
|
|
130
|
-
*
|
|
131
|
-
* @remarks
|
|
132
|
-
* The main window is closed after the URL is opened in the browser.
|
|
133
|
-
*
|
|
134
|
-
* @example
|
|
135
|
-
* ```typescript
|
|
136
|
-
* import { ActionPanel, Detail, Action } from "@raycast/api";
|
|
137
|
-
*
|
|
138
|
-
* export default function Command() {
|
|
139
|
-
* return (
|
|
140
|
-
* <Detail
|
|
141
|
-
* markdown="Join the gang!"
|
|
142
|
-
* actions={
|
|
143
|
-
* <ActionPanel>
|
|
144
|
-
* <Action.OpenInBrowser url="https://raycast.com/jobs" />
|
|
145
|
-
* </ActionPanel>
|
|
146
|
-
* }
|
|
147
|
-
* />
|
|
148
|
-
* );
|
|
149
|
-
* }
|
|
150
|
-
* ```
|
|
151
|
-
*/
|
|
152
|
-
const OpenInBrowser: typeof OpenInBrowserAction;
|
|
153
|
-
/**
|
|
154
|
-
* Action that opens a file or folder with a specific application.
|
|
155
|
-
*
|
|
156
|
-
* @remarks
|
|
157
|
-
* The action opens a sub-menu with all applications that can open the file or folder.
|
|
158
|
-
* The main window is closed after the file is opened in the specified application.
|
|
159
|
-
*
|
|
160
|
-
* @example
|
|
161
|
-
* ```typescript
|
|
162
|
-
* import { ActionPanel, Detail, Action } from "@raycast/api";
|
|
163
|
-
* import { homedir } from "os";
|
|
164
|
-
*
|
|
165
|
-
* const DESKTOP_DIR = `${homedir()}/Desktop`;
|
|
166
|
-
*
|
|
167
|
-
* export default function Command() {
|
|
168
|
-
* return (
|
|
169
|
-
* <Detail
|
|
170
|
-
* markdown="What do you want to use to open your desktop with?"
|
|
171
|
-
* actions={
|
|
172
|
-
* <ActionPanel>
|
|
173
|
-
* <Action.OpenWith path={DESKTOP_DIR} />
|
|
174
|
-
* </ActionPanel>
|
|
175
|
-
* }
|
|
176
|
-
* />
|
|
177
|
-
* );
|
|
178
|
-
* }
|
|
179
|
-
* ```
|
|
180
|
-
*/
|
|
181
|
-
const OpenWith: typeof OpenWithAction;
|
|
182
|
-
/**
|
|
183
|
-
* Action that pastes the content to the front-most applications.
|
|
184
|
-
*
|
|
185
|
-
* @remarks
|
|
186
|
-
* The main window is closed after the content is pasted to the front-most application.
|
|
187
|
-
*
|
|
188
|
-
* @example
|
|
189
|
-
* ```typescript
|
|
190
|
-
* import { ActionPanel, Detail, Action } from "@raycast/api";
|
|
191
|
-
*
|
|
192
|
-
* export default function Command() {
|
|
193
|
-
* return (
|
|
194
|
-
* <Detail
|
|
195
|
-
* markdown="Let us know what you think about the Raycast API?"
|
|
196
|
-
* actions={
|
|
197
|
-
* <ActionPanel>
|
|
198
|
-
* <Action.Paste content="api@raycast.com" />
|
|
199
|
-
* </ActionPanel>
|
|
200
|
-
* }
|
|
201
|
-
* />
|
|
202
|
-
* );
|
|
203
|
-
* }
|
|
204
|
-
* ```
|
|
205
|
-
*/
|
|
206
|
-
const Paste: typeof PasteAction;
|
|
207
|
-
/**
|
|
208
|
-
* Action that pushes a new view to the navigation stack.
|
|
209
|
-
*
|
|
210
|
-
* @example
|
|
211
|
-
* ```typescript
|
|
212
|
-
* import { ActionPanel, Detail, Action } from "@raycast/api";
|
|
213
|
-
*
|
|
214
|
-
* function Ping() {
|
|
215
|
-
* return (
|
|
216
|
-
* <Detail
|
|
217
|
-
* markdown="Ping"
|
|
218
|
-
* actions={
|
|
219
|
-
* <ActionPanel>
|
|
220
|
-
* <Action.Push title="Push Pong" target={<Pong />} />
|
|
221
|
-
* </ActionPanel>
|
|
222
|
-
* }
|
|
223
|
-
* />
|
|
224
|
-
* );
|
|
225
|
-
* }
|
|
226
|
-
*
|
|
227
|
-
* function Pong() {
|
|
228
|
-
* return <Detail markdown="Pong" />;
|
|
229
|
-
* }
|
|
230
|
-
*
|
|
231
|
-
* export default function Command() {
|
|
232
|
-
* return <Ping />;
|
|
233
|
-
* }
|
|
234
|
-
* ```
|
|
235
|
-
*/
|
|
236
|
-
const Push: typeof PushAction;
|
|
237
|
-
/**
|
|
238
|
-
* Action that shows a file or folder in the Finder.
|
|
239
|
-
*
|
|
240
|
-
* @remarks
|
|
241
|
-
* The main window is closed after the file or folder is revealed in the Finder.
|
|
242
|
-
*
|
|
243
|
-
* @example
|
|
244
|
-
* ```typescript
|
|
245
|
-
* import { ActionPanel, Detail, Action } from "@raycast/api";
|
|
246
|
-
* import { homedir } from "os";
|
|
247
|
-
*
|
|
248
|
-
* const DOWNLOADS_DIR = `${homedir()}/Downloads`;
|
|
249
|
-
*
|
|
250
|
-
* export default function Command() {
|
|
251
|
-
* return (
|
|
252
|
-
* <Detail
|
|
253
|
-
* markdown="Are your downloads pilling up again?"
|
|
254
|
-
* actions={
|
|
255
|
-
* <ActionPanel>
|
|
256
|
-
* <Action.ShowInFinder path={DOWNLOADS_DIR} />
|
|
257
|
-
* </ActionPanel>
|
|
258
|
-
* }
|
|
259
|
-
* />
|
|
260
|
-
* );
|
|
261
|
-
* }
|
|
262
|
-
* ```
|
|
263
|
-
*/
|
|
264
|
-
const ShowInFinder: typeof ShowInFinderAction;
|
|
265
|
-
/**
|
|
266
|
-
* Action that adds a submit handler for capturing form values.
|
|
267
|
-
*
|
|
268
|
-
* @example
|
|
269
|
-
* ```typescript
|
|
270
|
-
* import { ActionPanel, Form, Action } from "@raycast/api";
|
|
271
|
-
* import { useState } from "react";
|
|
272
|
-
*
|
|
273
|
-
* export default function Command() {
|
|
274
|
-
* const [name, setName] = useState<string>();
|
|
275
|
-
*
|
|
276
|
-
* return (
|
|
277
|
-
* <Form
|
|
278
|
-
* actions={
|
|
279
|
-
* <ActionPanel>
|
|
280
|
-
* <Action.SubmitForm title="Submit Name" onSubmit={(values) => console.log(values)} />
|
|
281
|
-
* </ActionPanel>
|
|
282
|
-
* }
|
|
283
|
-
* >
|
|
284
|
-
* <Form.TextField id="name" value={name} onChange={setName} />
|
|
285
|
-
* </Form>
|
|
286
|
-
* );
|
|
287
|
-
* }
|
|
288
|
-
* ```
|
|
289
|
-
*/
|
|
290
|
-
const SubmitForm: typeof SubmitFormAction;
|
|
291
|
-
/**
|
|
292
|
-
* Action that moves a file or folder to the Trash.
|
|
293
|
-
*
|
|
294
|
-
* @example
|
|
295
|
-
* ```typescript
|
|
296
|
-
* import { ActionPanel, Detail, Action } from "@raycast/api";
|
|
297
|
-
* import { homedir } from "os";
|
|
298
|
-
*
|
|
299
|
-
* const FILE = `${homedir()}/Downloads/get-rid-of-me.txt`;
|
|
300
|
-
*
|
|
301
|
-
* export default function Command() {
|
|
302
|
-
* return (
|
|
303
|
-
* <Detail
|
|
304
|
-
* markdown="Some spring cleaning?"
|
|
305
|
-
* actions={
|
|
306
|
-
* <ActionPanel>
|
|
307
|
-
* <Action.Trash paths={FILE} />
|
|
308
|
-
* </ActionPanel>
|
|
309
|
-
* }
|
|
310
|
-
* />
|
|
311
|
-
* );
|
|
312
|
-
* }
|
|
313
|
-
* ```
|
|
314
|
-
*/
|
|
315
|
-
const Trash: typeof TrashAction;
|
|
316
|
-
/**
|
|
317
|
-
* Action that navigates to the the Create Snippet command with some or all of the fields prefilled.
|
|
318
|
-
*
|
|
319
|
-
* @example
|
|
320
|
-
* ```typescript
|
|
321
|
-
* import { ActionPanel, Detail, Action } from "@raycast/api";
|
|
322
|
-
*
|
|
323
|
-
* export default function Command() {
|
|
324
|
-
* return (
|
|
325
|
-
* <Detail
|
|
326
|
-
* markdown="Test out snippet creation"
|
|
327
|
-
* actions={
|
|
328
|
-
* <ActionPanel>
|
|
329
|
-
* <Action.CreateSnippet snippet={{ text: "DE75512108001245126199" }} />
|
|
330
|
-
* </ActionPanel>
|
|
331
|
-
* }
|
|
332
|
-
* />
|
|
333
|
-
* );
|
|
334
|
-
* }
|
|
335
|
-
* ```
|
|
336
|
-
*/
|
|
337
|
-
const CreateSnippet: typeof CreateSnippetAction;
|
|
338
|
-
/**
|
|
339
|
-
* Action that navigates to the the Create Quicklink command with some or all of the fields prefilled.
|
|
340
|
-
*
|
|
341
|
-
* @example
|
|
342
|
-
* ```typescript
|
|
343
|
-
* import { ActionPanel, Detail, Action } from "@raycast/api";
|
|
344
|
-
*
|
|
345
|
-
* export default function Command() {
|
|
346
|
-
* return (
|
|
347
|
-
* <Detail
|
|
348
|
-
* markdown="Test out quicklink creation"
|
|
349
|
-
* actions={
|
|
350
|
-
* <ActionPanel>
|
|
351
|
-
* <Action.CreateQuicklink quicklink={{ link: "https://duckduckgo.com/?q={Query}" }} />
|
|
352
|
-
* </ActionPanel>
|
|
353
|
-
* }
|
|
354
|
-
* />
|
|
355
|
-
* );
|
|
356
|
-
* }
|
|
357
|
-
* ```
|
|
358
|
-
*/
|
|
359
|
-
const CreateQuicklink: typeof CreateQuicklinkAction;
|
|
360
|
-
/**
|
|
361
|
-
* Props of the {@link Action} React component.
|
|
362
|
-
*/
|
|
363
|
-
interface Props {
|
|
364
|
-
/**
|
|
365
|
-
* ID of the item.
|
|
366
|
-
*
|
|
367
|
-
* @remarks
|
|
368
|
-
* Make sure to assign each section or item a unique ID. If no ID is specified, a memoized auto-generated is used.
|
|
369
|
-
*/
|
|
370
|
-
id?: string;
|
|
371
|
-
/**
|
|
372
|
-
* The title displayed for the item.
|
|
373
|
-
*/
|
|
374
|
-
title: string;
|
|
375
|
-
/**
|
|
376
|
-
* The icon displayed for the action.
|
|
377
|
-
*/
|
|
378
|
-
icon?: Image.ImageLike;
|
|
379
|
-
/**
|
|
380
|
-
* The keyboard shortcut for the item.
|
|
381
|
-
*
|
|
382
|
-
* @remarks
|
|
383
|
-
* The first and second action in an {@link ActionPanel} become the primary and secondary action. They automatically get the default keyboard shortcuts assigned.
|
|
384
|
-
* 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.
|
|
385
|
-
*/
|
|
386
|
-
shortcut?: Keyboard.Shortcut;
|
|
387
|
-
/**
|
|
388
|
-
* Callback that is triggered when the item is selected.
|
|
389
|
-
*/
|
|
390
|
-
onAction?: () => void;
|
|
391
|
-
}
|
|
392
|
-
namespace CreateQuicklink {
|
|
393
|
-
/**
|
|
394
|
-
* Props of the {@link Action.CreateQuicklink} React component.
|
|
395
|
-
*/
|
|
396
|
-
type Props = CreateQuicklinkProps;
|
|
397
|
-
}
|
|
398
|
-
namespace CreateSnippet {
|
|
399
|
-
/**
|
|
400
|
-
* Props of the {@link Action.CreateSnippet} React component.
|
|
401
|
-
*/
|
|
402
|
-
type Props = CreateSnippetProps;
|
|
403
|
-
}
|
|
404
|
-
namespace CopyToClipboard {
|
|
405
|
-
/**
|
|
406
|
-
* Props of the {@link Action.CopyToClipboard} React component.
|
|
407
|
-
*/
|
|
408
|
-
type Props = CopyToClipboardActionProps;
|
|
409
|
-
}
|
|
410
|
-
namespace Open {
|
|
411
|
-
/**
|
|
412
|
-
* Props of the {@link Action.Open} React component.
|
|
413
|
-
*/
|
|
414
|
-
type Props = OpenActionProps;
|
|
415
|
-
}
|
|
416
|
-
namespace OpenInBrowser {
|
|
417
|
-
/**
|
|
418
|
-
* Props of the {@link Action.OpenInBrowser} React component.
|
|
419
|
-
*/
|
|
420
|
-
type Props = OpenInBrowserActionProps;
|
|
421
|
-
}
|
|
422
|
-
namespace OpenWith {
|
|
423
|
-
/**
|
|
424
|
-
* Props of the {@link Action.OpenWith} React component.
|
|
425
|
-
*/
|
|
426
|
-
type Props = OpenWithActionProps;
|
|
427
|
-
}
|
|
428
|
-
namespace Paste {
|
|
429
|
-
/**
|
|
430
|
-
* Props of the {@link Action.Paste} React component.
|
|
431
|
-
*/
|
|
432
|
-
type Props = PasteActionProps;
|
|
433
|
-
}
|
|
434
|
-
namespace Push {
|
|
435
|
-
/**
|
|
436
|
-
* Props of the {@link Action.Push} React component.
|
|
437
|
-
*/
|
|
438
|
-
type Props = PushActionProps;
|
|
439
|
-
}
|
|
440
|
-
namespace ShowInFinder {
|
|
441
|
-
/**
|
|
442
|
-
* Props of the {@link Action.ShowInFinder} React component.
|
|
443
|
-
*/
|
|
444
|
-
type Props = ShowInFinderActionProps;
|
|
445
|
-
}
|
|
446
|
-
namespace SubmitForm {
|
|
447
|
-
/**
|
|
448
|
-
* Props of the {@link Action.SubmitForm} React component.
|
|
449
|
-
*/
|
|
450
|
-
type Props<T> = SubmitFormActionProps<T>;
|
|
451
|
-
}
|
|
452
|
-
namespace Trash {
|
|
453
|
-
/**
|
|
454
|
-
* Props of the {@link Action.Trash} React component.
|
|
455
|
-
*/
|
|
456
|
-
type Props = TrashActionProps;
|
|
457
|
-
}
|
|
458
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
|
-
import { Keyboard } from "../../app";
|
|
3
|
-
import { Image } from "../../ui";
|
|
4
|
-
/**
|
|
5
|
-
* See {@link Action.CopyToClipboard.Props}
|
|
6
|
-
*/
|
|
7
|
-
export interface CopyToClipboardActionProps {
|
|
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
|
-
* @defaultValue Copy to Clipboard
|
|
15
|
-
*/
|
|
16
|
-
title?: string;
|
|
17
|
-
/**
|
|
18
|
-
* A optional icon displayed for the item.
|
|
19
|
-
* @defaultValue {@link Icon.Clipboard}
|
|
20
|
-
*/
|
|
21
|
-
icon?: Image.ImageLike;
|
|
22
|
-
/**
|
|
23
|
-
* The keyboard shortcut for the action.
|
|
24
|
-
*/
|
|
25
|
-
shortcut?: Keyboard.Shortcut;
|
|
26
|
-
/**
|
|
27
|
-
* Callback when the content was copied to clipboard.
|
|
28
|
-
*
|
|
29
|
-
* @remarks
|
|
30
|
-
* This is handy when you want to act on the copied content, e.g. up-rank recently copied content.
|
|
31
|
-
*/
|
|
32
|
-
onCopy?: (content: string | number) => void;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* See {@link Action.CopyToClipboard}
|
|
36
|
-
*/
|
|
37
|
-
export declare function CopyToClipboardAction(props: CopyToClipboardActionProps): ReactElement<CopyToClipboardActionProps>;
|
|
38
|
-
export declare namespace CopyToClipboardAction {
|
|
39
|
-
var displayName: string;
|
|
40
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
|
-
import { Image } from "../../ui";
|
|
3
|
-
import { Application, Keyboard } from "../../app";
|
|
4
|
-
export interface Quicklink {
|
|
5
|
-
/**
|
|
6
|
-
* The URL or file path, optionally including placeholders such as in "https://google.com/search?q={Query}"
|
|
7
|
-
*/
|
|
8
|
-
link: string;
|
|
9
|
-
/**
|
|
10
|
-
* The quicklink name
|
|
11
|
-
*/
|
|
12
|
-
name?: string;
|
|
13
|
-
/**
|
|
14
|
-
* The application that the quicklink should be opened in.
|
|
15
|
-
*/
|
|
16
|
-
application?: string | Application;
|
|
17
|
-
}
|
|
18
|
-
export interface CreateQuicklinkProps {
|
|
19
|
-
/**
|
|
20
|
-
* The {@link Quicklink} to create.
|
|
21
|
-
*/
|
|
22
|
-
quicklink: Quicklink;
|
|
23
|
-
/**
|
|
24
|
-
* An optional title for the action.
|
|
25
|
-
*/
|
|
26
|
-
title?: string;
|
|
27
|
-
/**
|
|
28
|
-
* A optional icon displayed for the item. See {@link ImageLike} for the supported formats and types.
|
|
29
|
-
*/
|
|
30
|
-
icon?: Image.ImageLike;
|
|
31
|
-
/**
|
|
32
|
-
* The keyboard shortcut for the action.
|
|
33
|
-
*/
|
|
34
|
-
shortcut?: Keyboard.Shortcut;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* See {@link Action.CreateQuicklink}
|
|
38
|
-
*/
|
|
39
|
-
export declare function CreateQuicklinkAction(props: CreateQuicklinkProps): ReactElement<CreateQuicklinkProps>;
|
|
40
|
-
export declare namespace CreateQuicklinkAction {
|
|
41
|
-
var displayName: string;
|
|
42
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { ReactElement } from "react";
|
|
2
|
-
import { Image } from "../../ui";
|
|
3
|
-
import { Keyboard } from "../../app";
|
|
4
|
-
interface Snippet {
|
|
5
|
-
/**
|
|
6
|
-
* The snippet contents.
|
|
7
|
-
*/
|
|
8
|
-
text: string;
|
|
9
|
-
/**
|
|
10
|
-
* The snippet name.
|
|
11
|
-
*/
|
|
12
|
-
name?: string;
|
|
13
|
-
/**
|
|
14
|
-
* The keyword to trigger the snippet.
|
|
15
|
-
*/
|
|
16
|
-
keyword?: string;
|
|
17
|
-
}
|
|
18
|
-
export interface CreateSnippetProps {
|
|
19
|
-
snippet: Snippet;
|
|
20
|
-
/**
|
|
21
|
-
* An optional title for the action.
|
|
22
|
-
*/
|
|
23
|
-
title?: string;
|
|
24
|
-
/**
|
|
25
|
-
* A optional icon displayed for the item. See {@link ImageLike} for the supported formats and types.
|
|
26
|
-
*/
|
|
27
|
-
icon?: Image.ImageLike;
|
|
28
|
-
/**
|
|
29
|
-
* The keyboard shortcut for the action.
|
|
30
|
-
*/
|
|
31
|
-
shortcut?: Keyboard.Shortcut;
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* See {@link Action.CreateQuicklink}
|
|
35
|
-
*/
|
|
36
|
-
export declare function CreateSnippetAction(props: CreateSnippetProps): ReactElement<CreateSnippetProps>;
|
|
37
|
-
export declare namespace CreateSnippetAction {
|
|
38
|
-
var displayName: string;
|
|
39
|
-
}
|
|
40
|
-
export {};
|
|
@@ -1,47 +0,0 @@
|
|
|
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
|
-
}
|
|
@@ -1,43 +0,0 @@
|
|
|
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
|
-
* @defaultValue Open in Browser
|
|
15
|
-
*/
|
|
16
|
-
title?: string;
|
|
17
|
-
/**
|
|
18
|
-
* The icon displayed for the action.
|
|
19
|
-
* @defaultValue {@link Icon.Globe}
|
|
20
|
-
*/
|
|
21
|
-
icon?: Image.ImageLike;
|
|
22
|
-
/**
|
|
23
|
-
* The optional keyboard shortcut for the menu item
|
|
24
|
-
*/
|
|
25
|
-
shortcut?: Keyboard.Shortcut;
|
|
26
|
-
/**
|
|
27
|
-
* Callback when the URL was opened in the browser.
|
|
28
|
-
*
|
|
29
|
-
* @remarks
|
|
30
|
-
* This is handy when you want to act on the opened link, e.g. store a history of visited links.
|
|
31
|
-
*/
|
|
32
|
-
onOpen?: (url: string) => void;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* See {@link Action.OpenInBrowser}
|
|
36
|
-
*/
|
|
37
|
-
export declare function OpenInBrowserAction(props: OpenInBrowserActionProps): ReactElement<OpenInBrowserActionProps>;
|
|
38
|
-
export declare namespace OpenInBrowserAction {
|
|
39
|
-
var displayName: string;
|
|
40
|
-
}
|
|
41
|
-
export declare namespace OpenInBrowserAction {
|
|
42
|
-
type Props = OpenInBrowserActionProps;
|
|
43
|
-
}
|