@storm-ds/ui 0.1.0 → 1.0.0

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/plugin.d.mts CHANGED
@@ -1,8 +1,128 @@
1
- import * as tailwindcss_types_config from 'tailwindcss/types/config';
1
+ import { N, P } from './resolve-config-QUZ9b-Gn.mjs';
2
2
 
3
- declare const stormPlugin: {
4
- handler: tailwindcss_types_config.PluginCreator;
5
- config?: Partial<tailwindcss_types_config.Config>;
3
+ /**
4
+ * The source code for one or more nodes in the AST
5
+ *
6
+ * This generally corresponds to a stylesheet
7
+ */
8
+ interface Source {
9
+ /**
10
+ * The path to the file that contains the referenced source code
11
+ *
12
+ * If this references the *output* source code, this is `null`.
13
+ */
14
+ file: string | null;
15
+ /**
16
+ * The referenced source code
17
+ */
18
+ code: string;
19
+ }
20
+ /**
21
+ * The file and offsets within it that this node covers
22
+ *
23
+ * This can represent either:
24
+ * - A location in the original CSS which caused this node to be created
25
+ * - A location in the output CSS where this node resides
26
+ */
27
+ type SourceLocation = [source: Source, start: number, end: number];
28
+ type PluginFn = (api: PluginAPI) => void;
29
+ type PluginWithConfig = {
30
+ handler: PluginFn;
31
+ config?: UserConfig;
32
+ /** @internal */
33
+ reference?: boolean;
34
+ src?: SourceLocation | undefined;
6
35
  };
36
+ type PluginWithOptions<T> = {
37
+ (options?: T): PluginWithConfig;
38
+ __isOptionsFunction: true;
39
+ };
40
+ type Plugin = PluginFn | PluginWithConfig | PluginWithOptions<any>;
41
+ type PluginAPI = {
42
+ addBase(base: CssInJs): void;
43
+ addVariant(name: string, variant: string | string[] | CssInJs): void;
44
+ matchVariant<T = string>(name: string, cb: (value: T | string, extra: {
45
+ modifier: string | null;
46
+ }) => string | string[], options?: {
47
+ values?: Record<string, T>;
48
+ sort?(a: {
49
+ value: T | string;
50
+ modifier: string | null;
51
+ }, b: {
52
+ value: T | string;
53
+ modifier: string | null;
54
+ }): number;
55
+ }): void;
56
+ addUtilities(utilities: Record<string, CssInJs | CssInJs[]> | Record<string, CssInJs | CssInJs[]>[], options?: {}): void;
57
+ matchUtilities(utilities: Record<string, (value: string, extra: {
58
+ modifier: string | null;
59
+ }) => CssInJs | CssInJs[]>, options?: Partial<{
60
+ type: string | string[];
61
+ supportsNegativeValues: boolean;
62
+ values: Record<string, string> & {
63
+ __BARE_VALUE__?: (value: N) => string | undefined;
64
+ };
65
+ modifiers: 'any' | Record<string, string>;
66
+ }>): void;
67
+ addComponents(utilities: Record<string, CssInJs> | Record<string, CssInJs>[], options?: {}): void;
68
+ matchComponents(utilities: Record<string, (value: string, extra: {
69
+ modifier: string | null;
70
+ }) => CssInJs>, options?: Partial<{
71
+ type: string | string[];
72
+ supportsNegativeValues: boolean;
73
+ values: Record<string, string> & {
74
+ __BARE_VALUE__?: (value: N) => string | undefined;
75
+ };
76
+ modifiers: 'any' | Record<string, string>;
77
+ }>): void;
78
+ theme(path: string, defaultValue?: any): any;
79
+ config(path?: string, defaultValue?: any): any;
80
+ prefix(className: string): string;
81
+ };
82
+ type CssInJs = {
83
+ [key: string]: string | string[] | CssInJs | CssInJs[];
84
+ };
85
+
86
+ type ResolvableTo<T> = T | ((utils: P) => T);
87
+ type ThemeValue = ResolvableTo<Record<string, unknown>> | null | undefined;
88
+ type ThemeConfig = Record<string, ThemeValue> & {
89
+ extend?: Record<string, ThemeValue>;
90
+ };
91
+ type ContentFile = string | {
92
+ raw: string;
93
+ extension?: string;
94
+ };
95
+ type DarkModeStrategy = false | 'media' | 'class' | ['class', string] | 'selector' | ['selector', string] | ['variant', string | string[]];
96
+ interface UserConfig {
97
+ presets?: UserConfig[];
98
+ theme?: ThemeConfig;
99
+ plugins?: Plugin[];
100
+ }
101
+ interface UserConfig {
102
+ content?: ContentFile[] | {
103
+ relative?: boolean;
104
+ files: ContentFile[];
105
+ };
106
+ }
107
+ interface UserConfig {
108
+ darkMode?: DarkModeStrategy;
109
+ }
110
+ interface UserConfig {
111
+ prefix?: string;
112
+ }
113
+ interface UserConfig {
114
+ blocklist?: string[];
115
+ }
116
+ interface UserConfig {
117
+ important?: boolean | string;
118
+ }
119
+ interface UserConfig {
120
+ future?: 'all' | Record<string, boolean>;
121
+ }
122
+ interface UserConfig {
123
+ experimental?: 'all' | Record<string, boolean>;
124
+ }
125
+
126
+ declare const stormPlugin: PluginWithConfig;
7
127
 
8
128
  export { stormPlugin as default };
package/dist/plugin.d.ts CHANGED
@@ -1,8 +1,128 @@
1
- import * as tailwindcss_types_config from 'tailwindcss/types/config';
1
+ import { N, P } from './resolve-config-QUZ9b-Gn.mjs';
2
2
 
3
- declare const stormPlugin: {
4
- handler: tailwindcss_types_config.PluginCreator;
5
- config?: Partial<tailwindcss_types_config.Config>;
3
+ /**
4
+ * The source code for one or more nodes in the AST
5
+ *
6
+ * This generally corresponds to a stylesheet
7
+ */
8
+ interface Source {
9
+ /**
10
+ * The path to the file that contains the referenced source code
11
+ *
12
+ * If this references the *output* source code, this is `null`.
13
+ */
14
+ file: string | null;
15
+ /**
16
+ * The referenced source code
17
+ */
18
+ code: string;
19
+ }
20
+ /**
21
+ * The file and offsets within it that this node covers
22
+ *
23
+ * This can represent either:
24
+ * - A location in the original CSS which caused this node to be created
25
+ * - A location in the output CSS where this node resides
26
+ */
27
+ type SourceLocation = [source: Source, start: number, end: number];
28
+ type PluginFn = (api: PluginAPI) => void;
29
+ type PluginWithConfig = {
30
+ handler: PluginFn;
31
+ config?: UserConfig;
32
+ /** @internal */
33
+ reference?: boolean;
34
+ src?: SourceLocation | undefined;
6
35
  };
36
+ type PluginWithOptions<T> = {
37
+ (options?: T): PluginWithConfig;
38
+ __isOptionsFunction: true;
39
+ };
40
+ type Plugin = PluginFn | PluginWithConfig | PluginWithOptions<any>;
41
+ type PluginAPI = {
42
+ addBase(base: CssInJs): void;
43
+ addVariant(name: string, variant: string | string[] | CssInJs): void;
44
+ matchVariant<T = string>(name: string, cb: (value: T | string, extra: {
45
+ modifier: string | null;
46
+ }) => string | string[], options?: {
47
+ values?: Record<string, T>;
48
+ sort?(a: {
49
+ value: T | string;
50
+ modifier: string | null;
51
+ }, b: {
52
+ value: T | string;
53
+ modifier: string | null;
54
+ }): number;
55
+ }): void;
56
+ addUtilities(utilities: Record<string, CssInJs | CssInJs[]> | Record<string, CssInJs | CssInJs[]>[], options?: {}): void;
57
+ matchUtilities(utilities: Record<string, (value: string, extra: {
58
+ modifier: string | null;
59
+ }) => CssInJs | CssInJs[]>, options?: Partial<{
60
+ type: string | string[];
61
+ supportsNegativeValues: boolean;
62
+ values: Record<string, string> & {
63
+ __BARE_VALUE__?: (value: N) => string | undefined;
64
+ };
65
+ modifiers: 'any' | Record<string, string>;
66
+ }>): void;
67
+ addComponents(utilities: Record<string, CssInJs> | Record<string, CssInJs>[], options?: {}): void;
68
+ matchComponents(utilities: Record<string, (value: string, extra: {
69
+ modifier: string | null;
70
+ }) => CssInJs>, options?: Partial<{
71
+ type: string | string[];
72
+ supportsNegativeValues: boolean;
73
+ values: Record<string, string> & {
74
+ __BARE_VALUE__?: (value: N) => string | undefined;
75
+ };
76
+ modifiers: 'any' | Record<string, string>;
77
+ }>): void;
78
+ theme(path: string, defaultValue?: any): any;
79
+ config(path?: string, defaultValue?: any): any;
80
+ prefix(className: string): string;
81
+ };
82
+ type CssInJs = {
83
+ [key: string]: string | string[] | CssInJs | CssInJs[];
84
+ };
85
+
86
+ type ResolvableTo<T> = T | ((utils: P) => T);
87
+ type ThemeValue = ResolvableTo<Record<string, unknown>> | null | undefined;
88
+ type ThemeConfig = Record<string, ThemeValue> & {
89
+ extend?: Record<string, ThemeValue>;
90
+ };
91
+ type ContentFile = string | {
92
+ raw: string;
93
+ extension?: string;
94
+ };
95
+ type DarkModeStrategy = false | 'media' | 'class' | ['class', string] | 'selector' | ['selector', string] | ['variant', string | string[]];
96
+ interface UserConfig {
97
+ presets?: UserConfig[];
98
+ theme?: ThemeConfig;
99
+ plugins?: Plugin[];
100
+ }
101
+ interface UserConfig {
102
+ content?: ContentFile[] | {
103
+ relative?: boolean;
104
+ files: ContentFile[];
105
+ };
106
+ }
107
+ interface UserConfig {
108
+ darkMode?: DarkModeStrategy;
109
+ }
110
+ interface UserConfig {
111
+ prefix?: string;
112
+ }
113
+ interface UserConfig {
114
+ blocklist?: string[];
115
+ }
116
+ interface UserConfig {
117
+ important?: boolean | string;
118
+ }
119
+ interface UserConfig {
120
+ future?: 'all' | Record<string, boolean>;
121
+ }
122
+ interface UserConfig {
123
+ experimental?: 'all' | Record<string, boolean>;
124
+ }
125
+
126
+ declare const stormPlugin: PluginWithConfig;
7
127
 
8
128
  export { stormPlugin as default };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@storm-ds/ui",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "description": "Lightning-fast component library optimized for Next.js",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -23,10 +23,25 @@
23
23
  }
24
24
  },
