@storybook/angular-vite 11.0.0-beta.2 → 11.0.0-beta.4
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 +1 -1
- package/dist/_browser-chunks/{chunk-OAG3JRJQ.js → chunk-D6MATLGC.js} +3 -3
- package/dist/_browser-chunks/{chunk-JSKZYOEY.js → chunk-GVR3YWT3.js} +1 -1
- package/dist/_browser-chunks/{chunk-FDLKT4EQ.js → chunk-UU6I6OE3.js} +1 -1
- package/dist/_browser-chunks/{chunk-VA3FEKPB.js → chunk-Z2ATXI4R.js} +1 -1
- package/dist/_node-chunks/{chunk-WCYA5VMZ.js → chunk-AVIR5V77.js} +1 -12
- package/dist/_node-chunks/{chunk-ETGWD5QX.js → chunk-DSX4K57A.js} +0 -12
- package/dist/_node-chunks/chunk-MIQVDAHU.js +37 -0
- package/dist/_node-chunks/{chunk-VQ2WVY73.js → chunk-V5HMO3W7.js} +0 -12
- package/dist/_node-chunks/story-docs-template-analysis-D4DNIJAK.js +8 -0
- package/dist/builders/build-storybook/index.js +3 -14
- package/dist/builders/start-storybook/index.js +3 -14
- 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 +122 -601
- package/dist/index.js +4 -4
- package/dist/node/index.js +0 -12
- package/dist/node/vitest.js +0 -12
- package/dist/preset.js +5 -16
- package/package.json +6 -6
- package/start-schema.json +1 -1
- package/dist/_node-chunks/chunk-2F3CYJX5.js +0 -42
- package/dist/_node-chunks/story-docs-template-analysis-65HGKMRZ.js +0 -19
package/build-schema.json
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"loglevel": {
|
|
33
33
|
"type": "string",
|
|
34
34
|
"description": "Controls level of logging during build. Can be one of: [trace, debug, info (default), warn, error, silent].",
|
|
35
|
-
"
|
|
35
|
+
"enum": ["trace", "debug", "info", "warn", "error", "silent"]
|
|
36
36
|
},
|
|
37
37
|
"logfile": {
|
|
38
38
|
"type": "string",
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
config_exports
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GVR3YWT3.js";
|
|
4
4
|
import {
|
|
5
5
|
config_exports as config_exports2
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Z2ATXI4R.js";
|
|
7
7
|
import {
|
|
8
8
|
computesTemplateFromComponent,
|
|
9
9
|
formatPropInTemplate,
|
|
10
10
|
isComponent,
|
|
11
11
|
render_exports
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-UU6I6OE3.js";
|
|
13
13
|
|
|
14
14
|
// src/client/portable-stories.ts
|
|
15
15
|
import {
|
|
@@ -519,7 +519,7 @@ var applicationRefs = /* @__PURE__ */ new Map(), STORY_UID_ATTRIBUTE = "data-sb-
|
|
|
519
519
|
/** Wait and destroy the platform */
|
|
520
520
|
static resetApplications(domNode) {
|
|
521
521
|
applicationRefs.forEach((appRef, appDOMNode) => {
|
|
522
|
-
if (!
|
|
522
|
+
if (!(domNode && appDOMNode !== domNode) && (applicationRefs.delete(appDOMNode), !appRef.destroyed))
|
|
523
523
|
try {
|
|
524
524
|
appRef.components.slice().forEach((componentRef) => componentRef.destroy());
|
|
525
525
|
} finally {
|
|
@@ -1,17 +1,6 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_yl4v0bl5wmj from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_yl4v0bl5wmj from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_yl4v0bl5wmj from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_yl4v0bl5wmj.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_yl4v0bl5wmj.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_yl4v0bl5wmj.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
1
|
import {
|
|
13
2
|
up
|
|
14
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-DSX4K57A.js";
|
|
15
4
|
|
|
16
5
|
// ../../../node_modules/empathic/package.mjs
|
|
17
6
|
function up2(options) {
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_yl4v0bl5wmj from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_yl4v0bl5wmj from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_yl4v0bl5wmj from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_yl4v0bl5wmj.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_yl4v0bl5wmj.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_yl4v0bl5wmj.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
|
|
13
1
|
// src/find-tsconfig.ts
|
|
14
2
|
import { getProjectRoot } from "storybook/internal/common";
|
|
15
3
|
import { resolve as resolve2 } from "node:path";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// src/docgen/resolve-component.ts
|
|
2
|
+
import {
|
|
3
|
+
createMetaComponentResolver,
|
|
4
|
+
createModuleResolver,
|
|
5
|
+
extractDeclaredSubcomponents,
|
|
6
|
+
jsTsSourceExtensions
|
|
7
|
+
} from "storybook/internal/common";
|
|
8
|
+
import { loadCsf } from "storybook/internal/csf-tools";
|
|
9
|
+
import { readFileSync } from "node:fs";
|
|
10
|
+
var resolveMetaComponent = createMetaComponentResolver(), storyImportResolver = createModuleResolver({
|
|
11
|
+
extensions: [...jsTsSourceExtensions],
|
|
12
|
+
mainFields: ["module", "main"],
|
|
13
|
+
tsconfig: "auto"
|
|
14
|
+
});
|
|
15
|
+
function parseStoryFile(storyFilePath, title) {
|
|
16
|
+
try {
|
|
17
|
+
let source = readFileSync(storyFilePath, "utf8");
|
|
18
|
+
return loadCsf(source, { makeTitle: () => title, fileName: storyFilePath }).parse();
|
|
19
|
+
} catch {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
function resolveStoryComponents(storyFilePath, title = "Docgen") {
|
|
24
|
+
let csf = parseStoryFile(storyFilePath, title);
|
|
25
|
+
return csf ? {
|
|
26
|
+
component: resolveMetaComponent(csf, storyFilePath),
|
|
27
|
+
subcomponents: extractDeclaredSubcomponents(csf).map(({ name, node }) => ({
|
|
28
|
+
name,
|
|
29
|
+
resolution: resolveMetaComponent(csf, storyFilePath, node)
|
|
30
|
+
}))
|
|
31
|
+
} : { component: { reason: "no-meta-component" }, subcomponents: [] };
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
parseStoryFile,
|
|
36
|
+
resolveStoryComponents
|
|
37
|
+
};
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_yl4v0bl5wmj from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_yl4v0bl5wmj from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_yl4v0bl5wmj from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_yl4v0bl5wmj.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_yl4v0bl5wmj.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_yl4v0bl5wmj.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
|
|
13
1
|
// src/docgen/story-docs-template-analysis.ts
|
|
14
2
|
import {
|
|
15
3
|
CombinedRecursiveAstVisitor,
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_yl4v0bl5wmj from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_yl4v0bl5wmj from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_yl4v0bl5wmj from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_yl4v0bl5wmj.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_yl4v0bl5wmj.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_yl4v0bl5wmj.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
1
|
import {
|
|
13
2
|
errorSummary,
|
|
14
3
|
mergeBrowserTargetOptions,
|
|
@@ -16,10 +5,10 @@ import {
|
|
|
16
5
|
printErrorDetails,
|
|
17
6
|
requireBuilderTarget,
|
|
18
7
|
up
|
|
19
|
-
} from "../../_node-chunks/chunk-
|
|
8
|
+
} from "../../_node-chunks/chunk-AVIR5V77.js";
|
|
20
9
|
import {
|
|
21
10
|
resolveTsconfig
|
|
22
|
-
} from "../../_node-chunks/chunk-
|
|
11
|
+
} from "../../_node-chunks/chunk-DSX4K57A.js";
|
|
23
12
|
|
|
24
13
|
// src/builders/build-storybook/index.ts
|
|
25
14
|
import { readFileSync } from "node:fs";
|
|
@@ -53,7 +42,7 @@ var commandBuilder = async (options, context) => {
|
|
|
53
42
|
sourceMap = !1,
|
|
54
43
|
preserveSymlinks = !1,
|
|
55
44
|
zoneless = !0
|
|
56
|
-
} = options, packageJsonPath = up({ cwd:
|
|
45
|
+
} = options, packageJsonPath = up({ cwd: import.meta.dirname }), packageJson = packageJsonPath != null ? JSON.parse(readFileSync(packageJsonPath, "utf8")) : null, declaredOptions = resolvedTarget ? await context.getTargetOptions(requireBuilderTarget(context)) : options, angularBuilderOptions = mergeBrowserTargetOptions(
|
|
57
46
|
{
|
|
58
47
|
stylePreprocessorOptions: declaredOptions.stylePreprocessorOptions,
|
|
59
48
|
styles: declaredOptions.styles,
|
|
@@ -1,14 +1,3 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_yl4v0bl5wmj from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_yl4v0bl5wmj from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_yl4v0bl5wmj from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_yl4v0bl5wmj.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_yl4v0bl5wmj.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_yl4v0bl5wmj.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
1
|
import {
|
|
13
2
|
errorSummary,
|
|
14
3
|
mergeBrowserTargetOptions,
|
|
@@ -16,10 +5,10 @@ import {
|
|
|
16
5
|
printErrorDetails,
|
|
17
6
|
requireBuilderTarget,
|
|
18
7
|
up
|
|
19
|
-
} from "../../_node-chunks/chunk-
|
|
8
|
+
} from "../../_node-chunks/chunk-AVIR5V77.js";
|
|
20
9
|
import {
|
|
21
10
|
resolveTsconfig
|
|
22
|
-
} from "../../_node-chunks/chunk-
|
|
11
|
+
} from "../../_node-chunks/chunk-DSX4K57A.js";
|
|
23
12
|
|
|
24
13
|
// src/builders/start-storybook/index.ts
|
|
25
14
|
import { readFileSync } from "node:fs";
|
|
@@ -70,7 +59,7 @@ var commandBuilder = (options, context) => new Observable((observer) => {
|
|
|
70
59
|
sourceMap = !1,
|
|
71
60
|
preserveSymlinks = !1,
|
|
72
61
|
zoneless = !0
|
|
73
|
-
} = options, packageJsonPath = up({ cwd:
|
|
62
|
+
} = options, packageJsonPath = up({ cwd: import.meta.dirname }), packageJson = packageJsonPath != null ? JSON.parse(readFileSync(packageJsonPath, "utf8")) : null, declaredOptions = resolvedTarget ? await context.getTargetOptions(requireBuilderTarget(context)) : options, angularBuilderOptions = mergeBrowserTargetOptions(
|
|
74
63
|
{
|
|
75
64
|
stylePreprocessorOptions: declaredOptions.stylePreprocessorOptions,
|
|
76
65
|
styles: declaredOptions.styles,
|
package/dist/client/config.js
CHANGED
|
@@ -2,11 +2,11 @@ import {
|
|
|
2
2
|
argTypesEnhancers,
|
|
3
3
|
decorateStory,
|
|
4
4
|
parameters
|
|
5
|
-
} from "../_browser-chunks/chunk-
|
|
5
|
+
} from "../_browser-chunks/chunk-GVR3YWT3.js";
|
|
6
6
|
import {
|
|
7
7
|
render,
|
|
8
8
|
renderToCanvas
|
|
9
|
-
} from "../_browser-chunks/chunk-
|
|
9
|
+
} from "../_browser-chunks/chunk-UU6I6OE3.js";
|
|
10
10
|
export {
|
|
11
11
|
decorateStory as applyDecorators,
|
|
12
12
|
argTypesEnhancers,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
decorators,
|
|
3
3
|
parameters
|
|
4
|
-
} from "../../_browser-chunks/chunk-
|
|
5
|
-
import "../../_browser-chunks/chunk-
|
|
4
|
+
} from "../../_browser-chunks/chunk-Z2ATXI4R.js";
|
|
5
|
+
import "../../_browser-chunks/chunk-UU6I6OE3.js";
|
|
6
6
|
export {
|
|
7
7
|
decorators,
|
|
8
8
|
parameters
|
package/dist/client/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-D6MATLGC.js";
|
|
9
|
+
import "../_browser-chunks/chunk-GVR3YWT3.js";
|
|
10
|
+
import "../_browser-chunks/chunk-Z2ATXI4R.js";
|
|
11
|
+
import "../_browser-chunks/chunk-UU6I6OE3.js";
|
|
12
12
|
export {
|
|
13
13
|
__definePreview,
|
|
14
14
|
applicationConfig,
|