@aventusjs/storybook 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/dist/Meta.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { Meta as MetaWC } from '@storybook/web-components';
2
+ import { IStoryExport } from './StoryExport';
3
+
4
+ export type Meta = MetaWC & {
5
+ aventus: IStoryExport;
6
+ };
@@ -0,0 +1,81 @@
1
+ import { IStoryContentTypeResult } from './Type';
2
+
3
+ export type IStoryExportKind = 'class' | 'interface' | 'type' | 'function' | 'enum' | 'variable';
4
+ export type IStoryExport = IStoryContentInterface | IStoryContentClass | IStoryContentType | IStoryContentFunction | IStoryContentEnum | IStoryContentVariable;
5
+ export interface BaseStoryExport {
6
+ kind: IStoryExportKind;
7
+ name: string;
8
+ namespace?: string;
9
+ documentation?: string;
10
+ accessibility?: 'internal';
11
+ }
12
+ export interface IStoryContentObject extends BaseStoryExport {
13
+ extends?: IStoryContentTypeResult;
14
+ generics?: IStoryContentGeneric[];
15
+ methods?: IStoryContentObjectMethod[];
16
+ properties?: IStoryContentObjectProperty[];
17
+ }
18
+ export interface IStoryContentObjectMethod {
19
+ name: string;
20
+ documentation?: string;
21
+ accessibility: 'public' | 'protected' | 'private';
22
+ modifiers?: ('override' | 'abstract' | 'static')[];
23
+ generics?: IStoryContentGeneric[];
24
+ parameters?: IStoryContentParameter[];
25
+ return?: IStoryContentReturn;
26
+ }
27
+ export interface IStoryContentObjectProperty {
28
+ name: string;
29
+ documentation?: string;
30
+ accessibility: 'public' | 'protected' | 'private';
31
+ modifiers?: ('override' | 'abstract' | 'readonly' | 'writeonly' | 'static')[];
32
+ type?: IStoryContentTypeResult;
33
+ }
34
+ export interface IStoryContentInterface extends IStoryContentObject {
35
+ kind: 'interface';
36
+ }
37
+ export interface IStoryContentClass extends IStoryContentObject {
38
+ kind: 'class';
39
+ modifier?: 'abstract';
40
+ implements?: IStoryContentTypeResult[];
41
+ }
42
+ export interface IStoryContentType extends BaseStoryExport {
43
+ kind: 'type';
44
+ type?: IStoryContentTypeResult;
45
+ generics?: IStoryContentGeneric[];
46
+ }
47
+ export interface IStoryContentFunction extends BaseStoryExport {
48
+ kind: 'function';
49
+ generics?: IStoryContentGeneric[];
50
+ parameters?: IStoryContentParameter[];
51
+ return?: IStoryContentReturn;
52
+ }
53
+ export interface IStoryContentEnum extends BaseStoryExport {
54
+ kind: 'enum';
55
+ properties: IStoryContentEnumValue[];
56
+ }
57
+ export interface IStoryContentEnumValue {
58
+ name: string;
59
+ documentation?: string;
60
+ value?: string;
61
+ }
62
+ export interface IStoryContentVariable extends BaseStoryExport {
63
+ kind: 'variable';
64
+ modifier: 'let' | 'const' | 'var';
65
+ type?: IStoryContentTypeResult;
66
+ }
67
+ export interface IStoryContentGeneric {
68
+ name: string;
69
+ documentation?: string;
70
+ constraint?: IStoryContentTypeResult;
71
+ default?: IStoryContentTypeResult;
72
+ }
73
+ export interface IStoryContentParameter {
74
+ name: string;
75
+ documentation?: string;
76
+ type?: IStoryContentTypeResult;
77
+ }
78
+ export interface IStoryContentReturn {
79
+ type: IStoryContentTypeResult;
80
+ documentation?: string;
81
+ }
package/dist/Type.d.ts ADDED
@@ -0,0 +1,80 @@
1
+ export type IStoryContentTypeResultType = 'simple' | 'function' | 'tupple' | 'object' | 'union' | 'intersection' | 'typeOperator' | 'indexAccess' | 'mappedType' | 'infer' | 'conditional';
2
+ export type IStoryContentTypeResult = IStoryContentTypeResultSimple | IStoryContentTypeResultFunction | IStoryContentTypeResultTupple | IStoryContentTypeResultObject | IStoryContentTypeResultUnion | IStoryContentTypeResultIntersection | IStoryContentTypeResultTypeOperator | IStoryContentTypeResultIndexAccess | IStoryContentTypeResultMappedType | IStoryContentTypeResultInfer | IStoryContentTypeResultConditional;
3
+ export interface BaseStoryContentTypeResult {
4
+ kind: IStoryContentTypeResultType;
5
+ }
6
+ export interface IStoryContentTypeResultSimple extends BaseStoryContentTypeResult {
7
+ kind: 'simple';
8
+ name: string;
9
+ isArray?: true;
10
+ generics?: IStoryContentTypeResult[];
11
+ ref?: string;
12
+ }
13
+ export interface IStoryGeneric {
14
+ name: string;
15
+ constraint?: IStoryContentTypeResult;
16
+ default?: IStoryContentTypeResult;
17
+ }
18
+ export interface IStoryContentTypeResultFunction extends BaseStoryContentTypeResult {
19
+ kind: 'function';
20
+ parameters?: IStoryContentTypeResultFunctionParameter[];
21
+ return?: IStoryContentTypeResult;
22
+ isConstructor?: true;
23
+ generics?: IStoryGeneric[];
24
+ }
25
+ export interface IStoryContentTypeResultFunctionParameter {
26
+ name: string;
27
+ type?: IStoryContentTypeResult;
28
+ }
29
+ export interface IStoryContentTypeResultTupple extends BaseStoryContentTypeResult {
30
+ kind: 'tupple';
31
+ tupples: IStoryContentTypeResult[];
32
+ }
33
+ export interface IStoryContentTypeResultObject extends BaseStoryContentTypeResult {
34
+ kind: 'object';
35
+ array?: IStoryContentTypeResult;
36
+ keys?: {
37
+ [prop: string]: IStoryContentTypeResult;
38
+ };
39
+ indexSignatures?: {
40
+ keyType: IStoryContentTypeResult;
41
+ keyName: string;
42
+ type: IStoryContentTypeResult;
43
+ }[];
44
+ }
45
+ export interface IStoryContentTypeResultUnion extends BaseStoryContentTypeResult {
46
+ kind: 'union';
47
+ types: IStoryContentTypeResult[];
48
+ }
49
+ export interface IStoryContentTypeResultIntersection extends BaseStoryContentTypeResult {
50
+ kind: 'intersection';
51
+ types: IStoryContentTypeResult[];
52
+ }
53
+ export interface IStoryContentTypeResultTypeOperator extends BaseStoryContentTypeResult {
54
+ kind: 'typeOperator';
55
+ value: 'typeof' | 'keyof' | 'unique' | 'readonly';
56
+ type: IStoryContentTypeResult;
57
+ }
58
+ export interface IStoryContentTypeResultIndexAccess extends BaseStoryContentTypeResult {
59
+ kind: 'indexAccess';
60
+ obj: IStoryContentTypeResult;
61
+ key: IStoryContentTypeResult;
62
+ }
63
+ export interface IStoryContentTypeResultMappedType extends BaseStoryContentTypeResult {
64
+ kind: 'mappedType';
65
+ parameterName: string;
66
+ parameterType: IStoryContentTypeResult;
67
+ type: IStoryContentTypeResult;
68
+ modifier?: '?' | '+' | '-';
69
+ }
70
+ export interface IStoryContentTypeResultInfer extends BaseStoryContentTypeResult {
71
+ kind: 'infer';
72
+ name: string;
73
+ }
74
+ export interface IStoryContentTypeResultConditional extends BaseStoryContentTypeResult {
75
+ kind: 'conditional';
76
+ check: IStoryContentTypeResult;
77
+ extends: IStoryContentTypeResult;
78
+ true: IStoryContentTypeResult;
79
+ false: IStoryContentTypeResult;
80
+ }
package/dist/main.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export * from './StoryExport';
2
+ export * from './Type';
3
+ export type { StoryObj } from '@storybook/web-components';
4
+ export type { Meta } from './Meta';
@@ -0,0 +1 @@
1
+
package/package.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "name": "@aventusjs/storybook",
3
+ "version": "0.0.1",
4
+ "type": "module",
5
+ "description": "Storybook type extension for aventusjs",
6
+ "author": {
7
+ "name": "Cobwebsite",
8
+ "email": "info@cobwebsite.ch",
9
+ "url": "https://cobwesbite.ch"
10
+ },
11
+ "license": "MIT",
12
+ "devDependencies": {
13
+ "@types/node": "^20.14.9",
14
+ "vite": "^5.3.3",
15
+ "vite-plugin-dts": "^3.9.1"
16
+ },
17
+ "main": "dist/storybook.js",
18
+ "types": "dist/main.d.ts",
19
+ "files": [
20
+ "dist"
21
+ ],
22
+ "dependencies": {
23
+ "@storybook/web-components": "^8.1.11"
24
+ }
25
+ }