storybook 9.1.0-alpha.6 → 9.1.0-alpha.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.
Files changed (83) hide show
  1. package/assets/browser/favicon-wrapper.svg +46 -0
  2. package/assets/browser/favicon.svg +1 -1
  3. package/dist/bin/index.cjs +43 -43
  4. package/dist/bin/index.js +43 -43
  5. package/dist/cli/bin/index.cjs +513 -513
  6. package/dist/cli/bin/index.js +535 -535
  7. package/dist/cli/index.cjs +2454 -2453
  8. package/dist/cli/index.d.ts +10 -3
  9. package/dist/cli/index.js +2436 -2435
  10. package/dist/common/index.cjs +64 -61
  11. package/dist/common/index.d.ts +9 -3
  12. package/dist/common/index.js +64 -61
  13. package/dist/components/index.cjs +1459 -1447
  14. package/dist/components/index.d.ts +1 -0
  15. package/dist/components/index.js +407 -394
  16. package/dist/core-server/index.cjs +5833 -5819
  17. package/dist/core-server/index.d.ts +4 -1
  18. package/dist/core-server/index.js +4848 -4835
  19. package/dist/core-server/presets/common-manager.js +3403 -3332
  20. package/dist/core-server/presets/common-preset.cjs +1831 -1837
  21. package/dist/core-server/presets/common-preset.js +1787 -1792
  22. package/dist/csf/index.cjs +2536 -736
  23. package/dist/csf/index.d.ts +250 -9
  24. package/dist/csf/index.js +2558 -749
  25. package/dist/instrumenter/index.cjs +1150 -1099
  26. package/dist/instrumenter/index.d.ts +1 -0
  27. package/dist/instrumenter/index.js +1261 -1214
  28. package/dist/manager/globals-runtime.js +21313 -23957
  29. package/dist/manager/runtime.js +3713 -3534
  30. package/dist/manager-api/index.cjs +3 -3
  31. package/dist/manager-api/index.d.ts +8 -531
  32. package/dist/manager-api/index.js +3 -3
  33. package/dist/node-logger/index.cjs +1620 -1620
  34. package/dist/node-logger/index.js +1619 -1619
  35. package/dist/preview/runtime.js +13337 -16032
  36. package/dist/preview-api/index.cjs +273 -271
  37. package/dist/preview-api/index.d.ts +4 -1
  38. package/dist/preview-api/index.js +14 -12
  39. package/dist/telemetry/index.cjs +500 -500
  40. package/dist/telemetry/index.js +478 -478
  41. package/dist/test/index.cjs +9136 -9815
  42. package/dist/test/index.js +8339 -9025
  43. package/dist/types/index.d.ts +12 -12
  44. package/package.json +5 -196
  45. package/dist/actions/preview.cjs +0 -159
  46. package/dist/actions/preview.d.ts +0 -45
  47. package/dist/actions/preview.js +0 -149
  48. package/dist/backgrounds/index.cjs +0 -16
  49. package/dist/backgrounds/index.d.ts +0 -2
  50. package/dist/backgrounds/index.js +0 -0
  51. package/dist/backgrounds/preview.cjs +0 -143
  52. package/dist/backgrounds/preview.d.ts +0 -53
  53. package/dist/backgrounds/preview.js +0 -127
  54. package/dist/component-testing/index.cjs +0 -23
  55. package/dist/component-testing/index.d.ts +0 -3
  56. package/dist/component-testing/index.js +0 -5
  57. package/dist/component-testing/preview.cjs +0 -40
  58. package/dist/component-testing/preview.d.ts +0 -5
  59. package/dist/component-testing/preview.js +0 -25
  60. package/dist/controls/preview.cjs +0 -26
  61. package/dist/controls/preview.d.ts +0 -43
  62. package/dist/controls/preview.js +0 -9
  63. package/dist/highlight/preview.cjs +0 -590
  64. package/dist/highlight/preview.d.ts +0 -20
  65. package/dist/highlight/preview.js +0 -575
  66. package/dist/measure/index.cjs +0 -16
  67. package/dist/measure/index.d.ts +0 -2
  68. package/dist/measure/index.js +0 -0
  69. package/dist/measure/preview.cjs +0 -466
  70. package/dist/measure/preview.d.ts +0 -25
  71. package/dist/measure/preview.js +0 -450
  72. package/dist/outline/index.cjs +0 -16
  73. package/dist/outline/index.d.ts +0 -2
  74. package/dist/outline/index.js +0 -0
  75. package/dist/outline/preview.cjs +0 -518
  76. package/dist/outline/preview.d.ts +0 -25
  77. package/dist/outline/preview.js +0 -486
  78. package/dist/test/preview.cjs +0 -73
  79. package/dist/test/preview.d.ts +0 -17
  80. package/dist/test/preview.js +0 -66
  81. package/dist/viewport/preview.cjs +0 -35
  82. package/dist/viewport/preview.d.ts +0 -62
  83. package/dist/viewport/preview.js +0 -19
