@storybook/angular 9.1.0-alpha.6 → 9.1.0-alpha.8
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/build-schema.json +199 -0
- package/builders.json +14 -0
- package/dist/builders/build-storybook/index.js +31 -83
- package/dist/builders/start-storybook/index.js +31 -104
- package/dist/chunk-CUDJAP6K.mjs +3 -0
- package/dist/chunk-KMSSK3DZ.mjs +6 -0
- package/dist/chunk-LXSTVAFF.mjs +40 -0
- package/dist/client/config.d.ts +20 -6
- package/dist/client/config.js +49 -20
- package/dist/client/config.mjs +10 -13
- package/dist/client/docs/config.d.ts +6 -3
- package/dist/client/docs/config.js +18 -14
- package/dist/client/docs/config.mjs +6 -10
- package/dist/client/index.d.ts +144 -6
- package/dist/client/index.js +47 -30
- package/dist/client/index.mjs +3 -9
- package/dist/client/preview-prod.d.ts +2 -1
- package/dist/client/preview-prod.js +5 -4
- package/dist/client/preview-prod.mjs +1 -0
- package/dist/index.d.ts +59 -2
- package/dist/index.js +47 -29
- package/dist/index.mjs +3 -13
- package/dist/preset.js +8 -38
- package/dist/server/framework-preset-angular-cli.js +20 -84
- package/dist/server/framework-preset-angular-ivy.js +6 -59
- package/dist/{client/types.d.ts → types-3b0b7107.d.ts} +9 -9
- package/package.json +59 -12
- package/start-schema.json +234 -0
- package/dist/builders/build-storybook/index.d.ts +0 -25
- package/dist/builders/build-storybook/index.mjs +0 -81
- package/dist/builders/build-storybook/index.spec.d.ts +0 -1
- package/dist/builders/build-storybook/index.spec.js +0 -222
- package/dist/builders/build-storybook/index.spec.mjs +0 -187
- package/dist/builders/build-storybook/schema.json +0 -199
- package/dist/builders/builders.json +0 -14
- package/dist/builders/start-storybook/index.d.ts +0 -21
- package/dist/builders/start-storybook/index.mjs +0 -102
- package/dist/builders/start-storybook/index.spec.d.ts +0 -1
- package/dist/builders/start-storybook/index.spec.js +0 -188
- package/dist/builders/start-storybook/index.spec.mjs +0 -186
- package/dist/builders/start-storybook/schema.json +0 -234
- package/dist/builders/utils/error-handler.d.ts +0 -2
- package/dist/builders/utils/error-handler.js +0 -38
- package/dist/builders/utils/error-handler.mjs +0 -33
- package/dist/builders/utils/run-compodoc.d.ts +0 -6
- package/dist/builders/utils/run-compodoc.js +0 -35
- package/dist/builders/utils/run-compodoc.mjs +0 -31
- package/dist/builders/utils/run-compodoc.spec.d.ts +0 -1
- package/dist/builders/utils/run-compodoc.spec.js +0 -76
- package/dist/builders/utils/run-compodoc.spec.mjs +0 -74
- package/dist/builders/utils/standalone-options.d.ts +0 -18
- package/dist/builders/utils/standalone-options.js +0 -2
- package/dist/builders/utils/standalone-options.mjs +0 -1
- package/dist/client/angular-beta/AbstractRenderer.d.ts +0 -75
- package/dist/client/angular-beta/AbstractRenderer.js +0 -201
- package/dist/client/angular-beta/AbstractRenderer.mjs +0 -164
- package/dist/client/angular-beta/CanvasRenderer.d.ts +0 -12
- package/dist/client/angular-beta/CanvasRenderer.js +0 -13
- package/dist/client/angular-beta/CanvasRenderer.mjs +0 -9
- package/dist/client/angular-beta/ComputesTemplateFromComponent.d.ts +0 -24
- package/dist/client/angular-beta/ComputesTemplateFromComponent.js +0 -160
- package/dist/client/angular-beta/ComputesTemplateFromComponent.mjs +0 -154
- package/dist/client/angular-beta/ComputesTemplateFromComponent.test.d.ts +0 -1
- package/dist/client/angular-beta/ComputesTemplateFromComponent.test.js +0 -730
- package/dist/client/angular-beta/ComputesTemplateFromComponent.test.mjs +0 -728
- package/dist/client/angular-beta/DocsRenderer.d.ts +0 -13
- package/dist/client/angular-beta/DocsRenderer.js +0 -39
- package/dist/client/angular-beta/DocsRenderer.mjs +0 -35
- package/dist/client/angular-beta/RendererFactory.d.ts +0 -11
- package/dist/client/angular-beta/RendererFactory.js +0 -56
- package/dist/client/angular-beta/RendererFactory.mjs +0 -50
- package/dist/client/angular-beta/RendererFactory.test.d.ts +0 -1
- package/dist/client/angular-beta/RendererFactory.test.js +0 -235
- package/dist/client/angular-beta/RendererFactory.test.mjs +0 -233
- package/dist/client/angular-beta/StorybookModule.d.ts +0 -8
- package/dist/client/angular-beta/StorybookModule.js +0 -27
- package/dist/client/angular-beta/StorybookModule.mjs +0 -23
- package/dist/client/angular-beta/StorybookModule.test.d.ts +0 -1
- package/dist/client/angular-beta/StorybookModule.test.js +0 -321
- package/dist/client/angular-beta/StorybookModule.test.mjs +0 -319
- package/dist/client/angular-beta/StorybookProvider.d.ts +0 -5
- package/dist/client/angular-beta/StorybookProvider.js +0 -26
- package/dist/client/angular-beta/StorybookProvider.mjs +0 -22
- package/dist/client/angular-beta/StorybookWrapperComponent.d.ts +0 -13
- package/dist/client/angular-beta/StorybookWrapperComponent.js +0 -127
- package/dist/client/angular-beta/StorybookWrapperComponent.mjs +0 -123
- package/dist/client/angular-beta/__testfixtures__/input.component.d.ts +0 -29
- package/dist/client/angular-beta/__testfixtures__/input.component.js +0 -76
- package/dist/client/angular-beta/__testfixtures__/input.component.mjs +0 -73
- package/dist/client/angular-beta/__testfixtures__/test.module.d.ts +0 -2
- package/dist/client/angular-beta/__testfixtures__/test.module.js +0 -20
- package/dist/client/angular-beta/__testfixtures__/test.module.mjs +0 -17
- package/dist/client/angular-beta/utils/BootstrapQueue.d.ts +0 -12
- package/dist/client/angular-beta/utils/BootstrapQueue.js +0 -86
- package/dist/client/angular-beta/utils/BootstrapQueue.mjs +0 -49
- package/dist/client/angular-beta/utils/BootstrapQueue.test.d.ts +0 -1
- package/dist/client/angular-beta/utils/BootstrapQueue.test.js +0 -164
- package/dist/client/angular-beta/utils/BootstrapQueue.test.mjs +0 -162
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.d.ts +0 -22
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.js +0 -93
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.mjs +0 -84
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.test.d.ts +0 -1
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.test.js +0 -388
- package/dist/client/angular-beta/utils/NgComponentAnalyzer.test.mjs +0 -386
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.d.ts +0 -6
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.js +0 -41
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.mjs +0 -37
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.test.d.ts +0 -1
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.test.js +0 -24
- package/dist/client/angular-beta/utils/NgModulesAnalyzer.test.mjs +0 -22
- package/dist/client/angular-beta/utils/PropertyExtractor.d.ts +0 -30
- package/dist/client/angular-beta/utils/PropertyExtractor.js +0 -196
- package/dist/client/angular-beta/utils/PropertyExtractor.mjs +0 -158
- package/dist/client/angular-beta/utils/PropertyExtractor.test.d.ts +0 -1
- package/dist/client/angular-beta/utils/PropertyExtractor.test.js +0 -177
- package/dist/client/angular-beta/utils/PropertyExtractor.test.mjs +0 -175
- package/dist/client/angular-beta/utils/StoryUID.d.ts +0 -22
- package/dist/client/angular-beta/utils/StoryUID.js +0 -43
- package/dist/client/angular-beta/utils/StoryUID.mjs +0 -38
- package/dist/client/argsToTemplate.d.ts +0 -56
- package/dist/client/argsToTemplate.js +0 -58
- package/dist/client/argsToTemplate.mjs +0 -55
- package/dist/client/argsToTemplate.test.d.ts +0 -1
- package/dist/client/argsToTemplate.test.js +0 -102
- package/dist/client/argsToTemplate.test.mjs +0 -100
- package/dist/client/compodoc-types.d.ts +0 -102
- package/dist/client/compodoc-types.js +0 -2
- package/dist/client/compodoc-types.mjs +0 -1
- package/dist/client/compodoc.d.ts +0 -12
- package/dist/client/compodoc.js +0 -261
- package/dist/client/compodoc.mjs +0 -248
- package/dist/client/compodoc.test.d.ts +0 -1
- package/dist/client/compodoc.test.js +0 -132
- package/dist/client/compodoc.test.mjs +0 -130
- package/dist/client/decorateStory.d.ts +0 -4
- package/dist/client/decorateStory.js +0 -48
- package/dist/client/decorateStory.mjs +0 -45
- package/dist/client/decorateStory.test.d.ts +0 -1
- package/dist/client/decorateStory.test.js +0 -306
- package/dist/client/decorateStory.test.mjs +0 -301
- package/dist/client/decorators.d.ts +0 -13
- package/dist/client/decorators.js +0 -69
- package/dist/client/decorators.mjs +0 -63
- package/dist/client/decorators.test.d.ts +0 -1
- package/dist/client/decorators.test.js +0 -159
- package/dist/client/decorators.test.mjs +0 -157
- package/dist/client/docs/__testfixtures__/doc-button/input.d.ts +0 -110
- package/dist/client/docs/__testfixtures__/doc-button/input.js +0 -204
- package/dist/client/docs/__testfixtures__/doc-button/input.mjs +0 -201
- package/dist/client/docs/__testfixtures__/doc-button/tsconfig.json +0 -7
- package/dist/client/docs/angular-properties.test.d.ts +0 -1
- package/dist/client/docs/angular-properties.test.js +0 -36
- package/dist/client/docs/angular-properties.test.mjs +0 -34
- package/dist/client/docs/sourceDecorator.d.ts +0 -10
- package/dist/client/docs/sourceDecorator.js +0 -53
- package/dist/client/docs/sourceDecorator.mjs +0 -48
- package/dist/client/globals.d.ts +0 -1
- package/dist/client/globals.js +0 -33
- package/dist/client/globals.mjs +0 -31
- package/dist/client/portable-stories.d.ts +0 -23
- package/dist/client/portable-stories.js +0 -62
- package/dist/client/portable-stories.mjs +0 -26
- package/dist/client/public-types.d.ts +0 -54
- package/dist/client/public-types.js +0 -2
- package/dist/client/public-types.mjs +0 -1
- package/dist/client/render.d.ts +0 -7
- package/dist/client/render.js +0 -19
- package/dist/client/render.mjs +0 -14
- package/dist/client/types.js +0 -2
- package/dist/client/types.mjs +0 -1
- package/dist/node/index.d.ts +0 -2
- package/dist/node/index.js +0 -6
- package/dist/node/index.mjs +0 -3
- package/dist/preset.d.ts +0 -5
- package/dist/preset.mjs +0 -34
- package/dist/renderer.d.ts +0 -6
- package/dist/renderer.js +0 -15
- package/dist/renderer.mjs +0 -6
- package/dist/server/__mocks-ng-workspace__/empty-projects-entry/angular.json +0 -4
- package/dist/server/__mocks-ng-workspace__/minimal-config/angular.json +0 -18
- package/dist/server/__mocks-ng-workspace__/minimal-config/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/minimal-config/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/minimal-config/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/minimal-config/src/tsconfig.app.json +0 -9
- package/dist/server/__mocks-ng-workspace__/minimal-config/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/some-config/angular.json +0 -19
- package/dist/server/__mocks-ng-workspace__/some-config/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/some-config/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/some-config/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/some-config/src/tsconfig.app.json +0 -9
- package/dist/server/__mocks-ng-workspace__/some-config/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/angular.json +0 -64
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/src/tsconfig.app.json +0 -9
- package/dist/server/__mocks-ng-workspace__/with-angularBrowserTarget/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/with-lib/angular.json +0 -28
- package/dist/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/with-lib/projects/pattern-lib/tsconfig.lib.json +0 -20
- package/dist/server/__mocks-ng-workspace__/with-lib/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/with-nx/angular.json +0 -18
- package/dist/server/__mocks-ng-workspace__/with-nx/nx.json +0 -3
- package/dist/server/__mocks-ng-workspace__/with-nx/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/with-nx/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/with-nx/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/with-nx/src/tsconfig.app.json +0 -8
- package/dist/server/__mocks-ng-workspace__/with-nx/tsconfig.json +0 -14
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/nx.json +0 -3
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/src/tsconfig.app.json +0 -8
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/tsconfig.json +0 -14
- package/dist/server/__mocks-ng-workspace__/with-nx-workspace/workspace.json +0 -18
- package/dist/server/__mocks-ng-workspace__/with-options-styles/angular.json +0 -18
- package/dist/server/__mocks-ng-workspace__/with-options-styles/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/with-options-styles/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/with-options-styles/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/with-options-styles/src/tsconfig.app.json +0 -9
- package/dist/server/__mocks-ng-workspace__/with-options-styles/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/without-architect-build/angular.json +0 -5
- package/dist/server/__mocks-ng-workspace__/without-architect-build-options/angular.json +0 -11
- package/dist/server/__mocks-ng-workspace__/without-compatible-projects/angular.json +0 -7
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/angular.json +0 -3
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/projects/pattern-lib/tsconfig.lib.json +0 -20
- package/dist/server/__mocks-ng-workspace__/without-projects-entry/tsconfig.json +0 -13
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/angular.json +0 -16
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/src/main.d.ts +0 -1
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/src/main.js +0 -5
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/src/main.mjs +0 -2
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/src/tsconfig.app.json +0 -9
- package/dist/server/__mocks-ng-workspace__/without-tsConfig/tsconfig.json +0 -13
- package/dist/server/__tests__/angular.json +0 -96
- package/dist/server/angular-cli-webpack.d.ts +0 -1
- package/dist/server/angular-cli-webpack.js +0 -80
- package/dist/server/angular-cli-webpack.mjs +0 -80
- package/dist/server/framework-preset-angular-cli.d.ts +0 -3
- package/dist/server/framework-preset-angular-cli.mjs +0 -82
- package/dist/server/framework-preset-angular-ivy.d.ts +0 -10
- package/dist/server/framework-preset-angular-ivy.mjs +0 -56
- package/dist/server/plugins/storybook-normalize-angular-entry-plugin.d.ts +0 -12
- package/dist/server/plugins/storybook-normalize-angular-entry-plugin.js +0 -55
- package/dist/server/plugins/storybook-normalize-angular-entry-plugin.mjs +0 -52
- package/dist/server/preset-options.d.ts +0 -9
- package/dist/server/preset-options.js +0 -2
- package/dist/server/preset-options.mjs +0 -1
- package/dist/server/utils/filter-out-styling-rules.d.ts +0 -2
- package/dist/server/utils/filter-out-styling-rules.js +0 -17
- package/dist/server/utils/filter-out-styling-rules.mjs +0 -13
- package/dist/server/utils/module-is-available.d.ts +0 -1
- package/dist/server/utils/module-is-available.js +0 -13
- package/dist/server/utils/module-is-available.mjs +0 -9
- package/dist/test-setup.d.ts +0 -1
- package/dist/test-setup.js +0 -6
- package/dist/test-setup.mjs +0 -4
- package/dist/types.d.ts +0 -27
- package/dist/types.js +0 -2
- package/dist/types.mjs +0 -1
- package/scripts/postbuild.js +0 -17
- package/template/cli/.eslintrc.json +0 -5
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const node_fs_1 = require("node:fs");
|
|
4
|
-
const node_path_1 = require("node:path");
|
|
5
|
-
const vitest_1 = require("vitest");
|
|
6
|
-
// File hierarchy: __testfixtures__ / some-test-case / input.*
|
|
7
|
-
const inputRegExp = /^input\..*$/;
|
|
8
|
-
(0, vitest_1.describe)('angular component properties', () => {
|
|
9
|
-
const fixturesDir = (0, node_path_1.join)(__dirname, '__testfixtures__');
|
|
10
|
-
(0, node_fs_1.readdirSync)(fixturesDir, { withFileTypes: true }).forEach((testEntry) => {
|
|
11
|
-
if (testEntry.isDirectory()) {
|
|
12
|
-
const testDir = (0, node_path_1.join)(fixturesDir, testEntry.name);
|
|
13
|
-
const testFile = (0, node_fs_1.readdirSync)(testDir).find((fileName) => inputRegExp.test(fileName));
|
|
14
|
-
if (testFile) {
|
|
15
|
-
// TODO: Remove this as soon as the real test is fixed
|
|
16
|
-
(0, vitest_1.it)('true', () => {
|
|
17
|
-
(0, vitest_1.expect)(true).toEqual(true);
|
|
18
|
-
});
|
|
19
|
-
// TODO: Fix this test
|
|
20
|
-
// it(`${testEntry.name}`, async () => {
|
|
21
|
-
// const inputPath = join(testDir, testFile);
|
|
22
|
-
// // snapshot the output of compodoc
|
|
23
|
-
// const compodocOutput = runCompodoc(inputPath);
|
|
24
|
-
// const compodocJson = JSON.parse(compodocOutput);
|
|
25
|
-
// await expect(compodocJson).toMatchFileSnapshot(
|
|
26
|
-
// join(testDir, `compodoc-${SNAPSHOT_OS}.snapshot`)
|
|
27
|
-
// );
|
|
28
|
-
// // snapshot the output of addon-docs angular-properties
|
|
29
|
-
// const componentData = findComponentByName('InputComponent', compodocJson);
|
|
30
|
-
// const argTypes = extractArgTypesFromData(componentData);
|
|
31
|
-
// await expect(argTypes).toMatchFileSnapshot(join(testDir, 'argtypes.snapshot'));
|
|
32
|
-
// });
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
});
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { readdirSync } from 'node:fs';
|
|
2
|
-
import { join } from 'node:path';
|
|
3
|
-
import { describe, expect, it } from 'vitest';
|
|
4
|
-
// File hierarchy: __testfixtures__ / some-test-case / input.*
|
|
5
|
-
const inputRegExp = /^input\..*$/;
|
|
6
|
-
describe('angular component properties', () => {
|
|
7
|
-
const fixturesDir = join(__dirname, '__testfixtures__');
|
|
8
|
-
readdirSync(fixturesDir, { withFileTypes: true }).forEach((testEntry) => {
|
|
9
|
-
if (testEntry.isDirectory()) {
|
|
10
|
-
const testDir = join(fixturesDir, testEntry.name);
|
|
11
|
-
const testFile = readdirSync(testDir).find((fileName) => inputRegExp.test(fileName));
|
|
12
|
-
if (testFile) {
|
|
13
|
-
// TODO: Remove this as soon as the real test is fixed
|
|
14
|
-
it('true', () => {
|
|
15
|
-
expect(true).toEqual(true);
|
|
16
|
-
});
|
|
17
|
-
// TODO: Fix this test
|
|
18
|
-
// it(`${testEntry.name}`, async () => {
|
|
19
|
-
// const inputPath = join(testDir, testFile);
|
|
20
|
-
// // snapshot the output of compodoc
|
|
21
|
-
// const compodocOutput = runCompodoc(inputPath);
|
|
22
|
-
// const compodocJson = JSON.parse(compodocOutput);
|
|
23
|
-
// await expect(compodocJson).toMatchFileSnapshot(
|
|
24
|
-
// join(testDir, `compodoc-${SNAPSHOT_OS}.snapshot`)
|
|
25
|
-
// );
|
|
26
|
-
// // snapshot the output of addon-docs angular-properties
|
|
27
|
-
// const componentData = findComponentByName('InputComponent', compodocJson);
|
|
28
|
-
// const argTypes = extractArgTypesFromData(componentData);
|
|
29
|
-
// await expect(argTypes).toMatchFileSnapshot(join(testDir, 'argtypes.snapshot'));
|
|
30
|
-
// });
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
});
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { PartialStoryFn } from 'storybook/internal/types';
|
|
2
|
-
import { AngularRenderer, StoryContext } from '../types';
|
|
3
|
-
export declare const skipSourceRender: (context: StoryContext) => any;
|
|
4
|
-
/**
|
|
5
|
-
* Angular source decorator.
|
|
6
|
-
*
|
|
7
|
-
* @param storyFn Fn
|
|
8
|
-
* @param context StoryContext
|
|
9
|
-
*/
|
|
10
|
-
export declare const sourceDecorator: (storyFn: PartialStoryFn<AngularRenderer>, context: StoryContext) => import("..").IStory;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.sourceDecorator = exports.skipSourceRender = void 0;
|
|
4
|
-
const docs_tools_1 = require("storybook/internal/docs-tools");
|
|
5
|
-
const preview_api_1 = require("storybook/preview-api");
|
|
6
|
-
const renderer_1 = require("../../renderer");
|
|
7
|
-
const skipSourceRender = (context) => {
|
|
8
|
-
const sourceParams = context?.parameters.docs?.source;
|
|
9
|
-
// always render if the user forces it
|
|
10
|
-
if (sourceParams?.type === docs_tools_1.SourceType.DYNAMIC) {
|
|
11
|
-
return false;
|
|
12
|
-
}
|
|
13
|
-
// never render if the user is forcing the block to render code, or
|
|
14
|
-
// if the user provides code
|
|
15
|
-
return sourceParams?.code || sourceParams?.type === docs_tools_1.SourceType.CODE;
|
|
16
|
-
};
|
|
17
|
-
exports.skipSourceRender = skipSourceRender;
|
|
18
|
-
/**
|
|
19
|
-
* Angular source decorator.
|
|
20
|
-
*
|
|
21
|
-
* @param storyFn Fn
|
|
22
|
-
* @param context StoryContext
|
|
23
|
-
*/
|
|
24
|
-
const sourceDecorator = (storyFn, context) => {
|
|
25
|
-
const story = storyFn();
|
|
26
|
-
const source = (0, preview_api_1.useRef)(undefined);
|
|
27
|
-
(0, preview_api_1.useEffect)(() => {
|
|
28
|
-
if ((0, exports.skipSourceRender)(context)) {
|
|
29
|
-
return;
|
|
30
|
-
}
|
|
31
|
-
const { props, userDefinedTemplate } = story;
|
|
32
|
-
const { component, argTypes, parameters } = context;
|
|
33
|
-
const template = parameters.docs?.source?.excludeDecorators
|
|
34
|
-
? context.originalStoryFn(context.args, context).template
|
|
35
|
-
: story.template;
|
|
36
|
-
if (component && !userDefinedTemplate) {
|
|
37
|
-
const sourceFromComponent = (0, renderer_1.computesTemplateSourceFromComponent)(component, props, argTypes);
|
|
38
|
-
// We might have a story with a Directive or Service defined as the component
|
|
39
|
-
// In these cases there might exist a template, even if we aren't able to create source from component
|
|
40
|
-
const newSource = sourceFromComponent || template;
|
|
41
|
-
if (newSource && newSource !== source.current) {
|
|
42
|
-
(0, preview_api_1.emitTransformCode)(newSource, context);
|
|
43
|
-
source.current = newSource;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
else if (template && template !== source.current) {
|
|
47
|
-
(0, preview_api_1.emitTransformCode)(template, context);
|
|
48
|
-
source.current = template;
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
return story;
|
|
52
|
-
};
|
|
53
|
-
exports.sourceDecorator = sourceDecorator;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import { SourceType } from 'storybook/internal/docs-tools';
|
|
2
|
-
import { useRef, emitTransformCode, useEffect } from 'storybook/preview-api';
|
|
3
|
-
import { computesTemplateSourceFromComponent } from '../../renderer';
|
|
4
|
-
export const skipSourceRender = (context) => {
|
|
5
|
-
const sourceParams = context?.parameters.docs?.source;
|
|
6
|
-
// always render if the user forces it
|
|
7
|
-
if (sourceParams?.type === SourceType.DYNAMIC) {
|
|
8
|
-
return false;
|
|
9
|
-
}
|
|
10
|
-
// never render if the user is forcing the block to render code, or
|
|
11
|
-
// if the user provides code
|
|
12
|
-
return sourceParams?.code || sourceParams?.type === SourceType.CODE;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Angular source decorator.
|
|
16
|
-
*
|
|
17
|
-
* @param storyFn Fn
|
|
18
|
-
* @param context StoryContext
|
|
19
|
-
*/
|
|
20
|
-
export const sourceDecorator = (storyFn, context) => {
|
|
21
|
-
const story = storyFn();
|
|
22
|
-
const source = useRef(undefined);
|
|
23
|
-
useEffect(() => {
|
|
24
|
-
if (skipSourceRender(context)) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
const { props, userDefinedTemplate } = story;
|
|
28
|
-
const { component, argTypes, parameters } = context;
|
|
29
|
-
const template = parameters.docs?.source?.excludeDecorators
|
|
30
|
-
? context.originalStoryFn(context.args, context).template
|
|
31
|
-
: story.template;
|
|
32
|
-
if (component && !userDefinedTemplate) {
|
|
33
|
-
const sourceFromComponent = computesTemplateSourceFromComponent(component, props, argTypes);
|
|
34
|
-
// We might have a story with a Directive or Service defined as the component
|
|
35
|
-
// In these cases there might exist a template, even if we aren't able to create source from component
|
|
36
|
-
const newSource = sourceFromComponent || template;
|
|
37
|
-
if (newSource && newSource !== source.current) {
|
|
38
|
-
emitTransformCode(newSource, context);
|
|
39
|
-
source.current = newSource;
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
else if (template && template !== source.current) {
|
|
43
|
-
emitTransformCode(template, context);
|
|
44
|
-
source.current = template;
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
return story;
|
|
48
|
-
};
|
package/dist/client/globals.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/client/globals.js
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const global_1 = require("@storybook/global");
|
|
4
|
-
/**
|
|
5
|
-
* This file includes polyfills needed by Angular and is loaded before the app. You can add your own
|
|
6
|
-
* extra polyfills to this file.
|
|
7
|
-
*
|
|
8
|
-
* This file is divided into 2 sections:
|
|
9
|
-
*
|
|
10
|
-
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
|
11
|
-
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main file.
|
|
12
|
-
*
|
|
13
|
-
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
|
14
|
-
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
|
15
|
-
* Edge> = 13 on the desktop, and iOS 10 and Chrome on mobile.
|
|
16
|
-
*
|
|
17
|
-
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
|
|
18
|
-
*/
|
|
19
|
-
/**
|
|
20
|
-
* Required to support Web Animations `@angular/animation`. Needed for: All but Chrome, Firefox and
|
|
21
|
-
* Opera. http://caniuse.com/#feat=web-animation
|
|
22
|
-
*/
|
|
23
|
-
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
|
24
|
-
// Included with Angular CLI.
|
|
25
|
-
/** APPLICATION IMPORTS */
|
|
26
|
-
/**
|
|
27
|
-
* Date, currency, decimal and percent pipes. Needed for: All but Chrome, Firefox, Edge, IE11 and
|
|
28
|
-
* Safari 10
|
|
29
|
-
*/
|
|
30
|
-
// import 'intl'; // Run `npm install --save intl`.
|
|
31
|
-
/** Need to import at least one locale-data with intl. */
|
|
32
|
-
// import 'intl/locale-data/jsonp/en';
|
|
33
|
-
global_1.global.STORYBOOK_ENV = 'angular';
|
package/dist/client/globals.mjs
DELETED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { global } from '@storybook/global';
|
|
2
|
-
/**
|
|
3
|
-
* This file includes polyfills needed by Angular and is loaded before the app. You can add your own
|
|
4
|
-
* extra polyfills to this file.
|
|
5
|
-
*
|
|
6
|
-
* This file is divided into 2 sections:
|
|
7
|
-
*
|
|
8
|
-
* 1. Browser polyfills. These are applied before loading ZoneJS and are sorted by browsers.
|
|
9
|
-
* 2. Application imports. Files imported after ZoneJS that should be loaded before your main file.
|
|
10
|
-
*
|
|
11
|
-
* The current setup is for so-called "evergreen" browsers; the last versions of browsers that
|
|
12
|
-
* automatically update themselves. This includes Safari >= 10, Chrome >= 55 (including Opera),
|
|
13
|
-
* Edge> = 13 on the desktop, and iOS 10 and Chrome on mobile.
|
|
14
|
-
*
|
|
15
|
-
* Learn more in https://angular.io/docs/ts/latest/guide/browser-support.html
|
|
16
|
-
*/
|
|
17
|
-
/**
|
|
18
|
-
* Required to support Web Animations `@angular/animation`. Needed for: All but Chrome, Firefox and
|
|
19
|
-
* Opera. http://caniuse.com/#feat=web-animation
|
|
20
|
-
*/
|
|
21
|
-
// import 'web-animations-js'; // Run `npm install --save web-animations-js`.
|
|
22
|
-
// Included with Angular CLI.
|
|
23
|
-
/** APPLICATION IMPORTS */
|
|
24
|
-
/**
|
|
25
|
-
* Date, currency, decimal and percent pipes. Needed for: All but Chrome, Firefox, Edge, IE11 and
|
|
26
|
-
* Safari 10
|
|
27
|
-
*/
|
|
28
|
-
// import 'intl'; // Run `npm install --save intl`.
|
|
29
|
-
/** Need to import at least one locale-data with intl. */
|
|
30
|
-
// import 'intl/locale-data/jsonp/en';
|
|
31
|
-
global.STORYBOOK_ENV = 'angular';
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { NamedOrDefaultProjectAnnotations, NormalizedProjectAnnotations } from 'storybook/internal/types';
|
|
2
|
-
import { AngularRenderer } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* Function that sets the globalConfig of your storybook. The global config is the preview module of
|
|
5
|
-
* your .storybook folder.
|
|
6
|
-
*
|
|
7
|
-
* It should be run a single time, so that your global config (e.g. decorators) is applied to your
|
|
8
|
-
* stories when using `composeStories` or `composeStory`.
|
|
9
|
-
*
|
|
10
|
-
* Example:
|
|
11
|
-
*
|
|
12
|
-
* ```jsx
|
|
13
|
-
* // setup-file.js
|
|
14
|
-
* import { setProjectAnnotations } from '@storybook/angular';
|
|
15
|
-
*
|
|
16
|
-
* import projectAnnotations from './.storybook/preview';
|
|
17
|
-
*
|
|
18
|
-
* setProjectAnnotations(projectAnnotations);
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @param projectAnnotations - E.g. (import projectAnnotations from '../.storybook/preview')
|
|
22
|
-
*/
|
|
23
|
-
export declare function setProjectAnnotations(projectAnnotations: NamedOrDefaultProjectAnnotations<any> | NamedOrDefaultProjectAnnotations<any>[]): NormalizedProjectAnnotations<AngularRenderer>;
|
|
@@ -1,62 +0,0 @@
|
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.setProjectAnnotations = setProjectAnnotations;
|
|
37
|
-
const preview_api_1 = require("storybook/preview-api");
|
|
38
|
-
const INTERNAL_DEFAULT_PROJECT_ANNOTATIONS = __importStar(require("./render"));
|
|
39
|
-
/**
|
|
40
|
-
* Function that sets the globalConfig of your storybook. The global config is the preview module of
|
|
41
|
-
* your .storybook folder.
|
|
42
|
-
*
|
|
43
|
-
* It should be run a single time, so that your global config (e.g. decorators) is applied to your
|
|
44
|
-
* stories when using `composeStories` or `composeStory`.
|
|
45
|
-
*
|
|
46
|
-
* Example:
|
|
47
|
-
*
|
|
48
|
-
* ```jsx
|
|
49
|
-
* // setup-file.js
|
|
50
|
-
* import { setProjectAnnotations } from '@storybook/angular';
|
|
51
|
-
*
|
|
52
|
-
* import projectAnnotations from './.storybook/preview';
|
|
53
|
-
*
|
|
54
|
-
* setProjectAnnotations(projectAnnotations);
|
|
55
|
-
* ```
|
|
56
|
-
*
|
|
57
|
-
* @param projectAnnotations - E.g. (import projectAnnotations from '../.storybook/preview')
|
|
58
|
-
*/
|
|
59
|
-
function setProjectAnnotations(projectAnnotations) {
|
|
60
|
-
(0, preview_api_1.setDefaultProjectAnnotations)(INTERNAL_DEFAULT_PROJECT_ANNOTATIONS);
|
|
61
|
-
return (0, preview_api_1.setProjectAnnotations)(projectAnnotations);
|
|
62
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { setProjectAnnotations as originalSetProjectAnnotations, setDefaultProjectAnnotations, } from 'storybook/preview-api';
|
|
2
|
-
import * as INTERNAL_DEFAULT_PROJECT_ANNOTATIONS from './render';
|
|
3
|
-
/**
|
|
4
|
-
* Function that sets the globalConfig of your storybook. The global config is the preview module of
|
|
5
|
-
* your .storybook folder.
|
|
6
|
-
*
|
|
7
|
-
* It should be run a single time, so that your global config (e.g. decorators) is applied to your
|
|
8
|
-
* stories when using `composeStories` or `composeStory`.
|
|
9
|
-
*
|
|
10
|
-
* Example:
|
|
11
|
-
*
|
|
12
|
-
* ```jsx
|
|
13
|
-
* // setup-file.js
|
|
14
|
-
* import { setProjectAnnotations } from '@storybook/angular';
|
|
15
|
-
*
|
|
16
|
-
* import projectAnnotations from './.storybook/preview';
|
|
17
|
-
*
|
|
18
|
-
* setProjectAnnotations(projectAnnotations);
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @param projectAnnotations - E.g. (import projectAnnotations from '../.storybook/preview')
|
|
22
|
-
*/
|
|
23
|
-
export function setProjectAnnotations(projectAnnotations) {
|
|
24
|
-
setDefaultProjectAnnotations(INTERNAL_DEFAULT_PROJECT_ANNOTATIONS);
|
|
25
|
-
return originalSetProjectAnnotations(projectAnnotations);
|
|
26
|
-
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { AnnotatedStoryFn, Args, ComponentAnnotations, DecoratorFunction, LoaderFunction, StoryAnnotations, StoryContext as GenericStoryContext, StrictArgs, ProjectAnnotations } from 'storybook/internal/types';
|
|
2
|
-
import * as AngularCore from '@angular/core';
|
|
3
|
-
import { AngularRenderer } from './types';
|
|
4
|
-
export type { Args, ArgTypes, Parameters, StrictArgs } from 'storybook/internal/types';
|
|
5
|
-
export type { Parameters as AngularParameters } from './types';
|
|
6
|
-
export type { AngularRenderer };
|
|
7
|
-
/**
|
|
8
|
-
* Metadata to configure the stories for a component.
|
|
9
|
-
*
|
|
10
|
-
* @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export)
|
|
11
|
-
*/
|
|
12
|
-
export type Meta<TArgs = Args> = ComponentAnnotations<AngularRenderer, TransformComponentType<TArgs>>;
|
|
13
|
-
/**
|
|
14
|
-
* Story function that represents a CSFv2 component example.
|
|
15
|
-
*
|
|
16
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
17
|
-
*/
|
|
18
|
-
export type StoryFn<TArgs = Args> = AnnotatedStoryFn<AngularRenderer, TransformComponentType<TArgs>>;
|
|
19
|
-
/**
|
|
20
|
-
* Story object that represents a CSFv3 component example.
|
|
21
|
-
*
|
|
22
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
|
23
|
-
*/
|
|
24
|
-
export type StoryObj<TArgs = Args> = StoryAnnotations<AngularRenderer, TransformComponentType<TArgs>>;
|
|
25
|
-
export type Decorator<TArgs = StrictArgs> = DecoratorFunction<AngularRenderer, TArgs>;
|
|
26
|
-
export type Loader<TArgs = StrictArgs> = LoaderFunction<AngularRenderer, TArgs>;
|
|
27
|
-
export type StoryContext<TArgs = StrictArgs> = GenericStoryContext<AngularRenderer, TArgs>;
|
|
28
|
-
export type Preview = ProjectAnnotations<AngularRenderer>;
|
|
29
|
-
/** Utility type that transforms InputSignal and EventEmitter types */
|
|
30
|
-
type TransformComponentType<T> = TransformInputSignalType<TransformOutputSignalType<TransformEventType<T>>>;
|
|
31
|
-
// @ts-ignore
|
|
32
|
-
type AngularInputSignal<T> = AngularCore.InputSignal<T>;
|
|
33
|
-
// @ts-ignore
|
|
34
|
-
type AngularInputSignalWithTransform<T, U> = AngularCore.InputSignalWithTransform<T, U>;
|
|
35
|
-
// @ts-ignore
|
|
36
|
-
type AngularOutputEmitterRef<T> = AngularCore.OutputEmitterRef<T>;
|
|
37
|
-
type AngularHasInputSignal = typeof AngularCore extends {
|
|
38
|
-
input: infer U;
|
|
39
|
-
} ? true : false;
|
|
40
|
-
type AngularHasOutputSignal = typeof AngularCore extends {
|
|
41
|
-
output: infer U;
|
|
42
|
-
} ? true : false;
|
|
43
|
-
type InputSignal<T> = AngularHasInputSignal extends true ? AngularInputSignal<T> : never;
|
|
44
|
-
type InputSignalWithTransform<T, U> = AngularHasInputSignal extends true ? AngularInputSignalWithTransform<T, U> : never;
|
|
45
|
-
type OutputEmitterRef<T> = AngularHasOutputSignal extends true ? AngularOutputEmitterRef<T> : never;
|
|
46
|
-
type TransformInputSignalType<T> = {
|
|
47
|
-
[K in keyof T]: T[K] extends InputSignal<infer E> ? E : T[K] extends InputSignalWithTransform<any, infer U> ? U : T[K];
|
|
48
|
-
};
|
|
49
|
-
type TransformOutputSignalType<T> = {
|
|
50
|
-
[K in keyof T]: T[K] extends OutputEmitterRef<infer E> ? (e: E) => void : T[K];
|
|
51
|
-
};
|
|
52
|
-
type TransformEventType<T> = {
|
|
53
|
-
[K in keyof T]: T[K] extends AngularCore.EventEmitter<infer E> ? (e: E) => void : T[K];
|
|
54
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/client/render.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ArgsStoryFn, RenderContext } from 'storybook/internal/types';
|
|
2
|
-
import '@angular/compiler';
|
|
3
|
-
import { RendererFactory } from './angular-beta/RendererFactory';
|
|
4
|
-
import { AngularRenderer } from './types';
|
|
5
|
-
export declare const rendererFactory: RendererFactory;
|
|
6
|
-
export declare const render: ArgsStoryFn<AngularRenderer>;
|
|
7
|
-
export declare function renderToCanvas({ storyFn, showMain, forceRemount, storyContext: { component } }: RenderContext<AngularRenderer>, element: HTMLElement): Promise<void>;
|
package/dist/client/render.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.render = exports.rendererFactory = void 0;
|
|
4
|
-
exports.renderToCanvas = renderToCanvas;
|
|
5
|
-
require("@angular/compiler");
|
|
6
|
-
const RendererFactory_1 = require("./angular-beta/RendererFactory");
|
|
7
|
-
exports.rendererFactory = new RendererFactory_1.RendererFactory();
|
|
8
|
-
const render = (props) => ({ props });
|
|
9
|
-
exports.render = render;
|
|
10
|
-
async function renderToCanvas({ storyFn, showMain, forceRemount, storyContext: { component } }, element) {
|
|
11
|
-
showMain();
|
|
12
|
-
const renderer = await exports.rendererFactory.getRendererInstance(element);
|
|
13
|
-
await renderer.render({
|
|
14
|
-
storyFnAngular: storyFn(),
|
|
15
|
-
component,
|
|
16
|
-
forced: !forceRemount,
|
|
17
|
-
targetDOMNode: element,
|
|
18
|
-
});
|
|
19
|
-
}
|
package/dist/client/render.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import '@angular/compiler';
|
|
2
|
-
import { RendererFactory } from './angular-beta/RendererFactory';
|
|
3
|
-
export const rendererFactory = new RendererFactory();
|
|
4
|
-
export const render = (props) => ({ props });
|
|
5
|
-
export async function renderToCanvas({ storyFn, showMain, forceRemount, storyContext: { component } }, element) {
|
|
6
|
-
showMain();
|
|
7
|
-
const renderer = await rendererFactory.getRendererInstance(element);
|
|
8
|
-
await renderer.render({
|
|
9
|
-
storyFnAngular: storyFn(),
|
|
10
|
-
component,
|
|
11
|
-
forced: !forceRemount,
|
|
12
|
-
targetDOMNode: element,
|
|
13
|
-
});
|
|
14
|
-
}
|
package/dist/client/types.js
DELETED
package/dist/client/types.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/dist/node/index.d.ts
DELETED
package/dist/node/index.js
DELETED
package/dist/node/index.mjs
DELETED
package/dist/preset.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { PresetProperty } from 'storybook/internal/types';
|
|
2
|
-
export declare const addons: PresetProperty<'addons'>;
|
|
3
|
-
export declare const previewAnnotations: PresetProperty<'previewAnnotations'>;
|
|
4
|
-
export declare const core: PresetProperty<'core'>;
|
|
5
|
-
export declare const typescript: PresetProperty<'typescript'>;
|
package/dist/preset.mjs
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { dirname, join } from 'node:path';
|
|
2
|
-
const getAbsolutePath = (input) => dirname(require.resolve(join(input, 'package.json')));
|
|
3
|
-
export const addons = [
|
|
4
|
-
require.resolve('./server/framework-preset-angular-cli'),
|
|
5
|
-
require.resolve('./server/framework-preset-angular-ivy'),
|
|
6
|
-
];
|
|
7
|
-
export const previewAnnotations = async (entries = [], options) => {
|
|
8
|
-
const annotations = [...entries, require.resolve('./client/config.mjs')];
|
|
9
|
-
if (options.enableProdMode) {
|
|
10
|
-
annotations.unshift(require.resolve('./client/preview-prod.mjs'));
|
|
11
|
-
}
|
|
12
|
-
const docsConfig = await options.presets.apply('docs', {}, options);
|
|
13
|
-
const docsEnabled = Object.keys(docsConfig).length > 0;
|
|
14
|
-
if (docsEnabled) {
|
|
15
|
-
annotations.push(require.resolve('./client/docs/config.mjs'));
|
|
16
|
-
}
|
|
17
|
-
return annotations;
|
|
18
|
-
};
|
|
19
|
-
export const core = async (config, options) => {
|
|
20
|
-
const framework = await options.presets.apply('framework');
|
|
21
|
-
return {
|
|
22
|
-
...config,
|
|
23
|
-
builder: {
|
|
24
|
-
name: getAbsolutePath('@storybook/builder-webpack5'),
|
|
25
|
-
options: typeof framework === 'string' ? {} : framework.options.builder || {},
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export const typescript = async (config) => {
|
|
30
|
-
return {
|
|
31
|
-
...config,
|
|
32
|
-
skipCompiler: true,
|
|
33
|
-
};
|
|
34
|
-
};
|
package/dist/renderer.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { storyPropsProvider } from './client/angular-beta/StorybookProvider';
|
|
2
|
-
export { computesTemplateSourceFromComponent } from './client/angular-beta/ComputesTemplateFromComponent';
|
|
3
|
-
export { rendererFactory } from './client/render';
|
|
4
|
-
export { AbstractRenderer } from './client/angular-beta/AbstractRenderer';
|
|
5
|
-
export { getApplication } from './client/angular-beta/StorybookModule';
|
|
6
|
-
export { PropertyExtractor } from './client/angular-beta/utils/PropertyExtractor';
|
package/dist/renderer.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PropertyExtractor = exports.getApplication = exports.AbstractRenderer = exports.rendererFactory = exports.computesTemplateSourceFromComponent = exports.storyPropsProvider = void 0;
|
|
4
|
-
var StorybookProvider_1 = require("./client/angular-beta/StorybookProvider");
|
|
5
|
-
Object.defineProperty(exports, "storyPropsProvider", { enumerable: true, get: function () { return StorybookProvider_1.storyPropsProvider; } });
|
|
6
|
-
var ComputesTemplateFromComponent_1 = require("./client/angular-beta/ComputesTemplateFromComponent");
|
|
7
|
-
Object.defineProperty(exports, "computesTemplateSourceFromComponent", { enumerable: true, get: function () { return ComputesTemplateFromComponent_1.computesTemplateSourceFromComponent; } });
|
|
8
|
-
var render_1 = require("./client/render");
|
|
9
|
-
Object.defineProperty(exports, "rendererFactory", { enumerable: true, get: function () { return render_1.rendererFactory; } });
|
|
10
|
-
var AbstractRenderer_1 = require("./client/angular-beta/AbstractRenderer");
|
|
11
|
-
Object.defineProperty(exports, "AbstractRenderer", { enumerable: true, get: function () { return AbstractRenderer_1.AbstractRenderer; } });
|
|
12
|
-
var StorybookModule_1 = require("./client/angular-beta/StorybookModule");
|
|
13
|
-
Object.defineProperty(exports, "getApplication", { enumerable: true, get: function () { return StorybookModule_1.getApplication; } });
|
|
14
|
-
var PropertyExtractor_1 = require("./client/angular-beta/utils/PropertyExtractor");
|
|
15
|
-
Object.defineProperty(exports, "PropertyExtractor", { enumerable: true, get: function () { return PropertyExtractor_1.PropertyExtractor; } });
|
package/dist/renderer.mjs
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { storyPropsProvider } from './client/angular-beta/StorybookProvider';
|
|
2
|
-
export { computesTemplateSourceFromComponent } from './client/angular-beta/ComputesTemplateFromComponent';
|
|
3
|
-
export { rendererFactory } from './client/render';
|
|
4
|
-
export { AbstractRenderer } from './client/angular-beta/AbstractRenderer';
|
|
5
|
-
export { getApplication } from './client/angular-beta/StorybookModule';
|
|
6
|
-
export { PropertyExtractor } from './client/angular-beta/utils/PropertyExtractor';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 1,
|
|
3
|
-
"projects": {
|
|
4
|
-
"foo-project": {
|
|
5
|
-
"root": "",
|
|
6
|
-
"sourceRoot": "src",
|
|
7
|
-
"architect": {
|
|
8
|
-
"build": {
|
|
9
|
-
"options": {
|
|
10
|
-
"tsConfig": "src/tsconfig.app.json",
|
|
11
|
-
"assets": []
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
"defaultProject": "foo-project"
|
|
18
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const not = "empty";
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"sourceMap": true,
|
|
4
|
-
"moduleResolution": "node",
|
|
5
|
-
"emitDecoratorMetadata": true,
|
|
6
|
-
"experimentalDecorators": true,
|
|
7
|
-
"allowSyntheticDefaultImports": true,
|
|
8
|
-
"esModuleInterop": true,
|
|
9
|
-
"skipLibCheck": true,
|
|
10
|
-
"target": "es5",
|
|
11
|
-
"lib": ["es2017", "dom"]
|
|
12
|
-
}
|
|
13
|
-
}
|