@ereo/plugin-tailwind 0.1.6
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 +204 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +224 -0
- package/dist/preset.d.ts +200 -0
- package/dist/preset.d.ts.map +1 -0
- package/package.json +49 -0
package/README.md
ADDED
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
# @ereo/plugin-tailwind
|
|
2
|
+
|
|
3
|
+
Zero-config Tailwind CSS integration for the EreoJS framework. Includes a custom preset with animations, colors, and sensible defaults.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bun add @ereo/plugin-tailwind tailwindcss
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
// ereo.config.ts
|
|
15
|
+
import { defineConfig } from '@ereo/core'
|
|
16
|
+
import tailwind from '@ereo/plugin-tailwind'
|
|
17
|
+
|
|
18
|
+
export default defineConfig({
|
|
19
|
+
plugins: [
|
|
20
|
+
tailwind() // Zero-config setup
|
|
21
|
+
]
|
|
22
|
+
})
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Plugin Options
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
interface TailwindPluginOptions {
|
|
29
|
+
/** Content paths to scan (auto-detected by default) */
|
|
30
|
+
content?: string[]
|
|
31
|
+
/** Path to tailwind.config.js (auto-detected by default) */
|
|
32
|
+
config?: string
|
|
33
|
+
/** Enable dark mode */
|
|
34
|
+
darkMode?: 'class' | 'media' | false
|
|
35
|
+
/** Use EreoJS preset */
|
|
36
|
+
usePreset?: boolean
|
|
37
|
+
}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Default Values
|
|
41
|
+
|
|
42
|
+
```typescript
|
|
43
|
+
const defaults = {
|
|
44
|
+
content: ['./app/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'],
|
|
45
|
+
config: 'tailwind.config.js',
|
|
46
|
+
darkMode: 'class',
|
|
47
|
+
usePreset: true
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### With Custom Options
|
|
52
|
+
|
|
53
|
+
```typescript
|
|
54
|
+
import tailwind from '@ereo/plugin-tailwind'
|
|
55
|
+
|
|
56
|
+
export default defineConfig({
|
|
57
|
+
plugins: [
|
|
58
|
+
tailwind({
|
|
59
|
+
content: ['./src/**/*.{js,ts,jsx,tsx}'],
|
|
60
|
+
darkMode: 'media',
|
|
61
|
+
usePreset: true
|
|
62
|
+
})
|
|
63
|
+
]
|
|
64
|
+
})
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Key Features
|
|
68
|
+
|
|
69
|
+
- **Zero Configuration**: Works out of the box with sensible defaults
|
|
70
|
+
- **EreoJS Preset**: Custom preset with animations, typography, and colors
|
|
71
|
+
- **Dark Mode Support**: Built-in dark mode with class-based toggling (default)
|
|
72
|
+
- **Animation Utilities**: Pre-built fade, slide, and scale animations
|
|
73
|
+
- **Custom Color Palette**: EreoJS brand colors (`ereo-50` through `ereo-950`)
|
|
74
|
+
- **Typography Defaults**: Inter and JetBrains Mono font families
|
|
75
|
+
- **Virtual CSS Module**: Import Tailwind via `virtual:tailwind.css`
|
|
76
|
+
- **Config Generation**: Helper functions to generate Tailwind config files
|
|
77
|
+
|
|
78
|
+
## EreoJS Preset
|
|
79
|
+
|
|
80
|
+
The preset includes the following extensions:
|
|
81
|
+
|
|
82
|
+
### Color Palette
|
|
83
|
+
|
|
84
|
+
| Class | Hex |
|
|
85
|
+
|-------|-----|
|
|
86
|
+
| `ereo-50` | `#f5f7ff` |
|
|
87
|
+
| `ereo-100` | `#ebf0fe` |
|
|
88
|
+
| `ereo-200` | `#d6e0fd` |
|
|
89
|
+
| `ereo-300` | `#b3c7fb` |
|
|
90
|
+
| `ereo-400` | `#8aa8f8` |
|
|
91
|
+
| `ereo-500` | `#6285f4` |
|
|
92
|
+
| `ereo-600` | `#4361ee` |
|
|
93
|
+
| `ereo-700` | `#3451d1` |
|
|
94
|
+
| `ereo-800` | `#2c43aa` |
|
|
95
|
+
| `ereo-900` | `#273b87` |
|
|
96
|
+
| `ereo-950` | `#1a2552` |
|
|
97
|
+
|
|
98
|
+
### Animations
|
|
99
|
+
|
|
100
|
+
- `animate-fade-in` - Fade in (0.2s ease-out)
|
|
101
|
+
- `animate-slide-in` - Slide in from left (0.3s ease-out)
|
|
102
|
+
- `animate-slide-up` - Slide up from bottom (0.3s ease-out)
|
|
103
|
+
- `animate-scale-in` - Scale in (0.2s ease-out)
|
|
104
|
+
|
|
105
|
+
### Extended Spacing
|
|
106
|
+
|
|
107
|
+
- `18` = 4.5rem (72px)
|
|
108
|
+
- `88` = 22rem (352px)
|
|
109
|
+
- `128` = 32rem (512px)
|
|
110
|
+
|
|
111
|
+
### Font Families
|
|
112
|
+
|
|
113
|
+
- `font-sans`: Inter, ui-sans-serif, system-ui, ...
|
|
114
|
+
- `font-mono`: JetBrains Mono, ui-monospace, ...
|
|
115
|
+
|
|
116
|
+
### Additional Utilities
|
|
117
|
+
|
|
118
|
+
- Border radius: `rounded-4xl` (2rem)
|
|
119
|
+
- Box shadow: `shadow-inner-sm`
|
|
120
|
+
- Z-index: `z-60`, `z-70`, `z-80`, `z-90`, `z-100`
|
|
121
|
+
|
|
122
|
+
## Using the Preset
|
|
123
|
+
|
|
124
|
+
```typescript
|
|
125
|
+
// tailwind.config.js
|
|
126
|
+
import { getEreoTailwindConfig } from '@ereo/plugin-tailwind'
|
|
127
|
+
|
|
128
|
+
export default getEreoTailwindConfig({
|
|
129
|
+
// Add your customizations here
|
|
130
|
+
theme: {
|
|
131
|
+
extend: {
|
|
132
|
+
colors: {
|
|
133
|
+
brand: '#ff6b6b'
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
})
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
## Virtual CSS Module
|
|
141
|
+
|
|
142
|
+
Import Tailwind styles without creating a CSS file:
|
|
143
|
+
|
|
144
|
+
```typescript
|
|
145
|
+
import 'virtual:tailwind.css'
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Helper Functions
|
|
149
|
+
|
|
150
|
+
### generateConfig(options?)
|
|
151
|
+
|
|
152
|
+
Generate Tailwind config file content:
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
import { generateConfig } from '@ereo/plugin-tailwind'
|
|
156
|
+
|
|
157
|
+
const configContent = generateConfig()
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
### generateCSSEntry()
|
|
161
|
+
|
|
162
|
+
Generate CSS entry file content:
|
|
163
|
+
|
|
164
|
+
```typescript
|
|
165
|
+
import { generateCSSEntry } from '@ereo/plugin-tailwind'
|
|
166
|
+
|
|
167
|
+
const cssContent = generateCSSEntry()
|
|
168
|
+
// Returns:
|
|
169
|
+
// @tailwind base;
|
|
170
|
+
// @tailwind components;
|
|
171
|
+
// @tailwind utilities;
|
|
172
|
+
//
|
|
173
|
+
// /* Custom styles below */
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
## Exports
|
|
177
|
+
|
|
178
|
+
```typescript
|
|
179
|
+
// Default export
|
|
180
|
+
import tailwind from '@ereo/plugin-tailwind'
|
|
181
|
+
|
|
182
|
+
// Named exports
|
|
183
|
+
import {
|
|
184
|
+
ereoPreset,
|
|
185
|
+
getEreoTailwindConfig,
|
|
186
|
+
generateConfig,
|
|
187
|
+
generateCSSEntry
|
|
188
|
+
} from '@ereo/plugin-tailwind'
|
|
189
|
+
|
|
190
|
+
// Types
|
|
191
|
+
import type { TailwindPluginOptions } from '@ereo/plugin-tailwind'
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
## Documentation
|
|
195
|
+
|
|
196
|
+
For full documentation, visit the [EreoJS Documentation](https://ereojs.dev/docs/plugins/tailwind).
|
|
197
|
+
|
|
198
|
+
## Part of EreoJS
|
|
199
|
+
|
|
200
|
+
This package is part of the [EreoJS](https://github.com/ereojs/ereo) monorepo - a modern full-stack JavaScript framework.
|
|
201
|
+
|
|
202
|
+
## License
|
|
203
|
+
|
|
204
|
+
MIT
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ereo/plugin-tailwind
|
|
3
|
+
*
|
|
4
|
+
* Zero-config Tailwind CSS integration for EreoJS.
|
|
5
|
+
*/
|
|
6
|
+
import type { Plugin } from '@ereo/core';
|
|
7
|
+
/**
|
|
8
|
+
* Tailwind plugin options.
|
|
9
|
+
*/
|
|
10
|
+
export interface TailwindPluginOptions {
|
|
11
|
+
/** Content paths to scan (auto-detected by default) */
|
|
12
|
+
content?: string[];
|
|
13
|
+
/** Path to tailwind.config.js (auto-detected by default) */
|
|
14
|
+
config?: string;
|
|
15
|
+
/** Enable dark mode */
|
|
16
|
+
darkMode?: 'class' | 'media' | false;
|
|
17
|
+
/** Use EreoJS preset */
|
|
18
|
+
usePreset?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Create Tailwind CSS plugin.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* import { defineConfig } from '@ereo/core';
|
|
25
|
+
* import tailwind from '@ereo/plugin-tailwind';
|
|
26
|
+
*
|
|
27
|
+
* export default defineConfig({
|
|
28
|
+
* plugins: [
|
|
29
|
+
* tailwind(), // Zero-config
|
|
30
|
+
* ],
|
|
31
|
+
* });
|
|
32
|
+
*/
|
|
33
|
+
export default function tailwind(options?: TailwindPluginOptions): Plugin;
|
|
34
|
+
export { ereoPreset, getEreoTailwindConfig } from './preset';
|
|
35
|
+
/**
|
|
36
|
+
* Generate Tailwind config file content.
|
|
37
|
+
*/
|
|
38
|
+
export declare function generateConfig(options?: TailwindPluginOptions): string;
|
|
39
|
+
/**
|
|
40
|
+
* Generate CSS entry file.
|
|
41
|
+
*/
|
|
42
|
+
export declare function generateCSSEntry(): string;
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAGzC;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,uDAAuD;IACvD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,KAAK,CAAC;IACrC,wBAAwB;IACxB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAYD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,UAAU,QAAQ,CAAC,OAAO,GAAE,qBAA0B,GAAG,MAAM,CA+F5E;AAGD,OAAO,EAAE,UAAU,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAE7D;;GAEG;AACH,wBAAgB,cAAc,CAAC,OAAO,GAAE,qBAA0B,GAAG,MAAM,CAwB1E;AAED;;GAEG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAQzC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
// src/index.ts
|
|
3
|
+
import { join } from "path";
|
|
4
|
+
|
|
5
|
+
// src/preset.ts
|
|
6
|
+
var ereoPreset = {
|
|
7
|
+
theme: {
|
|
8
|
+
extend: {
|
|
9
|
+
animation: {
|
|
10
|
+
"fade-in": "fadeIn 0.2s ease-out",
|
|
11
|
+
"slide-in": "slideIn 0.3s ease-out",
|
|
12
|
+
"slide-up": "slideUp 0.3s ease-out",
|
|
13
|
+
"scale-in": "scaleIn 0.2s ease-out"
|
|
14
|
+
},
|
|
15
|
+
keyframes: {
|
|
16
|
+
fadeIn: {
|
|
17
|
+
"0%": { opacity: "0" },
|
|
18
|
+
"100%": { opacity: "1" }
|
|
19
|
+
},
|
|
20
|
+
slideIn: {
|
|
21
|
+
"0%": { transform: "translateX(-10px)", opacity: "0" },
|
|
22
|
+
"100%": { transform: "translateX(0)", opacity: "1" }
|
|
23
|
+
},
|
|
24
|
+
slideUp: {
|
|
25
|
+
"0%": { transform: "translateY(10px)", opacity: "0" },
|
|
26
|
+
"100%": { transform: "translateY(0)", opacity: "1" }
|
|
27
|
+
},
|
|
28
|
+
scaleIn: {
|
|
29
|
+
"0%": { transform: "scale(0.95)", opacity: "0" },
|
|
30
|
+
"100%": { transform: "scale(1)", opacity: "1" }
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
fontFamily: {
|
|
34
|
+
sans: [
|
|
35
|
+
"Inter",
|
|
36
|
+
"ui-sans-serif",
|
|
37
|
+
"system-ui",
|
|
38
|
+
"-apple-system",
|
|
39
|
+
"BlinkMacSystemFont",
|
|
40
|
+
"Segoe UI",
|
|
41
|
+
"Roboto",
|
|
42
|
+
"sans-serif"
|
|
43
|
+
],
|
|
44
|
+
mono: [
|
|
45
|
+
"JetBrains Mono",
|
|
46
|
+
"ui-monospace",
|
|
47
|
+
"SFMono-Regular",
|
|
48
|
+
"Menlo",
|
|
49
|
+
"Monaco",
|
|
50
|
+
"monospace"
|
|
51
|
+
]
|
|
52
|
+
},
|
|
53
|
+
spacing: {
|
|
54
|
+
"18": "4.5rem",
|
|
55
|
+
"88": "22rem",
|
|
56
|
+
"128": "32rem"
|
|
57
|
+
},
|
|
58
|
+
colors: {
|
|
59
|
+
ereo: {
|
|
60
|
+
50: "#f5f7ff",
|
|
61
|
+
100: "#ebf0fe",
|
|
62
|
+
200: "#d6e0fd",
|
|
63
|
+
300: "#b3c7fb",
|
|
64
|
+
400: "#8aa8f8",
|
|
65
|
+
500: "#6285f4",
|
|
66
|
+
600: "#4361ee",
|
|
67
|
+
700: "#3451d1",
|
|
68
|
+
800: "#2c43aa",
|
|
69
|
+
900: "#273b87",
|
|
70
|
+
950: "#1a2552"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
borderRadius: {
|
|
74
|
+
"4xl": "2rem"
|
|
75
|
+
},
|
|
76
|
+
boxShadow: {
|
|
77
|
+
"inner-sm": "inset 0 1px 2px 0 rgb(0 0 0 / 0.05)"
|
|
78
|
+
},
|
|
79
|
+
zIndex: {
|
|
80
|
+
"60": "60",
|
|
81
|
+
"70": "70",
|
|
82
|
+
"80": "80",
|
|
83
|
+
"90": "90",
|
|
84
|
+
"100": "100"
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
plugins: []
|
|
89
|
+
};
|
|
90
|
+
function getEreoTailwindConfig(overrides = {}) {
|
|
91
|
+
return {
|
|
92
|
+
presets: [ereoPreset],
|
|
93
|
+
content: [
|
|
94
|
+
"./app/**/*.{js,ts,jsx,tsx}",
|
|
95
|
+
"./components/**/*.{js,ts,jsx,tsx}"
|
|
96
|
+
],
|
|
97
|
+
darkMode: "class",
|
|
98
|
+
...overrides,
|
|
99
|
+
theme: {
|
|
100
|
+
extend: {
|
|
101
|
+
...ereoPreset.theme.extend,
|
|
102
|
+
...overrides.theme?.extend
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
// src/index.ts
|
|
109
|
+
var defaults = {
|
|
110
|
+
content: ["./app/**/*.{js,ts,jsx,tsx}", "./components/**/*.{js,ts,jsx,tsx}"],
|
|
111
|
+
config: "tailwind.config.js",
|
|
112
|
+
darkMode: "class",
|
|
113
|
+
usePreset: true
|
|
114
|
+
};
|
|
115
|
+
function tailwind(options = {}) {
|
|
116
|
+
const opts = { ...defaults, ...options };
|
|
117
|
+
let tailwindCSS = null;
|
|
118
|
+
let configLoaded = false;
|
|
119
|
+
return {
|
|
120
|
+
name: "ereo:tailwind",
|
|
121
|
+
async setup(context) {
|
|
122
|
+
const root = context.root;
|
|
123
|
+
const configPath = join(root, opts.config);
|
|
124
|
+
try {
|
|
125
|
+
const hasConfig = await Bun.file(configPath).exists();
|
|
126
|
+
if (hasConfig) {
|
|
127
|
+
console.log(" Using existing tailwind.config.js");
|
|
128
|
+
configLoaded = true;
|
|
129
|
+
} else {
|
|
130
|
+
if (opts.usePreset) {
|
|
131
|
+
console.log(" Using EreoJS Tailwind preset");
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
} catch (error) {
|
|
135
|
+
console.warn(" Warning: Could not check for Tailwind config");
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
resolveId(id) {
|
|
139
|
+
if (id === "virtual:tailwind.css" || id === "/__tailwind.css") {
|
|
140
|
+
return "\x00virtual:tailwind.css";
|
|
141
|
+
}
|
|
142
|
+
return null;
|
|
143
|
+
},
|
|
144
|
+
async load(id) {
|
|
145
|
+
if (id === "\x00virtual:tailwind.css") {
|
|
146
|
+
if (tailwindCSS) {
|
|
147
|
+
return tailwindCSS;
|
|
148
|
+
}
|
|
149
|
+
return `
|
|
150
|
+
@tailwind base;
|
|
151
|
+
@tailwind components;
|
|
152
|
+
@tailwind utilities;
|
|
153
|
+
`.trim();
|
|
154
|
+
}
|
|
155
|
+
return null;
|
|
156
|
+
},
|
|
157
|
+
async transform(code, id) {
|
|
158
|
+
if (!id.endsWith(".css")) {
|
|
159
|
+
return null;
|
|
160
|
+
}
|
|
161
|
+
if (!code.includes("@tailwind")) {
|
|
162
|
+
return null;
|
|
163
|
+
}
|
|
164
|
+
return code;
|
|
165
|
+
},
|
|
166
|
+
async configureServer(server) {
|
|
167
|
+
server.middlewares.push(async (request, context, next) => {
|
|
168
|
+
const url = new URL(request.url);
|
|
169
|
+
if (url.pathname === "/__tailwind.css") {
|
|
170
|
+
const css = `
|
|
171
|
+
/* Tailwind CSS - Development Mode */
|
|
172
|
+
@import url('https://cdn.tailwindcss.com');
|
|
173
|
+
`.trim();
|
|
174
|
+
return new Response(css, {
|
|
175
|
+
headers: {
|
|
176
|
+
"Content-Type": "text/css",
|
|
177
|
+
"Cache-Control": "no-cache"
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
return next();
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
function generateConfig(options = {}) {
|
|
187
|
+
const opts = { ...defaults, ...options };
|
|
188
|
+
if (opts.usePreset) {
|
|
189
|
+
return `
|
|
190
|
+
import { getEreoTailwindConfig } from '@ereo/plugin-tailwind';
|
|
191
|
+
|
|
192
|
+
export default getEreoTailwindConfig({
|
|
193
|
+
// Add your customizations here
|
|
194
|
+
});
|
|
195
|
+
`.trim();
|
|
196
|
+
}
|
|
197
|
+
return `
|
|
198
|
+
/** @type {import('tailwindcss').Config} */
|
|
199
|
+
export default {
|
|
200
|
+
content: ${JSON.stringify(opts.content, null, 2)},
|
|
201
|
+
darkMode: '${opts.darkMode}',
|
|
202
|
+
theme: {
|
|
203
|
+
extend: {},
|
|
204
|
+
},
|
|
205
|
+
plugins: [],
|
|
206
|
+
};
|
|
207
|
+
`.trim();
|
|
208
|
+
}
|
|
209
|
+
function generateCSSEntry() {
|
|
210
|
+
return `
|
|
211
|
+
@tailwind base;
|
|
212
|
+
@tailwind components;
|
|
213
|
+
@tailwind utilities;
|
|
214
|
+
|
|
215
|
+
/* Custom styles below */
|
|
216
|
+
`.trim();
|
|
217
|
+
}
|
|
218
|
+
export {
|
|
219
|
+
getEreoTailwindConfig,
|
|
220
|
+
generateConfig,
|
|
221
|
+
generateCSSEntry,
|
|
222
|
+
ereoPreset,
|
|
223
|
+
tailwind as default
|
|
224
|
+
};
|
package/dist/preset.d.ts
ADDED
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @ereo/plugin-tailwind - Framework Preset
|
|
3
|
+
*
|
|
4
|
+
* Tailwind CSS preset with sensible defaults for EreoJS apps.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* EreoJS Tailwind preset.
|
|
8
|
+
*/
|
|
9
|
+
export declare const ereoPreset: {
|
|
10
|
+
theme: {
|
|
11
|
+
extend: {
|
|
12
|
+
animation: {
|
|
13
|
+
'fade-in': string;
|
|
14
|
+
'slide-in': string;
|
|
15
|
+
'slide-up': string;
|
|
16
|
+
'scale-in': string;
|
|
17
|
+
};
|
|
18
|
+
keyframes: {
|
|
19
|
+
fadeIn: {
|
|
20
|
+
'0%': {
|
|
21
|
+
opacity: string;
|
|
22
|
+
};
|
|
23
|
+
'100%': {
|
|
24
|
+
opacity: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
slideIn: {
|
|
28
|
+
'0%': {
|
|
29
|
+
transform: string;
|
|
30
|
+
opacity: string;
|
|
31
|
+
};
|
|
32
|
+
'100%': {
|
|
33
|
+
transform: string;
|
|
34
|
+
opacity: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
slideUp: {
|
|
38
|
+
'0%': {
|
|
39
|
+
transform: string;
|
|
40
|
+
opacity: string;
|
|
41
|
+
};
|
|
42
|
+
'100%': {
|
|
43
|
+
transform: string;
|
|
44
|
+
opacity: string;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
scaleIn: {
|
|
48
|
+
'0%': {
|
|
49
|
+
transform: string;
|
|
50
|
+
opacity: string;
|
|
51
|
+
};
|
|
52
|
+
'100%': {
|
|
53
|
+
transform: string;
|
|
54
|
+
opacity: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
fontFamily: {
|
|
59
|
+
sans: string[];
|
|
60
|
+
mono: string[];
|
|
61
|
+
};
|
|
62
|
+
spacing: {
|
|
63
|
+
'18': string;
|
|
64
|
+
'88': string;
|
|
65
|
+
'128': string;
|
|
66
|
+
};
|
|
67
|
+
colors: {
|
|
68
|
+
ereo: {
|
|
69
|
+
50: string;
|
|
70
|
+
100: string;
|
|
71
|
+
200: string;
|
|
72
|
+
300: string;
|
|
73
|
+
400: string;
|
|
74
|
+
500: string;
|
|
75
|
+
600: string;
|
|
76
|
+
700: string;
|
|
77
|
+
800: string;
|
|
78
|
+
900: string;
|
|
79
|
+
950: string;
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
borderRadius: {
|
|
83
|
+
'4xl': string;
|
|
84
|
+
};
|
|
85
|
+
boxShadow: {
|
|
86
|
+
'inner-sm': string;
|
|
87
|
+
};
|
|
88
|
+
zIndex: {
|
|
89
|
+
'60': string;
|
|
90
|
+
'70': string;
|
|
91
|
+
'80': string;
|
|
92
|
+
'90': string;
|
|
93
|
+
'100': string;
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
plugins: never[];
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Get Tailwind config with EreoJS preset.
|
|
101
|
+
*/
|
|
102
|
+
export declare function getEreoTailwindConfig(overrides?: Record<string, any>): {
|
|
103
|
+
theme: {
|
|
104
|
+
extend: any;
|
|
105
|
+
};
|
|
106
|
+
presets: {
|
|
107
|
+
theme: {
|
|
108
|
+
extend: {
|
|
109
|
+
animation: {
|
|
110
|
+
'fade-in': string;
|
|
111
|
+
'slide-in': string;
|
|
112
|
+
'slide-up': string;
|
|
113
|
+
'scale-in': string;
|
|
114
|
+
};
|
|
115
|
+
keyframes: {
|
|
116
|
+
fadeIn: {
|
|
117
|
+
'0%': {
|
|
118
|
+
opacity: string;
|
|
119
|
+
};
|
|
120
|
+
'100%': {
|
|
121
|
+
opacity: string;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
slideIn: {
|
|
125
|
+
'0%': {
|
|
126
|
+
transform: string;
|
|
127
|
+
opacity: string;
|
|
128
|
+
};
|
|
129
|
+
'100%': {
|
|
130
|
+
transform: string;
|
|
131
|
+
opacity: string;
|
|
132
|
+
};
|
|
133
|
+
};
|
|
134
|
+
slideUp: {
|
|
135
|
+
'0%': {
|
|
136
|
+
transform: string;
|
|
137
|
+
opacity: string;
|
|
138
|
+
};
|
|
139
|
+
'100%': {
|
|
140
|
+
transform: string;
|
|
141
|
+
opacity: string;
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
scaleIn: {
|
|
145
|
+
'0%': {
|
|
146
|
+
transform: string;
|
|
147
|
+
opacity: string;
|
|
148
|
+
};
|
|
149
|
+
'100%': {
|
|
150
|
+
transform: string;
|
|
151
|
+
opacity: string;
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
};
|
|
155
|
+
fontFamily: {
|
|
156
|
+
sans: string[];
|
|
157
|
+
mono: string[];
|
|
158
|
+
};
|
|
159
|
+
spacing: {
|
|
160
|
+
'18': string;
|
|
161
|
+
'88': string;
|
|
162
|
+
'128': string;
|
|
163
|
+
};
|
|
164
|
+
colors: {
|
|
165
|
+
ereo: {
|
|
166
|
+
50: string;
|
|
167
|
+
100: string;
|
|
168
|
+
200: string;
|
|
169
|
+
300: string;
|
|
170
|
+
400: string;
|
|
171
|
+
500: string;
|
|
172
|
+
600: string;
|
|
173
|
+
700: string;
|
|
174
|
+
800: string;
|
|
175
|
+
900: string;
|
|
176
|
+
950: string;
|
|
177
|
+
};
|
|
178
|
+
};
|
|
179
|
+
borderRadius: {
|
|
180
|
+
'4xl': string;
|
|
181
|
+
};
|
|
182
|
+
boxShadow: {
|
|
183
|
+
'inner-sm': string;
|
|
184
|
+
};
|
|
185
|
+
zIndex: {
|
|
186
|
+
'60': string;
|
|
187
|
+
'70': string;
|
|
188
|
+
'80': string;
|
|
189
|
+
'90': string;
|
|
190
|
+
'100': string;
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
plugins: never[];
|
|
195
|
+
}[];
|
|
196
|
+
content: string[];
|
|
197
|
+
darkMode: "class";
|
|
198
|
+
};
|
|
199
|
+
export default ereoPreset;
|
|
200
|
+
//# sourceMappingURL=preset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../src/preset.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiGtB,CAAC;AAEF;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,GAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBxE;AAED,eAAe,UAAU,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ereo/plugin-tailwind",
|
|
3
|
+
"version": "0.1.6",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"author": "Ereo Team",
|
|
6
|
+
"homepage": "https://ereo.dev",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/ereojs/ereo.git",
|
|
10
|
+
"directory": "packages/plugin-tailwind"
|
|
11
|
+
},
|
|
12
|
+
"bugs": {
|
|
13
|
+
"url": "https://github.com/ereojs/ereo/issues"
|
|
14
|
+
},
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "./dist/index.js",
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"exports": {
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./dist/index.d.ts",
|
|
21
|
+
"import": "./dist/index.js"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"files": [
|
|
25
|
+
"dist"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "bun build ./src/index.ts --outdir ./dist --target bun --external @ereo/core --external tailwindcss && bun run build:types",
|
|
29
|
+
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
|
30
|
+
"dev": "bun build ./src/index.ts --outdir ./dist --target bun --watch",
|
|
31
|
+
"test": "bun test",
|
|
32
|
+
"typecheck": "tsc --noEmit"
|
|
33
|
+
},
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@ereo/core": "workspace:*"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/bun": "^1.1.0",
|
|
39
|
+
"typescript": "^5.4.0"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"tailwindcss": "^3.4.0"
|
|
43
|
+
},
|
|
44
|
+
"peerDependenciesMeta": {
|
|
45
|
+
"tailwindcss": {
|
|
46
|
+
"optional": true
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|