@storybook/preact 8.0.0-alpha.0 → 8.0.0-alpha.10

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -16,24 +16,14 @@ type Meta<TArgs = Args> = ComponentAnnotations<PreactRenderer, TArgs>;
16
16
  */
17
17
  type StoryFn<TArgs = Args> = AnnotatedStoryFn<PreactRenderer, TArgs>;
18
18
  /**
19
- * Story function that represents a CSFv3 component example.
19
+ * Story object that represents a CSFv3 component example.
20
20
  *
21
21
  * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
22
22
  */
23
23
  type StoryObj<TArgs = Args> = StoryAnnotations<PreactRenderer, TArgs>;
24
- /**
25
- * @deprecated Use `StoryFn` instead.
26
- * Use `StoryObj` if you want to migrate to CSF3, which uses objects instead of functions to represent stories.
27
- * You can read more about the CSF3 format here: https://storybook.js.org/blog/component-story-format-3-0/
28
- *
29
- * Story function that represents a CSFv2 component example.
30
- *
31
- * @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
32
- */
33
- type Story<TArgs = Args> = StoryFn<TArgs>;
34
24
  type Decorator<TArgs = StrictArgs> = DecoratorFunction<PreactRenderer, TArgs>;
35
25
  type Loader<TArgs = StrictArgs> = LoaderFunction<PreactRenderer, TArgs>;
36
26
  type StoryContext<TArgs = StrictArgs> = StoryContext$1<PreactRenderer, TArgs>;
37
27
  type Preview = ProjectAnnotations<PreactRenderer>;
38
28
 
39
- export { Decorator, Loader, Meta, PreactRenderer, Preview, Story, StoryContext, StoryFn, StoryObj };
29
+ export { Decorator, Loader, Meta, PreactRenderer, Preview, StoryContext, StoryFn, StoryObj };
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var src_exports={};module.exports=__toCommonJS(src_exports);var import_global=require("@storybook/global"),{window:globalWindow}=import_global.global;globalWindow&&(globalWindow.STORYBOOK_ENV="preact");var _a;typeof module<"u"&&((_a=module==null?void 0:module.hot)==null||_a.decline());
1
+ "use strict";var __defProp=Object.defineProperty;var __getOwnPropDesc=Object.getOwnPropertyDescriptor;var __getOwnPropNames=Object.getOwnPropertyNames;var __hasOwnProp=Object.prototype.hasOwnProperty;var __copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to};var __toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod);var src_exports={};module.exports=__toCommonJS(src_exports);var import_global=require("@storybook/global"),{window:globalWindow}=import_global.global;globalWindow&&(globalWindow.STORYBOOK_ENV="preact");typeof module<"u"&&module?.hot?.decline();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storybook/preact",
3
- "version": "8.0.0-alpha.0",
3
+ "version": "8.0.0-alpha.10",
4
4
  "description": "Storybook Preact renderer",
5
5
  "keywords": [
6
6
  "storybook"
@@ -48,8 +48,8 @@
48
48
  },
49
49
  "dependencies": {
50
50
  "@storybook/global": "^5.0.0",
51
- "@storybook/preview-api": "8.0.0-alpha.0",
52
- "@storybook/types": "8.0.0-alpha.0",
51
+ "@storybook/preview-api": "8.0.0-alpha.10",
52
+ "@storybook/types": "8.0.0-alpha.10",
53
53
  "ts-dedent": "^2.0.0"
54
54
  },
55
55
  "devDependencies": {
@@ -60,7 +60,7 @@
60
60
  "preact": "^8.0.0||^10.0.0"
61
61
  },
62
62
  "engines": {
63
- "node": ">=16.0.0"
63
+ "node": ">=18.0.0"
64
64
  },
65
65
  "publishConfig": {
66
66
  "access": "public"
@@ -1,3 +1,4 @@
1
+ import { fn } from '@storybook/test';
1
2
  import { Button } from './Button';
2
3
 
3
4
  // More on how to set up stories at: https://storybook.js.org/docs/writing-stories
@@ -9,6 +10,8 @@ export default {
9
10
  backgroundColor: { control: 'color' },
10
11
  onClick: { action: 'onClick' },
11
12
  },
13
+ // Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
14
+ args: { onClick: fn() },
12
15
  };
13
16
 
14
17
  // More on writing stories with args: https://storybook.js.org/docs/writing-stories/args
package/jest.config.js DELETED
@@ -1,7 +0,0 @@
1
- const path = require('path');
2
- const baseConfig = require('../../jest.config.browser');
3
-
4
- module.exports = {
5
- ...baseConfig,
6
- displayName: __dirname.split(path.sep).slice(-2).join(path.posix.sep),
7
- };