@tcn/sb-blackcat-addon 0.0.1
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/README.md +97 -0
- package/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +3 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/preview.cjs +2 -0
- package/dist/preview.cjs.map +1 -0
- package/dist/preview.d.cts +15 -0
- package/dist/preview.d.ts +15 -0
- package/dist/preview.js +2 -0
- package/dist/preview.js.map +1 -0
- package/package.json +106 -0
- package/preview.js +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# Storybook Blackcat Addon
|
|
2
|
+
|
|
3
|
+
A Storybook addon that provides accessibility scaling and layout direction controls for your components. It adds these toolbar controls:
|
|
4
|
+
|
|
5
|
+
1. A scalar control to adjust component sizes based on user preferences
|
|
6
|
+
2. A direction control to switch between LTR and RTL layouts
|
|
7
|
+
|
|
8
|
+
## Requirements
|
|
9
|
+
|
|
10
|
+
- Storybook v8+
|
|
11
|
+
- React
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
yarn add -D @tcn/sb-blackcat-addon
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Configuration
|
|
20
|
+
|
|
21
|
+
Add the addon to your Storybook configuration:
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
// .storybook/main.ts
|
|
25
|
+
import type { StorybookConfig } from '@storybook/react-vite';
|
|
26
|
+
|
|
27
|
+
const config: StorybookConfig = {
|
|
28
|
+
stories: ['../src/**/*.mdx', '../src/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
|
|
29
|
+
addons: [
|
|
30
|
+
'@storybook/addon-links',
|
|
31
|
+
'@storybook/addon-essentials',
|
|
32
|
+
'@storybook/addon-onboarding',
|
|
33
|
+
'@storybook/addon-interactions',
|
|
34
|
+
'@tcn/sb-blackcat-addon',
|
|
35
|
+
],
|
|
36
|
+
framework: {
|
|
37
|
+
name: '@storybook/react-vite',
|
|
38
|
+
options: {},
|
|
39
|
+
},
|
|
40
|
+
docs: {
|
|
41
|
+
autodocs: 'tag',
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
export default config;
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
> Note: The addon ID `BLACKCAT_ADDON_ID` is exported from the package for future parameter configuration.
|
|
49
|
+
|
|
50
|
+
## Usage
|
|
51
|
+
|
|
52
|
+
### CSS Variables
|
|
53
|
+
|
|
54
|
+
The addon sets CSS variables that you can use in your components:
|
|
55
|
+
|
|
56
|
+
```css
|
|
57
|
+
/* Font size scaling */
|
|
58
|
+
.my-component {
|
|
59
|
+
font-size: calc(16px * var(--accessibility-scalar));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
/* Component sizing */
|
|
63
|
+
.my-component {
|
|
64
|
+
min-height: calc(100px * var(--accessibility-scalar));
|
|
65
|
+
padding: calc(16px * var(--accessibility-scalar));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/* When using data attributes,
|
|
69
|
+
* the scalar should typically still be applied per variant
|
|
70
|
+
* for responsive scaling */
|
|
71
|
+
|
|
72
|
+
[data-hierarchy="md"] {
|
|
73
|
+
min-height: calc(200px * var(--accessibility-scalar));
|
|
74
|
+
font-size: calc(14px * var(--accessibility-scalar));
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Available Values
|
|
79
|
+
|
|
80
|
+
#### Accessibility Scalar
|
|
81
|
+
|
|
82
|
+
The scalar can be set to any numeric value. The following values are pre-configured for testing:
|
|
83
|
+
|
|
84
|
+
| Value | Size |
|
|
85
|
+
|--------|-------------|
|
|
86
|
+
| 0.75 | Extra Small |
|
|
87
|
+
| 0.875 | Small |
|
|
88
|
+
| 1 | Medium |
|
|
89
|
+
| 1.125 | Large |
|
|
90
|
+
| 1.25 | Extra Large |
|
|
91
|
+
|
|
92
|
+
#### Direction
|
|
93
|
+
|
|
94
|
+
| Value | Description |
|
|
95
|
+
|-------|-------------------|
|
|
96
|
+
| ltr | Left to Right |
|
|
97
|
+
| rtl | Right to Left |
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"names":["ADDON_ID"],"mappings":"aAAO,IAAMA,CAAW,CAAA,mBAAA","file":"index.cjs","sourcesContent":["export const ADDON_ID = 'sb-blackcat-addon' as const;\nexport const TOOL_ID = `${ADDON_ID}/tool` as const;\n"]}
|
package/dist/index.d.cts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts"],"names":["ADDON_ID"],"mappings":"AAAO,IAAMA,CAAW,CAAA,mBAAA","file":"index.js","sourcesContent":["export const ADDON_ID = 'sb-blackcat-addon' as const;\nexport const TOOL_ID = `${ADDON_ID}/tool` as const;\n"]}
|
package/dist/preview.cjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
'use strict';var s=require('react');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var s__default=/*#__PURE__*/_interopDefault(s);var t="sb-blackcat-addon";var l=(i,e)=>{let o=e.globals.direction??"ltr",r=e.globals.scalar??1;return s.useEffect(()=>{document.body.dir=o;},[o]),s.useEffect(()=>{document.body.style.setProperty("--accessibility-scalar",r.toString());},[r]),s__default.default.createElement(i,null)};var c={parameters:{[t]:{}},globalTypes:{direction:{name:"Direction",description:"Layout direction of components based off user settings.",defaultValue:"ltr",toolbar:{icon:"transfer",items:[{value:"ltr",title:"Left to Right"},{value:"rtl",title:"Right to Left"}],showName:true}},scalar:{name:"Accessibility Scalar",description:"Scale text and component sizes based off user settings.",defaultValue:1,toolbar:{icon:"collapse",items:[{value:.75,title:"Extra Small"},{value:.875,title:"Small"},{value:1,title:"Medium"},{value:1.125,title:"Large"},{value:1.25,title:"Extra Large"}]}}},decorators:[l]},b=c;module.exports=b;//# sourceMappingURL=preview.cjs.map
|
|
2
|
+
//# sourceMappingURL=preview.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts","../src/decorator.tsx","../src/preview.tsx"],"names":["ADDON_ID","TOOL_ID","BlackcatDecorator","Story","context","direction","scalar","useEffect","React","preview","preview_default"],"mappings":"oJAAO,IAAMA,EAAW,mBACXC,CCEN,IAAMC,CAAAA,CAA+B,CAACC,CAAAA,CAAOC,IAAY,CAC9D,IAAMC,CAAYD,CAAAA,CAAAA,CAAQ,QAAQ,SAAa,EAAA,KAAA,CACzCE,CAASF,CAAAA,CAAAA,CAAQ,QAAQ,MAAU,EAAA,CAAA,CAGzC,OAAAG,WAAAA,CAAU,IAAM,CACd,QAAA,CAAS,KAAK,GAAMF,CAAAA,EACtB,EAAG,CAACA,CAAS,CAAC,CAAA,CAEdE,YAAU,IAAM,CACd,QAAS,CAAA,IAAA,CAAK,MAAM,WAAY,CAAA,wBAAA,CAA0BD,CAAO,CAAA,QAAA,EAAU,EAC7E,CAAA,CAAG,CAACA,CAAM,CAAC,CAEJE,CAAAA,kBAAAA,CAAA,aAACL,CAAAA,CAAAA,CAAA,IAAM,CAChB,CAAA,CCFMM,IAAAA,CAAAA,CAAmB,CACvB,UAAY,CAAA,CACV,CAACT,CAAQ,EAAG,EAId,EAOA,WAAa,CAAA,CACX,UAAW,CACT,IAAA,CAAM,WACN,CAAA,WAAA,CAAa,0DACb,YAAc,CAAA,KAAA,CACd,OAAS,CAAA,CACP,KAAM,UACN,CAAA,KAAA,CAAO,CACL,CAAE,MAAO,KAAO,CAAA,KAAA,CAAO,eAAgB,CAAA,CACvC,CAAE,KAAO,CAAA,KAAA,CAAO,KAAO,CAAA,eAAgB,CACzC,CACA,CAAA,QAAA,CAAU,IACZ,CACF,EACA,MAAQ,CAAA,CACN,IAAM,CAAA,sBAAA,CACN,YAAa,yDACb,CAAA,YAAA,CAAc,EACd,OAAS,CAAA,CACP,KAAM,UACN,CAAA,KAAA,CAAO,CACL,CAAE,MAAO,GAAM,CAAA,KAAA,CAAO,aAAc,CAAA,CACpC,CAAE,KAAO,CAAA,IAAA,CAAO,KAAO,CAAA,OAAQ,EAC/B,CAAE,KAAA,CAAO,EAAG,KAAO,CAAA,QAAS,EAC5B,CAAE,KAAA,CAAO,KAAO,CAAA,KAAA,CAAO,OAAQ,CAC/B,CAAA,CAAE,KAAO,CAAA,IAAA,CAAM,MAAO,aAAc,CACtC,CACF,CACF,CACF,CAKA,CAAA,UAAA,CAAY,CAACE,CAAiB,CAChC,EAEOQ,CAAQD,CAAAA","file":"preview.cjs","sourcesContent":["export const ADDON_ID = 'sb-blackcat-addon' as const;\nexport const TOOL_ID = `${ADDON_ID}/tool` as const;\n","import type { Decorator } from '@storybook/react';\nimport React, { useEffect } from 'react';\n\nexport const BlackcatDecorator: Decorator = (Story, context) => {\n const direction = context.globals.direction ?? 'ltr';\n const scalar = context.globals.scalar ?? 1;\n // const params = useParameter<BlackcatParameters>(ADDON_ID, defaultParameters)!;\n\n useEffect(() => {\n document.body.dir = direction;\n }, [direction]);\n\n useEffect(() => {\n document.body.style.setProperty('--accessibility-scalar', scalar.toString());\n }, [scalar]);\n\n return <Story />;\n};\n","import type { Preview } from '@storybook/react';\nimport { ADDON_ID } from './constants.js';\nimport { BlackcatDecorator } from './decorator.js';\n\n/**\n * A decorator is a way to wrap a story in extra \"rendering\" functionality. Many addons define decorators\n * in order to augment stories:\n * - with extra rendering\n * - gather details about how a story is rendered\n *\n * When writing stories, decorators are typically used to wrap stories with extra markup or context mocking.\n *\n * https://storybook.js.org/docs/react/writing-stories/decorators\n */\n\nconst preview: Preview = {\n parameters: {\n [ADDON_ID]: {\n // enableScalar: true,\n // enableDirection: true,\n },\n },\n\n /**\n * This is the global type for storybook that will add a toolbar to change the locale.\n * You must import this in preview.tsx and add it to the globalTypes object.\n * For more information, see: https://storybook.js.org/docs/essentials/toolbars-and-globals\n */\n globalTypes: {\n direction: {\n name: 'Direction',\n description: 'Layout direction of components based off user settings.',\n defaultValue: 'ltr',\n toolbar: {\n icon: 'transfer',\n items: [\n { value: 'ltr', title: 'Left to Right' },\n { value: 'rtl', title: 'Right to Left' },\n ],\n showName: true,\n },\n },\n scalar: {\n name: 'Accessibility Scalar',\n description: 'Scale text and component sizes based off user settings.',\n defaultValue: 1,\n toolbar: {\n icon: 'collapse',\n items: [\n { value: 0.75, title: 'Extra Small' },\n { value: 0.875, title: 'Small' },\n { value: 1, title: 'Medium' },\n { value: 1.125, title: 'Large' },\n { value: 1.25, title: 'Extra Large' },\n ],\n },\n },\n },\n\n /**\n * Adds the Blackcat Decorator to all stories.\n */\n decorators: [BlackcatDecorator],\n};\n\nexport default preview;\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { P } from './public-types-8dd0ccdf.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A decorator is a way to wrap a story in extra "rendering" functionality. Many addons define decorators
|
|
5
|
+
* in order to augment stories:
|
|
6
|
+
* - with extra rendering
|
|
7
|
+
* - gather details about how a story is rendered
|
|
8
|
+
*
|
|
9
|
+
* When writing stories, decorators are typically used to wrap stories with extra markup or context mocking.
|
|
10
|
+
*
|
|
11
|
+
* https://storybook.js.org/docs/react/writing-stories/decorators
|
|
12
|
+
*/
|
|
13
|
+
declare const preview: P;
|
|
14
|
+
|
|
15
|
+
export { preview as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { P } from './public-types-8dd0ccdf.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A decorator is a way to wrap a story in extra "rendering" functionality. Many addons define decorators
|
|
5
|
+
* in order to augment stories:
|
|
6
|
+
* - with extra rendering
|
|
7
|
+
* - gather details about how a story is rendered
|
|
8
|
+
*
|
|
9
|
+
* When writing stories, decorators are typically used to wrap stories with extra markup or context mocking.
|
|
10
|
+
*
|
|
11
|
+
* https://storybook.js.org/docs/react/writing-stories/decorators
|
|
12
|
+
*/
|
|
13
|
+
declare const preview: P;
|
|
14
|
+
|
|
15
|
+
export { preview as default };
|
package/dist/preview.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import s,{useEffect}from'react';var t="sb-blackcat-addon";var l=(i,e)=>{let o=e.globals.direction??"ltr",r=e.globals.scalar??1;return useEffect(()=>{document.body.dir=o;},[o]),useEffect(()=>{document.body.style.setProperty("--accessibility-scalar",r.toString());},[r]),s.createElement(i,null)};var c={parameters:{[t]:{}},globalTypes:{direction:{name:"Direction",description:"Layout direction of components based off user settings.",defaultValue:"ltr",toolbar:{icon:"transfer",items:[{value:"ltr",title:"Left to Right"},{value:"rtl",title:"Right to Left"}],showName:true}},scalar:{name:"Accessibility Scalar",description:"Scale text and component sizes based off user settings.",defaultValue:1,toolbar:{icon:"collapse",items:[{value:.75,title:"Extra Small"},{value:.875,title:"Small"},{value:1,title:"Medium"},{value:1.125,title:"Large"},{value:1.25,title:"Extra Large"}]}}},decorators:[l]},b=c;export{b as default};//# sourceMappingURL=preview.js.map
|
|
2
|
+
//# sourceMappingURL=preview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/constants.ts","../src/decorator.tsx","../src/preview.tsx"],"names":["ADDON_ID","TOOL_ID","BlackcatDecorator","Story","context","direction","scalar","useEffect","React","preview","preview_default"],"mappings":"gCAAO,IAAMA,EAAW,mBACXC,CCEN,IAAMC,CAAAA,CAA+B,CAACC,CAAAA,CAAOC,IAAY,CAC9D,IAAMC,CAAYD,CAAAA,CAAAA,CAAQ,QAAQ,SAAa,EAAA,KAAA,CACzCE,CAASF,CAAAA,CAAAA,CAAQ,QAAQ,MAAU,EAAA,CAAA,CAGzC,OAAAG,SAAAA,CAAU,IAAM,CACd,QAAA,CAAS,KAAK,GAAMF,CAAAA,EACtB,EAAG,CAACA,CAAS,CAAC,CAAA,CAEdE,UAAU,IAAM,CACd,QAAS,CAAA,IAAA,CAAK,MAAM,WAAY,CAAA,wBAAA,CAA0BD,CAAO,CAAA,QAAA,EAAU,EAC7E,CAAA,CAAG,CAACA,CAAM,CAAC,CAEJE,CAAAA,CAAAA,CAAA,aAACL,CAAAA,CAAAA,CAAA,IAAM,CAChB,CAAA,CCFMM,IAAAA,CAAAA,CAAmB,CACvB,UAAY,CAAA,CACV,CAACT,CAAQ,EAAG,EAId,EAOA,WAAa,CAAA,CACX,UAAW,CACT,IAAA,CAAM,WACN,CAAA,WAAA,CAAa,0DACb,YAAc,CAAA,KAAA,CACd,OAAS,CAAA,CACP,KAAM,UACN,CAAA,KAAA,CAAO,CACL,CAAE,MAAO,KAAO,CAAA,KAAA,CAAO,eAAgB,CAAA,CACvC,CAAE,KAAO,CAAA,KAAA,CAAO,KAAO,CAAA,eAAgB,CACzC,CACA,CAAA,QAAA,CAAU,IACZ,CACF,EACA,MAAQ,CAAA,CACN,IAAM,CAAA,sBAAA,CACN,YAAa,yDACb,CAAA,YAAA,CAAc,EACd,OAAS,CAAA,CACP,KAAM,UACN,CAAA,KAAA,CAAO,CACL,CAAE,MAAO,GAAM,CAAA,KAAA,CAAO,aAAc,CAAA,CACpC,CAAE,KAAO,CAAA,IAAA,CAAO,KAAO,CAAA,OAAQ,EAC/B,CAAE,KAAA,CAAO,EAAG,KAAO,CAAA,QAAS,EAC5B,CAAE,KAAA,CAAO,KAAO,CAAA,KAAA,CAAO,OAAQ,CAC/B,CAAA,CAAE,KAAO,CAAA,IAAA,CAAM,MAAO,aAAc,CACtC,CACF,CACF,CACF,CAKA,CAAA,UAAA,CAAY,CAACE,CAAiB,CAChC,EAEOQ,CAAQD,CAAAA","file":"preview.js","sourcesContent":["export const ADDON_ID = 'sb-blackcat-addon' as const;\nexport const TOOL_ID = `${ADDON_ID}/tool` as const;\n","import type { Decorator } from '@storybook/react';\nimport React, { useEffect } from 'react';\n\nexport const BlackcatDecorator: Decorator = (Story, context) => {\n const direction = context.globals.direction ?? 'ltr';\n const scalar = context.globals.scalar ?? 1;\n // const params = useParameter<BlackcatParameters>(ADDON_ID, defaultParameters)!;\n\n useEffect(() => {\n document.body.dir = direction;\n }, [direction]);\n\n useEffect(() => {\n document.body.style.setProperty('--accessibility-scalar', scalar.toString());\n }, [scalar]);\n\n return <Story />;\n};\n","import type { Preview } from '@storybook/react';\nimport { ADDON_ID } from './constants.js';\nimport { BlackcatDecorator } from './decorator.js';\n\n/**\n * A decorator is a way to wrap a story in extra \"rendering\" functionality. Many addons define decorators\n * in order to augment stories:\n * - with extra rendering\n * - gather details about how a story is rendered\n *\n * When writing stories, decorators are typically used to wrap stories with extra markup or context mocking.\n *\n * https://storybook.js.org/docs/react/writing-stories/decorators\n */\n\nconst preview: Preview = {\n parameters: {\n [ADDON_ID]: {\n // enableScalar: true,\n // enableDirection: true,\n },\n },\n\n /**\n * This is the global type for storybook that will add a toolbar to change the locale.\n * You must import this in preview.tsx and add it to the globalTypes object.\n * For more information, see: https://storybook.js.org/docs/essentials/toolbars-and-globals\n */\n globalTypes: {\n direction: {\n name: 'Direction',\n description: 'Layout direction of components based off user settings.',\n defaultValue: 'ltr',\n toolbar: {\n icon: 'transfer',\n items: [\n { value: 'ltr', title: 'Left to Right' },\n { value: 'rtl', title: 'Right to Left' },\n ],\n showName: true,\n },\n },\n scalar: {\n name: 'Accessibility Scalar',\n description: 'Scale text and component sizes based off user settings.',\n defaultValue: 1,\n toolbar: {\n icon: 'collapse',\n items: [\n { value: 0.75, title: 'Extra Small' },\n { value: 0.875, title: 'Small' },\n { value: 1, title: 'Medium' },\n { value: 1.125, title: 'Large' },\n { value: 1.25, title: 'Extra Large' },\n ],\n },\n },\n },\n\n /**\n * Adds the Blackcat Decorator to all stories.\n */\n decorators: [BlackcatDecorator],\n};\n\nexport default preview;\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tcn/sb-blackcat-addon",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"author": "TCN",
|
|
6
|
+
"description": "Storybook addon that provides Blackcat accessibility scalar and layout direction.",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist/**/*",
|
|
9
|
+
"README.md",
|
|
10
|
+
"*.js",
|
|
11
|
+
"*.d.ts"
|
|
12
|
+
],
|
|
13
|
+
"main": "dist/index.cjs",
|
|
14
|
+
"module": "dist/index.js",
|
|
15
|
+
"types": "dist/types/index.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/index.d.ts",
|
|
19
|
+
"import": "./dist/index.js",
|
|
20
|
+
"require": "./dist/index.cjs"
|
|
21
|
+
},
|
|
22
|
+
"./preview": {
|
|
23
|
+
"types": "./dist/index.d.ts",
|
|
24
|
+
"import": "./dist/preview.js",
|
|
25
|
+
"require": "./dist/preview.cjs"
|
|
26
|
+
},
|
|
27
|
+
"./package.json": "./package.json"
|
|
28
|
+
},
|
|
29
|
+
"bundler": {
|
|
30
|
+
"exportEntries": [
|
|
31
|
+
"src/index.ts"
|
|
32
|
+
],
|
|
33
|
+
"previewEntries": [
|
|
34
|
+
"src/preview.tsx"
|
|
35
|
+
]
|
|
36
|
+
},
|
|
37
|
+
"storybook": {
|
|
38
|
+
"displayName": "Blackcat Addon",
|
|
39
|
+
"supportedFrameworks": [
|
|
40
|
+
"react"
|
|
41
|
+
],
|
|
42
|
+
"icon": "https://www.tcn.com/wp-content/uploads/2019/05/tcn-logo.png"
|
|
43
|
+
},
|
|
44
|
+
"license": "Apache-2.0",
|
|
45
|
+
"peerDependencies": {
|
|
46
|
+
"react": "^18.2.0",
|
|
47
|
+
"react-dom": "^18.2.0"
|
|
48
|
+
},
|
|
49
|
+
"scripts": {
|
|
50
|
+
"start": "concurrently 'yarn build-watch' 'yarn storybook --quiet'",
|
|
51
|
+
"build": "tsup",
|
|
52
|
+
"build-watch": "tsup --watch",
|
|
53
|
+
"check-all": "concurrently 'yarn check-types' 'biome check .'",
|
|
54
|
+
"check-types": "tspc --project ./tsconfig.json --noEmit",
|
|
55
|
+
"check-format": "biome format .",
|
|
56
|
+
"check-lint": "biome lint .",
|
|
57
|
+
"fix-all": "biome check --write",
|
|
58
|
+
"fix-format": "biome format --write",
|
|
59
|
+
"fix-lint": "biome lint --write",
|
|
60
|
+
"fix-imports": "biome check --formatter-enabled=false --linter-enabled=false --organize-imports-enabled=true --write",
|
|
61
|
+
"test": "vitest run",
|
|
62
|
+
"test-coverage": "vitest run --coverage",
|
|
63
|
+
"storybook": "storybook dev -p 6006",
|
|
64
|
+
"build-storybook": "yarn build && storybook build"
|
|
65
|
+
},
|
|
66
|
+
"devDependencies": {
|
|
67
|
+
"@biomejs/biome": "1.9.4",
|
|
68
|
+
"@chromatic-com/storybook": "^1.2.25",
|
|
69
|
+
"@storybook/addon-essentials": "^8.0.4",
|
|
70
|
+
"@storybook/addon-interactions": "^8.0.4",
|
|
71
|
+
"@storybook/addon-links": "^8.0.4",
|
|
72
|
+
"@storybook/addon-onboarding": "^8.0.4",
|
|
73
|
+
"@storybook/blocks": "^8.0.4",
|
|
74
|
+
"@storybook/preview-api": "^8.5.3",
|
|
75
|
+
"@storybook/react": "^8.0.4",
|
|
76
|
+
"@storybook/react-vite": "^8.0.4",
|
|
77
|
+
"@storybook/test": "^8.0.4",
|
|
78
|
+
"@storybook/testing-library": "^0.2.2",
|
|
79
|
+
"@types/copyfiles": "^2",
|
|
80
|
+
"@types/node": "^20.11.30",
|
|
81
|
+
"@types/react": "^18.2.70",
|
|
82
|
+
"@types/react-dom": "^18.2.22",
|
|
83
|
+
"@vitejs/plugin-react": "^4.2.1",
|
|
84
|
+
"concurrently": "^8.2.2",
|
|
85
|
+
"copyfiles": "^2.4.1",
|
|
86
|
+
"react": "^18.2.0",
|
|
87
|
+
"react-dom": "^18.2.0",
|
|
88
|
+
"read-pkg-up": "^11.0.0",
|
|
89
|
+
"storybook": "^8.0.4",
|
|
90
|
+
"ts-node": "^10.9.2",
|
|
91
|
+
"ts-patch": "^3.2.1",
|
|
92
|
+
"tsup": "^8.2.4",
|
|
93
|
+
"typescript": "5.4.3",
|
|
94
|
+
"typescript-transform-paths": "^3.5.1",
|
|
95
|
+
"vite": "^5.2.6",
|
|
96
|
+
"vite-css-modules": "^1.5.2",
|
|
97
|
+
"vitest": "^2.1.4"
|
|
98
|
+
},
|
|
99
|
+
"dependencies": {
|
|
100
|
+
"@tcn/state": "^0.0.4",
|
|
101
|
+
"@tcn/ui-core": "^0.4.1",
|
|
102
|
+
"@tcn/ui-layout": "^0.3.15",
|
|
103
|
+
"classnames": "^2.5.1"
|
|
104
|
+
},
|
|
105
|
+
"packageManager": "yarn@4.0.2"
|
|
106
|
+
}
|
package/preview.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './dist/preview';
|