storybook 10.3.0-alpha.0 → 10.3.0-alpha.1
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/_node-chunks/{builder-manager-5HPOYFJR.js → builder-manager-KERY565B.js} +12 -12
- package/dist/_node-chunks/{camelcase-DZNWLILJ.js → camelcase-2M63ML3X.js} +7 -7
- package/dist/_node-chunks/{chunk-2GDFAXX5.js → chunk-36AZRL2D.js} +7 -7
- package/dist/_node-chunks/{chunk-WBSFK4AO.js → chunk-4WL6MGXA.js} +7 -7
- package/dist/_node-chunks/{chunk-3B7C4FEQ.js → chunk-74PNH6JI.js} +6 -6
- package/dist/_node-chunks/{chunk-ZE2TRJ2H.js → chunk-BOYAUA6D.js} +7 -7
- package/dist/_node-chunks/{chunk-CHJGYZHC.js → chunk-CCGS5R3P.js} +8 -8
- package/dist/_node-chunks/{chunk-M3FEZVKN.js → chunk-CR23DEWX.js} +6 -6
- package/dist/_node-chunks/{chunk-6ADIAPP2.js → chunk-DB5UH4IK.js} +12 -12
- package/dist/_node-chunks/{chunk-F4NW7OLO.js → chunk-FIDYKCZW.js} +7 -7
- package/dist/_node-chunks/{chunk-QRXP6OHU.js → chunk-GOFZ5AI4.js} +7 -7
- package/dist/_node-chunks/{chunk-UIFZBVEB.js → chunk-H7D4CVP2.js} +6 -6
- package/dist/_node-chunks/{chunk-WEV5QRLC.js → chunk-J3ELUK74.js} +10 -10
- package/dist/_node-chunks/{chunk-SXSM6HLI.js → chunk-JFSKHQG7.js} +6 -6
- package/dist/_node-chunks/{chunk-4CKOLZCE.js → chunk-MJPMP6AB.js} +6 -6
- package/dist/_node-chunks/{chunk-SXSROWK5.js → chunk-MQRFGFNQ.js} +7 -7
- package/dist/_node-chunks/{chunk-STKSD6QT.js → chunk-NFDBZKV6.js} +6 -6
- package/dist/_node-chunks/chunk-OWFCNEJA.js +61 -0
- package/dist/_node-chunks/{chunk-JC4EH5XJ.js → chunk-PHOKMPEA.js} +6 -6
- package/dist/_node-chunks/chunk-PRGD4PPZ.js +18 -0
- package/dist/_node-chunks/{chunk-YU53VQ3D.js → chunk-QQZ4ZWAS.js} +9 -9
- package/dist/_node-chunks/{chunk-7HHJF6EO.js → chunk-S2JOM27Y.js} +6 -6
- package/dist/_node-chunks/{chunk-HU47ACHM.js → chunk-TGA5YZ47.js} +8 -8
- package/dist/_node-chunks/{chunk-ECXPVHM6.js → chunk-VAWKE2WR.js} +13 -13
- package/dist/_node-chunks/{chunk-XD4YM6VU.js → chunk-VEH2EH3O.js} +7 -7
- package/dist/_node-chunks/{chunk-DPH2UCZZ.js → chunk-XDPBSRAB.js} +16 -16
- package/dist/_node-chunks/{chunk-WY5ZA2BT.js → chunk-XGCRSXNA.js} +20 -20
- package/dist/_node-chunks/{chunk-EKE4NU7S.js → chunk-Y3BQKYFK.js} +9 -9
- package/dist/_node-chunks/chunk-Y3PKDQ4M.js +23 -0
- package/dist/_node-chunks/{chunk-MGDZKZCC.js → chunk-Z2ZHJPAA.js} +7 -7
- package/dist/_node-chunks/{globby-ON4YVWHY.js → globby-GL3THFIK.js} +9 -9
- package/dist/_node-chunks/{lib-K3OUNB46.js → lib-4F2GH4RU.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-VU7ALTQ4.js → mdx-N42X6CFJ-MQX7F3YI.js} +8 -8
- package/dist/_node-chunks/{p-limit-C5BOIT3A.js → p-limit-2QDBTWEG.js} +7 -7
- package/dist/babel/index.js +10 -10
- package/dist/bin/core.js +12 -12
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +9 -9
- package/dist/cli/index.js +18 -18
- package/dist/common/index.js +19 -19
- package/dist/core-server/index.js +213 -55
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +25 -25
- package/dist/csf-tools/index.js +9 -9
- package/dist/manager/globals-runtime.js +2 -2
- package/dist/manager/runtime.js +15 -16
- package/dist/manager-api/index.js +2 -2
- package/dist/mocking-utils/index.d.ts +7 -1
- package/dist/mocking-utils/index.js +161 -29
- package/dist/mocking-utils/mocker-runtime.js +1254 -0
- package/dist/node-logger/index.js +9 -9
- package/dist/server-errors.js +11 -11
- package/dist/telemetry/index.js +23 -23
- package/package.json +3 -1
- package/assets/server/mocker-runtime.template.js +0 -89
- package/dist/_node-chunks/chunk-L7XEZ3OX.js +0 -23
- package/dist/_node-chunks/chunk-MP3TH4TQ.js +0 -18
- package/dist/_node-chunks/chunk-PMDMPQ4D.js +0 -61
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_zqey0uqkkfj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_zqey0uqkkfj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_zqey0uqkkfj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_zqey0uqkkfj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_zqey0uqkkfj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_zqey0uqkkfj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
toEstree
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-MQRFGFNQ.js";
|
|
15
15
|
import {
|
|
16
16
|
StatusTypeIdMismatchError
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-J3ELUK74.js";
|
|
18
18
|
import {
|
|
19
19
|
debounce,
|
|
20
20
|
generateStoryFile,
|
|
@@ -25,69 +25,69 @@ import {
|
|
|
25
25
|
sendTelemetryError,
|
|
26
26
|
useStatics,
|
|
27
27
|
withTelemetry
|
|
28
|
-
} from "../_node-chunks/chunk-
|
|
28
|
+
} from "../_node-chunks/chunk-XDPBSRAB.js";
|
|
29
29
|
import {
|
|
30
30
|
detectPnp
|
|
31
|
-
} from "../_node-chunks/chunk-
|
|
32
|
-
import "../_node-chunks/chunk-
|
|
31
|
+
} from "../_node-chunks/chunk-Y3PKDQ4M.js";
|
|
32
|
+
import "../_node-chunks/chunk-VEH2EH3O.js";
|
|
33
33
|
import {
|
|
34
34
|
StorybookError
|
|
35
|
-
} from "../_node-chunks/chunk-
|
|
35
|
+
} from "../_node-chunks/chunk-H7D4CVP2.js";
|
|
36
36
|
import {
|
|
37
37
|
telemetry
|
|
38
|
-
} from "../_node-chunks/chunk-
|
|
39
|
-
import "../_node-chunks/chunk-
|
|
38
|
+
} from "../_node-chunks/chunk-VAWKE2WR.js";
|
|
39
|
+
import "../_node-chunks/chunk-PRGD4PPZ.js";
|
|
40
40
|
import {
|
|
41
41
|
optionalEnvToBoolean,
|
|
42
42
|
require_cross_spawn,
|
|
43
43
|
resolveImport,
|
|
44
44
|
supportedExtensions,
|
|
45
45
|
userOrAutoTitleFromSpecifier
|
|
46
|
-
} from "../_node-chunks/chunk-
|
|
47
|
-
import "../_node-chunks/chunk-
|
|
48
|
-
import "../_node-chunks/chunk-
|
|
46
|
+
} from "../_node-chunks/chunk-XGCRSXNA.js";
|
|
47
|
+
import "../_node-chunks/chunk-OWFCNEJA.js";
|
|
48
|
+
import "../_node-chunks/chunk-GOFZ5AI4.js";
|
|
49
49
|
import {
|
|
50
50
|
require_pretty_hrtime
|
|
51
|
-
} from "../_node-chunks/chunk-
|
|
52
|
-
import "../_node-chunks/chunk-
|
|
53
|
-
import "../_node-chunks/chunk-
|
|
51
|
+
} from "../_node-chunks/chunk-TGA5YZ47.js";
|
|
52
|
+
import "../_node-chunks/chunk-PHOKMPEA.js";
|
|
53
|
+
import "../_node-chunks/chunk-Y3BQKYFK.js";
|
|
54
54
|
import {
|
|
55
55
|
invariant,
|
|
56
56
|
up2 as up
|
|
57
|
-
} from "../_node-chunks/chunk-
|
|
58
|
-
import "../_node-chunks/chunk-
|
|
57
|
+
} from "../_node-chunks/chunk-NFDBZKV6.js";
|
|
58
|
+
import "../_node-chunks/chunk-CR23DEWX.js";
|
|
59
59
|
import {
|
|
60
60
|
importModule,
|
|
61
61
|
resolvePackageDir
|
|
62
|
-
} from "../_node-chunks/chunk-
|
|
62
|
+
} from "../_node-chunks/chunk-FIDYKCZW.js";
|
|
63
63
|
import {
|
|
64
64
|
dirname,
|
|
65
65
|
join,
|
|
66
66
|
relative,
|
|
67
67
|
resolve
|
|
68
|
-
} from "../_node-chunks/chunk-
|
|
68
|
+
} from "../_node-chunks/chunk-74PNH6JI.js";
|
|
69
69
|
import {
|
|
70
70
|
slash
|
|
71
|
-
} from "../_node-chunks/chunk-
|
|
72
|
-
import "../_node-chunks/chunk-
|
|
71
|
+
} from "../_node-chunks/chunk-MJPMP6AB.js";
|
|
72
|
+
import "../_node-chunks/chunk-36AZRL2D.js";
|
|
73
73
|
import {
|
|
74
74
|
Tag
|
|
75
|
-
} from "../_node-chunks/chunk-
|
|
75
|
+
} from "../_node-chunks/chunk-CCGS5R3P.js";
|
|
76
76
|
import {
|
|
77
77
|
require_dist
|
|
78
|
-
} from "../_node-chunks/chunk-
|
|
78
|
+
} from "../_node-chunks/chunk-4WL6MGXA.js";
|
|
79
79
|
import {
|
|
80
80
|
require_lib,
|
|
81
81
|
require_src
|
|
82
|
-
} from "../_node-chunks/chunk-
|
|
82
|
+
} from "../_node-chunks/chunk-BOYAUA6D.js";
|
|
83
83
|
import {
|
|
84
84
|
require_picocolors
|
|
85
|
-
} from "../_node-chunks/chunk-
|
|
85
|
+
} from "../_node-chunks/chunk-Z2ZHJPAA.js";
|
|
86
86
|
import {
|
|
87
87
|
__commonJS,
|
|
88
88
|
__require,
|
|
89
89
|
__toESM
|
|
90
|
-
} from "../_node-chunks/chunk-
|
|
90
|
+
} from "../_node-chunks/chunk-JFSKHQG7.js";
|
|
91
91
|
|
|
92
92
|
// ../../node_modules/glob-to-regexp/index.js
|
|
93
93
|
var require_glob_to_regexp = __commonJS({
|
|
@@ -4544,7 +4544,7 @@ function print(p) {
|
|
|
4544
4544
|
// src/core-server/utils/get-builders.ts
|
|
4545
4545
|
import { MissingBuilderError } from "storybook/internal/server-errors";
|
|
4546
4546
|
async function getManagerBuilder() {
|
|
4547
|
-
return await import("../_node-chunks/builder-manager-
|
|
4547
|
+
return await import("../_node-chunks/builder-manager-KERY565B.js");
|
|
4548
4548
|
}
|
|
4549
4549
|
async function getPreviewBuilder(resolvedPreviewBuilder) {
|
|
4550
4550
|
return await importModule(resolvedPreviewBuilder);
|
|
@@ -4608,7 +4608,7 @@ function watchStorySpecifiers(specifiers, options, onInvalidate) {
|
|
|
4608
4608
|
// files can be e.g. '**/foo/*/*.js' so we just want the last bit,
|
|
4609
4609
|
// because the directory could already be within the files part (e.g. './x/foo/bar')
|
|
4610
4610
|
basename(specifier.files)
|
|
4611
|
-
), { globby } = await import("../_node-chunks/globby-
|
|
4611
|
+
), { globby } = await import("../_node-chunks/globby-GL3THFIK.js");
|
|
4612
4612
|
(await globby(slash(dirGlob), commonGlobOptions(dirGlob))).forEach((filePath) => {
|
|
4613
4613
|
let fileImportPath = toImportPath(filePath);
|
|
4614
4614
|
specifier.importPathMatcher.exec(fileImportPath) && onInvalidate(fileImportPath, removed);
|
|
@@ -4687,16 +4687,20 @@ import { logger as logger2 } from "storybook/internal/node-logger";
|
|
|
4687
4687
|
// src/core-server/utils/manifests/render-components-manifest.ts
|
|
4688
4688
|
import path from "node:path";
|
|
4689
4689
|
import { groupBy } from "storybook/internal/common";
|
|
4690
|
-
function renderComponentsManifest(manifest) {
|
|
4690
|
+
function renderComponentsManifest(manifest, docsManifest) {
|
|
4691
4691
|
let entries = Object.entries(manifest?.components ?? {}).sort(
|
|
4692
4692
|
(a, b) => (a[1].name || a[0]).localeCompare(b[1].name || b[0])
|
|
4693
|
-
),
|
|
4693
|
+
), docsEntries = Object.entries(docsManifest?.docs ?? {}).sort(
|
|
4694
|
+
(a, b) => (a[1].name || a[0]).localeCompare(b[1].name || b[0])
|
|
4695
|
+
), analyses = entries.map(([, c]) => analyzeComponent(c)), docsAnalyses = docsEntries.map(([, d]) => analyzeDoc(d)), attachedDocs = analyses.reduce((sum, a) => sum + a.totalDocs, 0), attachedDocsWithError = analyses.reduce((sum, a) => sum + a.docsErrors, 0), unattachedDocsWithError = docsAnalyses.filter((a) => a.hasError).length, totals = {
|
|
4694
4696
|
components: entries.length,
|
|
4695
4697
|
componentsWithPropTypeError: analyses.filter((a) => a.hasPropTypeError).length,
|
|
4696
4698
|
infos: analyses.filter((a) => a.hasWarns).length,
|
|
4697
4699
|
stories: analyses.reduce((sum, a) => sum + a.totalStories, 0),
|
|
4698
|
-
storyErrors: analyses.reduce((sum, a) => sum + a.storyErrors, 0)
|
|
4699
|
-
|
|
4700
|
+
storyErrors: analyses.reduce((sum, a) => sum + a.storyErrors, 0),
|
|
4701
|
+
docs: docsEntries.length + attachedDocs,
|
|
4702
|
+
docsWithError: unattachedDocsWithError + attachedDocsWithError
|
|
4703
|
+
}, allPill = '<a class="filter-pill all" data-k="all" href="#filter-all">All</a>', compErrorsPill = totals.componentsWithPropTypeError > 0 ? `<a class="filter-pill err" data-k="errors" href="#filter-errors">${totals.componentsWithPropTypeError}/${totals.components} prop type ${plural(totals.componentsWithPropTypeError, "error")}</a>` : totals.components > 0 ? `<span class="filter-pill ok" aria-disabled="true">${totals.components} components ok</span>` : "", compInfosPill = totals.infos > 0 ? `<a class="filter-pill info" data-k="infos" href="#filter-infos">${totals.infos}/${totals.components} ${plural(totals.infos, "info", "infos")}</a>` : "", storiesPill = totals.storyErrors > 0 ? `<a class="filter-pill err" data-k="story-errors" href="#filter-story-errors">${totals.storyErrors}/${totals.stories} story errors</a>` : totals.stories > 0 ? `<span class="filter-pill ok" aria-disabled="true">${totals.stories} ${plural(totals.stories, "story", "stories")} ok</span>` : "", docsPill = totals.docs > 0 ? totals.docsWithError > 0 ? `<a class="filter-pill info" data-k="docs" href="#filter-docs">${totals.docsWithError}/${totals.docs} doc ${plural(totals.docsWithError, "error")}</a>` : `<a class="filter-pill ok" data-k="docs" href="#filter-docs">${totals.docs} ${plural(totals.docs, "doc")} ok</a>` : "", grid = entries.map(([key, c], idx) => renderComponentCard(key, c, `${idx}`)).join(""), docsGrid = docsEntries.map(([key, d], idx) => renderDocCard(key, d, `doc-${idx}`)).join(""), errorGroups = Object.entries(
|
|
4700
4704
|
groupBy(
|
|
4701
4705
|
entries.map(([, it]) => it).filter((it) => it.error),
|
|
4702
4706
|
(manifest2) => manifest2.error?.name ?? "Error"
|
|
@@ -4840,7 +4844,9 @@ function renderComponentsManifest(manifest) {
|
|
|
4840
4844
|
#filter-all:target ~ header .filter-pill[data-k='all'],
|
|
4841
4845
|
#filter-errors:target ~ header .filter-pill[data-k='errors'],
|
|
4842
4846
|
#filter-infos:target ~ header .filter-pill[data-k='infos'],
|
|
4843
|
-
#filter-story-errors:target ~ header .filter-pill[data-k='story-errors']
|
|
4847
|
+
#filter-story-errors:target ~ header .filter-pill[data-k='story-errors'],
|
|
4848
|
+
#filter-doc-errors:target ~ header .filter-pill[data-k='docs'],
|
|
4849
|
+
#filter-docs:target ~ header .filter-pill[data-k='docs'] {
|
|
4844
4850
|
box-shadow: 0 0 0 var(--active-ring) currentColor;
|
|
4845
4851
|
border-color: currentColor;
|
|
4846
4852
|
}
|
|
@@ -4849,7 +4855,9 @@ function renderComponentsManifest(manifest) {
|
|
|
4849
4855
|
#filter-all,
|
|
4850
4856
|
#filter-errors,
|
|
4851
4857
|
#filter-infos,
|
|
4852
|
-
#filter-story-errors
|
|
4858
|
+
#filter-story-errors,
|
|
4859
|
+
#filter-doc-errors,
|
|
4860
|
+
#filter-docs {
|
|
4853
4861
|
display: none;
|
|
4854
4862
|
}
|
|
4855
4863
|
|
|
@@ -4962,6 +4970,8 @@ function renderComponentsManifest(manifest) {
|
|
|
4962
4970
|
.tg-err:checked + label.as-toggle,
|
|
4963
4971
|
.tg-info:checked + label.as-toggle,
|
|
4964
4972
|
.tg-stories:checked + label.as-toggle,
|
|
4973
|
+
.tg-docs:checked + label.as-toggle,
|
|
4974
|
+
.tg-content:checked + label.as-toggle,
|
|
4965
4975
|
.tg-props:checked + label.as-toggle {
|
|
4966
4976
|
box-shadow: 0 0 0 var(--active-ring) currentColor;
|
|
4967
4977
|
border-color: currentColor;
|
|
@@ -4991,6 +5001,16 @@ function renderComponentsManifest(manifest) {
|
|
|
4991
5001
|
gap: 8px;
|
|
4992
5002
|
}
|
|
4993
5003
|
|
|
5004
|
+
.tg-docs:checked ~ .panels .panel-docs {
|
|
5005
|
+
display: grid;
|
|
5006
|
+
gap: 8px;
|
|
5007
|
+
}
|
|
5008
|
+
|
|
5009
|
+
.tg-content:checked ~ .panels .panel-content {
|
|
5010
|
+
display: grid;
|
|
5011
|
+
gap: 8px;
|
|
5012
|
+
}
|
|
5013
|
+
|
|
4994
5014
|
.tg-props:checked ~ .panels .panel-props {
|
|
4995
5015
|
display: grid;
|
|
4996
5016
|
}
|
|
@@ -5151,6 +5171,19 @@ function renderComponentsManifest(manifest) {
|
|
|
5151
5171
|
display: none;
|
|
5152
5172
|
}
|
|
5153
5173
|
|
|
5174
|
+
#filter-doc-errors:target ~ main .card:not(.has-doc-error) {
|
|
5175
|
+
display: none;
|
|
5176
|
+
}
|
|
5177
|
+
|
|
5178
|
+
#filter-docs:target ~ main .card:has(> .tg-docs),
|
|
5179
|
+
#filter-docs:target ~ main .card.is-doc {
|
|
5180
|
+
display: block;
|
|
5181
|
+
}
|
|
5182
|
+
|
|
5183
|
+
#filter-docs:target ~ main .card:not(:has(> .tg-docs)):not(.is-doc) {
|
|
5184
|
+
display: none;
|
|
5185
|
+
}
|
|
5186
|
+
|
|
5154
5187
|
#filter-all:target ~ main .card {
|
|
5155
5188
|
display: block;
|
|
5156
5189
|
}
|
|
@@ -5165,6 +5198,19 @@ function renderComponentsManifest(manifest) {
|
|
|
5165
5198
|
display: block;
|
|
5166
5199
|
}
|
|
5167
5200
|
|
|
5201
|
+
/* Section titles */
|
|
5202
|
+
.section-title {
|
|
5203
|
+
font-size: 16px;
|
|
5204
|
+
font-weight: 600;
|
|
5205
|
+
color: var(--muted);
|
|
5206
|
+
margin: 24px 0 12px;
|
|
5207
|
+
padding-bottom: 8px;
|
|
5208
|
+
border-bottom: 1px solid var(--border);
|
|
5209
|
+
}
|
|
5210
|
+
.section-title:first-child {
|
|
5211
|
+
margin-top: 0;
|
|
5212
|
+
}
|
|
5213
|
+
|
|
5168
5214
|
/* When a toggle is checked, show the corresponding panel */
|
|
5169
5215
|
.card > .tg-err:checked ~ .panels .panel-err {
|
|
5170
5216
|
display: grid;
|
|
@@ -5178,10 +5224,20 @@ function renderComponentsManifest(manifest) {
|
|
|
5178
5224
|
display: grid;
|
|
5179
5225
|
}
|
|
5180
5226
|
|
|
5227
|
+
.card > .tg-docs:checked ~ .panels .panel-docs {
|
|
5228
|
+
display: grid;
|
|
5229
|
+
}
|
|
5230
|
+
|
|
5231
|
+
.card > .tg-content:checked ~ .panels .panel-content {
|
|
5232
|
+
display: grid;
|
|
5233
|
+
}
|
|
5234
|
+
|
|
5181
5235
|
/* Add vertical spacing around panels only when any panel is visible */
|
|
5182
5236
|
.card > .tg-err:checked ~ .panels,
|
|
5183
5237
|
.card > .tg-info:checked ~ .panels,
|
|
5184
5238
|
.card > .tg-stories:checked ~ .panels,
|
|
5239
|
+
.card > .tg-docs:checked ~ .panels,
|
|
5240
|
+
.card > .tg-content:checked ~ .panels,
|
|
5185
5241
|
.card > .tg-props:checked ~ .panels {
|
|
5186
5242
|
margin: 10px 0;
|
|
5187
5243
|
}
|
|
@@ -5191,6 +5247,8 @@ function renderComponentsManifest(manifest) {
|
|
|
5191
5247
|
.card:has(.tg-err:checked) label[for$='-err'],
|
|
5192
5248
|
.card:has(.tg-info:checked) label[for$='-info'],
|
|
5193
5249
|
.card:has(.tg-stories:checked) label[for$='-stories'],
|
|
5250
|
+
.card:has(.tg-docs:checked) label[for$='-docs'],
|
|
5251
|
+
.card:has(.tg-content:checked) label[for$='-content'],
|
|
5194
5252
|
.card:has(.tg-props:checked) label[for$='-props'] {
|
|
5195
5253
|
box-shadow: 0 0 0 1px currentColor;
|
|
5196
5254
|
border-color: currentColor;
|
|
@@ -5215,6 +5273,17 @@ function renderComponentsManifest(manifest) {
|
|
|
5215
5273
|
word-break: inherit;
|
|
5216
5274
|
inline-size: min(100%, 120ch);
|
|
5217
5275
|
}
|
|
5276
|
+
|
|
5277
|
+
/* MDX content container for docs */
|
|
5278
|
+
.mdx-content {
|
|
5279
|
+
background: #0f131b;
|
|
5280
|
+
border: 1px solid var(--border);
|
|
5281
|
+
border-radius: 10px;
|
|
5282
|
+
padding: 12px;
|
|
5283
|
+
max-height: 400px;
|
|
5284
|
+
overflow-y: auto;
|
|
5285
|
+
margin-top: 8px;
|
|
5286
|
+
}
|
|
5218
5287
|
</style>
|
|
5219
5288
|
</head>
|
|
5220
5289
|
<body>
|
|
@@ -5223,18 +5292,26 @@ function renderComponentsManifest(manifest) {
|
|
|
5223
5292
|
<span id="filter-errors"></span>
|
|
5224
5293
|
<span id="filter-infos"></span>
|
|
5225
5294
|
<span id="filter-story-errors"></span>
|
|
5295
|
+
<span id="filter-doc-errors"></span>
|
|
5296
|
+
<span id="filter-docs"></span>
|
|
5226
5297
|
<header>
|
|
5227
5298
|
<div class="wrap">
|
|
5228
|
-
<h1>
|
|
5229
|
-
<div class="summary">${allPill}${compErrorsPill}${compInfosPill}${storiesPill}</div>
|
|
5299
|
+
<h1>Manifest Debugger</h1>
|
|
5300
|
+
<div class="summary">${allPill}${compErrorsPill}${compInfosPill}${storiesPill}${docsPill}</div>
|
|
5230
5301
|
</div>
|
|
5231
5302
|
</header>
|
|
5232
5303
|
<main>
|
|
5233
5304
|
<div class="wrap">
|
|
5305
|
+
${grid ? `<h2 class="section-title">Components</h2>
|
|
5234
5306
|
<div class="grid" role="list">
|
|
5235
|
-
${grid
|
|
5236
|
-
</div
|
|
5307
|
+
${grid}
|
|
5308
|
+
</div>` : ""}
|
|
5237
5309
|
${errorGroups.length ? `<div class="error-groups" role="region" aria-label="Prop type error groups">${errorGroupsHTML}</div>` : ""}
|
|
5310
|
+
${docsGrid ? `<h2 class="section-title">Unattached Docs</h2>
|
|
5311
|
+
<div class="grid" role="list">
|
|
5312
|
+
${docsGrid}
|
|
5313
|
+
</div>` : ""}
|
|
5314
|
+
${!grid && !docsGrid ? '<div class="card"><div class="head"><div class="hint">No components or docs.</div></div></div>' : ""}
|
|
5238
5315
|
</div>
|
|
5239
5316
|
</main>
|
|
5240
5317
|
</body>
|
|
@@ -5249,7 +5326,7 @@ function analyzeComponent(c) {
|
|
|
5249
5326
|
c.description?.trim() || warns.push("No description found. Write a jsdoc comment such as /** Component description */."), c.import?.trim() || warns.push(
|
|
5250
5327
|
`Specify an @import jsdoc tag on your component or your stories meta such as @import import { ${c.name} } from 'my-design-system';`
|
|
5251
5328
|
);
|
|
5252
|
-
let totalStories = c.stories?.length ?? 0, storyErrors = (c.stories ?? []).filter((e) => !!e?.error).length, storyOk = totalStories - storyErrors, hasAnyError = hasPropTypeError || storyErrors > 0;
|
|
5329
|
+
let totalStories = c.stories?.length ?? 0, storyErrors = (c.stories ?? []).filter((e) => !!e?.error).length, storyOk = totalStories - storyErrors, docsEntries = c.docs ? Object.values(c.docs) : [], totalDocs = docsEntries.length, docsErrors = docsEntries.filter((d) => !!d?.error).length, docsOk = totalDocs - docsErrors, hasAnyError = hasPropTypeError || storyErrors > 0 || docsErrors > 0;
|
|
5253
5330
|
return {
|
|
5254
5331
|
hasPropTypeError,
|
|
5255
5332
|
hasAnyError,
|
|
@@ -5257,7 +5334,15 @@ function analyzeComponent(c) {
|
|
|
5257
5334
|
warns,
|
|
5258
5335
|
totalStories,
|
|
5259
5336
|
storyErrors,
|
|
5260
|
-
storyOk
|
|
5337
|
+
storyOk,
|
|
5338
|
+
totalDocs,
|
|
5339
|
+
docsErrors,
|
|
5340
|
+
docsOk
|
|
5341
|
+
};
|
|
5342
|
+
}
|
|
5343
|
+
function analyzeDoc(d) {
|
|
5344
|
+
return {
|
|
5345
|
+
hasError: !!d.error
|
|
5261
5346
|
};
|
|
5262
5347
|
}
|
|
5263
5348
|
function note(title, bodyHTML, kind) {
|
|
@@ -5267,8 +5352,48 @@ function note(title, bodyHTML, kind) {
|
|
|
5267
5352
|
<div class="note-body">${bodyHTML}</div>
|
|
5268
5353
|
</div>`;
|
|
5269
5354
|
}
|
|
5355
|
+
function renderDocCard(key, d, id) {
|
|
5356
|
+
let a = analyzeDoc(d), statusDot = a.hasError ? "dot-err" : "dot-ok", slug = `${id}-${(d.id || key).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "")}`, errorBadge = a.hasError ? `<label for="${slug}-err" class="badge err as-toggle">error</label>` : "", contentBadge = d.content ? `<label for="${slug}-content" class="badge ok as-toggle">view content</label>` : "";
|
|
5357
|
+
return `
|
|
5358
|
+
<article
|
|
5359
|
+
class="card is-doc ${a.hasError ? "has-doc-error" : "no-doc-error"}"
|
|
5360
|
+
role="listitem"
|
|
5361
|
+
aria-label="${esc(d.name || key)}">
|
|
5362
|
+
<div class="head">
|
|
5363
|
+
<div class="title">
|
|
5364
|
+
<h2><span class="status-dot ${statusDot}"></span> ${esc(d.title || d.name || key)}</h2>
|
|
5365
|
+
<div class="badges">
|
|
5366
|
+
${errorBadge}
|
|
5367
|
+
${contentBadge}
|
|
5368
|
+
</div>
|
|
5369
|
+
</div>
|
|
5370
|
+
<div class="meta" title="${esc(d.path)}">${esc(d.id)} \xB7 ${esc(d.path)}</div>
|
|
5371
|
+
${d.summary ? `<div>${esc(d.summary)}</div>` : ""}
|
|
5372
|
+
</div>
|
|
5373
|
+
|
|
5374
|
+
<!-- Hidden toggles must be siblings BEFORE .panels -->
|
|
5375
|
+
${a.hasError ? `<input id="${slug}-err" class="tg tg-err" type="checkbox" hidden />` : ""}
|
|
5376
|
+
${d.content ? `<input id="${slug}-content" class="tg tg-content" type="checkbox" hidden />` : ""}
|
|
5377
|
+
|
|
5378
|
+
<div class="panels">
|
|
5379
|
+
${a.hasError ? `
|
|
5380
|
+
<div class="panel panel-err">
|
|
5381
|
+
<div class="note err">
|
|
5382
|
+
<div class="note-title">${esc(d.error?.name || "Error")}</div>
|
|
5383
|
+
<div class="note-body"><pre><code>${esc(d.error?.message || "Unknown error")}</code></pre></div>
|
|
5384
|
+
</div>
|
|
5385
|
+
</div>` : ""}
|
|
5386
|
+
${d.content ? `
|
|
5387
|
+
<div class="panel panel-content">
|
|
5388
|
+
<div class="mdx-content">
|
|
5389
|
+
<pre><code>${esc(d.content)}</code></pre>
|
|
5390
|
+
</div>
|
|
5391
|
+
</div>` : ""}
|
|
5392
|
+
</div>
|
|
5393
|
+
</article>`;
|
|
5394
|
+
}
|
|
5270
5395
|
function renderComponentCard(key, c, id) {
|
|
5271
|
-
let a = analyzeComponent(c), statusDot = a.hasAnyError ? "dot-err" : "dot-ok", allStories = c.stories ?? [], errorStories = allStories.filter((ex) => !!ex?.error), okStories = allStories.filter((ex) => !ex?.error), slug = `c-${id}-${(c.id || key).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "")}`, componentErrorBadge = a.hasPropTypeError ? `<label for="${slug}-err" class="badge err as-toggle">prop type error</label>` : "", infosBadge = a.hasWarns ? `<label for="${slug}-info" class="badge info as-toggle">${a.warns.length} ${plural(a.warns.length, "info", "infos")}</label>` : "", storiesBadge = a.totalStories > 0 ? `<label for="${slug}-stories" class="badge ${a.storyErrors > 0 ? "err" : "ok"} as-toggle">${a.storyErrors > 0 ? `${a.storyErrors}/${a.totalStories} story errors` : `${a.totalStories} ${plural(a.totalStories, "story", "stories")}`}</label>` : "", reactDocgen = !a.hasPropTypeError && "reactDocgen" in c && c.reactDocgen, parsedDocgen = reactDocgen ? parseReactDocgen(reactDocgen) : void 0, propEntries = parsedDocgen ? Object.entries(parsedDocgen.props ?? {}) : [], propTypesBadge = !a.hasPropTypeError && propEntries.length > 0 ? `<label for="${slug}-props" class="badge ok as-toggle">${propEntries.length} ${plural(propEntries.length, "prop type")}</label>` : "", primaryBadge = componentErrorBadge || propTypesBadge, propsCode = propEntries.length > 0 ? propEntries.sort(([aName], [bName]) => aName.localeCompare(bName)).map(([propName, info]) => {
|
|
5396
|
+
let a = analyzeComponent(c), statusDot = a.hasAnyError ? "dot-err" : "dot-ok", allStories = c.stories ?? [], errorStories = allStories.filter((ex) => !!ex?.error), okStories = allStories.filter((ex) => !ex?.error), allDocs = c.docs ? Object.values(c.docs) : [], errorDocs = allDocs.filter((d) => !!d?.error), okDocs = allDocs.filter((d) => !d?.error), slug = `c-${id}-${(c.id || key).toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-+|-+$/g, "")}`, componentErrorBadge = a.hasPropTypeError ? `<label for="${slug}-err" class="badge err as-toggle">prop type error</label>` : "", infosBadge = a.hasWarns ? `<label for="${slug}-info" class="badge info as-toggle">${a.warns.length} ${plural(a.warns.length, "info", "infos")}</label>` : "", storiesBadge = a.totalStories > 0 ? `<label for="${slug}-stories" class="badge ${a.storyErrors > 0 ? "err" : "ok"} as-toggle">${a.storyErrors > 0 ? `${a.storyErrors}/${a.totalStories} story errors` : `${a.totalStories} ${plural(a.totalStories, "story", "stories")}`}</label>` : "", docsBadge = a.totalDocs > 0 ? `<label for="${slug}-docs" class="badge ${a.docsErrors > 0 ? "err" : "ok"} as-toggle">${a.docsErrors > 0 ? `${a.docsErrors}/${a.totalDocs} doc errors` : `${a.totalDocs} ${plural(a.totalDocs, "doc")}`}</label>` : "", reactDocgen = !a.hasPropTypeError && "reactDocgen" in c && c.reactDocgen, parsedDocgen = reactDocgen ? parseReactDocgen(reactDocgen) : void 0, propEntries = parsedDocgen ? Object.entries(parsedDocgen.props ?? {}) : [], propTypesBadge = !a.hasPropTypeError && propEntries.length > 0 ? `<label for="${slug}-props" class="badge ok as-toggle">${propEntries.length} ${plural(propEntries.length, "prop type")}</label>` : "", primaryBadge = componentErrorBadge || propTypesBadge, propsCode = propEntries.length > 0 ? propEntries.sort(([aName], [bName]) => aName.localeCompare(bName)).map(([propName, info]) => {
|
|
5272
5397
|
let description = (info?.description ?? "").trim(), t = (info?.type ?? "any").trim(), optional = info?.required ? "" : "?", defaultVal = (info?.defaultValue ?? "").trim(), def = defaultVal ? ` = ${defaultVal}` : "", doc = ["/**", ...description.split(`
|
|
5273
5398
|
`).map((line) => ` * ${line}`), " */"].join(`
|
|
5274
5399
|
`) + `
|
|
@@ -5286,7 +5411,8 @@ function renderComponentCard(key, c, id) {
|
|
|
5286
5411
|
class="card
|
|
5287
5412
|
${a.hasPropTypeError ? "has-error" : "no-error"}
|
|
5288
5413
|
${a.hasWarns ? "has-info" : "no-info"}
|
|
5289
|
-
${a.storyErrors ? "has-story-error" : "no-story-error"}
|
|
5414
|
+
${a.storyErrors ? "has-story-error" : "no-story-error"}
|
|
5415
|
+
${a.docsErrors ? "has-doc-error" : "no-doc-error"}"
|
|
5290
5416
|
role="listitem"
|
|
5291
5417
|
aria-label="${esc(c.name || key)}">
|
|
5292
5418
|
<div class="head">
|
|
@@ -5296,6 +5422,7 @@ function renderComponentCard(key, c, id) {
|
|
|
5296
5422
|
${primaryBadge}
|
|
5297
5423
|
${infosBadge}
|
|
5298
5424
|
${storiesBadge}
|
|
5425
|
+
${docsBadge}
|
|
5299
5426
|
</div>
|
|
5300
5427
|
</div>
|
|
5301
5428
|
<div class="meta" title="${esc(c.path)}">${esc(c.id)} \xB7 ${esc(c.path)}</div>
|
|
@@ -5308,6 +5435,7 @@ function renderComponentCard(key, c, id) {
|
|
|
5308
5435
|
${a.hasPropTypeError ? `<input id="${slug}-err" class="tg tg-err" type="checkbox" hidden />` : ""}
|
|
5309
5436
|
${a.hasWarns ? `<input id="${slug}-info" class="tg tg-info" type="checkbox" hidden />` : ""}
|
|
5310
5437
|
${a.totalStories > 0 ? `<input id="${slug}-stories" class="tg tg-stories" type="checkbox" hidden />` : ""}
|
|
5438
|
+
${a.totalDocs > 0 ? `<input id="${slug}-docs" class="tg tg-docs" type="checkbox" hidden />` : ""}
|
|
5311
5439
|
${!a.hasPropTypeError && propEntries.length > 0 ? `<input id="${slug}-props" class="tg tg-props" type="checkbox" hidden />` : ""}
|
|
5312
5440
|
|
|
5313
5441
|
<div class="panels">
|
|
@@ -5366,6 +5494,33 @@ function renderComponentCard(key, c, id) {
|
|
|
5366
5494
|
${ex?.description ? `<div class="hint">${esc(ex.description)}</div>` : ""}
|
|
5367
5495
|
${ex?.snippet ? `<pre><code>${esc(ex.snippet)}</code></pre>` : ""}
|
|
5368
5496
|
</div>`
|
|
5497
|
+
).join("")}
|
|
5498
|
+
</div>` : ""}
|
|
5499
|
+
${a.totalDocs > 0 ? `
|
|
5500
|
+
<div class="panel panel-docs">
|
|
5501
|
+
${errorDocs.map(
|
|
5502
|
+
(doc) => `
|
|
5503
|
+
<div class="note err">
|
|
5504
|
+
<div class="row">
|
|
5505
|
+
<span class="ex-name">${esc(doc.name)}</span>
|
|
5506
|
+
<span class="badge err">doc error</span>
|
|
5507
|
+
</div>
|
|
5508
|
+
<div class="hint">${esc(doc.path)}</div>
|
|
5509
|
+
${doc?.summary ? `<div>${esc(doc.summary)}</div>` : ""}
|
|
5510
|
+
${doc?.error?.message ? `<pre><code>${esc(doc.error.message)}</code></pre>` : ""}
|
|
5511
|
+
</div>`
|
|
5512
|
+
).join("")}
|
|
5513
|
+
${okDocs.map(
|
|
5514
|
+
(doc) => `
|
|
5515
|
+
<div class="note ok">
|
|
5516
|
+
<div class="row">
|
|
5517
|
+
<span class="ex-name">${esc(doc.name)}</span>
|
|
5518
|
+
<span class="badge ok">doc ok</span>
|
|
5519
|
+
</div>
|
|
5520
|
+
<div class="hint">${esc(doc.path)}</div>
|
|
5521
|
+
${doc?.summary ? `<div>${esc(doc.summary)}</div>` : ""}
|
|
5522
|
+
${doc?.content ? `<div class="mdx-content"><pre><code>${esc(doc.content)}</code></pre></div>` : ""}
|
|
5523
|
+
</div>`
|
|
5369
5524
|
).join("")}
|
|
5370
5525
|
</div>` : ""}
|
|
5371
5526
|
</div>
|
|
@@ -5449,9 +5604,12 @@ async function writeManifests(outputDir, presets) {
|
|
|
5449
5604
|
Object.entries(manifests).map(
|
|
5450
5605
|
([name, content]) => writeFile2(join(outputDir, "manifests", `${name}.json`), JSON.stringify(content))
|
|
5451
5606
|
)
|
|
5452
|
-
), "components" in manifests && await writeFile2(
|
|
5607
|
+
), ("components" in manifests || "docs" in manifests) && await writeFile2(
|
|
5453
5608
|
join(outputDir, "manifests", "components.html"),
|
|
5454
|
-
renderComponentsManifest(
|
|
5609
|
+
renderComponentsManifest(
|
|
5610
|
+
manifests.components,
|
|
5611
|
+
manifests.docs
|
|
5612
|
+
)
|
|
5455
5613
|
);
|
|
5456
5614
|
} catch (e) {
|
|
5457
5615
|
logger2.error("Failed to generate manifests"), logger2.error(e instanceof Error ? e : String(e));
|
|
@@ -5467,12 +5625,12 @@ function registerManifests({ app, presets }) {
|
|
|
5467
5625
|
}
|
|
5468
5626
|
}), app.get("/manifests/components.html", async (req, res) => {
|
|
5469
5627
|
try {
|
|
5470
|
-
let
|
|
5471
|
-
if (!
|
|
5472
|
-
res.statusCode = 404, res.setHeader("Content-Type", "text/html; charset=utf-8"), res.end("<pre>No components manifest configured.</pre>");
|
|
5628
|
+
let manifests = await getManifests(presets), componentsManifest = manifests.components, docsManifest = manifests.docs;
|
|
5629
|
+
if (!componentsManifest && !docsManifest) {
|
|
5630
|
+
res.statusCode = 404, res.setHeader("Content-Type", "text/html; charset=utf-8"), res.end("<pre>No components or docs manifest configured.</pre>");
|
|
5473
5631
|
return;
|
|
5474
5632
|
}
|
|
5475
|
-
res.setHeader("Content-Type", "text/html; charset=utf-8"), res.end(renderComponentsManifest(
|
|
5633
|
+
res.setHeader("Content-Type", "text/html; charset=utf-8"), res.end(renderComponentsManifest(componentsManifest, docsManifest));
|
|
5476
5634
|
} catch (e) {
|
|
5477
5635
|
res.statusCode = 500, res.setHeader("Content-Type", "text/html; charset=utf-8"), res.end(`<pre>${e instanceof Error ? e.stack : String(e)}</pre>`);
|
|
5478
5636
|
}
|
|
@@ -5627,7 +5785,7 @@ var getAttr = (elt, what) => elt.attributes.find((n) => n.type === "JSXAttribute
|
|
|
5627
5785
|
isTemplate: !1,
|
|
5628
5786
|
metaTags: void 0,
|
|
5629
5787
|
imports: void 0
|
|
5630
|
-
}, { compile } = await import("../_node-chunks/mdx-N42X6CFJ-
|
|
5788
|
+
}, { compile } = await import("../_node-chunks/mdx-N42X6CFJ-MQX7F3YI.js");
|
|
5631
5789
|
await compile(code, {
|
|
5632
5790
|
rehypePlugins: [[plugin, store]]
|
|
5633
5791
|
});
|
|
@@ -5772,7 +5930,7 @@ var makeAbsolute = (otherImport, normalizedPath, workingDir) => otherImport.star
|
|
|
5772
5930
|
let cacheKey = this.getFindMatchingFilesCacheKey(specifier, workingDir, ignoreWarnings), cached = this.findMatchingFilesCache.get(cacheKey);
|
|
5773
5931
|
if (cached)
|
|
5774
5932
|
return cached;
|
|
5775
|
-
let pathToSubIndex = {}, globCwd = slash(resolve3(workingDir, specifier.directory)), globPattern = specifier.files.startsWith("!") ? `./${specifier.files}` : specifier.files, { globby } = await import("../_node-chunks/globby-
|
|
5933
|
+
let pathToSubIndex = {}, globCwd = slash(resolve3(workingDir, specifier.directory)), globPattern = specifier.files.startsWith("!") ? `./${specifier.files}` : specifier.files, { globby } = await import("../_node-chunks/globby-GL3THFIK.js"), files = await globby(globPattern, {
|
|
5776
5934
|
absolute: !0,
|
|
5777
5935
|
cwd: globCwd,
|
|
5778
5936
|
...commonGlobOptions2(globPattern)
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_zqey0uqkkfj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_zqey0uqkkfj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_zqey0uqkkfj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_zqey0uqkkfj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_zqey0uqkkfj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_zqey0uqkkfj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
12
|
import {
|
|
13
13
|
slash
|
|
14
|
-
} from "../../_node-chunks/chunk-
|
|
14
|
+
} from "../../_node-chunks/chunk-MJPMP6AB.js";
|
|
15
15
|
import {
|
|
16
16
|
glob
|
|
17
|
-
} from "../../_node-chunks/chunk-
|
|
18
|
-
import "../../_node-chunks/chunk-
|
|
17
|
+
} from "../../_node-chunks/chunk-36AZRL2D.js";
|
|
18
|
+
import "../../_node-chunks/chunk-JFSKHQG7.js";
|
|
19
19
|
|
|
20
20
|
// src/core-server/utils/remove-mdx-entries.ts
|
|
21
21
|
import { isAbsolute, join, relative } from "node:path";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_zqey0uqkkfj from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_zqey0uqkkfj from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_zqey0uqkkfj from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_zqey0uqkkfj.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_zqey0uqkkfj.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_zqey0uqkkfj.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
11
|
// ------------------------------------------------------------
|
|
12
|
-
import "../../_node-chunks/chunk-
|
|
12
|
+
import "../../_node-chunks/chunk-DB5UH4IK.js";
|
|
13
13
|
import {
|
|
14
14
|
doesStoryFileExist,
|
|
15
15
|
generateStoryFile,
|
|
@@ -17,47 +17,47 @@ import {
|
|
|
17
17
|
parseStaticDir,
|
|
18
18
|
sendTelemetryError,
|
|
19
19
|
throttle
|
|
20
|
-
} from "../../_node-chunks/chunk-
|
|
21
|
-
import "../../_node-chunks/chunk-
|
|
22
|
-
import "../../_node-chunks/chunk-
|
|
23
|
-
import "../../_node-chunks/chunk-
|
|
20
|
+
} from "../../_node-chunks/chunk-XDPBSRAB.js";
|
|
21
|
+
import "../../_node-chunks/chunk-Y3PKDQ4M.js";
|
|
22
|
+
import "../../_node-chunks/chunk-VEH2EH3O.js";
|
|
23
|
+
import "../../_node-chunks/chunk-H7D4CVP2.js";
|
|
24
24
|
import {
|
|
25
25
|
isI18nPackage,
|
|
26
26
|
isRouterPackage,
|
|
27
27
|
isStateManagementPackage,
|
|
28
28
|
isStylingPackage
|
|
29
|
-
} from "../../_node-chunks/chunk-
|
|
29
|
+
} from "../../_node-chunks/chunk-PHOKMPEA.js";
|
|
30
30
|
import {
|
|
31
31
|
globalSettings
|
|
32
|
-
} from "../../_node-chunks/chunk-
|
|
32
|
+
} from "../../_node-chunks/chunk-Y3BQKYFK.js";
|
|
33
33
|
import {
|
|
34
34
|
invariant
|
|
35
|
-
} from "../../_node-chunks/chunk-
|
|
36
|
-
import "../../_node-chunks/chunk-
|
|
35
|
+
} from "../../_node-chunks/chunk-NFDBZKV6.js";
|
|
36
|
+
import "../../_node-chunks/chunk-CR23DEWX.js";
|
|
37
37
|
import {
|
|
38
38
|
resolvePackageDir
|
|
39
|
-
} from "../../_node-chunks/chunk-
|
|
39
|
+
} from "../../_node-chunks/chunk-FIDYKCZW.js";
|
|
40
40
|
import {
|
|
41
41
|
isAbsolute,
|
|
42
42
|
join
|
|
43
|
-
} from "../../_node-chunks/chunk-
|
|
43
|
+
} from "../../_node-chunks/chunk-74PNH6JI.js";
|
|
44
44
|
import {
|
|
45
45
|
glob
|
|
46
|
-
} from "../../_node-chunks/chunk-
|
|
47
|
-
import "../../_node-chunks/chunk-
|
|
46
|
+
} from "../../_node-chunks/chunk-36AZRL2D.js";
|
|
47
|
+
import "../../_node-chunks/chunk-CCGS5R3P.js";
|
|
48
48
|
import {
|
|
49
49
|
require_dist
|
|
50
|
-
} from "../../_node-chunks/chunk-
|
|
51
|
-
import "../../_node-chunks/chunk-
|
|
52
|
-
import "../../_node-chunks/chunk-
|
|
50
|
+
} from "../../_node-chunks/chunk-4WL6MGXA.js";
|
|
51
|
+
import "../../_node-chunks/chunk-QQZ4ZWAS.js";
|
|
52
|
+
import "../../_node-chunks/chunk-BOYAUA6D.js";
|
|
53
53
|
import {
|
|
54
54
|
require_picocolors
|
|
55
|
-
} from "../../_node-chunks/chunk-
|
|
55
|
+
} from "../../_node-chunks/chunk-Z2ZHJPAA.js";
|
|
56
56
|
import {
|
|
57
57
|
__commonJS,
|
|
58
58
|
__require,
|
|
59
59
|
__toESM
|
|
60
|
-
} from "../../_node-chunks/chunk-
|
|
60
|
+
} from "../../_node-chunks/chunk-JFSKHQG7.js";
|
|
61
61
|
|
|
62
62
|
// ../../node_modules/shell-quote/quote.js
|
|
63
63
|
var require_quote = __commonJS({
|
|
@@ -650,7 +650,7 @@ async function searchFiles({
|
|
|
650
650
|
ignoredFiles = IGNORED_FILES,
|
|
651
651
|
fileExtensions = FILE_EXTENSIONS
|
|
652
652
|
}) {
|
|
653
|
-
let { globby, isDynamicPattern } = await import("../../_node-chunks/globby-
|
|
653
|
+
let { globby, isDynamicPattern } = await import("../../_node-chunks/globby-GL3THFIK.js"), hasSearchSpecialGlobChars = isDynamicPattern(searchQuery, { cwd }), searchQueryHasExtension = /(\.[a-z]+)$/i.test(searchQuery), fileExtensionsPattern = `{${fileExtensions.join(",")}}`, globbedSearchQuery = hasSearchSpecialGlobChars ? searchQuery : searchQueryHasExtension ? [`**/*${searchQuery}*`, `**/*${searchQuery}*/**`] : [
|
|
654
654
|
`**/*${searchQuery}*.${fileExtensionsPattern}`,
|
|
655
655
|
`**/*${searchQuery}*/**/*.${fileExtensionsPattern}`
|
|
656
656
|
];
|