@storybook/preact 6.5.9 → 7.0.0-alpha.10
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -29
- package/dist/chunk-G45LXJLH.mjs +4 -0
- package/dist/config.d.ts +11 -0
- package/dist/config.js +4 -0
- package/dist/config.mjs +1 -0
- package/dist/index.d.ts +51 -0
- package/dist/index.js +4 -0
- package/dist/index.mjs +1 -0
- package/dist/types-ed8e97dc.d.ts +17 -0
- package/package.json +34 -35
- package/preview.js +1 -0
- package/bin/build.js +0 -4
- package/bin/index.js +0 -3
- package/dist/cjs/client/index.js +0 -85
- package/dist/cjs/client/preview/config.js +0 -19
- package/dist/cjs/client/preview/globals.js +0 -11
- package/dist/cjs/client/preview/index.js +0 -50
- package/dist/cjs/client/preview/render.js +0 -100
- package/dist/cjs/client/preview/types-6-0.js +0 -5
- package/dist/cjs/client/preview/types-7-0.js +0 -5
- package/dist/cjs/client/preview/types.js +0 -1
- package/dist/cjs/server/build.js +0 -9
- package/dist/cjs/server/framework-preset-preact.js +0 -46
- package/dist/cjs/server/index.js +0 -9
- package/dist/cjs/server/options.js +0 -17
- package/dist/esm/client/index.js +0 -2
- package/dist/esm/client/preview/config.js +0 -4
- package/dist/esm/client/preview/globals.js +0 -6
- package/dist/esm/client/preview/index.js +0 -27
- package/dist/esm/client/preview/render.js +0 -61
- package/dist/esm/client/preview/types-6-0.js +0 -1
- package/dist/esm/client/preview/types-7-0.js +0 -1
- package/dist/esm/client/preview/types.js +0 -0
- package/dist/esm/server/build.js +0 -3
- package/dist/esm/server/framework-preset-preact.js +0 -29
- package/dist/esm/server/index.js +0 -3
- package/dist/esm/server/options.js +0 -8
- package/dist/modern/client/index.js +0 -2
- package/dist/modern/client/preview/config.js +0 -4
- package/dist/modern/client/preview/globals.js +0 -8
- package/dist/modern/client/preview/index.js +0 -19
- package/dist/modern/client/preview/render.js +0 -57
- package/dist/modern/client/preview/types-6-0.js +0 -1
- package/dist/modern/client/preview/types-7-0.js +0 -1
- package/dist/modern/client/preview/types.js +0 -0
- package/dist/modern/server/build.js +0 -3
- package/dist/modern/server/framework-preset-preact.js +0 -29
- package/dist/modern/server/index.js +0 -3
- package/dist/modern/server/options.js +0 -8
- package/dist/ts3.4/client/index.d.ts +0 -2
- package/dist/ts3.4/client/preview/config.d.ts +0 -4
- package/dist/ts3.4/client/preview/globals.d.ts +0 -1
- package/dist/ts3.4/client/preview/index.d.ts +0 -24
- package/dist/ts3.4/client/preview/render.d.ts +0 -3
- package/dist/ts3.4/client/preview/types-6-0.d.ts +0 -35
- package/dist/ts3.4/client/preview/types-7-0.d.ts +0 -9
- package/dist/ts3.4/client/preview/types.d.ts +0 -14
- package/dist/ts3.4/server/build.d.ts +0 -1
- package/dist/ts3.4/server/framework-preset-preact.d.ts +0 -6
- package/dist/ts3.4/server/index.d.ts +0 -1
- package/dist/ts3.4/server/options.d.ts +0 -3
- package/dist/ts3.9/client/index.d.ts +0 -2
- package/dist/ts3.9/client/preview/config.d.ts +0 -4
- package/dist/ts3.9/client/preview/globals.d.ts +0 -1
- package/dist/ts3.9/client/preview/index.d.ts +0 -24
- package/dist/ts3.9/client/preview/render.d.ts +0 -3
- package/dist/ts3.9/client/preview/types-6-0.d.ts +0 -35
- package/dist/ts3.9/client/preview/types-7-0.d.ts +0 -9
- package/dist/ts3.9/client/preview/types.d.ts +0 -14
- package/dist/ts3.9/server/build.d.ts +0 -1
- package/dist/ts3.9/server/framework-preset-preact.d.ts +0 -6
- package/dist/ts3.9/server/index.d.ts +0 -1
- package/dist/ts3.9/server/options.d.ts +0 -3
- package/preset.js +0 -1
- package/standalone.js +0 -8
- package/types-6-0.d.ts +0 -1
- package/types-7-0.d.ts +0 -1
@@ -1,27 +0,0 @@
|
|
1
|
-
import "core-js/modules/es.array.concat.js";
|
2
|
-
|
3
|
-
/* eslint-disable prefer-destructuring */
|
4
|
-
import { start } from '@storybook/core';
|
5
|
-
import './globals';
|
6
|
-
import { renderToDOM } from './render';
|
7
|
-
var framework = 'preact';
|
8
|
-
var api = start(renderToDOM);
|
9
|
-
export var storiesOf = function storiesOf(kind, m) {
|
10
|
-
return api.clientApi.storiesOf(kind, m).addParameters({
|
11
|
-
framework: framework
|
12
|
-
});
|
13
|
-
};
|
14
|
-
export var configure = function configure() {
|
15
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
16
|
-
args[_key] = arguments[_key];
|
17
|
-
}
|
18
|
-
|
19
|
-
return api.configure.apply(api, [framework].concat(args));
|
20
|
-
};
|
21
|
-
export var addDecorator = api.clientApi.addDecorator;
|
22
|
-
export var addParameters = api.clientApi.addParameters;
|
23
|
-
export var clearDecorators = api.clientApi.clearDecorators;
|
24
|
-
export var setAddon = api.clientApi.setAddon;
|
25
|
-
export var forceReRender = api.forceReRender;
|
26
|
-
export var getStorybook = api.clientApi.getStorybook;
|
27
|
-
export var raw = api.clientApi.raw;
|
@@ -1,61 +0,0 @@
|
|
1
|
-
var _templateObject;
|
2
|
-
|
3
|
-
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
4
|
-
|
5
|
-
import "core-js/modules/es.function.name.js";
|
6
|
-
import "core-js/modules/es.array.concat.js";
|
7
|
-
import "core-js/modules/es.array.slice.js";
|
8
|
-
import "core-js/modules/es.object.freeze.js";
|
9
|
-
import * as preact from 'preact';
|
10
|
-
import dedent from 'ts-dedent';
|
11
|
-
var renderedStory;
|
12
|
-
|
13
|
-
function preactRender(story, domElement) {
|
14
|
-
if (preact.Fragment) {
|
15
|
-
// Preact 10 only:
|
16
|
-
preact.render(story, domElement);
|
17
|
-
} else {
|
18
|
-
renderedStory = preact.render(story, domElement, renderedStory);
|
19
|
-
}
|
20
|
-
}
|
21
|
-
|
22
|
-
var StoryHarness = function StoryHarness(_ref) {
|
23
|
-
var showError = _ref.showError,
|
24
|
-
name = _ref.name,
|
25
|
-
title = _ref.title,
|
26
|
-
storyFn = _ref.storyFn,
|
27
|
-
domElement = _ref.domElement;
|
28
|
-
var content = preact.h(storyFn, null);
|
29
|
-
|
30
|
-
if (!content) {
|
31
|
-
showError({
|
32
|
-
title: "Expecting a Preact element from the story: \"".concat(name, "\" of \"").concat(title, "\"."),
|
33
|
-
description: dedent(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n Did you forget to return the Preact element from the story?\n Use \"() => (<MyComp/>)\" or \"() => { return <MyComp/>; }\" when defining the story.\n "])))
|
34
|
-
});
|
35
|
-
return null;
|
36
|
-
}
|
37
|
-
|
38
|
-
return content;
|
39
|
-
};
|
40
|
-
|
41
|
-
export function renderToDOM(_ref2, domElement) {
|
42
|
-
var storyFn = _ref2.storyFn,
|
43
|
-
title = _ref2.title,
|
44
|
-
name = _ref2.name,
|
45
|
-
showMain = _ref2.showMain,
|
46
|
-
showError = _ref2.showError,
|
47
|
-
forceRemount = _ref2.forceRemount;
|
48
|
-
|
49
|
-
if (forceRemount) {
|
50
|
-
preactRender(null, domElement);
|
51
|
-
}
|
52
|
-
|
53
|
-
showMain();
|
54
|
-
preactRender(preact.h(StoryHarness, {
|
55
|
-
name: name,
|
56
|
-
title: title,
|
57
|
-
showError: showError,
|
58
|
-
storyFn: storyFn,
|
59
|
-
domElement: domElement
|
60
|
-
}), domElement);
|
61
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
File without changes
|
package/dist/esm/server/build.js
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
2
|
-
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
4
|
-
|
5
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
-
|
7
|
-
import path from 'path';
|
8
|
-
import { findDistEsm } from '@storybook/core-common';
|
9
|
-
export function babelDefault(config) {
|
10
|
-
return _objectSpread(_objectSpread({}, config), {}, {
|
11
|
-
plugins: [...config.plugins, [require.resolve('@babel/plugin-transform-react-jsx'), {
|
12
|
-
pragma: 'h'
|
13
|
-
}, 'preset']]
|
14
|
-
});
|
15
|
-
}
|
16
|
-
export function webpackFinal(config) {
|
17
|
-
return _objectSpread(_objectSpread({}, config), {}, {
|
18
|
-
resolve: _objectSpread(_objectSpread({}, config.resolve), {}, {
|
19
|
-
alias: _objectSpread(_objectSpread({}, config.resolve.alias), {}, {
|
20
|
-
react: path.dirname(require.resolve('preact/compat/package.json')),
|
21
|
-
'react-dom/test-utils': path.dirname(require.resolve('preact/test-utils/package.json')),
|
22
|
-
'react-dom': path.dirname(require.resolve('preact/compat/package.json'))
|
23
|
-
})
|
24
|
-
})
|
25
|
-
});
|
26
|
-
}
|
27
|
-
export var previewAnnotations = function (entry = []) {
|
28
|
-
return [...entry, findDistEsm(__dirname, 'client/preview/config')];
|
29
|
-
};
|
package/dist/esm/server/index.js
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
/* eslint-disable prefer-destructuring */
|
2
|
-
import { start } from '@storybook/core';
|
3
|
-
import './globals';
|
4
|
-
import { renderToDOM } from './render';
|
5
|
-
const framework = 'preact';
|
6
|
-
const api = start(renderToDOM);
|
7
|
-
export const storiesOf = (kind, m) => {
|
8
|
-
return api.clientApi.storiesOf(kind, m).addParameters({
|
9
|
-
framework
|
10
|
-
});
|
11
|
-
};
|
12
|
-
export const configure = (...args) => api.configure(framework, ...args);
|
13
|
-
export const addDecorator = api.clientApi.addDecorator;
|
14
|
-
export const addParameters = api.clientApi.addParameters;
|
15
|
-
export const clearDecorators = api.clientApi.clearDecorators;
|
16
|
-
export const setAddon = api.clientApi.setAddon;
|
17
|
-
export const forceReRender = api.forceReRender;
|
18
|
-
export const getStorybook = api.clientApi.getStorybook;
|
19
|
-
export const raw = api.clientApi.raw;
|
@@ -1,57 +0,0 @@
|
|
1
|
-
import * as preact from 'preact';
|
2
|
-
import dedent from 'ts-dedent';
|
3
|
-
let renderedStory;
|
4
|
-
|
5
|
-
function preactRender(story, domElement) {
|
6
|
-
if (preact.Fragment) {
|
7
|
-
// Preact 10 only:
|
8
|
-
preact.render(story, domElement);
|
9
|
-
} else {
|
10
|
-
renderedStory = preact.render(story, domElement, renderedStory);
|
11
|
-
}
|
12
|
-
}
|
13
|
-
|
14
|
-
const StoryHarness = ({
|
15
|
-
showError,
|
16
|
-
name,
|
17
|
-
title,
|
18
|
-
storyFn,
|
19
|
-
domElement
|
20
|
-
}) => {
|
21
|
-
const content = preact.h(storyFn, null);
|
22
|
-
|
23
|
-
if (!content) {
|
24
|
-
showError({
|
25
|
-
title: `Expecting a Preact element from the story: "${name}" of "${title}".`,
|
26
|
-
description: dedent`
|
27
|
-
Did you forget to return the Preact element from the story?
|
28
|
-
Use "() => (<MyComp/>)" or "() => { return <MyComp/>; }" when defining the story.
|
29
|
-
`
|
30
|
-
});
|
31
|
-
return null;
|
32
|
-
}
|
33
|
-
|
34
|
-
return content;
|
35
|
-
};
|
36
|
-
|
37
|
-
export function renderToDOM({
|
38
|
-
storyFn,
|
39
|
-
title,
|
40
|
-
name,
|
41
|
-
showMain,
|
42
|
-
showError,
|
43
|
-
forceRemount
|
44
|
-
}, domElement) {
|
45
|
-
if (forceRemount) {
|
46
|
-
preactRender(null, domElement);
|
47
|
-
}
|
48
|
-
|
49
|
-
showMain();
|
50
|
-
preactRender(preact.h(StoryHarness, {
|
51
|
-
name,
|
52
|
-
title,
|
53
|
-
showError,
|
54
|
-
storyFn,
|
55
|
-
domElement
|
56
|
-
}), domElement);
|
57
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
File without changes
|
@@ -1,29 +0,0 @@
|
|
1
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
2
|
-
|
3
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
4
|
-
|
5
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
6
|
-
|
7
|
-
import path from 'path';
|
8
|
-
import { findDistEsm } from '@storybook/core-common';
|
9
|
-
export function babelDefault(config) {
|
10
|
-
return _objectSpread(_objectSpread({}, config), {}, {
|
11
|
-
plugins: [...config.plugins, [require.resolve('@babel/plugin-transform-react-jsx'), {
|
12
|
-
pragma: 'h'
|
13
|
-
}, 'preset']]
|
14
|
-
});
|
15
|
-
}
|
16
|
-
export function webpackFinal(config) {
|
17
|
-
return _objectSpread(_objectSpread({}, config), {}, {
|
18
|
-
resolve: _objectSpread(_objectSpread({}, config.resolve), {}, {
|
19
|
-
alias: _objectSpread(_objectSpread({}, config.resolve.alias), {}, {
|
20
|
-
react: path.dirname(require.resolve('preact/compat/package.json')),
|
21
|
-
'react-dom/test-utils': path.dirname(require.resolve('preact/test-utils/package.json')),
|
22
|
-
'react-dom': path.dirname(require.resolve('preact/compat/package.json'))
|
23
|
-
})
|
24
|
-
})
|
25
|
-
});
|
26
|
-
}
|
27
|
-
export var previewAnnotations = function (entry = []) {
|
28
|
-
return [...entry, findDistEsm(__dirname, 'client/preview/config')];
|
29
|
-
};
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,24 +0,0 @@
|
|
1
|
-
/// <reference types="webpack-env" />
|
2
|
-
/// <reference types="node" />
|
3
|
-
import { ClientStoryApi, Loadable } from '@storybook/addons';
|
4
|
-
import './globals';
|
5
|
-
import { IStorybookSection } from './types';
|
6
|
-
import { PreactFramework } from './types-6-0';
|
7
|
-
export interface ClientApi extends ClientStoryApi<PreactFramework['storyResult']> {
|
8
|
-
setAddon(addon: any): void;
|
9
|
-
configure(loader: Loadable, module: NodeModule): void;
|
10
|
-
getStorybook(): IStorybookSection[];
|
11
|
-
clearDecorators(): void;
|
12
|
-
forceReRender(): void;
|
13
|
-
raw: () => any;
|
14
|
-
load: (...args: any[]) => void;
|
15
|
-
}
|
16
|
-
export declare const storiesOf: ClientApi['storiesOf'];
|
17
|
-
export declare const configure: ClientApi['configure'];
|
18
|
-
export declare const addDecorator: ClientApi['addDecorator'];
|
19
|
-
export declare const addParameters: ClientApi['addParameters'];
|
20
|
-
export declare const clearDecorators: ClientApi['clearDecorators'];
|
21
|
-
export declare const setAddon: ClientApi['setAddon'];
|
22
|
-
export declare const forceReRender: ClientApi['forceReRender'];
|
23
|
-
export declare const getStorybook: ClientApi['getStorybook'];
|
24
|
-
export declare const raw: ClientApi['raw'];
|
@@ -1,35 +0,0 @@
|
|
1
|
-
import { AnyComponent } from 'preact';
|
2
|
-
import { Args, ComponentAnnotations, StoryAnnotations, AnnotatedStoryFn } from '@storybook/csf';
|
3
|
-
import { StoryFnPreactReturnType } from './types';
|
4
|
-
export { Args, ArgTypes, Parameters, StoryContext } from '@storybook/csf';
|
5
|
-
export declare type PreactFramework = {
|
6
|
-
component: AnyComponent<any, any>;
|
7
|
-
storyResult: StoryFnPreactReturnType;
|
8
|
-
};
|
9
|
-
/**
|
10
|
-
* Metadata to configure the stories for a component.
|
11
|
-
*
|
12
|
-
* @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export)
|
13
|
-
*/
|
14
|
-
export declare type Meta<TArgs = Args> = ComponentAnnotations<PreactFramework, TArgs>;
|
15
|
-
/**
|
16
|
-
* Story function that represents a CSFv2 component example.
|
17
|
-
*
|
18
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
19
|
-
*/
|
20
|
-
export declare type StoryFn<TArgs = Args> = AnnotatedStoryFn<PreactFramework, TArgs>;
|
21
|
-
/**
|
22
|
-
* Story function that represents a CSFv3 component example.
|
23
|
-
*
|
24
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
25
|
-
*/
|
26
|
-
export declare type StoryObj<TArgs = Args> = StoryAnnotations<PreactFramework, TArgs>;
|
27
|
-
/**
|
28
|
-
* Story function that represents a CSFv2 component example.
|
29
|
-
*
|
30
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
31
|
-
*
|
32
|
-
* NOTE that in Storybook 7.0, this type will be renamed to `StoryFn` and replaced by the current `StoryObj` type.
|
33
|
-
*
|
34
|
-
*/
|
35
|
-
export declare type Story<TArgs = Args> = StoryFn<TArgs>;
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import { Args } from '@storybook/csf';
|
2
|
-
import { StoryObj } from './types-6-0';
|
3
|
-
export { StoryFn, StoryObj, Meta } from './types-6-0';
|
4
|
-
/**
|
5
|
-
* Story function that represents a CSFv3 component example.
|
6
|
-
*
|
7
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
8
|
-
*/
|
9
|
-
export declare type Story<TArgs = Args> = StoryObj<TArgs>;
|
@@ -1,14 +0,0 @@
|
|
1
|
-
export { RenderContext } from '@storybook/core';
|
2
|
-
export declare type StoryFnPreactReturnType = string | Node | preact.JSX.Element;
|
3
|
-
export interface ShowErrorArgs {
|
4
|
-
title: string;
|
5
|
-
description: string;
|
6
|
-
}
|
7
|
-
export interface IStorybookStory {
|
8
|
-
name: string;
|
9
|
-
render: (context: any) => any;
|
10
|
-
}
|
11
|
-
export interface IStorybookSection {
|
12
|
-
kind: string;
|
13
|
-
stories: IStorybookStory[];
|
14
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import { TransformOptions } from '@babel/core';
|
2
|
-
import { Configuration } from 'webpack';
|
3
|
-
import { StorybookConfig } from '@storybook/core-common';
|
4
|
-
export declare function babelDefault(config: TransformOptions): TransformOptions;
|
5
|
-
export declare function webpackFinal(config: Configuration): Configuration;
|
6
|
-
export declare const previewAnnotations: StorybookConfig['previewAnnotations'];
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,24 +0,0 @@
|
|
1
|
-
/// <reference types="webpack-env" />
|
2
|
-
/// <reference types="node" />
|
3
|
-
import type { ClientStoryApi, Loadable } from '@storybook/addons';
|
4
|
-
import './globals';
|
5
|
-
import type { IStorybookSection } from './types';
|
6
|
-
import type { PreactFramework } from './types-6-0';
|
7
|
-
export interface ClientApi extends ClientStoryApi<PreactFramework['storyResult']> {
|
8
|
-
setAddon(addon: any): void;
|
9
|
-
configure(loader: Loadable, module: NodeModule): void;
|
10
|
-
getStorybook(): IStorybookSection[];
|
11
|
-
clearDecorators(): void;
|
12
|
-
forceReRender(): void;
|
13
|
-
raw: () => any;
|
14
|
-
load: (...args: any[]) => void;
|
15
|
-
}
|
16
|
-
export declare const storiesOf: ClientApi['storiesOf'];
|
17
|
-
export declare const configure: ClientApi['configure'];
|
18
|
-
export declare const addDecorator: ClientApi['addDecorator'];
|
19
|
-
export declare const addParameters: ClientApi['addParameters'];
|
20
|
-
export declare const clearDecorators: ClientApi['clearDecorators'];
|
21
|
-
export declare const setAddon: ClientApi['setAddon'];
|
22
|
-
export declare const forceReRender: ClientApi['forceReRender'];
|
23
|
-
export declare const getStorybook: ClientApi['getStorybook'];
|
24
|
-
export declare const raw: ClientApi['raw'];
|
@@ -1,35 +0,0 @@
|
|
1
|
-
import type { AnyComponent } from 'preact';
|
2
|
-
import type { Args, ComponentAnnotations, StoryAnnotations, AnnotatedStoryFn } from '@storybook/csf';
|
3
|
-
import type { StoryFnPreactReturnType } from './types';
|
4
|
-
export type { Args, ArgTypes, Parameters, StoryContext } from '@storybook/csf';
|
5
|
-
export declare type PreactFramework = {
|
6
|
-
component: AnyComponent<any, any>;
|
7
|
-
storyResult: StoryFnPreactReturnType;
|
8
|
-
};
|
9
|
-
/**
|
10
|
-
* Metadata to configure the stories for a component.
|
11
|
-
*
|
12
|
-
* @see [Default export](https://storybook.js.org/docs/formats/component-story-format/#default-export)
|
13
|
-
*/
|
14
|
-
export declare type Meta<TArgs = Args> = ComponentAnnotations<PreactFramework, TArgs>;
|
15
|
-
/**
|
16
|
-
* Story function that represents a CSFv2 component example.
|
17
|
-
*
|
18
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
19
|
-
*/
|
20
|
-
export declare type StoryFn<TArgs = Args> = AnnotatedStoryFn<PreactFramework, TArgs>;
|
21
|
-
/**
|
22
|
-
* Story function that represents a CSFv3 component example.
|
23
|
-
*
|
24
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
25
|
-
*/
|
26
|
-
export declare type StoryObj<TArgs = Args> = StoryAnnotations<PreactFramework, TArgs>;
|
27
|
-
/**
|
28
|
-
* Story function that represents a CSFv2 component example.
|
29
|
-
*
|
30
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
31
|
-
*
|
32
|
-
* NOTE that in Storybook 7.0, this type will be renamed to `StoryFn` and replaced by the current `StoryObj` type.
|
33
|
-
*
|
34
|
-
*/
|
35
|
-
export declare type Story<TArgs = Args> = StoryFn<TArgs>;
|
@@ -1,9 +0,0 @@
|
|
1
|
-
import type { Args } from '@storybook/csf';
|
2
|
-
import type { StoryObj } from './types-6-0';
|
3
|
-
export type { StoryFn, StoryObj, Meta } from './types-6-0';
|
4
|
-
/**
|
5
|
-
* Story function that represents a CSFv3 component example.
|
6
|
-
*
|
7
|
-
* @see [Named Story exports](https://storybook.js.org/docs/formats/component-story-format/#named-story-exports)
|
8
|
-
*/
|
9
|
-
export declare type Story<TArgs = Args> = StoryObj<TArgs>;
|
@@ -1,14 +0,0 @@
|
|
1
|
-
export type { RenderContext } from '@storybook/core';
|
2
|
-
export declare type StoryFnPreactReturnType = string | Node | preact.JSX.Element;
|
3
|
-
export interface ShowErrorArgs {
|
4
|
-
title: string;
|
5
|
-
description: string;
|
6
|
-
}
|
7
|
-
export interface IStorybookStory {
|
8
|
-
name: string;
|
9
|
-
render: (context: any) => any;
|
10
|
-
}
|
11
|
-
export interface IStorybookSection {
|
12
|
-
kind: string;
|
13
|
-
stories: IStorybookStory[];
|
14
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
@@ -1,6 +0,0 @@
|
|
1
|
-
import type { TransformOptions } from '@babel/core';
|
2
|
-
import type { Configuration } from 'webpack';
|
3
|
-
import type { StorybookConfig } from '@storybook/core-common';
|
4
|
-
export declare function babelDefault(config: TransformOptions): TransformOptions;
|
5
|
-
export declare function webpackFinal(config: Configuration): Configuration;
|
6
|
-
export declare const previewAnnotations: StorybookConfig['previewAnnotations'];
|
@@ -1 +0,0 @@
|
|
1
|
-
export {};
|
package/preset.js
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
module.exports = require('./dist/cjs/server/framework-preset-preact');
|
package/standalone.js
DELETED
package/types-6-0.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './dist/ts3.9/client/preview/types-6-0.d';
|
package/types-7-0.d.ts
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
export * from './dist/ts3.9/client/preview/types-7-0.d';
|