@ui0/theme 0.1.1 → 0.1.3

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.
Files changed (2) hide show
  1. package/README.md +18 -0
  2. package/package.json +7 -7
package/README.md CHANGED
@@ -3,6 +3,24 @@
3
3
  Генератор CSS-тем из конфига. Три способа запуска: CLI, Vite-плагин и
4
4
  библиотечный API (`generateThemeCss(config)`). Ниже — первые два.
5
5
 
6
+ ## Быстрый старт
7
+
8
+ ```ts
9
+ // vite.config.ts — плагин (сам найдёт ui0.config.ts в корне)
10
+ import ui0Theme from '@ui0/theme/vite'
11
+ export default defineConfig({ plugins: [ui0Theme({ out: 'src/assets/theme.css' })] })
12
+
13
+ // src/main.ts — сгенерированный css + рантайм-плагин
14
+ import { createUi0 } from '@ui0/core'
15
+ import { createUi0Theme } from '@ui0/theme'
16
+ import './assets/theme.css'
17
+ import config from '../ui0.config'
18
+
19
+ createApp(App).use(createUi0(config)).use(createUi0Theme(config.theme)).mount('#app')
20
+ ```
21
+
22
+ Без vite-плагина (или CLI) CSS темы не генерируется — переменных не будет.
23
+
6
24
  ## Конфиг
7
25
 
8
26
  По умолчанию ищется в корне проекта (`--cwd` / Vite root) под именем
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ui0/theme",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "Generates themeable CSS custom properties from a theme config (library + Vite plugin + CLI)",
5
5
  "keywords": [
6
6
  "css-variables",
@@ -76,22 +76,22 @@
76
76
  "theme:test": "vitest run"
77
77
  },
78
78
  "dependencies": {
79
- "@ui0/composable": "0.1.1",
80
- "@ui0/types": "0.1.1",
81
- "@ui0/util": "0.0.2",
79
+ "@ui0/composable": "^0.1.3",
80
+ "@ui0/types": "^0.1.3",
81
+ "@ui0/util": "^0.0.4",
82
82
  "esbuild": "^0.27.0"
83
83
  },
84
84
  "devDependencies": {
85
85
  "@types/node": "^22.0.0",
86
- "@ui0/vite": "0.1.1",
86
+ "@ui0/vite": "^0.1.3",
87
87
  "@vitejs/plugin-vue": "^6.0.0",
88
88
  "sass-embedded": "^1.80.0",
89
89
  "vite-plugin-dts": "^5.1.2",
90
90
  "vue": "^3.5.45"
91
91
  },
92
92
  "peerDependencies": {
93
- "@ui0/core": "0.1.1",
94
- "@ui0/shared": "0.0.601",
93
+ "@ui0/core": "^0.1.3",
94
+ "@ui0/shared": "^0.0.603",
95
95
  "vite": "^6.0.0 || ^7.0.0 || ^8.0.0",
96
96
  "vue": "^3.5.45"
97
97
  }