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
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { loadAllPresets } from 'storybook/internal/common';
|
|
2
2
|
export { getPreviewBodyTemplate, getPreviewHeadTemplate } from 'storybook/internal/common';
|
|
3
3
|
import * as storybook_internal_types from 'storybook/internal/types';
|
|
4
|
-
import { CLIOptions, LoadOptions, BuilderOptions, StorybookConfigRaw, IndexInputStats, NormalizedStoriesSpecifier, Path, Indexer, DocsOptions, StoryIndexEntry, DocsIndexEntry, Tag, IndexEntry, StoryIndex, Options } from 'storybook/internal/types';
|
|
4
|
+
import { CLIOptions, LoadOptions, BuilderOptions, StorybookConfigRaw, IndexInputStats, NormalizedStoriesSpecifier, Path, Indexer, DocsOptions, StoryIndexEntry, DocsIndexEntry, Tag, IndexEntry, StoryIndex, Options, NormalizedProjectAnnotations, ProjectAnnotations, ComposedStoryFn } from 'storybook/internal/types';
|
|
5
5
|
import { EventType } from 'storybook/internal/telemetry';
|
|
6
6
|
import { Channel } from 'storybook/internal/channels';
|
|
7
|
+
import { StoryId } from 'storybook/internal/csf';
|
|
7
8
|
|
|
8
9
|
type BuildStaticStandaloneOptions = CLIOptions & LoadOptions & BuilderOptions & {
|
|
9
10
|
outputDir: string;
|
|
@@ -459,4 +460,56 @@ declare class MockUniversalStore<State, CustomEvent extends {
|
|
|
459
460
|
unsubscribeAll(): void;
|
|
460
461
|
}
|
|
461
462
|
|
|
462
|
-
|
|
463
|
+
declare global {
|
|
464
|
+
interface SymbolConstructor {
|
|
465
|
+
readonly observable: symbol;
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
declare global {
|
|
470
|
+
var globalProjectAnnotations: NormalizedProjectAnnotations<any>;
|
|
471
|
+
var defaultProjectAnnotations: ProjectAnnotations<any>;
|
|
472
|
+
}
|
|
473
|
+
type WrappedStoryRef = {
|
|
474
|
+
__pw_type: 'jsx' | 'importRef';
|
|
475
|
+
};
|
|
476
|
+
type UnwrappedJSXStoryRef = {
|
|
477
|
+
__pw_type: 'jsx';
|
|
478
|
+
type: UnwrappedImportStoryRef;
|
|
479
|
+
};
|
|
480
|
+
type UnwrappedImportStoryRef = ComposedStoryFn;
|
|
481
|
+
declare global {
|
|
482
|
+
function __pwUnwrapObject(storyRef: WrappedStoryRef): Promise<UnwrappedJSXStoryRef | UnwrappedImportStoryRef>;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
type StatusValue = 'status-value:pending' | 'status-value:success' | 'status-value:error' | 'status-value:warning' | 'status-value:unknown';
|
|
486
|
+
type StatusTypeId = string;
|
|
487
|
+
type StatusByTypeId = Record<StatusTypeId, Status>;
|
|
488
|
+
type StatusesByStoryIdAndTypeId = Record<StoryId, StatusByTypeId>;
|
|
489
|
+
interface Status {
|
|
490
|
+
value: StatusValue;
|
|
491
|
+
typeId: StatusTypeId;
|
|
492
|
+
storyId: StoryId;
|
|
493
|
+
title: string;
|
|
494
|
+
description: string;
|
|
495
|
+
data?: any;
|
|
496
|
+
sidebarContextMenu?: boolean;
|
|
497
|
+
}
|
|
498
|
+
type StatusStore = {
|
|
499
|
+
getAll: () => StatusesByStoryIdAndTypeId;
|
|
500
|
+
set: (statuses: Status[]) => void;
|
|
501
|
+
onAllStatusChange: (listener: (statuses: StatusesByStoryIdAndTypeId, previousStatuses: StatusesByStoryIdAndTypeId) => void) => () => void;
|
|
502
|
+
onSelect: (listener: (selectedStatuses: Status[]) => void) => () => void;
|
|
503
|
+
unset: (storyIds?: StoryId[]) => void;
|
|
504
|
+
};
|
|
505
|
+
type StatusStoreByTypeId = StatusStore & {
|
|
506
|
+
typeId: StatusTypeId;
|
|
507
|
+
};
|
|
508
|
+
|
|
509
|
+
declare const fullStatusStore: StatusStore & {
|
|
510
|
+
selectStatuses: (statuses: Status[]) => void;
|
|
511
|
+
typeId: undefined;
|
|
512
|
+
};
|
|
513
|
+
declare const getStatusStoreByTypeId: (typeId: StatusTypeId) => StatusStoreByTypeId;
|
|
514
|
+
|
|
515
|
+
export { type BuildIndexOptions, type BuildStaticStandaloneOptions, StoryIndexGenerator, build, buildDevStandalone, buildIndex, buildIndexStandalone, buildStaticStandalone, MockUniversalStore as experimental_MockUniversalStore, UniversalStore as experimental_UniversalStore, getStatusStoreByTypeId as experimental_getStatusStore, loadStorybook as experimental_loadStorybook, getErrorLevel, fullStatusStore as internal_fullStatusStore, mapStaticDir, sendTelemetryError, withTelemetry };
|