@newhighsco/storybook-preset 10.2.109 → 10.2.111
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/index.d.ts +0 -4
- package/dist/index.js +2 -3
- package/dist/preset.mjs +2 -4
- package/dist/{preview-CFhaSxq-.js → preview-DAZDFyE1.js} +5 -10
- package/dist/preview.d.ts +1 -3
- package/dist/preview.js +1 -1
- package/package.json +8 -8
package/dist/index.d.ts
CHANGED
|
@@ -3,7 +3,6 @@ import { ComponentProps } from "react";
|
|
|
3
3
|
import "storybook/theming";
|
|
4
4
|
import { Decorator, Parameters, StoryObj } from "@storybook/react-webpack5";
|
|
5
5
|
import { Viewport } from "storybook/viewport";
|
|
6
|
-
//#region src/utils.d.ts
|
|
7
6
|
type Story<T> = StoryObj<ComponentProps<T>>;
|
|
8
7
|
interface Options<T> {
|
|
9
8
|
args?: ComponentProps<T>;
|
|
@@ -16,8 +15,5 @@ export declare const modes: (breakpoints?: string[]) => Record<string, {
|
|
|
16
15
|
viewport: string;
|
|
17
16
|
}>;
|
|
18
17
|
export declare function snapshot<T>(story: Story<T> | Array<Story<T>>, { args, decorator, parameters, tags }?: Options<T>): Story<T>;
|
|
19
|
-
//#endregion
|
|
20
|
-
//#region src/index.d.ts
|
|
21
18
|
declare const _default: () => PreviewAddon;
|
|
22
|
-
//#endregion
|
|
23
19
|
export { _default as default };
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { a as snapshot, i as modes, o as viewports, r as preview_exports } from "./preview-
|
|
1
|
+
import { a as snapshot, i as modes, o as viewports, r as preview_exports } from "./preview-DAZDFyE1.js";
|
|
2
2
|
import { definePreviewAddon } from "storybook/internal/csf";
|
|
3
|
-
|
|
3
|
+
// src/index.ts
|
|
4
4
|
var src_default = () => definePreviewAddon(preview_exports);
|
|
5
|
-
//#endregion
|
|
6
5
|
export { src_default as default, modes, snapshot, viewports };
|
package/dist/preset.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/loaders.ts
|
|
2
2
|
const filter = (url) => {
|
|
3
3
|
if (url.startsWith("/")) return false;
|
|
4
4
|
return true;
|
|
@@ -30,8 +30,7 @@ const cssLoaders = (test = /\.css$/, importLoaders = []) => {
|
|
|
30
30
|
]
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
|
|
34
|
-
//#region src/preset.ts
|
|
33
|
+
// src/preset.ts
|
|
35
34
|
const addons = [
|
|
36
35
|
"@storybook/addon-webpack5-compiler-swc",
|
|
37
36
|
"@storybook/addon-a11y",
|
|
@@ -55,5 +54,4 @@ const core = (config) => ({
|
|
|
55
54
|
disableTelemetry: true,
|
|
56
55
|
enableCrashReports: false
|
|
57
56
|
});
|
|
58
|
-
//#endregion
|
|
59
57
|
export { addons, core };
|
|
@@ -3,7 +3,7 @@ import React, { Fragment } from "react";
|
|
|
3
3
|
import { Spaced, TabWrapper } from "storybook/internal/components";
|
|
4
4
|
import { ThemeProvider, convert, ensure, themes } from "storybook/theming";
|
|
5
5
|
import { breakpoints } from "@newhighsco/chipset";
|
|
6
|
-
|
|
6
|
+
// \0rolldown/runtime.js
|
|
7
7
|
var __defProp = Object.defineProperty;
|
|
8
8
|
var __exportAll = (all, no_symbols) => {
|
|
9
9
|
let target = {};
|
|
@@ -14,11 +14,9 @@ var __exportAll = (all, no_symbols) => {
|
|
|
14
14
|
if (!no_symbols) __defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
15
15
|
return target;
|
|
16
16
|
};
|
|
17
|
-
|
|
18
|
-
//#region src/components/DocsPage/index.tsx
|
|
17
|
+
// src/components/DocsPage/index.tsx
|
|
19
18
|
const DocsPage = () => /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(Title, null), /* @__PURE__ */ React.createElement(Subtitle, null), /* @__PURE__ */ React.createElement(Description, null), /* @__PURE__ */ React.createElement(Source, null), /* @__PURE__ */ React.createElement(TabWrapper, null, /* @__PURE__ */ React.createElement(Primary, null)), /* @__PURE__ */ React.createElement(Controls, null), /* @__PURE__ */ React.createElement(Stories, { includePrimary: false }));
|
|
20
|
-
|
|
21
|
-
//#region src/decorators/snapshot.jsx
|
|
19
|
+
// src/decorators/snapshot.jsx
|
|
22
20
|
const isSnapshotStory = (context) => {
|
|
23
21
|
const { parameters, viewMode } = context;
|
|
24
22
|
return parameters?.chromatic?.disableSnapshot === false && viewMode === "story";
|
|
@@ -27,8 +25,7 @@ const WithSnapshot = (Story, context) => {
|
|
|
27
25
|
if (!isSnapshotStory(context)) return /* @__PURE__ */ React.createElement(Story, null);
|
|
28
26
|
return /* @__PURE__ */ React.createElement(ThemeProvider, { theme: ensure(themes.normal) }, /* @__PURE__ */ React.createElement(Spaced, null, /* @__PURE__ */ React.createElement(Story, null)));
|
|
29
27
|
};
|
|
30
|
-
|
|
31
|
-
//#region src/utils.tsx
|
|
28
|
+
// src/utils.tsx
|
|
32
29
|
const useDarkMode = () => {
|
|
33
30
|
const dark = convert().base === themes.dark.base;
|
|
34
31
|
return [dark, dark ? themes.dark : themes.light];
|
|
@@ -73,8 +70,7 @@ function snapshot(story, { args, decorator, parameters, tags = [] } = {}) {
|
|
|
73
70
|
]
|
|
74
71
|
};
|
|
75
72
|
}
|
|
76
|
-
|
|
77
|
-
//#region src/preview.ts
|
|
73
|
+
// src/preview.ts
|
|
78
74
|
var preview_exports = /* @__PURE__ */ __exportAll({
|
|
79
75
|
decorators: () => decorators,
|
|
80
76
|
parameters: () => parameters
|
|
@@ -100,5 +96,4 @@ const parameters = {
|
|
|
100
96
|
viewMode: "docs",
|
|
101
97
|
viewport: { options: viewports }
|
|
102
98
|
};
|
|
103
|
-
//#endregion
|
|
104
99
|
export { snapshot as a, modes as i, parameters as n, viewports as o, preview_exports as r, decorators as t };
|
package/dist/preview.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
1
|
import { Preview } from "@storybook/react-webpack5";
|
|
2
|
-
//#region src/preview.d.ts
|
|
3
2
|
export declare const decorators: Preview['decorators'];
|
|
4
|
-
export declare const parameters: Preview['parameters'];
|
|
5
|
-
//#endregion
|
|
3
|
+
export declare const parameters: Preview['parameters'];
|
package/dist/preview.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as decorators, n as parameters } from "./preview-
|
|
1
|
+
export { t as decorators, n as parameters } from "./preview-DAZDFyE1.js";
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@newhighsco/storybook-preset",
|
|
3
3
|
"description": "New High Score shareable Storybook preset",
|
|
4
|
-
"version": "10.2.
|
|
4
|
+
"version": "10.2.111",
|
|
5
5
|
"author": "New High Score",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"repository": {
|
|
@@ -37,19 +37,19 @@
|
|
|
37
37
|
"build": "tsdown --log-level error"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@newhighsco/chipset": "7.5.
|
|
40
|
+
"@newhighsco/chipset": "7.5.5",
|
|
41
41
|
"@newhighsco/storybook-addon-svgr": "4.0.0",
|
|
42
42
|
"@newhighsco/storybook-addon-transpile-modules": "4.0.0",
|
|
43
|
-
"@storybook/addon-a11y": "10.6.
|
|
44
|
-
"@storybook/addon-docs": "10.6.
|
|
43
|
+
"@storybook/addon-a11y": "10.6.5",
|
|
44
|
+
"@storybook/addon-docs": "10.6.5",
|
|
45
45
|
"@storybook/addon-styling-webpack": "3.0.2",
|
|
46
46
|
"@storybook/addon-webpack5-compiler-swc": "4.0.3",
|
|
47
47
|
"css-loader": "7.1.5",
|
|
48
|
-
"postcss": "8.5.
|
|
48
|
+
"postcss": "8.5.32",
|
|
49
49
|
"postcss-loader": "8.2.1",
|
|
50
|
-
"sass": "1.106.
|
|
51
|
-
"sass-loader": "17.0
|
|
52
|
-
"storybook-addon-pseudo-states": "10.6.
|
|
50
|
+
"sass": "1.106.1",
|
|
51
|
+
"sass-loader": "17.1.0",
|
|
52
|
+
"storybook-addon-pseudo-states": "10.6.5",
|
|
53
53
|
"style-loader": "4.0.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|