* feat(build): inline chrome-extension-toolkit fix: tsconfig docs: add chrome-extension-toolkit README.md chore: update imports fix: stores fix: chrome-extension-toolkit ForegroundMessenger fix: calendarBackgroundHandler fix: format and lint fix: path alias fix: add jsdom env and fix imports Co-authored-by: Sriram Hariharan <sghsri@gmail.com> * build: vite storybook config crx toolkit line --------- Co-authored-by: Sriram Hariharan <sghsri@gmail.com> Co-authored-by: Derek <derex1987@gmail.com>
31 lines
952 B
TypeScript
31 lines
952 B
TypeScript
import { createLocalStore } from '@chrome-extension-toolkit';
|
|
|
|
/**
|
|
* A store that is used to store data that is only relevant during development
|
|
*/
|
|
interface IDevStore {
|
|
/** whether the user is a developer */
|
|
isDeveloper: boolean;
|
|
/** the tabId for the debug tab */
|
|
debugTabId?: number;
|
|
/** whether the debug tab is visible */
|
|
wasDebugTabVisible?: boolean;
|
|
/** whether we should enable extension reloading */
|
|
isExtensionReloading?: boolean;
|
|
/** whether we should enable tab reloading */
|
|
isTabReloading?: boolean;
|
|
/** The id of the tab that we want to reload (after the extension reloads itself ) */
|
|
reloadTabId?: number;
|
|
}
|
|
|
|
export const DevStore = createLocalStore<IDevStore>('DevStore', {
|
|
isDeveloper: false,
|
|
debugTabId: undefined,
|
|
isTabReloading: true,
|
|
wasDebugTabVisible: false,
|
|
isExtensionReloading: true,
|
|
reloadTabId: undefined,
|
|
});
|
|
|
|
// debugStore({ devStore: DevStore });
|