@storybook/web-components 11.0.0-beta.1 → 11.0.0-beta.3
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-MWWF5KJS.js +326 -0
- package/dist/_browser-chunks/{chunk-4CVRUPXU.js → chunk-TBDFGSWB.js} +1 -1
- package/dist/_node-chunks/{chunk-KEYAB73A.js → chunk-A2FVKW65.js} +31 -7
- package/dist/_node-chunks/{chunk-RWJBQ2TK.js → chunk-W5USQLGE.js} +10 -22
- 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-docs.js +1 -1
- package/dist/index.js +2 -2
- package/dist/preset.js +455 -739
- package/package.json +2 -2
- package/dist/_browser-chunks/chunk-EGBR6PF2.js +0 -48
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/web-components",
|
|
3
|
-
"version": "11.0.0-beta.
|
|
3
|
+
"version": "11.0.0-beta.3",
|
|
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-beta.
|
|
77
|
+
"storybook": "^11.0.0-beta.3",
|
|
78
78
|
"typescript": "^5.9.0 || ^6.0.0 || ^7.0.0"
|
|
79
79
|
},
|
|
80
80
|
"publishConfig": {
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
__export
|
|
3
|
-
} from "./chunk-4BE7D4DS.js";
|
|
4
|
-
|
|
5
|
-
// src/entry-preview-docs.ts
|
|
6
|
-
var entry_preview_docs_exports = {};
|
|
7
|
-
__export(entry_preview_docs_exports, {
|
|
8
|
-
decorators: () => decorators,
|
|
9
|
-
parameters: () => parameters
|
|
10
|
-
});
|
|
11
|
-
import { SourceType as SourceType2 } from "storybook/internal/docs-tools";
|
|
12
|
-
|
|
13
|
-
// src/docs/sourceDecorator.ts
|
|
14
|
-
import { SourceType } from "storybook/internal/docs-tools";
|
|
15
|
-
import { render } from "lit";
|
|
16
|
-
import { emitTransformCode, useEffect } from "storybook/preview-api";
|
|
17
|
-
var LIT_EXPRESSION_COMMENTS = /<!--\?lit\$[0-9]+\$-->|<!--\??-->/g;
|
|
18
|
-
function skipSourceRender(context) {
|
|
19
|
-
let sourceParams = context?.parameters.docs?.source, isArgsStory = context?.parameters.__isArgsStory;
|
|
20
|
-
return sourceParams?.type === SourceType.DYNAMIC ? !1 : !isArgsStory || sourceParams?.code || sourceParams?.type === SourceType.CODE;
|
|
21
|
-
}
|
|
22
|
-
function renderStorySource(storyResult) {
|
|
23
|
-
let container = window.document.createElement("div");
|
|
24
|
-
return storyResult instanceof DocumentFragment ? render(storyResult.cloneNode(!0), container) : render(storyResult, container), container.innerHTML.replace(LIT_EXPRESSION_COMMENTS, "");
|
|
25
|
-
}
|
|
26
|
-
function sourceDecorator(storyFn, context) {
|
|
27
|
-
let story = storyFn(), renderedForSource = context?.parameters.docs?.source?.excludeDecorators ? context.originalStoryFn(context.args, context) : story, source;
|
|
28
|
-
return useEffect(() => {
|
|
29
|
-
source && emitTransformCode(source, context);
|
|
30
|
-
}), skipSourceRender(context) || (source = renderStorySource(renderedForSource)), story;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// src/entry-preview-docs.ts
|
|
34
|
-
var useStaticServiceSnippets = "FEATURES" in globalThis && globalThis.FEATURES?.docgenServer, decorators = useStaticServiceSnippets ? [] : [sourceDecorator], parameters = {
|
|
35
|
-
docs: {
|
|
36
|
-
source: {
|
|
37
|
-
type: SourceType2.DYNAMIC,
|
|
38
|
-
language: "html"
|
|
39
|
-
},
|
|
40
|
-
story: { inline: !0 }
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
export {
|
|
45
|
-
decorators,
|
|
46
|
-
parameters,
|
|
47
|
-
entry_preview_docs_exports
|
|
48
|
-
};
|