@storybook/web-components 11.0.0-beta.3 → 11.0.0-beta.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-TBDFGSWB.js → chunk-OL6OKC2Z.js} +1 -1
- package/dist/_browser-chunks/{chunk-MWWF5KJS.js → chunk-YZWJIPOA.js} +3 -3
- package/dist/_node-chunks/{chunk-W5USQLGE.js → chunk-62SDQIJM.js} +1 -12
- package/dist/_node-chunks/{chunk-A2FVKW65.js → chunk-KESDCAUK.js} +0 -12
- package/dist/docgen/docgen-worker.js +2 -13
- package/dist/docgen/index.js +2 -13
- 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 +4 -15
- package/package.json +2 -2
|
@@ -8,7 +8,7 @@ __export(entry_preview_docs_exports, {
|
|
|
8
8
|
decorators: () => decorators,
|
|
9
9
|
parameters: () => parameters
|
|
10
10
|
});
|
|
11
|
-
import { SourceType as SourceType2 } from "storybook/internal/docs-tools";
|
|
11
|
+
import { SourceType as SourceType2, getSourceSnippetRuntime } from "storybook/internal/docs-tools";
|
|
12
12
|
|
|
13
13
|
// src/docs/print-hole.ts
|
|
14
14
|
import { isDirectiveResult, isTemplateResult } from "lit/directive-helpers.js";
|
|
@@ -308,12 +308,12 @@ function sourceDecorator(storyFn, context) {
|
|
|
308
308
|
}
|
|
309
309
|
|
|
310
310
|
// src/entry-preview-docs.ts
|
|
311
|
-
var
|
|
311
|
+
var snippetRuntime = getSourceSnippetRuntime(), decorators = snippetRuntime === "preview" ? [sourceDecorator] : [], parameters = {
|
|
312
312
|
docs: {
|
|
313
313
|
source: {
|
|
314
314
|
type: SourceType2.DYNAMIC,
|
|
315
315
|
language: "html",
|
|
316
|
-
...
|
|
316
|
+
...snippetRuntime === "server" ? { printHole } : {}
|
|
317
317
|
},
|
|
318
318
|
story: { inline: !0 }
|
|
319
319
|
}
|
|
@@ -1,20 +1,9 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_ixqjvdd3w7j from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_ixqjvdd3w7j from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_ixqjvdd3w7j from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_ixqjvdd3w7j.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_ixqjvdd3w7j.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_ixqjvdd3w7j.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
1
|
import {
|
|
13
2
|
DEFAULT_SLOT_NAME,
|
|
14
3
|
parseStoryFile,
|
|
15
4
|
resolveStoryComponent,
|
|
16
5
|
toArgKey
|
|
17
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-KESDCAUK.js";
|
|
18
7
|
|
|
19
8
|
// src/docgen/docgen-worker.ts
|
|
20
9
|
import { createLazyDocgenMiddleware, loadTypeScriptCompilerApi } from "storybook/internal/common";
|
|
@@ -1,15 +1,3 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_ixqjvdd3w7j from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_ixqjvdd3w7j from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_ixqjvdd3w7j from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_ixqjvdd3w7j.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_ixqjvdd3w7j.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_ixqjvdd3w7j.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
|
-
|
|
13
1
|
// src/docgen/component-docgen/resolve-component/resolve-component.ts
|
|
14
2
|
import {
|
|
15
3
|
isStringLiteral,
|
|
@@ -1,18 +1,7 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_ixqjvdd3w7j from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_ixqjvdd3w7j from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_ixqjvdd3w7j from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_ixqjvdd3w7j.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_ixqjvdd3w7j.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_ixqjvdd3w7j.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
1
|
import {
|
|
13
2
|
createDocgenProvider
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
15
|
-
import "../_node-chunks/chunk-
|
|
3
|
+
} from "../_node-chunks/chunk-62SDQIJM.js";
|
|
4
|
+
import "../_node-chunks/chunk-KESDCAUK.js";
|
|
16
5
|
export {
|
|
17
6
|
createDocgenProvider
|
|
18
7
|
};
|
package/dist/docgen/index.js
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_ixqjvdd3w7j from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_ixqjvdd3w7j from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_ixqjvdd3w7j from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_ixqjvdd3w7j.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_ixqjvdd3w7j.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_ixqjvdd3w7j.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
1
|
import {
|
|
13
2
|
buildDocgenPayload,
|
|
14
3
|
createDocgenProvider
|
|
15
|
-
} from "../_node-chunks/chunk-
|
|
16
|
-
import "../_node-chunks/chunk-
|
|
4
|
+
} from "../_node-chunks/chunk-62SDQIJM.js";
|
|
5
|
+
import "../_node-chunks/chunk-KESDCAUK.js";
|
|
17
6
|
export {
|
|
18
7
|
buildDocgenPayload,
|
|
19
8
|
createDocgenProvider
|
|
@@ -2,9 +2,9 @@ import {
|
|
|
2
2
|
getCustomElements,
|
|
3
3
|
isValidComponent,
|
|
4
4
|
isValidMetaData
|
|
5
|
-
} from "./_browser-chunks/chunk-
|
|
5
|
+
} from "./_browser-chunks/chunk-OL6OKC2Z.js";
|
|
6
6
|
import "./_browser-chunks/chunk-XOX44XZE.js";
|
|
7
|
-
import "./_browser-chunks/chunk-
|
|
7
|
+
import "./_browser-chunks/chunk-YZWJIPOA.js";
|
|
8
8
|
import "./_browser-chunks/chunk-4BE7D4DS.js";
|
|
9
9
|
|
|
10
10
|
// src/entry-preview-argtypes.ts
|
package/dist/index.js
CHANGED
|
@@ -6,9 +6,9 @@ import {
|
|
|
6
6
|
setCustomElements,
|
|
7
7
|
setCustomElementsManifest,
|
|
8
8
|
setProjectAnnotations
|
|
9
|
-
} from "./_browser-chunks/chunk-
|
|
9
|
+
} from "./_browser-chunks/chunk-OL6OKC2Z.js";
|
|
10
10
|
import "./_browser-chunks/chunk-XOX44XZE.js";
|
|
11
|
-
import "./_browser-chunks/chunk-
|
|
11
|
+
import "./_browser-chunks/chunk-YZWJIPOA.js";
|
|
12
12
|
import "./_browser-chunks/chunk-4BE7D4DS.js";
|
|
13
13
|
export {
|
|
14
14
|
__definePreview,
|
package/dist/preset.js
CHANGED
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
import CJS_COMPAT_NODE_URL_ixqjvdd3w7j from 'node:url';
|
|
2
|
-
import CJS_COMPAT_NODE_PATH_ixqjvdd3w7j from 'node:path';
|
|
3
|
-
import CJS_COMPAT_NODE_MODULE_ixqjvdd3w7j from "node:module";
|
|
4
|
-
|
|
5
|
-
var __filename = CJS_COMPAT_NODE_URL_ixqjvdd3w7j.fileURLToPath(import.meta.url);
|
|
6
|
-
var __dirname = CJS_COMPAT_NODE_PATH_ixqjvdd3w7j.dirname(__filename);
|
|
7
|
-
var require = CJS_COMPAT_NODE_MODULE_ixqjvdd3w7j.createRequire(import.meta.url);
|
|
8
|
-
|
|
9
|
-
// ------------------------------------------------------------
|
|
10
|
-
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
-
// ------------------------------------------------------------
|
|
12
1
|
import {
|
|
13
2
|
parseArgKey,
|
|
14
3
|
parseStoryFile,
|
|
15
4
|
resolveStoryComponent
|
|
16
|
-
} from "./_node-chunks/chunk-
|
|
5
|
+
} from "./_node-chunks/chunk-KESDCAUK.js";
|
|
17
6
|
|
|
18
7
|
// src/preset.ts
|
|
19
8
|
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
@@ -740,15 +729,15 @@ function renderSnippet(render, exportName, args) {
|
|
|
740
729
|
let body = render.body, reads = argReads(render);
|
|
741
730
|
if (!reads)
|
|
742
731
|
return;
|
|
743
|
-
let code = textOf(body), indent = /\n([ \t]*)[^\n]*$/.exec(code)?.[1] ?? "",
|
|
732
|
+
let code = textOf(body), indent = /\n([ \t]*)[^\n]*$/.exec(code)?.[1] ?? "", dedent = (text) => indent ? text.replaceAll(`
|
|
744
733
|
${indent}`, `
|
|
745
734
|
`) : text, print = (mark) => {
|
|
746
735
|
let text = "", cursor = 0;
|
|
747
736
|
for (let read of reads) {
|
|
748
737
|
let { before, value, after, hole } = edit(read, args);
|
|
749
|
-
text +=
|
|
738
|
+
text += dedent(code.slice(cursor, read.node.start - body.start)), text += before + (mark && hole ? mark(hole, value) : value) + after, cursor = read.node.end - body.start;
|
|
750
739
|
}
|
|
751
|
-
return text +=
|
|
740
|
+
return text += dedent(code.slice(cursor)), body.type === "BlockStatement" ? `const ${exportName} = ${render.async ? "async " : ""}() => ${text};` : text;
|
|
752
741
|
}, snippet = print();
|
|
753
742
|
if (reads.some((read) => read.arg === void 0))
|
|
754
743
|
return { snippet, template: void 0 };
|
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.5",
|
|
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.5",
|
|
78
78
|
"typescript": "^5.9.0 || ^6.0.0 || ^7.0.0"
|
|
79
79
|
},
|
|
80
80
|
"publishConfig": {
|