Skip to content

Commit

Permalink
feat: add new guidepup api docs
Browse files Browse the repository at this point in the history
  • Loading branch information
cmorten committed Dec 29, 2023
1 parent c67bebd commit 967faed
Show file tree
Hide file tree
Showing 40 changed files with 1,415 additions and 1,070 deletions.
4 changes: 2 additions & 2 deletions docs/api/class-click-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ import { voiceOver } from "@guidepup/guidepup";

**Optional:** Mouse button to click. One of: `"left"`, `"right"`. Defaults to `"left"` if not provided.

**Type:** <[string]>
**Type:** [string]

## clickOptions.clickCount {#click-options-click-count}

**Optional:** Number of times to click the mouse. One of: `1`, `2`, `3`. Defaults to `1` if not provided.

**Type:** <[number]>
**Type:** [number]

[commandoptions]: ./class-command-options "CommandOptions"
[number]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number "number"
Expand Down
6 changes: 3 additions & 3 deletions docs/api/class-command-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,23 @@ See also:

Default is `true`.

**Type:** <[boolean] | "initial">
**Type:** [boolean] | "initial"

## commandOptions.retries {#command-options-retries}

**Optional:** Number of times to retry.

Default is `3`.

**Type:** <[number]>
**Type:** [number]

## commandOptions.timeout {#command-options-timeout}

**Optional:** How long to wait until the command times out in ms.

Default is `10000`.

**Type:** <[number]>
**Type:** [number]

