storybook 10.0.0-beta.5 → 10.0.0-beta.7
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/assets/server/openBrowser.applescript +94 -0
- package/dist/_browser-chunks/{WithTooltip-ERFLZL6W.js → WithTooltip-SK46ZJ2J.js} +1 -1
- package/dist/_browser-chunks/{chunk-EOILZP2R.js → chunk-BOOOPFZF.js} +7 -2
- package/dist/_browser-chunks/{chunk-YQV3EGQ5.js → chunk-OQ6NCFPL.js} +38 -15
- package/dist/_browser-chunks/{chunk-O5R5CGFA.js → chunk-TMDZCWME.js} +1 -2
- package/dist/_node-chunks/{builder-manager-ZTS4EIKQ.js → builder-manager-VFP7HSCF.js} +21 -151
- package/dist/_node-chunks/camelcase-ZLZNQMDD.js +18 -0
- package/dist/_node-chunks/{chunk-VQN4WAIA.js → chunk-2GCKJYK6.js} +7 -7
- package/dist/_node-chunks/{chunk-H52PBBSK.js → chunk-3NIQHNDU.js} +7 -7
- package/dist/_node-chunks/{chunk-3VVGIILJ.js → chunk-3QZ7KLON.js} +8 -8
- package/dist/_node-chunks/{chunk-VWSUFVUF.js → chunk-3XXQRL3A.js} +7 -7
- package/dist/_node-chunks/{chunk-OC3TVLYU.js → chunk-46BWYN3K.js} +7 -7
- package/dist/_node-chunks/{chunk-VX5P3IYA.js → chunk-4DIDWIST.js} +7 -7
- package/dist/_node-chunks/{chunk-TBWOUVTA.js → chunk-5YUTWYNI.js} +709 -935
- package/dist/_node-chunks/{chunk-4VDRH7SM.js → chunk-A2DKPKBY.js} +7 -7
- package/dist/_node-chunks/{chunk-KU3JBNPY.js → chunk-BC23FKU4.js} +8 -8
- package/dist/_node-chunks/{chunk-KZB7ELL6.js → chunk-BID2X7MU.js} +7 -7
- package/dist/_node-chunks/{chunk-PIKDGR3O.js → chunk-C4EOB63P.js} +7 -7
- package/dist/_node-chunks/{chunk-TVKUJ3SE.js → chunk-DH7BCQMG.js} +8 -8
- package/dist/_node-chunks/{chunk-J3DQMIO4.js → chunk-FCNWWJV7.js} +7 -7
- package/dist/_node-chunks/{chunk-EIHJ5J3O.js → chunk-GBZZSL2K.js} +264 -109
- package/dist/_node-chunks/{chunk-F7YW5W6B.js → chunk-GCWAGPDV.js} +12 -12
- package/dist/_node-chunks/{chunk-K4YETNYJ.js → chunk-I7SRMFT5.js} +7 -7
- package/dist/_node-chunks/{chunk-TKN5TEZV.js → chunk-IEFSRAX2.js} +13 -13
- package/dist/_node-chunks/{chunk-AK5PHLUA.js → chunk-IGWCAXA2.js} +7 -7
- package/dist/_node-chunks/chunk-IYOHZPPC.js +18 -0
- package/dist/_node-chunks/{chunk-F3WE3456.js → chunk-KVOP6ASA.js} +7 -7
- package/dist/_node-chunks/{chunk-DZJNLBBL.js → chunk-MHVF6Y35.js} +7 -7
- package/dist/_node-chunks/{chunk-UTCFHTQH.js → chunk-MRCMZPA2.js} +7 -7
- package/dist/_node-chunks/chunk-RNHUADRS.js +62 -0
- package/dist/_node-chunks/{chunk-4KRR46V2.js → chunk-RP3VMQPF.js} +15 -15
- package/dist/_node-chunks/{chunk-P7YMEOXF.js → chunk-TFIGR2HH.js} +7 -7
- package/dist/_node-chunks/{chunk-SW3VZAH7.js → chunk-TXDIOSHI.js} +9 -9
- package/dist/_node-chunks/{chunk-WCSHG2QT.js → chunk-U6MJQ7C6.js} +7 -7
- package/dist/_node-chunks/{chunk-ACUNHBEO.js → chunk-XXVKM2ZR.js} +26 -23
- package/dist/_node-chunks/{chunk-QHIU5I7C.js → chunk-YWU65VY4.js} +6 -6
- package/dist/_node-chunks/{chunk-P3TWEOO5.js → chunk-Z3PLI7S2.js} +7 -7
- package/dist/_node-chunks/{chunk-2VMDKLSW.js → chunk-ZM2HT2RW.js} +6 -6
- package/dist/_node-chunks/{chunk-D7SDB4XE.js → chunk-ZPNXCXIT.js} +8 -8
- package/dist/_node-chunks/{dist-OGRBL76N.js → dist-PG4I7ZDU.js} +9 -9
- package/dist/_node-chunks/{globby-65LOULA6.js → globby-HXB6X43W.js} +17 -13
- package/dist/_node-chunks/{lib-TF7JCT3A.js → lib-4JJTZC7T.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-6ZJEUZMZ.js → mdx-N42X6CFJ-3JBJ7PQF.js} +8 -8
- package/dist/_node-chunks/{p-limit-PF7JSPDT.js → p-limit-WBBNX4KI.js} +7 -7
- package/dist/_node-chunks/{plugin-A6XAWMXN.js → plugin-SEQ2OPRK.js} +10 -10
- package/dist/_node-chunks/{plugin-LGHGAC6J.js → plugin-SG6I7RFC.js} +10 -10
- package/dist/_node-chunks/{webpack-inject-mocker-runtime-plugin-HDSEOU3Z.js → webpack-inject-mocker-runtime-plugin-5O25VYCQ.js} +10 -10
- package/dist/_node-chunks/{webpack-mock-plugin-ZJJVMJUS.js → webpack-mock-plugin-35I32SAF.js} +9 -9
- package/dist/babel/index.js +11 -11
- package/dist/bin/core.js +11 -11
- package/dist/bin/dispatcher.js +11 -11
- package/dist/bin/loader.js +8 -8
- package/dist/cli/index.js +27 -22
- package/dist/common/index.js +21 -21
- package/dist/components/index.js +8 -4
- package/dist/core-events/index.d.ts +18 -2
- package/dist/core-events/index.js +7 -1
- package/dist/core-server/index.js +1157 -1024
- package/dist/core-server/presets/common-manager.js +84 -39
- package/dist/core-server/presets/common-override-preset.js +9 -9
- package/dist/core-server/presets/common-preset.js +691 -29
- package/dist/core-server/presets/webpack/loaders/storybook-mock-transform-loader.js +9 -9
- package/dist/core-server/presets/webpack/loaders/webpack-automock-loader.js +10 -10
- package/dist/csf/index.d.ts +9 -4
- package/dist/csf/index.js +37 -8
- package/dist/csf-tools/index.d.ts +13 -6
- package/dist/csf-tools/index.js +9 -9
- package/dist/manager/globals-runtime.js +1318 -1001
- package/dist/manager/globals.d.ts +0 -4
- package/dist/manager/globals.js +1 -6
- package/dist/manager/runtime.js +2198 -721
- package/dist/manager-api/index.d.ts +12 -5
- package/dist/manager-api/index.js +347 -76
- package/dist/node-logger/index.js +14 -14
- package/dist/preview/runtime.js +103 -63
- package/dist/preview-api/index.d.ts +70 -71
- package/dist/preview-api/index.js +1 -1
- package/dist/server-errors.js +10 -10
- package/dist/telemetry/index.d.ts +1 -1
- package/dist/telemetry/index.js +24 -24
- package/dist/types/index.d.ts +28 -7
- package/dist/viewport/index.d.ts +36 -4
- package/dist/viewport/index.js +1 -1
- package/package.json +5 -4
- package/dist/_node-chunks/camelcase-K3BM7RII.js +0 -18
- package/dist/_node-chunks/chunk-7LG5CLCT.js +0 -18
- package/dist/_node-chunks/chunk-DWJ7TV2O.js +0 -62
- package/dist/_node-chunks/default-browser-id-4RZZMHJE.js +0 -1719
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
(*
|
|
2
|
+
Copyright (c) 2015-present, Facebook, Inc.
|
|
3
|
+
This source code is licensed under the MIT license found in the
|
|
4
|
+
LICENSE file in the root directory of this source tree.
|
|
5
|
+
*)
|
|
6
|
+
|
|
7
|
+
property targetTab: null
|
|
8
|
+
property targetTabIndex: -1
|
|
9
|
+
property targetWindow: null
|
|
10
|
+
property theProgram: "Google Chrome"
|
|
11
|
+
|
|
12
|
+
on run argv
|
|
13
|
+
set theURL to item 1 of argv
|
|
14
|
+
set matchURL to item 2 of argv
|
|
15
|
+
|
|
16
|
+
-- Allow requested program to be optional,
|
|
17
|
+
-- default to Google Chrome
|
|
18
|
+
if (count of argv) > 2 then
|
|
19
|
+
set theProgram to item 3 of argv
|
|
20
|
+
end if
|
|
21
|
+
|
|
22
|
+
using terms from application "Google Chrome"
|
|
23
|
+
tell application theProgram
|
|
24
|
+
|
|
25
|
+
if (count every window) = 0 then
|
|
26
|
+
make new window
|
|
27
|
+
end if
|
|
28
|
+
|
|
29
|
+
-- 1: Looking for tab running debugger
|
|
30
|
+
-- then, Reload debugging tab if found
|
|
31
|
+
-- then return
|
|
32
|
+
set found to my lookupTabWithUrl(matchURL)
|
|
33
|
+
if found then
|
|
34
|
+
set targetWindow's active tab index to targetTabIndex
|
|
35
|
+
tell targetTab to reload
|
|
36
|
+
tell targetWindow to activate
|
|
37
|
+
set index of targetWindow to 1
|
|
38
|
+
return
|
|
39
|
+
end if
|
|
40
|
+
|
|
41
|
+
-- 2: Looking for Empty tab
|
|
42
|
+
-- In case debugging tab was not found
|
|
43
|
+
-- We try to find an empty tab instead
|
|
44
|
+
set found to my lookupTabWithUrl("chrome://newtab/")
|
|
45
|
+
if found then
|
|
46
|
+
set targetWindow's active tab index to targetTabIndex
|
|
47
|
+
set URL of targetTab to theURL
|
|
48
|
+
tell targetWindow to activate
|
|
49
|
+
return
|
|
50
|
+
end if
|
|
51
|
+
|
|
52
|
+
-- 3: Create new tab
|
|
53
|
+
-- both debugging and empty tab were not found
|
|
54
|
+
-- make a new tab with url
|
|
55
|
+
tell window 1
|
|
56
|
+
activate
|
|
57
|
+
make new tab with properties {URL:theURL}
|
|
58
|
+
end tell
|
|
59
|
+
end tell
|
|
60
|
+
end using terms from
|
|
61
|
+
end run
|
|
62
|
+
|
|
63
|
+
-- Function:
|
|
64
|
+
-- Lookup tab with given url
|
|
65
|
+
-- if found, store tab, index, and window in properties
|
|
66
|
+
-- (properties were declared on top of file)
|
|
67
|
+
on lookupTabWithUrl(lookupUrl)
|
|
68
|
+
using terms from application "Google Chrome"
|
|
69
|
+
tell application theProgram
|
|
70
|
+
-- Find a tab with the given url
|
|
71
|
+
set found to false
|
|
72
|
+
set theTabIndex to -1
|
|
73
|
+
repeat with theWindow in every window
|
|
74
|
+
set theTabIndex to 0
|
|
75
|
+
repeat with theTab in every tab of theWindow
|
|
76
|
+
set theTabIndex to theTabIndex + 1
|
|
77
|
+
if (theTab's URL as string) contains lookupUrl then
|
|
78
|
+
-- assign tab, tab index, and window to properties
|
|
79
|
+
set targetTab to theTab
|
|
80
|
+
set targetTabIndex to theTabIndex
|
|
81
|
+
set targetWindow to theWindow
|
|
82
|
+
set found to true
|
|
83
|
+
exit repeat
|
|
84
|
+
end if
|
|
85
|
+
end repeat
|
|
86
|
+
|
|
87
|
+
if found then
|
|
88
|
+
exit repeat
|
|
89
|
+
end if
|
|
90
|
+
end repeat
|
|
91
|
+
end tell
|
|
92
|
+
end using terms from
|
|
93
|
+
return found
|
|
94
|
+
end lookupTabWithUrl
|
|
@@ -2290,7 +2290,12 @@ var WithToolTipState = /* @__PURE__ */ __name(({
|
|
|
2290
2290
|
);
|
|
2291
2291
|
useEffect6(() => {
|
|
2292
2292
|
const hide2 = /* @__PURE__ */ __name(() => onVisibilityChange(false), "hide");
|
|
2293
|
-
|
|
2293
|
+
const handleKeyDown = /* @__PURE__ */ __name((e) => {
|
|
2294
|
+
if (e.key === "Escape") {
|
|
2295
|
+
hide2();
|
|
2296
|
+
}
|
|
2297
|
+
}, "handleKeyDown");
|
|
2298
|
+
document2.addEventListener("keydown", handleKeyDown, false);
|
|
2294
2299
|
const iframes = Array.from(document2.getElementsByTagName("iframe"));
|
|
2295
2300
|
const unbinders = [];
|
|
2296
2301
|
iframes.forEach((iframe) => {
|
|
@@ -2315,7 +2320,7 @@ var WithToolTipState = /* @__PURE__ */ __name(({
|
|
|
2315
2320
|
});
|
|
2316
2321
|
});
|
|
2317
2322
|
return () => {
|
|
2318
|
-
document2.removeEventListener("keydown",
|
|
2323
|
+
document2.removeEventListener("keydown", handleKeyDown);
|
|
2319
2324
|
unbinders.forEach((unbind) => {
|
|
2320
2325
|
unbind();
|
|
2321
2326
|
});
|
|
@@ -511,6 +511,13 @@ var map = /* @__PURE__ */ __name((arg, argType) => {
|
|
|
511
511
|
const mapped = map(val, { type: type.value[key] });
|
|
512
512
|
return mapped === INCOMPATIBLE ? acc : Object.assign(acc, { [key]: mapped });
|
|
513
513
|
}, {});
|
|
514
|
+
case "other": {
|
|
515
|
+
const isPrimitiveArg = typeof arg === "string" || typeof arg === "number" || typeof arg === "boolean";
|
|
516
|
+
if (type.value === "ReactNode" && isPrimitiveArg) {
|
|
517
|
+
return arg;
|
|
518
|
+
}
|
|
519
|
+
return INCOMPATIBLE;
|
|
520
|
+
}
|
|
514
521
|
default:
|
|
515
522
|
return INCOMPATIBLE;
|
|
516
523
|
}
|
|
@@ -880,7 +887,7 @@ __name(normalizeStory, "normalizeStory");
|
|
|
880
887
|
|
|
881
888
|
// src/preview-api/modules/store/csf/processCSFFile.ts
|
|
882
889
|
import { logger as logger4 } from "storybook/internal/client-logger";
|
|
883
|
-
import { isExportStory, isStory } from "storybook/internal/csf";
|
|
890
|
+
import { getStoryChildren, isExportStory, isStory, toTestId } from "storybook/internal/csf";
|
|
884
891
|
|
|
885
892
|
// src/preview-api/modules/store/csf/normalizeComponentAnnotations.ts
|
|
886
893
|
import { sanitize } from "storybook/internal/csf";
|
|
@@ -934,9 +941,17 @@ function processCSFFile(moduleExports, importPath, title) {
|
|
|
934
941
|
const csfFile2 = { meta: meta2, stories: {}, moduleExports };
|
|
935
942
|
Object.keys(namedExports).forEach((key) => {
|
|
936
943
|
if (isExportStory(key, meta2)) {
|
|
937
|
-
const
|
|
944
|
+
const story = namedExports[key];
|
|
945
|
+
const storyMeta = normalizeStory(key, story.input, meta2);
|
|
938
946
|
checkDisallowedParameters(storyMeta.parameters);
|
|
939
947
|
csfFile2.stories[storyMeta.id] = storyMeta;
|
|
948
|
+
getStoryChildren(story).forEach((child) => {
|
|
949
|
+
const name = child.input.name;
|
|
950
|
+
const childId = toTestId(storyMeta.id, name);
|
|
951
|
+
child.input.parameters ??= {};
|
|
952
|
+
child.input.parameters.__id = childId;
|
|
953
|
+
csfFile2.stories[childId] = normalizeStory(name, child.input, meta2);
|
|
954
|
+
});
|
|
940
955
|
}
|
|
941
956
|
});
|
|
942
957
|
csfFile2.projectAnnotations = firstStory.meta.preview.composed;
|
|
@@ -1167,11 +1182,13 @@ __name(prepareMeta, "prepareMeta");
|
|
|
1167
1182
|
function preparePartialAnnotations(storyAnnotations, componentAnnotations, projectAnnotations) {
|
|
1168
1183
|
const defaultTags = ["dev", "test"];
|
|
1169
1184
|
const extraTags = globalThis2.DOCS_OPTIONS?.autodocs === true ? ["autodocs"] : [];
|
|
1185
|
+
const overrideTags = storyAnnotations?.tags?.includes("test-fn") ? ["!autodocs"] : [];
|
|
1170
1186
|
const tags = combineTags(
|
|
1171
1187
|
...defaultTags,
|
|
1172
1188
|
...extraTags,
|
|
1173
1189
|
...projectAnnotations.tags ?? [],
|
|
1174
1190
|
...componentAnnotations.tags ?? [],
|
|
1191
|
+
...overrideTags,
|
|
1175
1192
|
...storyAnnotations?.tags ?? []
|
|
1176
1193
|
);
|
|
1177
1194
|
const parameters = combineParameters(
|
|
@@ -1542,13 +1559,13 @@ __name(_ReporterAPI, "ReporterAPI");
|
|
|
1542
1559
|
var ReporterAPI = _ReporterAPI;
|
|
1543
1560
|
|
|
1544
1561
|
// src/preview-api/modules/store/csf/csf-factory-utils.ts
|
|
1545
|
-
import { isStory as isStory2 } from "storybook/internal/csf";
|
|
1562
|
+
import { isMeta, isStory as isStory2 } from "storybook/internal/csf";
|
|
1546
1563
|
function getCsfFactoryAnnotations(story, meta, projectAnnotations) {
|
|
1547
1564
|
return isStory2(story) ? {
|
|
1548
1565
|
story: story.input,
|
|
1549
1566
|
meta: story.meta.input,
|
|
1550
1567
|
preview: story.meta.preview.composed
|
|
1551
|
-
} : { story, meta, preview: projectAnnotations };
|
|
1568
|
+
} : { story, meta: isMeta(meta) ? meta.input : meta, preview: projectAnnotations };
|
|
1552
1569
|
}
|
|
1553
1570
|
__name(getCsfFactoryAnnotations, "getCsfFactoryAnnotations");
|
|
1554
1571
|
|
|
@@ -1947,7 +1964,7 @@ var _StoryStore = class _StoryStore {
|
|
|
1947
1964
|
return { entryExports, csfFiles };
|
|
1948
1965
|
}
|
|
1949
1966
|
// A prepared story does not include args, globals or hooks. These are stored in the story store
|
|
1950
|
-
// and updated
|
|
1967
|
+
// and updated separately to the (immutable) story.
|
|
1951
1968
|
getStoryContext(story, { forceInitialArgs = false } = {}) {
|
|
1952
1969
|
const userGlobals = this.userGlobals.get();
|
|
1953
1970
|
const { initialGlobals } = this.userGlobals;
|
|
@@ -1981,21 +1998,25 @@ var _StoryStore = class _StoryStore {
|
|
|
1981
1998
|
}
|
|
1982
1999
|
extract(options = { includeDocsOnly: false }) {
|
|
1983
2000
|
const { cachedCSFFiles } = this;
|
|
2001
|
+
console.log("extract: extracting stories", cachedCSFFiles);
|
|
1984
2002
|
if (!cachedCSFFiles) {
|
|
1985
2003
|
throw new CalledExtractOnStoreError();
|
|
1986
2004
|
}
|
|
1987
|
-
|
|
1988
|
-
(acc, [storyId,
|
|
1989
|
-
if (type === "docs") {
|
|
2005
|
+
const stories = Object.entries(this.storyIndex.entries).reduce(
|
|
2006
|
+
(acc, [storyId, entry]) => {
|
|
2007
|
+
if (entry.type === "docs") {
|
|
1990
2008
|
return acc;
|
|
1991
2009
|
}
|
|
1992
|
-
const csfFile = cachedCSFFiles[importPath];
|
|
2010
|
+
const csfFile = cachedCSFFiles[entry.importPath];
|
|
1993
2011
|
const story = this.storyFromCSFFile({ storyId, csfFile });
|
|
1994
2012
|
if (!options.includeDocsOnly && story.parameters.docsOnly) {
|
|
1995
2013
|
return acc;
|
|
1996
2014
|
}
|
|
1997
2015
|
acc[storyId] = Object.entries(story).reduce(
|
|
1998
2016
|
(storyAcc, [key, value]) => {
|
|
2017
|
+
if (key === "story" && entry.subtype === "test") {
|
|
2018
|
+
return { ...storyAcc, story: entry.parentName };
|
|
2019
|
+
}
|
|
1999
2020
|
if (key === "moduleExport") {
|
|
2000
2021
|
return storyAcc;
|
|
2001
2022
|
}
|
|
@@ -2008,19 +2029,21 @@ var _StoryStore = class _StoryStore {
|
|
|
2008
2029
|
return Object.assign(storyAcc, { [key]: value });
|
|
2009
2030
|
},
|
|
2010
2031
|
{
|
|
2011
|
-
//
|
|
2012
2032
|
args: story.initialArgs,
|
|
2013
2033
|
globals: {
|
|
2014
2034
|
...this.userGlobals.initialGlobals,
|
|
2015
2035
|
...this.userGlobals.globals,
|
|
2016
2036
|
...story.storyGlobals
|
|
2017
|
-
}
|
|
2037
|
+
},
|
|
2038
|
+
storyId: entry.parent ? entry.parent : storyId
|
|
2018
2039
|
}
|
|
2019
2040
|
);
|
|
2020
2041
|
return acc;
|
|
2021
2042
|
},
|
|
2022
2043
|
{}
|
|
2023
2044
|
);
|
|
2045
|
+
console.log("extract: stories", stories);
|
|
2046
|
+
return stories;
|
|
2024
2047
|
}
|
|
2025
2048
|
};
|
|
2026
2049
|
__name(_StoryStore, "StoryStore");
|
|
@@ -2181,7 +2204,7 @@ var sortStoriesV7 = /* @__PURE__ */ __name((stories, storySortParameter, fileNam
|
|
|
2181
2204
|
Error sorting stories with sort parameter ${storySortParameter}:
|
|
2182
2205
|
|
|
2183
2206
|
> ${err.message}
|
|
2184
|
-
|
|
2207
|
+
|
|
2185
2208
|
Are you using a V6-style sort function in V7 mode?
|
|
2186
2209
|
|
|
2187
2210
|
More info: https://github.com/storybookjs/storybook/blob/next/MIGRATION.md#v7-style-story-sort
|
|
@@ -2277,16 +2300,15 @@ var _StoryRender = class _StoryRender {
|
|
|
2277
2300
|
}
|
|
2278
2301
|
}
|
|
2279
2302
|
checkIfAborted(signal) {
|
|
2280
|
-
if (signal.aborted) {
|
|
2303
|
+
if (signal.aborted && !["finished", "aborted", "errored"].includes(this.phase)) {
|
|
2281
2304
|
this.phase = "aborted";
|
|
2282
2305
|
this.channel.emit(STORY_RENDER_PHASE_CHANGED, {
|
|
2283
2306
|
newPhase: this.phase,
|
|
2284
2307
|
renderId: this.renderId,
|
|
2285
2308
|
storyId: this.id
|
|
2286
2309
|
});
|
|
2287
|
-
return true;
|
|
2288
2310
|
}
|
|
2289
|
-
return
|
|
2311
|
+
return signal.aborted;
|
|
2290
2312
|
}
|
|
2291
2313
|
async prepare() {
|
|
2292
2314
|
await this.runPhase(this.abortController.signal, "preparing", async () => {
|
|
@@ -4123,6 +4145,7 @@ export {
|
|
|
4123
4145
|
combineArgs,
|
|
4124
4146
|
normalizeArrays,
|
|
4125
4147
|
normalizeStory,
|
|
4148
|
+
mountDestructured,
|
|
4126
4149
|
decorateStory,
|
|
4127
4150
|
sanitizeStoryContextUpdate,
|
|
4128
4151
|
defaultDecorateStory,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/viewport/defaults.ts
|
|
2
|
-
var
|
|
2
|
+
var INITIAL_VIEWPORTS = {
|
|
3
3
|
iphone5: {
|
|
4
4
|
name: "iPhone 5",
|
|
5
5
|
styles: {
|
|
@@ -225,7 +225,6 @@ var INITIAL_VIEWPORTS_DATA = {
|
|
|
225
225
|
type: "mobile"
|
|
226
226
|
}
|
|
227
227
|
};
|
|
228
|
-
var INITIAL_VIEWPORTS = INITIAL_VIEWPORTS_DATA;
|
|
229
228
|
var DEFAULT_VIEWPORT = "responsive";
|
|
230
229
|
var MINIMAL_VIEWPORTS = {
|
|
231
230
|
mobile1: {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_srln17sp2zh from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_srln17sp2zh from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_srln17sp2zh from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_srln17sp2zh.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_srln17sp2zh.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_srln17sp2zh.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,23 +13,23 @@ import {
|
|
|
13
13
|
BROWSER_TARGETS,
|
|
14
14
|
NODE_TARGET,
|
|
15
15
|
SUPPORTED_FEATURES
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-YWU65VY4.js";
|
|
17
17
|
import {
|
|
18
18
|
require_build
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-2GCKJYK6.js";
|
|
20
20
|
import {
|
|
21
21
|
resolveModulePath
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-U6MJQ7C6.js";
|
|
23
23
|
import {
|
|
24
24
|
resolvePackageDir
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-BC23FKU4.js";
|
|
26
26
|
import {
|
|
27
27
|
join,
|
|
28
28
|
parse
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-A2DKPKBY.js";
|
|
30
30
|
import {
|
|
31
31
|
slash
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-FCNWWJV7.js";
|
|
33
33
|
import {
|
|
34
34
|
__commonJS,
|
|
35
35
|
__esm,
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
__require,
|
|
39
39
|
__toCommonJS,
|
|
40
40
|
__toESM
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-ZM2HT2RW.js";
|
|
42
42
|
|
|
43
43
|
// ../node_modules/tslib/tslib.es6.mjs
|
|
44
44
|
var tslib_es6_exports = {};
|
|
@@ -1721,6 +1721,7 @@ var exports_default = {
|
|
|
1721
1721
|
"DownloadIcon",
|
|
1722
1722
|
"DragIcon",
|
|
1723
1723
|
"EditIcon",
|
|
1724
|
+
"EditorIcon",
|
|
1724
1725
|
"EllipsisIcon",
|
|
1725
1726
|
"EmailIcon",
|
|
1726
1727
|
"ExpandAltIcon",
|
|
@@ -2113,65 +2114,6 @@ var exports_default = {
|
|
|
2113
2114
|
"resetComponents",
|
|
2114
2115
|
"withReset"
|
|
2115
2116
|
],
|
|
2116
|
-
"storybook/internal/core-errors": [
|
|
2117
|
-
"ARGTYPES_INFO_REQUEST",
|
|
2118
|
-
"ARGTYPES_INFO_RESPONSE",
|
|
2119
|
-
"CHANNEL_CREATED",
|
|
2120
|
-
"CHANNEL_WS_DISCONNECT",
|
|
2121
|
-
"CONFIG_ERROR",
|
|
2122
|
-
"CREATE_NEW_STORYFILE_REQUEST",
|
|
2123
|
-
"CREATE_NEW_STORYFILE_RESPONSE",
|
|
2124
|
-
"CURRENT_STORY_WAS_SET",
|
|
2125
|
-
"DOCS_PREPARED",
|
|
2126
|
-
"DOCS_RENDERED",
|
|
2127
|
-
"FILE_COMPONENT_SEARCH_REQUEST",
|
|
2128
|
-
"FILE_COMPONENT_SEARCH_RESPONSE",
|
|
2129
|
-
"FORCE_REMOUNT",
|
|
2130
|
-
"FORCE_RE_RENDER",
|
|
2131
|
-
"GLOBALS_UPDATED",
|
|
2132
|
-
"NAVIGATE_URL",
|
|
2133
|
-
"PLAY_FUNCTION_THREW_EXCEPTION",
|
|
2134
|
-
"PRELOAD_ENTRIES",
|
|
2135
|
-
"PREVIEW_BUILDER_PROGRESS",
|
|
2136
|
-
"PREVIEW_KEYDOWN",
|
|
2137
|
-
"REGISTER_SUBSCRIPTION",
|
|
2138
|
-
"REQUEST_WHATS_NEW_DATA",
|
|
2139
|
-
"RESET_STORY_ARGS",
|
|
2140
|
-
"RESULT_WHATS_NEW_DATA",
|
|
2141
|
-
"SAVE_STORY_REQUEST",
|
|
2142
|
-
"SAVE_STORY_RESPONSE",
|
|
2143
|
-
"SELECT_STORY",
|
|
2144
|
-
"SET_CONFIG",
|
|
2145
|
-
"SET_CURRENT_STORY",
|
|
2146
|
-
"SET_FILTER",
|
|
2147
|
-
"SET_GLOBALS",
|
|
2148
|
-
"SET_INDEX",
|
|
2149
|
-
"SET_STORIES",
|
|
2150
|
-
"SET_WHATS_NEW_CACHE",
|
|
2151
|
-
"SHARED_STATE_CHANGED",
|
|
2152
|
-
"SHARED_STATE_SET",
|
|
2153
|
-
"STORIES_COLLAPSE_ALL",
|
|
2154
|
-
"STORIES_EXPAND_ALL",
|
|
2155
|
-
"STORY_ARGS_UPDATED",
|
|
2156
|
-
"STORY_CHANGED",
|
|
2157
|
-
"STORY_ERRORED",
|
|
2158
|
-
"STORY_FINISHED",
|
|
2159
|
-
"STORY_HOT_UPDATED",
|
|
2160
|
-
"STORY_INDEX_INVALIDATED",
|
|
2161
|
-
"STORY_MISSING",
|
|
2162
|
-
"STORY_PREPARED",
|
|
2163
|
-
"STORY_RENDERED",
|
|
2164
|
-
"STORY_RENDER_PHASE_CHANGED",
|
|
2165
|
-
"STORY_SPECIFIED",
|
|
2166
|
-
"STORY_THREW_EXCEPTION",
|
|
2167
|
-
"STORY_UNCHANGED",
|
|
2168
|
-
"TELEMETRY_ERROR",
|
|
2169
|
-
"TOGGLE_WHATS_NEW_NOTIFICATIONS",
|
|
2170
|
-
"UNHANDLED_ERRORS_WHILE_PLAYING",
|
|
2171
|
-
"UPDATE_GLOBALS",
|
|
2172
|
-
"UPDATE_QUERY_PARAMS",
|
|
2173
|
-
"UPDATE_STORY_ARGS"
|
|
2174
|
-
],
|
|
2175
2117
|
"storybook/internal/core-events": [
|
|
2176
2118
|
"ARGTYPES_INFO_REQUEST",
|
|
2177
2119
|
"ARGTYPES_INFO_RESPONSE",
|
|
@@ -2189,6 +2131,8 @@ var exports_default = {
|
|
|
2189
2131
|
"FORCE_RE_RENDER",
|
|
2190
2132
|
"GLOBALS_UPDATED",
|
|
2191
2133
|
"NAVIGATE_URL",
|
|
2134
|
+
"OPEN_IN_EDITOR_REQUEST",
|
|
2135
|
+
"OPEN_IN_EDITOR_RESPONSE",
|
|
2192
2136
|
"PLAY_FUNCTION_THREW_EXCEPTION",
|
|
2193
2137
|
"PRELOAD_ENTRIES",
|
|
2194
2138
|
"PREVIEW_BUILDER_PROGRESS",
|
|
@@ -2253,79 +2197,7 @@ var exports_default = {
|
|
|
2253
2197
|
"stringifyQuery",
|
|
2254
2198
|
"useNavigate"
|
|
2255
2199
|
],
|
|
2256
|
-
"storybook/internal/types": ["Addon_TypesEnum"]
|
|
2257
|
-
"storybook/internal/manager-api": [
|
|
2258
|
-
"ActiveTabs",
|
|
2259
|
-
"Consumer",
|
|
2260
|
-
"ManagerContext",
|
|
2261
|
-
"Provider",
|
|
2262
|
-
"RequestResponseError",
|
|
2263
|
-
"addons",
|
|
2264
|
-
"combineParameters",
|
|
2265
|
-
"controlOrMetaKey",
|
|
2266
|
-
"controlOrMetaSymbol",
|
|
2267
|
-
"eventMatchesShortcut",
|
|
2268
|
-
"eventToShortcut",
|
|
2269
|
-
"experimental_MockUniversalStore",
|
|
2270
|
-
"experimental_UniversalStore",
|
|
2271
|
-
"experimental_getStatusStore",
|
|
2272
|
-
"experimental_getTestProviderStore",
|
|
2273
|
-
"experimental_requestResponse",
|
|
2274
|
-
"experimental_useStatusStore",
|
|
2275
|
-
"experimental_useTestProviderStore",
|
|
2276
|
-
"experimental_useUniversalStore",
|
|
2277
|
-
"internal_fullStatusStore",
|
|
2278
|
-
"internal_fullTestProviderStore",
|
|
2279
|
-
"internal_universalStatusStore",
|
|
2280
|
-
"internal_universalTestProviderStore",
|
|
2281
|
-
"isMacLike",
|
|
2282
|
-
"isShortcutTaken",
|
|
2283
|
-
"keyToSymbol",
|
|
2284
|
-
"merge",
|
|
2285
|
-
"mockChannel",
|
|
2286
|
-
"optionOrAltSymbol",
|
|
2287
|
-
"shortcutMatchesShortcut",
|
|
2288
|
-
"shortcutToHumanString",
|
|
2289
|
-
"types",
|
|
2290
|
-
"useAddonState",
|
|
2291
|
-
"useArgTypes",
|
|
2292
|
-
"useArgs",
|
|
2293
|
-
"useChannel",
|
|
2294
|
-
"useGlobalTypes",
|
|
2295
|
-
"useGlobals",
|
|
2296
|
-
"useParameter",
|
|
2297
|
-
"useSharedState",
|
|
2298
|
-
"useStoryPrepared",
|
|
2299
|
-
"useStorybookApi",
|
|
2300
|
-
"useStorybookState"
|
|
2301
|
-
],
|
|
2302
|
-
"storybook/internal/theming": [
|
|
2303
|
-
"CacheProvider",
|
|
2304
|
-
"ClassNames",
|
|
2305
|
-
"Global",
|
|
2306
|
-
"ThemeProvider",
|
|
2307
|
-
"background",
|
|
2308
|
-
"color",
|
|
2309
|
-
"convert",
|
|
2310
|
-
"create",
|
|
2311
|
-
"createCache",
|
|
2312
|
-
"createGlobal",
|
|
2313
|
-
"createReset",
|
|
2314
|
-
"css",
|
|
2315
|
-
"darken",
|
|
2316
|
-
"ensure",
|
|
2317
|
-
"ignoreSsrWarning",
|
|
2318
|
-
"isPropValid",
|
|
2319
|
-
"jsx",
|
|
2320
|
-
"keyframes",
|
|
2321
|
-
"lighten",
|
|
2322
|
-
"styled",
|
|
2323
|
-
"themes",
|
|
2324
|
-
"typography",
|
|
2325
|
-
"useTheme",
|
|
2326
|
-
"withTheme"
|
|
2327
|
-
],
|
|
2328
|
-
"storybook/internal/theming/create": ["create", "themes"]
|
|
2200
|
+
"storybook/internal/types": ["Addon_TypesEnum"]
|
|
2329
2201
|
};
|
|
2330
2202
|
|
|
2331
2203
|
// src/manager/globals/globals.ts
|
|
@@ -2341,15 +2213,10 @@ var globalsNameReferenceMap = {
|
|
|
2341
2213
|
"storybook/internal/channels": "__STORYBOOK_CHANNELS__",
|
|
2342
2214
|
"storybook/internal/client-logger": "__STORYBOOK_CLIENT_LOGGER__",
|
|
2343
2215
|
"storybook/internal/components": "__STORYBOOK_COMPONENTS__",
|
|
2344
|
-
"storybook/internal/core-errors": "__STORYBOOK_CORE_EVENTS__",
|
|
2345
2216
|
"storybook/internal/core-events": "__STORYBOOK_CORE_EVENTS__",
|
|
2346
2217
|
"storybook/internal/manager-errors": "__STORYBOOK_CORE_EVENTS_MANAGER_ERRORS__",
|
|
2347
2218
|
"storybook/internal/router": "__STORYBOOK_ROUTER__",
|
|
2348
|
-
"storybook/internal/types": "__STORYBOOK_TYPES__"
|
|
2349
|
-
// @deprecated TODO: delete in 9.1
|
|
2350
|
-
"storybook/internal/manager-api": "__STORYBOOK_API__",
|
|
2351
|
-
"storybook/internal/theming": "__STORYBOOK_THEMING__",
|
|
2352
|
-
"storybook/internal/theming/create": "__STORYBOOK_THEMING_CREATE__"
|
|
2219
|
+
"storybook/internal/types": "__STORYBOOK_TYPES__"
|
|
2353
2220
|
};
|
|
2354
2221
|
var globalPackages = Object.keys(globalsNameReferenceMap);
|
|
2355
2222
|
|
|
@@ -2501,6 +2368,9 @@ var buildFrameworkGlobalsFromOptions = /* @__PURE__ */ __name(async (options) =>
|
|
|
2501
2368
|
if (framework) {
|
|
2502
2369
|
globals.STORYBOOK_FRAMEWORK = framework;
|
|
2503
2370
|
}
|
|
2371
|
+
if (options.networkAddress) {
|
|
2372
|
+
globals.STORYBOOK_NETWORK_ADDRESS = options.networkAddress;
|
|
2373
|
+
}
|
|
2504
2374
|
return globals;
|
|
2505
2375
|
}, "buildFrameworkGlobalsFromOptions");
|
|
2506
2376
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import CJS_COMPAT_NODE_URL_srln17sp2zh from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_srln17sp2zh from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_srln17sp2zh from "node:module";
|
|
4
|
+
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_srln17sp2zh.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_srln17sp2zh.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_srln17sp2zh.createRequire(import.meta.url);
|
|
8
|
+
|
|
9
|
+
// ------------------------------------------------------------
|
|
10
|
+
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
11
|
+
// ------------------------------------------------------------
|
|
12
|
+
import {
|
|
13
|
+
camelCase
|
|
14
|
+
} from "./chunk-IGWCAXA2.js";
|
|
15
|
+
import "./chunk-ZM2HT2RW.js";
|
|
16
|
+
export {
|
|
17
|
+
camelCase as default
|
|
18
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_srln17sp2zh from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_srln17sp2zh from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_srln17sp2zh from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_srln17sp2zh.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_srln17sp2zh.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_srln17sp2zh.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
__commonJS,
|
|
14
14
|
__name,
|
|
15
15
|
__require
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZM2HT2RW.js";
|
|
17
17
|
|
|
18
18
|
// ../node_modules/totalist/sync/index.js
|
|
19
19
|
var require_sync = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_srln17sp2zh from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_srln17sp2zh from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_srln17sp2zh from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_srln17sp2zh.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_srln17sp2zh.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_srln17sp2zh.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
__commonJS,
|
|
14
14
|
__name,
|
|
15
15
|
__require
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-ZM2HT2RW.js";
|
|
17
17
|
|
|
18
18
|
// ../node_modules/ms/index.js
|
|
19
19
|
var require_ms = __commonJS({
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_srln17sp2zh from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_srln17sp2zh from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_srln17sp2zh from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_srln17sp2zh.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_srln17sp2zh.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_srln17sp2zh.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
join,
|
|
17
17
|
normalize,
|
|
18
18
|
resolve
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-A2DKPKBY.js";
|
|
20
20
|
import {
|
|
21
21
|
__name
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ZM2HT2RW.js";
|
|
23
23
|
|
|
24
24
|
// src/core-server/mocking-utils/resolve.ts
|
|
25
25
|
import { readFileSync as readFileSync2, realpathSync } from "node:fs";
|