@web/storybook-builder 0.2.6 → 0.3.0
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/CHANGELOG.md +6 -0
- package/dist/generate-app-script.d.ts +1 -1
- package/dist/generate-app-script.d.ts.map +1 -1
- package/dist/generate-app-script.js +30 -7
- package/dist/generate-app-script.js.map +1 -1
- package/dist/generate-iframe-html.d.ts +1 -1
- package/dist/generate-iframe-html.d.ts.map +1 -1
- package/dist/generate-iframe-html.js +4 -4
- package/dist/generate-iframe-html.js.map +1 -1
- package/dist/generate-setup-addons-script.js +2 -2
- package/dist/generate-setup-addons-script.js.map +1 -1
- package/dist/generate-stories-script.d.ts +1 -1
- package/dist/generate-stories-script.d.ts.map +1 -1
- package/dist/generate-stories-script.js +26 -3
- package/dist/generate-stories-script.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -10
- package/dist/index.js.map +1 -1
- package/dist/inject-exports-order.d.ts.map +1 -1
- package/dist/inject-exports-order.js +0 -1
- package/dist/inject-exports-order.js.map +1 -1
- package/dist/list-stories.d.ts +1 -1
- package/dist/list-stories.d.ts.map +1 -1
- package/dist/list-stories.js +4 -5
- package/dist/list-stories.js.map +1 -1
- package/dist/rollup-plugin-mdx.d.ts +1 -1
- package/dist/rollup-plugin-mdx.d.ts.map +1 -1
- package/dist/rollup-plugin-mdx.js +3 -4
- package/dist/rollup-plugin-mdx.js.map +1 -1
- package/dist/rollup-plugin-prebundle-modules.d.ts +1 -1
- package/dist/rollup-plugin-prebundle-modules.d.ts.map +1 -1
- package/dist/rollup-plugin-prebundle-modules.js +1 -7
- package/dist/rollup-plugin-prebundle-modules.js.map +1 -1
- package/dist/rollup-plugin-storybook-builder.d.ts +1 -1
- package/dist/rollup-plugin-storybook-builder.d.ts.map +1 -1
- package/dist/stringify-process-envs.js +2 -2
- package/dist/stringify-process-envs.js.map +1 -1
- package/package.json +8 -16
- package/static/iframe-template.html +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-app-script.d.ts","sourceRoot":"","sources":["../src/generate-app-script.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-app-script.d.ts","sourceRoot":"","sources":["../src/generate-app-script.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAqB,MAAM,0BAA0B,CAAC;AAG3E,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,OAAO,mBA6CvD"}
|
|
@@ -1,13 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// based on https://github.com/storybookjs/storybook/blob/
|
|
2
|
+
// based on https://github.com/storybookjs/storybook/blob/v9.1.20/code/builders/builder-vite/src/codegen-modern-iframe-script.ts
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
3
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
27
|
exports.generateAppScript = void 0;
|
|
5
|
-
const
|
|
6
|
-
const core_common_1 = require("@storybook/core-common");
|
|
28
|
+
const common_1 = require("storybook/internal/common");
|
|
7
29
|
const virtual_file_names_js_1 = require("./virtual-file-names.js");
|
|
8
30
|
async function generateAppScript(options) {
|
|
31
|
+
const slash = (await Promise.resolve().then(() => __importStar(require('slash')))).default; // for CJS compatibility
|
|
9
32
|
const { presets, configDir } = options;
|
|
10
|
-
const previewOrConfigFile = (0,
|
|
33
|
+
const previewOrConfigFile = (0, common_1.loadPreviewOrConfigFile)({ configDir });
|
|
11
34
|
const previewAnnotations = await presets.apply('previewAnnotations', [], options);
|
|
12
35
|
const previewAnnotationURLs = [...previewAnnotations, previewOrConfigFile]
|
|
13
36
|
.filter((path) => !!path)
|
|
@@ -19,19 +42,19 @@ async function generateAppScript(options) {
|
|
|
19
42
|
const getProjectAnnotations = async () => {
|
|
20
43
|
const configs = await Promise.all([
|
|
21
44
|
${previewAnnotationURLs
|
|
22
|
-
.map(previewAnnotation => ` import('${(
|
|
45
|
+
.map(previewAnnotation => ` import('${slash(previewAnnotation)}')`)
|
|
23
46
|
.join(',\n')}
|
|
24
47
|
]);
|
|
25
48
|
return composeConfigs(configs);
|
|
26
49
|
}
|
|
27
50
|
`.trim();
|
|
28
51
|
return `
|
|
29
|
-
import { setup } from '
|
|
52
|
+
import { setup } from 'storybook/internal/preview/runtime';
|
|
30
53
|
import '${virtual_file_names_js_1.virtualSetupAddonsFilename}';
|
|
31
54
|
|
|
32
55
|
setup();
|
|
33
56
|
|
|
34
|
-
import { composeConfigs, PreviewWeb, ClientApi } from '
|
|
57
|
+
import { composeConfigs, PreviewWeb, ClientApi } from 'storybook/preview-api';
|
|
35
58
|
import { importFn } from '${virtual_file_names_js_1.virtualStoriesFilename}';
|
|
36
59
|
|
|
37
60
|
${getPreviewAnnotationsFunction}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-app-script.js","sourceRoot":"","sources":["../src/generate-app-script.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"generate-app-script.js","sourceRoot":"","sources":["../src/generate-app-script.ts"],"names":[],"mappings":";AAAA,gIAAgI;;;;;;;;;;;;;;;;;;;;;;;;;;AAEhI,sDAAoE;AAEpE,mEAA6F;AAEtF,KAAK,UAAU,iBAAiB,CAAC,OAAgB;IACtD,MAAM,KAAK,GAAG,CAAC,wDAAa,OAAO,GAAC,CAAC,CAAC,OAAO,CAAC,CAAC,wBAAwB;IAEvE,MAAM,EAAE,OAAO,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IAEvC,MAAM,mBAAmB,GAAG,IAAA,gCAAuB,EAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IACnE,MAAM,kBAAkB,GAAG,MAAM,OAAO,CAAC,KAAK,CAC5C,oBAAoB,EACpB,EAAE,EACF,OAAO,CACR,CAAC;IAEF,MAAM,qBAAqB,GAAG,CAAC,GAAG,kBAAkB,EAAE,mBAAmB,CAAC;SACvE,MAAM,CAAC,CAAC,IAAI,EAA6B,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;SACnD,GAAG,CAAC,CAAC,IAAuB,EAAE,EAAE,CAAC,CAAC,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC;IAEnF,sFAAsF;IACtF,6FAA6F;IAC7F,iGAAiG;IACjG,MAAM,6BAA6B,GAAG;;;EAGtC,qBAAqB;SACpB,GAAG,CAAC,iBAAiB,CAAC,EAAE,CAAC,eAAe,KAAK,CAAC,iBAAiB,CAAC,IAAI,CAAC;SACrE,IAAI,CAAC,KAAK,CAAC;;;;GAIX,CAAC,IAAI,EAAE,CAAC;IAET,OAAO;;UAEC,kDAA0B;;;;;4BAKR,8CAAsB;;EAEhD,6BAA6B;;;;;GAK5B,CAAC,IAAI,EAAE,CAAC;AACX,CAAC;AA7CD,8CA6CC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Options } from '
|
|
1
|
+
import type { Options } from 'storybook/internal/types';
|
|
2
2
|
export type PreviewHtml = string | undefined;
|
|
3
3
|
export declare function generateIframeHtml(options: Options): Promise<string>;
|
|
4
4
|
//# sourceMappingURL=generate-iframe-html.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-iframe-html.d.ts","sourceRoot":"","sources":["../src/generate-iframe-html.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAe,OAAO,EAAe,MAAM,
|
|
1
|
+
{"version":3,"file":"generate-iframe-html.d.ts","sourceRoot":"","sources":["../src/generate-iframe-html.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAe,OAAO,EAAe,MAAM,0BAA0B,CAAC;AAIlF,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,SAAS,CAAC;AAE7C,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CA4C1E"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// based on https://github.com/storybookjs/storybook/blob/
|
|
2
|
+
// based on https://github.com/storybookjs/storybook/blob/v9.1.20/code/builders/builder-vite/src/transform-iframe-html.ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.generateIframeHtml = void 0;
|
|
5
|
-
const
|
|
5
|
+
const common_1 = require("storybook/internal/common");
|
|
6
6
|
const promises_1 = require("node:fs/promises");
|
|
7
7
|
const virtual_file_names_js_1 = require("./virtual-file-names.js");
|
|
8
8
|
async function generateIframeHtml(options) {
|
|
@@ -19,7 +19,7 @@ async function generateIframeHtml(options) {
|
|
|
19
19
|
const docsOptions = await presets.apply('docs');
|
|
20
20
|
const tagsOptions = await presets.apply('tags');
|
|
21
21
|
const coreOptions = await presets.apply('core');
|
|
22
|
-
const stories = (0,
|
|
22
|
+
const stories = (0, common_1.normalizeStories)(await options.presets.apply('stories', [], options), {
|
|
23
23
|
configDir: options.configDir,
|
|
24
24
|
workingDir: process.cwd(),
|
|
25
25
|
}).map(specifier => (Object.assign(Object.assign({}, specifier), { importPathMatcher: specifier.importPathMatcher.source })));
|
|
@@ -28,7 +28,7 @@ async function generateIframeHtml(options) {
|
|
|
28
28
|
.replace('[CONFIG_TYPE HERE]', configType || '')
|
|
29
29
|
.replace('[LOGLEVEL HERE]', logLevel || '')
|
|
30
30
|
.replace(`'[FRAMEWORK_OPTIONS HERE]'`, JSON.stringify(frameworkOptions))
|
|
31
|
-
.replace(`('
|
|
31
|
+
.replace(`('OTHER_GLOBALS HERE');`, Object.entries(otherGlobals)
|
|
32
32
|
.map(([k, v]) => `window["${k}"] = ${JSON.stringify(v)};`)
|
|
33
33
|
.join(''))
|
|
34
34
|
.replace(`'[CHANNEL_OPTIONS HERE]'`, JSON.stringify(coreOptions && coreOptions.channelOptions ? coreOptions.channelOptions : {}))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-iframe-html.js","sourceRoot":"","sources":["../src/generate-iframe-html.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"generate-iframe-html.js","sourceRoot":"","sources":["../src/generate-iframe-html.ts"],"names":[],"mappings":";AAAA,yHAAyH;;;AAEzH,sDAA6D;AAE7D,+CAA4C;AAC5C,mEAA6D;AAItD,KAAK,UAAU,kBAAkB,CAAC,OAAgB;;IACvD,MAAM,kBAAkB,GAAG,MAAM,IAAA,mBAAQ,EAAC,OAAO,CAAC,OAAO,CAAC,gCAAgC,CAAC,EAAE;QAC3F,QAAQ,EAAE,OAAO;KAClB,CAAC,CAAC;IACH,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,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builder-vite/src/codegen-set-addon-channel.ts
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.generateSetupAddonsScript = void 0;
|
|
5
5
|
async function generateSetupAddonsScript() {
|
|
6
6
|
return `
|
|
7
7
|
import { createBrowserChannel } from 'storybook/internal/channels';
|
|
8
|
-
import { addons } from 'storybook/
|
|
8
|
+
import { addons } from 'storybook/preview-api';
|
|
9
9
|
|
|
10
10
|
const channel = createBrowserChannel({ page: 'preview' });
|
|
11
11
|
addons.setChannel(channel);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-setup-addons-script.js","sourceRoot":"","sources":["../src/generate-setup-addons-script.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"generate-setup-addons-script.js","sourceRoot":"","sources":["../src/generate-setup-addons-script.ts"],"names":[],"mappings":";AAAA,6HAA6H;;;AAEtH,KAAK,UAAU,yBAAyB;IAC7C,OAAO;;;;;;;;;;;GAWN,CAAC,IAAI,EAAE,CAAC;AACX,CAAC;AAbD,8DAaC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-stories-script.d.ts","sourceRoot":"","sources":["../src/generate-stories-script.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate-stories-script.d.ts","sourceRoot":"","sources":["../src/generate-stories-script.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAIxD,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAM7E"}
|
|
@@ -1,8 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// based on https://github.com/storybookjs/storybook/blob/
|
|
2
|
+
// based on https://github.com/storybookjs/storybook/blob/v9.1.20/code/builders/builder-vite/src/codegen-importfn-script.ts
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
3
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
27
|
exports.generateStoriesScript = void 0;
|
|
5
|
-
const pluginutils_1 = require("@rollup/pluginutils");
|
|
6
28
|
const node_path_1 = require("node:path");
|
|
7
29
|
const list_stories_1 = require("./list-stories");
|
|
8
30
|
async function generateStoriesScript(options) {
|
|
@@ -22,8 +44,9 @@ exports.generateStoriesScript = generateStoriesScript;
|
|
|
22
44
|
* @param stories An array of absolute story paths.
|
|
23
45
|
*/
|
|
24
46
|
async function toImportFn(stories) {
|
|
47
|
+
const slash = (await Promise.resolve().then(() => __importStar(require('slash')))).default; // for CJS compatibility
|
|
25
48
|
const objectEntries = stories.map(file => {
|
|
26
|
-
const relativePath = (
|
|
49
|
+
const relativePath = slash((0, node_path_1.relative)(process.cwd(), file));
|
|
27
50
|
const importPath = toImportPath(relativePath);
|
|
28
51
|
let actualPath = file;
|
|
29
52
|
if (actualPath.endsWith('.mdx')) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate-stories-script.js","sourceRoot":"","sources":["../src/generate-stories-script.ts"],"names":[],"mappings":";AAAA,
|
|
1
|
+
{"version":3,"file":"generate-stories-script.js","sourceRoot":"","sources":["../src/generate-stories-script.ts"],"names":[],"mappings":";AAAA,2HAA2H;;;;;;;;;;;;;;;;;;;;;;;;;;AAG3H,yCAAqC;AACrC,iDAA6C;AAEtC,KAAK,UAAU,qBAAqB,CAAC,OAAgB;IAC1D,qEAAqE;IACrE,MAAM,OAAO,GAAG,MAAM,IAAA,0BAAW,EAAC,OAAO,CAAC,CAAC;IAE3C,oGAAoG;IACpG,OAAO,MAAM,UAAU,CAAC,OAAO,CAAC,CAAC;AACnC,CAAC;AAND,sDAMC;AAED;;;;;;;;GAQG;AACH,KAAK,UAAU,UAAU,CAAC,OAAiB;IACzC,MAAM,KAAK,GAAG,CAAC,wDAAa,OAAO,GAAC,CAAC,CAAC,OAAO,CAAC,CAAC,wBAAwB;IAEvE,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;QACvC,MAAM,YAAY,GAAG,KAAK,CAAC,IAAA,oBAAQ,EAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,CAAC,CAAC;QAC1D,MAAM,UAAU,GAAG,YAAY,CAAC,YAAY,CAAC,CAAC;QAC9C,IAAI,UAAU,GAAG,IAAI,CAAC;QACtB,IAAI,UAAU,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;YAC/B,UAAU,GAAG,GAAG,UAAU,KAAK,CAAC;SACjC;QAED,OAAO,MAAM,UAAU,oBAAoB,UAAU,IAAI,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,OAAO;;EAEP,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC;;;;;;GAMxB,CAAC,IAAI,EAAE,CAAC;AACX,CAAC;AAED;;;;GAIG;AACH,SAAS,YAAY,CAAC,YAAoB;IACxC,OAAO,YAAY,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,YAAY,EAAE,CAAC;AAC7E,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Builder, Options, StorybookConfig as StorybookConfigBase } from '
|
|
1
|
+
import type { Builder, Options, StorybookConfig as StorybookConfigBase } from 'storybook/internal/types';
|
|
2
2
|
import { DevServerConfig } from '@web/dev-server';
|
|
3
3
|
import { RollupOptions } from 'rollup';
|
|
4
4
|
export type StorybookConfigWds = StorybookConfigBase & {
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,OAAO,EACP,OAAO,EACP,eAAe,IAAI,mBAAmB,EACvC,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,eAAe,EAAgC,MAAM,iBAAiB,CAAC;AAMhF,OAAO,EAA8B,aAAa,EAAU,MAAM,QAAQ,CAAC;AAoB3E,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG;IACrD,QAAQ,CAAC,EAAE,CACT,MAAM,EAAE,eAAe,EACvB,OAAO,EAAE,OAAO,KACb,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAChD,WAAW,CAAC,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,KAAK,aAAa,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;CACnG,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAGF,KAAK,QAAQ,GAAG;IACd,MAAM,EAAE,MAAM,GAAG,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,OAAO,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;AAI5D,eAAO,MAAM,IAAI,EAAE,UAAU,CAAC,MAAM,CAEnC,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,UAAU,CAAC,OAAO,CAwFrC,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,UAAU,CAAC,OAAO,CAsErC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -6,11 +6,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.build = exports.start = exports.bail = void 0;
|
|
7
7
|
const plugin_node_resolve_1 = __importDefault(require("@rollup/plugin-node-resolve"));
|
|
8
8
|
const plugin_replace_1 = __importDefault(require("@rollup/plugin-replace"));
|
|
9
|
-
const
|
|
10
|
-
const node_logger_1 = require("
|
|
11
|
-
|
|
12
|
-
// @ts-ignore
|
|
13
|
-
const globals_1 = require("@storybook/preview/globals");
|
|
9
|
+
const common_1 = require("storybook/internal/common");
|
|
10
|
+
const node_logger_1 = require("storybook/internal/node-logger");
|
|
11
|
+
const globals_1 = require("storybook/internal/preview/globals");
|
|
14
12
|
const dev_server_1 = require("@web/dev-server");
|
|
15
13
|
const dev_server_rollup_1 = require("@web/dev-server-rollup");
|
|
16
14
|
const rollup_plugin_html_1 = require("@web/rollup-plugin-html");
|
|
@@ -37,7 +35,7 @@ const bail = async () => {
|
|
|
37
35
|
};
|
|
38
36
|
exports.bail = bail;
|
|
39
37
|
const start = async ({ startTime, options, router, server }) => {
|
|
40
|
-
const previewDirOrigin = (0, node_path_1.join)((0, get_node_module_dir_js_1.getNodeModuleDir)('
|
|
38
|
+
const previewDirOrigin = (0, node_path_1.join)((0, get_node_module_dir_js_1.getNodeModuleDir)('storybook'), 'dist', 'preview');
|
|
41
39
|
router.use('/sb-preview', (0, sirv_1.default)(previewDirOrigin, {
|
|
42
40
|
maxAge: 300000,
|
|
43
41
|
dev: true,
|
|
@@ -60,11 +58,11 @@ const start = async ({ startTime, options, router, server }) => {
|
|
|
60
58
|
wdsPluginPrebundleModules(env, options),
|
|
61
59
|
wdsPluginStorybookBuilder(options),
|
|
62
60
|
wdsPluginMdx(options),
|
|
63
|
-
wdsPluginExternalGlobals(globals_1.globalsNameReferenceMap
|
|
61
|
+
wdsPluginExternalGlobals(globals_1.globalsNameReferenceMap),
|
|
64
62
|
wdsPluginReplace(Object.assign(Object.assign({}, (0, stringify_process_envs_js_1.stringifyProcessEnvs)(env)), { include: ['**/node_modules/@storybook/**/*'], preventAssignment: true })),
|
|
65
63
|
],
|
|
66
64
|
};
|
|
67
|
-
const { wdsConfigPath } = await (0,
|
|
65
|
+
const { wdsConfigPath } = await (0, common_1.getBuilderOptions)(options);
|
|
68
66
|
const wdsUserConfig = await (0, read_file_config_js_1.readFileConfig)(wdsConfigPath);
|
|
69
67
|
const wdsFinalConfig = await options.presets.apply('wdsFinal', (0, dev_server_1.mergeConfigs)(wdsUserConfig, wdsStorybookConfig, {
|
|
70
68
|
// reset local config "open" as it should not be used for storybook specific configuration
|
|
@@ -119,7 +117,7 @@ const build = async ({ startTime, options }) => {
|
|
|
119
117
|
(0, rollup_plugin_prebundle_modules_js_1.rollupPluginPrebundleModules)(env, options),
|
|
120
118
|
(0, rollup_plugin_storybook_builder_js_1.rollupPluginStorybookBuilder)(options),
|
|
121
119
|
(0, rollup_plugin_mdx_js_1.rollupPluginMdx)(options),
|
|
122
|
-
(0, rollup_plugin_external_globals_1.default)(globals_1.globalsNameReferenceMap
|
|
120
|
+
(0, rollup_plugin_external_globals_1.default)(globals_1.globalsNameReferenceMap),
|
|
123
121
|
(0, plugin_replace_1.default)(Object.assign(Object.assign({}, (0, stringify_process_envs_js_1.stringifyProcessEnvs)(env)), { include: ['**/node_modules/@storybook/**/*'], preventAssignment: true })),
|
|
124
122
|
],
|
|
125
123
|
};
|
|
@@ -145,7 +143,7 @@ const build = async ({ startTime, options }) => {
|
|
|
145
143
|
}
|
|
146
144
|
node_logger_1.logger.trace({ message: '=> Preview built', time: process.hrtime(startTime) });
|
|
147
145
|
})();
|
|
148
|
-
const previewDirOrigin = (0, node_path_1.join)((0, get_node_module_dir_js_1.getNodeModuleDir)('
|
|
146
|
+
const previewDirOrigin = (0, node_path_1.join)((0, get_node_module_dir_js_1.getNodeModuleDir)('storybook'), 'dist', 'preview');
|
|
149
147
|
const previewDirTarget = (0, node_path_1.join)(options.outputDir || '', `sb-preview`);
|
|
150
148
|
const previewFiles = (0, promises_1.cp)(previewDirOrigin, previewDirTarget, {
|
|
151
149
|
filter: src => {
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,sFAAkE;AAClE,4EAAyD;AACzD,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAAA,sFAAkE;AAClE,4EAAyD;AACzD,sDAA8D;AAC9D,gEAAwD;AACxD,gEAA6E;AAM7E,gDAAgF;AAEhF,8DAAoD;AACpD,gEAA2D;AAC3D,+CAAsC;AACtC,yCAAiD;AACjD,mCAA2E;AAC3E,oGAAyE;AACzE,gDAAwB;AACxB,uEAA+D;AAC/D,qEAA4D;AAC5D,+DAAuD;AACvD,iEAAyD;AACzD,6FAG8C;AAC9C,6FAAoF;AACpF,2EAAmE;AAEnE,MAAM,wBAAwB,GAAG,IAAA,8BAAU,EAAC,wCAA2B,CAAC,CAAC;AACzE,MAAM,YAAY,GAAG,IAAA,8BAAU,EAAC,sCAAe,CAAC,CAAC;AACjD,MAAM,yBAAyB,GAAG,IAAA,8BAAU,EAAC,iEAA4B,CAAC,CAAC;AAC3E,MAAM,gBAAgB,GAAG,IAAA,8BAAU,EAAC,w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,gBAAgB,GAAG,IAAA,gBAAI,EAAC,OAAO,CAAC,SAAS,IAAI,EAAE,EAAE,YAAY,CAAC,CAAC;IACrE,MAAM,YAAY,GAAG,IAAA,aAAE,EAAC,gBAAgB,EAAE,gBAAgB,EAAE;QAC1D,MAAM,EAAE,GAAG,CAAC,EAAE;YACZ,MAAM,EAAE,GAAG,EAAE,GAAG,IAAA,iBAAK,EAAC,GAAG,CAAC,CAAC;YAC3B,IAAI,GAAG,EAAE;gBACP,OAAO,GAAG,KAAK,KAAK,CAAC;aACtB;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,SAAS,EAAE,IAAI;KAChB,CAAC,CAAC;IAEH,MAAM,OAAO,CAAC,GAAG,CAAC,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC,CAAC;AACjD,CAAC,CAAC;AAtEW,QAAA,KAAK,SAsEhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject-exports-order.d.ts","sourceRoot":"","sources":["../src/inject-exports-order.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inject-exports-order.d.ts","sourceRoot":"","sources":["../src/inject-exports-order.ts"],"names":[],"mappings":"AAEA,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,0BAWxE"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// based on https://github.com/modernweb-dev/web/blob/%40web/dev-server-storybook%400.7.1/packages/dev-server-storybook/src/shared/stories/injectExportsOrder.ts
|
|
3
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
3
|
exports.injectExportsOrder = void 0;
|
|
5
4
|
const es_module_lexer_1 = require("es-module-lexer");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inject-exports-order.js","sourceRoot":"","sources":["../src/inject-exports-order.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"inject-exports-order.js","sourceRoot":"","sources":["../src/inject-exports-order.ts"],"names":[],"mappings":";;;AAAA,qDAAwC;AAEjC,KAAK,UAAU,kBAAkB,CAAC,MAAc,EAAE,QAAgB;IACvE,MAAM,CAAC,EAAE,OAAO,CAAC,GAAG,MAAM,IAAA,uBAAK,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;IAClD,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,qBAAqB,CAAC,EAAE;QACpD,yCAAyC;QACzC,OAAO,IAAI,CAAC;KACb;IAED,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;IAC9D,MAAM,YAAY,GAAG,KAAK,cAAc,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;IAE5E,OAAO,GAAG,MAAM,yCAAyC,YAAY,GAAG,CAAC;AAC3E,CAAC;AAXD,gDAWC"}
|
package/dist/list-stories.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-stories.d.ts","sourceRoot":"","sources":["../src/list-stories.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"list-stories.d.ts","sourceRoot":"","sources":["../src/list-stories.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAIxD,wBAAsB,WAAW,CAAC,OAAO,EAAE,OAAO,qBAqBjD"}
|
package/dist/list-stories.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// based on https://github.com/storybookjs/storybook/blob/
|
|
2
|
+
// based on https://github.com/storybookjs/storybook/blob/v9.1.20/code/builders/builder-vite/src/list-stories.ts
|
|
3
3
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
4
|
if (k2 === undefined) k2 = k;
|
|
5
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -25,19 +25,18 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
};
|
|
26
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
27
|
exports.listStories = void 0;
|
|
28
|
-
const
|
|
28
|
+
const common_1 = require("storybook/internal/common");
|
|
29
29
|
const glob_1 = require("glob");
|
|
30
30
|
const node_path_1 = require("node:path");
|
|
31
|
-
const excludeNodeModulesGlobOptions = (glob) => /node_modules/.test(glob) ? {} : { ignore: ['**/node_modules/**'] };
|
|
32
31
|
async function listStories(options) {
|
|
33
32
|
const slash = (await Promise.resolve().then(() => __importStar(require('slash')))).default; // for CJS compatibility
|
|
34
|
-
return (await Promise.all((0,
|
|
33
|
+
return (await Promise.all((0, common_1.normalizeStories)(await options.presets.apply('stories', [], options), {
|
|
35
34
|
configDir: options.configDir,
|
|
36
35
|
workingDir: options.configDir,
|
|
37
36
|
}).map(({ directory, files }) => {
|
|
38
37
|
const pattern = (0, node_path_1.join)(directory, files);
|
|
39
38
|
const absolutePattern = (0, node_path_1.isAbsolute)(pattern) ? pattern : (0, node_path_1.join)(options.configDir, pattern);
|
|
40
|
-
return (0, glob_1.glob)(slash(absolutePattern), Object.assign(Object.assign({},
|
|
39
|
+
return (0, glob_1.glob)(slash(absolutePattern), Object.assign(Object.assign({}, (0, common_1.commonGlobOptions)(absolutePattern)), { follow: true }));
|
|
41
40
|
})))
|
|
42
41
|
.reduce((carry, stories) => carry.concat(stories.map(slash)), [])
|
|
43
42
|
.sort();
|
package/dist/list-stories.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-stories.js","sourceRoot":"","sources":["../src/list-stories.ts"],"names":[],"mappings":";AAAA
|
|
1
|
+
{"version":3,"file":"list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oot":"","sources":["../src/rollup-plugin-mdx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"rollup-plugin-mdx.d.ts","sourceRoot":"","sources":["../src/rollup-plugin-mdx.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAKxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAqDxD"}
|
|
@@ -51,10 +51,9 @@ function rollupPluginMdx(options) {
|
|
|
51
51
|
const mdxPath = id.replace(/\.js$/, '');
|
|
52
52
|
const mdxCode = await (0, promises_1.readFile)(mdxPath.split('/').join(node_path_1.sep), { encoding: 'utf8' });
|
|
53
53
|
const mdxLoaderOptions = await options.presets.apply('mdxLoaderOptions', Object.assign(Object.assign({}, mdxPluginOptions), { mdxCompileOptions: Object.assign(Object.assign({
|
|
54
|
-
// this is done by Storybook in
|
|
55
|
-
// 1.
|
|
56
|
-
// 2.
|
|
57
|
-
// 3. addon-docs webpack loader (not run for our builder, because it's in the builder-webpack hook)
|
|
54
|
+
// this is done by Storybook in addon-docs in 2 different places:
|
|
55
|
+
// 1. in vite plugin (not run for our builder)
|
|
56
|
+
// 2. in webpack loader (not run for our builder)
|
|
58
57
|
// so we need to duplicate same logic here
|
|
59
58
|
providerImportSource: (0, node_path_1.join)((0, node_path_1.dirname)(require.resolve('@storybook/addon-docs/package.json')), '/dist/shims/mdx-react-shim.mjs') }, mdxPluginOptions === null || mdxPluginOptions === void 0 ? void 0 : mdxPluginOptions.mdxCompileOptions), { rehypePlugins: [
|
|
60
59
|
...((_b = (_a = mdxPluginOptions === null || mdxPluginOptions === void 0 ? void 0 : mdxPluginOptions.mdxCompileOptions) === null || _a === void 0 ? void 0 : _a.rehypePlugins) !== null && _b !== void 0 ? _b : []),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup-plugin-mdx.js","sourceRoot":"","sources":["../src/rollup-plugin-mdx.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+CAA4C;AAC5C,yCAA+C;AAC/C,kFAAwD;AACxD,8DAAqC;AAGrC,SAAgB,eAAe,CAAC,OAAgB;IAC9C,IAAI,gBAAqC,CAAC;IAC1C,IAAI,UAA+B,CAAC;IAEpC,OAAO;QACL,IAAI,EAAE,mBAAmB;QAEzB,KAAK,CAAC,UAAU;YACd,CAAC,EAAE,gBAAgB,EAAE,UAAU,EAAE,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAC7D,SAAS,EACT,EAAE,CACH,CAAC,CAAC;QACL,CAAC;QAED,KAAK,CAAC,SAAS,CAAC,EAAE;YAChB,IAAI,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,EAAE;gBAC1B,OAAO,EAAE,CAAC;aACX;QACH,CAAC;QAED,KAAK,CAAC,IAAI,CAAC,EAAU;;YACnB,IAAI,CAAC,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC;gBAAE,OAAO;YAEpC,MAAM,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;YACxC,MAAM,OAAO,GAAG,MAAM,IAAA,mBAAQ,EAAC,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,eAAG,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC;YAEnF,MAAM,gBAAgB,GAAG,MAAM,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,kBAAkB,kCAClE,gBAAgB,KACnB,iBAAiB;oBACf,
|
|
1
|
+
{"version":3,"file":"rollup-plugin-mdx.js","sourceRoot":"","sources":["../src/rollup-plugin-mdx.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+CAA4C;AAC5C,yCAA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gB,uBAAhB,gBAAgB,CAAE,iBAAiB,0CAAE,aAAa,mCAAI,EAAE,CAAC;wBAC7D,qBAAU;wBACV,+BAAmB;qBACpB,KAEH,UAAU,IACV,CAAC;YAEH,MAAM,EAAE,OAAO,EAAE,GAAG,wDAAa,aAAa,GAAC,CAAC,CAAC,wBAAwB;YACzE,MAAM,SAAS,GAAG,MAAM,OAAO,CAAC,OAAO,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,CAAC;YAE7E,OAAO,SAAS,CAAC,QAAQ,EAAE,CAAC;QAC9B,CAAC;KACF,CAAC;AACJ,CAAC;AArDD,0CAqDC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Options } from '
|
|
1
|
+
import type { Options } from 'storybook/internal/types';
|
|
2
2
|
import type { Plugin } from 'rollup';
|
|
3
3
|
export declare const PREBUNDLED_MODULES_DIR: string;
|
|
4
4
|
export declare function rollupPluginPrebundleModules(env: Record<string, string>, options: Options): Plugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup-plugin-prebundle-modules.d.ts","sourceRoot":"","sources":["../src/rollup-plugin-prebundle-modules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"rollup-plugin-prebundle-modules.d.ts","sourceRoot":"","sources":["../src/rollup-plugin-prebundle-modules.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAIxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIrC,eAAO,MAAM,sBAAsB,QAAgD,CAAC;AAEpF,wBAAgB,4BAA4B,CAC1C,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC3B,OAAO,EAAE,OAAO,GACf,MAAM,CA2CR;AAKD,eAAO,MAAM,UAAU,UAatB,CAAC"}
|
|
@@ -40,7 +40,7 @@ function rollupPluginPrebundleModules(env, options) {
|
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
42
|
exports.rollupPluginPrebundleModules = rollupPluginPrebundleModules;
|
|
43
|
-
// this is different to https://github.com/storybookjs/storybook/blob/
|
|
43
|
+
// this is different to https://github.com/storybookjs/storybook/blob/v9.1.20/code/builders/builder-vite/src/optimizeDeps.ts
|
|
44
44
|
// builder-vite bundles different dependencies for performance reasons
|
|
45
45
|
// we aim only at browserifying NodeJS dependencies (CommonJS/process.env/...)
|
|
46
46
|
exports.CANDIDATES = [
|
|
@@ -51,15 +51,9 @@ exports.CANDIDATES = [
|
|
|
51
51
|
'react-dom',
|
|
52
52
|
'react-dom/client',
|
|
53
53
|
/* for different packages */
|
|
54
|
-
'memoizerific',
|
|
55
54
|
'tiny-invariant',
|
|
56
|
-
/* for @storybook/core */
|
|
57
|
-
'jsdoc-type-pratt-parser',
|
|
58
55
|
/* for @storybook/addon-a11y */
|
|
59
56
|
'axe-core',
|
|
60
|
-
'vitest-axe/matchers',
|
|
61
|
-
/* for @storybook/addon-docs */
|
|
62
|
-
'color-convert',
|
|
63
57
|
];
|
|
64
58
|
function moduleExists(moduleName) {
|
|
65
59
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup-plugin-prebundle-modules.js","sourceRoot":"","sources":["../src/rollup-plugin-prebundle-modules.ts"],"names":[],"mappings":";;;AACA,qCAAgC;AAChC,+CAAgD;AAChD,yCAAiE;AAEjE,yGAA+F;AAC/F,2EAAmE;AAEtD,QAAA,sBAAsB,GAAG,IAAA,qBAAS,EAAC,kCAAkC,CAAC,CAAC;AAEpF,SAAgB,4BAA4B,CAC1C,GAA2B,EAC3B,OAAgB;IAEhB,MAAM,WAAW,GAA2B,EAAE,CAAC;IAE/C,OAAO;QACL,IAAI,EAAE,iCAAiC;QAEvC,KAAK,CAAC,UAAU;YACd,MAAM,OAAO,GAAG,kBAAU,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;YAEhD,MAA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,IAAA,sBAAU,EAAC,QAAQ,CAAC,EAAE;QACzB,mIAAmI;QACnI,yEAAyE;QACzE,OAAO,KAAK,CAAC;KACd;IAED,MAAM,EAAE,OAAO,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,IAAA,mBAAQ,EAAC,IAAA,gBAAI,EAAC,QAAQ,EAAE,cAAc,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;IACxF,OAAO,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;AAC7F,CAAC;AAED,KAAK,UAAU,oBAAoB,CAAC,OAAgB;IAClD,OAAO,CAAC,MAAM,uBAAuB,CAAC,OAAO,CAAC,CAAC;QAC7C,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,2BAA2B,CAAC;QAC9C,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,yCAAyC,CAAC,CAAC;AACjE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Options } from '
|
|
1
|
+
import type { Options } from 'storybook/internal/types';
|
|
2
2
|
import type { Plugin } from 'rollup';
|
|
3
3
|
export declare function rollupPluginStorybookBuilder(options: Options): Plugin;
|
|
4
4
|
//# sourceMappingURL=rollup-plugin-storybook-builder.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rollup-plugin-storybook-builder.d.ts","sourceRoot":"","sources":["../src/rollup-plugin-storybook-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"rollup-plugin-storybook-builder.d.ts","sourceRoot":"","sources":["../src/rollup-plugin-storybook-builder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAYrC,wBAAgB,4BAA4B,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CA6CrE"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.stringifyProcessEnvs = void 0;
|
|
4
|
-
const
|
|
4
|
+
const common_1 = require("storybook/internal/common");
|
|
5
5
|
function stringifyProcessEnvs(env) {
|
|
6
|
-
const result = (0,
|
|
6
|
+
const result = (0, common_1.stringifyProcessEnvs)(env);
|
|
7
7
|
// "NODE_PATH" pollutes the output, it's not really used and is not recommended in general
|
|
8
8
|
// see more https://github.com/nodejs/node/issues/38128#issuecomment-814969356
|
|
9
9
|
delete result['process.env.NODE_PATH'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stringify-process-envs.js","sourceRoot":"","sources":["../src/stringify-process-envs.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"stringify-process-envs.js","sourceRoot":"","sources":["../src/stringify-process-envs.ts"],"names":[],"mappings":";;;AAAA,sDAAkG;AAElG,SAAgB,oBAAoB,CAAC,GAA2B;IAC9D,MAAM,MAAM,GAAG,IAAA,6BAA6B,EAAC,GAAG,CAAC,CAAC;IAElD,0FAA0F;IAC1F,8EAA8E;IAC9E,OAAO,MAAM,CAAC,uBAAuB,CAAC,CAAC;IAEvC,OAAO,MAAM,CAAC;AAChB,CAAC;AARD,oDAQC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@web/storybook-builder",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -19,10 +19,11 @@
|
|
|
19
19
|
"types": "./index.d.ts",
|
|
20
20
|
"require": "./dist/index.js",
|
|
21
21
|
"import": "./index.mjs"
|
|
22
|
-
}
|
|
22
|
+
},
|
|
23
|
+
"./package.json": "./package.json"
|
|
23
24
|
},
|
|
24
25
|
"engines": {
|
|
25
|
-
"node": ">=
|
|
26
|
+
"node": ">=20.0.0"
|
|
26
27
|
},
|
|
27
28
|
"scripts": {
|
|
28
29
|
"build": "tsc"
|
|
@@ -50,30 +51,21 @@
|
|
|
50
51
|
"@mdx-js/mdx": "^3.0.0",
|
|
51
52
|
"@rollup/plugin-node-resolve": "^15.1.0",
|
|
52
53
|
"@rollup/plugin-replace": "^6.0.2",
|
|
53
|
-
"@rollup/pluginutils": "^5.0.2",
|
|
54
|
-
"@storybook/core-common": "^8.6.12",
|
|
55
|
-
"@storybook/node-logger": "^8.6.12",
|
|
56
|
-
"@storybook/preview": "^8.6.12",
|
|
57
54
|
"@web/config-loader": "^0.3.2",
|
|
58
55
|
"@web/dev-server": "^0.4.0",
|
|
59
56
|
"@web/dev-server-core": "^0.7.5",
|
|
60
57
|
"@web/dev-server-rollup": "^0.6.1",
|
|
61
58
|
"@web/rollup-plugin-html": "^3.0.0",
|
|
62
|
-
"browser-assert": "^1.2.1",
|
|
63
59
|
"cjs-module-lexer": "^1.2.3",
|
|
64
60
|
"es-module-lexer": "^1.2.1",
|
|
65
61
|
"esbuild": "^0.27.0",
|
|
66
|
-
"glob": "^
|
|
67
|
-
"lodash-es": "^4.17.21",
|
|
68
|
-
"path-browserify": "^1.0.1",
|
|
62
|
+
"glob": "^13.0.0",
|
|
69
63
|
"rehype-external-links": "^3.0.0",
|
|
70
64
|
"rehype-slug": "^6.0.0",
|
|
71
65
|
"rollup": "^4.4.1",
|
|
72
66
|
"rollup-plugin-external-globals": "^0.9.0",
|
|
73
|
-
"sirv": "^
|
|
74
|
-
"slash": "^5.1.0"
|
|
75
|
-
|
|
76
|
-
"devDependencies": {
|
|
77
|
-
"@storybook/types": "^8.6.12"
|
|
67
|
+
"sirv": "^3.0.2",
|
|
68
|
+
"slash": "^5.1.0",
|
|
69
|
+
"storybook": "^9.1.20"
|
|
78
70
|
}
|
|
79
71
|
}
|