@storybook/angular-vite 11.0.0-alpha.1 → 11.0.0-alpha.2
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 +0 -4
- package/dist/_browser-chunks/{chunk-YQ53UO6D.js → chunk-BFQMI74D.js} +36 -25
- package/dist/_browser-chunks/{chunk-RPSYDPZX.js → chunk-K4OVBYYR.js} +1 -1
- package/dist/_browser-chunks/{chunk-PSE2PYUH.js → chunk-ONLO5U66.js} +4 -4
- package/dist/_browser-chunks/{chunk-SD6SKAYF.js → chunk-TN7UZNXT.js} +1 -1
- package/dist/_node-chunks/{chunk-GLAMVNEY.js → chunk-EOBWXGRJ.js} +6 -6
- package/dist/_node-chunks/{chunk-RUIEHCV7.js → chunk-IISTVQWO.js} +6 -6
- package/dist/_node-chunks/{chunk-FV5UMD2C.js → chunk-KE55VWWH.js} +22 -7
- package/dist/_node-chunks/{story-docs-template-analysis-GS3U7KVZ.js → story-docs-template-analysis-FVKKDKOD.js} +6 -6
- package/dist/builders/build-storybook/index.js +33 -29
- package/dist/builders/start-storybook/index.js +41 -31
- package/dist/client/config.js +2 -2
- package/dist/client/docs/config.js +2 -2
- package/dist/client/index.js +4 -4
- package/dist/docgen/docgen-worker.js +161 -81
- package/dist/index.d.ts +20 -859
- package/dist/index.js +4 -4
- package/dist/node/index.js +6 -6
- package/dist/node/vitest.js +6 -6
- package/dist/preset.js +20 -19
- package/package.json +7 -7
- package/start-schema.json +0 -4
- package/template/cli/header.component.ts +4 -1
- package/template/cli/page.component.ts +5 -3
package/dist/index.js
CHANGED
|
@@ -5,10 +5,10 @@ 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-
|
|
11
|
-
import "./_browser-chunks/chunk-
|
|
8
|
+
} from "./_browser-chunks/chunk-ONLO5U66.js";
|
|
9
|
+
import "./_browser-chunks/chunk-TN7UZNXT.js";
|
|
10
|
+
import "./_browser-chunks/chunk-K4OVBYYR.js";
|
|
11
|
+
import "./_browser-chunks/chunk-BFQMI74D.js";
|
|
12
12
|
export {
|
|
13
13
|
__definePreview,
|
|
14
14
|
applicationConfig,
|
package/dist/node/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_ayxk7ta37hg from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ayxk7ta37hg from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ayxk7ta37hg from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ayxk7ta37hg.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ayxk7ta37hg.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ayxk7ta37hg.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_ayxk7ta37hg from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ayxk7ta37hg from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ayxk7ta37hg from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ayxk7ta37hg.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ayxk7ta37hg.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ayxk7ta37hg.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_ayxk7ta37hg from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_ayxk7ta37hg from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_ayxk7ta37hg from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_ayxk7ta37hg.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_ayxk7ta37hg.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_ayxk7ta37hg.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-IISTVQWO.js";
|
|
15
15
|
import {
|
|
16
16
|
parseStoryFile
|
|
17
|
-
} from "./_node-chunks/chunk-
|
|
17
|
+
} from "./_node-chunks/chunk-EOBWXGRJ.js";
|
|
18
18
|
|
|
19
19
|
// src/preset.ts
|
|
20
20
|
import { findConfigFile } from "storybook/internal/common";
|
|
@@ -938,7 +938,7 @@ var buildStoryDocsPayload = async (input, context) => {
|
|
|
938
938
|
fields: fields2
|
|
939
939
|
});
|
|
940
940
|
if (userMarkup?.kind === "literal") {
|
|
941
|
-
let { analyzeStoryTemplate } = await import("./_node-chunks/story-docs-template-analysis-
|
|
941
|
+
let { analyzeStoryTemplate } = await import("./_node-chunks/story-docs-template-analysis-FVKKDKOD.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(
|
|
942
942
|
referencedNames,
|
|
943
943
|
userMarkup.representedArgs,
|
|
944
944
|
shape,
|
|
@@ -1049,6 +1049,7 @@ var warnedMissingDocgenService = !1, getDocgenPayload = async (componentId) => {
|
|
|
1049
1049
|
// src/preset.ts
|
|
1050
1050
|
var addons = [], features = async (existing) => ({
|
|
1051
1051
|
...existing,
|
|
1052
|
+
componentsManifest: !0,
|
|
1052
1053
|
experimentalDocgenServer: !0
|
|
1053
1054
|
}), previewAnnotations = async (entries = [], options) => {
|
|
1054
1055
|
let config = fileURLToPath2(import.meta.resolve("@storybook/angular-vite/client/config")), annotations = [...entries, config];
|
|
@@ -1080,7 +1081,7 @@ function resolveZoneless(angularBuilderOptions) {
|
|
|
1080
1081
|
return angularBuilderOptions?.zoneless ?? !0;
|
|
1081
1082
|
}
|
|
1082
1083
|
var viteFinal = async (config, options) => {
|
|
1083
|
-
if (
|
|
1084
|
+
if (!options.angularBuilderOptions && process.env.STORYBOOK_ANGULAR_BUILDER_OPTIONS_JSON)
|
|
1084
1085
|
try {
|
|
1085
1086
|
options.angularBuilderOptions = JSON.parse(
|
|
1086
1087
|
process.env.STORYBOOK_ANGULAR_BUILDER_OPTIONS_JSON
|
|
@@ -1088,7 +1089,7 @@ var viteFinal = async (config, options) => {
|
|
|
1088
1089
|
} catch {
|
|
1089
1090
|
}
|
|
1090
1091
|
config.plugins = (config.plugins ?? []).flat().filter((plugin) => !plugin?.name?.includes("analogjs"));
|
|
1091
|
-
let { mergeConfig, normalizePath } = await import("vite"), { default: angular } = await import("@analogjs/vite-plugin-angular"), framework = await options.presets.apply("framework"), resolvedFeatures = await options.presets.apply(
|
|
1092
|
+
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(
|
|
1092
1093
|
"features",
|
|
1093
1094
|
{}
|
|
1094
1095
|
), docgenServer = !!resolvedFeatures?.experimentalDocgenServer, compodocConfig = await resolveCompodocConfig(options, { viteRoot: config?.root });
|
|
@@ -1098,15 +1099,15 @@ var viteFinal = async (config, options) => {
|
|
|
1098
1099
|
workspaceRoot: compodocConfig.workspaceRoot,
|
|
1099
1100
|
outputDir: compodocConfig.outputDir
|
|
1100
1101
|
});
|
|
1101
|
-
let propsTable = resolvePropsTable(
|
|
1102
|
-
warnAboutPropsTable(
|
|
1102
|
+
let propsTable = resolvePropsTable(frameworkOptions, resolvedFeatures);
|
|
1103
|
+
warnAboutPropsTable(frameworkOptions, resolvedFeatures), resolvedFeatures?.componentsManifest && !docgenServer && logger5.warn(
|
|
1103
1104
|
"The `componentsManifest` feature needs the `experimentalDocgenServer` 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: { experimentalDocgenServer: true }` in your `main.ts`."
|
|
1104
1105
|
);
|
|
1105
|
-
let zoneless = resolveZoneless(options
|
|
1106
|
-
jit: typeof
|
|
1107
|
-
liveReload: typeof
|
|
1108
|
-
tsconfig: typeof
|
|
1109
|
-
inlineStylesExtension: typeof
|
|
1106
|
+
let zoneless = resolveZoneless(options.angularBuilderOptions), angularPlugins = angular({
|
|
1107
|
+
jit: typeof frameworkOptions?.jit < "u" ? frameworkOptions?.jit : !0,
|
|
1108
|
+
liveReload: typeof frameworkOptions?.liveReload < "u" ? frameworkOptions?.liveReload : !1,
|
|
1109
|
+
tsconfig: typeof frameworkOptions?.tsconfig < "u" ? frameworkOptions?.tsconfig : options.tsConfig ?? "./.storybook/tsconfig.json",
|
|
1110
|
+
inlineStylesExtension: typeof frameworkOptions?.inlineStylesExtension < "u" ? frameworkOptions?.inlineStylesExtension : "css"
|
|
1110
1111
|
}), pluginsToInject = (Array.isArray(angularPlugins) ? angularPlugins : [angularPlugins]).filter(Boolean).map((plugin) => plugin?.name === "@analogjs/vite-plugin-angular" && !plugin.enforce ? { ...plugin, enforce: "pre" } : plugin);
|
|
1111
1112
|
return mergeConfig(config, {
|
|
1112
1113
|
// `build` already falls back to `compilerOptions.paths` once normal resolution fails, so an
|
|
@@ -1164,7 +1165,7 @@ var viteFinal = async (config, options) => {
|
|
|
1164
1165
|
angularOptionsPlugin(options, { normalizePath, zoneless }),
|
|
1165
1166
|
stylePreprocessorCheckPlugin(),
|
|
1166
1167
|
storybookOxcPlugin(),
|
|
1167
|
-
...docgenServer && options
|
|
1168
|
+
...docgenServer && options.configDir ? [compodocJsonStubPlugin(options.configDir)] : []
|
|
1168
1169
|
],
|
|
1169
1170
|
define: {
|
|
1170
1171
|
STORYBOOK_ANGULAR_OPTIONS: JSON.stringify({
|
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.2",
|
|
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.2",
|
|
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.2",
|
|
86
|
+
"@storybook/angular-compodoc": "11.0.0-alpha.2",
|
|
87
87
|
"@types/node": "^22.19.1",
|
|
88
88
|
"empathic": "^2.0.0",
|
|
89
89
|
"memfs": "^4.11.1",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"zone.js": "^0.16.2"
|
|
93
93
|
},
|
|
94
94
|
"peerDependencies": {
|
|
95
|
-
"@analogjs/vite-plugin-angular": ">=2.
|
|
95
|
+
"@analogjs/vite-plugin-angular": ">=2.7.3",
|
|
96
96
|
"@angular-devkit/architect": ">=0.2100.0 < 0.2300.0",
|
|
97
97
|
"@angular-devkit/core": ">=21.0.0 < 23.0.0",
|
|
98
98
|
"@angular/build": ">=21.0.0 < 23.0.0",
|
|
@@ -106,8 +106,8 @@
|
|
|
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.
|
|
110
|
-
"typescript": "
|
|
109
|
+
"storybook": "^11.0.0-alpha.2",
|
|
110
|
+
"typescript": "^5.9.0 || ^6.0.0",
|
|
111
111
|
"vite": ">=8.0.0",
|
|
112
112
|
"zone.js": ">=0.14.0"
|
|
113
113
|
},
|
package/start-schema.json
CHANGED
|
@@ -166,10 +166,6 @@
|
|
|
166
166
|
"description": "Write stats JSON to disk",
|
|
167
167
|
"default": false
|
|
168
168
|
},
|
|
169
|
-
"previewUrl": {
|
|
170
|
-
"type": "string",
|
|
171
|
-
"description": "Disables the default storybook preview and lets you use your own"
|
|
172
|
-
},
|
|
173
169
|
"loglevel": {
|
|
174
170
|
"type": "string",
|
|
175
171
|
"description": "Controls level of logging during build. Can be one of: [trace, debug, info (default), warn, error, silent].",
|
|
@@ -22,7 +22,10 @@ import type { User } from './user';
|
|
|
22
22
|
d="M5.3 10.6l10.4 6v11.1l-10.4-6v-11zm11.4-6.2l9.7 5.5-9.7 5.6V4.4z"
|
|
23
23
|
fill="#555AB9"
|
|
24
24
|
/>
|
|
25
|
-
<path
|
|
25
|
+
<path
|
|
26
|
+
d="M27.2 10.6v11.2l-10.5 6V16.5l10.5-6zM15.7 4.4v11L6 10l9.7-5.5z"
|
|
27
|
+
fill="#91BAF8"
|
|
28
|
+
/>
|
|
26
29
|
</g>
|
|
27
30
|
</svg>
|
|
28
31
|
<h1>Acme</h1>
|
|
@@ -27,8 +27,8 @@ import type { User } from './user';
|
|
|
27
27
|
</p>
|
|
28
28
|
<p>
|
|
29
29
|
Render pages with mock data. This makes it easy to build and review page states without
|
|
30
|
-
needing to navigate to them in your app. Here are some handy patterns for managing page
|
|
31
|
-
in Storybook:
|
|
30
|
+
needing to navigate to them in your app. Here are some handy patterns for managing page
|
|
31
|
+
data in Storybook:
|
|
32
32
|
</p>
|
|
33
33
|
<ul>
|
|
34
34
|
<li>
|
|
@@ -46,7 +46,9 @@ import type { User } from './user';
|
|
|
46
46
|
Storybook tutorials
|
|
47
47
|
</a>
|
|
48
48
|
. Read more in the
|
|
49
|
-
<a href="https://storybook.js.org/docs" target="_blank" rel="noopener noreferrer">
|
|
49
|
+
<a href="https://storybook.js.org/docs" target="_blank" rel="noopener noreferrer">
|
|
50
|
+
docs
|
|
51
|
+
</a>
|
|
50
52
|
.
|
|
51
53
|
</p>
|
|
52
54
|
<div class="tip-wrapper">
|