@storybook/angular 7.0.0-alpha.3 → 7.0.0-alpha.30

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.
Files changed (81) hide show
  1. package/README.md +1 -1
  2. package/dist/types/builders/build-storybook/index.js +4 -6
  3. package/dist/types/builders/start-storybook/index.js +4 -6
  4. package/dist/types/builders/utils/build-standalone-errors-handler.js +3 -6
  5. package/dist/types/builders/utils/run-compodoc.js +0 -2
  6. package/dist/types/builders/utils/standalone-options.d.ts +12 -0
  7. package/dist/types/{client/preview/types-6-0.js → builders/utils/standalone-options.js} +0 -0
  8. package/dist/types/client/{preview/angular/components → angular}/app.component.d.ts +1 -1
  9. package/dist/types/client/{preview/angular/components → angular}/app.component.js +1 -1
  10. package/dist/types/client/{preview/angular → angular}/app.token.d.ts +0 -0
  11. package/dist/types/client/{preview/angular → angular}/app.token.js +0 -0
  12. package/dist/types/client/{preview/angular → angular}/helpers.d.ts +1 -1
  13. package/dist/types/client/{preview/angular → angular}/helpers.js +2 -2
  14. package/dist/types/client/{preview/angular-beta → angular-beta}/AbstractRenderer.d.ts +1 -2
  15. package/dist/types/client/{preview/angular-beta → angular-beta}/AbstractRenderer.js +0 -0
  16. package/dist/types/client/{preview/angular-beta → angular-beta}/CanvasRenderer.d.ts +1 -2
  17. package/dist/types/client/{preview/angular-beta → angular-beta}/CanvasRenderer.js +0 -0
  18. package/dist/types/client/{preview/angular-beta → angular-beta}/ComputesTemplateFromComponent.d.ts +0 -0
  19. package/dist/types/client/{preview/angular-beta → angular-beta}/ComputesTemplateFromComponent.js +0 -0
  20. package/dist/types/client/{preview/angular-beta → angular-beta}/DocsRenderer.d.ts +1 -2
  21. package/dist/types/client/{preview/angular-beta → angular-beta}/DocsRenderer.js +0 -0
  22. package/dist/types/client/{preview/angular-beta → angular-beta}/RendererFactory.d.ts +0 -0
  23. package/dist/types/client/{preview/angular-beta → angular-beta}/RendererFactory.js +3 -3
  24. package/dist/types/client/{preview/angular-beta → angular-beta}/StorybookModule.d.ts +0 -0
  25. package/dist/types/client/{preview/angular-beta → angular-beta}/StorybookModule.js +3 -3
  26. package/dist/types/client/{preview/angular-beta → angular-beta}/StorybookProvider.d.ts +0 -0
  27. package/dist/types/client/{preview/angular-beta → angular-beta}/StorybookProvider.js +0 -0
  28. package/dist/types/client/{preview/angular-beta → angular-beta}/StorybookWrapperComponent.d.ts +0 -0
  29. package/dist/types/client/{preview/angular-beta → angular-beta}/StorybookWrapperComponent.js +0 -0
  30. package/dist/types/client/{preview/angular-beta → angular-beta}/utils/NgComponentAnalyzer.d.ts +0 -0
  31. package/dist/types/client/{preview/angular-beta → angular-beta}/utils/NgComponentAnalyzer.js +0 -0
  32. package/dist/types/client/{preview/angular-beta → angular-beta}/utils/NgModulesAnalyzer.d.ts +0 -0
  33. package/dist/types/client/{preview/angular-beta → angular-beta}/utils/NgModulesAnalyzer.js +0 -0
  34. package/dist/types/client/{preview/config.d.ts → config.d.ts} +1 -1
  35. package/dist/types/client/{preview/config.js → config.js} +0 -0
  36. package/dist/types/client/{preview/decorateStory.d.ts → decorateStory.d.ts} +1 -1
  37. package/dist/types/client/{preview/decorateStory.js → decorateStory.js} +0 -0
  38. package/dist/types/client/{preview/decorators.d.ts → decorators.d.ts} +1 -2
  39. package/dist/types/client/{preview/decorators.js → decorators.js} +0 -0
  40. package/dist/types/client/docs/config.d.ts +1 -1
  41. package/dist/types/client/docs/sourceDecorator.d.ts +2 -2
  42. package/dist/types/client/{preview/angular-polyfills.d.ts → globals.d.ts} +0 -10
  43. package/dist/types/client/{preview/angular-polyfills.js → globals.js} +7 -1
  44. package/dist/types/client/index.d.ts +5 -4
  45. package/dist/types/client/index.js +5 -12
  46. package/dist/types/client/{preview/index.d.ts → public-api.d.ts} +3 -5
  47. package/dist/types/client/{preview/index.js → public-api.js} +18 -4
  48. package/dist/types/client/{preview/types-6-0.d.ts → public-types.d.ts} +4 -19
  49. package/dist/types/client/{preview/types-7-0.js → public-types.js} +0 -0
  50. package/dist/types/client/{preview/render.d.ts → render.d.ts} +1 -1
  51. package/dist/types/client/{preview/render.js → render.js} +0 -0
  52. package/dist/types/client/{preview/types.d.ts → types.d.ts} +13 -0
  53. package/dist/types/client/{preview/types.js → types.js} +0 -0
  54. package/dist/types/index.d.ts +1 -1
  55. package/dist/types/index.js +1 -1
  56. package/dist/types/preset.d.ts +4 -11
  57. package/dist/types/preset.js +12 -8
  58. package/dist/types/renderer.d.ts +4 -4
  59. package/dist/types/renderer.js +4 -4
  60. package/dist/types/server/__mocks-ng-workspace__/minimal-config/tsconfig.json +1 -4
  61. package/dist/types/server/__mocks-ng-workspace__/some-config/tsconfig.json +1 -4
  62. package/dist/types/server/__mocks-ng-workspace__/with-angularBrowserTarget/tsconfig.json +1 -4
  63. package/dist/types/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/tsconfig.lib.json +2 -8
  64. package/dist/types/server/__mocks-ng-workspace__/with-lib/tsconfig.json +1 -4
  65. package/dist/types/server/__mocks-ng-workspace__/with-nx/tsconfig.json +2 -7
  66. package/dist/types/server/__mocks-ng-workspace__/with-nx-workspace/tsconfig.json +2 -7
  67. package/dist/types/server/__mocks-ng-workspace__/with-options-styles/tsconfig.json +1 -4
  68. package/dist/types/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/tsconfig.lib.json +2 -8
  69. package/dist/types/server/__mocks-ng-workspace__/without-projects-entry/tsconfig.json +1 -4
  70. package/dist/types/server/__mocks-ng-workspace__/without-tsConfig/tsconfig.json +1 -4
  71. package/dist/types/server/framework-preset-angular-cli.js +2 -2
  72. package/dist/types/types.d.ts +24 -9
  73. package/package.json +16 -16
  74. package/LICENSE +0 -21
  75. package/dist/types/client/preview/globals.d.ts +0 -1
  76. package/dist/types/client/preview/globals.js +0 -9
  77. package/dist/types/client/preview/types-7-0.d.ts +0 -9
  78. package/standalone.d.ts +0 -21
  79. package/standalone.js +0 -7
  80. package/types-6-0.d.ts +0 -1
  81. package/types-7-0.d.ts +0 -1