@@ -3084,9 +3084,9 @@ var Ee = Object.freeze({
3084
3084
  }), br = {};
3085
3085
  function Ws(e) {
3086
3086
  let t = e.target;
3087
- return /input|textarea/i.test(t.tagName) || t.getAttribute("contenteditable") !== null;
3087
+ return !!(/input|textarea/i.test(t.tagName) || t.getAttribute("contenteditable") !== null || t.closest("dialog[open]"));
3088
3088
  }
3089
- n(Ws, "focusInInput");
3089
+ n(Ws, "shouldSkipShortcut");
3090
3090
  var Gs = /* @__PURE__ */ n(({ store: e, fullAPI: t, provider: r }) => {
3091
3091
  let o = {
3092
3092
  // Getting and setting shortcuts
@@ -4403,7 +4403,7 @@ U(wr, {
4403
4403
  var kt = require("@storybook/global"), on = L(rr(), 1), $ = L(require("semver"), 1);
4404
4404
 
4405
4405
  // src/manager-api/version.ts
4406
- var tn = "9.1.0-alpha.6";
4406
+ var tn = "9.1.0-alpha.7";
4407
4407
 
4408
4408
  // src/manager-api/modules/versions.ts
4409
4409
  var { VERSIONCHECK: Qs } = kt.global, rn = (0, on.default)(1)(() => {
@@ -2,7 +2,7 @@ import React, { FC, ReactNode, ReactElement, Component } from 'react';
2
2
  import { Channel, Listener as Listener$1 } from 'storybook/internal/channels';
3
3
  export { Listener as ChannelListener } from 'storybook/internal/channels';
4
4
  import { RouterData, NavigateOptions } from 'storybook/internal/router';
5
- import { Addon_Types, Addon_TypesEnum, Addon_Collection, Addon_TypesMapping, Addon_BaseType, Addon_TestProviderType, Addon_PageType, Addon_WrapperType, Addon_Config, API_ProviderData, API_StateMerger, API_Provider, Globals, GlobalTypes, API_PanelPositions, API_Layout, API_LayoutCustomisations, API_UI, API_Notification, API_IframeRenderer, API_ComposedRef, API_SetRefData, API_ComposedRefUpdate, API_Refs, StoryId, API_Settings, API_HashEntry, API_ViewMode, API_LeafEntry, API_PreparedStoryIndex, API_StoryEntry, Args, API_IndexHash, API_DocsEntry, API_FilterFunction, API_LoadedRefData, API_Version, API_Versions, API_UnknownEntries, API_OptionsData, Parameters, ArgTypes, NormalizedProjectAnnotations, ProjectAnnotations, ComposedStoryFn } from 'storybook/internal/types';
5
+ import { Addon_Types, Addon_TypesEnum, Addon_Collection, Addon_TypesMapping, Addon_BaseType, Addon_TestProviderType, Addon_PageType, Addon_WrapperType, Addon_Config, API_ProviderData, API_StateMerger, API_Provider, Globals, GlobalTypes, API_PanelPositions, API_Layout, API_LayoutCustomisations, API_UI, API_Notification, API_IframeRenderer, API_ComposedRef, API_SetRefData, API_ComposedRefUpdate, API_Refs, StoryId, API_Settings, API_HashEntry, API_ViewMode, API_LeafEntry, API_PreparedStoryIndex, API_StoryEntry, Args, API_IndexHash, API_DocsEntry, API_FilterFunction, API_LoadedRefData, API_Version, API_Versions, API_UnknownEntries, API_OptionsData, Parameters, ArgTypes } from 'storybook/internal/types';
6
6
  export { Addon_Type as Addon, API_ComponentEntry as ComponentEntry, API_ComposedRef as ComposedRef, API_DocsEntry as DocsEntry, API_GroupEntry as GroupEntry, API_HashEntry as HashEntry, API_IndexHash as IndexHash, API_LeafEntry as LeafEntry, API_Refs as Refs, API_RootEntry as RootEntry, API_IndexHash as StoriesHash, API_StoryEntry as StoryEntry } from 'storybook/internal/types';
7
7
  import { ThemeVars } from 'storybook/theming';
8
8
  import { toId, StoryId as StoryId$1 } from 'storybook/internal/csf';
@@ -388,7 +388,7 @@ interface SubState$5 {
388
388
 
389
389
  declare const isMacLike: () => boolean;
390
390
  declare const controlOrMetaSymbol: () => "⌘" | "ctrl";
391
- declare const controlOrMetaKey: () => "meta" | "control";
391
+ declare const controlOrMetaKey: () => "control" | "meta";
392
392
  declare const optionOrAltSymbol: () => "⌥" | "alt";
393
393
  declare const isShortcutTaken: (arr1: string[], arr2: string[]) => boolean;
394
394
  type KeyboardEventLike = Pick<KeyboardEvent, 'altKey' | 'ctrlKey' | 'metaKey' | 'shiftKey' | 'key' | 'code' | 'keyCode' | 'preventDefault'>;
@@ -1222,528 +1222,13 @@ type StatusStoreByTypeId = StatusStore & {
1222
1222
  };
1223
1223
  type UseStatusStore = <T = StatusesByStoryIdAndTypeId>(selector?: (statuses: StatusesByStoryIdAndTypeId) => T) => T;
1224
1224
 
1225
- /**
1226
- * Actions represent the type of change to a location value.
1227
- */
1228
- declare enum Action {
1229
- /**
1230
- * A POP indicates a change to an arbitrary index in the history stack, such
1231
- * as a back or forward navigation. It does not describe the direction of the
1232
- * navigation, only that the current index changed.
1233
- *
1234
- * Note: This is the default action for newly created history objects.
1235
- */
1236
- Pop = "POP",
1237
- /**
1238
- * A PUSH indicates a new entry being added to the history stack, such as when
1239
- * a link is clicked and a new page loads. When this happens, all subsequent
1240
- * entries in the stack are lost.
1241
- */
1242
- Push = "PUSH",
1243
- /**
1244
- * A REPLACE indicates the entry at the current index in the history stack
1245
- * being replaced by a new one.
1246
- */
1247
- Replace = "REPLACE"
1248
- }
1249
- /**
1250
- * The pathname, search, and hash values of a URL.
1251
- */
1252
- interface Path {
1253
- /**
1254
- * A URL pathname, beginning with a /.
1255
- */
1256
- pathname: string;
1257
- /**
1258
- * A URL search string, beginning with a ?.
1259
- */
1260
- search: string;
1261
- /**
1262
- * A URL fragment identifier, beginning with a #.
1263
- */
1264
- hash: string;
1265
- }
1266
- /**
1267
- * An entry in a history stack. A location contains information about the
1268
- * URL path, as well as possibly some arbitrary state and a key.
1269
- */
1270
- interface Location extends Path {
1271
- /**
1272
- * A value of arbitrary data associated with this location.
1273
- */
1274
- state: any;
1275
- /**
1276
- * A unique string associated with this location. May be used to safely store
1277
- * and retrieve data in some other storage API, like `localStorage`.
1278
- *
1279
- * Note: This value is always "default" on the initial location.
1280
- */
1281
- key: string;
1282
- }
1283
-
1284
- /**
1285
- * Map of routeId -> data returned from a loader/action/error
1286
- */
1287
- interface RouteData {
1288
- [routeId: string]: any;
1289
- }
1290
- declare enum ResultType {
1291
- data = "data",
1292
- deferred = "deferred",
1293
- redirect = "redirect",
1294
- error = "error"
1295
- }
1296
- /**
1297
- * Successful result from a loader or action
1298
- */
1299
- interface SuccessResult {
1300
- type: ResultType.data;
1301
- data: any;
1302
- statusCode?: number;
1303
- headers?: Headers;
1304
- }
1305
- /**
1306
- * Successful defer() result from a loader or action
1307
- */
1308
- interface DeferredResult {
1309
- type: ResultType.deferred;
1310
- deferredData: DeferredData;
1311
- statusCode?: number;
1312
- headers?: Headers;
1313
- }
1314
- /**
1315
- * Redirect result from a loader or action
1316
- */
1317
- interface RedirectResult {
1318
- type: ResultType.redirect;
1319
- status: number;
1320
- location: string;
1321
- revalidate: boolean;
1322
- reloadDocument?: boolean;
1323
- }
1324
- /**
1325
- * Unsuccessful result from a loader or action
1326
- */
1327
- interface ErrorResult {
1328
- type: ResultType.error;
1329
- error: any;
1330
- headers?: Headers;
1331
- }
1332
- /**
1333
- * Result from a loader or action - potentially successful or unsuccessful
1334
- */
1335
- type DataResult = SuccessResult | DeferredResult | RedirectResult | ErrorResult;
1336
- type LowerCaseFormMethod = "get" | "post" | "put" | "patch" | "delete";
1337
- type UpperCaseFormMethod = Uppercase<LowerCaseFormMethod>;
1338
- /**
1339
- * Active navigation/fetcher form methods are exposed in lowercase on the
1340
- * RouterState
1341
- */
1342
- type FormMethod = LowerCaseFormMethod;
1343
- /**
1344
- * In v7, active navigation/fetcher form methods are exposed in uppercase on the
1345
- * RouterState. This is to align with the normalization done via fetch().
1346
- */
1347
- type V7_FormMethod = UpperCaseFormMethod;
1348
- type FormEncType = "application/x-www-form-urlencoded" | "multipart/form-data" | "application/json" | "text/plain";
1349
- type JsonObject = {
1350
- [Key in string]: JsonValue;
1351
- } & {
1352
- [Key in string]?: JsonValue | undefined;
1353
- };
1354
- type JsonArray = JsonValue[] | readonly JsonValue[];
1355
- type JsonPrimitive = string | number | boolean | null;
1356
- type JsonValue = JsonPrimitive | JsonObject | JsonArray;
1357
- /**
1358
- * @private
1359
- * Internal interface to pass around for action submissions, not intended for
1360
- * external consumption
1361
- */
1362
- type Submission = {
1363
- formMethod: FormMethod | V7_FormMethod;
1364
- formAction: string;
1365
- formEncType: FormEncType;
1366
- formData: FormData;
1367
- json: undefined;
1368
- text: undefined;
1369
- } | {
1370
- formMethod: FormMethod | V7_FormMethod;
1371
- formAction: string;
1372
- formEncType: FormEncType;
1373
- formData: undefined;
1374
- json: JsonValue;
1375
- text: undefined;
1376
- } | {
1377
- formMethod: FormMethod | V7_FormMethod;
1378
- formAction: string;
1379
- formEncType: FormEncType;
1380
- formData: undefined;
1381
- json: undefined;
1382
- text: string;
1383
- };
1384
- /**
1385
- * @private
1386
- * Arguments passed to route loader/action functions. Same for now but we keep
1387
- * this as a private implementation detail in case they diverge in the future.
1388
- */
1389
- interface DataFunctionArgs {
1390
- request: Request;
1391
- params: Params;
1392
- context?: any;
1393
- }
1394
- /**
1395
- * Arguments passed to loader functions
1396
- */
1397
- interface LoaderFunctionArgs extends DataFunctionArgs {
1398
- }
1399
- /**
1400
- * Arguments passed to action functions
1401
- */
1402
- interface ActionFunctionArgs extends DataFunctionArgs {
1403
- }
1404
- /**
1405
- * Loaders and actions can return anything except `undefined` (`null` is a
1406
- * valid return value if there is no data to return). Responses are preferred
1407
- * and will ease any future migration to Remix
1408
- */
1409
- type DataFunctionValue = Response | NonNullable<unknown> | null;
1410
- /**
1411
- * Route loader function signature
1412
- */
1413
- interface LoaderFunction {
1414
- (args: LoaderFunctionArgs): Promise<DataFunctionValue> | DataFunctionValue;
1415
- }
1416
- /**
1417
- * Route action function signature
1418
- */
1419
- interface ActionFunction {
1420
- (args: ActionFunctionArgs): Promise<DataFunctionValue> | DataFunctionValue;
1421
- }
1422
- /**
1423
- * Route shouldRevalidate function signature. This runs after any submission
1424
- * (navigation or fetcher), so we flatten the navigation/fetcher submission
1425
- * onto the arguments. It shouldn't matter whether it came from a navigation
1426
- * or a fetcher, what really matters is the URLs and the formData since loaders
1427
- * have to re-run based on the data models that were potentially mutated.
1428
- */
1429
- interface ShouldRevalidateFunction {
1430
- (args: {
1431
- currentUrl: URL;
1432
- currentParams: AgnosticDataRouteMatch["params"];
1433
- nextUrl: URL;
1434
- nextParams: AgnosticDataRouteMatch["params"];
1435
- formMethod?: Submission["formMethod"];
1436
- formAction?: Submission["formAction"];
1437
- formEncType?: Submission["formEncType"];
1438
- text?: Submission["text"];
1439
- formData?: Submission["formData"];
1440
- json?: Submission["json"];
1441
- actionResult?: DataResult;
1442
- defaultShouldRevalidate: boolean;
1443
- }): boolean;
1444
- }
1445
- /**
1446
- * Keys we cannot change from within a lazy() function. We spread all other keys
1447
- * onto the route. Either they're meaningful to the router, or they'll get
1448
- * ignored.
1449
- */
1450
- type ImmutableRouteKey = "lazy" | "caseSensitive" | "path" | "id" | "index" | "children";
1451
- type RequireOne<T, Key = keyof T> = Exclude<{
1452
- [K in keyof T]: K extends Key ? Omit<T, K> & Required<Pick<T, K>> : never;
1453
- }[keyof T], undefined>;
1454
- /**
1455
- * lazy() function to load a route definition, which can add non-matching
1456
- * related properties to a route
1457
- */
1458
- interface LazyRouteFunction<R extends AgnosticRouteObject> {
1459
- (): Promise<RequireOne<Omit<R, ImmutableRouteKey>>>;
1460
- }
1461
- /**
1462
- * Base RouteObject with common props shared by all types of routes
1463
- */
1464
- type AgnosticBaseRouteObject = {
1465
- caseSensitive?: boolean;
1466
- path?: string;
1467
- id?: string;
1468
- loader?: LoaderFunction;
1469
- action?: ActionFunction;
1470
- hasErrorBoundary?: boolean;
1471
- shouldRevalidate?: ShouldRevalidateFunction;
1472
- handle?: any;
1473
- lazy?: LazyRouteFunction<AgnosticBaseRouteObject>;
1474
- };
1475
- /**
1476
- * Index routes must not have children
1477
- */
1478
- type AgnosticIndexRouteObject = AgnosticBaseRouteObject & {
1479
- children?: undefined;
1480
- index: true;
1481
- };
1482
- /**
1483
- * Non-index routes may have children, but cannot have index
1484
- */
1485
- type AgnosticNonIndexRouteObject = AgnosticBaseRouteObject & {
1486
- children?: AgnosticRouteObject[];
1487
- index?: false;
1488
- };
1489
- /**
1490
- * A route object represents a logical route, with (optionally) its child
1491
- * routes organized in a tree-like structure.
1492
- */
1493
- type AgnosticRouteObject = AgnosticIndexRouteObject | AgnosticNonIndexRouteObject;
1494
- type AgnosticDataIndexRouteObject = AgnosticIndexRouteObject & {
1495
- id: string;
1496
- };
1497
- type AgnosticDataNonIndexRouteObject = AgnosticNonIndexRouteObject & {
1498
- children?: AgnosticDataRouteObject[];
1499
- id: string;
1500
- };
1501
- /**
1502
- * A data route object, which is just a RouteObject with a required unique ID
1503
- */
1504
- type AgnosticDataRouteObject = AgnosticDataIndexRouteObject | AgnosticDataNonIndexRouteObject;
1505
- /**
1506
- * The parameters that were parsed from the URL path.
1507
- */
1508
- type Params<Key extends string = string> = {
1509
- readonly [key in Key]: string | undefined;
1510
- };
1511
- /**
1512
- * A RouteMatch contains info about how a route matched a URL.
1513
- */
1514
- interface AgnosticRouteMatch<ParamKey extends string = string, RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject> {
1515
- /**
1516
- * The names and values of dynamic parameters in the URL.
1517
- */
1518
- params: Params<ParamKey>;
1519
- /**
1520
- * The portion of the URL pathname that was matched.
1521
- */
1522
- pathname: string;
1523
- /**
1524
- * The portion of the URL pathname that was matched before child routes.
1525
- */
1526
- pathnameBase: string;
1527
- /**
1528
- * The route object that was used to match.
1529
- */
1530
- route: RouteObjectType;
1531
- }
1532
- interface AgnosticDataRouteMatch extends AgnosticRouteMatch<string, AgnosticDataRouteObject> {
1533
- }
1534
- declare class DeferredData {
1535
- private pendingKeysSet;
1536
- private controller;
1537
- private abortPromise;
1538
- private unlistenAbortSignal;
1539
- private subscribers;
1540
- data: Record<string, unknown>;
1541
- init?: ResponseInit;
1542
- deferredKeys: string[];
1543
- constructor(data: Record<string, unknown>, responseInit?: ResponseInit);
1544
- private trackPromise;
1545
- private onSettle;
1546
- private emit;
1547
- subscribe(fn: (aborted: boolean, settledKey?: string) => void): () => boolean;
1548
- cancel(): void;
1549
- resolveData(signal: AbortSignal): Promise<boolean>;
1550
- get done(): boolean;
1551
- get unwrappedData(): {};
1552
- get pendingKeys(): string[];
1553
- }
1554
-
1555
- /**
1556
- * State maintained internally by the router. During a navigation, all states
1557
- * reflect the the "old" location unless otherwise noted.
1558
- */
1559
- interface RouterState {
1560
- /**
1561
- * The action of the most recent navigation
1562
- */
1563
- historyAction: Action;
1564
- /**
1565
- * The current location reflected by the router
1566
- */
1567
- location: Location;
1568
- /**
1569
- * The current set of route matches
1570
- */
1571
- matches: AgnosticDataRouteMatch[];
1572
- /**
1573
- * Tracks whether we've completed our initial data load
1574
- */
1575
- initialized: boolean;
1576
- /**
1577
- * Current scroll position we should start at for a new view
1578
- * - number -> scroll position to restore to
1579
- * - false -> do not restore scroll at all (used during submissions)
1580
- * - null -> don't have a saved position, scroll to hash or top of page
1581
- */
1582
- restoreScrollPosition: number | false | null;
1583
- /**
1584
- * Indicate whether this navigation should skip resetting the scroll position
1585
- * if we are unable to restore the scroll position
1586
- */
1587
- preventScrollReset: boolean;
1588
- /**
1589
- * Tracks the state of the current navigation
1590
- */
1591
- navigation: Navigation;
1592
- /**
1593
- * Tracks any in-progress revalidations
1594
- */
1595
- revalidation: RevalidationState;
1596
- /**
1597
- * Data from the loaders for the current matches
1598
- */
1599
- loaderData: RouteData;
1600
- /**
1601
- * Data from the action for the current matches
1602
- */
1603
- actionData: RouteData | null;
1604
- /**
1605
- * Errors caught from loaders for the current matches
1606
- */
1607
- errors: RouteData | null;
1608
- /**
1609
- * Map of current fetchers
1610
- */
1611
- fetchers: Map<string, Fetcher>;
1612
- /**
1613
- * Map of current blockers
1614
- */
1615
- blockers: Map<string, Blocker>;
1616
- }
1617
- /**
1618
- * Data that can be passed into hydrate a Router from SSR
1619
- */
1620
- type HydrationState = Partial<Pick<RouterState, "loaderData" | "actionData" | "errors">>;
1621
- /**
1622
- * Potential states for state.navigation
1623
- */
1624
- type NavigationStates = {
1625
- Idle: {
1626
- state: "idle";
1627
- location: undefined;
1628
- formMethod: undefined;
1629
- formAction: undefined;
1630
- formEncType: undefined;
1631
- formData: undefined;
1632
- json: undefined;
1633
- text: undefined;
1634
- };
1635
- Loading: {
1636
- state: "loading";
1637
- location: Location;
1638
- formMethod: Submission["formMethod"] | undefined;
1639
- formAction: Submission["formAction"] | undefined;
1640
- formEncType: Submission["formEncType"] | undefined;
1641
- formData: Submission["formData"] | undefined;
1642
- json: Submission["json"] | undefined;
1643
- text: Submission["text"] | undefined;
1644
- };
1645
- Submitting: {
1646
- state: "submitting";
1647
- location: Location;
1648
- formMethod: Submission["formMethod"];
1649
- formAction: Submission["formAction"];
1650
- formEncType: Submission["formEncType"];
1651
- formData: Submission["formData"];
1652
- json: Submission["json"];
1653
- text: Submission["text"];
1654
- };
1655
- };
1656
- type Navigation = NavigationStates[keyof NavigationStates];
1657
- type RevalidationState = "idle" | "loading";
1658
- /**
1659
- * Potential states for fetchers
1660
- */
1661
- type FetcherStates<TData = any> = {
1662
- Idle: {
1663
- state: "idle";
1664
- formMethod: undefined;
1665
- formAction: undefined;
1666
- formEncType: undefined;
1667
- text: undefined;
1668
- formData: undefined;
1669
- json: undefined;
1670
- data: TData | undefined;
1671
- " _hasFetcherDoneAnything "?: boolean;
1672
- };
1673
- Loading: {
1674
- state: "loading";
1675
- formMethod: Submission["formMethod"] | undefined;
1676
- formAction: Submission["formAction"] | undefined;
1677
- formEncType: Submission["formEncType"] | undefined;
1678
- text: Submission["text"] | undefined;
1679
- formData: Submission["formData"] | undefined;
1680
- json: Submission["json"] | undefined;
1681
- data: TData | undefined;
1682
- " _hasFetcherDoneAnything "?: boolean;
1683
- };
1684
- Submitting: {
1685
- state: "submitting";
1686
- formMethod: Submission["formMethod"];
1687
- formAction: Submission["formAction"];
1688
- formEncType: Submission["formEncType"];
1689
- text: Submission["text"];
1690
- formData: Submission["formData"];
1691
- json: Submission["json"];
1692
- data: TData | undefined;
1693
- " _hasFetcherDoneAnything "?: boolean;
1694
- };
1695
- };
1696
- type Fetcher<TData = any> = FetcherStates<TData>[keyof FetcherStates<TData>];
1697
- interface BlockerBlocked {
1698
- state: "blocked";
1699
- reset(): void;
1700
- proceed(): void;
1701
- location: Location;
1702
- }
1703
- interface BlockerUnblocked {
1704
- state: "unblocked";
1705
- reset: undefined;
1706
- proceed: undefined;
1707
- location: undefined;
1708
- }
1709
- interface BlockerProceeding {
1710
- state: "proceeding";
1711
- reset: undefined;
1712
- proceed: undefined;
1713
- location: Location;
1714
- }
1715
- type Blocker = BlockerUnblocked | BlockerBlocked | BlockerProceeding;
1716
-
1717
- /**
1718
- * NOTE: If you refactor this to split up the modules into separate files,
1719
- * you'll need to update the rollup config for react-router-dom-v5-compat.
1720
- */
1721
-
1722
- declare global {
1723
- var __staticRouterHydrationData: HydrationState | undefined;
1724
- }
1725
-
1726
- declare global {
1727
- interface SymbolConstructor {
1728
- readonly observable: symbol;
1729
- }
1730
- }
1731
-
1732
- declare global {
1733
- var globalProjectAnnotations: NormalizedProjectAnnotations<any>;
1734
- var defaultProjectAnnotations: ProjectAnnotations<any>;
1735
- }
1736
- type WrappedStoryRef = {
1737
- __pw_type: 'jsx' | 'importRef';
1738
- };
1739
- type UnwrappedJSXStoryRef = {
1740
- __pw_type: 'jsx';
1741
- type: UnwrappedImportStoryRef;
1225
+ declare const fullStatusStore: StatusStore & {
1226
+ selectStatuses: (statuses: Status[]) => void;
1227
+ typeId: undefined;
1742
1228
  };
1743
- type UnwrappedImportStoryRef = ComposedStoryFn;
1744
- declare global {
1745
- function __pwUnwrapObject(storyRef: WrappedStoryRef): Promise<UnwrappedJSXStoryRef | UnwrappedImportStoryRef>;
1746
- }
1229
+ declare const getStatusStoreByTypeId: (typeId: StatusTypeId) => StatusStoreByTypeId;
1230
+ declare const useStatusStore: UseStatusStore;
1231
+ declare const universalStatusStore: UniversalStore<StatusesByStoryIdAndTypeId, StatusStoreEvent>;
1747
1232
 
1748
1233
  type TestProviderState = 'test-provider-state:pending' | 'test-provider-state:running' | 'test-provider-state:succeeded' | 'test-provider-state:crashed';
1749
1234
  type TestProviderId = string;
@@ -1993,14 +1478,6 @@ type UseTestProviderStore = <T = TestProviderStateByProviderId>(
1993
1478
  */
1994
1479
  selector?: (state: TestProviderStateByProviderId) => T) => T;
1995
1480
 
1996
- declare const fullStatusStore: StatusStore & {
1997
- selectStatuses: (statuses: Status[]) => void;
1998
- typeId: undefined;
1999
- };
2000
- declare const getStatusStoreByTypeId: (typeId: StatusTypeId) => StatusStoreByTypeId;
2001
- declare const useStatusStore: UseStatusStore;
2002
- declare const universalStatusStore: UniversalStore<StatusesByStoryIdAndTypeId, StatusStoreEvent>;
2003
-
2004
1481
  declare const fullTestProviderStore: {
2005
1482
  settingsChanged: () => void;
2006
1483
  onRunAll: (listener: () => void) => () => void;
@@ -1895,9 +1895,9 @@ var ue = Object.freeze({
1895
1895
  }), sr = {};
1896
1896
  function Es(e) {
1897
1897
  let t = e.target;
1898
- return /input|textarea/i.test(t.tagName) || t.getAttribute("contenteditable") !== null;
1898
+ return !!(/input|textarea/i.test(t.tagName) || t.getAttribute("contenteditable") !== null || t.closest("dialog[open]"));
1899
1899
  }
1900
- n(Es, "focusInInput");
1900
+ n(Es, "shouldSkipShortcut");
1901
1901
  var vs = /* @__PURE__ */ n(({ store: e, fullAPI: t, provider: r }) => {
1902
1902
  let o = {
1903
1903
  // Getting and setting shortcuts
@@ -3217,7 +3217,7 @@ import { global as Sr } from "@storybook/global";
3217
3217
  import $ from "semver";
3218
3218
 
3219
3219
  // src/manager-api/version.ts
3220
- var No = "9.1.0-alpha.6";
3220
+ var No = "9.1.0-alpha.7";
3221
3221
 
3222
3222
  // src/manager-api/modules/versions.ts
3223
3223
  var { VERSIONCHECK: ca } = Sr, jo = (0, ko.default)(1)(() => {