@tramvai/storybook-addon 5.9.2 → 5.14.9
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/lib/decorators/actionsDecorator.js +1 -2
- package/lib/decorators/actionsDecorator.js.map +1 -1
- package/lib/decorators/reactQueryDecorator.js +1 -2
- package/lib/decorators/reactQueryDecorator.js.map +1 -1
- package/lib/decorators/routerDecorator.js +2 -3
- package/lib/decorators/routerDecorator.js.map +1 -1
- package/lib/decorators/tramvaiCoreDecorator.js +12 -7
- package/lib/decorators/tramvaiCoreDecorator.js.map +1 -1
- package/lib/preset.js +9 -4
- package/lib/preset.js.map +1 -1
- package/lib/webpack/addEnvVariables.js +9 -2
- package/lib/webpack/addEnvVariables.js.map +1 -1
- package/lib/webpack/addNodeModulesTranspile.js +1 -2
- package/lib/webpack/addNodeModulesTranspile.js.map +1 -1
- package/lib/webpack/removeRules.js +1 -2
- package/lib/webpack/removeRules.js.map +1 -1
- package/package.json +8 -8
|
@@ -8,8 +8,7 @@ const tokens_common_1 = require("@tramvai/tokens-common");
|
|
|
8
8
|
const ActionsDecorator = (Story, { parameters }) => {
|
|
9
9
|
const actionExecution = (0, react_2.useDi)(tokens_common_1.ACTION_EXECUTION_TOKEN);
|
|
10
10
|
(0, react_1.useEffect)(() => {
|
|
11
|
-
|
|
12
|
-
if ((_a = parameters.tramvai) === null || _a === void 0 ? void 0 : _a.actions) {
|
|
11
|
+
if (parameters.tramvai?.actions) {
|
|
13
12
|
parameters.tramvai.actions.forEach((action) => {
|
|
14
13
|
// @ts-expect-error
|
|
15
14
|
actionExecution.run(action, undefined, 'global');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionsDecorator.js","sourceRoot":"","sources":["../../src/decorators/actionsDecorator.tsx"],"names":[],"mappings":";;;;AAAA,iCAAkC;AAElC,0CAAuC;AACvC,0DAAgE;AASzD,MAAM,gBAAgB,GAAmD,CAC9E,KAAK,EACL,EAAE,UAAU,EAA8C,EAC1D,EAAE;IACF,MAAM,eAAe,GAAG,IAAA,aAAK,EAAC,sCAAsB,CAAC,CAAC;IAEtD,IAAA,iBAAS,EAAC,GAAG,EAAE
|
|
1
|
+
{"version":3,"file":"actionsDecorator.js","sourceRoot":"","sources":["../../src/decorators/actionsDecorator.tsx"],"names":[],"mappings":";;;;AAAA,iCAAkC;AAElC,0CAAuC;AACvC,0DAAgE;AASzD,MAAM,gBAAgB,GAAmD,CAC9E,KAAK,EACL,EAAE,UAAU,EAA8C,EAC1D,EAAE;IACF,MAAM,eAAe,GAAG,IAAA,aAAK,EAAC,sCAAsB,CAAC,CAAC;IAEtD,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE;YAC/B,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;gBAC5C,mBAAmB;gBACnB,eAAe,CAAC,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;YACnD,CAAC,CAAC,CAAC;SACJ;QACD,uDAAuD;IACzD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,uBAAC,KAAK,KAAG,CAAC;AACnB,CAAC,CAAC;AAjBW,QAAA,gBAAgB,oBAiB3B"}
|
|
@@ -4,9 +4,8 @@ exports.ReactQueryDecorator = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const react_query_1 = require("@tanstack/react-query");
|
|
6
6
|
const ReactQueryDecorator = (Story, { parameters }) => {
|
|
7
|
-
var _a, _b;
|
|
8
7
|
const queryClient = new react_query_1.QueryClient({
|
|
9
|
-
defaultOptions:
|
|
8
|
+
defaultOptions: parameters.tramvai?.reactQueryDefaultOptions ?? {
|
|
10
9
|
queries: {
|
|
11
10
|
refetchOnMount: false,
|
|
12
11
|
refetchOnReconnect: false,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reactQueryDecorator.js","sourceRoot":"","sources":["../../src/decorators/reactQueryDecorator.tsx"],"names":[],"mappings":";;;;AAAA,uDAAyE;AAUlE,MAAM,mBAAmB,GAAsD,CACpF,KAAK,EACL,EAAE,UAAU,EAAiD,EAC7D,EAAE
|
|
1
|
+
{"version":3,"file":"reactQueryDecorator.js","sourceRoot":"","sources":["../../src/decorators/reactQueryDecorator.tsx"],"names":[],"mappings":";;;;AAAA,uDAAyE;AAUlE,MAAM,mBAAmB,GAAsD,CACpF,KAAK,EACL,EAAE,UAAU,EAAiD,EAC7D,EAAE;IACF,MAAM,WAAW,GAAG,IAAI,yBAAW,CAAC;QAClC,cAAc,EAAE,UAAU,CAAC,OAAO,EAAE,wBAAwB,IAAI;YAC9D,OAAO,EAAE;gBACP,cAAc,EAAE,KAAK;gBACrB,kBAAkB,EAAE,KAAK;gBACzB,oBAAoB,EAAE,KAAK;aAC5B;SACF;KACF,CAAC,CAAC;IAEH,OAAO,CACL,uBAAC,iCAAmB,IAAC,MAAM,EAAE,WAAW,YACtC,uBAAC,KAAK,KAAG,GACW,CACvB,CAAC;AACJ,CAAC,CAAC;AAnBW,QAAA,mBAAmB,uBAmB9B"}
|
|
@@ -5,10 +5,9 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
5
5
|
const router_1 = require("@tinkoff/router");
|
|
6
6
|
const test_mocks_1 = require("@tramvai/test-mocks");
|
|
7
7
|
const RouterDecorator = (Story, { parameters }) => {
|
|
8
|
-
var _a, _b;
|
|
9
8
|
const routerMock = (0, test_mocks_1.createMockRouter)({
|
|
10
|
-
currentRoute:
|
|
11
|
-
currentUrl:
|
|
9
|
+
currentRoute: parameters.tramvai?.currentRoute,
|
|
10
|
+
currentUrl: parameters.tramvai?.currentUrl,
|
|
12
11
|
});
|
|
13
12
|
return ((0, jsx_runtime_1.jsx)(router_1.Provider, { router: routerMock, children: (0, jsx_runtime_1.jsx)(Story, {}) }));
|
|
14
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routerDecorator.js","sourceRoot":"","sources":["../../src/decorators/routerDecorator.tsx"],"names":[],"mappings":";;;;AAAA,4CAA6D;AAG7D,oDAAuD;AAUhD,MAAM,eAAe,GAAkD,CAC5E,KAAK,EACL,EAAE,UAAU,EAA6C,EACzD,EAAE
|
|
1
|
+
{"version":3,"file":"routerDecorator.js","sourceRoot":"","sources":["../../src/decorators/routerDecorator.tsx"],"names":[],"mappings":";;;;AAAA,4CAA6D;AAG7D,oDAAuD;AAUhD,MAAM,eAAe,GAAkD,CAC5E,KAAK,EACL,EAAE,UAAU,EAA6C,EACzD,EAAE;IACF,MAAM,UAAU,GAAG,IAAA,6BAAgB,EAAC;QAClC,YAAY,EAAE,UAAU,CAAC,OAAO,EAAE,YAAY;QAC9C,UAAU,EAAE,UAAU,CAAC,OAAO,EAAE,UAAU;KAC3C,CAAC,CAAC;IAEH,OAAO,CACL,uBAAC,iBAAc,IAAC,MAAM,EAAE,UAAU,YAChC,uBAAC,KAAK,KAAG,GACM,CAClB,CAAC;AACJ,CAAC,CAAC;AAdW,QAAA,eAAe,mBAc1B"}
|
|
@@ -6,25 +6,30 @@ const state_1 = require("@tramvai/state");
|
|
|
6
6
|
const react_1 = require("@tramvai/react");
|
|
7
7
|
const test_mocks_1 = require("@tramvai/test-mocks");
|
|
8
8
|
const TramvaiCoreDecorator = (Story, { parameters }) => {
|
|
9
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
10
9
|
const envFromFile = process.env.TRAMVAI_ENV_FROM_FILE;
|
|
11
10
|
const storeMock = (0, test_mocks_1.createMockStore)({
|
|
12
|
-
stores:
|
|
13
|
-
initialState:
|
|
11
|
+
stores: parameters.tramvai?.stores,
|
|
12
|
+
initialState: parameters.tramvai?.initialState,
|
|
14
13
|
});
|
|
15
14
|
const diMock = (0, test_mocks_1.createMockDi)({
|
|
16
15
|
modules: [
|
|
17
|
-
test_mocks_1.CommonTestModule.forRoot(
|
|
18
|
-
|
|
16
|
+
test_mocks_1.CommonTestModule.forRoot({
|
|
17
|
+
...parameters.tramvai?.options,
|
|
18
|
+
env: {
|
|
19
|
+
...envFromFile,
|
|
20
|
+
...parameters.tramvai?.options?.env,
|
|
21
|
+
},
|
|
22
|
+
}),
|
|
23
|
+
...(parameters.tramvai?.modules ?? []),
|
|
19
24
|
],
|
|
20
|
-
providers: [...(
|
|
25
|
+
providers: [...(parameters.tramvai?.providers ?? [])],
|
|
21
26
|
});
|
|
22
27
|
const contextMock = (0, test_mocks_1.createMockContext)({
|
|
23
28
|
di: diMock,
|
|
24
29
|
store: storeMock,
|
|
25
30
|
useTramvaiActionsConditionals: true,
|
|
26
31
|
});
|
|
27
|
-
return ((0, jsx_runtime_1.jsx)(state_1.Provider, { context: contextMock, serverState:
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)(state_1.Provider, { context: contextMock, serverState: parameters.tramvai?.initialState, children: (0, jsx_runtime_1.jsx)(react_1.DIContext.Provider, { value: diMock, children: (0, jsx_runtime_1.jsx)(Story, {}) }) }));
|
|
28
33
|
};
|
|
29
34
|
exports.TramvaiCoreDecorator = TramvaiCoreDecorator;
|
|
30
35
|
//# sourceMappingURL=tramvaiCoreDecorator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tramvaiCoreDecorator.js","sourceRoot":"","sources":["../../src/decorators/tramvaiCoreDecorator.tsx"],"names":[],"mappings":";;;;AAAA,0CAA0C;AAE1C,0CAA2C;AAI3C,oDAK6B;AAatB,MAAM,oBAAoB,GAAuD,CACtF,KAAK,EACL,EAAE,UAAU,EAAE,EACd,EAAE
|
|
1
|
+
{"version":3,"file":"tramvaiCoreDecorator.js","sourceRoot":"","sources":["../../src/decorators/tramvaiCoreDecorator.tsx"],"names":[],"mappings":";;;;AAAA,0CAA0C;AAE1C,0CAA2C;AAI3C,oDAK6B;AAatB,MAAM,oBAAoB,GAAuD,CACtF,KAAK,EACL,EAAE,UAAU,EAAE,EACd,EAAE;IACF,MAAM,WAAW,GAA2B,OAAO,CAAC,GAAG,CAAC,qBAA4B,CAAC;IAErF,MAAM,SAAS,GAAG,IAAA,4BAAe,EAAC;QAChC,MAAM,EAAE,UAAU,CAAC,OAAO,EAAE,MAAM;QAClC,YAAY,EAAE,UAAU,CAAC,OAAO,EAAE,YAAY;KAC/C,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,IAAA,yBAAY,EAAC;QAC1B,OAAO,EAAE;YACP,6BAAgB,CAAC,OAAO,CAAC;gBACvB,GAAG,UAAU,CAAC,OAAO,EAAE,OAAO;gBAC9B,GAAG,EAAE;oBACH,GAAG,WAAW;oBACd,GAAG,UAAU,CAAC,OAAO,EAAE,OAAO,EAAE,GAAG;iBACpC;aACF,CAAC;YACF,GAAG,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,IAAI,EAAE,CAAC;SACvC;QACD,SAAS,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,OAAO,EAAE,SAAS,IAAI,EAAE,CAAC,CAAC;KACtD,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,IAAA,8BAAiB,EAAC;QACpC,EAAE,EAAE,MAAM;QACV,KAAK,EAAE,SAAS;QAChB,6BAA6B,EAAE,IAAI;KACpC,CAAC,CAAC;IAEH,OAAO,CACL,uBAAC,gBAAQ,IAAC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,UAAU,CAAC,OAAO,EAAE,YAAY,YAC3E,uBAAC,iBAAS,CAAC,QAAQ,IAAC,KAAK,EAAE,MAAM,YAC/B,uBAAC,KAAK,KAAG,GACU,GACZ,CACZ,CAAC;AACJ,CAAC,CAAC;AApCW,QAAA,oBAAoB,wBAoC/B"}
|
package/lib/preset.js
CHANGED
|
@@ -19,7 +19,7 @@ const babel = (cfg) => {
|
|
|
19
19
|
return (0, babelConfigFactory_1.babelConfigFactory)();
|
|
20
20
|
};
|
|
21
21
|
exports.babel = babel;
|
|
22
|
-
const webpackFinal = (baseConfig, options) =>
|
|
22
|
+
const webpackFinal = async (baseConfig, options) => {
|
|
23
23
|
const configManager = (0, buildConfigManager_1.buildConfigManager)(options);
|
|
24
24
|
const webpackConfig = new webpack_chain_1.default();
|
|
25
25
|
(0, addEnvVariables_1.addEnvVariables)({ webpackConfig, configManager, options });
|
|
@@ -27,12 +27,17 @@ const webpackFinal = (baseConfig, options) => tslib_1.__awaiter(void 0, void 0,
|
|
|
27
27
|
(0, addStylesRules_1.addStylesRules)({ baseConfig, webpackConfig, configManager });
|
|
28
28
|
(0, addNodeModulesTranspile_1.addNodeModulesTranspile)({ baseConfig });
|
|
29
29
|
const finalConfig = (0, webpack_merge_1.merge)(baseConfig, webpackConfig.toConfig());
|
|
30
|
-
return
|
|
30
|
+
return {
|
|
31
|
+
...finalConfig,
|
|
32
|
+
resolve: {
|
|
33
|
+
...finalConfig.resolve,
|
|
31
34
|
// exclude `import` condition name, because of `@tanstack/react-query` dual package hazard -
|
|
32
35
|
// `@tramvai/storybook-addon` build in CommonJS version, and import CJS module from `@tanstack/react-query`,
|
|
33
36
|
// but `@tramvai/react-query` build in ES modules, and import `.mjs` module from `@tanstack/react-query`,
|
|
34
37
|
// as a result in bundle we have two different React context and get the error "No QueryClient set, use QueryClientProvider to set one"
|
|
35
|
-
conditionNames: ['browser', 'require', 'node', 'default']
|
|
36
|
-
}
|
|
38
|
+
conditionNames: ['browser', 'require', 'node', 'default'],
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
};
|
|
37
42
|
exports.webpackFinal = webpackFinal;
|
|
38
43
|
//# sourceMappingURL=preset.js.map
|
package/lib/preset.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"preset.js","sourceRoot":"","sources":["../src/preset.ts"],"names":[],"mappings":";AAAA,6DAA6D;;;;AAG7D,0EAAmC;AACnC,iDAAsC;AAEtC,qEAAkE;AAClE,mEAAgE;AAChE,+DAA4D;AAC5D,2DAAwD;AACxD,6DAA0D;AAC1D,+EA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EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC,CAAC;IAC7D,IAAA,iDAAuB,EAAC,EAAE,UAAU,EAAE,CAAC,CAAC;IAExC,MAAM,WAAW,GAAG,IAAA,qBAAK,EAAC,UAAU,EAAE,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC;IAEhE,OAAO;QACL,GAAG,WAAW;QACd,OAAO,EAAE;YACP,GAAG,WAAW,CAAC,OAAO;YACtB,4FAA4F;YAC5F,4GAA4G;YAC5G,yGAAyG;YACzG,uIAAuI;YACvI,cAAc,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,CAAC;SAC1D;KACF,CAAC;AACJ,CAAC,CAAC;AAzBW,QAAA,YAAY,gBAyBvB"}
|
|
@@ -16,9 +16,16 @@ function addEnvVariables({ webpackConfig, configManager, options, }) {
|
|
|
16
16
|
console.error('env.development.js parsing failed, reason:', e);
|
|
17
17
|
}
|
|
18
18
|
webpackConfig.plugin('define').use(webpack_1.default.DefinePlugin, [
|
|
19
|
-
|
|
19
|
+
{
|
|
20
|
+
...configManager.define.shared,
|
|
21
|
+
...configManager.define[configManager.env],
|
|
22
|
+
'process.env.NODE_ENV': JSON.stringify(configManager.env),
|
|
23
|
+
'process.env.APP_ID': JSON.stringify(configManager.name),
|
|
24
|
+
'process.env.BROWSER': true,
|
|
25
|
+
'process.env.SERVER': false,
|
|
20
26
|
// pass `env.development.js` content to client code for env manager
|
|
21
|
-
'process.env.TRAMVAI_ENV_FROM_FILE': JSON.stringify(envFromFile)
|
|
27
|
+
'process.env.TRAMVAI_ENV_FROM_FILE': JSON.stringify(envFromFile),
|
|
28
|
+
},
|
|
22
29
|
]);
|
|
23
30
|
(0, cli_1.configToEnv)(configManager)(webpackConfig);
|
|
24
31
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addEnvVariables.js","sourceRoot":"","sources":["../../src/webpack/addEnvVariables.ts"],"names":[],"mappings":";;;;AA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sBAAsB,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,CAAC;YACzD,oBAAoB,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC;YACxD,qBAAqB,EAAE,IAAI;YAC3B,oBAAoB,EAAE,KAAK;YAC3B,mEAAmE;YACnE,mCAAmC,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;SACjE;KACF,CAAC,CAAC;IAEH,IAAA,iBAAW,EAAC,aAAa,CAAC,CAAC,aAAa,CAAC,CAAC;AAC5C,CAAC;AAhCD,0CAgCC"}
|
|
@@ -4,8 +4,7 @@ exports.addNodeModulesTranspile = void 0;
|
|
|
4
4
|
const is_modern_lib_1 = require("@tinkoff/is-modern-lib");
|
|
5
5
|
const babelConfigFactory_1 = require("../babel/babelConfigFactory");
|
|
6
6
|
function addNodeModulesTranspile({ baseConfig }) {
|
|
7
|
-
|
|
8
|
-
(_b = (_a = baseConfig.module) === null || _a === void 0 ? void 0 : _a.rules) === null || _b === void 0 ? void 0 : _b.push({
|
|
7
|
+
baseConfig.module?.rules?.push({
|
|
9
8
|
test: /\.[cm]?js[x]?$/,
|
|
10
9
|
include: is_modern_lib_1.modernLibsFilter,
|
|
11
10
|
// already processed in storybook loaders
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addNodeModulesTranspile.js","sourceRoot":"","sources":["../../src/webpack/addNodeModulesTranspile.ts"],"names":[],"mappings":";;;AACA,0DAA0D;AAC1D,oEAAiE;AAEjE,SAAgB,uBAAuB,CAAC,EAAE,UAAU,EAAiC
|
|
1
|
+
{"version":3,"file":"addNodeModulesTranspile.js","sourceRoot":"","sources":["../../src/webpack/addNodeModulesTranspile.ts"],"names":[],"mappings":";;;AACA,0DAA0D;AAC1D,oEAAiE;AAEjE,SAAgB,uBAAuB,CAAC,EAAE,UAAU,EAAiC;IACnF,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,CAAC;QAC7B,IAAI,EAAE,gBAAgB;QACtB,OAAO,EAAE,gCAAgB;QACzB,yCAAyC;QACzC,OAAO,EAAE,yBAAyB;QAClC,MAAM,EAAE,cAAc;QACtB,OAAO,EAAE,IAAA,uCAAkB,EAAC,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC;KACnD,CAAC,CAAC;AACL,CAAC;AATD,0DASC"}
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.removeRules = void 0;
|
|
4
4
|
function removeRules({ baseConfig, extensions, }) {
|
|
5
|
-
var _a, _b;
|
|
6
5
|
// eslint-disable-next-line no-param-reassign
|
|
7
|
-
baseConfig.module.rules =
|
|
6
|
+
baseConfig.module.rules = baseConfig.module?.rules?.filter((rule) => typeof rule === 'object' && !String(rule?.test?.toString()).match(extensions));
|
|
8
7
|
}
|
|
9
8
|
exports.removeRules = removeRules;
|
|
10
9
|
//# sourceMappingURL=removeRules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"removeRules.js","sourceRoot":"","sources":["../../src/webpack/removeRules.ts"],"names":[],"mappings":";;;AAEA,SAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,UAAU,GAIX
|
|
1
|
+
{"version":3,"file":"removeRules.js","sourceRoot":"","sources":["../../src/webpack/removeRules.ts"],"names":[],"mappings":";;;AAEA,SAAgB,WAAW,CAAC,EAC1B,UAAU,EACV,UAAU,GAIX;IACC,6CAA6C;IAC7C,UAAU,CAAC,MAAO,CAAC,KAAK,GAAG,UAAU,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CACzD,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CACxF,CAAC;AACJ,CAAC;AAXD,kCAWC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tramvai/storybook-addon",
|
|
3
|
-
"version": "5.9
|
|
3
|
+
"version": "5.14.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/preset.js",
|
|
6
6
|
"typings": "lib/preset.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"registry": "https://registry.npmjs.org/"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@tramvai/test-mocks": "5.9
|
|
23
|
+
"@tramvai/test-mocks": "5.14.9",
|
|
24
24
|
"@tinkoff/is-modern-lib": "5.0.2",
|
|
25
25
|
"webpack-chain": "^6.5.1",
|
|
26
26
|
"webpack-merge": "^5.8.0",
|
|
@@ -32,13 +32,13 @@
|
|
|
32
32
|
"webpack": "5.87.0"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@tramvai/cli": "5.9
|
|
36
|
-
"@tramvai/core": "5.9
|
|
37
|
-
"@tramvai/state": "5.9
|
|
38
|
-
"@tramvai/react": "5.9
|
|
39
|
-
"@tramvai/tokens-common": "5.9
|
|
35
|
+
"@tramvai/cli": "5.14.9",
|
|
36
|
+
"@tramvai/core": "5.14.9",
|
|
37
|
+
"@tramvai/state": "5.14.9",
|
|
38
|
+
"@tramvai/react": "5.14.9",
|
|
39
|
+
"@tramvai/tokens-common": "5.14.9",
|
|
40
40
|
"@tinkoff/dippy": "0.11.3",
|
|
41
|
-
"@tinkoff/router": "0.5.
|
|
41
|
+
"@tinkoff/router": "0.5.46",
|
|
42
42
|
"@tinkoff/url": "0.11.2",
|
|
43
43
|
"react": ">=16.14.0"
|
|
44
44
|
}
|