@storybook/angular 7.0.0-alpha.44 → 7.0.0-alpha.46

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 (28) hide show
  1. package/.eslintrc.js +8 -0
  2. package/dist/types/builders/build-storybook/index.d.ts +1 -1
  3. package/dist/types/builders/start-storybook/index.d.ts +1 -1
  4. package/dist/types/builders/utils/standalone-options.d.ts +2 -2
  5. package/dist/types/client/angular/app.component.d.ts +1 -1
  6. package/dist/types/client/angular/helpers.d.ts +2 -2
  7. package/dist/types/client/angular-beta/ComputesTemplateFromComponent.d.ts +3 -3
  8. package/dist/types/client/angular-beta/StorybookModule.d.ts +1 -1
  9. package/dist/types/client/angular-beta/StorybookProvider.d.ts +1 -1
  10. package/dist/types/client/angular-beta/utils/NgComponentAnalyzer.d.ts +1 -1
  11. package/dist/types/client/decorateStory.d.ts +2 -2
  12. package/dist/types/client/decorators.d.ts +3 -3
  13. package/dist/types/client/docs/compodoc.d.ts +2 -2
  14. package/dist/types/client/docs/config.d.ts +1 -1
  15. package/dist/types/client/docs/sourceDecorator.d.ts +1 -1
  16. package/dist/types/client/public-api.d.ts +2 -2
  17. package/dist/types/client/public-types.d.ts +1 -1
  18. package/dist/types/client/render.d.ts +2 -2
  19. package/dist/types/client/types.d.ts +1 -1
  20. package/dist/types/preset.d.ts +1 -1
  21. package/dist/types/server/framework-preset-angular-cli.d.ts +1 -1
  22. package/dist/types/server/framework-preset-angular-docs.d.ts +1 -1
  23. package/dist/types/server/framework-preset-angular-ivy.d.ts +1 -1
  24. package/dist/types/server/preset-options.d.ts +1 -1
  25. package/dist/types/server/utils/filter-out-styling-rules.d.ts +1 -1
  26. package/dist/types/server/utils/normalize-asset-patterns.d.ts +1 -1
  27. package/dist/types/types.d.ts +2 -2
  28. package/package.json +15 -15
package/.eslintrc.js ADDED
@@ -0,0 +1,8 @@
1
+ module.exports = {
2
+ rules: {
3
+ '@typescript-eslint/consistent-type-imports': [
4
+ 'error',
5
+ { prefer: 'no-type-imports', disallowTypeAnnotations: false },
6
+ ],
7
+ },
8
+ };
@@ -1,6 +1,6 @@
1
1
  import { BuilderOutput } from '@angular-devkit/architect';
2
2
  import { JsonObject } from '@angular-devkit/core';
3
- import type { CLIOptions } from '@storybook/types';
3
+ import { CLIOptions } from '@storybook/types';
4
4
  import { ExtraEntryPoint, StylePreprocessorOptions } from '@angular-devkit/build-angular';
