@storybook/angular-vite 11.0.0-alpha.4 → 11.0.0-alpha.5
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/_browser-chunks/{chunk-ONLO5U66.js → chunk-7BGWKSXV.js} +2 -2
- package/dist/_browser-chunks/{chunk-TN7UZNXT.js → chunk-RX6XLQUB.js} +1 -1
- package/dist/_browser-chunks/{chunk-K4OVBYYR.js → chunk-WUACJKA6.js} +1 -1
- package/dist/_node-chunks/{chunk-QYZAAGUK.js → chunk-43LZWLFJ.js} +6 -6
- package/dist/_node-chunks/{chunk-HQBCIZ5X.js → chunk-4T7E5422.js} +7 -7
- package/dist/_node-chunks/{chunk-DPUVYM6P.js → chunk-YLBI5T7T.js} +6 -6
- package/dist/_node-chunks/{story-docs-template-analysis-QZKDXYIV.js → story-docs-template-analysis-OIZ7RLTR.js} +6 -6
- package/dist/builders/build-storybook/index.js +8 -8
- package/dist/builders/start-storybook/index.js +8 -8
- package/dist/{chunk-Bv2XDHY-.d.ts → chunk-DAsMMupp.d.ts} +1 -1
- package/dist/client/config.js +1 -1
- package/dist/client/docs/config.js +1 -1
- package/dist/client/index.js +3 -3
- package/dist/docgen/docgen-worker.js +11 -11
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -3
- package/dist/node/index.d.ts +1 -1
- package/dist/node/index.js +6 -6
- package/dist/node/vitest.js +6 -6
- package/dist/preset.js +37 -89
- package/package.json +5 -5
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
config_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-RX6XLQUB.js";
|
|
4
4
|
import {
|
|
5
5
|
config_exports as config_exports2
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-WUACJKA6.js";
|
|
7
7
|
import {
|
|
8
8
|
computesTemplateFromComponent,
|
|
9
9
|
formatPropInTemplate,
|
|
@@ -672,7 +672,7 @@ var parameters = {
|
|
|
672
672
|
renderer: "angular",
|
|
673
673
|
docs: {
|
|
674
674
|
story: { inline: !0 },
|
|
675
|
-
extractArgTypes: (component) => global3.FEATURES?.
|
|
675
|
+
extractArgTypes: (component) => global3.FEATURES?.docgenServer === !0 ? {} : extractArgTypes2(component),
|
|
676
676
|
extractComponentDescription
|
|
677
677
|
}
|
|
678
678
|
}, argTypesEnhancers = [enhanceArgTypes];
|
|
@@ -31,7 +31,7 @@ var skipSourceRender = (context) => {
|
|
|
31
31
|
};
|
|
32
32
|
|
|
33
33
|
// src/client/docs/config.ts
|
|
34
|
-
var useStaticServiceSnippets = globalThis.FEATURES?.
|
|
34
|
+
var useStaticServiceSnippets = globalThis.FEATURES?.docgenServer === !0, parameters = {
|
|
35
35
|
docs: {
|
|
36
36
|
source: {
|
|
37
37
|
type: SourceType2.DYNAMIC,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_rdcf9i0cow from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_rdcf9i0cow from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_rdcf9i0cow from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_rdcf9i0cow.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_rdcf9i0cow.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_rdcf9i0cow.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_rdcf9i0cow from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_rdcf9i0cow from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_rdcf9i0cow from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_rdcf9i0cow.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_rdcf9i0cow.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_rdcf9i0cow.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
up
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-YLBI5T7T.js";
|
|
15
15
|
|
|
16
16
|
// ../../../node_modules/empathic/package.mjs
|
|
17
17
|
function up2(options) {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_rdcf9i0cow from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_rdcf9i0cow from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_rdcf9i0cow from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_rdcf9i0cow.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_rdcf9i0cow.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_rdcf9i0cow.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_rdcf9i0cow from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_rdcf9i0cow from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_rdcf9i0cow from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_rdcf9i0cow.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_rdcf9i0cow.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_rdcf9i0cow.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_rdcf9i0cow from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_rdcf9i0cow from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_rdcf9i0cow from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_rdcf9i0cow.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_rdcf9i0cow.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_rdcf9i0cow.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
printErrorDetails,
|
|
16
16
|
requireBuilderTarget,
|
|
17
17
|
up
|
|
18
|
-
} from "../../_node-chunks/chunk-
|
|
18
|
+
} from "../../_node-chunks/chunk-4T7E5422.js";
|
|
19
19
|
import {
|
|
20
20
|
resolveTsconfig
|
|
21
|
-
} from "../../_node-chunks/chunk-
|
|
21
|
+
} from "../../_node-chunks/chunk-YLBI5T7T.js";
|
|
22
22
|
|
|
23
23
|
// src/builders/build-storybook/index.ts
|
|
24
24
|
import { readFileSync } from "node:fs";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_rdcf9i0cow from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_rdcf9i0cow from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_rdcf9i0cow from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_rdcf9i0cow.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_rdcf9i0cow.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_rdcf9i0cow.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -15,10 +15,10 @@ import {
|
|
|
15
15
|
printErrorDetails,
|
|
16
16
|
requireBuilderTarget,
|
|
17
17
|
up
|
|
18
|
-
} from "../../_node-chunks/chunk-
|
|
18
|
+
} from "../../_node-chunks/chunk-4T7E5422.js";
|
|
19
19
|
import {
|
|
20
20
|
resolveTsconfig
|
|
21
|
-
} from "../../_node-chunks/chunk-
|
|
21
|
+
} from "../../_node-chunks/chunk-YLBI5T7T.js";
|
|
22
22
|
|
|
23
23
|
// src/builders/start-storybook/index.ts
|
|
24
24
|
import { readFileSync } from "node:fs";
|
|
@@ -40,7 +40,7 @@ type FrameworkOptions = {
|
|
|
40
40
|
*
|
|
41
41
|
* Tag a member `@ignore` to drop it whatever this says.
|
|
42
42
|
*
|
|
43
|
-
* `api` needs `features.
|
|
43
|
+
* `api` needs `features.docgenServer`; without it only `all` and `inputs` apply.
|
|
44
44
|
*
|
|
45
45
|
* @default 'api'
|
|
46
46
|
*/
|
package/dist/client/config.js
CHANGED
package/dist/client/index.js
CHANGED
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
componentWrapperDecorator,
|
|
6
6
|
moduleMetadata,
|
|
7
7
|
setProjectAnnotations
|
|
8
|
-
} from "../_browser-chunks/chunk-
|
|
9
|
-
import "../_browser-chunks/chunk-
|
|
10
|
-
import "../_browser-chunks/chunk-
|
|
8
|
+
} from "../_browser-chunks/chunk-7BGWKSXV.js";
|
|
9
|
+
import "../_browser-chunks/chunk-RX6XLQUB.js";
|
|
10
|
+
import "../_browser-chunks/chunk-WUACJKA6.js";
|
|
11
11
|
import "../_browser-chunks/chunk-BFQMI74D.js";
|
|
12
12
|
export {
|
|
13
13
|
__definePreview,
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_rdcf9i0cow from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_rdcf9i0cow from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_rdcf9i0cow from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_rdcf9i0cow.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_rdcf9i0cow.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_rdcf9i0cow.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
resolveStoryComponent
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-43LZWLFJ.js";
|
|
15
15
|
|
|
16
16
|
// src/docgen/docgen-worker.ts
|
|
17
17
|
import { STORY_FILE_TEST_REGEXP, getStoryImportPathFromEntry as getStoryImportPathFromEntry2 } from "storybook/internal/common";
|
|
18
18
|
import { logger as logger4 } from "storybook/internal/node-logger";
|
|
19
19
|
|
|
20
20
|
// ../../lib/angular-cm/dist/index.js
|
|
21
|
-
import
|
|
22
|
-
import
|
|
23
|
-
import
|
|
21
|
+
import CJS_COMPAT_NODE_URL_828h02jq5p2 from "node:url";
|
|
22
|
+
import CJS_COMPAT_NODE_PATH_828h02jq5p2 from "node:path";
|
|
23
|
+
import CJS_COMPAT_NODE_MODULE_828h02jq5p2 from "node:module";
|
|
24
24
|
import { isInNodeModules } from "storybook/internal/common";
|
|
25
25
|
import {
|
|
26
26
|
ComponentMetaManager,
|
|
@@ -36,7 +36,7 @@ import { logger as logger3 } from "storybook/internal/node-logger";
|
|
|
36
36
|
import * as path from "node:path";
|
|
37
37
|
import { logger as logger2 } from "storybook/internal/node-logger";
|
|
38
38
|
import { logger } from "storybook/internal/node-logger";
|
|
39
|
-
var __filename =
|
|
39
|
+
var __filename = CJS_COMPAT_NODE_URL_828h02jq5p2.fileURLToPath(import.meta.url), __dirname = CJS_COMPAT_NODE_PATH_828h02jq5p2.dirname(__filename), require2 = CJS_COMPAT_NODE_MODULE_828h02jq5p2.createRequire(import.meta.url), resolvedSymbol = (ctx, node) => {
|
|
40
40
|
let symbol = ctx.checker.getSymbolAtLocation(node);
|
|
41
41
|
return symbol && symbol.flags & ctx.ts.SymbolFlags.Alias ? ctx.checker.getAliasedSymbol(symbol) : symbol;
|
|
42
42
|
}, resolvedNameSymbol = (ctx, name) => {
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as StorybookConfig, t as FrameworkOptions } from "./chunk-
|
|
1
|
+
import { n as StorybookConfig, t as FrameworkOptions } from "./chunk-DAsMMupp.js";
|
|
2
2
|
import { AnnotatedStoryFn, ArgTypes, Args, Args as Args$1, ArgsStoryFn, ComponentAnnotations, DecoratorFunction, LoaderFunction, NamedOrDefaultProjectAnnotations, NormalizedProjectAnnotations, Parameters as Parameters$1, Parameters as Parameters$2, ProjectAnnotations, StoryAnnotations, StoryContext as StoryContext$1, StrictArgs, StrictArgs as StrictArgs$1, WebRenderer } from "storybook/internal/types";
|
|
3
3
|
import * as AngularCore from "@angular/core";
|
|
4
4
|
import { ApplicationConfig, Provider, Type } from "@angular/core";
|
|
5
|
-
import { AddonTypes, InferTypes, Meta as Meta$1, MetaInput, MetaTypes, Preview as Preview$1,
|
|
5
|
+
import { AddonTypes, InferTypes, Meta as Meta$1, MetaInput, MetaTypes, Preview as Preview$1, PreviewAddonEntry, Story, StoryArgs, TypedMetaArgKeys, WithRenderArgs } from "storybook/internal/csf";
|
|
6
6
|
|
|
7
7
|
//#region code/frameworks/angular-vite/.dts-emit/code/frameworks/angular-vite/src/client/types.d.ts
|
|
8
8
|
interface NgModuleMetadata {
|
|
@@ -201,7 +201,7 @@ type Simplify<T> = { [KeyType in keyof T]: T[KeyType] } & {};
|
|
|
201
201
|
* });
|
|
202
202
|
* ```
|
|
203
203
|
*/
|
|
204
|
-
declare function __definePreview<Addons extends
|
|
204
|
+
declare function __definePreview<Addons extends PreviewAddonEntry[]>(input: {
|
|
205
205
|
addons: Addons;
|
|
206
206
|
} & ProjectAnnotations<AngularRenderer & InferTypes<Addons>>): AngularPreview<AngularRenderer & InferTypes<Addons>>;
|
|
207
207
|
type InferComponentArgs<C extends abstract new (...args: any) => any> = Partial<TransformComponentType<InstanceType<C>>>;
|
package/dist/index.js
CHANGED
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
componentWrapperDecorator,
|
|
6
6
|
moduleMetadata,
|
|
7
7
|
setProjectAnnotations
|
|
8
|
-
} from "./_browser-chunks/chunk-
|
|
9
|
-
import "./_browser-chunks/chunk-
|
|
10
|
-
import "./_browser-chunks/chunk-
|
|
8
|
+
} from "./_browser-chunks/chunk-7BGWKSXV.js";
|
|
9
|
+
import "./_browser-chunks/chunk-RX6XLQUB.js";
|
|
10
|
+
import "./_browser-chunks/chunk-WUACJKA6.js";
|
|
11
11
|
import "./_browser-chunks/chunk-BFQMI74D.js";
|
|
12
12
|
export {
|
|
13
13
|
__definePreview,
|
package/dist/node/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as StorybookConfig } from "../chunk-
|
|
1
|
+
import { n as StorybookConfig } from "../chunk-DAsMMupp.js";
|
|
2
2
|
|
|
3
3
|
//#region code/frameworks/angular-vite/.dts-emit/code/frameworks/angular-vite/src/node/index.d.ts
|
|
4
4
|
declare function defineMain(config: StorybookConfig): StorybookConfig;
|
package/dist/node/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_rdcf9i0cow from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_rdcf9i0cow from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_rdcf9i0cow from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_rdcf9i0cow.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_rdcf9i0cow.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_rdcf9i0cow.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/node/vitest.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_rdcf9i0cow from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_rdcf9i0cow from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_rdcf9i0cow from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_rdcf9i0cow.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_rdcf9i0cow.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_rdcf9i0cow.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
package/dist/preset.js
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_rdcf9i0cow from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_rdcf9i0cow from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_rdcf9i0cow from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_rdcf9i0cow.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_rdcf9i0cow.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_rdcf9i0cow.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
findTsconfigUp
|
|
14
|
-
} from "./_node-chunks/chunk-
|
|
14
|
+
} from "./_node-chunks/chunk-YLBI5T7T.js";
|
|
15
15
|
import {
|
|
16
16
|
parseStoryFile
|
|
17
|
-
} from "./_node-chunks/chunk-
|
|
17
|
+
} from "./_node-chunks/chunk-43LZWLFJ.js";
|
|
18
18
|
|
|
19
19
|
// src/preset.ts
|
|
20
20
|
import { findConfigFile } from "storybook/internal/common";
|
|
@@ -84,8 +84,8 @@ var MODES = ["all", "api", "inputs"], configuredMode = (frameworkOptions) => {
|
|
|
84
84
|
"The `angularFilterNonInputControls` feature is deprecated and will be removed in Storybook 11. " + (configured !== void 0 ? `The \`propsTable: '${mode}'\` framework option takes precedence over it, so the feature has no effect and can be removed.` : `Replace it with the \`propsTable: '${mode}'\` option on your \`@storybook/angular-vite\` framework.`)
|
|
85
85
|
);
|
|
86
86
|
}
|
|
87
|
-
configured === "api" && features2?.
|
|
88
|
-
"`propsTable: 'api'` needs the `
|
|
87
|
+
configured === "api" && features2?.docgenServer !== !0 && logger.warn(
|
|
88
|
+
"`propsTable: 'api'` needs the `docgenServer` feature, which is off, so the props table keeps showing every member. Enable it with `features: { docgenServer: true }`, or set `propsTable: 'all'` to say you want every member."
|
|
89
89
|
);
|
|
90
90
|
};
|
|
91
91
|
|
|
@@ -236,10 +236,7 @@ var COMPODOC_LOCK = ".compodoc.lock", COMPODOC_RUN_MARKER = ".compodoc.run", RUN
|
|
|
236
236
|
// src/docgen/preset.ts
|
|
237
237
|
import { fileURLToPath } from "node:url";
|
|
238
238
|
var experimental_docgenProvider = async (existing = [], options) => {
|
|
239
|
-
let features2 = await options?.presets?.apply("features", {})
|
|
240
|
-
if (!features2?.experimentalDocgenServer)
|
|
241
|
-
return existing;
|
|
242
|
-
let descriptor = {
|
|
239
|
+
let features2 = await options?.presets?.apply("features", {}), descriptor = {
|
|
243
240
|
moduleSpecifier: fileURLToPath(
|
|
244
241
|
import.meta.resolve("@storybook/angular-vite/internal/docgen-worker")
|
|
245
242
|
),
|
|
@@ -250,7 +247,7 @@ var experimental_docgenProvider = async (existing = [], options) => {
|
|
|
250
247
|
return [...existing, descriptor];
|
|
251
248
|
}, experimental_manifests = async (existingManifests = {}, options) => {
|
|
252
249
|
let features2 = await options?.presets?.apply("features", {});
|
|
253
|
-
if (!features2?.
|
|
250
|
+
if (!features2?.docgenServer || !features2?.componentsManifest)
|
|
254
251
|
return existingManifests;
|
|
255
252
|
let existingComponents = existingManifests.components;
|
|
256
253
|
return {
|
|
@@ -269,11 +266,12 @@ import { getService } from "storybook/internal/core-server";
|
|
|
269
266
|
import { logger as logger4 } from "storybook/internal/node-logger";
|
|
270
267
|
|
|
271
268
|
// src/docgen/story-docs-build.ts
|
|
272
|
-
import { types as
|
|
269
|
+
import { types as t4 } from "storybook/internal/babel";
|
|
273
270
|
import { getComponentIdFromEntry, getStoryImportPathFromEntry } from "storybook/internal/common";
|
|
274
271
|
import { storyNameFromExport } from "storybook/internal/csf";
|
|
275
272
|
import {
|
|
276
273
|
buildImportStatements as buildImportStatements2,
|
|
274
|
+
authoredSource,
|
|
277
275
|
collectImportBindings,
|
|
278
276
|
createStoryArgsResolver,
|
|
279
277
|
createStoryReferenceResolver,
|
|
@@ -282,7 +280,7 @@ import {
|
|
|
282
280
|
parseReferenceModule,
|
|
283
281
|
resolveComponentImport as resolveComponentImport2,
|
|
284
282
|
unresolvedWarning,
|
|
285
|
-
unwrapExpression as
|
|
283
|
+
unwrapExpression as unwrapExpression4
|
|
286
284
|
} from "storybook/internal/csf-tools";
|
|
287
285
|
import { resolve as resolve3 } from "node:path";
|
|
288
286
|
|
|
@@ -458,6 +456,7 @@ import {
|
|
|
458
456
|
isCanonicalCsf2BindCall,
|
|
459
457
|
isCsfFactoryCall,
|
|
460
458
|
sourceOf,
|
|
459
|
+
templateParts,
|
|
461
460
|
unwrapExpression as unwrapExpression2
|
|
462
461
|
} from "storybook/internal/csf-tools";
|
|
463
462
|
var bindingAttributes = ({ inputs, outputs }, filter, representedArgs) => {
|
|
@@ -533,18 +532,7 @@ var bindingAttributes = ({ inputs, outputs }, filter, representedArgs) => {
|
|
|
533
532
|
markup,
|
|
534
533
|
representedArgs: [...representedArgs],
|
|
535
534
|
expansions
|
|
536
|
-
}),
|
|
537
|
-
if (t2.isTemplateLiteral(node))
|
|
538
|
-
return {
|
|
539
|
-
quasis: node.quasis.map((quasi) => quasi.value.cooked ?? ""),
|
|
540
|
-
expressions: node.expressions
|
|
541
|
-
};
|
|
542
|
-
if (!(!t2.isTaggedTemplateExpression(node) || !isStringRawTag(node.tag)))
|
|
543
|
-
return {
|
|
544
|
-
quasis: node.quasi.quasis.map((quasi) => quasi.value.raw),
|
|
545
|
-
expressions: node.quasi.expressions
|
|
546
|
-
};
|
|
547
|
-
}, isStringRawTag = (tag) => t2.isMemberExpression(tag) && !tag.computed && t2.isIdentifier(tag.object, { name: "String" }) && t2.isIdentifier(tag.property, { name: "raw" }), interpolate = ({ quasis, expressions }, shape, bindings, scope, representedArgs, expansions) => {
|
|
535
|
+
}), interpolate = ({ quasis, expressions }, shape, bindings, scope, representedArgs, expansions) => {
|
|
548
536
|
let markup = quasis[0] ?? "";
|
|
549
537
|
for (let [index, expression] of expressions.entries()) {
|
|
550
538
|
let marker = `data-storybook-args-to-template-${index}`;
|
|
@@ -820,50 +808,6 @@ ${members.join(`
|
|
|
820
808
|
return warning === void 0 ? { snippet } : { snippet, warning };
|
|
821
809
|
};
|
|
822
810
|
|
|
823
|
-
// src/docgen/story-docs-source.ts
|
|
824
|
-
import { types as t4 } from "storybook/internal/babel";
|
|
825
|
-
import {
|
|
826
|
-
resolveArgValue,
|
|
827
|
-
resolveObjectMembers,
|
|
828
|
-
sourceOf as sourceOf2,
|
|
829
|
-
unwrapExpression as unwrapExpression4
|
|
830
|
-
} from "storybook/internal/csf-tools";
|
|
831
|
-
var authoredSource = (shape, ctx) => {
|
|
832
|
-
for (let members of [shape.members, shape.metaMembers]) {
|
|
833
|
-
let code = memberAt(members, ["parameters", "docs", "source", "code"], ctx);
|
|
834
|
-
if (code.kind === "missing")
|
|
835
|
-
continue;
|
|
836
|
-
if (code.kind === "masked")
|
|
837
|
-
return { kind: "missing" };
|
|
838
|
-
if (code.kind === "unresolvable")
|
|
839
|
-
return code;
|
|
840
|
-
let resolved = resolveArgValue(code.node, ctx), value = unwrapExpression4(resolved.node);
|
|
841
|
-
if (t4.isIdentifier(value, { name: "undefined" }) || t4.isUnaryExpression(value, { operator: "void" }))
|
|
842
|
-
continue;
|
|
843
|
-
if (t4.isNullLiteral(value))
|
|
844
|
-
return { kind: "disabled" };
|
|
845
|
-
if (t4.isStringLiteral(value))
|
|
846
|
-
return { kind: "code", code: value.value };
|
|
847
|
-
let parts = templateParts(value);
|
|
848
|
-
return parts && parts.expressions.length === 0 ? { kind: "code", code: parts.quasis[0] ?? "" } : { kind: "unresolvable", source: sourceOf2(code.node) };
|
|
849
|
-
}
|
|
850
|
-
return { kind: "missing" };
|
|
851
|
-
}, memberAt = (members, path, ctx) => {
|
|
852
|
-
let result = memberOf(members, path[0]);
|
|
853
|
-
for (let [depth, key] of path.slice(1).entries()) {
|
|
854
|
-
if (result.kind !== "value")
|
|
855
|
-
return result;
|
|
856
|
-
let original = result.node, object = unwrapExpression4(resolveArgValue(original, ctx).node);
|
|
857
|
-
if (!t4.isObjectExpression(object))
|
|
858
|
-
return t4.isIdentifier(object, { name: "undefined" }) || t4.isUnaryExpression(object, { operator: "void" }) ? { kind: "missing" } : isOpaqueValue(object) ? { kind: "unresolvable", source: sourceOf2(original) } : depth === 0 ? { kind: "missing" } : { kind: "masked" };
|
|
859
|
-
result = memberOf(resolveObjectMembers(object, ctx), key);
|
|
860
|
-
}
|
|
861
|
-
return result;
|
|
862
|
-
}, memberOf = (members, key) => {
|
|
863
|
-
let node = members.properties[key];
|
|
864
|
-
return node !== void 0 && !members.shadowed.includes(key) ? { kind: "value", node } : members.unresolved.length > 0 ? { kind: "unresolvable", source: members.unresolved.at(-1) } : { kind: "missing" };
|
|
865
|
-
}, isOpaqueValue = (node) => !t4.isLiteral(node) && !t4.isArrayExpression(node) && !t4.isFunction(node);
|
|
866
|
-
|
|
867
811
|
// src/docgen/story-docs-build.ts
|
|
868
812
|
var buildStoryDocsPayload = async (input, context) => {
|
|
869
813
|
let storyImportPath = getStoryImportPathFromEntry(input.entry);
|
|
@@ -906,8 +850,8 @@ var buildStoryDocsPayload = async (input, context) => {
|
|
|
906
850
|
return buildImportStatements2({ refs: [{ ...ref, importOverride }] }).join(`
|
|
907
851
|
`) || void 0;
|
|
908
852
|
}, componentNameOf = (node) => {
|
|
909
|
-
let identifier = node &&
|
|
910
|
-
return identifier &&
|
|
853
|
+
let identifier = node && t4.isTSInstantiationExpression(node) ? node.expression : node;
|
|
854
|
+
return identifier && t4.isIdentifier(identifier) ? identifier.name : void 0;
|
|
911
855
|
}, openStoryReferences = createStoryReferenceResolver(), buildStoryDoc = async (exportName, story, deps) => {
|
|
912
856
|
let { csf } = deps, name = story.name ?? storyNameFromExport(exportName);
|
|
913
857
|
try {
|
|
@@ -929,7 +873,11 @@ var buildStoryDocsPayload = async (input, context) => {
|
|
|
929
873
|
};
|
|
930
874
|
}
|
|
931
875
|
}, renderedSnippet = async (shape, deps) => {
|
|
932
|
-
let
|
|
876
|
+
let authoredShape = {
|
|
877
|
+
storyMembers: shape.members,
|
|
878
|
+
members: shape.members,
|
|
879
|
+
metaMembers: shape.metaMembers
|
|
880
|
+
}, authored = authoredSource(authoredShape, deps.resolveStoryArgs.ctx);
|
|
933
881
|
if (authored.kind === "code")
|
|
934
882
|
return { snippet: authored.code };
|
|
935
883
|
if (authored.kind === "disabled")
|
|
@@ -960,7 +908,7 @@ var buildStoryDocsPayload = async (input, context) => {
|
|
|
960
908
|
fields: fields2
|
|
961
909
|
});
|
|
962
910
|
if (userMarkup?.kind === "literal") {
|
|
963
|
-
let { analyzeStoryTemplate } = await import("./_node-chunks/story-docs-template-analysis-
|
|
911
|
+
let { analyzeStoryTemplate } = await import("./_node-chunks/story-docs-template-analysis-OIZ7RLTR.js"), analysis = analyzeStoryTemplate(userMarkup.markup, userMarkup.expansions), referencedNames = new Set(analysis.kind === "resolved" ? analysis.referencedNames : []), boundOutputs = analysis.kind === "resolved" ? snippetMeta.outputs.filter((name) => analysis.boundOutputs.includes(name)) : [], hostArgs = referencedArgFields(
|
|
964
912
|
referencedNames,
|
|
965
913
|
userMarkup.representedArgs,
|
|
966
914
|
shape,
|
|
@@ -1043,11 +991,11 @@ var buildStoryDocsPayload = async (input, context) => {
|
|
|
1043
991
|
isUndefinedValue(node) || (isFunctionValue(node) ? outputNames.has(name) && outputs.push(name) : inputNames.has(name) && inputs.push({ name, expression: evaluateArgExpression(node, snippetMeta.enums) }));
|
|
1044
992
|
return { inputs, outputs };
|
|
1045
993
|
}, isFunctionValue = (node) => {
|
|
1046
|
-
let unwrapped =
|
|
1047
|
-
return
|
|
994
|
+
let unwrapped = unwrapExpression4(node);
|
|
995
|
+
return t4.isFunction(unwrapped);
|
|
1048
996
|
}, isUndefinedValue = (node) => {
|
|
1049
|
-
let unwrapped =
|
|
1050
|
-
return
|
|
997
|
+
let unwrapped = unwrapExpression4(node);
|
|
998
|
+
return t4.isIdentifier(unwrapped) && unwrapped.name === "undefined" || t4.isUnaryExpression(unwrapped, { operator: "void" });
|
|
1051
999
|
};
|
|
1052
1000
|
|
|
1053
1001
|
// src/docgen/story-docs-preset.ts
|
|
@@ -1069,10 +1017,9 @@ var warnedMissingDocgenService = !1, getDocgenPayload = async (componentId) => {
|
|
|
1069
1017
|
};
|
|
1070
1018
|
|
|
1071
1019
|
// src/preset.ts
|
|
1072
|
-
var addons = [], features = async (existing) => ({
|
|
1020
|
+
var isDocgenProviderEnabled = !0, addons = [], features = async (existing) => ({
|
|
1073
1021
|
...existing,
|
|
1074
|
-
componentsManifest: !0
|
|
1075
|
-
experimentalDocgenServer: !0
|
|
1022
|
+
componentsManifest: !0
|
|
1076
1023
|
}), previewAnnotations = async (entries = [], options) => {
|
|
1077
1024
|
let config = fileURLToPath2(import.meta.resolve("@storybook/angular-vite/client/config")), annotations = [...entries, config];
|
|
1078
1025
|
if (options.enableProdMode) {
|
|
@@ -1114,16 +1061,16 @@ var viteFinal = async (config, options) => {
|
|
|
1114
1061
|
let { mergeConfig, normalizePath } = await import("vite"), { default: angular } = await import("@analogjs/vite-plugin-angular"), framework = await options.presets.apply("framework"), frameworkOptions = typeof framework == "string" ? void 0 : framework.options, resolvedFeatures = await options.presets.apply(
|
|
1115
1062
|
"features",
|
|
1116
1063
|
{}
|
|
1117
|
-
), docgenServer = !!resolvedFeatures?.
|
|
1118
|
-
compodocConfig.enabled && !docgenServer && await ensureCompodocDocumentation({
|
|
1064
|
+
), docgenServer = !!resolvedFeatures?.docgenServer, skipDocgen = !!options.build?.test?.disableDocgen, compodocConfig = await resolveCompodocConfig(options, { viteRoot: config?.root });
|
|
1065
|
+
compodocConfig.enabled && !docgenServer && !skipDocgen && await ensureCompodocDocumentation({
|
|
1119
1066
|
compodocArgs: compodocConfig.compodocArgs,
|
|
1120
1067
|
tsconfig: compodocConfig.tsconfig,
|
|
1121
1068
|
workspaceRoot: compodocConfig.workspaceRoot,
|
|
1122
1069
|
outputDir: compodocConfig.outputDir
|
|
1123
1070
|
});
|
|
1124
1071
|
let propsTable = resolvePropsTable(frameworkOptions, resolvedFeatures);
|
|
1125
|
-
warnAboutPropsTable(frameworkOptions, resolvedFeatures), resolvedFeatures?.componentsManifest && !docgenServer && logger5.warn(
|
|
1126
|
-
"The `componentsManifest` feature needs the `
|
|
1072
|
+
skipDocgen || warnAboutPropsTable(frameworkOptions, resolvedFeatures), resolvedFeatures?.componentsManifest && !docgenServer && !skipDocgen && logger5.warn(
|
|
1073
|
+
"The `componentsManifest` feature needs the `docgenServer` feature, which is off, so this Storybook publishes no components manifest and MCP clients get no component API from it. Turn the docgen server on with `features: { docgenServer: true }` in your `main.ts`."
|
|
1127
1074
|
);
|
|
1128
1075
|
let zoneless = resolveZoneless(options.angularBuilderOptions), angularPlugins = angular({
|
|
1129
1076
|
jit: typeof frameworkOptions?.jit < "u" ? frameworkOptions?.jit : !0,
|
|
@@ -1187,7 +1134,7 @@ var viteFinal = async (config, options) => {
|
|
|
1187
1134
|
angularOptionsPlugin(options, { normalizePath, zoneless }),
|
|
1188
1135
|
stylePreprocessorCheckPlugin(),
|
|
1189
1136
|
storybookOxcPlugin(),
|
|
1190
|
-
...docgenServer && options.configDir ? [compodocJsonStubPlugin(options.configDir)] : []
|
|
1137
|
+
...(docgenServer || skipDocgen) && options.configDir ? [compodocJsonStubPlugin(options.configDir)] : []
|
|
1191
1138
|
],
|
|
1192
1139
|
define: {
|
|
1193
1140
|
STORYBOOK_ANGULAR_OPTIONS: JSON.stringify({
|
|
@@ -1431,6 +1378,7 @@ export {
|
|
|
1431
1378
|
experimental_manifests,
|
|
1432
1379
|
experimental_storyDocsProvider,
|
|
1433
1380
|
features,
|
|
1381
|
+
isDocgenProviderEnabled,
|
|
1434
1382
|
previewAnnotations,
|
|
1435
1383
|
resolveZoneless,
|
|
1436
1384
|
stylePreprocessorCheckPlugin,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/angular-vite",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.5",
|
|
4
4
|
"description": "Storybook for Angular: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"!src/**/*"
|
|
64
64
|
],
|
|
65
65
|
"dependencies": {
|
|
66
|
-
"@storybook/builder-vite": "11.0.0-alpha.
|
|
66
|
+
"@storybook/builder-vite": "11.0.0-alpha.5",
|
|
67
67
|
"@storybook/global": "^5.0.0",
|
|
68
68
|
"telejson": "8.0.0",
|
|
69
69
|
"ts-dedent": "^2.0.0",
|
|
@@ -82,8 +82,8 @@
|
|
|
82
82
|
"@angular/platform-browser": "^21.2.14",
|
|
83
83
|
"@angular/platform-browser-dynamic": "^21.2.14",
|
|
84
84
|
"@babel/types": "^7.28.5",
|
|
85
|
-
"@storybook/angular-cm": "11.0.0-alpha.
|
|
86
|
-
"@storybook/angular-compodoc": "11.0.0-alpha.
|
|
85
|
+
"@storybook/angular-cm": "11.0.0-alpha.5",
|
|
86
|
+
"@storybook/angular-compodoc": "11.0.0-alpha.5",
|
|
87
87
|
"@types/node": "^22.19.1",
|
|
88
88
|
"empathic": "^2.0.0",
|
|
89
89
|
"memfs": "^4.11.1",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"rxjs": "^7.4.0",
|
|
107
107
|
"sass": "^1.0.0",
|
|
108
108
|
"sass-embedded": "^1.0.0",
|
|
109
|
-
"storybook": "^11.0.0-alpha.
|
|
109
|
+
"storybook": "^11.0.0-alpha.5",
|
|
110
110
|
"typescript": "^5.9.0 || ^6.0.0",
|
|
111
111
|
"vite": ">=8.0.0",
|
|
112
112
|
"zone.js": ">=0.14.0"
|