rainbowindex 0.1.4 → 0.2.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/package.json CHANGED
@@ -1,89 +1,102 @@
1
1
  {
2
2
  "name": "rainbowindex",
3
- "version": "0.1.4",
4
- "description": "A production-ready CSS compiler with utility-first approach",
5
- "type": "module",
6
- "sideEffects": false,
7
- "engines": {
8
- "node": ">=20.0.0"
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"
9
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",
10
36
  "exports": {
11
37
  ".": {
12
38
  "types": "./dist/index.d.ts",
13
- "style": "./css/index.css",
39
+ "style": "./dist/index.css",
14
40
  "browser": "./dist/browser.mjs",
15
- "import": "./dist/index.mjs",
16
- "require": "./dist/index.cjs"
41
+ "node": "./dist/index.mjs",
42
+ "default": "./dist/index.mjs"
17
43
  },
18
- "./browser": {
19
- "types": "./dist/browser.d.ts",
20
- "import": "./dist/browser.mjs"
44
+ "./index.css": "./dist/index.css",
45
+ "./vite": {
46
+ "types": "./dist/vite.d.ts",
47
+ "default": "./dist/vite.mjs"
21
48
  },
22
- "./index.css": "./css/index.css",
23
- "./css/index.css": "./css/index.css",
24
- "./theme.css": "./css/theme.css",
25
- "./preflight.css": "./css/preflight.css",
26
- "./css/theme.css": "./css/theme.css",
27
- "./css/preflight.css": "./css/preflight.css"
49
+ "./package.json": "./package.json"
50
+ },
51
+ "bin": {
52
+ "rainbowindex": "./dist/cli.mjs"
28
53
  },
29
- "main": "./dist/index.cjs",
30
- "module": "./dist/index.mjs",
31
- "types": "./dist/index.d.ts",
32
- "style": "./css/index.css",
33
54
  "files": [
34
55
  "dist",
35
- "css",
36
- "LICENSE.md",
37
- "README.md"
56
+ "CHANGELOG.md"
38
57
  ],
39
- "devDependencies": {
40
- "@playwright/test": "^1.58.1",
41
- "@vitest/coverage-v8": "^4.0.18",
42
- "serve": "^14.2.5",
43
- "tsup": "^8.5.1",
44
- "typescript": "^5.9.3",
45
- "vitest": "^4.0.18",
46
- "@rainbowindex/oxide": "0.1.4"
47
- },
48
- "keywords": [
49
- "css",
50
- "utility-first",
51
- "compiler",
52
- "oklch",
53
- "rainbow-index",
54
- "atomic-css",
55
- "design-tokens",
56
- "css-compiler",
57
- "tailwind-alternative",
58
- "modern-css",
59
- "css-utilities",
60
- "build-tool"
58
+ "sideEffects": [
59
+ "**/*.css"
61
60
  ],
62
- "author": "Rainbow Index Contributors",
61
+ "engines": {
62
+ "node": ">=20.19"
63
+ },
63
64
  "license": "MIT",
64
- "repository": {
65
- "type": "git",
66
- "url": "git+https://github.com/rainbowindex/rainbowindex.git",
67
- "directory": "packages/rainbowindex"
65
+ "dependencies": {
66
+ "chokidar": "^4.0.3",
67
+ "lightningcss": "^1.25.0",
68
+ "tinyglobby": "^0.2.15"
68
69
  },
69
- "bugs": {
70
- "url": "https://github.com/rainbowindex/rainbowindex/issues"
70
+ "peerDependencies": {
71
+ "postcss": "^8.5.0",
72
+ "vite": "*"
71
73
  },
72
- "homepage": "https://rainbowindex.org",
73
- "publishConfig": {
74
- "access": "public"
74
+ "peerDependenciesMeta": {
75
+ "vite": {
76
+ "optional": true
77
+ }
75
78
  },
76
- "funding": {
77
- "type": "github",
78
- "url": "https://github.com/sponsors/rainbowindex"
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"
79
88
  },
80
89
  "scripts": {
81
90
  "build": "tsup",
82
- "dev": "tsup --watch",
83
- "test:e2e": "playwright test",
84
- "test:e2e:ui": "playwright test --ui",
85
- "test:e2e:headed": "playwright test --headed",
86
- "bench": "vitest bench",
87
- "clean": "rm -rf dist"
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 ."
88
101
  }
89
102
  }
package/css/index.css DELETED
@@ -1,5 +0,0 @@
1
- @import "./theme.css";
2
- @import "./preflight.css";
3
-
4
- /* Where generated utilities are injected */
5
- @rainbowindex utilities;
package/css/preflight.css DELETED
@@ -1,370 +0,0 @@
1
- /**
2
- * Rainbow Index - Preflight (CSS Reset)
3
- *
4
- * A modern CSS reset based on best practices.
5
- * Includes accessibility defaults and modern CSS features.
6
- *
7
- * Modules: box-sizing, document, typography, tables, forms, lists, media, spacing, accessibility
8
- * Use @preflight directive to include/exclude modules.
9
- */
10
-
11
- @layer base {
12
- /*! @preflight-module: box-sizing */
13
- *,
14
- ::before,
15
- ::after {
16
- box-sizing: border-box;
17
- border-width: 0;
18
- border-style: solid;
19
- border-color: var(--color-border, currentColor);
20
- }
21
-
22
- /*! @preflight-module-end: box-sizing */
23
-
24
- /*! @preflight-module: document */
25
- html,
26
- :host {
27
- line-height: 1.5;
28
- -webkit-text-size-adjust: 100%;
29
- tab-size: 4;
30
- font-family: var(
31
- --font-sans,
32
- ui-sans-serif,
33
- system-ui,
34
- sans-serif,
35
- "Apple Color Emoji",
36
- "Segoe UI Emoji",
37
- "Segoe UI Symbol",
38
- "Noto Color Emoji"
39
- );
40
- font-feature-settings: normal;
41
- font-variation-settings: normal;
42
- -webkit-tap-highlight-color: transparent;
43
- }
44
-
45
- body {
46
- margin: 0;
47
- line-height: inherit;
48
- }
49
-
50
- html[data-appearance="light"] {
51
- color-scheme: light;
52
- }
53
-
54
- html[data-appearance="dark"] {
55
- color-scheme: dark;
56
- }
57
-
58
- html[data-appearance="system"],
59
- html:not([data-appearance]) {
60
- color-scheme: light;
61
- }
62
-
63
- @media (prefers-color-scheme: dark) {
64
- html[data-appearance="system"],
65
- html:not([data-appearance]) {
66
- color-scheme: dark;
67
- }
68
- }
69
- /*! @preflight-module-end: document */
70
-
71
- /*! @preflight-module: typography */
72
- hr {
73
- height: 0;
74
- color: inherit;
75
- border-top-width: 1px;
76
- }
77
-
78
- abbr:where([title]) {
79
- text-decoration: underline dotted;
80
- }
81
-
82
- h1,
83
- h2,
84
- h3,
85
- h4,
86
- h5,
87
- h6 {
88
- font-size: inherit;
89
- font-weight: inherit;
90
- }
91
-
92
- a {
93
- color: inherit;
94
- text-decoration: inherit;
95
- }
96
-
97
- b,
98
- strong {
99
- font-weight: bolder;
100
- }
101
-
102
- code,
103
- kbd,
104
- samp,
105
- pre {
106
- font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
107
- font-feature-settings: normal;
108
- font-variation-settings: normal;
109
- font-size: 1em;
110
- }
111
-
112
- small {
113
- font-size: 80%;
114
- }
115
-
116
- sub,
117
- sup {
118
- font-size: 75%;
119
- line-height: 0;
120
- position: relative;
121
- vertical-align: baseline;
122
- }
123
-
124
- sub {
125
- bottom: -0.25em;
126
- }
127
-
128
- sup {
129
- top: -0.5em;
130
- }
131
- /*! @preflight-module-end: typography */
132
-
133
- /*! @preflight-module: tables */
134
- table {
135
- text-indent: 0;
136
- border-color: inherit;
137
- border-collapse: collapse;
138
- }
139
- /*! @preflight-module-end: tables */
140
-
141
- /*! @preflight-module: forms */
142
- button,
143
- input,
144
- optgroup,
145
- select,
146
- textarea {
147
- font-family: inherit;
148
- font-feature-settings: inherit;
149
- font-variation-settings: inherit;
150
- font-size: 100%;
151
- font-weight: inherit;
152
- line-height: inherit;
153
- letter-spacing: inherit;
154
- color: inherit;
155
- margin: 0;
156
- padding: 0;
157
- }
158
-
159
- button,
160
- select {
161
- text-transform: none;
162
- }
163
-
164
- button,
165
- input:where([type="button"]),
166
- input:where([type="reset"]),
167
- input:where([type="submit"]) {
168
- -webkit-appearance: button;
169
- background-color: transparent;
170
- background-image: none;
171
- }
172
-
173
- :-moz-focusring {
174
- outline: auto;
175
- }
176
-
177
- :-moz-ui-invalid {
178
- box-shadow: none;
179
- }
180
-
181
- progress {
182
- vertical-align: baseline;
183
- }
184
-
185
- ::-webkit-inner-spin-button,
186
- ::-webkit-outer-spin-button {
187
- height: auto;
188
- }
189
-
190
- [type="search"] {
191
- -webkit-appearance: textfield;
192
- outline-offset: -2px;
193
- }
194
-
195
- ::-webkit-search-decoration {
196
- -webkit-appearance: none;
197
- }
198
-
199
- ::-webkit-file-upload-button {
200
- -webkit-appearance: button;
201
- font: inherit;
202
- }
203
-
204
- summary {
205
- display: list-item;
206
- }
207
-
208
- textarea {
209
- resize: vertical;
210
- }
211
-
212
- ::placeholder {
213
- opacity: 1;
214
- }
215
-
216
- /* Use color-mix for adaptive placeholder colors (Safari 17+, all other modern browsers) */
217
- @supports (not (-webkit-appearance: -apple-pay-button)) or (contain-intrinsic-size: 1px) {
218
- ::placeholder {
219
- color: color-mix(in oklab, currentcolor 50%, transparent);
220
- }
221
- }
222
-
223
- button,
224
- [role="button"] {
225
- cursor: pointer;
226
- }
227
-
228
- :disabled {
229
- cursor: default;
230
- }
231
- /*! @preflight-module-end: forms */
232
-
233
- /*! @preflight-module: spacing */
234
- blockquote,
235
- dl,
236
- dd,
237
- h1,
238
- h2,
239
- h3,
240
- h4,
241
- h5,
242
- h6,
243
- hr,
244
- figure,
245
- p,
246
- pre {
247
- margin: 0;
248
- }
249
-
250
- fieldset {
251
- margin: 0;
252
- padding: 0;
253
- }
254
-
255
- legend {
256
- padding: 0;
257
- }
258
- /*! @preflight-module-end: spacing */
259
-
260
- /*! @preflight-module: lists */
261
- ol,
262
- ul,
263
- menu {
264
- list-style: none;
265
- margin: 0;
266
- padding: 0;
267
- }
268
- /*! @preflight-module-end: lists */
269
-
270
- /*! @preflight-module: media */
271
- img,
272
- svg,
273
- video,
274
- canvas,
275
- audio,
276
- iframe,
277
- embed,
278
- object {
279
- display: block;
280
- vertical-align: middle;
281
- }
282
-
283
- img,
284
- video {
285
- max-width: 100%;
286
- height: auto;
287
- }
288
-
289
- /* SVG fill inherits text color by default */
290
- svg:not([fill]) {
291
- fill: currentColor;
292
- }
293
-
294
- [hidden]:where(:not([hidden="until-found"])) {
295
- display: none !important;
296
- }
297
- /*! @preflight-module-end: media */
298
-
299
- /*! @preflight-module: accessibility */
300
- /* Focus visible for keyboard accessibility */
301
- :focus-visible {
302
- outline: 2px solid var(--color-focus, oklch(55% 0.2 250));
303
- outline-offset: 2px;
304
- }
305
-
306
- /* Remove default focus for mouse users */
307
- :focus:not(:focus-visible) {
308
- outline: none;
309
- }
310
-
311
- /* Dialog improvements */
312
- dialog {
313
- padding: 0;
314
- background-color: var(--color-surface, white);
315
- color: inherit;
316
- }
317
-
318
- dialog::backdrop {
319
- background-color: oklch(0% 0 0 / 50%);
320
- }
321
-
322
- /* Ensure mark uses theme colors */
323
- mark {
324
- background-color: var(--color-highlight, oklch(90% 0.1 90));
325
- color: inherit;
326
- }
327
-
328
- /* Horizontal rule styling */
329
- hr {
330
- border-color: var(--color-border, oklch(85% 0 0));
331
- }
332
-
333
- /* Selection styling */
334
- ::selection {
335
- background-color: var(--color-selection-bg, oklch(85% 0.1 250));
336
- color: var(--color-selection-fg, inherit);
337
- }
338
-
339
- /* Autofill styling */
340
- input:-webkit-autofill,
341
- input:-webkit-autofill:hover,
342
- input:-webkit-autofill:focus,
343
- textarea:-webkit-autofill,
344
- textarea:-webkit-autofill:hover,
345
- textarea:-webkit-autofill:focus,
346
- select:-webkit-autofill,
347
- select:-webkit-autofill:hover,
348
- select:-webkit-autofill:focus {
349
- -webkit-text-fill-color: inherit;
350
- -webkit-box-shadow: 0 0 0px 1000px var(--color-surface, white) inset;
351
- transition: background-color 5000s ease-in-out 0s;
352
- }
353
-
354
- /* Ensure file input button matches theme */
355
- ::file-selector-button {
356
- font: inherit;
357
- color: inherit;
358
- background-color: var(--color-surface-alt, oklch(95% 0 0));
359
- border: 1px solid var(--color-border, oklch(85% 0 0));
360
- border-radius: calc(0.5 * var(--spacing, 0.25rem));
361
- padding-inline: 1rem;
362
- padding-block: 0.5rem;
363
- cursor: pointer;
364
- }
365
-
366
- ::file-selector-button:hover {
367
- background-color: var(--color-surface-hover, oklch(92% 0 0));
368
- }
369
- /*! @preflight-module-end: accessibility */
370
- }