diff --git a/code/addons/backgrounds/src/typings.d.ts b/code/addons/backgrounds/src/typings.d.ts new file mode 100644 index 000000000000..bfd9e55123ff --- /dev/null +++ b/code/addons/backgrounds/src/typings.d.ts @@ -0,0 +1 @@ +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/addons/docs/src/typings.d.ts b/code/addons/docs/src/typings.d.ts index 5528b7d9f1c6..18881b5e33b7 100644 --- a/code/addons/docs/src/typings.d.ts +++ b/code/addons/docs/src/typings.d.ts @@ -8,3 +8,5 @@ declare module 'vue/dist/vue'; declare module 'sveltedoc-parser' { export function parse(options: any): Promise; } + +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/addons/storyshots-core/src/typings.d.ts b/code/addons/storyshots-core/src/typings.d.ts index 8a3b5786945d..d03407487507 100644 --- a/code/addons/storyshots-core/src/typings.d.ts +++ b/code/addons/storyshots-core/src/typings.d.ts @@ -9,6 +9,14 @@ declare module '@storybook/babel-plugin-require-context-hook/register'; declare var STORYBOOK_ENV: any; declare var STORIES: any; -declare var FEATURES: any; + +declare var FEATURES: + | { + storyStoreV7?: boolean; + breakingChangesV7?: boolean; + argTypeTargetsV7?: boolean; + } + | undefined; + declare var __STORYBOOK_STORY_STORE__: any; declare var __requireContext: any; diff --git a/code/addons/toolbars/src/typings.d.ts b/code/addons/toolbars/src/typings.d.ts new file mode 100644 index 000000000000..bfd9e55123ff --- /dev/null +++ b/code/addons/toolbars/src/typings.d.ts @@ -0,0 +1 @@ +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/frameworks/angular/src/typings.d.ts b/code/frameworks/angular/src/typings.d.ts index 9af3b65be338..204e3428d601 100644 --- a/code/frameworks/angular/src/typings.d.ts +++ b/code/frameworks/angular/src/typings.d.ts @@ -11,9 +11,18 @@ declare var __STORYBOOK_PREVIEW__: any; declare var __STORYBOOK_STORY_STORE__: any; declare var CHANNEL_OPTIONS: any; declare var DOCS_OPTIONS: any; -declare var FEATURES: any; + +declare var FEATURES: + | { + storyStoreV7?: boolean; + interactionsDebugger?: boolean; + breakingChangesV7?: boolean; + argTypeTargetsV7?: boolean; + } + | undefined; + declare var IS_STORYBOOK: any; -declare var LOGLEVEL: any; +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; declare var STORIES: any; declare var STORYBOOK_ENV: 'angular'; declare var STORYBOOK_HOOKS_CONTEXT: any; diff --git a/code/lib/cli/src/typings.d.ts b/code/lib/cli/src/typings.d.ts index 409993b0710b..a11ae0c2dac5 100644 --- a/code/lib/cli/src/typings.d.ts +++ b/code/lib/cli/src/typings.d.ts @@ -1 +1,2 @@ declare module 'envinfo'; +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/lib/client-api/src/typings.d.ts b/code/lib/client-api/src/typings.d.ts new file mode 100644 index 000000000000..bfd9e55123ff --- /dev/null +++ b/code/lib/client-api/src/typings.d.ts @@ -0,0 +1 @@ +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/lib/core-client/src/typings.d.ts b/code/lib/core-client/src/typings.d.ts new file mode 100644 index 000000000000..bfd9e55123ff --- /dev/null +++ b/code/lib/core-client/src/typings.d.ts @@ -0,0 +1 @@ +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/lib/core-server/src/typings.d.ts b/code/lib/core-server/src/typings.d.ts index 5ba2b96e7559..b51124a22ab7 100644 --- a/code/lib/core-server/src/typings.d.ts +++ b/code/lib/core-server/src/typings.d.ts @@ -9,4 +9,11 @@ declare module '@storybook/manager'; declare module '@discoveryjs/json-ext'; declare module 'watchpack'; -declare var FEATURES: any; +declare var FEATURES: + | { + storyStoreV7?: boolean; + interactionsDebugger?: boolean; + breakingChangesV7?: boolean; + argTypeTargetsV7?: boolean; + } + | undefined; diff --git a/code/lib/instrumenter/src/typings.d.ts b/code/lib/instrumenter/src/typings.d.ts index 2f4fd5fee113..146c167c406a 100644 --- a/code/lib/instrumenter/src/typings.d.ts +++ b/code/lib/instrumenter/src/typings.d.ts @@ -1,5 +1,15 @@ /* eslint-disable no-underscore-dangle, @typescript-eslint/naming-convention */ -declare var FEATURES: any; + +declare var FEATURES: + | { + storyStoreV7?: boolean; + interactionsDebugger?: boolean; + breakingChangesV7?: boolean; + argTypeTargetsV7?: boolean; + } + | undefined; + declare var __STORYBOOK_PREVIEW__: any; declare var __STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER_STATE__: any; declare var __STORYBOOK_ADDON_INTERACTIONS_INSTRUMENTER__: any; +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/lib/manager-api-shim/src/typings.d.ts b/code/lib/manager-api-shim/src/typings.d.ts new file mode 100644 index 000000000000..bfd9e55123ff --- /dev/null +++ b/code/lib/manager-api-shim/src/typings.d.ts @@ -0,0 +1 @@ +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/lib/manager-api/src/typings.d.ts b/code/lib/manager-api/src/typings.d.ts index 6c531d799db0..917dce0019f3 100644 --- a/code/lib/manager-api/src/typings.d.ts +++ b/code/lib/manager-api/src/typings.d.ts @@ -1,6 +1,16 @@ /* eslint-disable no-underscore-dangle, @typescript-eslint/naming-convention */ declare var RELEASE_NOTES_DATA: any; declare var __STORYBOOK_ADDONS_MANAGER: any; -declare var FEATURES: { storyStoreV7?: boolean } | undefined; + +declare var FEATURES: + | { + storyStoreV7?: boolean; + interactionsDebugger?: boolean; + breakingChangesV7?: boolean; + argTypeTargetsV7?: boolean; + } + | undefined; + declare var REFS: any; declare var VERSIONCHECK: any; +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/lib/preview-api/src/typings.d.ts b/code/lib/preview-api/src/typings.d.ts index 2c963acb62c8..195827936c63 100644 --- a/code/lib/preview-api/src/typings.d.ts +++ b/code/lib/preview-api/src/typings.d.ts @@ -7,27 +7,30 @@ declare module 'better-opn'; declare module 'open'; declare module '@aw-web-design/x-default-browser'; -type Features = { - storyStoreV7?: boolean; - breakingChangesV7?: boolean; - argTypeTargetsV7?: boolean; -}; +declare var FEATURES: + | { + storyStoreV7?: boolean; + interactionsDebugger?: boolean; + breakingChangesV7?: boolean; + argTypeTargetsV7?: boolean; + } + | undefined; -var FEATURES: Features | undefined; -var STORIES: any; -var DOCS_OPTIONS: any; +declare var STORIES: any; +declare var DOCS_OPTIONS: any; // To enable user code to detect if it is running in Storybook -var IS_STORYBOOK: boolean; +declare var IS_STORYBOOK: boolean; // ClientApi (and StoreStore) are really singletons. However they are not created until the // relevant framework instantiates them via `start.js`. The good news is this happens right away. -var __STORYBOOK_ADDONS_CHANNEL__: any; -var __STORYBOOK_ADDONS_PREVIEW: any; -var __STORYBOOK_CLIENT_API__: import('./modules/client-api/ClientApi').ClientApi; -var __STORYBOOK_PREVIEW__: import('./modules/preview-web/PreviewWeb').PreviewWeb; -var __STORYBOOK_STORY_STORE__: any; -var STORYBOOK_HOOKS_CONTEXT: any; +declare var __STORYBOOK_ADDONS_CHANNEL__: any; +declare var __STORYBOOK_ADDONS_PREVIEW: any; +declare var __STORYBOOK_CLIENT_API__: import('./modules/client-api/ClientApi').ClientApi; +declare var __STORYBOOK_PREVIEW__: import('./modules/preview-web/PreviewWeb').PreviewWeb; +declare var __STORYBOOK_STORY_STORE__: any; +declare var STORYBOOK_HOOKS_CONTEXT: any; +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; declare module 'ansi-to-html'; declare class AnsiToHtml { diff --git a/code/lib/preview-web/src/typings.d.ts b/code/lib/preview-web/src/typings.d.ts new file mode 100644 index 000000000000..bfd9e55123ff --- /dev/null +++ b/code/lib/preview-web/src/typings.d.ts @@ -0,0 +1 @@ +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/lib/preview/src/typings.d.ts b/code/lib/preview/src/typings.d.ts new file mode 100644 index 000000000000..bfd9e55123ff --- /dev/null +++ b/code/lib/preview/src/typings.d.ts @@ -0,0 +1 @@ +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/lib/store/src/typings.d.ts b/code/lib/store/src/typings.d.ts new file mode 100644 index 000000000000..bfd9e55123ff --- /dev/null +++ b/code/lib/store/src/typings.d.ts @@ -0,0 +1 @@ +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/renderers/react/src/typings.d.ts b/code/renderers/react/src/typings.d.ts index 440b5a4e24a4..380256bcd4e7 100644 --- a/code/renderers/react/src/typings.d.ts +++ b/code/renderers/react/src/typings.d.ts @@ -45,3 +45,4 @@ declare module 'react-dom/client' { declare var STORYBOOK_ENV: 'react'; declare var FRAMEWORK_OPTIONS: any; +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/renderers/svelte/src/typings.d.ts b/code/renderers/svelte/src/typings.d.ts index 09aff65be53a..109dcd62da0e 100644 --- a/code/renderers/svelte/src/typings.d.ts +++ b/code/renderers/svelte/src/typings.d.ts @@ -1 +1,2 @@ declare var STORYBOOK_ENV: 'svelte'; +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/renderers/vue/src/typings.d.ts b/code/renderers/vue/src/typings.d.ts index 437680c4e974..daefb35a5f65 100644 --- a/code/renderers/vue/src/typings.d.ts +++ b/code/renderers/vue/src/typings.d.ts @@ -1 +1,2 @@ declare var STORYBOOK_ENV: 'vue'; +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/renderers/web-components/src/typings.d.ts b/code/renderers/web-components/src/typings.d.ts index 5563d6cc27a6..1dafbd1d10c9 100644 --- a/code/renderers/web-components/src/typings.d.ts +++ b/code/renderers/web-components/src/typings.d.ts @@ -2,3 +2,4 @@ declare var STORYBOOK_ENV: 'web-components'; declare var __STORYBOOK_CUSTOM_ELEMENTS_MANIFEST__: any; declare var __STORYBOOK_CUSTOM_ELEMENTS__: any; +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/ui/blocks/src/typings.d.ts b/code/ui/blocks/src/typings.d.ts index da56fcf64777..b773bc6bcc58 100644 --- a/code/ui/blocks/src/typings.d.ts +++ b/code/ui/blocks/src/typings.d.ts @@ -5,3 +5,4 @@ declare module '*.md'; declare var __DOCS_CONTEXT__: any; declare var PREVIEW_URL: any; +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined; diff --git a/code/ui/manager/src/settings/typings.d.ts b/code/ui/manager/src/settings/typings.d.ts index 176b5f3d014a..8e01308b8bc8 100644 --- a/code/ui/manager/src/settings/typings.d.ts +++ b/code/ui/manager/src/settings/typings.d.ts @@ -2,7 +2,15 @@ /* eslint-disable @typescript-eslint/naming-convention */ declare module '@storybook/components/src/treeview/utils'; -declare var FEATURES: any; +declare var FEATURES: + | { + storyStoreV7?: boolean; + interactionsDebugger?: boolean; + breakingChangesV7?: boolean; + argTypeTargetsV7?: boolean; + } + | undefined; + declare var SERVER_CHANNEL_URL: any; declare var __REACT__: any; diff --git a/code/ui/manager/src/typings.d.ts b/code/ui/manager/src/typings.d.ts index 6919b2826ee3..203d098a14bf 100644 --- a/code/ui/manager/src/typings.d.ts +++ b/code/ui/manager/src/typings.d.ts @@ -1,5 +1,22 @@ +/* eslint-disable no-underscore-dangle, @typescript-eslint/naming-convention */ declare module 'chromatic/isChromatic'; declare var DOCS_OPTIONS: any; declare var CONFIG_TYPE: any; declare var PREVIEW_URL: any; + +declare var __STORYBOOK_ADDONS_MANAGER: any; +declare var RELEASE_NOTES_DATA: any; + +declare var FEATURES: + | { + storyStoreV7?: boolean; + interactionsDebugger?: boolean; + breakingChangesV7?: boolean; + argTypeTargetsV7?: boolean; + } + | undefined; + +declare var REFS: any; +declare var VERSIONCHECK: any; +declare var LOGLEVEL: 'trace' | 'debug' | 'info' | 'warn' | 'error' | 'silent' | undefined;