@storybook/angular 7.0.0-alpha.4 → 7.0.0-alpha.41
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 +1 -1
- package/dist/types/builders/utils/build-standalone-errors-handler.js +3 -6
- package/dist/types/builders/utils/run-compodoc.js +0 -1
- package/dist/types/client/{preview/angular/components → angular}/app.component.d.ts +1 -1
- package/dist/types/client/{preview/angular/components → angular}/app.component.js +1 -1
- package/dist/types/client/{preview/angular → angular}/app.token.d.ts +0 -0
- package/dist/types/client/{preview/angular → angular}/app.token.js +0 -0
- package/dist/types/client/{preview/angular → angular}/helpers.d.ts +1 -1
- package/dist/types/client/{preview/angular → angular}/helpers.js +2 -3
- package/dist/types/client/{preview/angular-beta → angular-beta}/AbstractRenderer.d.ts +1 -2
- package/dist/types/client/{preview/angular-beta → angular-beta}/AbstractRenderer.js +0 -0
- package/dist/types/client/{preview/angular-beta → angular-beta}/CanvasRenderer.d.ts +1 -2
- package/dist/types/client/{preview/angular-beta → angular-beta}/CanvasRenderer.js +0 -0
- package/dist/types/client/{preview/angular-beta → angular-beta}/ComputesTemplateFromComponent.d.ts +0 -0
- package/dist/types/client/{preview/angular-beta → angular-beta}/ComputesTemplateFromComponent.js +0 -0
- package/dist/types/client/{preview/angular-beta → angular-beta}/DocsRenderer.d.ts +1 -2
- package/dist/types/client/{preview/angular-beta → angular-beta}/DocsRenderer.js +0 -0
- package/dist/types/client/{preview/angular-beta → angular-beta}/RendererFactory.d.ts +0 -0
- package/dist/types/client/{preview/angular-beta → angular-beta}/RendererFactory.js +3 -3
- package/dist/types/client/{preview/angular-beta → angular-beta}/StorybookModule.d.ts +1 -1
- package/dist/types/client/{preview/angular-beta → angular-beta}/StorybookModule.js +3 -30
- package/dist/types/client/{preview/angular-beta → angular-beta}/StorybookProvider.d.ts +0 -0
- package/dist/types/client/{preview/angular-beta → angular-beta}/StorybookProvider.js +0 -0
- package/dist/types/client/{preview/angular-beta → angular-beta}/StorybookWrapperComponent.d.ts +0 -0
- package/dist/types/client/{preview/angular-beta → angular-beta}/StorybookWrapperComponent.js +0 -0
- package/dist/types/client/{preview/angular-beta → angular-beta}/utils/NgComponentAnalyzer.d.ts +0 -0
- package/dist/types/client/{preview/angular-beta → angular-beta}/utils/NgComponentAnalyzer.js +0 -0
- package/dist/types/client/{preview/angular-beta → angular-beta}/utils/NgModulesAnalyzer.d.ts +0 -0
- package/dist/types/client/{preview/angular-beta → angular-beta}/utils/NgModulesAnalyzer.js +0 -0
- package/dist/types/client/{preview/config.d.ts → config.d.ts} +2 -2
- package/dist/types/client/{preview/config.js → config.js} +2 -2
- package/dist/types/client/{preview/decorateStory.d.ts → decorateStory.d.ts} +1 -1
- package/dist/types/client/{preview/decorateStory.js → decorateStory.js} +1 -1
- package/dist/types/client/{preview/decorators.d.ts → decorators.d.ts} +1 -2
- package/dist/types/client/{preview/decorators.js → decorators.js} +0 -0
- package/dist/types/client/docs/compodoc.js +2 -3
- package/dist/types/client/docs/config.d.ts +3 -3
- package/dist/types/client/docs/sourceDecorator.d.ts +2 -2
- package/dist/types/client/{preview/angular-polyfills.d.ts → globals.d.ts} +0 -10
- package/dist/types/client/{preview/angular-polyfills.js → globals.js} +7 -1
- package/dist/types/client/index.d.ts +5 -4
- package/dist/types/client/index.js +6 -12
- package/dist/types/client/{preview/index.d.ts → public-api.d.ts} +2 -12
- package/dist/types/client/public-api.js +36 -0
- package/dist/types/client/{preview/types-6-0.d.ts → public-types.d.ts} +4 -19
- package/dist/types/client/{preview/types-6-0.js → public-types.js} +0 -0
- package/dist/types/client/{preview/render.d.ts → render.d.ts} +1 -1
- package/dist/types/client/{preview/render.js → render.js} +0 -0
- package/dist/types/client/{preview/types.d.ts → types.d.ts} +13 -8
- package/dist/types/client/{preview/types.js → types.js} +0 -0
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.js +1 -1
- package/dist/types/preset.d.ts +4 -11
- package/dist/types/preset.js +12 -9
- package/dist/types/renderer.d.ts +4 -4
- package/dist/types/renderer.js +4 -4
- package/dist/types/server/__mocks-ng-workspace__/minimal-config/tsconfig.json +1 -4
- package/dist/types/server/__mocks-ng-workspace__/some-config/tsconfig.json +1 -4
- package/dist/types/server/__mocks-ng-workspace__/with-angularBrowserTarget/tsconfig.json +1 -4
- package/dist/types/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/tsconfig.lib.json +2 -8
- package/dist/types/server/__mocks-ng-workspace__/with-lib/tsconfig.json +1 -4
- package/dist/types/server/__mocks-ng-workspace__/with-nx/tsconfig.json +2 -7
- package/dist/types/server/__mocks-ng-workspace__/with-nx-workspace/tsconfig.json +2 -7
- package/dist/types/server/__mocks-ng-workspace__/with-options-styles/tsconfig.json +1 -4
- package/dist/types/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/tsconfig.lib.json +2 -8
- package/dist/types/server/__mocks-ng-workspace__/without-projects-entry/tsconfig.json +1 -4
- package/dist/types/server/__mocks-ng-workspace__/without-tsConfig/tsconfig.json +1 -4
- package/dist/types/server/framework-preset-angular-cli.js +3 -22
- package/dist/types/server/framework-preset-angular-ivy.js +3 -1
- package/dist/types/types.d.ts +25 -9
- package/package.json +35 -42
- package/LICENSE +0 -21
- package/dist/types/client/preview/globals.d.ts +0 -1
- package/dist/types/client/preview/globals.js +0 -9
- package/dist/types/client/preview/index.js +0 -29
- package/dist/types/client/preview/types-7-0.d.ts +0 -9
- package/dist/types/client/preview/types-7-0.js +0 -2
- package/dist/types/server/angular-cli-webpack-12.2.x.d.ts +0 -1
- package/dist/types/server/angular-cli-webpack-12.2.x.js +0 -66
- package/dist/types/server/angular-cli-webpack-older.d.ts +0 -6
- package/dist/types/server/angular-cli-webpack-older.js +0 -111
- package/dist/types/server/angular-devkit-build-webpack.d.ts +0 -30
- package/dist/types/server/angular-devkit-build-webpack.js +0 -164
- package/dist/types/server/create-fork-ts-checker-plugin.d.ts +0 -3
- package/dist/types/server/create-fork-ts-checker-plugin.js +0 -19
- package/dist/types/server/framework-preset-angular.d.ts +0 -5
- package/dist/types/server/framework-preset-angular.js +0 -103
- package/dist/types/server/ngx-template-loader/index.d.ts +0 -1
- package/dist/types/server/ngx-template-loader/index.js +0 -46
- package/dist/types/server/ts_config.d.ts +0 -2
- package/dist/types/server/ts_config.js +0 -28
- package/types-6-0.d.ts +0 -1
- package/types-7-0.d.ts +0 -1
package/dist/types/preset.d.ts
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
|
+
import type { PresetProperty } from '@storybook/core-common';
|
|
1
2
|
import { StorybookConfig } from './types';
|
|
3
|
+
export declare const addons: PresetProperty<'addons', StorybookConfig>;
|
|
2
4
|
export declare const previewAnnotations: StorybookConfig['previewAnnotations'];
|
|
3
|
-
export declare const
|
|
4
|
-
export declare const
|
|
5
|
-
builder: string;
|
|
6
|
-
disableWebpackDefaults?: boolean;
|
|
7
|
-
channelOptions?: Partial<import("telejson").Options>;
|
|
8
|
-
disableProjectJson?: boolean;
|
|
9
|
-
disableTelemetry?: boolean;
|
|
10
|
-
enableCrashReports?: boolean;
|
|
11
|
-
crossOriginIsolated?: boolean;
|
|
12
|
-
}>;
|
|
13
|
-
export declare const typescript: (config: StorybookConfig['typescript']) => Promise<StorybookConfig['typescript']>;
|
|
5
|
+
export declare const core: PresetProperty<'core', StorybookConfig>;
|
|
6
|
+
export declare const typescript: PresetProperty<'typescript', StorybookConfig>;
|
package/dist/types/preset.js
CHANGED
|
@@ -3,23 +3,26 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.typescript = exports.core = exports.
|
|
6
|
+
exports.typescript = exports.core = exports.previewAnnotations = exports.addons = void 0;
|
|
7
7
|
const path_1 = __importDefault(require("path"));
|
|
8
|
-
const previewAnnotations = (entries = []) => [
|
|
9
|
-
...entries,
|
|
10
|
-
require.resolve('./client/preview/config'),
|
|
11
|
-
];
|
|
12
|
-
exports.previewAnnotations = previewAnnotations;
|
|
13
8
|
exports.addons = [
|
|
14
|
-
require.resolve('./server/framework-preset-angular'),
|
|
15
9
|
require.resolve('./server/framework-preset-angular-cli'),
|
|
16
10
|
require.resolve('./server/framework-preset-angular-ivy'),
|
|
17
11
|
require.resolve('./server/framework-preset-angular-docs'),
|
|
18
12
|
];
|
|
19
|
-
const
|
|
13
|
+
const previewAnnotations = (entries = []) => [
|
|
14
|
+
...entries,
|
|
15
|
+
require.resolve('./client/config'),
|
|
16
|
+
];
|
|
17
|
+
exports.previewAnnotations = previewAnnotations;
|
|
18
|
+
const core = async (config, options) => {
|
|
19
|
+
const framework = await options.presets.apply('framework');
|
|
20
20
|
return {
|
|
21
21
|
...config,
|
|
22
|
-
builder:
|
|
22
|
+
builder: {
|
|
23
|
+
name: path_1.default.dirname(require.resolve(path_1.default.join('@storybook/builder-webpack5', 'package.json'))),
|
|
24
|
+
options: typeof framework === 'string' ? {} : framework.options.builder || {},
|
|
25
|
+
},
|
|
23
26
|
};
|
|
24
27
|
};
|
|
25
28
|
exports.core = core;
|
package/dist/types/renderer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { computesTemplateSourceFromComponent } from './client/
|
|
2
|
-
export { rendererFactory } from './client/
|
|
3
|
-
export { AbstractRenderer } from './client/
|
|
4
|
-
export { getStorybookModuleMetadata } from './client/
|
|
1
|
+
export { computesTemplateSourceFromComponent } from './client/angular-beta/ComputesTemplateFromComponent';
|
|
2
|
+
export { rendererFactory } from './client/render';
|
|
3
|
+
export { AbstractRenderer } from './client/angular-beta/AbstractRenderer';
|
|
4
|
+
export { getStorybookModuleMetadata } from './client/angular-beta/StorybookModule';
|
package/dist/types/renderer.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getStorybookModuleMetadata = exports.AbstractRenderer = exports.rendererFactory = exports.computesTemplateSourceFromComponent = void 0;
|
|
4
|
-
var ComputesTemplateFromComponent_1 = require("./client/
|
|
4
|
+
var ComputesTemplateFromComponent_1 = require("./client/angular-beta/ComputesTemplateFromComponent");
|
|
5
5
|
Object.defineProperty(exports, "computesTemplateSourceFromComponent", { enumerable: true, get: function () { return ComputesTemplateFromComponent_1.computesTemplateSourceFromComponent; } });
|
|
6
|
-
var render_1 = require("./client/
|
|
6
|
+
var render_1 = require("./client/render");
|
|
7
7
|
Object.defineProperty(exports, "rendererFactory", { enumerable: true, get: function () { return render_1.rendererFactory; } });
|
|
8
|
-
var AbstractRenderer_1 = require("./client/
|
|
8
|
+
var AbstractRenderer_1 = require("./client/angular-beta/AbstractRenderer");
|
|
9
9
|
Object.defineProperty(exports, "AbstractRenderer", { enumerable: true, get: function () { return AbstractRenderer_1.AbstractRenderer; } });
|
|
10
|
-
var StorybookModule_1 = require("./client/
|
|
10
|
+
var StorybookModule_1 = require("./client/angular-beta/StorybookModule");
|
|
11
11
|
Object.defineProperty(exports, "getStorybookModuleMetadata", { enumerable: true, get: function () { return StorybookModule_1.getStorybookModuleMetadata; } });
|
package/dist/types/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/tsconfig.lib.json
CHANGED
|
@@ -9,18 +9,12 @@
|
|
|
9
9
|
"declarationMap": true,
|
|
10
10
|
"inlineSources": true,
|
|
11
11
|
"types": [],
|
|
12
|
-
"lib": [
|
|
13
|
-
"dom",
|
|
14
|
-
"es2018"
|
|
15
|
-
]
|
|
12
|
+
"lib": ["dom", "es2018"]
|
|
16
13
|
},
|
|
17
14
|
"angularCompilerOptions": {
|
|
18
15
|
"skipTemplateCodegen": true,
|
|
19
16
|
"strictMetadataEmit": true,
|
|
20
17
|
"enableResourceInlining": true
|
|
21
18
|
},
|
|
22
|
-
"exclude": [
|
|
23
|
-
"src/test.ts",
|
|
24
|
-
"**/*.spec.ts"
|
|
25
|
-
]
|
|
19
|
+
"exclude": ["src/test.ts", "**/*.spec.ts"]
|
|
26
20
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"include": [
|
|
3
|
-
"./src"
|
|
4
|
-
],
|
|
2
|
+
"include": ["./src"],
|
|
5
3
|
"compilerOptions": {
|
|
6
4
|
"sourceMap": true,
|
|
7
5
|
"moduleResolution": "node",
|
|
@@ -11,9 +9,6 @@
|
|
|
11
9
|
"esModuleInterop": true,
|
|
12
10
|
"skipLibCheck": true,
|
|
13
11
|
"target": "es5",
|
|
14
|
-
"lib": [
|
|
15
|
-
"es2017",
|
|
16
|
-
"dom"
|
|
17
|
-
]
|
|
12
|
+
"lib": ["es2017", "dom"]
|
|
18
13
|
}
|
|
19
14
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"include": [
|
|
3
|
-
"./src"
|
|
4
|
-
],
|
|
2
|
+
"include": ["./src"],
|
|
5
3
|
"compilerOptions": {
|
|
6
4
|
"sourceMap": true,
|
|
7
5
|
"moduleResolution": "node",
|
|
@@ -11,9 +9,6 @@
|
|
|
11
9
|
"esModuleInterop": true,
|
|
12
10
|
"skipLibCheck": true,
|
|
13
11
|
"target": "es5",
|
|
14
|
-
"lib": [
|
|
15
|
-
"es2017",
|
|
16
|
-
"dom"
|
|
17
|
-
]
|
|
12
|
+
"lib": ["es2017", "dom"]
|
|
18
13
|
}
|
|
19
14
|
}
|
|
@@ -9,18 +9,12 @@
|
|
|
9
9
|
"declarationMap": true,
|
|
10
10
|
"inlineSources": true,
|
|
11
11
|
"types": [],
|
|
12
|
-
"lib": [
|
|
13
|
-
"dom",
|
|
14
|
-
"es2018"
|
|
15
|
-
]
|
|
12
|
+
"lib": ["dom", "es2018"]
|
|
16
13
|
},
|
|
17
14
|
"angularCompilerOptions": {
|
|
18
15
|
"skipTemplateCodegen": true,
|
|
19
16
|
"strictMetadataEmit": true,
|
|
20
17
|
"enableResourceInlining": true
|
|
21
18
|
},
|
|
22
|
-
"exclude": [
|
|
23
|
-
"src/test.ts",
|
|
24
|
-
"**/*.spec.ts"
|
|
25
|
-
]
|
|
19
|
+
"exclude": ["src/test.ts", "**/*.spec.ts"]
|
|
26
20
|
}
|
|
@@ -30,13 +30,11 @@ exports.webpackFinal = void 0;
|
|
|
30
30
|
const node_logger_1 = require("@storybook/node-logger");
|
|
31
31
|
const architect_1 = require("@angular-devkit/architect");
|
|
32
32
|
const find_up_1 = require("find-up");
|
|
33
|
-
const semver_1 = __importDefault(require("
|
|
34
|
-
const ts_dedent_1 =
|
|
33
|
+
const semver_1 = __importDefault(require("semver"));
|
|
34
|
+
const ts_dedent_1 = require("ts-dedent");
|
|
35
35
|
const core_1 = require("@angular-devkit/core");
|
|
36
36
|
const module_is_available_1 = require("./utils/module-is-available");
|
|
37
|
-
const angular_cli_webpack_12_2_x_1 = require("./angular-cli-webpack-12.2.x");
|
|
38
37
|
const angular_cli_webpack_13_x_x_1 = require("./angular-cli-webpack-13.x.x");
|
|
39
|
-
const angular_cli_webpack_older_1 = require("./angular-cli-webpack-older");
|
|
40
38
|
const angular_read_workspace_1 = require("./angular-read-workspace");
|
|
41
39
|
async function webpackFinal(baseConfig, options) {
|
|
42
40
|
if (!(0, module_is_available_1.moduleIsAvailable)('@angular-devkit/build-angular')) {
|
|
@@ -65,23 +63,6 @@ async function webpackFinal(baseConfig, options) {
|
|
|
65
63
|
});
|
|
66
64
|
},
|
|
67
65
|
},
|
|
68
|
-
{
|
|
69
|
-
info: '=> Loading angular-cli config for angular 12.2.x',
|
|
70
|
-
condition: semver_1.default.satisfies(angularCliVersion, '12.2.x') && options.angularBuilderContext,
|
|
71
|
-
getWebpackConfig: async (_baseConfig, _options) => {
|
|
72
|
-
const builderContext = getBuilderContext(_options);
|
|
73
|
-
const builderOptions = await getBuilderOptions(_options, builderContext);
|
|
74
|
-
return (0, angular_cli_webpack_12_2_x_1.getWebpackConfig)(_baseConfig, {
|
|
75
|
-
builderOptions,
|
|
76
|
-
builderContext,
|
|
77
|
-
});
|
|
78
|
-
},
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
info: '=> Loading angular-cli config for angular lower than 12.2.0',
|
|
82
|
-
condition: true,
|
|
83
|
-
getWebpackConfig: angular_cli_webpack_older_1.getWebpackConfig,
|
|
84
|
-
},
|
|
85
66
|
];
|
|
86
67
|
const webpackGetter = webpackGetterByVersions.find((wg) => wg.condition);
|
|
87
68
|
node_logger_1.logger.info(webpackGetter.info);
|
|
@@ -139,7 +120,7 @@ async function getLegacyDefaultBuildOptions(options) {
|
|
|
139
120
|
// Not use legacy way with builder (`angularBrowserTarget` is defined or null with builder and undefined without)
|
|
140
121
|
return {};
|
|
141
122
|
}
|
|
142
|
-
node_logger_1.logger.warn((0, ts_dedent_1.
|
|
123
|
+
node_logger_1.logger.warn((0, ts_dedent_1.dedent) `Your Storybook startup uses a solution that will not be supported in version 7.0.
|
|
143
124
|
You must use angular builder to have an explicit configuration on the project used in angular.json
|
|
144
125
|
Read more at:
|
|
145
126
|
- https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sb-angular-builder)
|
|
@@ -73,7 +73,9 @@ const webpack = async (webpackConfig, options) => {
|
|
|
73
73
|
if (angularOptions.enableIvy === false) {
|
|
74
74
|
return webpackConfig;
|
|
75
75
|
}
|
|
76
|
-
(
|
|
76
|
+
if (angularOptions.enableNgcc !== false) {
|
|
77
|
+
(0, exports.runNgcc)();
|
|
78
|
+
}
|
|
77
79
|
return {
|
|
78
80
|
...webpackConfig,
|
|
79
81
|
resolve: {
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,13 +1,29 @@
|
|
|
1
|
-
import type { StorybookConfig as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import type { StorybookConfig as StorybookConfigBase, TypescriptOptions as TypescriptOptionsReact } from '@storybook/core-webpack';
|
|
2
|
+
import type { StorybookConfigWebpack, BuilderOptions, TypescriptOptions as TypescriptOptionsBuilder } from '@storybook/builder-webpack5';
|
|
3
|
+
declare type FrameworkName = '@storybook/angular';
|
|
4
|
+
declare type BuilderName = '@storybook/builder-webpack5';
|
|
5
|
+
export declare type FrameworkOptions = AngularOptions & {
|
|
6
|
+
builder?: BuilderOptions;
|
|
7
|
+
};
|
|
8
|
+
declare type StorybookConfigFramework = {
|
|
9
|
+
framework: FrameworkName | {
|
|
10
|
+
name: FrameworkName;
|
|
11
|
+
options: FrameworkOptions;
|
|
12
|
+
};
|
|
13
|
+
core?: StorybookConfigBase['core'] & {
|
|
14
|
+
builder?: BuilderName | {
|
|
15
|
+
name: BuilderName;
|
|
16
|
+
options: BuilderOptions;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
typescript?: Partial<TypescriptOptionsBuilder & TypescriptOptionsReact> & StorybookConfigBase['typescript'];
|
|
20
|
+
};
|
|
5
21
|
/**
|
|
6
22
|
* The interface for Storybook configuration in `main.ts` files.
|
|
7
23
|
*/
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
24
|
+
export declare type StorybookConfig = Omit<StorybookConfigBase, keyof StorybookConfigWebpack | keyof StorybookConfigFramework> & StorybookConfigWebpack & StorybookConfigFramework;
|
|
25
|
+
export interface AngularOptions {
|
|
26
|
+
enableIvy?: boolean;
|
|
27
|
+
enableNgcc?: boolean;
|
|
13
28
|
}
|
|
29
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/angular",
|
|
3
|
-
"version": "7.0.0-alpha.
|
|
3
|
+
"version": "7.0.0-alpha.41",
|
|
4
4
|
"description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -30,42 +30,36 @@
|
|
|
30
30
|
"*.d.ts"
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
|
-
"
|
|
33
|
+
"check": "../../../scripts/node_modules/.bin/tsc --noEmit",
|
|
34
|
+
"prep": "node ../../../scripts/prepare.js"
|
|
34
35
|
},
|
|
35
36
|
"dependencies": {
|
|
36
|
-
"@storybook/addons": "7.0.0-alpha.
|
|
37
|
-
"@storybook/api": "7.0.0-alpha.
|
|
38
|
-
"@storybook/builder-webpack5": "7.0.0-alpha.
|
|
39
|
-
"@storybook/client-logger": "7.0.0-alpha.
|
|
40
|
-
"@storybook/core-client": "7.0.0-alpha.
|
|
41
|
-
"@storybook/core-common": "7.0.0-alpha.
|
|
42
|
-
"@storybook/core-events": "7.0.0-alpha.
|
|
43
|
-
"@storybook/core-server": "7.0.0-alpha.
|
|
44
|
-
"@storybook/
|
|
45
|
-
"@storybook/
|
|
46
|
-
"@storybook/
|
|
47
|
-
"@storybook/
|
|
48
|
-
"@storybook/store": "7.0.0-alpha.
|
|
49
|
-
"@types/node": "^
|
|
37
|
+
"@storybook/addons": "7.0.0-alpha.41",
|
|
38
|
+
"@storybook/api": "7.0.0-alpha.41",
|
|
39
|
+
"@storybook/builder-webpack5": "7.0.0-alpha.41",
|
|
40
|
+
"@storybook/client-logger": "7.0.0-alpha.41",
|
|
41
|
+
"@storybook/core-client": "7.0.0-alpha.41",
|
|
42
|
+
"@storybook/core-common": "7.0.0-alpha.41",
|
|
43
|
+
"@storybook/core-events": "7.0.0-alpha.41",
|
|
44
|
+
"@storybook/core-server": "7.0.0-alpha.41",
|
|
45
|
+
"@storybook/core-webpack": "7.0.0-alpha.41",
|
|
46
|
+
"@storybook/csf": "0.0.2--canary.49.258942b.0",
|
|
47
|
+
"@storybook/docs-tools": "7.0.0-alpha.41",
|
|
48
|
+
"@storybook/node-logger": "7.0.0-alpha.41",
|
|
49
|
+
"@storybook/store": "7.0.0-alpha.41",
|
|
50
|
+
"@types/node": "^16.0.0",
|
|
50
51
|
"@types/react": "^16.14.23",
|
|
51
52
|
"@types/react-dom": "^16.9.14",
|
|
52
|
-
"
|
|
53
|
+
"@types/semver": "^7.3.4",
|
|
53
54
|
"core-js": "^3.8.2",
|
|
54
55
|
"find-up": "^5.0.0",
|
|
55
|
-
"fork-ts-checker-webpack-plugin": "^7.2.6",
|
|
56
56
|
"global": "^4.4.0",
|
|
57
|
-
"nanoid": "^3.1.23",
|
|
58
|
-
"p-limit": "^3.1.0",
|
|
59
|
-
"postcss": "^7.0.36",
|
|
60
|
-
"postcss-loader": "^6.2.1",
|
|
61
|
-
"raw-loader": "^4.0.2",
|
|
62
57
|
"react": "^16.14.0",
|
|
63
58
|
"react-dom": "^16.14.0",
|
|
64
59
|
"read-pkg-up": "^7.0.1",
|
|
65
|
-
"
|
|
60
|
+
"semver": "^7.3.7",
|
|
66
61
|
"telejson": "^6.0.8",
|
|
67
62
|
"ts-dedent": "^2.0.0",
|
|
68
|
-
"ts-loader": "^9.2.8",
|
|
69
63
|
"tsconfig-paths-webpack-plugin": "^3.5.2",
|
|
70
64
|
"util-deprecate": "^1.0.2",
|
|
71
65
|
"webpack": "5"
|
|
@@ -79,12 +73,10 @@
|
|
|
79
73
|
"@angular/compiler": "^13.3.6",
|
|
80
74
|
"@angular/compiler-cli": "^13.3.6",
|
|
81
75
|
"@angular/core": "^13.3.6",
|
|
82
|
-
"@angular/elements": "^13.3.6",
|
|
83
76
|
"@angular/forms": "^13.3.6",
|
|
84
77
|
"@angular/platform-browser": "^13.3.6",
|
|
85
78
|
"@angular/platform-browser-dynamic": "^13.3.6",
|
|
86
|
-
"@nrwl/workspace": "
|
|
87
|
-
"@types/autoprefixer": "^9.7.2",
|
|
79
|
+
"@nrwl/workspace": "14.6.1",
|
|
88
80
|
"@types/tmp": "^0.2.3",
|
|
89
81
|
"cross-spawn": "^7.0.3",
|
|
90
82
|
"jest": "^27.5.1",
|
|
@@ -92,22 +84,23 @@
|
|
|
92
84
|
"jest-specific-snapshot": "^5.0.0",
|
|
93
85
|
"tmp": "^0.2.1",
|
|
94
86
|
"typescript": "~4.6.3",
|
|
95
|
-
"webpack": "5"
|
|
87
|
+
"webpack": "5",
|
|
88
|
+
"zone.js": "^0.11.0"
|
|
96
89
|
},
|
|
97
90
|
"peerDependencies": {
|
|
98
|
-
"@angular-devkit/architect": ">=0.
|
|
99
|
-
"@angular-devkit/build-angular": ">=
|
|
100
|
-
"@angular-devkit/core": "
|
|
101
|
-
"@angular/cli": ">=
|
|
102
|
-
"@angular/common": ">=
|
|
103
|
-
"@angular/compiler": ">=
|
|
104
|
-
"@angular/compiler-cli": ">=
|
|
105
|
-
"@angular/core": ">=
|
|
106
|
-
"@angular/forms": ">=
|
|
107
|
-
"@angular/platform-browser": ">=
|
|
108
|
-
"@angular/platform-browser-dynamic": ">=
|
|
91
|
+
"@angular-devkit/architect": ">=0.1300.0",
|
|
92
|
+
"@angular-devkit/build-angular": ">=13.0.0",
|
|
93
|
+
"@angular-devkit/core": ">=13.0.0",
|
|
94
|
+
"@angular/cli": ">=13.0.0",
|
|
95
|
+
"@angular/common": ">=13.0.0",
|
|
96
|
+
"@angular/compiler": ">=13.0.0",
|
|
97
|
+
"@angular/compiler-cli": ">=13.0.0",
|
|
98
|
+
"@angular/core": ">=13.0.0",
|
|
99
|
+
"@angular/forms": ">=13.0.0",
|
|
100
|
+
"@angular/platform-browser": ">=13.0.0",
|
|
101
|
+
"@angular/platform-browser-dynamic": ">=13.0.0",
|
|
109
102
|
"@babel/core": "*",
|
|
110
|
-
"@nrwl/workspace": "
|
|
103
|
+
"@nrwl/workspace": "14.6.1",
|
|
111
104
|
"rxjs": "^6.0.0 || ^7.4.0",
|
|
112
105
|
"typescript": "^4.0.0",
|
|
113
106
|
"zone.js": "^0.8.29 || ^0.9.0 || ^0.10.0 || ^0.11.0"
|
|
@@ -127,5 +120,5 @@
|
|
|
127
120
|
"access": "public"
|
|
128
121
|
},
|
|
129
122
|
"builders": "dist/types/builders/builders.json",
|
|
130
|
-
"gitHead": "
|
|
123
|
+
"gitHead": "7ec6f916eb875bd2e3cf3aa6b1afcd1fe25d1637"
|
|
131
124
|
}
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2017 Kadira Inc. <hello@kadira.io>
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import './angular-polyfills';
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const global_1 = __importDefault(require("global"));
|
|
7
|
-
require("./angular-polyfills");
|
|
8
|
-
const { window: globalWindow } = global_1.default;
|
|
9
|
-
globalWindow.STORYBOOK_ENV = 'angular';
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.raw = exports.getStorybook = exports.forceReRender = exports.setAddon = exports.clearDecorators = exports.addParameters = exports.addDecorator = exports.configure = exports.storiesOf = void 0;
|
|
7
|
-
const core_client_1 = require("@storybook/core-client");
|
|
8
|
-
require("./globals");
|
|
9
|
-
const render_1 = require("./render");
|
|
10
|
-
const decorateStory_1 = __importDefault(require("./decorateStory"));
|
|
11
|
-
const framework = 'angular';
|
|
12
|
-
const api = (0, core_client_1.start)(render_1.renderToDOM, { decorateStory: decorateStory_1.default, render: render_1.render });
|
|
13
|
-
const storiesOf = (kind, m) => {
|
|
14
|
-
return api.clientApi.storiesOf(kind, m).addParameters({
|
|
15
|
-
framework,
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
exports.storiesOf = storiesOf;
|
|
19
|
-
const configure = (...args) => api.configure(framework, ...args);
|
|
20
|
-
exports.configure = configure;
|
|
21
|
-
exports.addDecorator = api.clientApi
|
|
22
|
-
.addDecorator;
|
|
23
|
-
exports.addParameters = api.clientApi
|
|
24
|
-
.addParameters;
|
|
25
|
-
exports.clearDecorators = api.clientApi.clearDecorators;
|
|
26
|
-
exports.setAddon = api.clientApi.setAddon;
|
|
27
|
-
exports.forceReRender = api.forceReRender;
|
|
28
|
-
exports.getStorybook = api.clientApi.getStorybook;
|
|
29
|
-
exports.raw = api.clientApi.raw;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { Args } from '@storybook/csf';
|
|
2
|
-
import type { StoryObj } from './types-6-0';
|
|
3
|
-
export type { StoryFn, StoryObj, Meta } from './types-6-0';
|
|
4
|
-
/**
|
|
5
|
-
* Story function that represents a CSFv3 component example.
|
|
6
|
-
*
|
|
7
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
8
|
-
*/
|
|
9
|
-
export declare type Story<TArgs = Args> = StoryObj<TArgs>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export function getWebpackConfig(baseConfig: any, { builderOptions, builderContext }: any): Promise<any>;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
// Private angular devkit stuff
|
|
2
|
-
const { generateI18nBrowserWebpackConfigFromContext, } = require('@angular-devkit/build-angular/src/utils/webpack-browser-config');
|
|
3
|
-
const { getCommonConfig, getStylesConfig, getTypeScriptConfig, } = require('@angular-devkit/build-angular/src/webpack/configs');
|
|
4
|
-
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
|
5
|
-
const { filterOutStylingRules } = require('./utils/filter-out-styling-rules');
|
|
6
|
-
/**
|
|
7
|
-
* Extract webpack config from angular-cli 12.2.x
|
|
8
|
-
* ⚠️ This file is in JavaScript to not use TypeScript. Because current storybook TypeScript version is not compatible with Angular CLI.
|
|
9
|
-
* FIXME: Try another way with TypeScript on future storybook version (7 maybe 🤞)
|
|
10
|
-
*
|
|
11
|
-
* @param {*} baseConfig Previous webpack config from storybook
|
|
12
|
-
* @param {*} options { builderOptions, builderContext }
|
|
13
|
-
*/
|
|
14
|
-
exports.getWebpackConfig = async (baseConfig, { builderOptions, builderContext }) => {
|
|
15
|
-
/**
|
|
16
|
-
* Get angular-cli Webpack config
|
|
17
|
-
*/
|
|
18
|
-
const { config: cliConfig } = await generateI18nBrowserWebpackConfigFromContext({
|
|
19
|
-
// Default options
|
|
20
|
-
index: 'noop-index',
|
|
21
|
-
main: 'noop-main',
|
|
22
|
-
outputPath: 'noop-out',
|
|
23
|
-
// Options provided by user
|
|
24
|
-
...builderOptions,
|
|
25
|
-
// Fixed options
|
|
26
|
-
optimization: false,
|
|
27
|
-
namedChunks: false,
|
|
28
|
-
progress: false,
|
|
29
|
-
buildOptimizer: false,
|
|
30
|
-
aot: false,
|
|
31
|
-
}, builderContext, (wco) => [getCommonConfig(wco), getStylesConfig(wco), getTypeScriptConfig(wco)]);
|
|
32
|
-
/**
|
|
33
|
-
* Merge baseConfig Webpack with angular-cli Webpack
|
|
34
|
-
*/
|
|
35
|
-
const entry = [
|
|
36
|
-
...baseConfig.entry,
|
|
37
|
-
...(cliConfig.entry.styles ?? []),
|
|
38
|
-
...(cliConfig.entry.polyfills ?? []),
|
|
39
|
-
];
|
|
40
|
-
// Don't use storybooks styling rules because we have to use rules created by @angular-devkit/build-angular
|
|
41
|
-
// because @angular-devkit/build-angular created rules have include/exclude for global style files.
|
|
42
|
-
const rulesExcludingStyles = filterOutStylingRules(baseConfig);
|
|
43
|
-
const module = {
|
|
44
|
-
...baseConfig.module,
|
|
45
|
-
rules: [...cliConfig.module.rules, ...rulesExcludingStyles],
|
|
46
|
-
};
|
|
47
|
-
const plugins = [...(cliConfig.plugins ?? []), ...baseConfig.plugins];
|
|
48
|
-
const resolve = {
|
|
49
|
-
...baseConfig.resolve,
|
|
50
|
-
modules: Array.from(new Set([...baseConfig.resolve.modules, ...cliConfig.resolve.modules])),
|
|
51
|
-
plugins: [
|
|
52
|
-
new TsconfigPathsPlugin({
|
|
53
|
-
configFile: builderOptions.tsConfig,
|
|
54
|
-
mainFields: ['browser', 'module', 'main'],
|
|
55
|
-
}),
|
|
56
|
-
],
|
|
57
|
-
};
|
|
58
|
-
return {
|
|
59
|
-
...baseConfig,
|
|
60
|
-
entry,
|
|
61
|
-
module,
|
|
62
|
-
plugins,
|
|
63
|
-
resolve,
|
|
64
|
-
resolveLoader: cliConfig.resolveLoader,
|
|
65
|
-
};
|
|
66
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import webpack, { Configuration } from 'webpack';
|
|
2
|
-
import type { PresetOptions } from './preset-options';
|
|
3
|
-
/**
|
|
4
|
-
* Old way currently support version lower than 12.2.x
|
|
5
|
-
*/
|
|
6
|
-
export declare function getWebpackConfig(baseConfig: webpack.Configuration, options: PresetOptions): Promise<Configuration>;
|