@storybook/addon-themes 7.5.0 → 7.5.2
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/dist/preview.d.ts +2 -2
- package/dist/preview.js +1 -1
- package/dist/preview.mjs +2 -2
- package/package.json +8 -8
- package/postinstall.js +14 -7
package/dist/preview.d.ts
CHANGED
package/dist/preview.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var preview_exports={};__export(preview_exports,{
|
|
1
|
+
"use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var preview_exports={};__export(preview_exports,{globals:()=>globals});module.exports=__toCommonJS(preview_exports);var PARAM_KEY="themes",ADDON_ID=`storybook/${PARAM_KEY}}`,GLOBAL_KEY="theme",THEME_SWITCHER_ID=`${ADDON_ID}/theme-switcher`;var THEMING_EVENTS={REGISTER_THEMES:`${ADDON_ID}/REGISTER_THEMES`};var globals={[GLOBAL_KEY]:""};0&&(module.exports={globals});
|
package/dist/preview.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/addon-themes",
|
|
3
|
-
"version": "7.5.
|
|
3
|
+
"version": "7.5.2",
|
|
4
4
|
"description": "Switch between multiple themes for you components in Storybook",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -74,13 +74,13 @@
|
|
|
74
74
|
"prep": "../../../scripts/prepare/bundle.ts"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@storybook/client-logger": "7.5.
|
|
78
|
-
"@storybook/components": "7.5.
|
|
79
|
-
"@storybook/core-events": "7.5.
|
|
80
|
-
"@storybook/manager-api": "7.5.
|
|
81
|
-
"@storybook/preview-api": "7.5.
|
|
82
|
-
"@storybook/theming": "7.5.
|
|
83
|
-
"@storybook/types": "7.5.
|
|
77
|
+
"@storybook/client-logger": "7.5.2",
|
|
78
|
+
"@storybook/components": "7.5.2",
|
|
79
|
+
"@storybook/core-events": "7.5.2",
|
|
80
|
+
"@storybook/manager-api": "7.5.2",
|
|
81
|
+
"@storybook/preview-api": "7.5.2",
|
|
82
|
+
"@storybook/theming": "7.5.2",
|
|
83
|
+
"@storybook/types": "7.5.2",
|
|
84
84
|
"ts-dedent": "^2.0.0"
|
|
85
85
|
},
|
|
86
86
|
"devDependencies": {
|
package/postinstall.js
CHANGED
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
const { spawn } = require('child_process');
|
|
2
2
|
|
|
3
3
|
const PACKAGE_MANAGER_TO_COMMAND = {
|
|
4
|
-
npm: 'npx',
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
npm: ['npx'],
|
|
5
|
+
pnpm: ['pnpm', 'dlx'],
|
|
6
|
+
yarn1: ['npx'],
|
|
7
|
+
yarn2: ['yarn', 'dlx'],
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
const command = PACKAGE_MANAGER_TO_COMMAND[options.packageManager];
|
|
10
|
+
const selectPackageManagerCommand = (packageManager) => PACKAGE_MANAGER_TO_COMMAND[packageManager];
|
|
12
11
|
|
|
13
|
-
|
|
12
|
+
const spawnPackageManagerScript = async (packageManager, args) => {
|
|
13
|
+
const [command, ...baseArgs] = selectPackageManagerCommand(packageManager);
|
|
14
|
+
|
|
15
|
+
await spawn(command, [...baseArgs, ...args], {
|
|
14
16
|
stdio: 'inherit',
|
|
15
17
|
cwd: process.cwd(),
|
|
18
|
+
shell: true,
|
|
16
19
|
});
|
|
17
20
|
};
|
|
21
|
+
|
|
22
|
+
module.exports = async function postinstall({ packageManager = 'npm' }) {
|
|
23
|
+
await spawnPackageManagerScript(packageManager, ['@storybook/auto-config', 'themes']);
|
|
24
|
+
};
|