5
5
  export declare type StorybookBuilderOptions = JsonObject & {
6
6
  browserTarget?: string | null;
@@ -1,7 +1,7 @@
1
1
  import { BuilderOutput } from '@angular-devkit/architect';
2
2
  import { JsonObject } from '@angular-devkit/core';
3
3
  import { ExtraEntryPoint, StylePreprocessorOptions } from '@angular-devkit/build-angular';
4
- import type { CLIOptions } from '@storybook/types';
4
+ import { CLIOptions } from '@storybook/types';
5
5
  export declare type StorybookBuilderOptions = JsonObject & {
6
6
  browserTarget?: string | null;
7
7
  tsConfig?: string;
@@ -1,5 +1,5 @@
1
- import type { BuilderContext } from '@angular-devkit/architect';
2
- import type { LoadOptions, CLIOptions, BuilderOptions } from '@storybook/types';
1
+ import { BuilderContext } from '@angular-devkit/architect';
2
+ import { LoadOptions, CLIOptions, BuilderOptions } from '@storybook/types';
3
3
  export declare type StandaloneOptions = Partial<CLIOptions & LoadOptions & BuilderOptions & {
4
4
  mode?: 'static' | 'dev';
5
5
  angularBrowserTarget?: string | null;
@@ -1,4 +1,4 @@
1
- import { OnInit, ViewContainerRef, ComponentFactoryResolver, OnDestroy, ChangeDetectorRef } from '@angular/core';
1
+ import { ViewContainerRef, ChangeDetectorRef, OnInit, ComponentFactoryResolver, OnDestroy } from '@angular/core';
2
2
  import { Observable, Subscription } from 'rxjs';
3
3
  import { StoryFnAngularReturnType } from '../types';
4
4
  export declare class AppComponent implements OnInit, OnDestroy {
@@ -1,5 +1,5 @@
1
- import type { PartialStoryFn } from '@storybook/types';
2
- import type { AngularFramework } from '../types';
1
+ import { PartialStoryFn } from '@storybook/types';
2
+ import { AngularFramework } from '../types';
3
3
  declare global {
4
4
  interface Window {
5
5
  NODE_ENV: 'string' | 'development' | undefined;
@@ -1,6 +1,6 @@
1
- import type { Type } from '@angular/core';
2
- import type { API_ArgTypes } from '@storybook/types';
3
- import type { ICollection } from '../types';
1
+ import { Type } from '@angular/core';
2
+ import { API_ArgTypes } from '@storybook/types';
3
+ import { ICollection } from '../types';
4
4
  /**
5
5
  * Converts a component into a template with inputs/outputs present in initial props
6
6
  * @param component
@@ -1,4 +1,4 @@
1
- import { NgModule, Type } from '@angular/core';
1
+ import { Type, NgModule } from '@angular/core';
2
2
  import { Subject } from 'rxjs';
3
3
  import { ICollection, StoryFnAngularReturnType } from '../types';
4
4
  export declare const getStorybookModuleMetadata: ({ storyFnAngular, component, targetSelector, }: {
@@ -1,4 +1,4 @@
1
- import { InjectionToken, Provider } from '@angular/core';
1
+ import { Provider, InjectionToken } from '@angular/core';
2
2
  import { Subject } from 'rxjs';
3
3
  import { ICollection } from '../types';
4
4
  export declare const STORY_PROPS: InjectionToken<Subject<ICollection>>;
@@ -1,4 +1,4 @@
1
- import { Component, Type } from '@angular/core';
1
+ import { Type, Component } from '@angular/core';
2
2
  export declare type ComponentInputsOutputs = {
3
3
  inputs: {
4
4
  propName: string;
@@ -1,4 +1,4 @@
1
- import type { DecoratorFunction, LegacyStoryFn } from '@storybook/types';
2
- import type { AngularFramework } from './types';
1
+ import { DecoratorFunction, LegacyStoryFn } from '@storybook/types';
2
+ import { AngularFramework } from './types';
3
3
  export default function decorateStory(mainStoryFn: LegacyStoryFn<AngularFramework>, decorators: DecoratorFunction<AngularFramework>[]): LegacyStoryFn<AngularFramework>;
4
4
  export { decorateStory };
@@ -1,5 +1,5 @@
1
- import type { Type } from '@angular/core';
2
- import type { DecoratorFunction, StoryContext } from '@storybook/types';
3
- import type { ICollection, NgModuleMetadata, AngularFramework } from './types';
1
+ import { Type } from '@angular/core';
2
+ import { DecoratorFunction, StoryContext } from '@storybook/types';
3
+ import { ICollection, NgModuleMetadata, AngularFramework } from './types';
4
4
  export declare const moduleMetadata: <TArgs = any>(metadata: Partial<NgModuleMetadata>) => DecoratorFunction<AngularFramework, TArgs>;
5
5
  export declare const componentWrapperDecorator: <TArgs = any>(element: Type<unknown> | ((story: string) => string), props?: ICollection | ((storyContext: StoryContext<AngularFramework, TArgs>) => ICollection)) => DecoratorFunction<AngularFramework, TArgs>;
@@ -1,5 +1,5 @@
1
- import type { API_ArgTypes } from '@storybook/types';
2
- import type { Class, CompodocJson, Component, Injectable, Method, Pipe, Property, Directive } from './types';
1
+ import { API_ArgTypes } from '@storybook/types';
2
+ import { Class, CompodocJson, Component, Injectable, Method, Pipe, Property, Directive } from './types';
3
3
  export declare const isMethod: (methodOrProp: Method | Property) => methodOrProp is Method;
4
4
  export declare const setCompodocJson: (compodocJson: CompodocJson) => void;
5
5
  export declare const getCompodocJson: () => CompodocJson;
@@ -1,4 +1,4 @@
1
- import type { Parameters, DecoratorFunction, ArgTypesEnhancer } from '@storybook/types';
1
+ import { Parameters, DecoratorFunction, ArgTypesEnhancer } from '@storybook/types';
2
2
  export declare const parameters: Parameters;
3
3
  export declare const decorators: DecoratorFunction[];
4
4
  export declare const argTypesEnhancers: ArgTypesEnhancer[];
@@ -1,4 +1,4 @@
1
- import type { PartialStoryFn } from '@storybook/types';
1
+ import { PartialStoryFn } from '@storybook/types';
2
2
  import { StoryContext, AngularFramework } from '../types';
3
3
  export declare const skipSourceRender: (context: StoryContext) => any;
4
4
  /**
@@ -1,7 +1,7 @@
1
1
  /// <reference types="webpack-env" />
2
2
  /// <reference types="node" />
3
- import type { Addon_ClientStoryApi, Addon_Loadable } from '@storybook/types';
4
- import type { AngularFramework } from './types';
3
+ import { Addon_ClientStoryApi, Addon_Loadable } from '@storybook/types';
4
+ import { AngularFramework } from './types';
5
5
  export * from './public-types';
6
6
  interface ClientApi extends Addon_ClientStoryApi<AngularFramework['storyResult']> {
7
7
  configure(loader: Addon_Loadable, module: NodeModule): void;
@@ -1,4 +1,4 @@
1
- import type { AnnotatedStoryFn, Args, ComponentAnnotations, StoryAnnotations } from '@storybook/types';
1
+ import { AnnotatedStoryFn, Args, ComponentAnnotations, StoryAnnotations } from '@storybook/types';
2
2
  import { AngularFramework } from './types';
3
3
  export type { Args, ArgTypes } from '@storybook/types';
4
4
  /**
@@ -1,5 +1,5 @@
1
- import type { Store_RenderContext, ArgsStoryFn } from '@storybook/types';
2
- import type { AngularFramework } from './types';
1
+ import { Store_RenderContext, ArgsStoryFn } from '@storybook/types';
2
+ import { AngularFramework } from './types';
3
3
  import { RendererFactory } from './angular-beta/RendererFactory';
4
4
  export declare const rendererFactory: RendererFactory;
5
5
  export declare const render: ArgsStoryFn<AngularFramework>;
@@ -1,4 +1,4 @@
1
- import type { Parameters as DefaultParameters, StoryContext as DefaultStoryContext } from '@storybook/types';
1
+ import { Parameters as DefaultParameters, StoryContext as DefaultStoryContext } from '@storybook/types';
2
2
  export interface NgModuleMetadata {
3
3
  declarations?: any[];
4
4
  entryComponents?: any[];
@@ -1,4 +1,4 @@
1
- import type { PresetProperty } from '@storybook/types';
1
+ import { PresetProperty } from '@storybook/types';
2
2
  import { StorybookConfig } from './types';
3
3
  export declare const addons: PresetProperty<'addons', StorybookConfig>;
4
4
  export declare const previewAnnotations: StorybookConfig['previewAnnotations'];
@@ -1,3 +1,3 @@
1
1
  import webpack from 'webpack';
2
- import type { PresetOptions } from './preset-options';
2
+ import { PresetOptions } from './preset-options';
3
3
  export declare function webpackFinal(baseConfig: webpack.Configuration, options: PresetOptions): Promise<webpack.Configuration>;
@@ -1,2 +1,2 @@
1
- import type { StorybookConfig } from '@storybook/types';
1
+ import { StorybookConfig } from '@storybook/types';
2
2
  export declare const previewAnnotations: StorybookConfig['previewAnnotations'];
@@ -1,5 +1,5 @@
1
1
  import { Configuration } from 'webpack';
2
- import type { PresetOptions } from './preset-options';
2
+ import { PresetOptions } from './preset-options';
3
3
  /**
4
4
  * Run ngcc for converting modules to ivy format before starting storybook
5
5
  * This step is needed in order to support Ivy in storybook
@@ -1,4 +1,4 @@
1
- import type { Options as CoreOptions } from '@storybook/types';
1
+ import { Options as CoreOptions } from '@storybook/types';
2
2
  import { BuilderContext } from '@angular-devkit/architect';
3
3
  import { ExtraEntryPoint, StylePreprocessorOptions } from '@angular-devkit/build-angular';
4
4
  export declare type PresetOptions = CoreOptions & {
@@ -1,2 +1,2 @@
1
- import type { Configuration, RuleSetRule } from 'webpack';
1
+ import { Configuration, RuleSetRule } from 'webpack';
2
2
  export declare const filterOutStylingRules: (config: Configuration) => RuleSetRule[];
@@ -1,4 +1,4 @@
1
- import { BaseException, Path } from '@angular-devkit/core';
1
+ import { Path, BaseException } from '@angular-devkit/core';
2
2
  import { AssetPattern } from '@angular-devkit/build-angular';
3
3
  import { AssetPatternClass } from '@angular-devkit/build-angular/src/builders/browser/schema';
4
4
  export declare class MissingAssetSourceRootException extends BaseException {
@@ -1,5 +1,5 @@
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';
1
+ import { StorybookConfig as StorybookConfigBase, TypescriptOptions as TypescriptOptionsReact } from '@storybook/core-webpack';
2
+ import { StorybookConfigWebpack, BuilderOptions, TypescriptOptions as TypescriptOptionsBuilder } from '@storybook/builder-webpack5';
3
3
  declare type FrameworkName = '@storybook/angular';
4
4
  declare type BuilderName = '@storybook/builder-webpack5';
5
5
  export declare type FrameworkOptions = AngularOptions & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/angular",
3
- "version": "7.0.0-alpha.44",
3
+ "version": "7.0.0-alpha.46",
4
4
  "description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.",
5
5
  "keywords": [
6
6
  "storybook",
@@ -34,19 +34,19 @@
34
34
  "prep": "node ../../../scripts/prepare.js"
35
35
  },
36
36
  "dependencies": {
37
- "@storybook/addons": "7.0.0-alpha.44",
38
- "@storybook/api": "7.0.0-alpha.44",
39
- "@storybook/builder-webpack5": "7.0.0-alpha.44",
40
- "@storybook/client-logger": "7.0.0-alpha.44",
41
- "@storybook/core-client": "7.0.0-alpha.44",
42
- "@storybook/core-common": "7.0.0-alpha.44",
43
- "@storybook/core-events": "7.0.0-alpha.44",
44
- "@storybook/core-server": "7.0.0-alpha.44",
45
- "@storybook/core-webpack": "7.0.0-alpha.44",
46
- "@storybook/docs-tools": "7.0.0-alpha.44",
47
- "@storybook/node-logger": "7.0.0-alpha.44",
48
- "@storybook/store": "7.0.0-alpha.44",
49
- "@storybook/types": "7.0.0-alpha.44",
37
+ "@storybook/addons": "7.0.0-alpha.46",
38
+ "@storybook/api": "7.0.0-alpha.46",
39
+ "@storybook/builder-webpack5": "7.0.0-alpha.46",
40
+ "@storybook/client-logger": "7.0.0-alpha.46",
41
+ "@storybook/core-client": "7.0.0-alpha.46",
42
+ "@storybook/core-common": "7.0.0-alpha.46",
43
+ "@storybook/core-events": "7.0.0-alpha.46",
44
+ "@storybook/core-server": "7.0.0-alpha.46",
45
+ "@storybook/core-webpack": "7.0.0-alpha.46",
46
+ "@storybook/docs-tools": "7.0.0-alpha.46",
47
+ "@storybook/node-logger": "7.0.0-alpha.46",
48
+ "@storybook/store": "7.0.0-alpha.46",
49
+ "@storybook/types": "7.0.0-alpha.46",
50
50
  "@types/node": "^16.0.0",
51
51
  "@types/react": "^16.14.23",
52
52
  "@types/react-dom": "^16.9.14",
@@ -120,5 +120,5 @@
120
120
  "access": "public"
121
121
  },
122
122
  "builders": "dist/types/builders/builders.json",
123
- "gitHead": "d4965bd328d8f83c279560c7bc8428e490b275f3"
123
+ "gitHead": "c64b5be851ed2affac56e1daaac3f453fbe6f230"
124
124
  }