@storybook/web-components 11.0.0-alpha.7 → 11.0.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/dist/_browser-chunks/{chunk-IPGO7UEM.js → chunk-4CVRUPXU.js} +1 -1
- package/dist/_browser-chunks/{chunk-CAPEJO4V.js → chunk-XOX44XZE.js} +16 -9
- package/dist/_node-chunks/{chunk-P75AOQLO.js → chunk-7DGX2RHV.js} +34 -18
- package/dist/_node-chunks/chunk-A2ZEEPU6.js +76 -0
- package/dist/docgen/docgen-worker.js +8 -8
- package/dist/docgen/index.js +8 -8
- package/dist/entry-preview-argtypes.js +2 -2
- package/dist/entry-preview.js +1 -1
- package/dist/index.js +2 -2
- package/dist/preset.js +129 -605
- package/package.json +2 -2
- package/dist/_node-chunks/chunk-MMJPCIXK.js +0 -45
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/web-components",
|
|
3
|
-
"version": "11.0.0-alpha.
|
|
3
|
+
"version": "11.0.0-alpha.8",
|
|
4
4
|
"description": "Storybook Web Components renderer: Develop, document, and test UI components in isolation",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
76
|
"lit": "^2.0.0 || ^3.0.0",
|
|
77
|
-
"storybook": "^11.0.0-alpha.
|
|
77
|
+
"storybook": "^11.0.0-alpha.8"
|
|
78
78
|
},
|
|
79
79
|
"publishConfig": {
|
|
80
80
|
"access": "public"
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_seyt09815b from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_seyt09815b from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_seyt09815b from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_seyt09815b.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_seyt09815b.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_seyt09815b.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
|
|
13
|
-
// src/docgen/component-docgen/resolve-component/resolve-component.ts
|
|
14
|
-
import { loadCsf, unwrapExpression } from "storybook/internal/csf-tools";
|
|
15
|
-
import { recast, types as t } from "storybook/internal/babel";
|
|
16
|
-
import { readFileSync } from "node:fs";
|
|
17
|
-
function parseStoryFile(storyFilePath, title) {
|
|
18
|
-
try {
|
|
19
|
-
let source = readFileSync(storyFilePath, "utf8");
|
|
20
|
-
return loadCsf(source, { makeTitle: () => title }).parse();
|
|
21
|
-
} catch {
|
|
22
|
-
return;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
var expressionFor = (node) => recast.print(node).code;
|
|
26
|
-
function tagFromNode(node) {
|
|
27
|
-
let expression = expressionFor(node), unwrapped = unwrapExpression(node);
|
|
28
|
-
if (t.isStringLiteral(unwrapped) && unwrapped.value !== "")
|
|
29
|
-
return { tag: unwrapped.value };
|
|
30
|
-
if (t.isTemplateLiteral(unwrapped) && unwrapped.expressions.length === 0) {
|
|
31
|
-
let tag = unwrapped.quasis[0]?.value.cooked;
|
|
32
|
-
if (tag)
|
|
33
|
-
return { tag };
|
|
34
|
-
}
|
|
35
|
-
return { reason: "component-not-a-tag", expression };
|
|
36
|
-
}
|
|
37
|
-
function resolveStoryComponent(csf) {
|
|
38
|
-
let component = csf._metaAnnotations.component;
|
|
39
|
-
return component ? tagFromNode(component) : { reason: "no-meta-component" };
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export {
|
|
43
|
-
parseStoryFile,
|
|
44
|
-
resolveStoryComponent
|
|
45
|
-
};
|