@duskmoon-dev/core 0.1.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/LICENSE +21 -0
- package/README.md +143 -0
- package/dist/index.cjs +243 -0
- package/dist/index.cjs.map +15 -0
- package/dist/index.js +211 -0
- package/dist/index.js.map +15 -0
- package/package.json +74 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 DuskMoon Development
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
# @duskmoon-dev/core
|
|
2
|
+
|
|
3
|
+
> DuskMoonUI - A Tailwind CSS component library with extended color system
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- 🎨 Extended color system with tertiary colors
|
|
8
|
+
- 🌓 Built-in Sunshine and Moonlight themes
|
|
9
|
+
- 📦 65+ Material Design 3 color tokens
|
|
10
|
+
- âš¡ JavaScript-based CSS generation
|
|
11
|
+
- 🚀 Optimized for Bun runtime
|
|
12
|
+
- 🎯 Full TypeScript support
|
|
13
|
+
|
|
14
|
+
## Installation
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Using Bun (recommended)
|
|
18
|
+
bun add @duskmoon-dev/core tailwindcss
|
|
19
|
+
|
|
20
|
+
# Using npm
|
|
21
|
+
npm install @duskmoon-dev/core tailwindcss
|
|
22
|
+
|
|
23
|
+
# Using pnpm
|
|
24
|
+
pnpm add @duskmoon-dev/core tailwindcss
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Quick Start
|
|
28
|
+
|
|
29
|
+
Add the plugin to your `tailwind.config.js`:
|
|
30
|
+
|
|
31
|
+
```js
|
|
32
|
+
import duskmoonui from '@duskmoon-dev/core';
|
|
33
|
+
|
|
34
|
+
export default {
|
|
35
|
+
content: ['./src/**/*.{html,js,jsx,ts,tsx}'],
|
|
36
|
+
plugins: [
|
|
37
|
+
duskmoonui({
|
|
38
|
+
themes: ['sunshine', 'moonlight'],
|
|
39
|
+
darkTheme: 'moonlight',
|
|
40
|
+
}),
|
|
41
|
+
],
|
|
42
|
+
};
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Then set the theme in your HTML:
|
|
46
|
+
|
|
47
|
+
```html
|
|
48
|
+
<html data-theme="sunshine">
|
|
49
|
+
<!-- Your app -->
|
|
50
|
+
</html>
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Usage
|
|
54
|
+
|
|
55
|
+
### Using Theme Colors
|
|
56
|
+
|
|
57
|
+
```jsx
|
|
58
|
+
<div className="bg-primary text-primary-content">
|
|
59
|
+
Primary button
|
|
60
|
+
</div>
|
|
61
|
+
|
|
62
|
+
<div className="bg-secondary text-secondary-content">
|
|
63
|
+
Secondary button
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
<div className="bg-tertiary text-tertiary-content">
|
|
67
|
+
Tertiary button (NEW!)
|
|
68
|
+
</div>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Custom Themes
|
|
72
|
+
|
|
73
|
+
```js
|
|
74
|
+
duskmoonui({
|
|
75
|
+
themes: [
|
|
76
|
+
'sunshine',
|
|
77
|
+
'moonlight',
|
|
78
|
+
{
|
|
79
|
+
mytheme: {
|
|
80
|
+
primary: '200 100% 50%',
|
|
81
|
+
secondary: '280 100% 50%',
|
|
82
|
+
tertiary: '340 100% 50%',
|
|
83
|
+
// ... other colors
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
],
|
|
87
|
+
});
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Color System
|
|
91
|
+
|
|
92
|
+
DuskMoonUI extends the standard Tailwind color system with:
|
|
93
|
+
|
|
94
|
+
- **Tertiary colors** - A third brand color for more design flexibility
|
|
95
|
+
- **Surface containers** - Material Design 3 surface elevation system
|
|
96
|
+
- **On-color variants** - Guaranteed accessible text colors
|
|
97
|
+
- **Container colors** - Tinted backgrounds for components
|
|
98
|
+
|
|
99
|
+
### Available Color Tokens
|
|
100
|
+
|
|
101
|
+
- Primary: `primary`, `primary-focus`, `primary-content`, `primary-container`, `on-primary-container`
|
|
102
|
+
- Secondary: `secondary`, `secondary-focus`, `secondary-content`, `secondary-container`, `on-secondary-container`
|
|
103
|
+
- Tertiary: `tertiary`, `tertiary-focus`, `tertiary-content`, `tertiary-container`, `on-tertiary-container`
|
|
104
|
+
- Surface: `surface`, `surface-dim`, `surface-bright`, `surface-container-{lowest|low|default|high|highest}`
|
|
105
|
+
- Semantic: `info`, `success`, `warning`, `error` (with `-content` variants)
|
|
106
|
+
|
|
107
|
+
## Plugin Options
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
interface DuskMoonUIOptions {
|
|
111
|
+
themes?: ThemeConfig[]; // Themes to include
|
|
112
|
+
darkTheme?: string; // Default dark theme name
|
|
113
|
+
prefix?: string; // Component prefix
|
|
114
|
+
components?: string[] | 'all'; // Components to include
|
|
115
|
+
utilities?: boolean; // Enable utility classes
|
|
116
|
+
rtl?: boolean; // RTL support
|
|
117
|
+
styled?: boolean; // Generate component styles
|
|
118
|
+
base?: boolean; // Include base styles
|
|
119
|
+
}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Development
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
# Install dependencies
|
|
126
|
+
bun install
|
|
127
|
+
|
|
128
|
+
# Build the package
|
|
129
|
+
bun run build
|
|
130
|
+
|
|
131
|
+
# Watch mode
|
|
132
|
+
bun run dev
|
|
133
|
+
|
|
134
|
+
# Type check
|
|
135
|
+
bun run typecheck
|
|
136
|
+
|
|
137
|
+
# Run tests
|
|
138
|
+
bun test
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## License
|
|
142
|
+
|
|
143
|
+
MIT
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
+
var __moduleCache = /* @__PURE__ */ new WeakMap;
|
|
6
|
+
var __toCommonJS = (from) => {
|
|
7
|
+
var entry = __moduleCache.get(from), desc;
|
|
8
|
+
if (entry)
|
|
9
|
+
return entry;
|
|
10
|
+
entry = __defProp({}, "__esModule", { value: true });
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function")
|
|
12
|
+
__getOwnPropNames(from).map((key) => !__hasOwnProp.call(entry, key) && __defProp(entry, key, {
|
|
13
|
+
get: () => from[key],
|
|
14
|
+
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
+
}));
|
|
16
|
+
__moduleCache.set(from, entry);
|
|
17
|
+
return entry;
|
|
18
|
+
};
|
|
19
|
+
var __export = (target, all) => {
|
|
20
|
+
for (var name in all)
|
|
21
|
+
__defProp(target, name, {
|
|
22
|
+
get: all[name],
|
|
23
|
+
enumerable: true,
|
|
24
|
+
configurable: true,
|
|
25
|
+
set: (newValue) => all[name] = () => newValue
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
// src/index.ts
|
|
30
|
+
var exports_src = {};
|
|
31
|
+
__export(exports_src, {
|
|
32
|
+
themes: () => themes,
|
|
33
|
+
default: () => src_default
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(exports_src);
|
|
36
|
+
|
|
37
|
+
// ../../node_modules/tailwindcss/dist/plugin.mjs
|
|
38
|
+
function g(i, n) {
|
|
39
|
+
return { handler: i, config: n };
|
|
40
|
+
}
|
|
41
|
+
g.withOptions = function(i, n = () => ({})) {
|
|
42
|
+
function t(o) {
|
|
43
|
+
return { handler: i(o), config: n(o) };
|
|
44
|
+
}
|
|
45
|
+
return t.__isOptionsFunction = true, t;
|
|
46
|
+
};
|
|
47
|
+
var u = g;
|
|
48
|
+
|
|
49
|
+
// src/themes/sunshine.ts
|
|
50
|
+
var sunshine = {
|
|
51
|
+
primary: "38 92% 50%",
|
|
52
|
+
"primary-focus": "38 92% 40%",
|
|
53
|
+
"primary-content": "0 0% 100%",
|
|
54
|
+
"primary-container": "38 100% 90%",
|
|
55
|
+
"on-primary-container": "38 92% 15%",
|
|
56
|
+
secondary: "330 81% 60%",
|
|
57
|
+
"secondary-focus": "330 81% 50%",
|
|
58
|
+
"secondary-content": "0 0% 100%",
|
|
59
|
+
"secondary-container": "330 100% 92%",
|
|
60
|
+
"on-secondary-container": "330 81% 18%",
|
|
61
|
+
tertiary: "258 90% 66%",
|
|
62
|
+
"tertiary-focus": "258 90% 56%",
|
|
63
|
+
"tertiary-content": "0 0% 100%",
|
|
64
|
+
"tertiary-container": "258 100% 92%",
|
|
65
|
+
"on-tertiary-container": "258 90% 20%",
|
|
66
|
+
accent: "160 84% 39%",
|
|
67
|
+
"accent-focus": "160 84% 29%",
|
|
68
|
+
"accent-content": "0 0% 100%",
|
|
69
|
+
neutral: "217 33% 17%",
|
|
70
|
+
"neutral-focus": "217 33% 12%",
|
|
71
|
+
"neutral-content": "0 0% 100%",
|
|
72
|
+
"neutral-variant": "220 14% 60%",
|
|
73
|
+
surface: "0 0% 99%",
|
|
74
|
+
"surface-dim": "220 13% 94%",
|
|
75
|
+
"surface-bright": "0 0% 100%",
|
|
76
|
+
"surface-container-lowest": "0 0% 100%",
|
|
77
|
+
"surface-container-low": "220 13% 97%",
|
|
78
|
+
"surface-container": "220 13% 96%",
|
|
79
|
+
"surface-container-high": "220 13% 94%",
|
|
80
|
+
"surface-container-highest": "220 13% 91%",
|
|
81
|
+
"surface-variant": "220 14% 90%",
|
|
82
|
+
"on-surface": "217 33% 17%",
|
|
83
|
+
"on-surface-variant": "220 9% 30%",
|
|
84
|
+
"base-100": "0 0% 100%",
|
|
85
|
+
"base-200": "220 13% 96%",
|
|
86
|
+
"base-300": "220 13% 91%",
|
|
87
|
+
"base-content": "217 33% 17%",
|
|
88
|
+
outline: "220 9% 55%",
|
|
89
|
+
"outline-variant": "220 14% 80%",
|
|
90
|
+
"inverse-surface": "217 33% 17%",
|
|
91
|
+
"inverse-on-surface": "220 13% 94%",
|
|
92
|
+
"inverse-primary": "38 100% 75%",
|
|
93
|
+
shadow: "0 0% 0%",
|
|
94
|
+
scrim: "0 0% 0%",
|
|
95
|
+
info: "199 89% 48%",
|
|
96
|
+
"info-content": "0 0% 100%",
|
|
97
|
+
success: "142 71% 45%",
|
|
98
|
+
"success-content": "0 0% 100%",
|
|
99
|
+
warning: "38 92% 50%",
|
|
100
|
+
"warning-content": "0 0% 100%",
|
|
101
|
+
error: "0 72% 51%",
|
|
102
|
+
"error-content": "0 0% 100%",
|
|
103
|
+
"error-container": "0 100% 95%",
|
|
104
|
+
"on-error-container": "0 72% 20%"
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
// src/themes/moonlight.ts
|
|
108
|
+
var moonlight = {
|
|
109
|
+
primary: "217 91% 60%",
|
|
110
|
+
"primary-focus": "217 91% 70%",
|
|
111
|
+
"primary-content": "0 0% 100%",
|
|
112
|
+
"primary-container": "217 91% 20%",
|
|
113
|
+
"on-primary-container": "217 91% 90%",
|
|
114
|
+
secondary: "262 83% 70%",
|
|
115
|
+
"secondary-focus": "262 83% 80%",
|
|
116
|
+
"secondary-content": "0 0% 100%",
|
|
117
|
+
"secondary-container": "262 83% 25%",
|
|
118
|
+
"on-secondary-container": "262 83% 90%",
|
|
119
|
+
tertiary: "173 80% 50%",
|
|
120
|
+
"tertiary-focus": "173 80% 60%",
|
|
121
|
+
"tertiary-content": "0 0% 100%",
|
|
122
|
+
"tertiary-container": "173 80% 20%",
|
|
123
|
+
"on-tertiary-container": "173 80% 90%",
|
|
124
|
+
accent: "189 94% 43%",
|
|
125
|
+
"accent-focus": "189 94% 53%",
|
|
126
|
+
"accent-content": "0 0% 100%",
|
|
127
|
+
neutral: "220 13% 91%",
|
|
128
|
+
"neutral-focus": "220 13% 85%",
|
|
129
|
+
"neutral-content": "220 9% 15%",
|
|
130
|
+
"neutral-variant": "220 9% 46%",
|
|
131
|
+
surface: "220 13% 11%",
|
|
132
|
+
"surface-dim": "220 13% 7%",
|
|
133
|
+
"surface-bright": "220 13% 20%",
|
|
134
|
+
"surface-container-lowest": "220 13% 7%",
|
|
135
|
+
"surface-container-low": "220 13% 9%",
|
|
136
|
+
"surface-container": "220 13% 11%",
|
|
137
|
+
"surface-container-high": "220 13% 14%",
|
|
138
|
+
"surface-container-highest": "220 13% 17%",
|
|
139
|
+
"surface-variant": "220 9% 20%",
|
|
140
|
+
"on-surface": "220 13% 91%",
|
|
141
|
+
"on-surface-variant": "220 9% 70%",
|
|
142
|
+
"base-100": "220 13% 11%",
|
|
143
|
+
"base-200": "220 13% 9%",
|
|
144
|
+
"base-300": "220 13% 7%",
|
|
145
|
+
"base-content": "220 13% 91%",
|
|
146
|
+
outline: "220 9% 46%",
|
|
147
|
+
"outline-variant": "220 9% 30%",
|
|
148
|
+
"inverse-surface": "220 13% 91%",
|
|
149
|
+
"inverse-on-surface": "220 13% 11%",
|
|
150
|
+
"inverse-primary": "217 91% 40%",
|
|
151
|
+
shadow: "0 0% 0%",
|
|
152
|
+
scrim: "0 0% 0%",
|
|
153
|
+
info: "199 89% 60%",
|
|
154
|
+
"info-content": "0 0% 100%",
|
|
155
|
+
success: "142 76% 60%",
|
|
156
|
+
"success-content": "0 0% 100%",
|
|
157
|
+
warning: "38 92% 60%",
|
|
158
|
+
"warning-content": "0 0% 100%",
|
|
159
|
+
error: "0 84% 70%",
|
|
160
|
+
"error-content": "0 0% 100%",
|
|
161
|
+
"error-container": "0 84% 25%",
|
|
162
|
+
"on-error-container": "0 84% 90%"
|
|
163
|
+
};
|
|
164
|
+
|
|
165
|
+
// src/themes/index.ts
|
|
166
|
+
var themes = {
|
|
167
|
+
sunshine,
|
|
168
|
+
moonlight
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
// src/generators/index.ts
|
|
172
|
+
function generateCssVariables(theme) {
|
|
173
|
+
const cssVars = {};
|
|
174
|
+
for (const [key, value] of Object.entries(theme)) {
|
|
175
|
+
cssVars[`--color-${key}`] = value;
|
|
176
|
+
}
|
|
177
|
+
return cssVars;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
// src/index.ts
|
|
181
|
+
var defaultOptions = {
|
|
182
|
+
themes: ["sunshine", "moonlight"],
|
|
183
|
+
darkTheme: "moonlight",
|
|
184
|
+
prefix: "",
|
|
185
|
+
components: "all",
|
|
186
|
+
utilities: true,
|
|
187
|
+
rtl: false,
|
|
188
|
+
styled: true,
|
|
189
|
+
base: true
|
|
190
|
+
};
|
|
191
|
+
var duskmoonuiPlugin = u.withOptions((options = {}) => {
|
|
192
|
+
const config = { ...defaultOptions, ...options };
|
|
193
|
+
return ({ addBase }) => {
|
|
194
|
+
const selectedThemes = config.themes || ["sunshine", "moonlight"];
|
|
195
|
+
const baseStyles = {};
|
|
196
|
+
selectedThemes.forEach((themeConfig) => {
|
|
197
|
+
let themeName;
|
|
198
|
+
let themeColors;
|
|
199
|
+
if (typeof themeConfig === "string") {
|
|
200
|
+
themeName = themeConfig;
|
|
201
|
+
themeColors = themes[themeConfig];
|
|
202
|
+
} else {
|
|
203
|
+
const entry = Object.entries(themeConfig)[0];
|
|
204
|
+
if (entry) {
|
|
205
|
+
const [name, colors] = entry;
|
|
206
|
+
themeName = name;
|
|
207
|
+
themeColors = colors;
|
|
208
|
+
} else {
|
|
209
|
+
return;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
if (themeColors) {
|
|
213
|
+
const cssVars = generateCssVariables(themeColors);
|
|
214
|
+
baseStyles[`[data-theme="${themeName}"]`] = cssVars;
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
if (config.base) {
|
|
218
|
+
addBase(baseStyles);
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
}, (_options = {}) => {
|
|
222
|
+
return {
|
|
223
|
+
theme: {
|
|
224
|
+
extend: {
|
|
225
|
+
colors: {
|
|
226
|
+
primary: "hsl(var(--color-primary) / <alpha-value>)",
|
|
227
|
+
"primary-focus": "hsl(var(--color-primary-focus) / <alpha-value>)",
|
|
228
|
+
"primary-content": "hsl(var(--color-primary-content) / <alpha-value>)",
|
|
229
|
+
secondary: "hsl(var(--color-secondary) / <alpha-value>)",
|
|
230
|
+
"secondary-focus": "hsl(var(--color-secondary-focus) / <alpha-value>)",
|
|
231
|
+
"secondary-content": "hsl(var(--color-secondary-content) / <alpha-value>)",
|
|
232
|
+
tertiary: "hsl(var(--color-tertiary) / <alpha-value>)",
|
|
233
|
+
"tertiary-focus": "hsl(var(--color-tertiary-focus) / <alpha-value>)",
|
|
234
|
+
"tertiary-content": "hsl(var(--color-tertiary-content) / <alpha-value>)"
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
};
|
|
239
|
+
});
|
|
240
|
+
var src_default = duskmoonuiPlugin;
|
|
241
|
+
|
|
242
|
+
//# debugId=35DBFA0829735D7764756E2164756E21
|
|
243
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../node_modules/tailwindcss/dist/plugin.mjs", "src/themes/sunshine.ts", "src/themes/moonlight.ts", "src/themes/index.ts", "src/generators/index.ts", "src/index.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"function g(i,n){return{handler:i,config:n}}g.withOptions=function(i,n=()=>({})){function t(o){return{handler:i(o),config:n(o)}}return t.__isOptionsFunction=!0,t};var u=g;export{u as default};\n",
|
|
6
|
+
"/**\n * Sunshine Theme (Light)\n * A warm, energetic light theme with golden and vibrant accents\n */\n\nimport type { ThemeColors } from '../types';\n\nexport const sunshine: ThemeColors = {\n // Primary Colors - Warm Orange\n primary: '38 92% 50%', // #f59e0b (Amber 500)\n 'primary-focus': '38 92% 40%',\n 'primary-content': '0 0% 100%',\n 'primary-container': '38 100% 90%',\n 'on-primary-container': '38 92% 15%',\n\n // Secondary Colors - Pink\n secondary: '330 81% 60%', // #ec4899 (Pink 500)\n 'secondary-focus': '330 81% 50%',\n 'secondary-content': '0 0% 100%',\n 'secondary-container': '330 100% 92%',\n 'on-secondary-container': '330 81% 18%',\n\n // Tertiary Colors - Purple (NEW!)\n tertiary: '258 90% 66%', // #8b5cf6 (Violet 500)\n 'tertiary-focus': '258 90% 56%',\n 'tertiary-content': '0 0% 100%',\n 'tertiary-container': '258 100% 92%',\n 'on-tertiary-container': '258 90% 20%',\n\n // Accent Colors - Emerald\n accent: '160 84% 39%', // #10b981 (Emerald 500)\n 'accent-focus': '160 84% 29%',\n 'accent-content': '0 0% 100%',\n\n // Neutral Colors\n neutral: '217 33% 17%', // #1f2937 (Gray 800)\n 'neutral-focus': '217 33% 12%',\n 'neutral-content': '0 0% 100%',\n 'neutral-variant': '220 14% 60%',\n\n // Surface Colors (Material Design 3)\n surface: '0 0% 99%',\n 'surface-dim': '220 13% 94%',\n 'surface-bright': '0 0% 100%',\n 'surface-container-lowest': '0 0% 100%',\n 'surface-container-low': '220 13% 97%',\n 'surface-container': '220 13% 96%',\n 'surface-container-high': '220 13% 94%',\n 'surface-container-highest': '220 13% 91%',\n 'surface-variant': '220 14% 90%',\n 'on-surface': '217 33% 17%',\n 'on-surface-variant': '220 9% 30%',\n\n // Base Colors (Legacy support)\n 'base-100': '0 0% 100%', // White\n 'base-200': '220 13% 96%', // Light gray\n 'base-300': '220 13% 91%', // Medium gray\n 'base-content': '217 33% 17%', // Dark text\n\n // Outline Colors\n outline: '220 9% 55%',\n 'outline-variant': '220 14% 80%',\n\n // Inverse Colors\n 'inverse-surface': '217 33% 17%',\n 'inverse-on-surface': '220 13% 94%',\n 'inverse-primary': '38 100% 75%',\n\n // Shadow & Scrim\n shadow: '0 0% 0%',\n scrim: '0 0% 0%',\n\n // Semantic Colors\n info: '199 89% 48%', // Blue\n 'info-content': '0 0% 100%',\n success: '142 71% 45%', // Green\n 'success-content': '0 0% 100%',\n warning: '38 92% 50%', // Orange\n 'warning-content': '0 0% 100%',\n error: '0 72% 51%', // Red\n 'error-content': '0 0% 100%',\n 'error-container': '0 100% 95%',\n 'on-error-container': '0 72% 20%',\n};\n",
|
|
7
|
+
"/**\n * Moonlight Theme (Dark)\n * A serene, elegant dark theme with cool tones and soft accents\n */\n\nimport type { ThemeColors } from '../types';\n\nexport const moonlight: ThemeColors = {\n // Primary Colors - Soft Blue\n primary: '217 91% 60%', // #3b82f6 (Blue 500)\n 'primary-focus': '217 91% 70%',\n 'primary-content': '0 0% 100%',\n 'primary-container': '217 91% 20%',\n 'on-primary-container': '217 91% 90%',\n\n // Secondary Colors - Purple\n secondary: '262 83% 70%', // #a78bfa (Violet 400)\n 'secondary-focus': '262 83% 80%',\n 'secondary-content': '0 0% 100%',\n 'secondary-container': '262 83% 25%',\n 'on-secondary-container': '262 83% 90%',\n\n // Tertiary Colors - Teal (NEW!)\n tertiary: '173 80% 50%', // #14b8a6 (Teal 500)\n 'tertiary-focus': '173 80% 60%',\n 'tertiary-content': '0 0% 100%',\n 'tertiary-container': '173 80% 20%',\n 'on-tertiary-container': '173 80% 90%',\n\n // Accent Colors - Cyan\n accent: '189 94% 43%', // #06b6d4 (Cyan 500)\n 'accent-focus': '189 94% 53%',\n 'accent-content': '0 0% 100%',\n\n // Neutral Colors\n neutral: '220 13% 91%', // #e5e7eb (Gray 200)\n 'neutral-focus': '220 13% 85%',\n 'neutral-content': '220 9% 15%',\n 'neutral-variant': '220 9% 46%',\n\n // Surface Colors (Material Design 3 Dark)\n surface: '220 13% 11%', // #1c1e22\n 'surface-dim': '220 13% 7%',\n 'surface-bright': '220 13% 20%',\n 'surface-container-lowest': '220 13% 7%',\n 'surface-container-low': '220 13% 9%',\n 'surface-container': '220 13% 11%',\n 'surface-container-high': '220 13% 14%',\n 'surface-container-highest': '220 13% 17%',\n 'surface-variant': '220 9% 20%',\n 'on-surface': '220 13% 91%',\n 'on-surface-variant': '220 9% 70%',\n\n // Base Colors (Legacy support)\n 'base-100': '220 13% 11%', // Dark background\n 'base-200': '220 13% 9%', // Darker\n 'base-300': '220 13% 7%', // Darkest\n 'base-content': '220 13% 91%', // Light text\n\n // Outline Colors\n outline: '220 9% 46%',\n 'outline-variant': '220 9% 30%',\n\n // Inverse Colors\n 'inverse-surface': '220 13% 91%',\n 'inverse-on-surface': '220 13% 11%',\n 'inverse-primary': '217 91% 40%',\n\n // Shadow & Scrim\n shadow: '0 0% 0%',\n scrim: '0 0% 0%',\n\n // Semantic Colors\n info: '199 89% 60%', // Light Blue\n 'info-content': '0 0% 100%',\n success: '142 76% 60%', // Light Green\n 'success-content': '0 0% 100%',\n warning: '38 92% 60%', // Light Orange\n 'warning-content': '0 0% 100%',\n error: '0 84% 70%', // Light Red\n 'error-content': '0 0% 100%',\n 'error-container': '0 84% 25%',\n 'on-error-container': '0 84% 90%',\n};\n",
|
|
8
|
+
"/**\n * DuskMoonUI Themes\n * Built-in theme definitions\n */\n\nimport { sunshine } from './sunshine';\nimport { moonlight } from './moonlight';\nimport type { ThemeColors } from '../types';\n\n/**\n * All available themes\n */\nexport const themes = {\n sunshine,\n moonlight,\n} as const;\n\n/**\n * Get theme by name\n */\nexport function getTheme(name: keyof typeof themes): ThemeColors {\n return themes[name];\n}\n\n/**\n * Check if theme exists\n */\nexport function hasTheme(name: string): name is keyof typeof themes {\n return name in themes;\n}\n",
|
|
9
|
+
"/**\n * CSS Generation Utilities\n * Functions to generate CSS variables and styles from theme definitions\n */\n\nimport type { ThemeColors } from '../types';\n\n/**\n * Generate CSS variables from theme colors\n * Converts theme object to CSS custom properties\n */\nexport function generateCssVariables(theme: ThemeColors): Record<string, string> {\n const cssVars: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(theme)) {\n cssVars[`--color-${key}`] = value;\n }\n\n return cssVars;\n}\n\n/**\n * Convert CSS variables object to string\n */\nexport function cssVarsToString(cssVars: Record<string, string>): string {\n return Object.entries(cssVars)\n .map(([key, value]) => ` ${key}: ${value};`)\n .join('\\n');\n}\n\n/**\n * Generate theme CSS block\n */\nexport function generateThemeBlock(themeName: string, theme: ThemeColors): string {\n const cssVars = generateCssVariables(theme);\n const varsString = cssVarsToString(cssVars);\n\n return `[data-theme=\"${themeName}\"] {\\n${varsString}\\n}`;\n}\n",
|
|
10
|
+
"/**\n * DuskMoonUI - Tailwind CSS Plugin\n * Main entry point for the component library\n */\n\nimport plugin from 'tailwindcss/plugin';\nimport { themes } from './themes';\nimport { generateCssVariables } from './generators';\nimport type { DuskMoonUIOptions, ThemeColors, CustomTheme } from './types';\n\n/**\n * Default plugin options\n */\nconst defaultOptions: DuskMoonUIOptions = {\n themes: ['sunshine', 'moonlight'],\n darkTheme: 'moonlight',\n prefix: '',\n components: 'all',\n utilities: true,\n rtl: false,\n styled: true,\n base: true,\n};\n\n/**\n * DuskMoonUI Tailwind CSS Plugin\n */\nconst duskmoonuiPlugin = plugin.withOptions<Partial<DuskMoonUIOptions>>(\n (options: Partial<DuskMoonUIOptions> = {}) => {\n const config: DuskMoonUIOptions = { ...defaultOptions, ...options };\n\n return ({ addBase }: { addBase: (styles: Record<string, Record<string, string>>) => void }) => {\n // Inject theme colors as CSS variables\n const selectedThemes = config.themes || ['sunshine', 'moonlight'];\n const baseStyles: Record<string, Record<string, string>> = {};\n\n selectedThemes.forEach((themeConfig) => {\n let themeName: string;\n let themeColors: ThemeColors | CustomTheme | undefined;\n\n if (typeof themeConfig === 'string') {\n themeName = themeConfig;\n themeColors = themes[themeConfig as keyof typeof themes];\n } else {\n // Custom theme object\n const entry = Object.entries(themeConfig)[0];\n if (entry) {\n const [name, colors] = entry;\n themeName = name;\n themeColors = colors;\n } else {\n return;\n }\n }\n\n if (themeColors) {\n const cssVars = generateCssVariables(themeColors as ThemeColors);\n baseStyles[`[data-theme=\"${themeName}\"]`] = cssVars;\n }\n });\n\n if (config.base) {\n addBase(baseStyles);\n }\n\n // TODO: Add component generation\n // TODO: Add utility generation\n };\n },\n (_options: Partial<DuskMoonUIOptions> = {}) => {\n // Extend Tailwind config\n return {\n theme: {\n extend: {\n colors: {\n // Map color variables to Tailwind's color system\n primary: 'hsl(var(--color-primary) / <alpha-value>)',\n 'primary-focus': 'hsl(var(--color-primary-focus) / <alpha-value>)',\n 'primary-content': 'hsl(var(--color-primary-content) / <alpha-value>)',\n\n secondary: 'hsl(var(--color-secondary) / <alpha-value>)',\n 'secondary-focus': 'hsl(var(--color-secondary-focus) / <alpha-value>)',\n 'secondary-content': 'hsl(var(--color-secondary-content) / <alpha-value>)',\n\n tertiary: 'hsl(var(--color-tertiary) / <alpha-value>)',\n 'tertiary-focus': 'hsl(var(--color-tertiary-focus) / <alpha-value>)',\n 'tertiary-content': 'hsl(var(--color-tertiary-content) / <alpha-value>)',\n\n // Add more colors as needed\n },\n },\n },\n };\n }\n) as ReturnType<typeof plugin.withOptions<Partial<DuskMoonUIOptions>>>;\n\nexport default duskmoonuiPlugin;\n\n// Export types\nexport type {\n ThemeColors,\n ThemeName,\n DuskMoonUIOptions,\n ColorRole,\n SemanticColor,\n SurfaceLevel,\n ComponentSize,\n ComponentVariant,\n} from './types';\n\n// Export themes\nexport { themes } from './themes';\n"
|
|
11
|
+
],
|
|
12
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,CAAC,CAAC,GAAE,GAAE;AAAA,EAAC,OAAM,EAAC,SAAQ,GAAE,QAAO,EAAC;AAAA;AAAE,EAAE,cAAY,QAAQ,CAAC,GAAE,IAAE,OAAK,CAAC,IAAG;AAAA,EAAC,SAAS,CAAC,CAAC,GAAE;AAAA,IAAC,OAAM,EAAC,SAAQ,EAAE,CAAC,GAAE,QAAO,EAAE,CAAC,EAAC;AAAA;AAAA,EAAE,OAAO,EAAE,sBAAoB,MAAG;AAAA;AAAG,IAAI,IAAE;;;ACOjK,IAAM,WAAwB;AAAA,EAEnC,SAAS;AAAA,EACT,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,qBAAqB;AAAA,EACrB,wBAAwB;AAAA,EAGxB,WAAW;AAAA,EACX,mBAAmB;AAAA,EACnB,qBAAqB;AAAA,EACrB,uBAAuB;AAAA,EACvB,0BAA0B;AAAA,EAG1B,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,sBAAsB;AAAA,EACtB,yBAAyB;AAAA,EAGzB,QAAQ;AAAA,EACR,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAGlB,SAAS;AAAA,EACT,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,mBAAmB;AAAA,EAGn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OAAO,gBAAgB,UAAU;AAAA,QACnC,YAAY;AAAA,QACZ,cAAc,OAAO;AAAA,MACvB,EAAO;AAAA,QAEL,MAAM,QAAQ,OAAO,QAAQ,WAAW,EAAE;AAAA,QAC1C,IAAI,OAAO;AAAA,UACT,OAAO,MAAM,UAAU;AAAA,UACvB,YAAY;AAAA,UACZ,cAAc;AAAA,QAChB,EAAO;AAAA,UACL;AAAA;AAAA;AAAA,MAIJ,IAAI,aAAa;AAAA,QACf,MAAM,UAAU,qBAAqB,WAA0B;AAAA,QAC/D,WAAW,gBAAgB,iBAAiB;AAAA,MAC9C;AAAA,KACD;AAAA,IAED,IAAI,OAAO,MAAM;AAAA,MACf,QAAQ,UAAU;AAAA,IACpB;AAAA;AAAA,GAMJ,CAAC,WAAuC,CAAC,MAAM;AAAA,EAE7C,OAAO;AAAA,IACL,OAAO;AAAA,MACL,QAAQ;AAAA,QACN,QAAQ;AAAA,UAEN,SAAS;AAAA,UACT,iBAAiB;AAAA,UACjB,mBAAmB;AAAA,UAEnB,WAAW;AAAA,UACX,mBAAmB;AAAA,UACnB,qBAAqB;AAAA,UAErB,UAAU;AAAA,UACV,kBAAkB;AAAA,UAClB,oBAAoB;AAAA,QAGtB;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAAA,CAEJ;AAEA,IAAe;",
|
|
13
|
+
"debugId": "35DBFA0829735D7764756E2164756E21",
|
|
14
|
+
"names": []
|
|
15
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
// ../../node_modules/tailwindcss/dist/plugin.mjs
|
|
2
|
+
function g(i, n) {
|
|
3
|
+
return { handler: i, config: n };
|
|
4
|
+
}
|
|
5
|
+
g.withOptions = function(i, n = () => ({})) {
|
|
6
|
+
function t(o) {
|
|
7
|
+
return { handler: i(o), config: n(o) };
|
|
8
|
+
}
|
|
9
|
+
return t.__isOptionsFunction = true, t;
|
|
10
|
+
};
|
|
11
|
+
var u = g;
|
|
12
|
+
|
|
13
|
+
// src/themes/sunshine.ts
|
|
14
|
+
var sunshine = {
|
|
15
|
+
primary: "38 92% 50%",
|
|
16
|
+
"primary-focus": "38 92% 40%",
|
|
17
|
+
"primary-content": "0 0% 100%",
|
|
18
|
+
"primary-container": "38 100% 90%",
|
|
19
|
+
"on-primary-container": "38 92% 15%",
|
|
20
|
+
secondary: "330 81% 60%",
|
|
21
|
+
"secondary-focus": "330 81% 50%",
|
|
22
|
+
"secondary-content": "0 0% 100%",
|
|
23
|
+
"secondary-container": "330 100% 92%",
|
|
24
|
+
"on-secondary-container": "330 81% 18%",
|
|
25
|
+
tertiary: "258 90% 66%",
|
|
26
|
+
"tertiary-focus": "258 90% 56%",
|
|
27
|
+
"tertiary-content": "0 0% 100%",
|
|
28
|
+
"tertiary-container": "258 100% 92%",
|
|
29
|
+
"on-tertiary-container": "258 90% 20%",
|
|
30
|
+
accent: "160 84% 39%",
|
|
31
|
+
"accent-focus": "160 84% 29%",
|
|
32
|
+
"accent-content": "0 0% 100%",
|
|
33
|
+
neutral: "217 33% 17%",
|
|
34
|
+
"neutral-focus": "217 33% 12%",
|
|
35
|
+
"neutral-content": "0 0% 100%",
|
|
36
|
+
"neutral-variant": "220 14% 60%",
|
|
37
|
+
surface: "0 0% 99%",
|
|
38
|
+
"surface-dim": "220 13% 94%",
|
|
39
|
+
"surface-bright": "0 0% 100%",
|
|
40
|
+
"surface-container-lowest": "0 0% 100%",
|
|
41
|
+
"surface-container-low": "220 13% 97%",
|
|
42
|
+
"surface-container": "220 13% 96%",
|
|
43
|
+
"surface-container-high": "220 13% 94%",
|
|
44
|
+
"surface-container-highest": "220 13% 91%",
|
|
45
|
+
"surface-variant": "220 14% 90%",
|
|
46
|
+
"on-surface": "217 33% 17%",
|
|
47
|
+
"on-surface-variant": "220 9% 30%",
|
|
48
|
+
"base-100": "0 0% 100%",
|
|
49
|
+
"base-200": "220 13% 96%",
|
|
50
|
+
"base-300": "220 13% 91%",
|
|
51
|
+
"base-content": "217 33% 17%",
|
|
52
|
+
outline: "220 9% 55%",
|
|
53
|
+
"outline-variant": "220 14% 80%",
|
|
54
|
+
"inverse-surface": "217 33% 17%",
|
|
55
|
+
"inverse-on-surface": "220 13% 94%",
|
|
56
|
+
"inverse-primary": "38 100% 75%",
|
|
57
|
+
shadow: "0 0% 0%",
|
|
58
|
+
scrim: "0 0% 0%",
|
|
59
|
+
info: "199 89% 48%",
|
|
60
|
+
"info-content": "0 0% 100%",
|
|
61
|
+
success: "142 71% 45%",
|
|
62
|
+
"success-content": "0 0% 100%",
|
|
63
|
+
warning: "38 92% 50%",
|
|
64
|
+
"warning-content": "0 0% 100%",
|
|
65
|
+
error: "0 72% 51%",
|
|
66
|
+
"error-content": "0 0% 100%",
|
|
67
|
+
"error-container": "0 100% 95%",
|
|
68
|
+
"on-error-container": "0 72% 20%"
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
// src/themes/moonlight.ts
|
|
72
|
+
var moonlight = {
|
|
73
|
+
primary: "217 91% 60%",
|
|
74
|
+
"primary-focus": "217 91% 70%",
|
|
75
|
+
"primary-content": "0 0% 100%",
|
|
76
|
+
"primary-container": "217 91% 20%",
|
|
77
|
+
"on-primary-container": "217 91% 90%",
|
|
78
|
+
secondary: "262 83% 70%",
|
|
79
|
+
"secondary-focus": "262 83% 80%",
|
|
80
|
+
"secondary-content": "0 0% 100%",
|
|
81
|
+
"secondary-container": "262 83% 25%",
|
|
82
|
+
"on-secondary-container": "262 83% 90%",
|
|
83
|
+
tertiary: "173 80% 50%",
|
|
84
|
+
"tertiary-focus": "173 80% 60%",
|
|
85
|
+
"tertiary-content": "0 0% 100%",
|
|
86
|
+
"tertiary-container": "173 80% 20%",
|
|
87
|
+
"on-tertiary-container": "173 80% 90%",
|
|
88
|
+
accent: "189 94% 43%",
|
|
89
|
+
"accent-focus": "189 94% 53%",
|
|
90
|
+
"accent-content": "0 0% 100%",
|
|
91
|
+
neutral: "220 13% 91%",
|
|
92
|
+
"neutral-focus": "220 13% 85%",
|
|
93
|
+
"neutral-content": "220 9% 15%",
|
|
94
|
+
"neutral-variant": "220 9% 46%",
|
|
95
|
+
surface: "220 13% 11%",
|
|
96
|
+
"surface-dim": "220 13% 7%",
|
|
97
|
+
"surface-bright": "220 13% 20%",
|
|
98
|
+
"surface-container-lowest": "220 13% 7%",
|
|
99
|
+
"surface-container-low": "220 13% 9%",
|
|
100
|
+
"surface-container": "220 13% 11%",
|
|
101
|
+
"surface-container-high": "220 13% 14%",
|
|
102
|
+
"surface-container-highest": "220 13% 17%",
|
|
103
|
+
"surface-variant": "220 9% 20%",
|
|
104
|
+
"on-surface": "220 13% 91%",
|
|
105
|
+
"on-surface-variant": "220 9% 70%",
|
|
106
|
+
"base-100": "220 13% 11%",
|
|
107
|
+
"base-200": "220 13% 9%",
|
|
108
|
+
"base-300": "220 13% 7%",
|
|
109
|
+
"base-content": "220 13% 91%",
|
|
110
|
+
outline: "220 9% 46%",
|
|
111
|
+
"outline-variant": "220 9% 30%",
|
|
112
|
+
"inverse-surface": "220 13% 91%",
|
|
113
|
+
"inverse-on-surface": "220 13% 11%",
|
|
114
|
+
"inverse-primary": "217 91% 40%",
|
|
115
|
+
shadow: "0 0% 0%",
|
|
116
|
+
scrim: "0 0% 0%",
|
|
117
|
+
info: "199 89% 60%",
|
|
118
|
+
"info-content": "0 0% 100%",
|
|
119
|
+
success: "142 76% 60%",
|
|
120
|
+
"success-content": "0 0% 100%",
|
|
121
|
+
warning: "38 92% 60%",
|
|
122
|
+
"warning-content": "0 0% 100%",
|
|
123
|
+
error: "0 84% 70%",
|
|
124
|
+
"error-content": "0 0% 100%",
|
|
125
|
+
"error-container": "0 84% 25%",
|
|
126
|
+
"on-error-container": "0 84% 90%"
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
// src/themes/index.ts
|
|
130
|
+
var themes = {
|
|
131
|
+
sunshine,
|
|
132
|
+
moonlight
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
// src/generators/index.ts
|
|
136
|
+
function generateCssVariables(theme) {
|
|
137
|
+
const cssVars = {};
|
|
138
|
+
for (const [key, value] of Object.entries(theme)) {
|
|
139
|
+
cssVars[`--color-${key}`] = value;
|
|
140
|
+
}
|
|
141
|
+
return cssVars;
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
// src/index.ts
|
|
145
|
+
var defaultOptions = {
|
|
146
|
+
themes: ["sunshine", "moonlight"],
|
|
147
|
+
darkTheme: "moonlight",
|
|
148
|
+
prefix: "",
|
|
149
|
+
components: "all",
|
|
150
|
+
utilities: true,
|
|
151
|
+
rtl: false,
|
|
152
|
+
styled: true,
|
|
153
|
+
base: true
|
|
154
|
+
};
|
|
155
|
+
var duskmoonuiPlugin = u.withOptions((options = {}) => {
|
|
156
|
+
const config = { ...defaultOptions, ...options };
|
|
157
|
+
return ({ addBase }) => {
|
|
158
|
+
const selectedThemes = config.themes || ["sunshine", "moonlight"];
|
|
159
|
+
const baseStyles = {};
|
|
160
|
+
selectedThemes.forEach((themeConfig) => {
|
|
161
|
+
let themeName;
|
|
162
|
+
let themeColors;
|
|
163
|
+
if (typeof themeConfig === "string") {
|
|
164
|
+
themeName = themeConfig;
|
|
165
|
+
themeColors = themes[themeConfig];
|
|
166
|
+
} else {
|
|
167
|
+
const entry = Object.entries(themeConfig)[0];
|
|
168
|
+
if (entry) {
|
|
169
|
+
const [name, colors] = entry;
|
|
170
|
+
themeName = name;
|
|
171
|
+
themeColors = colors;
|
|
172
|
+
} else {
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
if (themeColors) {
|
|
177
|
+
const cssVars = generateCssVariables(themeColors);
|
|
178
|
+
baseStyles[`[data-theme="${themeName}"]`] = cssVars;
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
if (config.base) {
|
|
182
|
+
addBase(baseStyles);
|
|
183
|
+
}
|
|
184
|
+
};
|
|
185
|
+
}, (_options = {}) => {
|
|
186
|
+
return {
|
|
187
|
+
theme: {
|
|
188
|
+
extend: {
|
|
189
|
+
colors: {
|
|
190
|
+
primary: "hsl(var(--color-primary) / <alpha-value>)",
|
|
191
|
+
"primary-focus": "hsl(var(--color-primary-focus) / <alpha-value>)",
|
|
192
|
+
"primary-content": "hsl(var(--color-primary-content) / <alpha-value>)",
|
|
193
|
+
secondary: "hsl(var(--color-secondary) / <alpha-value>)",
|
|
194
|
+
"secondary-focus": "hsl(var(--color-secondary-focus) / <alpha-value>)",
|
|
195
|
+
"secondary-content": "hsl(var(--color-secondary-content) / <alpha-value>)",
|
|
196
|
+
tertiary: "hsl(var(--color-tertiary) / <alpha-value>)",
|
|
197
|
+
"tertiary-focus": "hsl(var(--color-tertiary-focus) / <alpha-value>)",
|
|
198
|
+
"tertiary-content": "hsl(var(--color-tertiary-content) / <alpha-value>)"
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
};
|
|
203
|
+
});
|
|
204
|
+
var src_default = duskmoonuiPlugin;
|
|
205
|
+
export {
|
|
206
|
+
themes,
|
|
207
|
+
src_default as default
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
//# debugId=763141FE63DB0FD264756E2164756E21
|
|
211
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../node_modules/tailwindcss/dist/plugin.mjs", "../src/themes/sunshine.ts", "../src/themes/moonlight.ts", "../src/themes/index.ts", "../src/generators/index.ts", "../src/index.ts"],
|
|
4
|
+
"sourcesContent": [
|
|
5
|
+
"function g(i,n){return{handler:i,config:n}}g.withOptions=function(i,n=()=>({})){function t(o){return{handler:i(o),config:n(o)}}return t.__isOptionsFunction=!0,t};var u=g;export{u as default};\n",
|
|
6
|
+
"/**\n * Sunshine Theme (Light)\n * A warm, energetic light theme with golden and vibrant accents\n */\n\nimport type { ThemeColors } from '../types';\n\nexport const sunshine: ThemeColors = {\n // Primary Colors - Warm Orange\n primary: '38 92% 50%', // #f59e0b (Amber 500)\n 'primary-focus': '38 92% 40%',\n 'primary-content': '0 0% 100%',\n 'primary-container': '38 100% 90%',\n 'on-primary-container': '38 92% 15%',\n\n // Secondary Colors - Pink\n secondary: '330 81% 60%', // #ec4899 (Pink 500)\n 'secondary-focus': '330 81% 50%',\n 'secondary-content': '0 0% 100%',\n 'secondary-container': '330 100% 92%',\n 'on-secondary-container': '330 81% 18%',\n\n // Tertiary Colors - Purple (NEW!)\n tertiary: '258 90% 66%', // #8b5cf6 (Violet 500)\n 'tertiary-focus': '258 90% 56%',\n 'tertiary-content': '0 0% 100%',\n 'tertiary-container': '258 100% 92%',\n 'on-tertiary-container': '258 90% 20%',\n\n // Accent Colors - Emerald\n accent: '160 84% 39%', // #10b981 (Emerald 500)\n 'accent-focus': '160 84% 29%',\n 'accent-content': '0 0% 100%',\n\n // Neutral Colors\n neutral: '217 33% 17%', // #1f2937 (Gray 800)\n 'neutral-focus': '217 33% 12%',\n 'neutral-content': '0 0% 100%',\n 'neutral-variant': '220 14% 60%',\n\n // Surface Colors (Material Design 3)\n surface: '0 0% 99%',\n 'surface-dim': '220 13% 94%',\n 'surface-bright': '0 0% 100%',\n 'surface-container-lowest': '0 0% 100%',\n 'surface-container-low': '220 13% 97%',\n 'surface-container': '220 13% 96%',\n 'surface-container-high': '220 13% 94%',\n 'surface-container-highest': '220 13% 91%',\n 'surface-variant': '220 14% 90%',\n 'on-surface': '217 33% 17%',\n 'on-surface-variant': '220 9% 30%',\n\n // Base Colors (Legacy support)\n 'base-100': '0 0% 100%', // White\n 'base-200': '220 13% 96%', // Light gray\n 'base-300': '220 13% 91%', // Medium gray\n 'base-content': '217 33% 17%', // Dark text\n\n // Outline Colors\n outline: '220 9% 55%',\n 'outline-variant': '220 14% 80%',\n\n // Inverse Colors\n 'inverse-surface': '217 33% 17%',\n 'inverse-on-surface': '220 13% 94%',\n 'inverse-primary': '38 100% 75%',\n\n // Shadow & Scrim\n shadow: '0 0% 0%',\n scrim: '0 0% 0%',\n\n // Semantic Colors\n info: '199 89% 48%', // Blue\n 'info-content': '0 0% 100%',\n success: '142 71% 45%', // Green\n 'success-content': '0 0% 100%',\n warning: '38 92% 50%', // Orange\n 'warning-content': '0 0% 100%',\n error: '0 72% 51%', // Red\n 'error-content': '0 0% 100%',\n 'error-container': '0 100% 95%',\n 'on-error-container': '0 72% 20%',\n};\n",
|
|
7
|
+
"/**\n * Moonlight Theme (Dark)\n * A serene, elegant dark theme with cool tones and soft accents\n */\n\nimport type { ThemeColors } from '../types';\n\nexport const moonlight: ThemeColors = {\n // Primary Colors - Soft Blue\n primary: '217 91% 60%', // #3b82f6 (Blue 500)\n 'primary-focus': '217 91% 70%',\n 'primary-content': '0 0% 100%',\n 'primary-container': '217 91% 20%',\n 'on-primary-container': '217 91% 90%',\n\n // Secondary Colors - Purple\n secondary: '262 83% 70%', // #a78bfa (Violet 400)\n 'secondary-focus': '262 83% 80%',\n 'secondary-content': '0 0% 100%',\n 'secondary-container': '262 83% 25%',\n 'on-secondary-container': '262 83% 90%',\n\n // Tertiary Colors - Teal (NEW!)\n tertiary: '173 80% 50%', // #14b8a6 (Teal 500)\n 'tertiary-focus': '173 80% 60%',\n 'tertiary-content': '0 0% 100%',\n 'tertiary-container': '173 80% 20%',\n 'on-tertiary-container': '173 80% 90%',\n\n // Accent Colors - Cyan\n accent: '189 94% 43%', // #06b6d4 (Cyan 500)\n 'accent-focus': '189 94% 53%',\n 'accent-content': '0 0% 100%',\n\n // Neutral Colors\n neutral: '220 13% 91%', // #e5e7eb (Gray 200)\n 'neutral-focus': '220 13% 85%',\n 'neutral-content': '220 9% 15%',\n 'neutral-variant': '220 9% 46%',\n\n // Surface Colors (Material Design 3 Dark)\n surface: '220 13% 11%', // #1c1e22\n 'surface-dim': '220 13% 7%',\n 'surface-bright': '220 13% 20%',\n 'surface-container-lowest': '220 13% 7%',\n 'surface-container-low': '220 13% 9%',\n 'surface-container': '220 13% 11%',\n 'surface-container-high': '220 13% 14%',\n 'surface-container-highest': '220 13% 17%',\n 'surface-variant': '220 9% 20%',\n 'on-surface': '220 13% 91%',\n 'on-surface-variant': '220 9% 70%',\n\n // Base Colors (Legacy support)\n 'base-100': '220 13% 11%', // Dark background\n 'base-200': '220 13% 9%', // Darker\n 'base-300': '220 13% 7%', // Darkest\n 'base-content': '220 13% 91%', // Light text\n\n // Outline Colors\n outline: '220 9% 46%',\n 'outline-variant': '220 9% 30%',\n\n // Inverse Colors\n 'inverse-surface': '220 13% 91%',\n 'inverse-on-surface': '220 13% 11%',\n 'inverse-primary': '217 91% 40%',\n\n // Shadow & Scrim\n shadow: '0 0% 0%',\n scrim: '0 0% 0%',\n\n // Semantic Colors\n info: '199 89% 60%', // Light Blue\n 'info-content': '0 0% 100%',\n success: '142 76% 60%', // Light Green\n 'success-content': '0 0% 100%',\n warning: '38 92% 60%', // Light Orange\n 'warning-content': '0 0% 100%',\n error: '0 84% 70%', // Light Red\n 'error-content': '0 0% 100%',\n 'error-container': '0 84% 25%',\n 'on-error-container': '0 84% 90%',\n};\n",
|
|
8
|
+
"/**\n * DuskMoonUI Themes\n * Built-in theme definitions\n */\n\nimport { sunshine } from './sunshine';\nimport { moonlight } from './moonlight';\nimport type { ThemeColors } from '../types';\n\n/**\n * All available themes\n */\nexport const themes = {\n sunshine,\n moonlight,\n} as const;\n\n/**\n * Get theme by name\n */\nexport function getTheme(name: keyof typeof themes): ThemeColors {\n return themes[name];\n}\n\n/**\n * Check if theme exists\n */\nexport function hasTheme(name: string): name is keyof typeof themes {\n return name in themes;\n}\n",
|
|
9
|
+
"/**\n * CSS Generation Utilities\n * Functions to generate CSS variables and styles from theme definitions\n */\n\nimport type { ThemeColors } from '../types';\n\n/**\n * Generate CSS variables from theme colors\n * Converts theme object to CSS custom properties\n */\nexport function generateCssVariables(theme: ThemeColors): Record<string, string> {\n const cssVars: Record<string, string> = {};\n\n for (const [key, value] of Object.entries(theme)) {\n cssVars[`--color-${key}`] = value;\n }\n\n return cssVars;\n}\n\n/**\n * Convert CSS variables object to string\n */\nexport function cssVarsToString(cssVars: Record<string, string>): string {\n return Object.entries(cssVars)\n .map(([key, value]) => ` ${key}: ${value};`)\n .join('\\n');\n}\n\n/**\n * Generate theme CSS block\n */\nexport function generateThemeBlock(themeName: string, theme: ThemeColors): string {\n const cssVars = generateCssVariables(theme);\n const varsString = cssVarsToString(cssVars);\n\n return `[data-theme=\"${themeName}\"] {\\n${varsString}\\n}`;\n}\n",
|
|
10
|
+
"/**\n * DuskMoonUI - Tailwind CSS Plugin\n * Main entry point for the component library\n */\n\nimport plugin from 'tailwindcss/plugin';\nimport { themes } from './themes';\nimport { generateCssVariables } from './generators';\nimport type { DuskMoonUIOptions, ThemeColors, CustomTheme } from './types';\n\n/**\n * Default plugin options\n */\nconst defaultOptions: DuskMoonUIOptions = {\n themes: ['sunshine', 'moonlight'],\n darkTheme: 'moonlight',\n prefix: '',\n components: 'all',\n utilities: true,\n rtl: false,\n styled: true,\n base: true,\n};\n\n/**\n * DuskMoonUI Tailwind CSS Plugin\n */\nconst duskmoonuiPlugin = plugin.withOptions<Partial<DuskMoonUIOptions>>(\n (options: Partial<DuskMoonUIOptions> = {}) => {\n const config: DuskMoonUIOptions = { ...defaultOptions, ...options };\n\n return ({ addBase }: { addBase: (styles: Record<string, Record<string, string>>) => void }) => {\n // Inject theme colors as CSS variables\n const selectedThemes = config.themes || ['sunshine', 'moonlight'];\n const baseStyles: Record<string, Record<string, string>> = {};\n\n selectedThemes.forEach((themeConfig) => {\n let themeName: string;\n let themeColors: ThemeColors | CustomTheme | undefined;\n\n if (typeof themeConfig === 'string') {\n themeName = themeConfig;\n themeColors = themes[themeConfig as keyof typeof themes];\n } else {\n // Custom theme object\n const entry = Object.entries(themeConfig)[0];\n if (entry) {\n const [name, colors] = entry;\n themeName = name;\n themeColors = colors;\n } else {\n return;\n }\n }\n\n if (themeColors) {\n const cssVars = generateCssVariables(themeColors as ThemeColors);\n baseStyles[`[data-theme=\"${themeName}\"]`] = cssVars;\n }\n });\n\n if (config.base) {\n addBase(baseStyles);\n }\n\n // TODO: Add component generation\n // TODO: Add utility generation\n };\n },\n (_options: Partial<DuskMoonUIOptions> = {}) => {\n // Extend Tailwind config\n return {\n theme: {\n extend: {\n colors: {\n // Map color variables to Tailwind's color system\n primary: 'hsl(var(--color-primary) / <alpha-value>)',\n 'primary-focus': 'hsl(var(--color-primary-focus) / <alpha-value>)',\n 'primary-content': 'hsl(var(--color-primary-content) / <alpha-value>)',\n\n secondary: 'hsl(var(--color-secondary) / <alpha-value>)',\n 'secondary-focus': 'hsl(var(--color-secondary-focus) / <alpha-value>)',\n 'secondary-content': 'hsl(var(--color-secondary-content) / <alpha-value>)',\n\n tertiary: 'hsl(var(--color-tertiary) / <alpha-value>)',\n 'tertiary-focus': 'hsl(var(--color-tertiary-focus) / <alpha-value>)',\n 'tertiary-content': 'hsl(var(--color-tertiary-content) / <alpha-value>)',\n\n // Add more colors as needed\n },\n },\n },\n };\n }\n) as ReturnType<typeof plugin.withOptions<Partial<DuskMoonUIOptions>>>;\n\nexport default duskmoonuiPlugin;\n\n// Export types\nexport type {\n ThemeColors,\n ThemeName,\n DuskMoonUIOptions,\n ColorRole,\n SemanticColor,\n SurfaceLevel,\n ComponentSize,\n ComponentVariant,\n} from './types';\n\n// Export themes\nexport { themes } from './themes';\n"
|
|
11
|
+
],
|
|
12
|
+
"mappings": ";AAAA,SAAS,CAAC,CAAC,GAAE,GAAE;AAAA,EAAC,OAAM,EAAC,SAAQ,GAAE,QAAO,EAAC;AAAA;AAAE,EAAE,cAAY,QAAQ,CAAC,GAAE,IAAE,OAAK,CAAC,IAAG;AAAA,EAAC,SAAS,CAAC,CAAC,GAAE;AAAA,IAAC,OAAM,EAAC,SAAQ,EAAE,CAAC,GAAE,QAAO,EAAE,CAAC,EAAC;AAAA;AAAA,EAAE,OAAO,EAAE,sBAAoB,MAAG;AAAA;AAAG,IAAI,IAAE;;;ACOjK,IAAM,WAAwB;AAAA,EAEnC,SAAS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;AAEA,IAAe;",
|
|
13
|
+
"debugId": "763141FE63DB0FD264756E2164756E21",
|
|
14
|
+
"names": []
|
|
15
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@duskmoon-dev/core",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "DuskMoonUI - Tailwind CSS component library with extended color system",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js",
|
|
13
|
+
"require": "./dist/index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./theme": {
|
|
16
|
+
"types": "./dist/theme.d.ts",
|
|
17
|
+
"import": "./dist/theme.js"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"files": [
|
|
21
|
+
"dist",
|
|
22
|
+
"README.md",
|
|
23
|
+
"LICENSE"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"dev": "bun run build --watch",
|
|
27
|
+
"build": "bun run clean && bun run build:bundle && bun run build:types",
|
|
28
|
+
"build:bundle": "bun build src/index.ts --outdir dist --target node --format esm --sourcemap && bun build src/index.ts --target node --format cjs --outfile src/index.cjs --sourcemap && mv src/index.cjs src/index.cjs.map dist/",
|
|
29
|
+
"build:types": "tsc --emitDeclarationOnly --outDir dist",
|
|
30
|
+
"clean": "rm -rf dist",
|
|
31
|
+
"typecheck": "tsc --noEmit",
|
|
32
|
+
"test": "bun test"
|
|
33
|
+
},
|
|
34
|
+
"keywords": [
|
|
35
|
+
"tailwind",
|
|
36
|
+
"tailwindcss",
|
|
37
|
+
"tailwind-plugin",
|
|
38
|
+
"component-library",
|
|
39
|
+
"ui-library",
|
|
40
|
+
"design-system",
|
|
41
|
+
"tertiary-colors",
|
|
42
|
+
"material-design-3",
|
|
43
|
+
"css-framework",
|
|
44
|
+
"color-system",
|
|
45
|
+
"theming",
|
|
46
|
+
"dark-mode"
|
|
47
|
+
],
|
|
48
|
+
"author": "DuskMoon Development",
|
|
49
|
+
"license": "MIT",
|
|
50
|
+
"repository": {
|
|
51
|
+
"type": "git",
|
|
52
|
+
"url": "git+https://github.com/duskmoon-dev/duskmoonui.git",
|
|
53
|
+
"directory": "packages/core"
|
|
54
|
+
},
|
|
55
|
+
"homepage": "https://github.com/duskmoon-dev/duskmoonui#readme",
|
|
56
|
+
"bugs": {
|
|
57
|
+
"url": "https://github.com/duskmoon-dev/duskmoonui/issues"
|
|
58
|
+
},
|
|
59
|
+
"peerDependencies": {
|
|
60
|
+
"tailwindcss": "^3.4.0 || ^4.0.0"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@types/bun": "latest",
|
|
64
|
+
"tailwindcss": "^3.4.0",
|
|
65
|
+
"typescript": "^5.6.0"
|
|
66
|
+
},
|
|
67
|
+
"engines": {
|
|
68
|
+
"node": ">=18.0.0",
|
|
69
|
+
"bun": ">=1.0.0"
|
|
70
|
+
},
|
|
71
|
+
"publishConfig": {
|
|
72
|
+
"access": "public"
|
|
73
|
+
}
|
|
74
|
+
}
|