@stackwright/themes 0.4.0 → 0.5.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.
@@ -1,34 +0,0 @@
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
- };
@@ -1,32 +0,0 @@
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
@@ -1 +0,0 @@
1
- {"version":3,"file":"soft.d.ts","sourceRoot":"","sources":["../../src/themes/soft.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8BrB,CAAC"}
@@ -1,34 +0,0 @@
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 DELETED
@@ -1,66 +0,0 @@
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
@@ -1 +0,0 @@
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 DELETED
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,30 +0,0 @@
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 DELETED
@@ -1,4 +0,0 @@
1
- export * from './types';
2
- export * from './ThemeProvider';
3
- export * from './themeLoader';
4
- export type { ThemeConfig, Theme, ComponentStyle } from './types';
@@ -1,128 +0,0 @@
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
- }
@@ -1,31 +0,0 @@
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
- };
@@ -1,36 +0,0 @@
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"
@@ -1,32 +0,0 @@
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
-
@@ -1,36 +0,0 @@
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 DELETED
@@ -1,66 +0,0 @@
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 DELETED
@@ -1,29 +0,0 @@
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 DELETED
@@ -1,10 +0,0 @@
1
- import { defineConfig } from 'tsup';
2
-
3
- export default defineConfig({
4
- entry: ['src/index.ts'],
5
- format: ['cjs', 'esm'],
6
- dts: false, // Disable type generation temporarily
7
- splitting: false,
8
- sourcemap: true,
9
- clean: true,
10
- });