@vueless/storybook-dark-mode 9.0.9 → 10.0.1-beta.0
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.
- package/README.md +3 -2
- package/dist/index.d.ts +9 -0
- package/dist/index.js +86 -0
- package/dist/manager.js +199 -0
- package/dist/preset.js +6 -0
- package/package.json +61 -41
- package/preset.ts +2 -0
- package/src/Tool.tsx +23 -24
- package/src/index.tsx +2 -0
- package/src/preset/manager.tsx +1 -2
- package/src/preset.ts +3 -0
- package/dist/cjs/Tool.js +0 -251
- package/dist/cjs/constants.js +0 -8
- package/dist/cjs/index.js +0 -48
- package/dist/cjs/preset/manager.js +0 -34
- package/dist/esm/Tool.js +0 -242
- package/dist/esm/constants.js +0 -2
- package/dist/esm/index.js +0 -30
- package/dist/esm/preset/manager.js +0 -31
- package/dist/ts/Tool.d.ts +0 -35
- package/dist/ts/constants.d.ts +0 -2
- package/dist/ts/index.d.ts +0 -5
- package/dist/ts/preset/manager.d.ts +0 -1
- package/preset.js +0 -7
package/dist/ts/Tool.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
import { ThemeVars } from 'storybook/theming';
|
|
3
|
-
import { API } from 'storybook/manager-api';
|
|
4
|
-
declare const modes: readonly ["light", "dark"];
|
|
5
|
-
type Mode = typeof modes[number];
|
|
6
|
-
interface DarkModeStore {
|
|
7
|
-
/** The class target in the preview iframe */
|
|
8
|
-
classTarget: string;
|
|
9
|
-
/** The current mode the storybook is set to */
|
|
10
|
-
current: Mode;
|
|
11
|
-
/** The dark theme for storybook */
|
|
12
|
-
dark: ThemeVars;
|
|
13
|
-
/** The dark class name for the preview iframe */
|
|
14
|
-
darkClass: string | string[];
|
|
15
|
-
/** The light theme for storybook */
|
|
16
|
-
light: ThemeVars;
|
|
17
|
-
/** The light class name for the preview iframe */
|
|
18
|
-
lightClass: string | string[];
|
|
19
|
-
/** Apply mode to iframe */
|
|
20
|
-
stylePreview: boolean;
|
|
21
|
-
/** Persist if the user has set the theme */
|
|
22
|
-
userHasExplicitlySetTheTheme: boolean;
|
|
23
|
-
}
|
|
24
|
-
export declare const prefersDark: MediaQueryList;
|
|
25
|
-
/** Persist the dark mode settings in localStorage */
|
|
26
|
-
export declare const updateStore: (newStore: DarkModeStore) => void;
|
|
27
|
-
/** Update changed dark mode settings and persist to localStorage */
|
|
28
|
-
export declare const store: (userTheme?: Partial<DarkModeStore>) => DarkModeStore;
|
|
29
|
-
interface DarkModeProps {
|
|
30
|
-
/** The storybook API */
|
|
31
|
-
api: API;
|
|
32
|
-
}
|
|
33
|
-
/** A toolbar icon to toggle between dark and light themes in storybook */
|
|
34
|
-
export declare function DarkMode({ api }: DarkModeProps): React.JSX.Element;
|
|
35
|
-
export default DarkMode;
|
package/dist/ts/constants.d.ts
DELETED
package/dist/ts/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|