@storybook/react-vite 7.4.0-alpha.0 → 7.4.0-alpha.2

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.
@@ -728,6 +728,19 @@ interface Parameters$1 {
728
728
  [name: string]: any;
729
729
  }
730
730
 
731
+ interface Options$1 {
732
+ allowRegExp: boolean;
733
+ allowFunction: boolean;
734
+ allowSymbol: boolean;
735
+ allowDate: boolean;
736
+ allowUndefined: boolean;
737
+ allowClass: boolean;
738
+ allowError: boolean;
739
+ maxDepth: number;
740
+ space: number | undefined;
741
+ lazyEval: boolean;
742
+ }
743
+
731
744
  type ExportName = string;
732
745
  type MetaId = string;
733
746
  interface StoriesSpecifier {
@@ -840,19 +853,6 @@ type DocsIndexInput = BaseIndexInput & {
840
853
  storiesImports?: Path[];
841
854
  };
842
855
  type IndexInput = StoryIndexInput | DocsIndexInput;
843
- type Path = string;
844
-
845
- interface Options$1 {
846
- allowRegExp: boolean;
847
- allowFunction: boolean;
848
- allowSymbol: boolean;
849
- allowDate: boolean;
850
- allowUndefined: boolean;
851
- allowClass: boolean;
852
- maxDepth: number;
853
- space: number | undefined;
854
- lazyEval: boolean;
855
- }
856
856
 
857
857
  /**
858
858
  * ⚠️ This file contains internal WIP types they MUST NOT be exported outside this package for now!
@@ -1152,6 +1152,7 @@ interface StorybookConfig$1 {
1152
1152
  type PresetValue<T> = T | ((config: T, options: Options) => T | Promise<T>);
1153
1153
  type PresetProperty<K, TStorybookConfig = StorybookConfig$1> = TStorybookConfig[K extends keyof TStorybookConfig ? K : never] | PresetPropertyFn<K, TStorybookConfig>;
1154
1154
  type PresetPropertyFn<K, TStorybookConfig = StorybookConfig$1, TOptions = {}> = (config: TStorybookConfig[K extends keyof TStorybookConfig ? K : never], options: Options & TOptions) => TStorybookConfig[K extends keyof TStorybookConfig ? K : never] | Promise<TStorybookConfig[K extends keyof TStorybookConfig ? K : never]>;
1155
+ type Path = string;
1155
1156
 
1156
1157
  type FrameworkName = '@storybook/react-vite';
1157
1158
  type BuilderName = '@storybook/builder-vite';
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export { F as FrameworkOptions, S as StorybookConfig } from './index-be37cf18.js';
1
+ export { F as FrameworkOptions, S as StorybookConfig } from './index-ad3faad0.js';
2
2
  import 'file-system-cache';
3
3
  import '@babel/core';
4
4
  import 'http';
package/dist/preset.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { P as PresetProperty, S as StorybookConfig } from './index-be37cf18.js';
1
+ import { P as PresetProperty, S as StorybookConfig } from './index-ad3faad0.js';
2
2
  import 'file-system-cache';
3
3
  import '@babel/core';
4
4
  import 'http';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/react-vite",
3
- "version": "7.4.0-alpha.0",
3
+ "version": "7.4.0-alpha.2",
4
4
  "description": "Storybook for React and Vite: Develop React components in isolation with Hot Reloading.",
5
5
  "keywords": [
6
6
  "storybook"
@@ -37,10 +37,10 @@
37
37
  "types": "dist/index.d.ts",
38
38
  "files": [
39
39
  "dist/**/*",
40
- "template/**/*",
41
40
  "README.md",
42
41
  "*.js",
43
- "*.d.ts"
42
+ "*.d.ts",
43
+ "!src/**/*"
44
44
  ],
45
45
  "scripts": {
46
46
  "check": "../../../scripts/prepare/check.ts",
@@ -49,8 +49,8 @@
49
49
  "dependencies": {
50
50
  "@joshwooding/vite-plugin-react-docgen-typescript": "0.2.1",
51
51
  "@rollup/pluginutils": "^5.0.2",
52
- "@storybook/builder-vite": "7.4.0-alpha.0",
53
- "@storybook/react": "7.4.0-alpha.0",
52
+ "@storybook/builder-vite": "7.4.0-alpha.2",
53
+ "@storybook/react": "7.4.0-alpha.2",
54
54
  "@vitejs/plugin-react": "^3.0.1",
55
55
  "ast-types": "^0.14.2",
56
56
  "magic-string": "^0.30.0",
package/src/typings.d.ts DELETED
@@ -1,44 +0,0 @@
1
- // TODO: Replace, as soon as @types/react-dom 17.0.14 is used
2
- // Source: https://github.com/DefinitelyTyped/DefinitelyTyped/blob/fb0f14b7a35cde26ffaa82e7536c062e593e9ae6/types/react-dom/client.d.ts
3
- declare module 'react-dom/client' {
4
- import React = require('react');
5
-
6
- export interface HydrationOptions {
7
- onHydrated?(suspenseInstance: Comment): void;
8
- onDeleted?(suspenseInstance: Comment): void;
9
- /**
10
- * Prefix for `useId`.
11
- */
12
- identifierPrefix?: string;
13
- onRecoverableError?: (error: unknown) => void;
14
- }
15
-
16
- export interface RootOptions {
17
- /**
18
- * Prefix for `useId`.
19
- */
20
- identifierPrefix?: string;
21
- onRecoverableError?: (error: unknown) => void;
22
- }
23
-
24
- export interface Root {
25
- render(children: React.ReactChild | Iterable<React.ReactNode>): void;
26
- unmount(): void;
27
- }
28
-
29
- /**
30
- * Replaces `ReactDOM.render` when the `.render` method is called and enables Concurrent Mode.
31
- *
32
- * @see https://reactjs.org/docs/concurrent-mode-reference.html#createroot
33
- */
34
- export function createRoot(
35
- container: Element | Document | DocumentFragment | Comment,
36
- options?: RootOptions
37
- ): Root;
38
-
39
- export function hydrateRoot(
40
- container: Element | Document | DocumentFragment | Comment,
41
- initialChildren: React.ReactChild | Iterable<React.ReactNode>,
42
- options?: HydrationOptions
43
- ): Root;
44
- }