[clickoptions]: ./class-click-options "ClickOptions"
[keyboardoptions]: ./class-keyboard-options "KeyboardOptions"
Expand Down
2 changes: 1 addition & 1 deletion docs/api/class-guidepup-virtual-screen-reader.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ describe("Screen Reader Tests", () => {

## guidepupVirtualScreenReader.virtual {#guidepupVirtualScreenReader-virtual}

**Type:** <[Virtual]>
**Type:** [Virtual]

This object can be used to launch and control the Virtual Screen Reader.

Expand Down
76 changes: 61 additions & 15 deletions docs/api/class-guidepup.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,95 +46,140 @@ import { voiceOver } from "@guidepup/guidepup";
- [guidepup.windowsOSActivate](./class-guidepup#guidepup-windows-activate)
- [guidepup.WindowsKeyCodes](./class-guidepup#guidepup-windows-key-codes)
- [guidepup.WindowsModifiers](./class-guidepup#guidepup-windows-modifiers)
- [guidepup.windowsRecord](./class-guidepup#guidepup-windows-record)
- [guidepup.windowsQuit](./class-guidepup#guidepup-windows-quit)

## guidepup.macOSActivate {#guidepup-macos-activate}

**Type:** <[macOSActivate]>
**See:** [macOSActivate]

Opens a MacOS application if not already open, and focuses the application.

## guidepup.MacOSApplications {#guidepup-macos-applications}

**Type:** <[MacOSApplications]>
**Type:** [MacOSApplications]

Identifiers for standard applications available on MacOS.

## guidepup.MacOSKeyCodes {#guidepup-macos-key-codes}

**Type:** <[MacOSKeyCodes]>
**Type:** [MacOSKeyCodes]

Key codes for MacOS.

## guidepup.MacOSModifiers {#guidepup-macos-modifiers}

**Type:** <[MacOSModifiers]>
**Type:** [MacOSModifiers]

Modifier keys for MacOS.

## guidepup.macOSQuit {#guidepup-macos-quit}

**Type:** <[macOSQuit]>
**See:** [macOSQuit]

Quits a MacOS application if running.

## guidepup.macOSRecord {#guidepup-macos-record}

**Type:** <[macOSRecord]>
**See:** [macOSRecord]

Start a screen recording.

## guidepup.nvda {#guidepup-nvda}

**Type:** <[NVDA]>
**Type:** [NVDA]

This object can be used to launch and control NVDA.

Here's a typical example:

```ts
import { nvda } from "@guidepup/guidepup";

(async () => {
// Start NVDA.
await nvda.start();

// Move to the next item.
await nvda.next();

// ... perform some commands.

// Stop NVDA.
await nvda.stop();
})();
```

## guidepup.NVDAKeyCodeCommands {#guidepup-nvda-key-code-commands}

**Type:** <[NVDAKeyCodeCommands]>
**Type:** [NVDAKeyCodeCommands]

[Key code commands for the NVDA screen reader](https://www.nvaccess.org/files/nvda/releases/2021.2/documentation/keyCommands.html) on Windows.

## guidepup.voiceOver {#guidepup-voiceover}

**Type:** <[VoiceOver]>
**Type:** [VoiceOver]

This object can be used to launch and control VoiceOver.

Here's a typical example:

```ts
import { voiceOver } from "@guidepup/guidepup";

(async () => {
// Start VoiceOver.
await voiceOver.start();

// Move to the next item.
await voiceOver.next();

// ... perform some commands.

// Stop VoiceOver.
await voiceOver.stop();
})();
```

## guidepup.VoiceOverCommanderCommands {#guidepup-voiceover-commander-commands}

**Type:** <[VoiceOverCommanderCommands]>
**Type:** [VoiceOverCommanderCommands]

[VoiceOver Commander](https://support.apple.com/en-gb/guide/voiceover/cpvoukbcmdr/mac) commands.

## guidepup.voiceOverKeyCodeCommands {#guidepup-voiceover-key-code-commands}

**Type:** <[voiceOverKeyCodeCommands]>
**See:** [voiceOverKeyCodeCommands]

[Key code commands for the VoiceOver screen reader](https://www.apple.com/voiceover/info/guide/_1131.html) on MacOS.

## guidepup.windowsActivate {#guidepup-windows-activate}

**Type:** <[windowsActivate]>
**See:** [windowsActivate]

Opens a Windows application if not already open, and focuses the application.

## guidepup.WindowsKeyCodes {#guidepup-windows-key-codes}

**Type:** <[WindowsKeyCodes]>
**Type:** [WindowsKeyCodes]

Key codes for Windows.

## guidepup.WindowsModifiers {#guidepup-windows-modifiers}

**Type:** <[WindowsModifiers]>
**Type:** [WindowsModifiers]

Modifier keys for Windows.

## guidepup.windowsRecord {#guidepup-windows-record}

**See:** [windowsRecord]

Start a screen recording.

## guidepup.windowsQuit {#guidepup-windows-quit}

**Type:** <[windowsQuit]>
**See:** [windowsQuit]

Quits a Windows application if running.

Expand All @@ -152,4 +197,5 @@ Quits a Windows application if running.
[windowsactivate]: ./class-windows-activate "windowsActivate"
[windowskeycodes]: ./class-windows-key-codes "WindowsKeyCodes"
[windowsmodifiers]: ./class-windows-modifiers "WindowsModifiers"
[windowsrecord]: ./class-windows-record "windowsRecord"
[windowsquit]: ./class-windows-quit "windowsQuit"
4 changes: 2 additions & 2 deletions docs/api/class-key-code-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ See also:
The key code or key codes to send.
**Type:** &#60;[any] | [Array]<[any]>&#62;
**Type:** [any] | [Array]<[any]>
## keyCodeCommand.modifiers {#key-code-command-modifiers}
**Optional:** List of modifier keys to press while sending the key code(s).
**Type:** &#60;[Array]<[string]>&#62;
**Type:** [Array]<[string]>
[macoskeycodecommand]: ./class-macos-key-code-command "MacOSKeyCodeCommand"
[voiceoverkeycodecommands]: ./class-voiceover-key-code-commands "VoiceOverKeyCodeCommands"
Expand Down
2 changes: 1 addition & 1 deletion docs/api/class-keyboard-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: "KeyboardCommand"
---

**Type:** &#60;[KeyCodeCommand] | [KeystrokeCommand]&#62;
**Type:** [KeyCodeCommand] | [KeystrokeCommand]

Abstract type representing one of: [KeyCodeCommand], [KeystrokeCommand].

Expand Down
2 changes: 1 addition & 1 deletion docs/api/class-keyboard-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const safariKeyboardOptions = {

**Optional:** Identifier for target application. If not provided, the current focused application will be targeted.

**Type:** &#60;[string]&#62;
**Type:** [string]

See also:

Expand Down
4 changes: 2 additions & 2 deletions docs/api/class-keystroke-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ See also:
The character(s) to send.
**Type:** &#60;[string]&#62;
**Type:** [string]
## keystrokeCommand.modifiers {#keystroke-command-modifiers}
**Optional:** List of modifier keys to press while sending the character(s).
**Type:** &#60;[Array]<[string]>&#62;
**Type:** [Array]<[string]>
[macoskeystrokecommand]: ./class-macos-keystroke-command "MacOSKeystrokeCommand"
[array]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array "Array"
Expand Down
6 changes: 3 additions & 3 deletions docs/api/class-macos-activate.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ import { macOSActivate, MacOSApplications } from "@guidepup/guidepup";

**Parameters:**

- `applicationName` &#60;[string]&#62; Application identifier. See [MacOSApplications].
- **Optional:** `options` &#60;[CommandOptions]&#62; Additional options.
- `applicationName` [string] Application identifier. See [MacOSApplications].
- **Optional:** `options` [CommandOptions] Additional options.

**Returns:** &#60;[Promise]<[void]>&#62;
**Returns:** [Promise]<[void]>

[commandoptions]: ./class-command-options "CommandOptions"
[macosapplications]: ./class-macos-applications "MacOSApplications"
Expand Down
8 changes: 4 additions & 4 deletions docs/api/class-macos-key-code-command.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,25 +53,25 @@ See also:
**Optional:** Description of the action the key code performs.
**Type:** &#60;[string]&#62;
**Type:** [string]
## macOSKeyCodeCommand.keyCode {#key-code-command-key-code}
The key code or key codes to send. See [MacOSKeyCodes] for available key codes.
**Type:** &#60;[number] | [Array]<[number]>&#62;
**Type:** [number] | [Array]<[number]>
## macOSKeyCodeCommand.modifiers {#key-code-command-modifiers}
**Optional:** List of modifier keys to press while sending the key code(s).
**Type:** &#60;[Array]<[MacOSModifiers]>&#62;
**Type:** [Array]<[MacOSModifiers]>
## macOSKeyCodeCommand.representation {#key-code-command-representation}
**Optional:** Symbolic representation of the key code(s) and modifier keys this command uses.
**Type:** &#60;[string]&#62;
**Type:** [string]
[keycodecommand]: ./class-key-code-command "KeyCodeCommand"
[macoskeycodes]: ./class-macos-key-codes "MacOSKeyCodes"
Expand Down
Loading

0 comments on commit 967faed

Please sign in to comment.