package/README.md CHANGED
@@ -12,7 +12,7 @@ So you can develop UI components in isolation without worrying about app specifi
12
12
 
13
13
  ```sh
14
14
  cd my-angular-app
15
- npx sb init
15
+ npx storybook init
16
16
  ```
17
17
 
18
18
  For more information visit: [storybook.js.org](https://storybook.js.org)
@@ -1,14 +1,11 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  const architect_1 = require("@angular-devkit/architect");
7
4
  const rxjs_1 = require("rxjs");
8
5
  const operators_1 = require("rxjs/operators");
9
6
  const find_up_1 = require("find-up");
10
- // eslint-disable-next-line import/no-extraneous-dependencies
11
- const standalone_1 = __importDefault(require("@storybook/angular/standalone"));
7
+ const read_pkg_up_1 = require("read-pkg-up");
8
+ const core_server_1 = require("@storybook/core-server");
12
9
  const run_compodoc_1 = require("../utils/run-compodoc");
13
10
  const build_standalone_errors_handler_1 = require("../utils/build-standalone-errors-handler");
14
11
  exports.default = (0, architect_1.createBuilder)(commandBuilder);
@@ -21,6 +18,7 @@ function commandBuilder(options, context) {
21
18
  }), (0, operators_1.map)(({ tsConfig }) => {
22
19
  const { browserTarget, stylePreprocessorOptions, styles, configDir, docs, loglevel, outputDir, quiet, webpackStatsJson, } = options;
23
20
  const standaloneOptions = {
21
+ packageJson: (0, read_pkg_up_1.sync)({ cwd: __dirname }).packageJson,
24
22
  configDir,
25
23
  docs,
26
24
  loglevel,
@@ -54,5 +52,5 @@ async function setup(options, context) {
54
52
  };
55
53
  }
56
54
  function runInstance(options) {
57
- return (0, rxjs_1.from)((0, standalone_1.default)(options)).pipe((0, operators_1.catchError)((error) => (0, rxjs_1.throwError)((0, build_standalone_errors_handler_1.buildStandaloneErrorHandler)(error))));
55
+ return (0, rxjs_1.from)((0, core_server_1.buildStaticStandalone)(options)).pipe((0, operators_1.catchError)((error) => (0, rxjs_1.throwError)((0, build_standalone_errors_handler_1.buildStandaloneErrorHandler)(error))));
58
56
  }
@@ -1,14 +1,11 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  const architect_1 = require("@angular-devkit/architect");
7
4
  const rxjs_1 = require("rxjs");
8
5
  const operators_1 = require("rxjs/operators");
9
6
  const find_up_1 = require("find-up");
10
- // eslint-disable-next-line import/no-extraneous-dependencies
11
- const standalone_1 = __importDefault(require("@storybook/angular/standalone"));
7
+ const read_pkg_up_1 = require("read-pkg-up");
8
+ const core_server_1 = require("@storybook/core-server");
12
9
  const run_compodoc_1 = require("../utils/run-compodoc");
13
10
  const build_standalone_errors_handler_1 = require("../utils/build-standalone-errors-handler");
14
11
  exports.default = (0, architect_1.createBuilder)(commandBuilder);
@@ -21,6 +18,7 @@ function commandBuilder(options, context) {
21
18
  }), (0, operators_1.map)(({ tsConfig }) => {
22
19
  const { browserTarget, stylePreprocessorOptions, styles, ci, configDir, docs, host, https, port, quiet, smokeTest, sslCa, sslCert, sslKey, } = options;
23
20
  const standaloneOptions = {
21
+ packageJson: (0, read_pkg_up_1.sync)({ cwd: __dirname }).packageJson,
24
22
  ci,
25
23
  configDir,
26
24
  docs,
@@ -61,6 +59,6 @@ async function setup(options, context) {
61
59
  function runInstance(options) {
62
60
  return new rxjs_1.Observable((observer) => {
63
61
  // This Observable intentionally never complete, leaving the process running ;)
64
- (0, standalone_1.default)(options).then(() => observer.next(), (error) => observer.error((0, build_standalone_errors_handler_1.buildStandaloneErrorHandler)(error)));
62
+ (0, core_server_1.buildDevStandalone)(options).then(() => observer.next(), (error) => observer.error((0, build_standalone_errors_handler_1.buildStandaloneErrorHandler)(error)));
65
63
  });
66
64
  }
@@ -1,11 +1,8 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.buildStandaloneErrorHandler = void 0;
7
4
  const node_logger_1 = require("@storybook/node-logger");
8
- const ts_dedent_1 = __importDefault(require("ts-dedent"));
5
+ const ts_dedent_1 = require("ts-dedent");
9
6
  const buildStandaloneErrorHandler = (error) => {
10
7
  // Duplicate code for Standalone error handling
11
8
  // Source: https://github.com/storybookjs/storybook/blob/39c7ba09ad84fbd466f9c25d5b92791a5450b9f6/lib/core-server/src/build-dev.ts#L136
@@ -26,11 +23,11 @@ const buildStandaloneErrorHandler = (error) => {
26
23
  }
27
24
  node_logger_1.logger.line();
28
25
  return error.close
29
- ? (0, ts_dedent_1.default) `
26
+ ? (0, ts_dedent_1.dedent) `
30
27
  FATAL broken build!, will close the process,
31
28
  Fix the error below and restart storybook.
32
29
  `
33
- : (0, ts_dedent_1.default) `
30
+ : (0, ts_dedent_1.dedent) `
34
31
  Broken build, fix the error above.
35
32
  You may need to refresh the browser.
36
33
  `;
@@ -48,8 +48,6 @@ const runCompodoc = ({ compodocArgs, tsconfig }, context) => {
48
48
  context.logger.info(finalCompodocArgs.join(' '));
49
49
  const child = (0, child_process_1.spawn)('npx', finalCompodocArgs, {
50
50
  cwd: context.workspaceRoot,
51
- env: process.env,
52
- shell: true,
53
51
  });
54
52
  child.stdout.on('data', (data) => {
55
53
  context.logger.info(data.toString());
@@ -0,0 +1,12 @@
1
+ import type { BuilderContext } from '@angular-devkit/architect';
2
+ import type { LoadOptions, CLIOptions, BuilderOptions } from '@storybook/core-common';
3
+ export declare type StandaloneOptions = Partial<CLIOptions & LoadOptions & BuilderOptions & {
4
+ mode?: 'static' | 'dev';
5
+ angularBrowserTarget?: string | null;
6
+ angularBuilderOptions?: Record<string, any> & {
7
+ styles?: any[];
8
+ stylePreprocessorOptions?: any;
9
+ };
10
+ angularBuilderContext?: BuilderContext | null;
11
+ tsConfig?: string;
12
+ }>;
@@ -1,6 +1,6 @@
1
1
  import { OnInit, ViewContainerRef, ComponentFactoryResolver, OnDestroy, ChangeDetectorRef } from '@angular/core';
2
2
  import { Observable, Subscription } from 'rxjs';
3
- import { StoryFnAngularReturnType } from '../../types';
3
+ import { StoryFnAngularReturnType } from '../types';
4
4
  export declare class AppComponent implements OnInit, OnDestroy {
5
5
  private cfr;
6
6
  private changeDetectorRef;
@@ -21,7 +21,7 @@ exports.AppComponent = void 0;
21
21
  const core_1 = require("@angular/core");
22
22
  const rxjs_1 = require("rxjs");
23
23
  const operators_1 = require("rxjs/operators");
24
- const app_token_1 = require("../app.token");
24
+ const app_token_1 = require("./app.token");
25
25
  let AppComponent = class AppComponent {
26
26
  constructor(cfr, changeDetectorRef, data) {
27
27
  this.cfr = cfr;
@@ -1,5 +1,5 @@
1
1
  import type { PartialStoryFn } from '@storybook/csf';
2
- import type { AngularFramework } from '../types-6-0';
2
+ import type { AngularFramework } from '../types';
3
3
  declare global {
4
4
  interface Window {
5
5
  NODE_ENV: 'string' | 'development' | undefined;
@@ -11,7 +11,7 @@ const forms_1 = require("@angular/forms");
11
11
  const platform_browser_dynamic_1 = require("@angular/platform-browser-dynamic");
12
12
  const platform_browser_1 = require("@angular/platform-browser");
13
13
  const rxjs_1 = require("rxjs");
14
- const app_component_1 = require("./components/app.component");
14
+ const app_component_1 = require("./app.component");
15
15
  const app_token_1 = require("./app.token");
16
16
  const { document } = global_1.default;
17
17
  let platform = null;
@@ -111,7 +111,7 @@ const initModule = (storyFn) => {
111
111
  };
112
112
  return getModule(componentDeclarations, [AnnotatedComponent], [app_component_1.AppComponent], story, moduleMetadata);
113
113
  };
114
- const staticRoot = document.getElementById('root');
114
+ const staticRoot = document.getElementById('storybook-root');
115
115
  const insertDynamicRoot = () => {
116
116
  const app = document.createElement('storybook-dynamic-app-root');
117
117
  staticRoot.innerHTML = '';
@@ -1,6 +1,5 @@
1
1
  import { Subject } from 'rxjs';
2
- import { ICollection, StoryFnAngularReturnType } from '../types';
3
- import { Parameters } from '../types-6-0';
2
+ import { ICollection, StoryFnAngularReturnType, Parameters } from '../types';
4
3
  declare type StoryRenderInfo = {
5
4
  storyFnAngular: StoryFnAngularReturnType;
6
5
  moduleMetadataSnapshot: string;
@@ -1,6 +1,5 @@
1
1
  import { AbstractRenderer } from './AbstractRenderer';
2
- import { StoryFnAngularReturnType } from '../types';
3
- import { Parameters } from '../types-6-0';
2
+ import { StoryFnAngularReturnType, Parameters } from '../types';
4
3
  export declare class CanvasRenderer extends AbstractRenderer {
5
4
  render(options: {
6
5
  storyFnAngular: StoryFnAngularReturnType;
@@ -1,6 +1,5 @@
1
1
  import { AbstractRenderer } from './AbstractRenderer';
2
- import { StoryFnAngularReturnType } from '../types';
3
- import { Parameters } from '../types-6-0';
2
+ import { StoryFnAngularReturnType, Parameters } from '../types';
4
3
  export declare class DocsRenderer extends AbstractRenderer {
5
4
  render(options: {
6
5
  storyFnAngular: StoryFnAngularReturnType;
@@ -37,16 +37,16 @@ class RendererFactory {
37
37
  }
38
38
  exports.RendererFactory = RendererFactory;
39
39
  const getRenderType = (targetDOMNode) => {
40
- return targetDOMNode.id === 'root' ? 'canvas' : 'docs';
40
+ return targetDOMNode.id === 'storybook-root' ? 'canvas' : 'docs';
41
41
  };
42
42
  exports.getRenderType = getRenderType;
43
43
  function clearRootHTMLElement(renderType) {
44
44
  switch (renderType) {
45
45
  case 'canvas':
46
- global.document.getElementById('docs-root').innerHTML = '';
46
+ global.document.getElementById('storybook-docs').innerHTML = '';
47
47
  break;
48
48
  case 'docs':
49
- global.document.getElementById('root').innerHTML = '';
49
+ global.document.getElementById('storybook-root').innerHTML = '';
50
50
  break;
51
51
  default:
52
52
  break;
@@ -12,18 +12,18 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.createStorybookModule = exports.getStorybookModuleMetadata = void 0;
13
13
  const core_1 = require("@angular/core");
14
14
  const platform_browser_1 = require("@angular/platform-browser");
15
- const ts_dedent_1 = __importDefault(require("ts-dedent"));
15
+ const ts_dedent_1 = require("ts-dedent");
16
16
  const util_deprecate_1 = __importDefault(require("util-deprecate"));
17
17
  const StorybookProvider_1 = require("./StorybookProvider");
18
18
  const NgModulesAnalyzer_1 = require("./utils/NgModulesAnalyzer");
19
19
  const NgComponentAnalyzer_1 = require("./utils/NgComponentAnalyzer");
20
20
  const StorybookWrapperComponent_1 = require("./StorybookWrapperComponent");
21
21
  const ComputesTemplateFromComponent_1 = require("./ComputesTemplateFromComponent");
22
- const deprecatedStoryComponentWarning = (0, util_deprecate_1.default)(() => { }, (0, ts_dedent_1.default) `\`component\` story return value is deprecated, and will be removed in Storybook 7.0.
22
+ const deprecatedStoryComponentWarning = (0, util_deprecate_1.default)(() => { }, (0, ts_dedent_1.dedent) `\`component\` story return value is deprecated, and will be removed in Storybook 7.0.
23
23
  Instead, use \`export const default = () => ({ component: AppComponent });\`
24
24
  or
25
25
  \`\`\`
26
- export const Primary: Story = () => ({});
26
+ export const Primary: StoryFn = () => ({});
27
27
  Primary.parameters = { component: AppComponent };
28
28
  \`\`\`
29
29
  Read more at
@@ -2,5 +2,5 @@ import './globals';
2
2
  export { render, renderToDOM } from './render';
3
3
  export { decorateStory } from './decorateStory';
4
4
  export declare const parameters: {
5
- framework: string;
5
+ framework: "angular";
6
6
  };
@@ -1,4 +1,4 @@
1
1
  import type { DecoratorFunction, LegacyStoryFn } from '@storybook/csf';
2
- import type { AngularFramework } from './types-6-0';
2
+ import type { AngularFramework } from './types';
3
3
  export default function decorateStory(mainStoryFn: LegacyStoryFn<AngularFramework>, decorators: DecoratorFunction<AngularFramework>[]): LegacyStoryFn<AngularFramework>;
4
4
  export { decorateStory };
@@ -1,6 +1,5 @@
1
1
  import type { Type } from '@angular/core';
2
2
  import type { DecoratorFunction, StoryContext } from '@storybook/csf';
3
- import type { ICollection, NgModuleMetadata } from './types';
4
- import type { AngularFramework } from './types-6-0';
3
+ import type { ICollection, NgModuleMetadata, AngularFramework } from './types';
5
4
  export declare const moduleMetadata: <TArgs = any>(metadata: Partial<NgModuleMetadata>) => DecoratorFunction<AngularFramework, TArgs>;
6
5
  export declare const componentWrapperDecorator: <TArgs = any>(element: Type<unknown> | ((story: string) => string), props?: ICollection | ((storyContext: StoryContext<AngularFramework, TArgs>) => ICollection)) => DecoratorFunction<AngularFramework, TArgs>;
@@ -10,5 +10,5 @@ export declare const parameters: {
10
10
  };
11
11
  };
12
12
  };
13
- export declare const decorators: ((storyFn: import("@storybook/csf").PartialStoryFn<import("..").AngularFramework, import("@storybook/csf").Args>, context: import("..").StoryContext) => import("..").IStory)[];
13
+ export declare const decorators: ((storyFn: import("@storybook/csf").PartialStoryFn<import("../types").AngularFramework, import("@storybook/csf").Args>, context: import("../types").StoryContext) => import("..").IStory)[];
14
14
  export declare const argTypesEnhancers: (<TFramework extends import("@storybook/csf").AnyFramework>(context: import("@storybook/csf").StoryContextForEnhancers<TFramework, import("@storybook/csf").Args>) => import("@storybook/csf").StrictArgTypes<import("@storybook/csf").Args> | import("lib/addons/dist/types").Parameters)[];
@@ -1,9 +1,9 @@
1
1
  import type { PartialStoryFn } from '@storybook/csf';
2
- import { StoryContext, AngularFramework } from '..';
2
+ import { StoryContext, AngularFramework } from '../types';
3
3
  export declare const skipSourceRender: (context: StoryContext) => any;
4
4
  /**
5
5
  * Angular source decorator.
6
6
  * @param storyFn Fn
7
7
  * @param context StoryContext
8
8
  */
9
- export declare const sourceDecorator: (storyFn: PartialStoryFn<AngularFramework>, context: StoryContext) => import("..").IStory;
9
+ export declare const sourceDecorator: (storyFn: PartialStoryFn<AngularFramework>, context: StoryContext) => import("../types").StoryFnAngularReturnType;
@@ -29,13 +29,3 @@ import 'core-js/proposals/reflect-metadata';
29
29
  * Zone JS is required by Angular itself.
30
30
  */
31
31
  import 'zone.js/dist/zone';
32
- /** *************************************************************************************************
33
- * APPLICATION IMPORTS
34
- */
35
- /**
36
- * Date, currency, decimal and percent pipes.
37
- * Needed for: All but Chrome, Firefox, Edge, IE11 and Safari 10
38
- */
39
- /**
40
- * Need to import at least one locale-data with intl.
41
- */
@@ -1,4 +1,9 @@
1
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"));
2
7
  /**
3
8
  * This file includes polyfills needed by Angular and is loaded before the app.
4
9
  * You can add your own extra polyfills to this file.
@@ -14,7 +19,6 @@
14
19
  *
15
20
  * Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
16
21
  */
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
22
  /** *************************************************************************************************
19
23
  * BROWSER POLYFILLS
20
24
  */
@@ -59,3 +63,5 @@ require("zone.js/dist/zone"); // Included with Angular CLI.
59
63
  * Need to import at least one locale-data with intl.
60
64
  */
61
65
  // import 'intl/locale-data/jsonp/en';
66
+ const { window: globalWindow } = global_1.default;
67
+ globalWindow.STORYBOOK_ENV = 'angular';
@@ -1,4 +1,5 @@
1
- export { storiesOf, setAddon, addDecorator, addParameters, configure, getStorybook, forceReRender, raw, } from './preview';
2
- export * from './preview/types-6-0';
3
- export type { StoryFnAngularReturnType as IStory } from './preview/types';
4
- export { moduleMetadata, componentWrapperDecorator } from './preview/decorators';
1
+ import './globals';
2
+ export * from './public-api';
3
+ export * from './public-types';
4
+ export type { StoryFnAngularReturnType as IStory } from './types';
5
+ export { moduleMetadata, componentWrapperDecorator } from './decorators';
@@ -14,18 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.componentWrapperDecorator = exports.moduleMetadata = exports.raw = exports.forceReRender = exports.getStorybook = exports.configure = exports.addParameters = exports.addDecorator = exports.setAddon = exports.storiesOf = void 0;
18
- var preview_1 = require("./preview");
19
- Object.defineProperty(exports, "storiesOf", { enumerable: true, get: function () { return preview_1.storiesOf; } });
20
- Object.defineProperty(exports, "setAddon", { enumerable: true, get: function () { return preview_1.setAddon; } });
21
- Object.defineProperty(exports, "addDecorator", { enumerable: true, get: function () { return preview_1.addDecorator; } });
22
- Object.defineProperty(exports, "addParameters", { enumerable: true, get: function () { return preview_1.addParameters; } });
23
- Object.defineProperty(exports, "configure", { enumerable: true, get: function () { return preview_1.configure; } });
24
- Object.defineProperty(exports, "getStorybook", { enumerable: true, get: function () { return preview_1.getStorybook; } });
25
- Object.defineProperty(exports, "forceReRender", { enumerable: true, get: function () { return preview_1.forceReRender; } });
26
- Object.defineProperty(exports, "raw", { enumerable: true, get: function () { return preview_1.raw; } });
27
- __exportStar(require("./preview/types-6-0"), exports);
28
- var decorators_1 = require("./preview/decorators");
17
+ exports.componentWrapperDecorator = exports.moduleMetadata = void 0;
18
+ require("./globals");
19
+ __exportStar(require("./public-api"), exports);
20
+ __exportStar(require("./public-types"), exports);
21
+ var decorators_1 = require("./decorators");
29
22
  Object.defineProperty(exports, "moduleMetadata", { enumerable: true, get: function () { return decorators_1.moduleMetadata; } });
30
23
  Object.defineProperty(exports, "componentWrapperDecorator", { enumerable: true, get: function () { return decorators_1.componentWrapperDecorator; } });
31
24
  // optimization: stop HMR propagation in webpack
@@ -1,9 +1,8 @@
1
- /// <reference types="webpack-env" />
2
1
  /// <reference types="node" />
2
+ /// <reference types="webpack-env" />
3
3
  import type { ClientStoryApi, Loadable } from '@storybook/addons';
4
- import './globals';
5
- import type { IStorybookSection } from './types';
6
- import type { AngularFramework } from './types-6-0';
4
+ import type { IStorybookSection, AngularFramework } from './types';
5
+ export * from './public-types';
7
6
  interface ClientApi extends ClientStoryApi<AngularFramework['storyResult']> {
8
7
  setAddon(addon: any): void;
9
8
  configure(loader: Loadable, module: NodeModule): void;
@@ -22,4 +21,3 @@ export declare const setAddon: ClientApi['setAddon'];
22
21
  export declare const forceReRender: ClientApi['forceReRender'];
23
22
  export declare const getStorybook: ClientApi['getStorybook'];
24
23
  export declare const raw: ClientApi['raw'];
25
- export {};
@@ -1,22 +1,36 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
18
  };
5
19
  Object.defineProperty(exports, "__esModule", { value: true });
6
20
  exports.raw = exports.getStorybook = exports.forceReRender = exports.setAddon = exports.clearDecorators = exports.addParameters = exports.addDecorator = exports.configure = exports.storiesOf = void 0;
7
21
  const core_client_1 = require("@storybook/core-client");
8
- require("./globals");
9
22
  const render_1 = require("./render");
10
23
  const decorateStory_1 = __importDefault(require("./decorateStory"));
11
- const framework = 'angular';
24
+ __exportStar(require("./public-types"), exports);
25
+ const FRAMEWORK = 'angular';
12
26
  const api = (0, core_client_1.start)(render_1.renderToDOM, { decorateStory: decorateStory_1.default, render: render_1.render });
13
27
  const storiesOf = (kind, m) => {
14
28
  return api.clientApi.storiesOf(kind, m).addParameters({
15
- framework,
29
+ framework: FRAMEWORK,
16
30
  });
17
31
  };
18
32
  exports.storiesOf = storiesOf;
19
- const configure = (...args) => api.configure(framework, ...args);
33
+ const configure = (...args) => api.configure(FRAMEWORK, ...args);
20
34
  exports.configure = configure;
21
35
  exports.addDecorator = api.clientApi
22
36
  .addDecorator;
@@ -1,10 +1,6 @@
1
- import type { Args, Parameters as DefaultParameters, StoryContext as DefaultStoryContext, ComponentAnnotations, StoryAnnotations, AnnotatedStoryFn } from '@storybook/csf';
2
- import type { StoryFnAngularReturnType } from './types';
1
+ import type { Args, ComponentAnnotations, StoryAnnotations, AnnotatedStoryFn } from '@storybook/csf';
2
+ import { AngularFramework } from './types';
3
3
  export type { Args, ArgTypes } from '@storybook/csf';
4
- export declare type AngularFramework = {
5
- component: any;
6
- storyResult: StoryFnAngularReturnType;
7
- };
8
4
  /**
9
5
  * Metadata to configure the stories for a component.
10
6
  *
@@ -24,19 +20,8 @@ export declare type StoryFn<TArgs = Args> = AnnotatedStoryFn<AngularFramework, T
24
20
  */
25
21
  export declare type StoryObj<TArgs = Args> = StoryAnnotations<AngularFramework, TArgs>;
26
22
  /**
27
- * Story function that represents a CSFv2 component example.
23
+ * Story function that represents a CSFv3 component example.
28
24
  *
29
25
  * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
30
- *
31
- * NOTE that in Storybook 7.0, this type will be renamed to `StoryFn` and replaced by the current `StoryObj` type.
32
- *
33
26
  */
34
- export declare type Story<TArgs = Args> = StoryFn<TArgs>;
35
- export declare type Parameters = DefaultParameters & {
36
- /** Uses legacy angular rendering engine that use dynamic component */
37
- angularLegacyRendering?: boolean;
38
- bootstrapModuleOptions?: unknown;
39
- };
40
- export declare type StoryContext = DefaultStoryContext<AngularFramework> & {
41
- parameters: Parameters;
42
- };
27
+ export declare type Story<TArgs = Args> = StoryObj<TArgs>;
@@ -1,6 +1,6 @@
1
1
  import type { RenderContext } from '@storybook/store';
2
2
  import type { ArgsStoryFn } from '@storybook/csf';
3
- import type { AngularFramework } from './types-6-0';
3
+ import type { AngularFramework } from './types';
4
4
  import { RendererFactory } from './angular-beta/RendererFactory';
5
5
  export declare const rendererFactory: RendererFactory;
6
6
  export declare const render: ArgsStoryFn<AngularFramework>;
@@ -1,3 +1,4 @@
1
+ import type { Parameters as DefaultParameters, StoryContext as DefaultStoryContext } from '@storybook/csf';
1
2
  export interface NgModuleMetadata {
2
3
  declarations?: any[];
3
4
  entryComponents?: any[];
@@ -27,3 +28,15 @@ export interface StoryFnAngularReturnType {
27
28
  styles?: string[];
28
29
  userDefinedTemplate?: boolean;
29
30
  }
31
+ export declare type AngularFramework = {
32
+ component: any;
33
+ storyResult: StoryFnAngularReturnType;
34
+ };
35
+ export declare type Parameters = DefaultParameters & {
36
+ /** Uses legacy angular rendering engine that use dynamic component */
37
+ angularLegacyRendering?: boolean;
38
+ bootstrapModuleOptions?: unknown;
39
+ };
40
+ export declare type StoryContext = DefaultStoryContext<AngularFramework> & {
41
+ parameters: Parameters;
42
+ };
File without changes
@@ -1,2 +1,2 @@
1
- export * from './client';
1
+ export * from './client/index';
2
2
  export * from './types';
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./client"), exports);
17
+ __exportStar(require("./client/index"), exports);
18
18
  __exportStar(require("./types"), exports);
19
19
  /*
20
20
  * ATTENTION:
@@ -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 addons: StorybookConfig['addons'];
4
- export declare const core: (config: StorybookConfig['core']) => Promise<{
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>;
@@ -3,23 +3,27 @@ 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.addons = exports.previewAnnotations = void 0;
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
9
  require.resolve('./server/framework-preset-angular'),
15
10
  require.resolve('./server/framework-preset-angular-cli'),
16
11
  require.resolve('./server/framework-preset-angular-ivy'),
17
12
  require.resolve('./server/framework-preset-angular-docs'),
18
13
  ];
19
- const core = async (config) => {
14
+ const previewAnnotations = (entries = []) => [
15
+ ...entries,
16
+ require.resolve('./client/config'),
17
+ ];
18
+ exports.previewAnnotations = previewAnnotations;
19
+ const core = async (config, options) => {
20
+ const framework = await options.presets.apply('framework');
20
21
  return {
21
22
  ...config,
22
- builder: path_1.default.dirname(require.resolve(path_1.default.join('@storybook/builder-webpack5', 'package.json'))),
23
+ builder: {
24
+ name: path_1.default.dirname(require.resolve(path_1.default.join('@storybook/builder-webpack5', 'package.json'))),
25
+ options: typeof framework === 'string' ? {} : framework.options.builder || {},
26
+ },
23
27
  };
24
28
  };
25
29
  exports.core = core;
@@ -1,4 +1,4 @@
1
- export { computesTemplateSourceFromComponent } from './client/preview/angular-beta/ComputesTemplateFromComponent';
2
- export { rendererFactory } from './client/preview/render';
3
- export { AbstractRenderer } from './client/preview/angular-beta/AbstractRenderer';
4
- export { getStorybookModuleMetadata } from './client/preview/angular-beta/StorybookModule';
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';
@@ -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/preview/angular-beta/ComputesTemplateFromComponent");
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/preview/render");
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/preview/angular-beta/AbstractRenderer");
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/preview/angular-beta/StorybookModule");
10
+ var StorybookModule_1 = require("./client/angular-beta/StorybookModule");
11
11
  Object.defineProperty(exports, "getStorybookModuleMetadata", { enumerable: true, get: function () { return StorybookModule_1.getStorybookModuleMetadata; } });
@@ -8,9 +8,6 @@
8
8
  "esModuleInterop": true,
9
9
  "skipLibCheck": true,
10
10
  "target": "es5",
11
- "lib": [
12
- "es2017",
13
- "dom"
14
- ]
11
+ "lib": ["es2017", "dom"]
15
12
  }
16
13
  }
@@ -8,9 +8,6 @@
8
8
  "esModuleInterop": true,
9
9
  "skipLibCheck": true,
10
10
  "target": "es5",
11
- "lib": [
12
- "es2017",
13
- "dom"
14
- ]
11
+ "lib": ["es2017", "dom"]
15
12
  }
16
13
  }
@@ -8,9 +8,6 @@
8
8
  "esModuleInterop": true,
9
9
  "skipLibCheck": true,
10
10
  "target": "es5",
11
- "lib": [
12
- "es2017",
13
- "dom"
14
- ]
11
+ "lib": ["es2017", "dom"]
15
12
  }
16
13
  }
@@ -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
  }
@@ -8,9 +8,6 @@
8
8
  "esModuleInterop": true,
9
9
  "skipLibCheck": true,
10
10
  "target": "es5",
11
- "lib": [
12
- "es2017",
13
- "dom"
14
- ]
11
+ "lib": ["es2017", "dom"]
15
12
  }
16
13
  }
@@ -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
  }
@@ -8,9 +8,6 @@
8
8
  "esModuleInterop": true,
9
9
  "skipLibCheck": true,
10
10
  "target": "es5",
11
- "lib": [
12
- "es2017",
13
- "dom"
14
- ]
11
+ "lib": ["es2017", "dom"]
15
12
  }
16
13
  }
@@ -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
  }
@@ -8,9 +8,6 @@
8
8
  "esModuleInterop": true,
9
9
  "skipLibCheck": true,
10
10
  "target": "es5",
11
- "lib": [
12
- "es2017",
13
- "dom"
14
- ]
11
+ "lib": ["es2017", "dom"]
15
12
  }
16
13
  }
@@ -8,9 +8,6 @@
8
8
  "esModuleInterop": true,
9
9
  "skipLibCheck": true,
10
10
  "target": "es5",
11
- "lib": [
12
- "es2017",
13
- "dom"
14
- ]
11
+ "lib": ["es2017", "dom"]
15
12
  }
16
13
  }
@@ -31,7 +31,7 @@ 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
33
  const semver_1 = __importDefault(require("@storybook/semver"));
34
- const ts_dedent_1 = __importDefault(require("ts-dedent"));
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
37
  const angular_cli_webpack_12_2_x_1 = require("./angular-cli-webpack-12.2.x");
@@ -139,7 +139,7 @@ async function getLegacyDefaultBuildOptions(options) {
139
139
  // Not use legacy way with builder (`angularBrowserTarget` is defined or null with builder and undefined without)
140
140
  return {};
141
141
  }
142
- node_logger_1.logger.warn((0, ts_dedent_1.default) `Your Storybook startup uses a solution that will not be supported in version 7.0.
142
+ 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
143
  You must use angular builder to have an explicit configuration on the project used in angular.json
144
144
  Read more at:
145
145
  - https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#sb-angular-builder)
@@ -1,13 +1,28 @@
1
- import type { StorybookConfig as BaseConfig } from '@storybook/core-common';
2
- export interface AngularOptions {
3
- enableIvy: boolean;
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 interface StorybookConfig extends BaseConfig {
9
- framework: string | {
10
- name: '@storybook/angular';
11
- options: AngularOptions;
12
- };
24
+ export declare type StorybookConfig = Omit<StorybookConfigBase, keyof StorybookConfigWebpack | keyof StorybookConfigFramework> & StorybookConfigWebpack & StorybookConfigFramework;
25
+ export interface AngularOptions {
26
+ enableIvy: boolean;
13
27
  }
28
+ export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/angular",
3
- "version": "7.0.0-alpha.3",
3
+ "version": "7.0.0-alpha.30",
4
4
  "description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.",
5
5
  "keywords": [
6
6
  "storybook",
@@ -30,22 +30,23 @@
30
30
  "*.d.ts"
31
31
  ],
32
32
  "scripts": {
33
- "prepare": "node ../../scripts/prepare.js"
33
+ "check": "tsc --noEmit",
34
+ "prepare": "node ../../../scripts/prepare.js"
34
35
  },
35
36
  "dependencies": {
36
- "@storybook/addons": "7.0.0-alpha.3",
37
- "@storybook/api": "7.0.0-alpha.3",
38
- "@storybook/builder-webpack5": "7.0.0-alpha.3",
39
- "@storybook/client-logger": "7.0.0-alpha.3",
40
- "@storybook/core-client": "7.0.0-alpha.3",
41
- "@storybook/core-common": "7.0.0-alpha.3",
42
- "@storybook/core-events": "7.0.0-alpha.3",
43
- "@storybook/core-server": "7.0.0-alpha.3",
44
- "@storybook/csf": "0.0.2--canary.4566f4d.1",
45
- "@storybook/docs-tools": "7.0.0-alpha.3",
46
- "@storybook/node-logger": "7.0.0-alpha.3",
37
+ "@storybook/addons": "7.0.0-alpha.30",
38
+ "@storybook/api": "7.0.0-alpha.30",
39
+ "@storybook/builder-webpack5": "7.0.0-alpha.30",
40
+ "@storybook/client-logger": "7.0.0-alpha.30",
41
+ "@storybook/core-client": "7.0.0-alpha.30",
42
+ "@storybook/core-common": "7.0.0-alpha.30",
43
+ "@storybook/core-events": "7.0.0-alpha.30",
44
+ "@storybook/core-server": "7.0.0-alpha.30",
45
+ "@storybook/csf": "0.0.2--canary.0899bb7.0",
46
+ "@storybook/docs-tools": "7.0.0-alpha.30",
47
+ "@storybook/node-logger": "7.0.0-alpha.30",
47
48
  "@storybook/semver": "^7.3.2",
48
- "@storybook/store": "7.0.0-alpha.3",
49
+ "@storybook/store": "7.0.0-alpha.30",
49
50
  "@types/node": "^14.14.20 || ^16.0.0",
50
51
  "@types/react": "^16.14.23",
51
52
  "@types/react-dom": "^16.9.14",
@@ -62,7 +63,6 @@
62
63
  "react": "^16.14.0",
63
64
  "react-dom": "^16.14.0",
64
65
  "read-pkg-up": "^7.0.1",
65
- "regenerator-runtime": "^0.13.7",
66
66
  "sass-loader": "^12.6.0",
67
67
  "telejson": "^6.0.8",
68
68
  "ts-dedent": "^2.0.0",
@@ -128,5 +128,5 @@
128
128
  "access": "public"
129
129
  },
130
130
  "builders": "dist/types/builders/builders.json",
131
- "gitHead": "629b056190993bcee6445471b8cb27208eb401a9"
131
+ "gitHead": "aabf7b595cb13d8a86dca27ad3d6039205bd55d6"
132
132
  }
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,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>;
package/standalone.d.ts DELETED
@@ -1,21 +0,0 @@
1
- import type { CLIOptions, LoadOptions, BuilderOptions } from '@storybook/core-common';
2
- import type { BuilderContext } from '@angular-devkit/architect';
3
-
4
- export type StandaloneOptions = Partial<
5
- CLIOptions &
6
- LoadOptions &
7
- BuilderOptions & {
8
- mode?: 'static' | 'dev';
9
- angularBrowserTarget?: string | null;
10
- angularBuilderOptions?: Record<string, any> & {
11
- styles?: any[];
12
- stylePreprocessorOptions?: any;
13
- };
14
- angularBuilderContext?: BuilderContext | null;
15
- tsConfig?: string;
16
- }
17
- >;
18
-
19
- declare module '@storybook/angular/standalone' {
20
- export default function buildStandalone(options: StandaloneOptions): Promise<unknown>;
21
- }
package/standalone.js DELETED
@@ -1,7 +0,0 @@
1
- const build = require('@storybook/core-server/standalone');
2
-
3
- async function buildStandalone(options) {
4
- return build(options);
5
- }
6
-
7
- module.exports = buildStandalone;
package/types-6-0.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './dist/types/client/preview/types-6-0.d';
package/types-7-0.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './dist/types/client/preview/types-7-0.d';