@stackwright/themes 0.2.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/ThemeProvider.d.ts +14 -0
- package/dist/ThemeProvider.d.ts.map +1 -0
- package/dist/ThemeProvider.js +19 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +19 -0
- package/dist/themeLoader.d.ts +12 -0
- package/dist/themeLoader.d.ts.map +1 -0
- package/dist/themeLoader.js +84 -0
- package/dist/themes/corporate.d.ts +32 -0
- package/dist/themes/corporate.d.ts.map +1 -0
- package/dist/themes/corporate.js +34 -0
- package/dist/themes/soft.d.ts +32 -0
- package/dist/themes/soft.d.ts.map +1 -0
- package/dist/themes/soft.js +34 -0
- package/dist/types.d.ts +66 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/package.json +19 -0
- package/src/ThemeProvider.tsx +30 -0
- package/src/index.ts +4 -0
- package/src/themeLoader.ts +128 -0
- package/src/themes/corporate.ts +31 -0
- package/src/themes/corporate.yaml +36 -0
- package/src/themes/soft.ts +32 -0
- package/src/themes/soft.yaml +36 -0
- package/src/types.ts +66 -0
- package/tsconfig.json +29 -0
- package/tsup.config.ts +10 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
import { Theme } from './types';
|
|
3
|
+
interface ThemeContextType {
|
|
4
|
+
theme: Theme;
|
|
5
|
+
setTheme?: (theme: Theme) => void;
|
|
6
|
+
}
|
|
7
|
+
interface ThemeProviderProps {
|
|
8
|
+
theme: Theme;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
|
12
|
+
export declare const useTheme: () => ThemeContextType;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=ThemeProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ThemeProvider.d.ts","sourceRoot":"","sources":["../src/ThemeProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,UAAU,gBAAgB;IACxB,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CACnC;AAID,UAAU,kBAAkB;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAMtD,CAAC;AAEF,eAAO,MAAM,QAAQ,QAAO,gBAM3B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useTheme = exports.ThemeProvider = void 0;
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var react_1 = require("react");
|
|
6
|
+
var ThemeContext = (0, react_1.createContext)(undefined);
|
|
7
|
+
var ThemeProvider = function (_a) {
|
|
8
|
+
var theme = _a.theme, children = _a.children;
|
|
9
|
+
return ((0, jsx_runtime_1.jsx)(ThemeContext.Provider, { value: { theme: theme }, children: children }));
|
|
10
|
+
};
|
|
11
|
+
exports.ThemeProvider = ThemeProvider;
|
|
12
|
+
var useTheme = function () {
|
|
13
|
+
var context = (0, react_1.useContext)(ThemeContext);
|
|
14
|
+
if (!context) {
|
|
15
|
+
throw new Error('useTheme must be used within a ThemeProvider');
|
|
16
|
+
}
|
|
17
|
+
return context;
|
|
18
|
+
};
|
|
19
|
+
exports.useTheme = useTheme;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,iBAAiB,CAAC;AAChC,cAAc,eAAe,CAAC;AAC9B,YAAY,EAAE,WAAW,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./ThemeProvider"), exports);
|
|
19
|
+
__exportStar(require("./themeLoader"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Theme } from './types';
|
|
2
|
+
export declare class ThemeLoader {
|
|
3
|
+
private static themes;
|
|
4
|
+
static loadThemeFromYaml(yamlContent: string): Theme;
|
|
5
|
+
static loadThemeFromFile(themeName: string): Theme;
|
|
6
|
+
static getTheme(name: string): Theme | undefined;
|
|
7
|
+
static getAllThemes(): Theme[];
|
|
8
|
+
static registerCustomTheme(theme: Theme): void;
|
|
9
|
+
static loadCustomTheme(theme: Theme): Theme;
|
|
10
|
+
private static getEmbeddedTheme;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=themeLoader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themeLoader.d.ts","sourceRoot":"","sources":["../src/themeLoader.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,qBAAa,WAAW;IACtB,OAAO,CAAC,MAAM,CAAC,MAAM,CAAiC;IAEtD,MAAM,CAAC,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,KAAK;IAUpD,MAAM,CAAC,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,KAAK;IAOlD,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,KAAK,GAAG,SAAS;IAIhD,MAAM,CAAC,YAAY,IAAI,KAAK,EAAE;IAI9B,MAAM,CAAC,mBAAmB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAK9C,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,KAAK,GAAG,KAAK;IAK3C,OAAO,CAAC,MAAM,CAAC,gBAAgB;CAsFhC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
exports.ThemeLoader = void 0;
|
|
37
|
+
var yaml = __importStar(require("js-yaml"));
|
|
38
|
+
var ThemeLoader = /** @class */ (function () {
|
|
39
|
+
function ThemeLoader() {
|
|
40
|
+
}
|
|
41
|
+
ThemeLoader.loadThemeFromYaml = function (yamlContent) {
|
|
42
|
+
try {
|
|
43
|
+
var theme = yaml.load(yamlContent);
|
|
44
|
+
this.themes.set(theme.name, theme);
|
|
45
|
+
return theme;
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
throw new Error("Failed to parse theme YAML: ".concat(error));
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
ThemeLoader.loadThemeFromFile = function (themeName) {
|
|
52
|
+
// In a real implementation, this would load from the file system
|
|
53
|
+
// For now, we'll embed the themes
|
|
54
|
+
var themeData = this.getEmbeddedTheme(themeName);
|
|
55
|
+
return this.loadThemeFromYaml(themeData);
|
|
56
|
+
};
|
|
57
|
+
ThemeLoader.getTheme = function (name) {
|
|
58
|
+
return this.themes.get(name);
|
|
59
|
+
};
|
|
60
|
+
ThemeLoader.getAllThemes = function () {
|
|
61
|
+
return Array.from(this.themes.values());
|
|
62
|
+
};
|
|
63
|
+
ThemeLoader.registerCustomTheme = function (theme) {
|
|
64
|
+
this.themes.set(theme.name, theme);
|
|
65
|
+
console.log("\uD83C\uDFA8 Registered custom theme: ".concat(theme.name));
|
|
66
|
+
};
|
|
67
|
+
ThemeLoader.loadCustomTheme = function (theme) {
|
|
68
|
+
this.registerCustomTheme(theme);
|
|
69
|
+
return theme;
|
|
70
|
+
};
|
|
71
|
+
ThemeLoader.getEmbeddedTheme = function (name) {
|
|
72
|
+
var themes = {
|
|
73
|
+
corporate: "\nname: \"Corporate\"\ncolors:\n primary:\n 50: \"#fef7ee\"\n 100: \"#fdedd3\"\n 500: \"#f59e0b\"\n 600: \"#d97706\"\n 700: \"#b45309\"\n neutral:\n 50: \"#f8fafc\"\n 100: \"#f1f5f9\"\n 700: \"#334155\"\n 800: \"#1e293b\"\n 900: \"#0f172a\"\n text:\n primary: \"#1f2937\"\n secondary: \"#6b7280\"\n inverse: \"#ffffff\"\n\nspacing:\n section: \"py-20\"\n container: \"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8\"\n\ntypography:\n hero: \"text-4xl md:text-6xl font-bold\"\n subtitle: \"text-xl md:text-2xl\"\n\ncomponents:\n button:\n primary: \"bg-amber-600 text-white hover:bg-amber-700 px-8 py-3 rounded-lg font-semibold\"\n secondary: \"text-amber-600 border border-amber-600 hover:bg-amber-50 px-8 py-3 rounded-lg font-semibold\"\n header:\n background: \"bg-white shadow-sm\"\n border: \"border-b border-gray-200\"\n hero:\n background: \"bg-gradient-to-br from-slate-900 to-slate-800\"\n",
|
|
74
|
+
soft: "\nname: \"Soft\"\ncolors:\n primary:\n 50: \"#fdf2f8\"\n 100: \"#fce7f3\"\n 500: \"#ec4899\"\n 600: \"#db2777\"\n 700: \"#be185d\"\n neutral:\n 50: \"#fefefe\"\n 100: \"#f9fafb\"\n 700: \"#6b7280\"\n 800: \"#4b5563\"\n 900: \"#374151\"\n text:\n primary: \"#374151\"\n secondary: \"#9ca3af\"\n inverse: \"#ffffff\"\n\nspacing:\n section: \"py-16\"\n container: \"max-w-6xl mx-auto px-6 sm:px-8 lg:px-10\"\n\ntypography:\n hero: \"text-3xl md:text-5xl font-semibold\"\n subtitle: \"text-lg md:text-xl\"\n\ncomponents:\n button:\n primary: \"bg-pink-600 text-white hover:bg-pink-700 px-6 py-2 rounded-full font-medium\"\n secondary: \"text-pink-600 border border-pink-600 hover:bg-pink-50 px-6 py-2 rounded-full font-medium\"\n header:\n background: \"bg-neutral-50 shadow-none\"\n border: \"border-b border-neutral-200\"\n hero:\n background: \"bg-gradient-to-br from-neutral-100 to-neutral-200\"\n"
|
|
75
|
+
};
|
|
76
|
+
if (!themes[name]) {
|
|
77
|
+
throw new Error("Theme '".concat(name, "' not found"));
|
|
78
|
+
}
|
|
79
|
+
return themes[name];
|
|
80
|
+
};
|
|
81
|
+
ThemeLoader.themes = new Map();
|
|
82
|
+
return ThemeLoader;
|
|
83
|
+
}());
|
|
84
|
+
exports.ThemeLoader = ThemeLoader;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const corporateTheme: {
|
|
2
|
+
colors: {
|
|
3
|
+
primary: {
|
|
4
|
+
50: string;
|
|
5
|
+
100: string;
|
|
6
|
+
500: string;
|
|
7
|
+
600: string;
|
|
8
|
+
700: string;
|
|
9
|
+
};
|
|
10
|
+
neutral: {
|
|
11
|
+
50: string;
|
|
12
|
+
100: string;
|
|
13
|
+
700: string;
|
|
14
|
+
800: string;
|
|
15
|
+
900: string;
|
|
16
|
+
};
|
|
17
|
+
text: {
|
|
18
|
+
primary: string;
|
|
19
|
+
secondary: string;
|
|
20
|
+
inverse: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
spacing: {
|
|
24
|
+
section: string;
|
|
25
|
+
container: string;
|
|
26
|
+
};
|
|
27
|
+
typography: {
|
|
28
|
+
hero: string;
|
|
29
|
+
subtitle: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=corporate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corporate.d.ts","sourceRoot":"","sources":["../../src/themes/corporate.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8B1B,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.corporateTheme = void 0;
|
|
4
|
+
exports.corporateTheme = {
|
|
5
|
+
colors: {
|
|
6
|
+
primary: {
|
|
7
|
+
50: '#fef7ee',
|
|
8
|
+
100: '#fdedd3',
|
|
9
|
+
500: '#f59e0b', // amber-500
|
|
10
|
+
600: '#d97706', // amber-600
|
|
11
|
+
700: '#b45309', // amber-700
|
|
12
|
+
},
|
|
13
|
+
neutral: {
|
|
14
|
+
50: '#f8fafc',
|
|
15
|
+
100: '#f1f5f9',
|
|
16
|
+
700: '#334155',
|
|
17
|
+
800: '#1e293b',
|
|
18
|
+
900: '#0f172a',
|
|
19
|
+
},
|
|
20
|
+
text: {
|
|
21
|
+
primary: '#1f2937',
|
|
22
|
+
secondary: '#6b7280',
|
|
23
|
+
inverse: '#ffffff',
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
spacing: {
|
|
27
|
+
section: 'py-20',
|
|
28
|
+
container: 'max-w-7xl mx-auto px-4 sm:px-6 lg:px-8',
|
|
29
|
+
},
|
|
30
|
+
typography: {
|
|
31
|
+
hero: 'text-4xl md:text-6xl font-bold',
|
|
32
|
+
subtitle: 'text-xl md:text-2xl',
|
|
33
|
+
}
|
|
34
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const softTheme: {
|
|
2
|
+
colors: {
|
|
3
|
+
primary: {
|
|
4
|
+
50: string;
|
|
5
|
+
100: string;
|
|
6
|
+
500: string;
|
|
7
|
+
600: string;
|
|
8
|
+
700: string;
|
|
9
|
+
};
|
|
10
|
+
neutral: {
|
|
11
|
+
50: string;
|
|
12
|
+
100: string;
|
|
13
|
+
700: string;
|
|
14
|
+
800: string;
|
|
15
|
+
900: string;
|
|
16
|
+
};
|
|
17
|
+
text: {
|
|
18
|
+
primary: string;
|
|
19
|
+
secondary: string;
|
|
20
|
+
inverse: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
spacing: {
|
|
24
|
+
section: string;
|
|
25
|
+
container: string;
|
|
26
|
+
};
|
|
27
|
+
typography: {
|
|
28
|
+
hero: string;
|
|
29
|
+
subtitle: string;
|
|
30
|
+
};
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=soft.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"soft.d.ts","sourceRoot":"","sources":["../../src/themes/soft.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BrB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.softTheme = void 0;
|
|
4
|
+
exports.softTheme = {
|
|
5
|
+
colors: {
|
|
6
|
+
primary: {
|
|
7
|
+
50: '#fdf2f8',
|
|
8
|
+
100: '#fce7f3',
|
|
9
|
+
500: '#ec4899', // pink-500
|
|
10
|
+
600: '#db2777', // pink-600
|
|
11
|
+
700: '#be185d', // pink-700
|
|
12
|
+
},
|
|
13
|
+
neutral: {
|
|
14
|
+
50: '#fefefe',
|
|
15
|
+
100: '#f9fafb',
|
|
16
|
+
700: '#6b7280',
|
|
17
|
+
800: '#4b5563',
|
|
18
|
+
900: '#374151',
|
|
19
|
+
},
|
|
20
|
+
text: {
|
|
21
|
+
primary: '#374151',
|
|
22
|
+
secondary: '#9ca3af',
|
|
23
|
+
inverse: '#ffffff',
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
spacing: {
|
|
27
|
+
section: 'py-16',
|
|
28
|
+
container: 'max-w-6xl mx-auto px-6 sm:px-8 lg:px-10',
|
|
29
|
+
},
|
|
30
|
+
typography: {
|
|
31
|
+
hero: 'text-3xl md:text-5xl font-semibold',
|
|
32
|
+
subtitle: 'text-lg md:text-xl',
|
|
33
|
+
}
|
|
34
|
+
};
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export interface ThemeConfig {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
colors: {
|
|
6
|
+
primary: string;
|
|
7
|
+
secondary: string;
|
|
8
|
+
accent: string;
|
|
9
|
+
background: string;
|
|
10
|
+
surface: string;
|
|
11
|
+
text: string;
|
|
12
|
+
textSecondary: string;
|
|
13
|
+
};
|
|
14
|
+
backgroundImage?: {
|
|
15
|
+
url: string;
|
|
16
|
+
repeat?: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat';
|
|
17
|
+
size?: 'auto' | 'cover' | 'contain' | string;
|
|
18
|
+
position?: string;
|
|
19
|
+
attachment?: 'scroll' | 'fixed' | 'local';
|
|
20
|
+
scale?: number;
|
|
21
|
+
animation?: 'drift' | 'float' | 'shimmer' | 'shimmer-float' | 'none';
|
|
22
|
+
customAnimation?: string;
|
|
23
|
+
};
|
|
24
|
+
typography: {
|
|
25
|
+
fontFamily: {
|
|
26
|
+
primary: string;
|
|
27
|
+
secondary: string;
|
|
28
|
+
};
|
|
29
|
+
scale: {
|
|
30
|
+
xs: string;
|
|
31
|
+
sm: string;
|
|
32
|
+
base: string;
|
|
33
|
+
lg: string;
|
|
34
|
+
xl: string;
|
|
35
|
+
'2xl': string;
|
|
36
|
+
'3xl': string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
spacing: {
|
|
40
|
+
xs: string;
|
|
41
|
+
sm: string;
|
|
42
|
+
md: string;
|
|
43
|
+
lg: string;
|
|
44
|
+
xl: string;
|
|
45
|
+
'2xl': string;
|
|
46
|
+
};
|
|
47
|
+
components: {
|
|
48
|
+
button: ComponentStyle;
|
|
49
|
+
card: ComponentStyle;
|
|
50
|
+
header: ComponentStyle;
|
|
51
|
+
footer: ComponentStyle;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
export interface ComponentStyle {
|
|
55
|
+
base?: string;
|
|
56
|
+
primary?: string;
|
|
57
|
+
secondary?: string;
|
|
58
|
+
outline?: string;
|
|
59
|
+
shadow?: string;
|
|
60
|
+
nav?: string;
|
|
61
|
+
text?: string;
|
|
62
|
+
[key: string]: string | undefined;
|
|
63
|
+
}
|
|
64
|
+
export interface Theme extends ThemeConfig {
|
|
65
|
+
}
|
|
66
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;QACnB,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,aAAa,EAAE,MAAM,CAAC;KACvB,CAAC;IACF,eAAe,CAAC,EAAE;QAChB,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,GAAG,UAAU,GAAG,WAAW,CAAC;QAC1D,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;QAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,UAAU,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;QAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,SAAS,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,eAAe,GAAG,MAAM,CAAC;QACrE,eAAe,CAAC,EAAE,MAAM,CAAC;KAC1B,CAAC;IACF,UAAU,EAAE;QACV,UAAU,EAAE;YACV,OAAO,EAAE,MAAM,CAAC;YAChB,SAAS,EAAE,MAAM,CAAC;SACnB,CAAC;QACF,KAAK,EAAE;YACL,EAAE,EAAE,MAAM,CAAC;YACX,EAAE,EAAE,MAAM,CAAC;YACX,IAAI,EAAE,MAAM,CAAC;YACb,EAAE,EAAE,MAAM,CAAC;YACX,EAAE,EAAE,MAAM,CAAC;YACX,KAAK,EAAE,MAAM,CAAC;YACd,KAAK,EAAE,MAAM,CAAC;SACf,CAAC;KACH,CAAC;IACF,OAAO,EAAE;QACP,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,EAAE,EAAE,MAAM,CAAC;QACX,KAAK,EAAE,MAAM,CAAC;KACf,CAAC;IACF,UAAU,EAAE;QACV,MAAM,EAAE,cAAc,CAAC;QACvB,IAAI,EAAE,cAAc,CAAC;QACrB,MAAM,EAAE,cAAc,CAAC;QACvB,MAAM,EAAE,cAAc,CAAC;KACxB,CAAC;CACH;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACnC;AAED,MAAM,WAAW,KAAM,SAAQ,WAAW;CAAG"}
|
package/dist/types.js
ADDED
package/package.json
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@stackwright/themes",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"main": "dist/index.js",
|
|
5
|
+
"types": "dist/index.d.ts",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"react": "^18.0.0",
|
|
8
|
+
"js-yaml": "^4.1.0"
|
|
9
|
+
},
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"@types/react": "^18.0.0",
|
|
12
|
+
"@types/js-yaml": "^4.0.0",
|
|
13
|
+
"typescript": "^5.0.0"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "tsc",
|
|
17
|
+
"dev": "tsc --watch"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React, { createContext, useContext, ReactNode } from 'react';
|
|
2
|
+
import { Theme } from './types';
|
|
3
|
+
|
|
4
|
+
interface ThemeContextType {
|
|
5
|
+
theme: Theme;
|
|
6
|
+
setTheme?: (theme: Theme) => void;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const ThemeContext = createContext<ThemeContextType | undefined>(undefined);
|
|
10
|
+
|
|
11
|
+
interface ThemeProviderProps {
|
|
12
|
+
theme: Theme;
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const ThemeProvider: React.FC<ThemeProviderProps> = ({ theme, children }) => {
|
|
17
|
+
return (
|
|
18
|
+
<ThemeContext.Provider value={{ theme }}>
|
|
19
|
+
{children}
|
|
20
|
+
</ThemeContext.Provider>
|
|
21
|
+
);
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export const useTheme = (): ThemeContextType => {
|
|
25
|
+
const context = useContext(ThemeContext);
|
|
26
|
+
if (!context) {
|
|
27
|
+
throw new Error('useTheme must be used within a ThemeProvider');
|
|
28
|
+
}
|
|
29
|
+
return context;
|
|
30
|
+
};
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import * as yaml from 'js-yaml';
|
|
2
|
+
import { Theme } from './types';
|
|
3
|
+
|
|
4
|
+
export class ThemeLoader {
|
|
5
|
+
private static themes: Map<string, Theme> = new Map();
|
|
6
|
+
|
|
7
|
+
static loadThemeFromYaml(yamlContent: string): Theme {
|
|
8
|
+
try {
|
|
9
|
+
const theme = yaml.load(yamlContent) as Theme;
|
|
10
|
+
this.themes.set(theme.name, theme);
|
|
11
|
+
return theme;
|
|
12
|
+
} catch (error) {
|
|
13
|
+
throw new Error(`Failed to parse theme YAML: ${error}`);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
static loadThemeFromFile(themeName: string): Theme {
|
|
18
|
+
// In a real implementation, this would load from the file system
|
|
19
|
+
// For now, we'll embed the themes
|
|
20
|
+
const themeData = this.getEmbeddedTheme(themeName);
|
|
21
|
+
return this.loadThemeFromYaml(themeData);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
static getTheme(name: string): Theme | undefined {
|
|
25
|
+
return this.themes.get(name);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
static getAllThemes(): Theme[] {
|
|
29
|
+
return Array.from(this.themes.values());
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static registerCustomTheme(theme: Theme): void {
|
|
33
|
+
this.themes.set(theme.name, theme);
|
|
34
|
+
console.log(`🎨 Registered custom theme: ${theme.name}`);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
static loadCustomTheme(theme: Theme): Theme {
|
|
38
|
+
this.registerCustomTheme(theme);
|
|
39
|
+
return theme;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
private static getEmbeddedTheme(name: string): string {
|
|
43
|
+
const themes: Record<string, string> = {
|
|
44
|
+
corporate: `
|
|
45
|
+
name: "Corporate"
|
|
46
|
+
colors:
|
|
47
|
+
primary:
|
|
48
|
+
50: "#fef7ee"
|
|
49
|
+
100: "#fdedd3"
|
|
50
|
+
500: "#f59e0b"
|
|
51
|
+
600: "#d97706"
|
|
52
|
+
700: "#b45309"
|
|
53
|
+
neutral:
|
|
54
|
+
50: "#f8fafc"
|
|
55
|
+
100: "#f1f5f9"
|
|
56
|
+
700: "#334155"
|
|
57
|
+
800: "#1e293b"
|
|
58
|
+
900: "#0f172a"
|
|
59
|
+
text:
|
|
60
|
+
primary: "#1f2937"
|
|
61
|
+
secondary: "#6b7280"
|
|
62
|
+
inverse: "#ffffff"
|
|
63
|
+
|
|
64
|
+
spacing:
|
|
65
|
+
section: "py-20"
|
|
66
|
+
container: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"
|
|
67
|
+
|
|
68
|
+
typography:
|
|
69
|
+
hero: "text-4xl md:text-6xl font-bold"
|
|
70
|
+
subtitle: "text-xl md:text-2xl"
|
|
71
|
+
|
|
72
|
+
components:
|
|
73
|
+
button:
|
|
74
|
+
primary: "bg-amber-600 text-white hover:bg-amber-700 px-8 py-3 rounded-lg font-semibold"
|
|
75
|
+
secondary: "text-amber-600 border border-amber-600 hover:bg-amber-50 px-8 py-3 rounded-lg font-semibold"
|
|
76
|
+
header:
|
|
77
|
+
background: "bg-white shadow-sm"
|
|
78
|
+
border: "border-b border-gray-200"
|
|
79
|
+
hero:
|
|
80
|
+
background: "bg-gradient-to-br from-slate-900 to-slate-800"
|
|
81
|
+
`,
|
|
82
|
+
soft: `
|
|
83
|
+
name: "Soft"
|
|
84
|
+
colors:
|
|
85
|
+
primary:
|
|
86
|
+
50: "#fdf2f8"
|
|
87
|
+
100: "#fce7f3"
|
|
88
|
+
500: "#ec4899"
|
|
89
|
+
600: "#db2777"
|
|
90
|
+
700: "#be185d"
|
|
91
|
+
neutral:
|
|
92
|
+
50: "#fefefe"
|
|
93
|
+
100: "#f9fafb"
|
|
94
|
+
700: "#6b7280"
|
|
95
|
+
800: "#4b5563"
|
|
96
|
+
900: "#374151"
|
|
97
|
+
text:
|
|
98
|
+
primary: "#374151"
|
|
99
|
+
secondary: "#9ca3af"
|
|
100
|
+
inverse: "#ffffff"
|
|
101
|
+
|
|
102
|
+
spacing:
|
|
103
|
+
section: "py-16"
|
|
104
|
+
container: "max-w-6xl mx-auto px-6 sm:px-8 lg:px-10"
|
|
105
|
+
|
|
106
|
+
typography:
|
|
107
|
+
hero: "text-3xl md:text-5xl font-semibold"
|
|
108
|
+
subtitle: "text-lg md:text-xl"
|
|
109
|
+
|
|
110
|
+
components:
|
|
111
|
+
button:
|
|
112
|
+
primary: "bg-pink-600 text-white hover:bg-pink-700 px-6 py-2 rounded-full font-medium"
|
|
113
|
+
secondary: "text-pink-600 border border-pink-600 hover:bg-pink-50 px-6 py-2 rounded-full font-medium"
|
|
114
|
+
header:
|
|
115
|
+
background: "bg-neutral-50 shadow-none"
|
|
116
|
+
border: "border-b border-neutral-200"
|
|
117
|
+
hero:
|
|
118
|
+
background: "bg-gradient-to-br from-neutral-100 to-neutral-200"
|
|
119
|
+
`
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
if (!themes[name]) {
|
|
123
|
+
throw new Error(`Theme '${name}' not found`);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
return themes[name];
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export const corporateTheme = {
|
|
2
|
+
colors: {
|
|
3
|
+
primary: {
|
|
4
|
+
50: '#fef7ee',
|
|
5
|
+
100: '#fdedd3',
|
|
6
|
+
500: '#f59e0b', // amber-500
|
|
7
|
+
600: '#d97706', // amber-600
|
|
8
|
+
700: '#b45309', // amber-700
|
|
9
|
+
},
|
|
10
|
+
neutral: {
|
|
11
|
+
50: '#f8fafc',
|
|
12
|
+
100: '#f1f5f9',
|
|
13
|
+
700: '#334155',
|
|
14
|
+
800: '#1e293b',
|
|
15
|
+
900: '#0f172a',
|
|
16
|
+
},
|
|
17
|
+
text: {
|
|
18
|
+
primary: '#1f2937',
|
|
19
|
+
secondary: '#6b7280',
|
|
20
|
+
inverse: '#ffffff',
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
spacing: {
|
|
24
|
+
section: 'py-20',
|
|
25
|
+
container: 'max-w-7xl mx-auto px-4 sm:px-6 lg:px-8',
|
|
26
|
+
},
|
|
27
|
+
typography: {
|
|
28
|
+
hero: 'text-4xl md:text-6xl font-bold',
|
|
29
|
+
subtitle: 'text-xl md:text-2xl',
|
|
30
|
+
}
|
|
31
|
+
};
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: "Corporate"
|
|
2
|
+
colors:
|
|
3
|
+
primary:
|
|
4
|
+
50: "#fef7ee"
|
|
5
|
+
100: "#fdedd3"
|
|
6
|
+
500: "#f59e0b"
|
|
7
|
+
600: "#d97706"
|
|
8
|
+
700: "#b45309"
|
|
9
|
+
neutral:
|
|
10
|
+
50: "#f8fafc"
|
|
11
|
+
100: "#f1f5f9"
|
|
12
|
+
700: "#334155"
|
|
13
|
+
800: "#1e293b"
|
|
14
|
+
900: "#0f172a"
|
|
15
|
+
text:
|
|
16
|
+
primary: "#1f2937"
|
|
17
|
+
secondary: "#6b7280"
|
|
18
|
+
inverse: "#ffffff"
|
|
19
|
+
|
|
20
|
+
spacing:
|
|
21
|
+
section: "py-20"
|
|
22
|
+
container: "max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"
|
|
23
|
+
|
|
24
|
+
typography:
|
|
25
|
+
hero: "text-4xl md:text-6xl font-bold"
|
|
26
|
+
subtitle: "text-xl md:text-2xl"
|
|
27
|
+
|
|
28
|
+
components:
|
|
29
|
+
button:
|
|
30
|
+
primary: "bg-amber-600 text-white hover:bg-amber-700 px-8 py-3 rounded-lg font-semibold"
|
|
31
|
+
secondary: "text-amber-600 border border-amber-600 hover:bg-amber-50 px-8 py-3 rounded-lg font-semibold"
|
|
32
|
+
header:
|
|
33
|
+
background: "bg-white shadow-sm"
|
|
34
|
+
border: "border-b border-gray-200"
|
|
35
|
+
hero:
|
|
36
|
+
background: "bg-gradient-to-br from-slate-900 to-slate-800"
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const softTheme = {
|
|
2
|
+
colors: {
|
|
3
|
+
primary: {
|
|
4
|
+
50: '#fdf2f8',
|
|
5
|
+
100: '#fce7f3',
|
|
6
|
+
500: '#ec4899', // pink-500
|
|
7
|
+
600: '#db2777', // pink-600
|
|
8
|
+
700: '#be185d', // pink-700
|
|
9
|
+
},
|
|
10
|
+
neutral: {
|
|
11
|
+
50: '#fefefe',
|
|
12
|
+
100: '#f9fafb',
|
|
13
|
+
700: '#6b7280',
|
|
14
|
+
800: '#4b5563',
|
|
15
|
+
900: '#374151',
|
|
16
|
+
},
|
|
17
|
+
text: {
|
|
18
|
+
primary: '#374151',
|
|
19
|
+
secondary: '#9ca3af',
|
|
20
|
+
inverse: '#ffffff',
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
spacing: {
|
|
24
|
+
section: 'py-16',
|
|
25
|
+
container: 'max-w-6xl mx-auto px-6 sm:px-8 lg:px-10',
|
|
26
|
+
},
|
|
27
|
+
typography: {
|
|
28
|
+
hero: 'text-3xl md:text-5xl font-semibold',
|
|
29
|
+
subtitle: 'text-lg md:text-xl',
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
name: "Soft"
|
|
2
|
+
colors:
|
|
3
|
+
primary:
|
|
4
|
+
50: "#fdf2f8"
|
|
5
|
+
100: "#fce7f3"
|
|
6
|
+
500: "#ec4899"
|
|
7
|
+
600: "#db2777"
|
|
8
|
+
700: "#be185d"
|
|
9
|
+
neutral:
|
|
10
|
+
50: "#fefefe"
|
|
11
|
+
100: "#f9fafb"
|
|
12
|
+
700: "#6b7280"
|
|
13
|
+
800: "#4b5563"
|
|
14
|
+
900: "#374151"
|
|
15
|
+
text:
|
|
16
|
+
primary: "#374151"
|
|
17
|
+
secondary: "#9ca3af"
|
|
18
|
+
inverse: "#ffffff"
|
|
19
|
+
|
|
20
|
+
spacing:
|
|
21
|
+
section: "py-16"
|
|
22
|
+
container: "max-w-6xl mx-auto px-6 sm:px-8 lg:px-10"
|
|
23
|
+
|
|
24
|
+
typography:
|
|
25
|
+
hero: "text-3xl md:text-5xl font-semibold"
|
|
26
|
+
subtitle: "text-lg md:text-xl"
|
|
27
|
+
|
|
28
|
+
components:
|
|
29
|
+
button:
|
|
30
|
+
primary: "bg-pink-600 text-white hover:bg-pink-700 px-6 py-2 rounded-full font-medium"
|
|
31
|
+
secondary: "text-pink-600 border border-pink-600 hover:bg-pink-50 px-6 py-2 rounded-full font-medium"
|
|
32
|
+
header:
|
|
33
|
+
background: "bg-neutral-50 shadow-none"
|
|
34
|
+
border: "border-b border-neutral-200"
|
|
35
|
+
hero:
|
|
36
|
+
background: "bg-gradient-to-br from-neutral-100 to-neutral-200"
|
package/src/types.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export interface ThemeConfig {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
description: string;
|
|
5
|
+
colors: {
|
|
6
|
+
primary: string;
|
|
7
|
+
secondary: string;
|
|
8
|
+
accent: string;
|
|
9
|
+
background: string;
|
|
10
|
+
surface: string;
|
|
11
|
+
text: string;
|
|
12
|
+
textSecondary: string;
|
|
13
|
+
};
|
|
14
|
+
backgroundImage?: {
|
|
15
|
+
url: string;
|
|
16
|
+
repeat?: 'repeat' | 'repeat-x' | 'repeat-y' | 'no-repeat';
|
|
17
|
+
size?: 'auto' | 'cover' | 'contain' | string;
|
|
18
|
+
position?: string;
|
|
19
|
+
attachment?: 'scroll' | 'fixed' | 'local';
|
|
20
|
+
scale?: number;
|
|
21
|
+
animation?: 'drift' | 'float' | 'shimmer' | 'shimmer-float' | 'none';
|
|
22
|
+
customAnimation?: string;
|
|
23
|
+
};
|
|
24
|
+
typography: {
|
|
25
|
+
fontFamily: {
|
|
26
|
+
primary: string;
|
|
27
|
+
secondary: string;
|
|
28
|
+
};
|
|
29
|
+
scale: {
|
|
30
|
+
xs: string;
|
|
31
|
+
sm: string;
|
|
32
|
+
base: string;
|
|
33
|
+
lg: string;
|
|
34
|
+
xl: string;
|
|
35
|
+
'2xl': string;
|
|
36
|
+
'3xl': string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
spacing: {
|
|
40
|
+
xs: string;
|
|
41
|
+
sm: string;
|
|
42
|
+
md: string;
|
|
43
|
+
lg: string;
|
|
44
|
+
xl: string;
|
|
45
|
+
'2xl': string;
|
|
46
|
+
};
|
|
47
|
+
components: {
|
|
48
|
+
button: ComponentStyle;
|
|
49
|
+
card: ComponentStyle;
|
|
50
|
+
header: ComponentStyle;
|
|
51
|
+
footer: ComponentStyle;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface ComponentStyle {
|
|
56
|
+
base?: string;
|
|
57
|
+
primary?: string;
|
|
58
|
+
secondary?: string;
|
|
59
|
+
outline?: string;
|
|
60
|
+
shadow?: string;
|
|
61
|
+
nav?: string;
|
|
62
|
+
text?: string;
|
|
63
|
+
[key: string]: string | undefined;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export interface Theme extends ThemeConfig {}
|
package/tsconfig.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "es5",
|
|
4
|
+
"lib": ["dom", "dom.iterable", "es6"],
|
|
5
|
+
"allowJs": true,
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"allowSyntheticDefaultImports": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"forceConsistentCasingInFileNames": true,
|
|
11
|
+
"moduleResolution": "node",
|
|
12
|
+
"resolveJsonModule": true,
|
|
13
|
+
"isolatedModules": true,
|
|
14
|
+
"noEmit": false,
|
|
15
|
+
"jsx": "react-jsx",
|
|
16
|
+
"module": "commonjs",
|
|
17
|
+
"outDir": "./dist",
|
|
18
|
+
"rootDir": "./src",
|
|
19
|
+
"declaration": true,
|
|
20
|
+
"declarationMap": true
|
|
21
|
+
},
|
|
22
|
+
"include": [
|
|
23
|
+
"src/**/*"
|
|
24
|
+
],
|
|
25
|
+
"exclude": [
|
|
26
|
+
"node_modules",
|
|
27
|
+
"dist"
|
|
28
|
+
]
|
|
29
|
+
}
|
package/tsup.config.ts
ADDED