rainbowindex 0.2.0 → 0.2.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/CHANGELOG.md CHANGED
@@ -5,6 +5,17 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.2.1] - 2026-07-28
9
+
10
+ ### Added — diagnostics
11
+
12
+ - **Vite misuse guard (`[RI-1606]`)** — the default `rainbowindex` export is
13
+ the PostCSS plugin; placing it in Vite's `plugins: []` array previously did
14
+ nothing (no CSS, no error). It now carries an inert Vite-plugin facade that
15
+ throws `[RI-1606]` when Vite resolves config, pointing to
16
+ `import rainbowindex from "rainbowindex/vite"`. The guard is never dispatched
17
+ by PostCSS, so raw PostCSS usage is unaffected.
18
+
8
19
  ## [0.2.0] - 2026-07-16
9
20
 
10
21
  Initial public release. Rainbow Index began as a fork of Tailwind CSS v4; the
@@ -575,7 +575,7 @@ function processCSSFunctions(root, theme, warnings) {
575
575
  });
576
576
  }
577
577
  var rainbowindex = (options = {}) => {
578
- return {
578
+ const plugin = {
579
579
  postcssPlugin: "rainbowindex",
580
580
  async Once(root, { result }) {
581
581
  try {
@@ -662,6 +662,14 @@ var rainbowindex = (options = {}) => {
662
662
  }
663
663
  }
664
664
  };
665
+ return Object.assign(plugin, {
666
+ name: "rainbowindex",
667
+ config() {
668
+ throw new Error(
669
+ '[RI-1606] The default `rainbowindex` export is the PostCSS plugin, but it was placed in Vite\'s `plugins: []` array where it does nothing. Import the Vite plugin instead: `import rainbowindex from "rainbowindex/vite"`. (For a raw PostCSS setup, keep the default import and register it under `css.postcss.plugins` or in postcss.config.*.)'
670
+ );
671
+ }
672
+ });
665
673
  };
666
674
  rainbowindex.postcss = true;
667
675
  var postcss_default = rainbowindex;
package/dist/cli.mjs CHANGED
@@ -1201,7 +1201,7 @@ function readPackageJSONSync(cwd) {
1201
1201
 
1202
1202
  // src/entries/cli.ts
1203
1203
  function getVersion() {
1204
- return true ? "0.2.0" : "unknown";
1204
+ return true ? "0.2.1" : "unknown";
1205
1205
  }
1206
1206
  async function main() {
1207
1207
  const args = process.argv.slice(2);
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-PD4ZXGJ6.mjs";
4
4
  import {
5
5
  postcss_default
6
- } from "./chunk-KCSNR2TV.mjs";
6
+ } from "./chunk-5ECTKN44.mjs";
7
7
  import {
8
8
  analyzeProjectCSS,
9
9
  createCompiler,
package/dist/vite.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  postcss_default
3
- } from "./chunk-KCSNR2TV.mjs";
3
+ } from "./chunk-5ECTKN44.mjs";
4
4
  import {
5
5
  expandApplyGroups,
6
6
  findClosingBrace,
package/package.json CHANGED
@@ -1,102 +1,104 @@
1
1
  {
2
- "name": "rainbowindex",
3
- "version": "0.2.0",
4
- "description": "CSS-first system for building and maintaining consistent user interfaces",
5
- "keywords": [
6
- "css",
7
- "utility-css",
8
- "atomic-css",
9
- "design-tokens",
10
- "design-system",
11
- "theming",
12
- "dark-mode",
13
- "oklch",
14
- "fluid-typography",
15
- "google-fonts",
16
- "postcss",
17
- "postcss-plugin",
18
- "vite-plugin",
19
- "class-merge",
20
- "classnames",
21
- "tailwind",
22
- "tailwindcss",
23
- "cli"
24
- ],
25
- "repository": {
26
- "type": "git",
27
- "url": "git+https://github.com/rainbowindex/rainbowindex.git"
28
- },
29
- "author": "rainbowindex (https://github.com/rainbowindex)",
30
- "homepage": "https://rainbowindex.dev",
31
- "bugs": "https://github.com/rainbowindex/rainbowindex/issues",
32
- "type": "module",
33
- "main": "./dist/index.mjs",
34
- "types": "./dist/index.d.ts",
35
- "style": "./dist/index.css",
36
- "exports": {
37
- ".": {
38
- "types": "./dist/index.d.ts",
39
- "style": "./dist/index.css",
40
- "browser": "./dist/browser.mjs",
41
- "node": "./dist/index.mjs",
42
- "default": "./dist/index.mjs"
43
- },
44
- "./index.css": "./dist/index.css",
45
- "./vite": {
46
- "types": "./dist/vite.d.ts",
47
- "default": "./dist/vite.mjs"
48
- },
49
- "./package.json": "./package.json"
50
- },
51
- "bin": {
52
- "rainbowindex": "./dist/cli.mjs"
53
- },
54
- "files": [
55
- "dist",
56
- "CHANGELOG.md"
57
- ],
58
- "sideEffects": [
59
- "**/*.css"
60
- ],
61
- "engines": {
62
- "node": ">=20.19"
63
- },
64
- "license": "MIT",
65
- "dependencies": {
66
- "chokidar": "^4.0.3",
67
- "lightningcss": "^1.25.0",
68
- "tinyglobby": "^0.2.15"
69
- },
70
- "peerDependencies": {
71
- "postcss": "^8.5.0",
72
- "vite": "*"
73
- },
74
- "peerDependenciesMeta": {
75
- "vite": {
76
- "optional": true
77
- }
78
- },
79
- "devDependencies": {
80
- "@biomejs/biome": "^2.4.16",
81
- "@types/node": "^25.9.1",
82
- "@vitest/coverage-v8": "^4.1.0",
83
- "postcss": "^8.5.8",
84
- "tsup": "^8.5.1",
85
- "typescript": "^6.0.3",
86
- "vite": "8.0.0",
87
- "vitest": "^4.0.17"
88
- },
89
- "scripts": {
90
- "build": "tsup",
91
- "check": "pnpm typecheck && pnpm lint && pnpm test && pnpm test:artifacts",
92
- "test": "vitest run --exclude __tests__/cli/** --exclude __tests__/package.test.ts",
93
- "test:coverage": "vitest run --coverage --exclude __tests__/cli/** --exclude __tests__/package.test.ts",
94
- "test:artifacts": "pnpm build && vitest run __tests__/cli/cli.test.ts __tests__/package.test.ts",
95
- "test:watch": "vitest",
96
- "typecheck": "tsc --noEmit",
97
- "lint": "biome lint .",
98
- "lint:fix": "biome lint --write .",
99
- "format": "biome format --write .",
100
- "format:check": "biome format ."
101
- }
2
+ "name": "rainbowindex",
3
+ "version": "0.2.1",
4
+ "description": "CSS-first system for building and maintaining consistent user interfaces",
5
+ "keywords": [
6
+ "css",
7
+ "utility-css",
8
+ "atomic-css",
9
+ "design-tokens",
10
+ "design-system",
11
+ "theming",
12
+ "dark-mode",
13
+ "oklch",
14
+ "fluid-typography",
15
+ "google-fonts",
16
+ "postcss",
17
+ "postcss-plugin",
18
+ "vite-plugin",
19
+ "class-merge",
20
+ "classnames",
21
+ "tailwind",
22
+ "tailwindcss",
23
+ "cli"
24
+ ],
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/rainbowindex/rainbowindex.git"
28
+ },
29
+ "author": "rainbowindex (https://github.com/rainbowindex)",
30
+ "homepage": "https://rainbowindex.dev",
31
+ "bugs": "https://github.com/rainbowindex/rainbowindex/issues",
32
+ "type": "module",
33
+ "packageManager": "pnpm@10.12.1",
34
+ "main": "./dist/index.mjs",
35
+ "types": "./dist/index.d.ts",
36
+ "style": "./dist/index.css",
37
+ "scripts": {
38
+ "build": "tsup",
39
+ "prepublishOnly": "pnpm check",
40
+ "check": "pnpm typecheck && pnpm lint && pnpm test && pnpm test:artifacts",
41
+ "test": "vitest run --exclude __tests__/cli/** --exclude __tests__/package.test.ts",
42
+ "test:coverage": "vitest run --coverage --exclude __tests__/cli/** --exclude __tests__/package.test.ts",
43
+ "test:artifacts": "pnpm build && vitest run __tests__/cli/cli.test.ts __tests__/package.test.ts",
44
+ "test:watch": "vitest",
45
+ "typecheck": "tsc --noEmit",
46
+ "lint": "biome lint .",
47
+ "lint:fix": "biome lint --write .",
48
+ "format": "biome format --write .",
49
+ "format:check": "biome format ."
50
+ },
51
+ "exports": {
52
+ ".": {
53
+ "types": "./dist/index.d.ts",
54
+ "style": "./dist/index.css",
55
+ "browser": "./dist/browser.mjs",
56
+ "node": "./dist/index.mjs",
57
+ "default": "./dist/index.mjs"
58
+ },
59
+ "./index.css": "./dist/index.css",
60
+ "./vite": {
61
+ "types": "./dist/vite.d.ts",
62
+ "default": "./dist/vite.mjs"
63
+ },
64
+ "./package.json": "./package.json"
65
+ },
66
+ "bin": {
67
+ "rainbowindex": "./dist/cli.mjs"
68
+ },
69
+ "files": [
70
+ "dist",
71
+ "CHANGELOG.md"
72
+ ],
73
+ "sideEffects": [
74
+ "**/*.css"
75
+ ],
76
+ "engines": {
77
+ "node": ">=20.19"
78
+ },
79
+ "license": "MIT",
80
+ "dependencies": {
81
+ "chokidar": "^4.0.3",
82
+ "lightningcss": "^1.25.0",
83
+ "tinyglobby": "^0.2.15"
84
+ },
85
+ "peerDependencies": {
86
+ "postcss": "^8.5.0",
87
+ "vite": "*"
88
+ },
89
+ "peerDependenciesMeta": {
90
+ "vite": {
91
+ "optional": true
92
+ }
93
+ },
94
+ "devDependencies": {
95
+ "@biomejs/biome": "^2.4.16",
96
+ "@types/node": "^25.9.1",
97
+ "@vitest/coverage-v8": "^4.1.0",
98
+ "postcss": "^8.5.8",
99
+ "tsup": "^8.5.1",
100
+ "typescript": "^6.0.3",
101
+ "vite": "8.0.0",
102
+ "vitest": "^4.0.17"
103
+ }
102
104
  }