This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import "@johnlindquist/kit" | |
import type { Action } from "@johnlindquist/kit" | |
export const metadata: Metadata = { | |
name: "Testing Change Actions on Focus", | |
} | |
// Define possible states | |
type ActionState = "open" | "closed" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: Testing Prevent Submit | |
import "@johnlindquist/kit"; | |
await arg( | |
{ | |
placeholder: "Prevent Submit", | |
enter: "Speak", | |
onSubmit: (input, state) => { | |
say(state.focused.value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: Testing Prevent Submit | |
import "@johnlindquist/kit"; | |
await arg( | |
{ | |
placeholder: "Prevent Submit", | |
enter: "", | |
}, | |
["one", "two", "three"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"animals": { | |
"name": "Animals", | |
"words": [ | |
"Dog", | |
"Lion", | |
"Elephant", | |
"Giraffe", | |
"Penguin", | |
"Dolphin", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: Testing Script Bundle | |
// Shortcut: ctrl 0 | |
import "@johnlindquist/kit"; | |
const script = await selectScript("Testing", true, (scripts) => | |
scripts.filter((script) => script.name.startsWith("Testing")) | |
); | |
await run(script.filePath); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: Paste Input | |
import "@johnlindquist/kit"; | |
const input = await arg(); | |
await setSelectedText(input); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: Testing Restart Prompt | |
import "@johnlindquist/kit"; | |
let errorCount = 0; | |
let noError = false; | |
while (!noError) { | |
try { | |
throw new Error(); | |
} catch (e) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: Testing Restart Prompt | |
import "@johnlindquist/kit"; | |
let errorCount = 0; | |
let error = true; | |
while (error) { | |
error = false; | |
try { | |
throw new Error(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: Testing Restart Prompt | |
import { Action } from "@johnlindquist/kit"; | |
let errorCount = 0; | |
let error = true; | |
while (error) { | |
error = false; | |
try { | |
throw new Error(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Name: Testing Currently Active | |
import "@johnlindquist/kit"; | |
import { Choice } from "@johnlindquist/kit"; | |
const css = ` | |
.active { | |
background-color: green; | |
} | |
`; |