storybook 10.2.0-alpha.16 → 10.2.0-alpha.18
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-DQ6DNDHX.js → builder-manager-RC5VXLE2.js} +14 -12
- package/dist/_node-chunks/{camelcase-ILOVTISA.js → camelcase-3YERF6B7.js} +7 -7
- package/dist/_node-chunks/chunk-2H33L3XJ.js +61 -0
- package/dist/_node-chunks/{chunk-47ZRY4XW.js → chunk-2M7TBZBZ.js} +6 -6
- package/dist/_node-chunks/{chunk-TTACLBSG.js → chunk-4HG57EIN.js} +7 -7
- package/dist/_node-chunks/{chunk-CFXIZS6A.js → chunk-4PWGJYBL.js} +7 -7
- package/dist/_node-chunks/{chunk-K6FMM5LS.js → chunk-54FLVGBQ.js} +6 -6
- package/dist/_node-chunks/{chunk-3PMH6BEP.js → chunk-5BYTBW23.js} +6 -6
- package/dist/_node-chunks/{chunk-TDBTCAEB.js → chunk-5QNVOHBZ.js} +125 -73
- package/dist/_node-chunks/{chunk-SWN4HCJE.js → chunk-6TOW3ZMZ.js} +6 -6
- package/dist/_node-chunks/{chunk-FNQ5WLS5.js → chunk-A2364FS2.js} +7 -7
- package/dist/_node-chunks/{chunk-ZN5DGHF3.js → chunk-BWA66NDS.js} +10 -10
- package/dist/_node-chunks/{chunk-RIEIAV32.js → chunk-DIZCVGPK.js} +7 -7
- package/dist/_node-chunks/{chunk-PGYIGHRK.js → chunk-F347QVLI.js} +9 -9
- package/dist/_node-chunks/chunk-GJRLPTXZ.js +144 -0
- package/dist/_node-chunks/{chunk-LOJ73E6E.js → chunk-H4TYBETM.js} +9 -9
- package/dist/_node-chunks/{chunk-IVYTDHSW.js → chunk-HXE2FZ3F.js} +7 -7
- package/dist/_node-chunks/{chunk-KAAWGCHX.js → chunk-IHBEBZVB.js} +12 -12
- package/dist/_node-chunks/chunk-JK62DOZL.js +23 -0
- package/dist/_node-chunks/{chunk-WVXPIXUS.js → chunk-LMYIILVH.js} +7 -7
- package/dist/_node-chunks/{chunk-XWGABQX7.js → chunk-N73BCSUL.js} +6 -6
- package/dist/_node-chunks/{chunk-OKUHCLLJ.js → chunk-OT3P3RDM.js} +9 -9
- package/dist/_node-chunks/{chunk-JXU4P6K3.js → chunk-OZGI27C5.js} +6 -6
- package/dist/_node-chunks/{chunk-6QEWR44T.js → chunk-OZHRGJKY.js} +7 -7
- package/dist/_node-chunks/chunk-Q3WHGQXN.js +18 -0
- package/dist/_node-chunks/{chunk-TLGG6YAX.js → chunk-QNYGS5WG.js} +511 -127
- package/dist/_node-chunks/{chunk-WIOSV6HC.js → chunk-QXDUEJWP.js} +6 -6
- package/dist/_node-chunks/{chunk-M6AUSQA3.js → chunk-USLMTVEL.js} +22 -22
- package/dist/_node-chunks/{chunk-YFUVKP3W.js → chunk-XH6HLMNG.js} +7 -7
- package/dist/_node-chunks/{chunk-XJMJA2L4.js → chunk-ZUTW3EKD.js} +250 -14
- package/dist/_node-chunks/{globby-A35XB3PP.js → globby-IVEL6LAU.js} +9 -9
- package/dist/_node-chunks/{lib-D5I6ETBH.js → lib-IDUN2DHZ.js} +7 -7
- package/dist/_node-chunks/{mdx-N42X6CFJ-DZ4EAFAE.js → mdx-N42X6CFJ-V7NAUWUX.js} +8 -8
- package/dist/_node-chunks/{p-limit-2CRKZRXN.js → p-limit-VA3OYXXM.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/components/index.d.ts +2 -1
- package/dist/components/index.js +55 -60
- package/dist/core-events/index.d.ts +19 -3
- package/dist/core-events/index.js +5 -1
- package/dist/core-server/index.d.ts +69 -2
- package/dist/core-server/index.js +38 -34
- package/dist/core-server/presets/common-override-preset.js +11 -11
- package/dist/core-server/presets/common-preset.js +519 -234
- package/dist/csf/index.d.ts +15 -3
- package/dist/csf/index.js +37 -13
- package/dist/csf-tools/index.d.ts +19 -1
- package/dist/csf-tools/index.js +11 -10
- package/dist/manager/globals-runtime.js +107 -81
- package/dist/manager/runtime.js +829 -167
- package/dist/manager-api/index.d.ts +2 -0
- package/dist/manager-api/index.js +10 -2
- package/dist/mocking-utils/index.js +8 -8
- package/dist/node-logger/index.js +9 -9
- package/dist/preview/runtime.js +33 -6
- package/dist/preview-api/index.d.ts +68 -67
- package/dist/server-errors.js +11 -11
- package/dist/telemetry/index.d.ts +14 -2
- package/dist/telemetry/index.js +23 -22
- package/dist/theming/index.js +16 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +2 -1
- package/dist/_node-chunks/chunk-5E2HAJXY.js +0 -35
- package/dist/_node-chunks/chunk-DGLVYUKY.js +0 -61
- package/dist/_node-chunks/chunk-MSK3YTQT.js +0 -23
- package/dist/_node-chunks/chunk-SPPXK6CQ.js +0 -18
package/dist/bin/dispatcher.js
CHANGED
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
2
|
+
import CJS_COMPAT_NODE_URL_bfa4dw0yocr from 'node:url';
|
|
3
|
+
import CJS_COMPAT_NODE_PATH_bfa4dw0yocr from 'node:path';
|
|
4
|
+
import CJS_COMPAT_NODE_MODULE_bfa4dw0yocr from "node:module";
|
|
5
5
|
|
|
6
|
-
var __filename =
|
|
7
|
-
var __dirname =
|
|
8
|
-
var require =
|
|
6
|
+
var __filename = CJS_COMPAT_NODE_URL_bfa4dw0yocr.fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = CJS_COMPAT_NODE_PATH_bfa4dw0yocr.dirname(__filename);
|
|
8
|
+
var require = CJS_COMPAT_NODE_MODULE_bfa4dw0yocr.createRequire(import.meta.url);
|
|
9
9
|
|
|
10
10
|
// ------------------------------------------------------------
|
|
11
11
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
12
12
|
// ------------------------------------------------------------
|
|
13
13
|
import {
|
|
14
14
|
versions_default
|
|
15
|
-
} from "../_node-chunks/chunk-
|
|
15
|
+
} from "../_node-chunks/chunk-2H33L3XJ.js";
|
|
16
16
|
import {
|
|
17
17
|
resolvePackageDir
|
|
18
|
-
} from "../_node-chunks/chunk-
|
|
18
|
+
} from "../_node-chunks/chunk-DIZCVGPK.js";
|
|
19
19
|
import {
|
|
20
20
|
join
|
|
21
|
-
} from "../_node-chunks/chunk-
|
|
21
|
+
} from "../_node-chunks/chunk-N73BCSUL.js";
|
|
22
22
|
import {
|
|
23
23
|
require_dist
|
|
24
|
-
} from "../_node-chunks/chunk-
|
|
24
|
+
} from "../_node-chunks/chunk-XH6HLMNG.js";
|
|
25
25
|
import {
|
|
26
26
|
__toESM
|
|
27
|
-
} from "../_node-chunks/chunk-
|
|
27
|
+
} from "../_node-chunks/chunk-5BYTBW23.js";
|
|
28
28
|
|
|
29
29
|
// src/bin/dispatcher.ts
|
|
30
30
|
import { pathToFileURL } from "node:url";
|
package/dist/bin/loader.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_bfa4dw0yocr from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_bfa4dw0yocr from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_bfa4dw0yocr from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_bfa4dw0yocr.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_bfa4dw0yocr.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_bfa4dw0yocr.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
|
NODE_TARGET
|
|
14
|
-
} from "../_node-chunks/chunk-
|
|
14
|
+
} from "../_node-chunks/chunk-QXDUEJWP.js";
|
|
15
15
|
import {
|
|
16
16
|
require_dist
|
|
17
|
-
} from "../_node-chunks/chunk-
|
|
17
|
+
} from "../_node-chunks/chunk-XH6HLMNG.js";
|
|
18
18
|
import {
|
|
19
19
|
__toESM
|
|
20
|
-
} from "../_node-chunks/chunk-
|
|
20
|
+
} from "../_node-chunks/chunk-5BYTBW23.js";
|
|
21
21
|
|
|
22
22
|
// src/bin/loader.ts
|
|
23
23
|
var import_ts_dedent = __toESM(require_dist(), 1);
|
package/dist/cli/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_bfa4dw0yocr from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_bfa4dw0yocr from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_bfa4dw0yocr from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_bfa4dw0yocr.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_bfa4dw0yocr.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_bfa4dw0yocr.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -33,24 +33,24 @@ import {
|
|
|
33
33
|
readFileAsJson,
|
|
34
34
|
suggestESLintPlugin,
|
|
35
35
|
writeFileAsJson
|
|
36
|
-
} from "../_node-chunks/chunk-
|
|
36
|
+
} from "../_node-chunks/chunk-IHBEBZVB.js";
|
|
37
37
|
import {
|
|
38
38
|
detectPnp
|
|
39
|
-
} from "../_node-chunks/chunk-
|
|
39
|
+
} from "../_node-chunks/chunk-JK62DOZL.js";
|
|
40
40
|
import {
|
|
41
41
|
Settings,
|
|
42
42
|
_clearGlobalSettings,
|
|
43
43
|
globalSettings
|
|
44
|
-
} from "../_node-chunks/chunk-
|
|
45
|
-
import "../_node-chunks/chunk-
|
|
46
|
-
import "../_node-chunks/chunk-
|
|
47
|
-
import "../_node-chunks/chunk-
|
|
48
|
-
import "../_node-chunks/chunk-
|
|
49
|
-
import "../_node-chunks/chunk-
|
|
50
|
-
import "../_node-chunks/chunk-
|
|
51
|
-
import "../_node-chunks/chunk-
|
|
52
|
-
import "../_node-chunks/chunk-
|
|
53
|
-
import "../_node-chunks/chunk-
|
|
44
|
+
} from "../_node-chunks/chunk-H4TYBETM.js";
|
|
45
|
+
import "../_node-chunks/chunk-OZGI27C5.js";
|
|
46
|
+
import "../_node-chunks/chunk-6TOW3ZMZ.js";
|
|
47
|
+
import "../_node-chunks/chunk-DIZCVGPK.js";
|
|
48
|
+
import "../_node-chunks/chunk-N73BCSUL.js";
|
|
49
|
+
import "../_node-chunks/chunk-XH6HLMNG.js";
|
|
50
|
+
import "../_node-chunks/chunk-F347QVLI.js";
|
|
51
|
+
import "../_node-chunks/chunk-LMYIILVH.js";
|
|
52
|
+
import "../_node-chunks/chunk-A2364FS2.js";
|
|
53
|
+
import "../_node-chunks/chunk-5BYTBW23.js";
|
|
54
54
|
export {
|
|
55
55
|
ANGULAR_JSON_PATH,
|
|
56
56
|
AddonVitestService,
|
package/dist/common/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import CJS_COMPAT_NODE_URL_bfa4dw0yocr from 'node:url';
|
|
2
|
+
import CJS_COMPAT_NODE_PATH_bfa4dw0yocr from 'node:path';
|
|
3
|
+
import CJS_COMPAT_NODE_MODULE_bfa4dw0yocr from "node:module";
|
|
4
4
|
|
|
5
|
-
var __filename =
|
|
6
|
-
var __dirname =
|
|
7
|
-
var require =
|
|
5
|
+
var __filename = CJS_COMPAT_NODE_URL_bfa4dw0yocr.fileURLToPath(import.meta.url);
|
|
6
|
+
var __dirname = CJS_COMPAT_NODE_PATH_bfa4dw0yocr.dirname(__filename);
|
|
7
|
+
var require = CJS_COMPAT_NODE_MODULE_bfa4dw0yocr.createRequire(import.meta.url);
|
|
8
8
|
|
|
9
9
|
// ------------------------------------------------------------
|
|
10
10
|
// end of CJS compatibility banner, injected by Storybook's esbuild configuration
|
|
@@ -102,29 +102,29 @@ import {
|
|
|
102
102
|
validateConfigurationFiles,
|
|
103
103
|
validateFrameworkName,
|
|
104
104
|
wrapValueWithGetAbsolutePathWrapper
|
|
105
|
-
} from "../_node-chunks/chunk-
|
|
105
|
+
} from "../_node-chunks/chunk-USLMTVEL.js";
|
|
106
106
|
import {
|
|
107
107
|
versions_default
|
|
108
|
-
} from "../_node-chunks/chunk-
|
|
109
|
-
import "../_node-chunks/chunk-
|
|
110
|
-
import "../_node-chunks/chunk-
|
|
111
|
-
import "../_node-chunks/chunk-
|
|
108
|
+
} from "../_node-chunks/chunk-2H33L3XJ.js";
|
|
109
|
+
import "../_node-chunks/chunk-4HG57EIN.js";
|
|
110
|
+
import "../_node-chunks/chunk-OT3P3RDM.js";
|
|
111
|
+
import "../_node-chunks/chunk-OZGI27C5.js";
|
|
112
112
|
import {
|
|
113
113
|
groupBy,
|
|
114
114
|
invariant
|
|
115
|
-
} from "../_node-chunks/chunk-
|
|
115
|
+
} from "../_node-chunks/chunk-6TOW3ZMZ.js";
|
|
116
116
|
import {
|
|
117
117
|
importMetaResolve,
|
|
118
118
|
importModule,
|
|
119
119
|
resolvePackageDir,
|
|
120
120
|
safeResolveModule
|
|
121
|
-
} from "../_node-chunks/chunk-
|
|
122
|
-
import "../_node-chunks/chunk-
|
|
123
|
-
import "../_node-chunks/chunk-
|
|
124
|
-
import "../_node-chunks/chunk-
|
|
125
|
-
import "../_node-chunks/chunk-
|
|
126
|
-
import "../_node-chunks/chunk-
|
|
127
|
-
import "../_node-chunks/chunk-
|
|
121
|
+
} from "../_node-chunks/chunk-DIZCVGPK.js";
|
|
122
|
+
import "../_node-chunks/chunk-N73BCSUL.js";
|
|
123
|
+
import "../_node-chunks/chunk-2M7TBZBZ.js";
|
|
124
|
+
import "../_node-chunks/chunk-OZHRGJKY.js";
|
|
125
|
+
import "../_node-chunks/chunk-XH6HLMNG.js";
|
|
126
|
+
import "../_node-chunks/chunk-A2364FS2.js";
|
|
127
|
+
import "../_node-chunks/chunk-5BYTBW23.js";
|
|
128
128
|
export {
|
|
129
129
|
DEFAULT_FILES_PATTERN,
|
|
130
130
|
FileSystemCache,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import React__default, { ComponentProps, AnchorHTMLAttributes, MouseEvent as MouseEvent$1, ReactNode, ReactElement, SyntheticEvent, HTMLAttributes, Component, RefObject,
|
|
2
|
+
import React__default, { ComponentProps, AnchorHTMLAttributes, MouseEvent as MouseEvent$1, ReactNode, ReactElement, SyntheticEvent, DOMAttributes, HTMLAttributes, Component, RefObject, FC, PropsWithChildren, ForwardRefExoticComponent, ButtonHTMLAttributes, RefAttributes, ElementType } from 'react';
|
|
3
3
|
import { API_KeyCollection } from 'storybook/manager-api';
|
|
4
4
|
import { color, CSSObject, FunctionInterpolation } from 'storybook/theming';
|
|
5
5
|
import { DecoratorFunction } from 'storybook/internal/csf';
|
|
@@ -455,6 +455,7 @@ declare const CardContent: StyledComponent<{
|
|
|
455
455
|
interface CardProps extends ComponentProps<typeof CardContent> {
|
|
456
456
|
outlineAnimation?: 'none' | 'rainbow' | 'spin';
|
|
457
457
|
outlineColor?: keyof typeof color;
|
|
458
|
+
outlineAttrs?: DOMAttributes<HTMLDivElement>;
|
|
458
459
|
}
|
|
459
460
|
declare const Card: React__default.ForwardRefExoticComponent<Omit<CardProps, "ref"> & React__default.RefAttributes<HTMLDivElement>> & {
|
|
460
461
|
Content: StyledComponent<{
|
package/dist/components/index.js
CHANGED
|
@@ -1160,39 +1160,26 @@ import $HgANd$react from "react";
|
|
|
1160
1160
|
var $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document < "u" ? $HgANd$react.useLayoutEffect : () => {
|
|
1161
1161
|
};
|
|
1162
1162
|
|
|
1163
|
-
// ../../node_modules/@react-aria/utils/dist/useEffectEvent.mjs
|
|
1164
|
-
import $lmaYr$react, { useRef as $lmaYr$useRef, useCallback as $lmaYr$useCallback } from "react";
|
|
1165
|
-
var $8ae05eaa5c114e9c$var$_React_useInsertionEffect, $8ae05eaa5c114e9c$var$useEarlyEffect = ($8ae05eaa5c114e9c$var$_React_useInsertionEffect = $lmaYr$react.useInsertionEffect) !== null && $8ae05eaa5c114e9c$var$_React_useInsertionEffect !== void 0 ? $8ae05eaa5c114e9c$var$_React_useInsertionEffect : $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c;
|
|
1166
|
-
function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
|
|
1167
|
-
let ref = $lmaYr$useRef(null);
|
|
1168
|
-
return $8ae05eaa5c114e9c$var$useEarlyEffect(() => {
|
|
1169
|
-
ref.current = fn;
|
|
1170
|
-
}, [
|
|
1171
|
-
fn
|
|
1172
|
-
]), $lmaYr$useCallback((...args) => {
|
|
1173
|
-
let f = ref.current;
|
|
1174
|
-
return f?.(...args);
|
|
1175
|
-
}, []);
|
|
1176
|
-
}
|
|
1177
|
-
|
|
1178
1163
|
// ../../node_modules/@react-aria/utils/dist/useValueEffect.mjs
|
|
1179
|
-
import { useState as $fCAlL$useState, useRef as $fCAlL$useRef } from "react";
|
|
1164
|
+
import { useState as $fCAlL$useState, useRef as $fCAlL$useRef, useCallback as $fCAlL$useCallback } from "react";
|
|
1180
1165
|
function $1dbecbe27a04f9af$export$14d238f342723f25(defaultValue) {
|
|
1181
|
-
let [value, setValue] = $fCAlL$useState(defaultValue), effect = $fCAlL$useRef(null), nextRef = $
|
|
1166
|
+
let [value, setValue] = $fCAlL$useState(defaultValue), currValue = $fCAlL$useRef(value), effect = $fCAlL$useRef(null), nextRef = $fCAlL$useRef(() => {
|
|
1182
1167
|
if (!effect.current) return;
|
|
1183
1168
|
let newValue = effect.current.next();
|
|
1184
1169
|
if (newValue.done) {
|
|
1185
1170
|
effect.current = null;
|
|
1186
1171
|
return;
|
|
1187
1172
|
}
|
|
1188
|
-
|
|
1173
|
+
currValue.current === newValue.value ? nextRef.current() : setValue(newValue.value);
|
|
1189
1174
|
});
|
|
1190
1175
|
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
1191
|
-
effect.current && nextRef();
|
|
1192
|
-
});
|
|
1193
|
-
let queue = $8ae05eaa5c114e9c$export$7f54fc3180508a52((fn) => {
|
|
1194
|
-
effect.current = fn(value), nextRef();
|
|
1176
|
+
currValue.current = value, effect.current && nextRef.current();
|
|
1195
1177
|
});
|
|
1178
|
+
let queue = $fCAlL$useCallback((fn) => {
|
|
1179
|
+
effect.current = fn(currValue.current), nextRef.current();
|
|
1180
|
+
}, [
|
|
1181
|
+
nextRef
|
|
1182
|
+
]);
|
|
1196
1183
|
return [
|
|
1197
1184
|
value,
|
|
1198
1185
|
queue
|
|
@@ -1586,7 +1573,7 @@ var $65484d02dcb7eb3e$var$DOMPropNames = /* @__PURE__ */ new Set([
|
|
|
1586
1573
|
]), $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
|
|
1587
1574
|
function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
|
|
1588
1575
|
let { labelable, isLink: isLink2, global: global2, events = global2, propNames } = opts, filteredProps = {};
|
|
1589
|
-
for (let prop in props) Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || isLink2 && $65484d02dcb7eb3e$var$linkPropNames.has(prop) || global2 && $65484d02dcb7eb3e$var$globalAttrs.has(prop) || events && $65484d02dcb7eb3e$var$globalEvents.has(prop) || prop.endsWith("Capture") && $65484d02dcb7eb3e$var$globalEvents.has(prop.slice(0, -7)) || propNames?.has(prop) || $65484d02dcb7eb3e$var$propRe.test(prop)) && (filteredProps[prop] = props[prop]);
|
|
1576
|
+
for (let prop in props) Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || isLink2 && $65484d02dcb7eb3e$var$linkPropNames.has(prop) || global2 && $65484d02dcb7eb3e$var$globalAttrs.has(prop) || events && ($65484d02dcb7eb3e$var$globalEvents.has(prop) || prop.endsWith("Capture") && $65484d02dcb7eb3e$var$globalEvents.has(prop.slice(0, -7))) || propNames?.has(prop) || $65484d02dcb7eb3e$var$propRe.test(prop)) && (filteredProps[prop] = props[prop]);
|
|
1590
1577
|
return filteredProps;
|
|
1591
1578
|
}
|
|
1592
1579
|
|
|
@@ -1703,6 +1690,7 @@ function $ea8dcbcb9ea1b556$export$95185d699e05d4d7(target, modifiers, setOpening
|
|
|
1703
1690
|
ctrlKey,
|
|
1704
1691
|
altKey,
|
|
1705
1692
|
shiftKey,
|
|
1693
|
+
detail: 1,
|
|
1706
1694
|
bubbles: !0,
|
|
1707
1695
|
cancelable: !0
|
|
1708
1696
|
});
|
|
@@ -1850,6 +1838,21 @@ function $df56164dff5785e2$export$4338b53315abf666(ref) {
|
|
|
1850
1838
|
]);
|
|
1851
1839
|
}
|
|
1852
1840
|
|
|
1841
|
+
// ../../node_modules/@react-aria/utils/dist/useEffectEvent.mjs
|
|
1842
|
+
import $lmaYr$react, { useRef as $lmaYr$useRef, useCallback as $lmaYr$useCallback } from "react";
|
|
1843
|
+
var $8ae05eaa5c114e9c$var$_React_useInsertionEffect, $8ae05eaa5c114e9c$var$useEarlyEffect = ($8ae05eaa5c114e9c$var$_React_useInsertionEffect = $lmaYr$react.useInsertionEffect) !== null && $8ae05eaa5c114e9c$var$_React_useInsertionEffect !== void 0 ? $8ae05eaa5c114e9c$var$_React_useInsertionEffect : $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c;
|
|
1844
|
+
function $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {
|
|
1845
|
+
let ref = $lmaYr$useRef(null);
|
|
1846
|
+
return $8ae05eaa5c114e9c$var$useEarlyEffect(() => {
|
|
1847
|
+
ref.current = fn;
|
|
1848
|
+
}, [
|
|
1849
|
+
fn
|
|
1850
|
+
]), $lmaYr$useCallback((...args) => {
|
|
1851
|
+
let f = ref.current;
|
|
1852
|
+
return f?.(...args);
|
|
1853
|
+
}, []);
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1853
1856
|
// ../../node_modules/@react-aria/utils/dist/useUpdateEffect.mjs
|
|
1854
1857
|
import { useRef as $9vW05$useRef, useEffect as $9vW05$useEffect } from "react";
|
|
1855
1858
|
|
|
@@ -1870,13 +1873,13 @@ function $9daab02d461809db$var$hasResizeObserver() {
|
|
|
1870
1873
|
return typeof window.ResizeObserver < "u";
|
|
1871
1874
|
}
|
|
1872
1875
|
function $9daab02d461809db$export$683480f191c0e3ea(options) {
|
|
1873
|
-
let { ref, box, onResize } = options;
|
|
1876
|
+
let { ref, box, onResize } = options, onResizeEvent = $8ae05eaa5c114e9c$export$7f54fc3180508a52(onResize);
|
|
1874
1877
|
$Vsl8o$useEffect(() => {
|
|
1875
1878
|
let element = ref?.current;
|
|
1876
1879
|
if (element)
|
|
1877
1880
|
if ($9daab02d461809db$var$hasResizeObserver()) {
|
|
1878
1881
|
let resizeObserverInstance = new window.ResizeObserver((entries) => {
|
|
1879
|
-
entries.length &&
|
|
1882
|
+
entries.length && onResizeEvent();
|
|
1880
1883
|
});
|
|
1881
1884
|
return resizeObserverInstance.observe(element, {
|
|
1882
1885
|
box
|
|
@@ -1884,11 +1887,10 @@ function $9daab02d461809db$export$683480f191c0e3ea(options) {
|
|
|
1884
1887
|
element && resizeObserverInstance.unobserve(element);
|
|
1885
1888
|
};
|
|
1886
1889
|
} else
|
|
1887
|
-
return window.addEventListener("resize",
|
|
1888
|
-
window.removeEventListener("resize",
|
|
1890
|
+
return window.addEventListener("resize", onResizeEvent, !1), () => {
|
|
1891
|
+
window.removeEventListener("resize", onResizeEvent, !1);
|
|
1889
1892
|
};
|
|
1890
1893
|
}, [
|
|
1891
|
-
onResize,
|
|
1892
1894
|
ref,
|
|
1893
1895
|
box
|
|
1894
1896
|
]);
|
|
@@ -1992,22 +1994,14 @@ function $e9faafb641e167db$export$90fc3a17d93f704c(ref, event, handler, options)
|
|
|
1992
1994
|
ref,
|
|
1993
1995
|
event,
|
|
1994
1996
|
options,
|
|
1995
|
-
isDisabled
|
|
1996
|
-
handleEvent
|
|
1997
|
+
isDisabled
|
|
1997
1998
|
]);
|
|
1998
1999
|
}
|
|
1999
2000
|
|
|
2000
2001
|
// ../../node_modules/@react-aria/utils/dist/scrollIntoView.mjs
|
|
2001
2002
|
function $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollView, element) {
|
|
2002
|
-
let offsetX = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, "left"), offsetY = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, "top"), width = element.offsetWidth, height = element.offsetHeight, x = scrollView.scrollLeft, y = scrollView.scrollTop, { borderTopWidth, borderLeftWidth, scrollPaddingTop, scrollPaddingRight, scrollPaddingBottom, scrollPaddingLeft } = getComputedStyle(scrollView),
|
|
2003
|
-
|
|
2004
|
-
scrollView.scrollLeft = x, scrollView.scrollTop = y;
|
|
2005
|
-
return;
|
|
2006
|
-
}
|
|
2007
|
-
scrollView.scrollTo({
|
|
2008
|
-
left: x,
|
|
2009
|
-
top: y
|
|
2010
|
-
});
|
|
2003
|
+
let offsetX = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, "left"), offsetY = $2f04cbc44ee30ce0$var$relativeOffset(scrollView, element, "top"), width = element.offsetWidth, height = element.offsetHeight, x = scrollView.scrollLeft, y = scrollView.scrollTop, { borderTopWidth, borderLeftWidth, scrollPaddingTop, scrollPaddingRight, scrollPaddingBottom, scrollPaddingLeft } = getComputedStyle(scrollView), borderAdjustedX = x + parseInt(borderLeftWidth, 10), borderAdjustedY = y + parseInt(borderTopWidth, 10), maxX = borderAdjustedX + scrollView.clientWidth, maxY = borderAdjustedY + scrollView.clientHeight, scrollPaddingTopNumber = parseInt(scrollPaddingTop, 10) || 0, scrollPaddingBottomNumber = parseInt(scrollPaddingBottom, 10) || 0, scrollPaddingRightNumber = parseInt(scrollPaddingRight, 10) || 0, scrollPaddingLeftNumber = parseInt(scrollPaddingLeft, 10) || 0;
|
|
2004
|
+
offsetX <= x + scrollPaddingLeftNumber ? x = offsetX - parseInt(borderLeftWidth, 10) - scrollPaddingLeftNumber : offsetX + width > maxX - scrollPaddingRightNumber && (x += offsetX + width - maxX + scrollPaddingRightNumber), offsetY <= borderAdjustedY + scrollPaddingTopNumber ? y = offsetY - parseInt(borderTopWidth, 10) - scrollPaddingTopNumber : offsetY + height > maxY - scrollPaddingBottomNumber && (y += offsetY + height - maxY + scrollPaddingBottomNumber), scrollView.scrollLeft = x, scrollView.scrollTop = y;
|
|
2011
2005
|
}
|
|
2012
2006
|
function $2f04cbc44ee30ce0$var$relativeOffset(ancestor, child, axis) {
|
|
2013
2007
|
let prop = axis === "left" ? "offsetLeft" : "offsetTop", sum = 0;
|
|
@@ -2022,8 +2016,12 @@ function $2f04cbc44ee30ce0$var$relativeOffset(ancestor, child, axis) {
|
|
|
2022
2016
|
}
|
|
2023
2017
|
function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {
|
|
2024
2018
|
if (targetElement && document.contains(targetElement)) {
|
|
2025
|
-
let root = document.scrollingElement || document.documentElement;
|
|
2026
|
-
if (
|
|
2019
|
+
let root = document.scrollingElement || document.documentElement, isScrollPrevented = window.getComputedStyle(root).overflow === "hidden";
|
|
2020
|
+
if (isScrollPrevented) {
|
|
2021
|
+
let scrollParents = $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(targetElement);
|
|
2022
|
+
isScrollPrevented || scrollParents.push(root);
|
|
2023
|
+
for (let scrollParent of scrollParents) $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollParent, targetElement);
|
|
2024
|
+
} else {
|
|
2027
2025
|
var _targetElement_scrollIntoView;
|
|
2028
2026
|
let { left: originalLeft, top: originalTop } = targetElement.getBoundingClientRect();
|
|
2029
2027
|
targetElement == null || (_targetElement_scrollIntoView = targetElement.scrollIntoView) === null || _targetElement_scrollIntoView === void 0 || _targetElement_scrollIntoView.call(targetElement, {
|
|
@@ -2039,9 +2037,6 @@ function $2f04cbc44ee30ce0$export$c826860796309d1b(targetElement, opts) {
|
|
|
2039
2037
|
block: "nearest"
|
|
2040
2038
|
});
|
|
2041
2039
|
}
|
|
2042
|
-
} else {
|
|
2043
|
-
let scrollParents = $a40c673dc9f6d9c7$export$94ed1c92c7beeb22(targetElement);
|
|
2044
|
-
for (let scrollParent of scrollParents) $2f04cbc44ee30ce0$export$53a0910f038337bd(scrollParent, targetElement);
|
|
2045
2040
|
}
|
|
2046
2041
|
}
|
|
2047
2042
|
}
|
|
@@ -2191,26 +2186,25 @@ function $b4b717babfbb907b$var$isInert(element) {
|
|
|
2191
2186
|
}
|
|
2192
2187
|
|
|
2193
2188
|
// ../../node_modules/@react-stately/utils/dist/useControlledState.mjs
|
|
2194
|
-
import { useState as $3whtM$useState, useRef as $3whtM$useRef, useEffect as $3whtM$useEffect, useCallback as $3whtM$useCallback } from "react";
|
|
2189
|
+
import $3whtM$react, { useState as $3whtM$useState, useRef as $3whtM$useRef, useEffect as $3whtM$useEffect, useReducer as $3whtM$useReducer, useCallback as $3whtM$useCallback } from "react";
|
|
2190
|
+
var $458b0a5536c1a7cf$var$_React_useInsertionEffect, $458b0a5536c1a7cf$var$useEarlyEffect = typeof document < "u" ? ($458b0a5536c1a7cf$var$_React_useInsertionEffect = $3whtM$react.useInsertionEffect) !== null && $458b0a5536c1a7cf$var$_React_useInsertionEffect !== void 0 ? $458b0a5536c1a7cf$var$_React_useInsertionEffect : $3whtM$react.useLayoutEffect : () => {
|
|
2191
|
+
};
|
|
2195
2192
|
function $458b0a5536c1a7cf$export$40bfa8c7b0832715(value, defaultValue, onChange) {
|
|
2196
|
-
let [stateValue, setStateValue] = $3whtM$useState(value || defaultValue), isControlledRef = $3whtM$useRef(value !== void 0), isControlled = value !== void 0;
|
|
2193
|
+
let [stateValue, setStateValue] = $3whtM$useState(value || defaultValue), valueRef = $3whtM$useRef(stateValue), isControlledRef = $3whtM$useRef(value !== void 0), isControlled = value !== void 0;
|
|
2197
2194
|
$3whtM$useEffect(() => {
|
|
2198
2195
|
let wasControlled = isControlledRef.current;
|
|
2199
2196
|
wasControlled !== isControlled && process.env.NODE_ENV !== "production" && console.warn(`WARN: A component changed from ${wasControlled ? "controlled" : "uncontrolled"} to ${isControlled ? "controlled" : "uncontrolled"}.`), isControlledRef.current = isControlled;
|
|
2200
2197
|
}, [
|
|
2201
2198
|
isControlled
|
|
2202
2199
|
]);
|
|
2203
|
-
let currentValue = isControlled ? value : stateValue
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
})) : (isControlled || setStateValue(value2), onChangeCaller(value2, ...args));
|
|
2200
|
+
let currentValue = isControlled ? value : stateValue;
|
|
2201
|
+
$458b0a5536c1a7cf$var$useEarlyEffect(() => {
|
|
2202
|
+
valueRef.current = currentValue;
|
|
2203
|
+
});
|
|
2204
|
+
let [, forceUpdate] = $3whtM$useReducer(() => ({}), {}), setValue = $3whtM$useCallback((value2, ...args) => {
|
|
2205
|
+
let newValue = typeof value2 == "function" ? value2(valueRef.current) : value2;
|
|
2206
|
+
Object.is(valueRef.current, newValue) || (valueRef.current = newValue, setStateValue(newValue), forceUpdate(), onChange?.(newValue, ...args));
|
|
2211
2207
|
}, [
|
|
2212
|
-
isControlled,
|
|
2213
|
-
currentValue,
|
|
2214
2208
|
onChange
|
|
2215
2209
|
]);
|
|
2216
2210
|
return [
|
|
@@ -9119,8 +9113,8 @@ var fadeInOut = keyframes({
|
|
|
9119
9113
|
}
|
|
9120
9114
|
}
|
|
9121
9115
|
})), Card = Object.assign(
|
|
9122
|
-
forwardRef7(function({ outlineAnimation = "none", outlineColor, ...props }, ref) {
|
|
9123
|
-
return React18.createElement(CardOutline, { animation: outlineAnimation, color: outlineColor, ref }, React18.createElement(CardContent, { ...props }));
|
|
9116
|
+
forwardRef7(function({ outlineAnimation = "none", outlineColor, outlineAttrs = {}, ...props }, ref) {
|
|
9117
|
+
return React18.createElement(CardOutline, { animation: outlineAnimation, color: outlineColor, ref, ...outlineAttrs }, React18.createElement(CardContent, { ...props }));
|
|
9124
9118
|
}),
|
|
9125
9119
|
{
|
|
9126
9120
|
Content: CardContent,
|
|
@@ -9955,8 +9949,9 @@ var sizes = (({ size }) => {
|
|
|
9955
9949
|
outline: "1px solid highlight"
|
|
9956
9950
|
}
|
|
9957
9951
|
},
|
|
9958
|
-
|
|
9959
|
-
background: theme.base === "light" ? theme.color.lighter : "transparent"
|
|
9952
|
+
'&[disabled], &[aria-disabled="true"]': {
|
|
9953
|
+
background: theme.base === "light" ? theme.color.lighter : "transparent",
|
|
9954
|
+
cursor: "not-allowed"
|
|
9960
9955
|
},
|
|
9961
9956
|
"&:-webkit-autofill": { WebkitBoxShadow: `0 0 0 3em ${theme.color.lightest} inset` },
|
|
9962
9957
|
"&::placeholder": {
|
|
@@ -40,12 +40,16 @@ interface SBBaseType {
|
|
|
40
40
|
raw?: string;
|
|
41
41
|
}
|
|
42
42
|
type SBScalarType = SBBaseType & {
|
|
43
|
-
name: 'boolean' | 'string' | 'number' | 'function' | 'symbol';
|
|
43
|
+
name: 'boolean' | 'string' | 'number' | 'function' | 'symbol' | 'date';
|
|
44
44
|
};
|
|
45
45
|
type SBArrayType = SBBaseType & {
|
|
46
46
|
name: 'array';
|
|
47
47
|
value: SBType;
|
|
48
48
|
};
|
|
49
|
+
type SBNodeType = SBBaseType & {
|
|
50
|
+
name: 'node';
|
|
51
|
+
renderer: string;
|
|
52
|
+
};
|
|
49
53
|
type SBObjectType = SBBaseType & {
|
|
50
54
|
name: 'object';
|
|
51
55
|
value: Record<string, SBType>;
|
|
@@ -62,11 +66,19 @@ type SBUnionType = SBBaseType & {
|
|
|
62
66
|
name: 'union';
|
|
63
67
|
value: SBType[];
|
|
64
68
|
};
|
|
69
|
+
type SBLiteralType = SBBaseType & {
|
|
70
|
+
name: 'literal';
|
|
71
|
+
value: unknown;
|
|
72
|
+
};
|
|
73
|
+
type SBTupleType = SBBaseType & {
|
|
74
|
+
name: 'tuple';
|
|
75
|
+
value: SBType[];
|
|
76
|
+
};
|
|
65
77
|
type SBOtherType = SBBaseType & {
|
|
66
78
|
name: 'other';
|
|
67
79
|
value: string;
|
|
68
80
|
};
|
|
69
|
-
type SBType = SBScalarType | SBEnumType | SBArrayType | SBObjectType | SBIntersectionType | SBUnionType | SBOtherType;
|
|
81
|
+
type SBType = SBScalarType | SBEnumType | SBArrayType | SBNodeType | SBObjectType | SBIntersectionType | SBUnionType | SBLiteralType | SBTupleType | SBOtherType;
|
|
70
82
|
|
|
71
83
|
type ControlType = 'object' | 'boolean' | 'check' | 'inline-check' | 'radio' | 'inline-radio' | 'select' | 'multi-select' | 'number' | 'range' | 'file' | 'color' | 'date' | 'text';
|
|
72
84
|
type ConditionalTest = {
|
|
@@ -300,6 +312,8 @@ declare enum events {
|
|
|
300
312
|
ARGTYPES_INFO_RESPONSE = "argtypesInfoResponse",
|
|
301
313
|
CREATE_NEW_STORYFILE_REQUEST = "createNewStoryfileRequest",
|
|
302
314
|
CREATE_NEW_STORYFILE_RESPONSE = "createNewStoryfileResponse",
|
|
315
|
+
GHOST_STORIES_REQUEST = "ghostStoriesRequest",
|
|
316
|
+
GHOST_STORIES_RESPONSE = "ghostStoriesResponse",
|
|
303
317
|
OPEN_IN_EDITOR_REQUEST = "openInEditorRequest",
|
|
304
318
|
OPEN_IN_EDITOR_RESPONSE = "openInEditorResponse",
|
|
305
319
|
MANAGER_INERT_ATTRIBUTE_CHANGED = "managerInertAttributeChanged"
|
|
@@ -363,8 +377,10 @@ declare const SAVE_STORY_REQUEST: events;
|
|
|
363
377
|
declare const SAVE_STORY_RESPONSE: events;
|
|
364
378
|
declare const ARGTYPES_INFO_REQUEST: events;
|
|
365
379
|
declare const ARGTYPES_INFO_RESPONSE: events;
|
|
380
|
+
declare const GHOST_STORIES_REQUEST: events;
|
|
381
|
+
declare const GHOST_STORIES_RESPONSE: events;
|
|
366
382
|
declare const OPEN_IN_EDITOR_REQUEST: events;
|
|
367
383
|
declare const OPEN_IN_EDITOR_RESPONSE: events;
|
|
368
384
|
declare const MANAGER_INERT_ATTRIBUTE_CHANGED: events;
|
|
369
385
|
|
|
370
|
-
export { ARGTYPES_INFO_REQUEST, ARGTYPES_INFO_RESPONSE, type ArgTypesRequestPayload, type ArgTypesResponsePayload, CHANNEL_CREATED, CHANNEL_WS_DISCONNECT, CONFIG_ERROR, CREATE_NEW_STORYFILE_REQUEST, CREATE_NEW_STORYFILE_RESPONSE, CURRENT_STORY_WAS_SET, type CreateNewStoryErrorPayload, type CreateNewStoryRequestPayload, type CreateNewStoryResponsePayload, DOCS_PREPARED, DOCS_RENDERED, FILE_COMPONENT_SEARCH_REQUEST, FILE_COMPONENT_SEARCH_RESPONSE, FORCE_REMOUNT, FORCE_RE_RENDER, type FileComponentSearchRequestPayload, type FileComponentSearchResponsePayload, GLOBALS_UPDATED, MANAGER_INERT_ATTRIBUTE_CHANGED, NAVIGATE_URL, OPEN_IN_EDITOR_REQUEST, OPEN_IN_EDITOR_RESPONSE, type OpenInEditorRequestPayload, type OpenInEditorResponsePayload, PLAY_FUNCTION_THREW_EXCEPTION, PRELOAD_ENTRIES, PREVIEW_BUILDER_PROGRESS, PREVIEW_INITIALIZED, PREVIEW_KEYDOWN, REGISTER_SUBSCRIPTION, REQUEST_WHATS_NEW_DATA, RESET_STORY_ARGS, RESULT_WHATS_NEW_DATA, type RequestData, type ResponseData, SAVE_STORY_REQUEST, SAVE_STORY_RESPONSE, SELECT_STORY, SET_CONFIG, SET_CURRENT_STORY, SET_FILTER, SET_GLOBALS, SET_INDEX, SET_STORIES, SET_WHATS_NEW_CACHE, SHARED_STATE_CHANGED, SHARED_STATE_SET, STORIES_COLLAPSE_ALL, STORIES_EXPAND_ALL, STORY_ARGS_UPDATED, STORY_CHANGED, STORY_ERRORED, STORY_FINISHED, STORY_HOT_UPDATED, STORY_INDEX_INVALIDATED, STORY_MISSING, STORY_PREPARED, STORY_RENDERED, STORY_RENDER_PHASE_CHANGED, STORY_SPECIFIED, STORY_THREW_EXCEPTION, STORY_UNCHANGED, type SaveStoryRequestPayload, type SaveStoryResponsePayload, type StoryFinishedPayload, TELEMETRY_ERROR, TOGGLE_WHATS_NEW_NOTIFICATIONS, UNHANDLED_ERRORS_WHILE_PLAYING, UPDATE_GLOBALS, UPDATE_QUERY_PARAMS, UPDATE_STORY_ARGS, type WhatsNewCache, type WhatsNewData, events as default };
|
|
386
|
+
export { ARGTYPES_INFO_REQUEST, ARGTYPES_INFO_RESPONSE, type ArgTypesRequestPayload, type ArgTypesResponsePayload, CHANNEL_CREATED, CHANNEL_WS_DISCONNECT, CONFIG_ERROR, CREATE_NEW_STORYFILE_REQUEST, CREATE_NEW_STORYFILE_RESPONSE, CURRENT_STORY_WAS_SET, type CreateNewStoryErrorPayload, type CreateNewStoryRequestPayload, type CreateNewStoryResponsePayload, DOCS_PREPARED, DOCS_RENDERED, FILE_COMPONENT_SEARCH_REQUEST, FILE_COMPONENT_SEARCH_RESPONSE, FORCE_REMOUNT, FORCE_RE_RENDER, type FileComponentSearchRequestPayload, type FileComponentSearchResponsePayload, GHOST_STORIES_REQUEST, GHOST_STORIES_RESPONSE, GLOBALS_UPDATED, MANAGER_INERT_ATTRIBUTE_CHANGED, NAVIGATE_URL, OPEN_IN_EDITOR_REQUEST, OPEN_IN_EDITOR_RESPONSE, type OpenInEditorRequestPayload, type OpenInEditorResponsePayload, PLAY_FUNCTION_THREW_EXCEPTION, PRELOAD_ENTRIES, PREVIEW_BUILDER_PROGRESS, PREVIEW_INITIALIZED, PREVIEW_KEYDOWN, REGISTER_SUBSCRIPTION, REQUEST_WHATS_NEW_DATA, RESET_STORY_ARGS, RESULT_WHATS_NEW_DATA, type RequestData, type ResponseData, SAVE_STORY_REQUEST, SAVE_STORY_RESPONSE, SELECT_STORY, SET_CONFIG, SET_CURRENT_STORY, SET_FILTER, SET_GLOBALS, SET_INDEX, SET_STORIES, SET_WHATS_NEW_CACHE, SHARED_STATE_CHANGED, SHARED_STATE_SET, STORIES_COLLAPSE_ALL, STORIES_EXPAND_ALL, STORY_ARGS_UPDATED, STORY_CHANGED, STORY_ERRORED, STORY_FINISHED, STORY_HOT_UPDATED, STORY_INDEX_INVALIDATED, STORY_MISSING, STORY_PREPARED, STORY_RENDERED, STORY_RENDER_PHASE_CHANGED, STORY_SPECIFIED, STORY_THREW_EXCEPTION, STORY_UNCHANGED, type SaveStoryRequestPayload, type SaveStoryResponsePayload, type StoryFinishedPayload, TELEMETRY_ERROR, TOGGLE_WHATS_NEW_NOTIFICATIONS, UNHANDLED_ERRORS_WHILE_PLAYING, UPDATE_GLOBALS, UPDATE_QUERY_PARAMS, UPDATE_STORY_ARGS, type WhatsNewCache, type WhatsNewData, events as default };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../_browser-chunks/chunk-A242L54C.js";
|
|
2
2
|
|
|
3
3
|
// src/core-events/index.ts
|
|
4
|
-
var events = /* @__PURE__ */ ((events2) => (events2.CHANNEL_WS_DISCONNECT = "channelWSDisconnect", events2.CHANNEL_CREATED = "channelCreated", events2.CONFIG_ERROR = "configError", events2.STORY_INDEX_INVALIDATED = "storyIndexInvalidated", events2.STORY_SPECIFIED = "storySpecified", events2.SET_CONFIG = "setConfig", events2.SET_STORIES = "setStories", events2.SET_INDEX = "setIndex", events2.SET_CURRENT_STORY = "setCurrentStory", events2.CURRENT_STORY_WAS_SET = "currentStoryWasSet", events2.FORCE_RE_RENDER = "forceReRender", events2.FORCE_REMOUNT = "forceRemount", events2.PRELOAD_ENTRIES = "preloadStories", events2.STORY_PREPARED = "storyPrepared", events2.DOCS_PREPARED = "docsPrepared", events2.STORY_CHANGED = "storyChanged", events2.STORY_UNCHANGED = "storyUnchanged", events2.STORY_RENDERED = "storyRendered", events2.STORY_FINISHED = "storyFinished", events2.STORY_MISSING = "storyMissing", events2.STORY_ERRORED = "storyErrored", events2.STORY_THREW_EXCEPTION = "storyThrewException", events2.STORY_RENDER_PHASE_CHANGED = "storyRenderPhaseChanged", events2.STORY_HOT_UPDATED = "storyHotUpdated", events2.PLAY_FUNCTION_THREW_EXCEPTION = "playFunctionThrewException", events2.UNHANDLED_ERRORS_WHILE_PLAYING = "unhandledErrorsWhilePlaying", events2.UPDATE_STORY_ARGS = "updateStoryArgs", events2.STORY_ARGS_UPDATED = "storyArgsUpdated", events2.RESET_STORY_ARGS = "resetStoryArgs", events2.SET_FILTER = "setFilter", events2.SET_GLOBALS = "setGlobals", events2.UPDATE_GLOBALS = "updateGlobals", events2.GLOBALS_UPDATED = "globalsUpdated", events2.REGISTER_SUBSCRIPTION = "registerSubscription", events2.PREVIEW_INITIALIZED = "previewInitialized", events2.PREVIEW_KEYDOWN = "previewKeydown", events2.PREVIEW_BUILDER_PROGRESS = "preview_builder_progress", events2.SELECT_STORY = "selectStory", events2.STORIES_COLLAPSE_ALL = "storiesCollapseAll", events2.STORIES_EXPAND_ALL = "storiesExpandAll", events2.DOCS_RENDERED = "docsRendered", events2.SHARED_STATE_CHANGED = "sharedStateChanged", events2.SHARED_STATE_SET = "sharedStateSet", events2.NAVIGATE_URL = "navigateUrl", events2.UPDATE_QUERY_PARAMS = "updateQueryParams", events2.REQUEST_WHATS_NEW_DATA = "requestWhatsNewData", events2.RESULT_WHATS_NEW_DATA = "resultWhatsNewData", events2.SET_WHATS_NEW_CACHE = "setWhatsNewCache", events2.TOGGLE_WHATS_NEW_NOTIFICATIONS = "toggleWhatsNewNotifications", events2.TELEMETRY_ERROR = "telemetryError", events2.FILE_COMPONENT_SEARCH_REQUEST = "fileComponentSearchRequest", events2.FILE_COMPONENT_SEARCH_RESPONSE = "fileComponentSearchResponse", events2.SAVE_STORY_REQUEST = "saveStoryRequest", events2.SAVE_STORY_RESPONSE = "saveStoryResponse", events2.ARGTYPES_INFO_REQUEST = "argtypesInfoRequest", events2.ARGTYPES_INFO_RESPONSE = "argtypesInfoResponse", events2.CREATE_NEW_STORYFILE_REQUEST = "createNewStoryfileRequest", events2.CREATE_NEW_STORYFILE_RESPONSE = "createNewStoryfileResponse", events2.OPEN_IN_EDITOR_REQUEST = "openInEditorRequest", events2.OPEN_IN_EDITOR_RESPONSE = "openInEditorResponse", events2.MANAGER_INERT_ATTRIBUTE_CHANGED = "managerInertAttributeChanged", events2))(events || {}), core_events_default = events, {
|
|
4
|
+
var events = /* @__PURE__ */ ((events2) => (events2.CHANNEL_WS_DISCONNECT = "channelWSDisconnect", events2.CHANNEL_CREATED = "channelCreated", events2.CONFIG_ERROR = "configError", events2.STORY_INDEX_INVALIDATED = "storyIndexInvalidated", events2.STORY_SPECIFIED = "storySpecified", events2.SET_CONFIG = "setConfig", events2.SET_STORIES = "setStories", events2.SET_INDEX = "setIndex", events2.SET_CURRENT_STORY = "setCurrentStory", events2.CURRENT_STORY_WAS_SET = "currentStoryWasSet", events2.FORCE_RE_RENDER = "forceReRender", events2.FORCE_REMOUNT = "forceRemount", events2.PRELOAD_ENTRIES = "preloadStories", events2.STORY_PREPARED = "storyPrepared", events2.DOCS_PREPARED = "docsPrepared", events2.STORY_CHANGED = "storyChanged", events2.STORY_UNCHANGED = "storyUnchanged", events2.STORY_RENDERED = "storyRendered", events2.STORY_FINISHED = "storyFinished", events2.STORY_MISSING = "storyMissing", events2.STORY_ERRORED = "storyErrored", events2.STORY_THREW_EXCEPTION = "storyThrewException", events2.STORY_RENDER_PHASE_CHANGED = "storyRenderPhaseChanged", events2.STORY_HOT_UPDATED = "storyHotUpdated", events2.PLAY_FUNCTION_THREW_EXCEPTION = "playFunctionThrewException", events2.UNHANDLED_ERRORS_WHILE_PLAYING = "unhandledErrorsWhilePlaying", events2.UPDATE_STORY_ARGS = "updateStoryArgs", events2.STORY_ARGS_UPDATED = "storyArgsUpdated", events2.RESET_STORY_ARGS = "resetStoryArgs", events2.SET_FILTER = "setFilter", events2.SET_GLOBALS = "setGlobals", events2.UPDATE_GLOBALS = "updateGlobals", events2.GLOBALS_UPDATED = "globalsUpdated", events2.REGISTER_SUBSCRIPTION = "registerSubscription", events2.PREVIEW_INITIALIZED = "previewInitialized", events2.PREVIEW_KEYDOWN = "previewKeydown", events2.PREVIEW_BUILDER_PROGRESS = "preview_builder_progress", events2.SELECT_STORY = "selectStory", events2.STORIES_COLLAPSE_ALL = "storiesCollapseAll", events2.STORIES_EXPAND_ALL = "storiesExpandAll", events2.DOCS_RENDERED = "docsRendered", events2.SHARED_STATE_CHANGED = "sharedStateChanged", events2.SHARED_STATE_SET = "sharedStateSet", events2.NAVIGATE_URL = "navigateUrl", events2.UPDATE_QUERY_PARAMS = "updateQueryParams", events2.REQUEST_WHATS_NEW_DATA = "requestWhatsNewData", events2.RESULT_WHATS_NEW_DATA = "resultWhatsNewData", events2.SET_WHATS_NEW_CACHE = "setWhatsNewCache", events2.TOGGLE_WHATS_NEW_NOTIFICATIONS = "toggleWhatsNewNotifications", events2.TELEMETRY_ERROR = "telemetryError", events2.FILE_COMPONENT_SEARCH_REQUEST = "fileComponentSearchRequest", events2.FILE_COMPONENT_SEARCH_RESPONSE = "fileComponentSearchResponse", events2.SAVE_STORY_REQUEST = "saveStoryRequest", events2.SAVE_STORY_RESPONSE = "saveStoryResponse", events2.ARGTYPES_INFO_REQUEST = "argtypesInfoRequest", events2.ARGTYPES_INFO_RESPONSE = "argtypesInfoResponse", events2.CREATE_NEW_STORYFILE_REQUEST = "createNewStoryfileRequest", events2.CREATE_NEW_STORYFILE_RESPONSE = "createNewStoryfileResponse", events2.GHOST_STORIES_REQUEST = "ghostStoriesRequest", events2.GHOST_STORIES_RESPONSE = "ghostStoriesResponse", events2.OPEN_IN_EDITOR_REQUEST = "openInEditorRequest", events2.OPEN_IN_EDITOR_RESPONSE = "openInEditorResponse", events2.MANAGER_INERT_ATTRIBUTE_CHANGED = "managerInertAttributeChanged", events2))(events || {}), core_events_default = events, {
|
|
5
5
|
CHANNEL_WS_DISCONNECT,
|
|
6
6
|
CHANNEL_CREATED,
|
|
7
7
|
CONFIG_ERROR,
|
|
@@ -60,6 +60,8 @@ var events = /* @__PURE__ */ ((events2) => (events2.CHANNEL_WS_DISCONNECT = "cha
|
|
|
60
60
|
SAVE_STORY_RESPONSE,
|
|
61
61
|
ARGTYPES_INFO_REQUEST,
|
|
62
62
|
ARGTYPES_INFO_RESPONSE,
|
|
63
|
+
GHOST_STORIES_REQUEST,
|
|
64
|
+
GHOST_STORIES_RESPONSE,
|
|
63
65
|
OPEN_IN_EDITOR_REQUEST,
|
|
64
66
|
OPEN_IN_EDITOR_RESPONSE,
|
|
65
67
|
MANAGER_INERT_ATTRIBUTE_CHANGED
|
|
@@ -79,6 +81,8 @@ export {
|
|
|
79
81
|
FILE_COMPONENT_SEARCH_RESPONSE,
|
|
80
82
|
FORCE_REMOUNT,
|
|
81
83
|
FORCE_RE_RENDER,
|
|
84
|
+
GHOST_STORIES_REQUEST,
|
|
85
|
+
GHOST_STORIES_RESPONSE,
|
|
82
86
|
GLOBALS_UPDATED,
|
|
83
87
|
MANAGER_INERT_ATTRIBUTE_CHANGED,
|
|
84
88
|
NAVIGATE_URL,
|
|
@@ -3,8 +3,9 @@ export { getPreviewBodyTemplate, getPreviewHeadTemplate } from 'storybook/intern
|
|
|
3
3
|
import * as storybook_internal_types from 'storybook/internal/types';
|
|
4
4
|
import { CLIOptions, LoadOptions, BuilderOptions, StorybookConfigRaw, IndexInputStats, NormalizedStoriesSpecifier, Path as Path$1, Indexer, DocsOptions, StoryIndexEntry, DocsIndexEntry, IndexEntry, StoryIndex, Options, NormalizedProjectAnnotations, ProjectAnnotations, ComposedStoryFn } from 'storybook/internal/types';
|
|
5
5
|
import { EventType } from 'storybook/internal/telemetry';
|
|
6
|
+
import { CreateNewStoryRequestPayload } from 'storybook/internal/core-events';
|
|
7
|
+
import { SBType, StoryId } from 'storybook/internal/csf';
|
|
6
8
|
import { Channel } from 'storybook/internal/channels';
|
|
7
|
-
import { StoryId } from 'storybook/internal/csf';
|
|
8
9
|
|
|
9
10
|
type BuildStaticStandaloneOptions = CLIOptions & LoadOptions & BuilderOptions & {
|
|
10
11
|
outputDir: string;
|
|
@@ -267,6 +268,67 @@ declare class StoryIndexGenerator {
|
|
|
267
268
|
static storyFileNames(specifierToCache: Map<NormalizedStoriesSpecifier, SpecifierStoriesCache>): string[];
|
|
268
269
|
}
|
|
269
270
|
|
|
271
|
+
interface GenerateStoryResult {
|
|
272
|
+
success: boolean;
|
|
273
|
+
storyId?: string;
|
|
274
|
+
kind?: string;
|
|
275
|
+
storyFilePath?: string;
|
|
276
|
+
exportedStoryName?: string;
|
|
277
|
+
error?: string;
|
|
278
|
+
errorType?: 'STORY_FILE_EXISTS' | 'UNKNOWN';
|
|
279
|
+
}
|
|
280
|
+
interface GenerateStoryOptions {
|
|
281
|
+
/**
|
|
282
|
+
* If true, checks if the file exists and returns an error without writing. If false, writes the
|
|
283
|
+
* file even if it exists (overwrites).
|
|
284
|
+
*
|
|
285
|
+
* @default true
|
|
286
|
+
*/
|
|
287
|
+
checkFileExists?: boolean;
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* Generates and writes a new story file for a component.
|
|
291
|
+
*
|
|
292
|
+
* This function orchestrates the entire story file creation process:
|
|
293
|
+
*
|
|
294
|
+
* 1. Generates the story file path and content based on the component
|
|
295
|
+
* 2. Optionally checks if the file already exists
|
|
296
|
+
* 3. Writes the story file to disk
|
|
297
|
+
* 4. Returns metadata about the created story
|
|
298
|
+
*
|
|
299
|
+
* @example
|
|
300
|
+
*
|
|
301
|
+
* ```ts
|
|
302
|
+
* const result = await generateStoryFile(
|
|
303
|
+
* {
|
|
304
|
+
* componentFilePath: 'src/components/Button.tsx',
|
|
305
|
+
* componentExportName: 'Button',
|
|
306
|
+
* componentIsDefaultExport: true,
|
|
307
|
+
* componentExportCount: 1,
|
|
308
|
+
* },
|
|
309
|
+
* options
|
|
310
|
+
* );
|
|
311
|
+
*
|
|
312
|
+
* if (result.success) {
|
|
313
|
+
* console.log(`Story created at ${result.storyFilePath}`);
|
|
314
|
+
* }
|
|
315
|
+
* ```
|
|
316
|
+
*
|
|
317
|
+
* @param payload - The component information for which to create a story
|
|
318
|
+
* @param options - Storybook options for configuration
|
|
319
|
+
* @param generateOptions - Additional options for story generation behavior
|
|
320
|
+
* @returns A promise that resolves to the result of the story generation
|
|
321
|
+
*/
|
|
322
|
+
declare function generateStoryFile(payload: CreateNewStoryRequestPayload, options: Options, generateOptions?: GenerateStoryOptions): Promise<GenerateStoryResult>;
|
|
323
|
+
|
|
324
|
+
type ComponentArgTypesInfo = {
|
|
325
|
+
required: boolean;
|
|
326
|
+
type: SBType;
|
|
327
|
+
};
|
|
328
|
+
type ComponentArgTypesData = {
|
|
329
|
+
props?: Record<string, ComponentArgTypesInfo>;
|
|
330
|
+
};
|
|
331
|
+
|
|
270
332
|
declare function loadStorybook(options: CLIOptions & LoadOptions & BuilderOptions & {
|
|
271
333
|
storybookVersion?: string;
|
|
272
334
|
previewConfigPath?: string;
|
|
@@ -1344,4 +1406,9 @@ declare const fullTestProviderStore: {
|
|
|
1344
1406
|
declare const getTestProviderStoreById: (testProviderId: TestProviderId) => TestProviderStoreById;
|
|
1345
1407
|
declare const universalTestProviderStore: UniversalStore<TestProviderStateByProviderId, TestProviderStoreEvent>;
|
|
1346
1408
|
|
|
1347
|
-
|
|
1409
|
+
interface PortOptions {
|
|
1410
|
+
exactPort?: boolean;
|
|
1411
|
+
}
|
|
1412
|
+
declare const getServerPort: (port?: number, { exactPort }?: PortOptions) => Promise<number>;
|
|
1413
|
+
|
|
1414
|
+
export { type BuildIndexOptions, type BuildStaticStandaloneOptions, type ComponentArgTypesData, type GenerateStoryOptions, type GenerateStoryResult, StoryIndexGenerator, Tag, analyze as analyzeMdx, build, buildDevStandalone, buildIndex, buildIndexStandalone, buildStaticStandalone, MockUniversalStore as experimental_MockUniversalStore, UniversalStore as experimental_UniversalStore, getStatusStoreByTypeId as experimental_getStatusStore, getTestProviderStoreById as experimental_getTestProviderStore, loadStorybook as experimental_loadStorybook, generateStoryFile, getErrorLevel, getServerPort, fullStatusStore as internal_fullStatusStore, fullTestProviderStore as internal_fullTestProviderStore, universalStatusStore as internal_universalStatusStore, universalTestProviderStore as internal_universalTestProviderStore, isTelemetryEnabled, mapStaticDir, sendTelemetryError, withTelemetry };
|