From fdc315cfd2a479ca5d9fe206cc744f2a33a59ef7 Mon Sep 17 00:00:00 2001 From: Don McCurdy Date: Mon, 9 Oct 2023 10:20:12 -0400 Subject: [PATCH] fix(typo): Correct typo in __experimental_disablePlayPauseKeyboardShortcut method name --- theatre/studio/src/TheatreStudio.ts | 10 +++++----- theatre/studio/src/UIRoot/useKeyboardShortcuts.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/theatre/studio/src/TheatreStudio.ts b/theatre/studio/src/TheatreStudio.ts index 0c90de00f..52dec6904 100644 --- a/theatre/studio/src/TheatreStudio.ts +++ b/theatre/studio/src/TheatreStudio.ts @@ -21,7 +21,7 @@ import {debounce, uniq} from 'lodash-es' import type Sheet from '@theatre/core/sheets/Sheet' import type {ProjectId} from '@theatre/sync-server/state/types/core' import { - __experimental_disblePlayPauseKeyboardShortcut, + __experimental_disablePlayPauseKeyboardShortcut, __experimental_enablePlayPauseKeyboardShortcut, } from './UIRoot/useKeyboardShortcuts' import type TheatreSheetObject from '@theatre/core/sheetObjects/TheatreSheetObject' @@ -447,7 +447,7 @@ export interface IStudio { * Disables the play/pause keyboard shortcut (spacebar) * Also see `__experimental_enablePlayPauseKeyboardShortcut()` to re-enable it. */ - __experimental_disblePlayPauseKeyboardShortcut(): void + __experimental_disablePlayPauseKeyboardShortcut(): void /** * Warning: This is an experimental API and will change in the future. * @@ -499,16 +499,16 @@ export default class TheatreStudio implements IStudio { private readonly _cache = new SimpleCache() __experimental = { - __experimental_disblePlayPauseKeyboardShortcut(): void { + __experimental_disablePlayPauseKeyboardShortcut(): void { // This is an experimental API to respond to this issue: https://discord.com/channels/870988717190426644/870988717190426647/1067906775602430062 // Ideally we need a coherent way for the user to control keyboard inputs, so we will remove this method in the future. // Here is the procedure for removing it: // 1. Replace this code with a `throw new Error("This is experimental method is now deprecated, and here is how to migrate: ...")` // 2. Then keep it for a few months, and then remove it. - __experimental_disblePlayPauseKeyboardShortcut() + __experimental_disablePlayPauseKeyboardShortcut() }, __experimental_enablePlayPauseKeyboardShortcut(): void { - // see __experimental_disblePlayPauseKeyboardShortcut() + // see __experimental_disablePlayPauseKeyboardShortcut() __experimental_enablePlayPauseKeyboardShortcut() }, __experimental_clearPersistentStorage(persistenceKey?: string): void { diff --git a/theatre/studio/src/UIRoot/useKeyboardShortcuts.ts b/theatre/studio/src/UIRoot/useKeyboardShortcuts.ts index 156092ab3..ff44a6e7d 100644 --- a/theatre/studio/src/UIRoot/useKeyboardShortcuts.ts +++ b/theatre/studio/src/UIRoot/useKeyboardShortcuts.ts @@ -10,7 +10,7 @@ import type Sequence from '@theatre/core/sequences/Sequence' import memoizeFn from '@theatre/utils/memoizeFn' let playPauseKeyboardShortcutIsEnabled = true -export function __experimental_disblePlayPauseKeyboardShortcut() { +export function __experimental_disablePlayPauseKeyboardShortcut() { playPauseKeyboardShortcutIsEnabled = false }