pxt-core 13.1.21 → 13.1.22

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.
@@ -10,6 +10,7 @@ export interface SimulatorThemePickerModalProps {
10
10
  onUseAccountTheme?: () => void | Promise<void>;
11
11
  onThemeChanged?: (preference: pxt.auth.SimulatorThemePreference) => void;
12
12
  onSave: (preference: pxt.auth.SimulatorThemePreference) => void | Promise<void>;
13
+ onReset?: () => Promise<void>;
13
14
  onClose: () => void;
14
15
  }
15
16
  export declare const SimulatorThemePickerModal: (props: SimulatorThemePickerModalProps) => JSX.Element;
@@ -9,6 +9,7 @@ export interface ThemePickerModalProps {
9
9
  selectedThemeId?: string;
10
10
  onThemeChanged: (theme: pxt.ColorThemeInfo) => void;
11
11
  onSave: (theme: pxt.ColorThemeInfo) => void;
12
+ onReset?: () => Promise<void>;
12
13
  onSimulatorThemeClicked?: () => void;
13
14
  onClose(): void;
14
15
  }
@@ -0,0 +1,2 @@
1
+ /** Reset this editor's preferences only. */
2
+ export declare function resetEditorThemesAsync(target: Pick<pxt.TargetBundle, "appTheme" | "colorThemeMap" | "simulator">, saveColorTheme: (theme: pxt.ColorThemeInfo) => Promise<void>, clearSimulatorTheme: () => Promise<void>): Promise<pxt.auth.SimulatorThemePreference | undefined>;
@@ -0,0 +1,6 @@
1
+ import { ModalAction } from "../controls/Modal";
2
+ /** Shared confirmation for editor-wide pickers, not project-specific theme settings. */
3
+ export declare function useThemeReset(pickerId: string, onReset: (() => Promise<void>) | undefined): {
4
+ resetAction: ModalAction;
5
+ confirmation: JSX.Element;
6
+ };