styleframe 1.0.0 → 1.0.1
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 +171 -0
- package/package.json +7 -6
package/README.md
ADDED
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
<img src="https://www.styleframe.dev/_vercel/image?url=%2Flogotype-light.svg&w=1536&q=100" alt="Styleframe" width="320" height="120">
|
|
3
|
+
|
|
4
|
+
**Type-safe, Composable CSS in TypeScript**
|
|
5
|
+
|
|
6
|
+
Write type-safe, composable, future-proof Design Systems code using styleframe's powerful TypeScript CSS API.
|
|
7
|
+
|
|
8
|
+
[](https://www.npmjs.com/package/styleframe)
|
|
9
|
+
[](https://github.com/styleframe-dev/styleframe/blob/main/LICENSE)
|
|
10
|
+
[](https://discord.gg/KCVwuGz44M)
|
|
11
|
+
|
|
12
|
+
[Homepage](https://styleframe.dev) · [Documentation](https://styleframe.dev/docs)
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# styleframe
|
|
19
|
+
|
|
20
|
+
## ✨ Features
|
|
21
|
+
|
|
22
|
+
- **🛡️ Type-safe CSS API** - Catch style bugs at compile time with full TypeScript support
|
|
23
|
+
- **🧩 Composable & Modular** - Build design systems from reusable, composable functions
|
|
24
|
+
- **🎨 Built-in Theming** - Create light/dark modes and custom themes effortlessly
|
|
25
|
+
- **⚡ Framework Agnostic** - Works with React, Vue, Svelte, Solid, Astro, and more
|
|
26
|
+
- **🔥 First-class DX** - IDE auto-complete, in-editor docs, and static analysis
|
|
27
|
+
|
|
28
|
+
## 🚀 Quick Start
|
|
29
|
+
|
|
30
|
+
### Installation
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# npm
|
|
34
|
+
npm install styleframe
|
|
35
|
+
|
|
36
|
+
# pnpm
|
|
37
|
+
pnpm add styleframe
|
|
38
|
+
|
|
39
|
+
# yarn
|
|
40
|
+
yarn add styleframe
|
|
41
|
+
|
|
42
|
+
# bun
|
|
43
|
+
bun add styleframe
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Initialization
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# npm
|
|
50
|
+
npx styleframe init
|
|
51
|
+
|
|
52
|
+
# pnpm
|
|
53
|
+
pnpx styleframe init
|
|
54
|
+
|
|
55
|
+
# yarn
|
|
56
|
+
yarn styleframe init
|
|
57
|
+
|
|
58
|
+
# bun
|
|
59
|
+
bunx styleframe init
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Using the CLI command above, it will:
|
|
63
|
+
|
|
64
|
+
- Install `styleframe` as a development dependency to your project
|
|
65
|
+
- Add the `styleframe` plugin to Vite, if possible
|
|
66
|
+
- Create a new `styleframe.config.ts` file
|
|
67
|
+
|
|
68
|
+
## 💡 Usage
|
|
69
|
+
|
|
70
|
+
```typescript
|
|
71
|
+
import { styleframe } from "styleframe";
|
|
72
|
+
|
|
73
|
+
const s = styleframe();
|
|
74
|
+
const { variable, ref, selector, theme } = s;
|
|
75
|
+
|
|
76
|
+
// Define design tokens
|
|
77
|
+
const colorPrimary = variable("color--primary", "#006cff");
|
|
78
|
+
const spacing = variable("spacing--md", "1rem");
|
|
79
|
+
|
|
80
|
+
// Create styles
|
|
81
|
+
selector(".button", {
|
|
82
|
+
backgroundColor: ref(colorPrimary),
|
|
83
|
+
padding: ref(spacing),
|
|
84
|
+
borderRadius: "4px",
|
|
85
|
+
color: "white",
|
|
86
|
+
|
|
87
|
+
"&:hover": {
|
|
88
|
+
opacity: 0.9,
|
|
89
|
+
},
|
|
90
|
+
});
|
|
91
|
+
|
|
92
|
+
// Add dark theme
|
|
93
|
+
theme("dark", (ctx) => {
|
|
94
|
+
ctx.variable(colorPrimary, "#60a5fa");
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
export default s;
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## 📚 Documentation
|
|
101
|
+
|
|
102
|
+
Styleframe is extremely powerful and flexible. The code preview above is just a small example of what you can achieve with styleframe.
|
|
103
|
+
|
|
104
|
+
Read the full documentation at [https://styleframe.dev](https://styleframe.dev).
|
|
105
|
+
|
|
106
|
+
## 🎯 Why styleframe?
|
|
107
|
+
|
|
108
|
+
After over 10 years of working on Design Systems for successful companies, we've learned a lot about what makes a great Design System. Styleframe is built on these learnings and is designed to help you easily build your own.
|
|
109
|
+
|
|
110
|
+
[Read more](https://styleframe.dev/docs) about styleframe's philosophy and design principles.
|
|
111
|
+
|
|
112
|
+
## 🔗 Framework Integration
|
|
113
|
+
|
|
114
|
+
Styleframe works seamlessly with any framework:
|
|
115
|
+
|
|
116
|
+
- **Vite** - Native plugin support
|
|
117
|
+
- **React** - Perfect for component libraries
|
|
118
|
+
- **Vue** - Full SFC compatibility
|
|
119
|
+
- **Svelte** - Works out of the box
|
|
120
|
+
- **Astro** - Static site ready
|
|
121
|
+
- **Solid** - Reactive styling
|
|
122
|
+
|
|
123
|
+
See the [installation guide](https://styleframe.dev/docs/getting-started/installation/vite) for framework-specific setup.
|
|
124
|
+
|
|
125
|
+
## 📖 Documentation
|
|
126
|
+
|
|
127
|
+
- **[Getting Started](https://styleframe.dev/docs/getting-started/introduction)** - Learn the basics
|
|
128
|
+
- **[API Reference](https://styleframe.dev/docs/api/variables)** - Complete API documentation
|
|
129
|
+
- **[Guides](https://styleframe.dev/docs/resources/guides)** - Step-by-step tutorials
|
|
130
|
+
- **[Examples](https://github.com/styleframe-dev/examples)** - Real-world examples
|
|
131
|
+
|
|
132
|
+
## 🤝 Community
|
|
133
|
+
|
|
134
|
+
- **[Discord](https://discord.gg/KCVwuGz44M)** - Chat with the community
|
|
135
|
+
- **[GitHub Issues](https://github.com/styleframe-dev/styleframe/issues)** - Report bugs or request features
|
|
136
|
+
- **[Discussions](https://github.com/styleframe-dev/styleframe/discussions)** - Ask questions and share ideas
|
|
137
|
+
|
|
138
|
+
## 🛠️ Development
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
# Clone the repository
|
|
142
|
+
git clone https://github.com/styleframe-dev/styleframe.git
|
|
143
|
+
|
|
144
|
+
# Install dependencies
|
|
145
|
+
pnpm install
|
|
146
|
+
|
|
147
|
+
# Run tests
|
|
148
|
+
pnpm test
|
|
149
|
+
|
|
150
|
+
# Build
|
|
151
|
+
pnpm build
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## 📝 License
|
|
155
|
+
|
|
156
|
+
Styleframe is [MIT licensed](https://github.com/styleframe-dev/styleframe/blob/main/LICENSE).
|
|
157
|
+
|
|
158
|
+
## 💎 Styleframe Pro
|
|
159
|
+
|
|
160
|
+
Looking for advanced features? Check out [Styleframe Pro](https://styleframe.dev/pricing) for:
|
|
161
|
+
|
|
162
|
+
- Premium composables and design tokens
|
|
163
|
+
- Advanced theming capabilities
|
|
164
|
+
- Priority support
|
|
165
|
+
- Commercial licenses
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
<div align="center">
|
|
170
|
+
<sub>Built with ❤️ by <a href="https://github.com/styleframe-dev">Styleframe</a></sub>
|
|
171
|
+
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "styleframe",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"bin": {
|
|
5
5
|
"styleframe": "./dist/cli.cjs"
|
|
6
6
|
},
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"type": "module",
|
|
9
9
|
"license": "MIT",
|
|
10
10
|
"files": [
|
|
11
|
+
"README.md",
|
|
11
12
|
"dist"
|
|
12
13
|
],
|
|
13
14
|
"main": "./dist/index.js",
|
|
@@ -40,10 +41,10 @@
|
|
|
40
41
|
"access": "public"
|
|
41
42
|
},
|
|
42
43
|
"dependencies": {
|
|
43
|
-
"@styleframe/cli": "^1.0.
|
|
44
|
-
"@styleframe/
|
|
45
|
-
"@styleframe/
|
|
46
|
-
"@styleframe/loader": "^1.0.
|
|
44
|
+
"@styleframe/cli": "^1.0.1",
|
|
45
|
+
"@styleframe/transpiler": "^1.0.1",
|
|
46
|
+
"@styleframe/core": "^1.0.1",
|
|
47
|
+
"@styleframe/loader": "^1.0.1"
|
|
47
48
|
},
|
|
48
49
|
"devDependencies": {
|
|
49
50
|
"@types/node": "^22.15.17",
|
|
@@ -51,7 +52,7 @@
|
|
|
51
52
|
"tsdown": "^0.11.9",
|
|
52
53
|
"typescript": "^5.8.3",
|
|
53
54
|
"vitest": "^3.1.3",
|
|
54
|
-
"@styleframe/config-typescript": "^1.0.
|
|
55
|
+
"@styleframe/config-typescript": "^1.0.1"
|
|
55
56
|
},
|
|
56
57
|
"homepage": "https://github.com/styleframe-dev/styleframe#readme",
|
|
57
58
|
"bugs": {
|