@storybook/angular 7.0.0-alpha.4 → 7.0.0-alpha.7
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/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 +1 -1
- 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 +0 -0
- package/dist/types/client/{preview/angular-beta → angular-beta}/StorybookModule.d.ts +0 -0
- package/dist/types/client/{preview/angular-beta → angular-beta}/StorybookModule.js +1 -1
- 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} +1 -1
- package/dist/types/client/{preview/config.js → config.js} +0 -0
- package/dist/types/client/{preview/decorateStory.d.ts → decorateStory.d.ts} +1 -1
- package/dist/types/client/{preview/decorateStory.js → decorateStory.js} +0 -0
- 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/config.d.ts +1 -1
- 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 +5 -12
- package/dist/types/client/{preview/index.d.ts → public-api.d.ts} +2 -4
- package/dist/types/client/{preview/index.js → public-api.js} +18 -4
- 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 -0
- 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 -8
- package/dist/types/renderer.d.ts +4 -4
- package/dist/types/renderer.js +4 -4
- package/dist/types/types.d.ts +24 -9
- package/package.json +13 -13
- package/dist/types/client/preview/globals.d.ts +0 -1
- package/dist/types/client/preview/globals.js +0 -9
- package/dist/types/client/preview/types-7-0.d.ts +0 -9
- package/dist/types/client/preview/types-7-0.js +0 -2
- package/types-6-0.d.ts +0 -1
- package/types-7-0.d.ts +0 -1
|
@@ -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 '
|
|
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("
|
|
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;
|
|
File without changes
|
|
File without changes
|
|
@@ -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("./
|
|
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;
|
|
@@ -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;
|
|
File without changes
|
|
@@ -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;
|
|
File without changes
|
package/dist/types/client/{preview/angular-beta → angular-beta}/ComputesTemplateFromComponent.d.ts
RENAMED
|
File without changes
|
package/dist/types/client/{preview/angular-beta → angular-beta}/ComputesTemplateFromComponent.js
RENAMED
|
File without changes
|
|
@@ -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;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -23,7 +23,7 @@ const deprecatedStoryComponentWarning = (0, util_deprecate_1.default)(() => { },
|
|
|
23
23
|
Instead, use \`export const default = () => ({ component: AppComponent });\`
|
|
24
24
|
or
|
|
25
25
|
\`\`\`
|
|
26
|
-
export const Primary:
|
|
26
|
+
export const Primary: StoryFn = () => ({});
|
|
27
27
|
Primary.parameters = { component: AppComponent };
|
|
28
28
|
\`\`\`
|
|
29
29
|
Read more at
|
|
File without changes
|
|
File without changes
|
package/dist/types/client/{preview/angular-beta → angular-beta}/StorybookWrapperComponent.d.ts
RENAMED
|
File without changes
|
package/dist/types/client/{preview/angular-beta → angular-beta}/StorybookWrapperComponent.js
RENAMED
|
File without changes
|
package/dist/types/client/{preview/angular-beta → angular-beta}/utils/NgComponentAnalyzer.d.ts
RENAMED
|
File without changes
|
package/dist/types/client/{preview/angular-beta → angular-beta}/utils/NgComponentAnalyzer.js
RENAMED
|
File without changes
|
package/dist/types/client/{preview/angular-beta → angular-beta}/utils/NgModulesAnalyzer.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { DecoratorFunction, LegacyStoryFn } from '@storybook/csf';
|
|
2
|
-
import type { AngularFramework } from './types
|
|
2
|
+
import type { AngularFramework } from './types';
|
|
3
3
|
export default function decorateStory(mainStoryFn: LegacyStoryFn<AngularFramework>, decorators: DecoratorFunction<AngularFramework>[]): LegacyStoryFn<AngularFramework>;
|
|
4
4
|
export { decorateStory };
|
|
File without changes
|
|
@@ -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>;
|
|
File without changes
|
|
@@ -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("
|
|
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("
|
|
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
|
-
|
|
2
|
-
export * from './
|
|
3
|
-
export
|
|
4
|
-
export {
|
|
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 =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
1
|
/// <reference types="webpack-env" />
|
|
2
2
|
/// <reference types="node" />
|
|
3
3
|
import type { ClientStoryApi, Loadable } from '@storybook/addons';
|
|
4
|
-
import './
|
|
5
|
-
|
|
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
|
-
|
|
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(
|
|
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,
|
|
2
|
-
import
|
|
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
|
|
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> =
|
|
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>;
|
|
File without changes
|
|
@@ -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
|
|
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>;
|
|
File without changes
|
|
@@ -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
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './client';
|
|
1
|
+
export * from './client/index';
|
|
2
2
|
export * from './types';
|
package/dist/types/index.js
CHANGED
|
@@ -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:
|
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,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.
|
|
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
|
|
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:
|
|
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;
|
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/types.d.ts
CHANGED
|
@@ -1,13 +1,28 @@
|
|
|
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
|
-
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
|
+
"version": "7.0.0-alpha.7",
|
|
4
4
|
"description": "Storybook for Angular: Develop Angular components in isolation with hot reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -33,19 +33,19 @@
|
|
|
33
33
|
"prepare": "node ../../scripts/prepare.js"
|
|
34
34
|
},
|
|
35
35
|
"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.
|
|
36
|
+
"@storybook/addons": "7.0.0-alpha.7",
|
|
37
|
+
"@storybook/api": "7.0.0-alpha.7",
|
|
38
|
+
"@storybook/builder-webpack5": "7.0.0-alpha.7",
|
|
39
|
+
"@storybook/client-logger": "7.0.0-alpha.7",
|
|
40
|
+
"@storybook/core-client": "7.0.0-alpha.7",
|
|
41
|
+
"@storybook/core-common": "7.0.0-alpha.7",
|
|
42
|
+
"@storybook/core-events": "7.0.0-alpha.7",
|
|
43
|
+
"@storybook/core-server": "7.0.0-alpha.7",
|
|
44
44
|
"@storybook/csf": "0.0.2--canary.4566f4d.1",
|
|
45
|
-
"@storybook/docs-tools": "7.0.0-alpha.
|
|
46
|
-
"@storybook/node-logger": "7.0.0-alpha.
|
|
45
|
+
"@storybook/docs-tools": "7.0.0-alpha.7",
|
|
46
|
+
"@storybook/node-logger": "7.0.0-alpha.7",
|
|
47
47
|
"@storybook/semver": "^7.3.2",
|
|
48
|
-
"@storybook/store": "7.0.0-alpha.
|
|
48
|
+
"@storybook/store": "7.0.0-alpha.7",
|
|
49
49
|
"@types/node": "^14.14.20 || ^16.0.0",
|
|
50
50
|
"@types/react": "^16.14.23",
|
|
51
51
|
"@types/react-dom": "^16.9.14",
|
|
@@ -127,5 +127,5 @@
|
|
|
127
127
|
"access": "public"
|
|
128
128
|
},
|
|
129
129
|
"builders": "dist/types/builders/builders.json",
|
|
130
|
-
"gitHead": "
|
|
130
|
+
"gitHead": "d334cabd251cd0ed8b845a87707dc84f007d4074"
|
|
131
131
|
}
|
|
@@ -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/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';
|