storybook 9.0.0-alpha.5 → 9.0.0-alpha.6
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/bin/index.cjs +63 -63
- package/dist/bin/index.js +63 -63
- package/dist/builder-manager/index.cjs +253 -280
- package/dist/builder-manager/index.js +305 -332
- package/dist/cli/bin/index.cjs +1 -1
- package/dist/cli/bin/index.js +1 -1
- package/dist/common/index.cjs +63 -63
- package/dist/common/index.js +63 -63
- package/dist/components/index.cjs +2102 -2069
- package/dist/components/index.js +2311 -2278
- package/dist/core-server/index.cjs +10687 -10447
- package/dist/core-server/index.d.ts +55 -2
- package/dist/core-server/index.js +10824 -10590
- package/dist/core-server/presets/common-preset.cjs +59 -59
- package/dist/core-server/presets/common-preset.js +57 -57
- package/dist/csf/index.d.ts +1 -1
- package/dist/instrumenter/index.cjs +2 -2
- package/dist/instrumenter/index.js +2 -2
- package/dist/manager/globals-module-info.cjs +12 -4
- package/dist/manager/globals-module-info.js +10 -2
- package/dist/manager/globals-runtime.js +19573 -19104
- package/dist/manager/runtime.js +3254 -3190
- package/dist/manager-api/index.cjs +3627 -3368
- package/dist/manager-api/index.d.ts +57 -18
- package/dist/manager-api/index.js +3182 -2962
- package/dist/manager-errors.d.ts +25 -1
- package/dist/manager-errors.js +42 -26
- package/dist/preview/runtime.js +8055 -7823
- package/dist/preview-api/index.cjs +1234 -1683
- package/dist/preview-api/index.d.ts +69 -376
- package/dist/preview-api/index.js +1360 -1785
- package/dist/preview-errors.cjs +98 -81
- package/dist/preview-errors.d.ts +25 -1
- package/dist/preview-errors.js +109 -93
- package/dist/server-errors.cjs +92 -75
- package/dist/server-errors.d.ts +25 -1
- package/dist/server-errors.js +83 -66
- package/dist/test/index.cjs +6697 -6432
- package/dist/test/index.js +6069 -5804
- package/dist/types/index.d.ts +27 -13
- package/package.json +6 -6
|
@@ -2,11 +2,11 @@ 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_SidebarTopType, Addon_SidebarBottomType, Addon_TestProviderType, Addon_PageType, Addon_WrapperType, Addon_Config, API_ProviderData, API_StateMerger, API_Provider, StoryId, Globals, GlobalTypes, API_PanelPositions, API_Layout, API_UI, API_Notification, API_IframeRenderer, API_ComposedRef, API_SetRefData, API_ComposedRefUpdate, API_Refs, API_Settings, API_HashEntry, API_ViewMode, API_LeafEntry, API_PreparedStoryIndex, API_StoryEntry, Args, API_IndexHash, API_DocsEntry,
|
|
5
|
+
import { Addon_Types, Addon_TypesEnum, Addon_Collection, Addon_TypesMapping, Addon_BaseType, Addon_SidebarTopType, Addon_SidebarBottomType, Addon_TestProviderType, Addon_PageType, Addon_WrapperType, Addon_Config, API_ProviderData, API_StateMerger, API_Provider, StoryId, Globals, GlobalTypes, API_PanelPositions, API_Layout, API_UI, API_Notification, API_IframeRenderer, API_ComposedRef, API_SetRefData, API_ComposedRefUpdate, API_Refs, 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, NormalizedProjectAnnotations, ProjectAnnotations, ComposedStoryFn, 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 { TestProviderState, TestProviderId, TestProviders, WhatsNewData } from 'storybook/internal/core-events';
|
|
8
8
|
import { ThemeVars } from 'storybook/theming';
|
|
9
|
-
import { toId } from 'storybook/internal/csf';
|
|
9
|
+
import { toId, StoryId as StoryId$1 } from 'storybook/internal/csf';
|
|
10
10
|
|
|
11
11
|
declare function mockChannel(): Channel;
|
|
12
12
|
|
|
@@ -507,7 +507,6 @@ interface SubState$3 extends API_LoadedRefData {
|
|
|
507
507
|
storyId: StoryId;
|
|
508
508
|
internal_index?: API_PreparedStoryIndex;
|
|
509
509
|
viewMode: API_ViewMode;
|
|
510
|
-
status: API_StatusState;
|
|
511
510
|
filters: Record<string, API_FilterFunction>;
|
|
512
511
|
}
|
|
513
512
|
interface SubAPI$3 {
|
|
@@ -694,20 +693,6 @@ interface SubAPI$3 {
|
|
|
694
693
|
* @returns {Promise<void>} A promise that resolves when the preview has been set as initialized.
|
|
695
694
|
*/
|
|
696
695
|
setPreviewInitialized: (ref?: API_ComposedRef) => Promise<void>;
|
|
697
|
-
/**
|
|
698
|
-
* Returns the current status of the stories.
|
|
699
|
-
*
|
|
700
|
-
* @returns {API_StatusState} The current status of the stories.
|
|
701
|
-
*/
|
|
702
|
-
getCurrentStoryStatus: () => Record<string, API_StatusObject>;
|
|
703
|
-
/**
|
|
704
|
-
* Updates the status of a collection of stories.
|
|
705
|
-
*
|
|
706
|
-
* @param {string} addonId - The ID of the addon to update.
|
|
707
|
-
* @param {StatusUpdate} update - An object containing the updated status information.
|
|
708
|
-
* @returns {Promise<void>} A promise that resolves when the status has been updated.
|
|
709
|
-
*/
|
|
710
|
-
experimental_updateStatus: (addonId: string, update: API_StatusUpdate | ((state: API_StatusState) => API_StatusUpdate)) => Promise<void>;
|
|
711
696
|
/**
|
|
712
697
|
* Updates the filtering of the index.
|
|
713
698
|
*
|
|
@@ -1139,6 +1124,60 @@ declare class MockUniversalStore<State, CustomEvent extends {
|
|
|
1139
1124
|
unsubscribeAll(): void;
|
|
1140
1125
|
}
|
|
1141
1126
|
|
|
1127
|
+
declare global {
|
|
1128
|
+
interface SymbolConstructor {
|
|
1129
|
+
readonly observable: symbol;
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
|
|
1133
|
+
declare global {
|
|
1134
|
+
var globalProjectAnnotations: NormalizedProjectAnnotations<any>;
|
|
1135
|
+
var defaultProjectAnnotations: ProjectAnnotations<any>;
|
|
1136
|
+
}
|
|
1137
|
+
type WrappedStoryRef = {
|
|
1138
|
+
__pw_type: 'jsx' | 'importRef';
|
|
1139
|
+
};
|
|
1140
|
+
type UnwrappedJSXStoryRef = {
|
|
1141
|
+
__pw_type: 'jsx';
|
|
1142
|
+
type: UnwrappedImportStoryRef;
|
|
1143
|
+
};
|
|
1144
|
+
type UnwrappedImportStoryRef = ComposedStoryFn;
|
|
1145
|
+
declare global {
|
|
1146
|
+
function __pwUnwrapObject(storyRef: WrappedStoryRef): Promise<UnwrappedJSXStoryRef | UnwrappedImportStoryRef>;
|
|
1147
|
+
}
|
|
1148
|
+
|
|
1149
|
+
type StatusValue = 'status-value:pending' | 'status-value:success' | 'status-value:error' | 'status-value:warning' | 'status-value:unknown';
|
|
1150
|
+
type StatusTypeId = string;
|
|
1151
|
+
type StatusByTypeId = Record<StatusTypeId, Status>;
|
|
1152
|
+
type StatusesByStoryIdAndTypeId = Record<StoryId$1, StatusByTypeId>;
|
|
1153
|
+
interface Status {
|
|
1154
|
+
value: StatusValue;
|
|
1155
|
+
typeId: StatusTypeId;
|
|
1156
|
+
storyId: StoryId$1;
|
|
1157
|
+
title: string;
|
|
1158
|
+
description: string;
|
|
1159
|
+
data?: any;
|
|
1160
|
+
sidebarContextMenu?: boolean;
|
|
1161
|
+
}
|
|
1162
|
+
type StatusStore = {
|
|
1163
|
+
getAll: () => StatusesByStoryIdAndTypeId;
|
|
1164
|
+
set: (statuses: Status[]) => void;
|
|
1165
|
+
onAllStatusChange: (listener: (statuses: StatusesByStoryIdAndTypeId, previousStatuses: StatusesByStoryIdAndTypeId) => void) => () => void;
|
|
1166
|
+
onSelect: (listener: (selectedStatuses: Status[]) => void) => () => void;
|
|
1167
|
+
unset: (storyIds?: StoryId$1[]) => void;
|
|
1168
|
+
};
|
|
1169
|
+
type StatusStoreByTypeId = StatusStore & {
|
|
1170
|
+
typeId: StatusTypeId;
|
|
1171
|
+
};
|
|
1172
|
+
type UseStatusStore = <T = StatusesByStoryIdAndTypeId>(selector?: (statuses: StatusesByStoryIdAndTypeId) => T) => T;
|
|
1173
|
+
|
|
1174
|
+
declare const fullStatusStore: StatusStore & {
|
|
1175
|
+
selectStatuses: (statuses: Status[]) => void;
|
|
1176
|
+
typeId: undefined;
|
|
1177
|
+
};
|
|
1178
|
+
declare const getStatusStoreByTypeId: (typeId: StatusTypeId) => StatusStoreByTypeId;
|
|
1179
|
+
declare const useStatusStore: UseStatusStore;
|
|
1180
|
+
|
|
1142
1181
|
declare const ActiveTabs: {
|
|
1143
1182
|
SIDEBAR: "sidebar";
|
|
1144
1183
|
CANVAS: "canvas";
|
|
@@ -1208,4 +1247,4 @@ declare function useArgTypes(): ArgTypes;
|
|
|
1208
1247
|
|
|
1209
1248
|
declare const typesX: typeof Addon_TypesEnum;
|
|
1210
1249
|
|
|
1211
|
-
export { type API, type API_EventMap, ActiveTabs, AddonStore, type Combo, ManagerConsumer as Consumer, type KeyboardEventLike, ManagerContext, type ManagerProviderProps, ManagerProvider as Provider, RequestResponseError, type State, type Options as StoreOptions, addons, combineParameters, controlOrMetaKey, controlOrMetaSymbol, eventMatchesShortcut, eventToShortcut, MockUniversalStore as experimental_MockUniversalStore, UniversalStore as experimental_UniversalStore, experimental_requestResponse, useUniversalStore as experimental_useUniversalStore, isMacLike, isShortcutTaken, keyToSymbol, _default as merge, mockChannel, optionOrAltSymbol, shortcutMatchesShortcut, shortcutToHumanString, typesX as types, useAddonState, useArgTypes, useArgs, useChannel, useGlobalTypes, useGlobals, useParameter, useSharedState, useStoryPrepared, useStorybookApi, useStorybookState };
|
|
1250
|
+
export { type API, type API_EventMap, ActiveTabs, AddonStore, type Combo, ManagerConsumer as Consumer, type KeyboardEventLike, ManagerContext, type ManagerProviderProps, ManagerProvider as Provider, RequestResponseError, type State, type Options as StoreOptions, addons, combineParameters, controlOrMetaKey, controlOrMetaSymbol, eventMatchesShortcut, eventToShortcut, MockUniversalStore as experimental_MockUniversalStore, UniversalStore as experimental_UniversalStore, getStatusStoreByTypeId as experimental_getStatusStore, experimental_requestResponse, useStatusStore as experimental_useStatusStore, useUniversalStore as experimental_useUniversalStore, fullStatusStore as internal_fullStatusStore, isMacLike, isShortcutTaken, keyToSymbol, _default as merge, mockChannel, optionOrAltSymbol, shortcutMatchesShortcut, shortcutToHumanString, typesX as types, useAddonState, useArgTypes, useArgs, useChannel, useGlobalTypes, useGlobals, useParameter, useSharedState, useStoryPrepared, useStorybookApi, useStorybookState };
|