@tramvai/storybook-addon 2.56.1 → 2.56.5

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.
@@ -1,23 +1,10 @@
1
1
  export declare const babelConfigFactory: ({ typescript }?: {
2
- typescript?: boolean;
2
+ typescript?: boolean | undefined;
3
3
  }) => {
4
4
  cwd: string;
5
5
  compact: boolean;
6
6
  sourceType: "unambiguous";
7
- presets: (string | (string | {
8
- modules: false | "commonjs" | "es6";
9
- useBuiltIns: string;
10
- corejs: string;
11
- loose: boolean;
12
- targets: string[];
13
- browserslistEnv: import("@tramvai/cli/lib/typings/target").Target;
14
- bugfixes: boolean;
15
- exclude: string[];
16
- })[] | (string | {
17
- runtime: string;
18
- useSpread: boolean;
19
- development: boolean;
20
- })[])[];
7
+ presets: import("@babel/core").PluginItem[];
21
8
  plugins: (string | (string | {
22
9
  useESModules: boolean;
23
10
  })[] | (string | {
@@ -39,20 +26,7 @@ export declare const babelConfigFactory: ({ typescript }?: {
39
26
  cwd?: undefined;
40
27
  compact?: undefined;
41
28
  sourceType: "unambiguous";
42
- presets: (string | (string | {
43
- modules: false | "commonjs" | "es6";
44
- useBuiltIns: string;
45
- corejs: string;
46
- loose: boolean;
47
- targets: string[];
48
- browserslistEnv: import("@tramvai/cli/lib/typings/target").Target;
49
- bugfixes: boolean;
50
- exclude: string[];
51
- })[] | (string | {
52
- runtime: string;
53
- useSpread: boolean;
54
- development: boolean;
55
- })[])[];
29
+ presets: import("@babel/core").PluginItem[];
56
30
  plugins: (string | (string | {
57
31
  useESModules: boolean;
58
32
  })[] | (string | {
@@ -1,9 +1,8 @@
1
1
  import type { Action } from '@tramvai/core';
2
+ import type { StorybookDecorator } from '../types';
2
3
  export interface ActionsDecoratorParameters {
3
4
  tramvai?: {
4
5
  actions?: Action[];
5
6
  };
6
7
  }
7
- export declare const ActionsDecorator: (Story: any, { parameters }: {
8
- parameters: ActionsDecoratorParameters;
9
- }) => JSX.Element;
8
+ export declare const ActionsDecorator: StorybookDecorator<ActionsDecoratorParameters>;
@@ -1 +1 @@
1
- {"version":3,"file":"actionsDecorator.js","sourceRoot":"","sources":["../../src/decorators/actionsDecorator.tsx"],"names":[],"mappings":";;;;AAAA,iCAAkC;AAElC,0CAAuC;AACvC,0DAAgE;AAQzD,MAAM,gBAAgB,GAAG,CAC9B,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,MAAA,UAAU,CAAC,OAAO,0CAAE,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"}
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,MAAA,UAAU,CAAC,OAAO,0CAAE,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"}
@@ -1,9 +1,8 @@
1
1
  import type { DefaultOptions } from '@tanstack/react-query';
2
+ import type { StorybookDecorator } from '../types';
2
3
  export interface ReactQueryDecoratorParameters {
3
4
  tramvai?: {
4
5
  reactQueryDefaultOptions?: DefaultOptions;
5
6
  };
6
7
  }
7
- export declare const ReactQueryDecorator: (Story: any, { parameters }: {
8
- parameters: ReactQueryDecoratorParameters;
9
- }) => JSX.Element;
8
+ export declare const ReactQueryDecorator: StorybookDecorator<ReactQueryDecoratorParameters>;
@@ -1 +1 @@
1
- {"version":3,"file":"reactQueryDecorator.js","sourceRoot":"","sources":["../../src/decorators/reactQueryDecorator.tsx"],"names":[],"mappings":";;;;AAAA,uDAAyE;AASlE,MAAM,mBAAmB,GAAG,CACjC,KAAK,EACL,EAAE,UAAU,EAAiD,EAC7D,EAAE;;IACF,MAAM,WAAW,GAAG,IAAI,yBAAW,CAAC;QAClC,cAAc,EAAE,MAAA,MAAA,UAAU,CAAC,OAAO,0CAAE,wBAAwB,mCAAI;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,kBAAC,MAAM,EAAE,WAAW,gBACtC,uBAAC,KAAK,KAAG,IACW,CACvB,CAAC;AACJ,CAAC,CAAC;AAnBW,QAAA,mBAAmB,uBAmB9B"}
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,MAAA,MAAA,UAAU,CAAC,OAAO,0CAAE,wBAAwB,mCAAI;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,kBAAC,MAAM,EAAE,WAAW,gBACtC,uBAAC,KAAK,KAAG,IACW,CACvB,CAAC;AACJ,CAAC,CAAC;AAnBW,QAAA,mBAAmB,uBAmB9B"}
@@ -1,11 +1,10 @@
1
1
  import type { Route } from '@tinkoff/router';
2
2
  import type { Url } from '@tinkoff/url';
3
+ import type { StorybookDecorator } from '../types';
3
4
  export interface RouterDecoratorParameters {
4
5
  tramvai?: {
5
6
  currentRoute?: Route;
6
7
  currentUrl?: Url;
7
8
  };
8
9
  }
9
- export declare const RouterDecorator: (Story: any, { parameters }: {
10
- parameters: RouterDecoratorParameters;
11
- }) => JSX.Element;
10
+ export declare const RouterDecorator: StorybookDecorator<RouterDecoratorParameters>;
@@ -1 +1 @@
1
- {"version":3,"file":"routerDecorator.js","sourceRoot":"","sources":["../../src/decorators/routerDecorator.tsx"],"names":[],"mappings":";;;;AAAA,4CAA6D;AAG7D,oDAAuD;AAShD,MAAM,eAAe,GAAG,CAC7B,KAAK,EACL,EAAE,UAAU,EAA6C,EACzD,EAAE;;IACF,MAAM,UAAU,GAAG,IAAA,6BAAgB,EAAC;QAClC,YAAY,EAAE,MAAA,UAAU,CAAC,OAAO,0CAAE,YAAY;QAC9C,UAAU,EAAE,MAAA,UAAU,CAAC,OAAO,0CAAE,UAAU;KAC3C,CAAC,CAAC;IAEH,OAAO,CACL,uBAAC,iBAAc,kBAAC,MAAM,EAAE,UAAU,gBAChC,uBAAC,KAAK,KAAG,IACM,CAClB,CAAC;AACJ,CAAC,CAAC;AAdW,QAAA,eAAe,mBAc1B"}
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,MAAA,UAAU,CAAC,OAAO,0CAAE,YAAY;QAC9C,UAAU,EAAE,MAAA,UAAU,CAAC,OAAO,0CAAE,UAAU;KAC3C,CAAC,CAAC;IAEH,OAAO,CACL,uBAAC,iBAAc,kBAAC,MAAM,EAAE,UAAU,gBAChC,uBAAC,KAAK,KAAG,IACM,CAClB,CAAC;AACJ,CAAC,CAAC;AAdW,QAAA,eAAe,mBAc1B"}
@@ -2,6 +2,7 @@ import type { StoreClass } from '@tramvai/state';
2
2
  import type { ExtendedModule, ModuleType } from '@tramvai/core';
3
3
  import type { Provider as DiProvider } from '@tinkoff/dippy';
4
4
  import type { CommonModuleOptions } from '@tramvai/test-mocks';
5
+ import type { StorybookDecorator } from '../types';
5
6
  export interface TramvaiCoreDecoratorParameters {
6
7
  tramvai?: {
7
8
  stores?: StoreClass[];
@@ -11,6 +12,4 @@ export interface TramvaiCoreDecoratorParameters {
11
12
  options?: CommonModuleOptions;
12
13
  };
13
14
  }
14
- export declare const TramvaiCoreDecorator: (Story: any, { parameters }: {
15
- parameters: TramvaiCoreDecoratorParameters;
16
- }) => JSX.Element;
15
+ export declare const TramvaiCoreDecorator: StorybookDecorator<TramvaiCoreDecoratorParameters>;
@@ -6,7 +6,7 @@ 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;
9
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
10
10
  const envFromFile = process.env.TRAMVAI_ENV_FROM_FILE;
11
11
  const storeMock = (0, test_mocks_1.createMockStore)({
12
12
  stores: (_a = parameters.tramvai) === null || _a === void 0 ? void 0 : _a.stores,
@@ -14,17 +14,17 @@ const TramvaiCoreDecorator = (Story, { parameters }) => {
14
14
  });
15
15
  const diMock = (0, test_mocks_1.createMockDi)({
16
16
  modules: [
17
- test_mocks_1.CommonTestModule.forRoot(Object.assign(Object.assign({}, parameters.tramvai.options), { env: Object.assign(Object.assign({}, envFromFile), (_c = parameters.tramvai.options) === null || _c === void 0 ? void 0 : _c.env) })),
18
- ...((_e = (_d = parameters.tramvai) === null || _d === void 0 ? void 0 : _d.modules) !== null && _e !== void 0 ? _e : []),
17
+ test_mocks_1.CommonTestModule.forRoot(Object.assign(Object.assign({}, (_c = parameters.tramvai) === null || _c === void 0 ? void 0 : _c.options), { env: Object.assign(Object.assign({}, envFromFile), (_e = (_d = parameters.tramvai) === null || _d === void 0 ? void 0 : _d.options) === null || _e === void 0 ? void 0 : _e.env) })),
18
+ ...((_g = (_f = parameters.tramvai) === null || _f === void 0 ? void 0 : _f.modules) !== null && _g !== void 0 ? _g : []),
19
19
  ],
20
- providers: [...((_g = (_f = parameters.tramvai) === null || _f === void 0 ? void 0 : _f.providers) !== null && _g !== void 0 ? _g : [])],
20
+ providers: [...((_j = (_h = parameters.tramvai) === null || _h === void 0 ? void 0 : _h.providers) !== null && _j !== void 0 ? _j : [])],
21
21
  });
22
22
  const contextMock = (0, test_mocks_1.createMockContext)({
23
23
  di: diMock,
24
24
  store: storeMock,
25
25
  useTramvaiActionsConditionals: true,
26
26
  });
27
- return ((0, jsx_runtime_1.jsx)(state_1.Provider, Object.assign({ context: contextMock, serverState: (_h = parameters.tramvai) === null || _h === void 0 ? void 0 : _h.initialState }, { children: (0, jsx_runtime_1.jsx)(react_1.DIContext.Provider, Object.assign({ value: diMock }, { children: (0, jsx_runtime_1.jsx)(Story, {}) })) })));
27
+ return ((0, jsx_runtime_1.jsx)(state_1.Provider, Object.assign({ context: contextMock, serverState: (_k = parameters.tramvai) === null || _k === void 0 ? void 0 : _k.initialState }, { children: (0, jsx_runtime_1.jsx)(react_1.DIContext.Provider, Object.assign({ value: diMock }, { children: (0, jsx_runtime_1.jsx)(Story, {}) })) })));
28
28
  };
29
29
  exports.TramvaiCoreDecorator = TramvaiCoreDecorator;
30
30
  //# 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;AAYtB,MAAM,oBAAoB,GAAG,CAClC,KAAK,EACL,EAAE,UAAU,EAAkD,EAC9D,EAAE;;IACF,MAAM,WAAW,GAA2B,OAAO,CAAC,GAAG,CAAC,qBAA4B,CAAC;IAErF,MAAM,SAAS,GAAG,IAAA,4BAAe,EAAC;QAChC,MAAM,EAAE,MAAA,UAAU,CAAC,OAAO,0CAAE,MAAM;QAClC,YAAY,EAAE,MAAA,UAAU,CAAC,OAAO,0CAAE,YAAY;KAC/C,CAAC,CAAC;IACH,MAAM,MAAM,GAAG,IAAA,yBAAY,EAAC;QAC1B,OAAO,EAAE;YACP,6BAAgB,CAAC,OAAO,iCACnB,UAAU,CAAC,OAAO,CAAC,OAAO,KAC7B,GAAG,kCACE,WAAW,GACX,MAAA,UAAU,CAAC,OAAO,CAAC,OAAO,0CAAE,GAAG,KAEpC;YACF,GAAG,CAAC,MAAA,MAAA,UAAU,CAAC,OAAO,0CAAE,OAAO,mCAAI,EAAE,CAAC;SACvC;QACD,SAAS,EAAE,CAAC,GAAG,CAAC,MAAA,MAAA,UAAU,CAAC,OAAO,0CAAE,SAAS,mCAAI,EAAE,CAAC,CAAC;KACtD,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,UAAU,CAAC,OAAO,0CAAE,SAAS,mCAAI,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,kBAAC,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAA,UAAU,CAAC,OAAO,0CAAE,YAAY,gBAC3E,uBAAC,iBAAS,CAAC,QAAQ,kBAAC,KAAK,EAAE,MAAM,gBAC/B,uBAAC,KAAK,KAAG,IACU,IACZ,CACZ,CAAC;AACJ,CAAC,CAAC;AApCW,QAAA,oBAAoB,wBAoC/B"}
package/lib/preset.d.ts CHANGED
@@ -4,7 +4,8 @@ import type { TramvaiCoreDecoratorParameters } from './decorators/tramvaiCoreDec
4
4
  import type { RouterDecoratorParameters } from './decorators/routerDecorator';
5
5
  import type { ReactQueryDecoratorParameters } from './decorators/reactQueryDecorator';
6
6
  import type { ActionsDecoratorParameters } from './decorators/actionsDecorator';
7
+ import type { StorybookOptions } from './types';
7
8
  export type TramvaiStoriesParameters = TramvaiCoreDecoratorParameters & RouterDecoratorParameters & ReactQueryDecoratorParameters & ActionsDecoratorParameters;
8
9
  export declare const config: (entry: string[]) => string[];
9
10
  export declare const babel: (cfg: TransformOptions) => TransformOptions;
10
- export declare const webpackFinal: (baseConfig: Configuration, options: any) => Promise<Configuration>;
11
+ export declare const webpackFinal: (baseConfig: Configuration, options: StorybookOptions) => Promise<Configuration>;
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,+EAA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/lib/preview.d.ts CHANGED
@@ -1,9 +1 @@
1
- export declare const decorators: (((Story: any, { parameters }: {
2
- parameters: import("./decorators/tramvaiCoreDecorator").TramvaiCoreDecoratorParameters;
3
- }) => JSX.Element) | ((Story: any, { parameters }: {
4
- parameters: import("./decorators/routerDecorator").RouterDecoratorParameters;
5
- }) => JSX.Element) | ((Story: any, { parameters }: {
6
- parameters: import("./decorators/reactQueryDecorator").ReactQueryDecoratorParameters;
7
- }) => JSX.Element) | ((Story: any, { parameters }: {
8
- parameters: import("./decorators/actionsDecorator").ActionsDecoratorParameters;
9
- }) => JSX.Element))[];
1
+ export declare const decorators: (import("./types").StorybookDecorator<import("./decorators/tramvaiCoreDecorator").TramvaiCoreDecoratorParameters> | import("./types").StorybookDecorator<import("./decorators/routerDecorator").RouterDecoratorParameters> | import("./types").StorybookDecorator<import("./decorators/reactQueryDecorator").ReactQueryDecoratorParameters> | import("./types").StorybookDecorator<import("./decorators/actionsDecorator").ActionsDecoratorParameters>)[];
@@ -1,2 +1,3 @@
1
1
  import { ConfigManager } from '@tramvai/cli';
2
- export declare const buildConfigManager: (options: any) => ConfigManager;
2
+ import type { StorybookOptions } from '../types';
3
+ export declare const buildConfigManager: (options: StorybookOptions) => ConfigManager;
@@ -1 +1 @@
1
- {"version":3,"file":"buildConfigManager.js","sourceRoot":"","sources":["../../src/tramvai/buildConfigManager.ts"],"names":[],"mappings":";;;AAAA,sCAKsB;AACtB,8CAAiD;AAE1C,MAAM,kBAAkB,GAAG,CAAC,OAAO,EAAiB,EAAE;IAC3D,MAAM,OAAO,GAAG,IAAA,uBAAa,EAAC,OAAO,CAAC,CAAC;IACvC,MAAM,EAAE,OAAO,EAAE,YAAY,EAAE,GAAG,IAAA,sBAAgB,EAAC,OAAO,CAAC,CAAC;IAE5D,IAAI,CAAC,YAAY,EAAE;QACjB,MAAM,KAAK,CAAC,iCAAiC,OAAO,SAAS,CAAC,CAAC;KAChE;IAED,MAAM,sBAAsB,GAAG,IAAI,4BAA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AC,OAAO,CAAC,cAAc,IAAI,cAAc,CAAC,EAC3E,EAAE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,QAAe,EAAE,CACnE,CAAC;IAEF,OAAO,aAAa,CAAC;AACvB,CAAC,CAAC;AArBW,QAAA,kBAAkB,sBAqB7B"}
package/lib/types.d.ts ADDED
@@ -0,0 +1,8 @@
1
+ import type { ReactElement, ComponentType } from 'react';
2
+ export interface StorybookOptions {
3
+ tramvaiAppName?: string;
4
+ tramvaiDir?: string;
5
+ }
6
+ export type StorybookDecorator<Params> = (Story: ComponentType, options: {
7
+ parameters: Params;
8
+ }) => ReactElement;
package/lib/types.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
@@ -1 +1,2 @@
1
- export declare const getAppRootDir: (options: any) => any;
1
+ import type { StorybookOptions } from '../types';
2
+ export declare const getAppRootDir: (options: StorybookOptions) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/utils/options.ts"],"names":[],"mappings":";;;;AAAA,wDAAwB;AAEjB,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,EAAE;IACvC,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,IAAI,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC;IAExE,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB"}
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/utils/options.ts"],"names":[],"mappings":";;;;AAAA,wDAAwB;AAGjB,MAAM,aAAa,GAAG,CAAC,OAAyB,EAAE,EAAE;IACzD,MAAM,OAAO,GAAG,OAAO,CAAC,UAAU,IAAI,cAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC;IAExE,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAJW,QAAA,aAAa,iBAIxB"}
@@ -1,7 +1,8 @@
1
1
  import type Config from 'webpack-chain';
2
2
  import type { ConfigManager } from '@tramvai/cli';
3
+ import type { StorybookOptions } from '../types';
3
4
  export declare function addEnvVariables({ webpackConfig, configManager, options, }: {
4
5
  webpackConfig: Config;
5
6
  configManager: ConfigManager;
6
- options: any;
7
+ options: StorybookOptions;
7
8
  }): void;
@@ -1 +1 @@
1
- {"version":3,"file":"addEnvVariables.js","sourceRoot":"","sources":["../../src/webpack/addEnvVariables.ts"],"names":[],"mappings":";;;;AAAA,wDAAwB;AACxB,8DAA8B;AAG9B,sCAA2C;AAC3C,8CAAiD;AAEjD,SAAgB,eAAe,CAAC,EAC9B,aAAa,EACb,aAAa,EACb,OAAO,GAKR;IACC,MAAM,OAAO,GAAG,IAAA,uBAAa,EAAC,OAAO,CAAC,CAAC;IACvC,MAAM,GAAG,GAAG,aAAa,CAAC,GAAG,KAAK,aAAa,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;IACjE,IAAI,WAAW,GAA2B,EAAE,CAAC;IAE7C,IAAI;QACF,WAAW,GAAG,OAAO,CAAC,cAAI,CAAC,IAAI,CAAC,OAAO,EAAE,oBAAoB,CAAC,CAAC,CAAC;KACjE;IAAC,OAAO,CAAC,EAAE;QACV,OAAO,CAAC,KAAK,CAAC,4CAA4C,EAAE,CAAC,CAAC,CAAC;KAChE;IAED,aAAa,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,GAAG,CAAC,iBAAO,CAAC,YAAY,EAAE;wCAElD,aAAa,CAAC,KAAK,CAAC,cAAc,CAAC,YAAY,CAAC,GAAG,CAAC,KACvD,sBAAsB,EAAE,IAAI,CAAC,SAAS,CAAC,aAAa,CAAC,GAAG,CA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AAqB,EAAE,IAAI,EAC3B,oBAAoB,EAAE,KAAK;YAC3B,mEAAmE;YACnE,mCAAmC,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;KAEnE,CAAC,CAAC;IAEH,IAAA,iBAAW,EAAC,aAAa,CAAC,CAAC,aAAa,CAAC,CAAC;AAC5C,CAAC;AAhCD,0CAgCC"}
@@ -4,7 +4,8 @@ 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
- baseConfig.module.rules.push({
7
+ var _a, _b;
8
+ (_b = (_a = baseConfig.module) === null || _a === void 0 ? void 0 : _a.rules) === null || _b === void 0 ? void 0 : _b.push({
8
9
  test: /\.[cm]?js[x]?$/,
9
10
  include: is_modern_lib_1.modernLibsFilter,
10
11
  // 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;IACnF,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC;QAC3B,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"}
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,MAAA,MAAA,UAAU,CAAC,MAAM,0CAAE,KAAK,0CAAE,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,8 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.removeRules = void 0;
4
4
  function removeRules({ baseConfig, extensions, }) {
5
+ var _a, _b;
5
6
  // eslint-disable-next-line no-param-reassign
6
- baseConfig.module.rules = baseConfig.module.rules.filter((rule) => { var _a; return typeof rule !== 'string' && !String((_a = rule.test) === null || _a === void 0 ? void 0 : _a.toString()).match(extensions); });
7
+ baseConfig.module.rules = (_b = (_a = baseConfig.module) === null || _a === void 0 ? void 0 : _a.rules) === null || _b === void 0 ? void 0 : _b.filter((rule) => { var _a; return typeof rule !== 'string' && !String((_a = rule.test) === null || _a === void 0 ? void 0 : _a.toString()).match(extensions); });
7
8
  }
8
9
  exports.removeRules = removeRules;
9
10
  //# 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;IACC,6CAA6C;IAC7C,UAAU,CAAC,MAAM,CAAC,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CACtD,CAAC,IAAI,EAAE,EAAE,WAAC,OAAA,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,MAAA,IAAI,CAAC,IAAI,0CAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA,EAAA,CACvF,CAAC;AACJ,CAAC;AAXD,kCAWC"}
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,MAAA,MAAA,UAAU,CAAC,MAAM,0CAAE,KAAK,0CAAE,MAAM,CACzD,CAAC,IAAI,EAAE,EAAE,WAAC,OAAA,OAAO,IAAI,KAAK,QAAQ,IAAI,CAAC,MAAM,CAAC,MAAA,IAAI,CAAC,IAAI,0CAAE,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,UAAU,CAAC,CAAA,EAAA,CACvF,CAAC;AACJ,CAAC;AAXD,kCAWC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/storybook-addon",
3
- "version": "2.56.1",
3
+ "version": "2.56.5",
4
4
  "description": "",
5
5
  "main": "lib/preset.js",
6
6
  "typings": "lib/preset.d.ts",
@@ -20,8 +20,8 @@
20
20
  "registry": "https://registry.npmjs.org/"
21
21
  },
22
22
  "dependencies": {
23
- "@tramvai/test-mocks": "2.56.1",
24
- "@tinkoff/is-modern-lib": "2.0.5",
23
+ "@tramvai/test-mocks": "2.56.5",
24
+ "@tinkoff/is-modern-lib": "2.0.6",
25
25
  "webpack-chain": "^6.5.1",
26
26
  "webpack-merge": "^5.8.0",
27
27
  "@tanstack/react-query": "^4.7.1"
@@ -32,13 +32,13 @@
32
32
  "webpack": "5.75.0"
33
33
  },
34
34
  "peerDependencies": {
35
- "@tramvai/cli": "2.56.1",
36
- "@tramvai/core": "2.56.1",
37
- "@tramvai/state": "2.56.1",
38
- "@tramvai/react": "2.56.1",
39
- "@tramvai/tokens-common": "2.56.1",
40
- "@tinkoff/dippy": "0.8.10",
41
- "@tinkoff/router": "0.2.5",
35
+ "@tramvai/cli": "2.56.5",
36
+ "@tramvai/core": "2.56.5",
37
+ "@tramvai/state": "2.56.5",
38
+ "@tramvai/react": "2.56.5",
39
+ "@tramvai/tokens-common": "2.56.5",
40
+ "@tinkoff/dippy": "0.8.11",
41
+ "@tinkoff/router": "0.2.6",
42
42
  "@tinkoff/url": "0.8.4",
43
43
  "react": ">=16.14.0"
44
44
  }