styleframe 0.0.1 → 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 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
+ [![npm version](https://img.shields.io/npm/v/styleframe.svg)](https://www.npmjs.com/package/styleframe)
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/styleframe-dev/styleframe/blob/main/LICENSE)
10
+ [![Discord](https://img.shields.io/discord/1395724958919032943?label=Discord&logo=discord)](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/dist/cli.cjs ADDED
@@ -0,0 +1,29 @@
1
+ //#region rolldown:runtime
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
10
+ key = keys[i];
11
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
12
+ get: ((k) => from[k]).bind(null, key),
13
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
14
+ });
15
+ }
16
+ return to;
17
+ };
18
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
19
+ value: mod,
20
+ enumerable: true
21
+ }) : target, mod));
22
+
23
+ //#endregion
24
+ const __styleframe_cli = __toESM(require("@styleframe/cli"));
25
+
26
+ //#region src/cli.ts
27
+ (0, __styleframe_cli.default)();
28
+
29
+ //#endregion
package/dist/cli.d.cts ADDED
@@ -0,0 +1 @@
1
+ export { };
package/dist/cli.d.ts ADDED
@@ -0,0 +1 @@
1
+ export { };
package/dist/cli.js ADDED
@@ -0,0 +1,7 @@
1
+ import main from "@styleframe/cli";
2
+
3
+ //#region src/cli.ts
4
+ main();
5
+
6
+ //#endregion
7
+ //# sourceMappingURL=cli.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","names":[],"sources":["../src/cli.ts"],"sourcesContent":["import main from \"@styleframe/cli\";\n\nmain();\n"],"mappings":";;;AAEA,MAAM"}
package/dist/index.cjs ADDED
@@ -0,0 +1,9 @@
1
+
2
+
3
+ var __styleframe_core = require("@styleframe/core");
4
+ Object.keys(__styleframe_core).forEach(function (k) {
5
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
6
+ enumerable: true,
7
+ get: function () { return __styleframe_core[k]; }
8
+ });
9
+ });
@@ -0,0 +1 @@
1
+ export * from "@styleframe/core";
package/dist/index.d.ts CHANGED
@@ -1,2 +1 @@
1
- export {};
2
- //# sourceMappingURL=index.d.ts.map
1
+ export * from "@styleframe/core";
package/dist/index.js CHANGED
@@ -1,4 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- console.log('Happy developing using styleframe ✨');
4
- //# sourceMappingURL=index.js.map
1
+ export * from "@styleframe/core"
@@ -0,0 +1,9 @@
1
+
2
+
3
+ var __styleframe_loader = require("@styleframe/loader");
4
+ Object.keys(__styleframe_loader).forEach(function (k) {
5
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
6
+ enumerable: true,
7
+ get: function () { return __styleframe_loader[k]; }
8
+ });
9
+ });
@@ -0,0 +1 @@
1
+ export * from "@styleframe/loader";
@@ -0,0 +1 @@
1
+ export * from "@styleframe/loader";
package/dist/loader.js ADDED
@@ -0,0 +1 @@
1
+ export * from "@styleframe/loader"
@@ -0,0 +1,9 @@
1
+
2
+
3
+ var __styleframe_transpiler = require("@styleframe/transpiler");
4
+ Object.keys(__styleframe_transpiler).forEach(function (k) {
5
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, {
6
+ enumerable: true,
7
+ get: function () { return __styleframe_transpiler[k]; }
8
+ });
9
+ });
@@ -0,0 +1 @@
1
+ export * from "@styleframe/transpiler";
@@ -0,0 +1 @@
1
+ export * from "@styleframe/transpiler";
@@ -0,0 +1 @@
1
+ export * from "@styleframe/transpiler"
package/package.json CHANGED
@@ -1,31 +1,73 @@
1
1
  {
2
2
  "name": "styleframe",
3
- "version": "0.0.1",
4
- "description": "Write modern, clean, composable CSS using Typescript, with a focus on simplicity and performance.",
5
- "author": "Alex Grozav <alex@styleframe.dev>",
6
- "main": "dist/index.js",
7
- "keywords": [
8
- "styleframe",
9
- "css"
3
+ "version": "1.0.1",
4
+ "bin": {
5
+ "styleframe": "./dist/cli.cjs"
6
+ },
7
+ "description": "A command-line interface for styleframe.",
8
+ "type": "module",
9
+ "license": "MIT",
10
+ "files": [
11
+ "README.md",
12
+ "dist"
10
13
  ],
11
- "homepage": "https://styleframe.dev",
12
- "repository": {
13
- "type": "git",
14
- "url": "https://github.com/styleframe-dev/styleframe"
14
+ "main": "./dist/index.js",
15
+ "module": "./dist/index.js",
16
+ "types": "./dist/index.d.ts",
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "import": "./dist/index.js",
21
+ "require": "./dist/index.cjs"
22
+ },
23
+ "./cli": {
24
+ "types": "./dist/cli.d.ts",
25
+ "import": "./dist/cli.js",
26
+ "require": "./dist/cli.cjs"
27
+ },
28
+ "./loader": {
29
+ "types": "./dist/loader.d.ts",
30
+ "import": "./dist/loader.js",
31
+ "require": "./dist/loader.cjs"
32
+ },
33
+ "./transpiler": {
34
+ "types": "./dist/transpiler.d.ts",
35
+ "import": "./dist/transpiler.js",
36
+ "require": "./dist/transpiler.cjs"
37
+ },
38
+ "./package.json": "./package.json"
15
39
  },
16
- "bugs": {
17
- "email": "support@styleframe.dev",
18
- "url": "https://github.com/styleframe-dev/styleframe/issues"
40
+ "publishConfig": {
41
+ "access": "public"
42
+ },
43
+ "dependencies": {
44
+ "@styleframe/cli": "^1.0.1",
45
+ "@styleframe/transpiler": "^1.0.1",
46
+ "@styleframe/core": "^1.0.1",
47
+ "@styleframe/loader": "^1.0.1"
19
48
  },
20
- "dependencies": {},
21
49
  "devDependencies": {
22
- "typescript": "^5.8.3"
50
+ "@types/node": "^22.15.17",
51
+ "bumpp": "^10.1.0",
52
+ "tsdown": "^0.11.9",
53
+ "typescript": "^5.8.3",
54
+ "vitest": "^3.1.3",
55
+ "@styleframe/config-typescript": "^1.0.1"
23
56
  },
24
- "engines": {
25
- "node": ">=7.6.0"
57
+ "homepage": "https://github.com/styleframe-dev/styleframe#readme",
58
+ "bugs": {
59
+ "url": "https://github.com/styleframe-dev/styleframe/issues"
26
60
  },
27
- "license": "MIT",
61
+ "repository": {
62
+ "type": "git",
63
+ "url": "git+https://github.com/styleframe-dev/styleframe.git"
64
+ },
65
+ "author": "Alex Grozav <alex@styleframe.dev>",
28
66
  "scripts": {
29
- "build": "tsc"
67
+ "build": "tsdown",
68
+ "dev": "tsdown --watch",
69
+ "test": "vitest",
70
+ "typecheck": "tsc --noEmit",
71
+ "release": "bumpp && npm publish"
30
72
  }
31
73
  }
@@ -1,10 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="MaterialThemeProjectNewConfig">
4
- <option name="metadata">
5
- <MTProjectMetadataState>
6
- <option name="userId" value="5fbaf10e:1978bfec20b:-7ffd" />
7
- </MTProjectMetadataState>
8
- </option>
9
- </component>
10
- </project>
package/.idea/modules.xml DELETED
@@ -1,8 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="ProjectModuleManager">
4
- <modules>
5
- <module fileurl="file://$PROJECT_DIR$/.idea/styleframe.iml" filepath="$PROJECT_DIR$/.idea/styleframe.iml" />
6
- </modules>
7
- </component>
8
- </project>
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <module type="WEB_MODULE" version="4">
3
- <component name="NewModuleRootManager">
4
- <content url="file://$MODULE_DIR$">
5
- <excludeFolder url="file://$MODULE_DIR$/.tmp" />
6
- <excludeFolder url="file://$MODULE_DIR$/temp" />
7
- <excludeFolder url="file://$MODULE_DIR$/tmp" />
8
- </content>
9
- <orderEntry type="inheritedJdk" />
10
- <orderEntry type="sourceFolder" forTests="false" />
11
- </component>
12
- </module>
package/.idea/vcs.xml DELETED
@@ -1,6 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project version="4">
3
- <component name="VcsDirectoryMappings">
4
- <mapping directory="$PROJECT_DIR$" vcs="Git" />
5
- </component>
6
- </project>
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":""}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;AAAA,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAA"}
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- console.log('Happy developing using styleframe ✨')
package/tsconfig.json DELETED
@@ -1,40 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- // Base Options recommended for all projects
4
- "esModuleInterop": true,
5
- "skipLibCheck": true,
6
- "target": "es2022",
7
- "allowJs": true,
8
- "resolveJsonModule": true,
9
- "moduleDetection": "force",
10
- "isolatedModules": true,
11
- "verbatimModuleSyntax": true,
12
- // Enable strict type checking so you can catch bugs early
13
- "strict": true,
14
- "noUncheckedIndexedAccess": true,
15
- "noImplicitOverride": true,
16
- // Transpile our TypeScript code to JavaScript
17
- "module": "NodeNext",
18
- "outDir": "dist",
19
- // Emit type declarations
20
- "declaration": true,
21
- // Emit source maps and enable the composite option for monorepos
22
- "composite": true,
23
- "declarationMap": true,
24
- "sourceMap": true,
25
- // Include the DOM types
26
- "lib": [
27
- "es2022",
28
- "dom",
29
- "dom.iterable"
30
- ]
31
- },
32
- // Include the necessary files for your project
33
- "include": [
34
- "src/**/*.ts",
35
- "src/**/*.tsx"
36
- ],
37
- "exclude": [
38
- "node_modules"
39
- ]
40
- }