25
25
  "sideEffects": false,
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "https://github.com/saayym/storm-ui.git"
29
+ },
30
+ "homepage": "https://storm-project-web.vercel.app",
31
+ "bugs": {
32
+ "url": "https://github.com/saayym/storm-project/issues"
33
+ },
26
34
  "files": [
27
35
  "dist",
28
- "README.md"
36
+ "README.md",
37
+ "LICENSE"
29
38
  ],
39
+ "scripts": {
40
+ "dev": "tsup --watch",
41
+ "build": "tsup",
42
+ "lint": "eslint src",
43
+ "clean": "rm -rf dist node_modules"
44
+ },
30
45
  "keywords": [
31
46
  "react",
32
47
  "nextjs",
@@ -45,12 +60,8 @@
45
60
  "tailwindcss": ">=3"
46
61
  },
47
62
  "peerDependenciesMeta": {
48
- "recharts": {
49
- "optional": true
50
- },
51
- "@storm-ds/icons": {
52
- "optional": true
53
- }
63
+ "recharts": { "optional": true },
64
+ "@storm-ds/icons": { "optional": true }
54
65
  },
55
66
  "dependencies": {
56
67
  "tailwind-merge": "^2.2.0"
@@ -59,14 +70,8 @@
59
70
  "@types/react": "^18.2.48",
60
71
  "@types/react-dom": "^18.2.18",
61
72
  "recharts": "^3.7.0",
73
+ "@storm-ds/icons": "^1.0.0",
62
74
  "tsup": "^8.0.1",
63
- "typescript": "^5.3.3",
64
- "@storm-ds/icons": "0.1.0"
65
- },
66
- "scripts": {
67
- "dev": "tsup --watch",
68
- "build": "tsup",
69
- "lint": "eslint src",
70
- "clean": "rm -rf dist node_modules"
75
+ "typescript": "^5.3.3"
71
76
  }
72
- }
77
+ }