rainbowindex 0.3.0 → 0.4.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/CHANGELOG.md +43 -0
- package/README.md +22 -0
- package/dist/browser.d.ts +2 -2
- package/dist/browser.mjs +1 -1
- package/dist/chunk-3HRMFZGE.mjs +19 -0
- package/dist/{chunk-AZXWJ625.mjs → chunk-4SVFFDS2.mjs} +495 -461
- package/dist/{chunk-SOMDX7V6.mjs → chunk-5Y7EXXLS.mjs} +320 -417
- package/dist/{chunk-IE6N76PW.mjs → chunk-6DAHUFNU.mjs} +5269 -4929
- package/dist/{chunk-AUWGHSTO.mjs → chunk-TLR6RP5L.mjs} +41 -120
- package/dist/chunk-YLB6FGIG.mjs +244 -0
- package/dist/cli.mjs +280 -277
- package/dist/{index-CfDtWufj.d.ts → context-ruu2x_jR.d.ts} +15 -70
- package/dist/editor.d.ts +98 -28
- package/dist/editor.mjs +37 -8
- package/dist/{index-DK6APAGD.d.ts → index-BB2HoeMj.d.ts} +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.mjs +4 -4
- package/dist/safelist-D9-Plqta.d.ts +109 -0
- package/dist/vite.mjs +48 -27
- package/package.json +1 -1
- package/dist/chunk-RHOQSN2B.mjs +0 -691
- package/dist/safelist-CH3_PywB.d.ts +0 -43
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,49 @@ 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.4.0] - 2026-08-20
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- **GitHub Packages publishing** — every release is now also published to
|
|
13
|
+
GitHub Packages as `@rainbowindex/rainbowindex` (that registry requires an
|
|
14
|
+
owner-scoped name). The README documents installing it under the usual
|
|
15
|
+
name via `pnpm add rainbowindex@npm:@rainbowindex/rainbowindex`, so all
|
|
16
|
+
documented imports and CLI invocations work unchanged.
|
|
17
|
+
|
|
18
|
+
### Changed
|
|
19
|
+
|
|
20
|
+
- **Stricter CLI argument validation** — the CLI is now driven by a
|
|
21
|
+
declarative command table that knows which flags and positionals each
|
|
22
|
+
command accepts. Flags used under the wrong command, stray positional
|
|
23
|
+
arguments, and flags missing their value are rejected with an error
|
|
24
|
+
instead of being silently ignored.
|
|
25
|
+
- **Internal restructuring** (behavior-preserving, net ≈ −4,500 lines) —
|
|
26
|
+
the merge, scanner, and effects modules were split into focused modules;
|
|
27
|
+
the spacing/border prefix→property maps are now single-sourced from the
|
|
28
|
+
merge conflict table with a machine-checked parity test; `@apply` reuses
|
|
29
|
+
the engine's cascade ordering; the CLI and PostCSS builds share one
|
|
30
|
+
orchestration path with parallelized font fetches; and all internal
|
|
31
|
+
import cycles were broken. Public entry points are unchanged.
|
|
32
|
+
|
|
33
|
+
### Fixed
|
|
34
|
+
|
|
35
|
+
- **`ri()` stroke-width vs stroke-color conflict** — width-shaped `stroke-*`
|
|
36
|
+
classes (`stroke-2`, `stroke-1.5`, `stroke-[3px]`) were claiming the
|
|
37
|
+
`stroke` color property in the merge conflict table, so
|
|
38
|
+
`ri("stroke-2 stroke-red-500")` dropped `stroke-2` even though the two
|
|
39
|
+
classes set different CSS properties. The `stroke` prefix is now
|
|
40
|
+
width-vs-color dual-mode (mirroring `border`/`outline`): decimal and
|
|
41
|
+
non-color arbitrary values claim `stroke-width`, color values claim
|
|
42
|
+
`stroke`. Same-property conflicts (`stroke-2` vs `stroke-4`,
|
|
43
|
+
`stroke-red-500` vs `stroke-blue-500`) still merge as before.
|
|
44
|
+
- **Watch mode double rebuild** — debouncing and rate-limiting now share a
|
|
45
|
+
single timer, so a burst of file changes landing inside the rate-limit
|
|
46
|
+
window schedules one rebuild instead of a redundant second one.
|
|
47
|
+
- **`@color` entries without a colon** — a colon-less fragment in an
|
|
48
|
+
`@color` block now produces a warning and is skipped on its own; it no
|
|
49
|
+
longer swallowed the entry that followed it.
|
|
50
|
+
|
|
8
51
|
## [0.3.0] - 2026-08-14
|
|
9
52
|
|
|
10
53
|
### Added — editor tooling API (phase 2)
|
package/README.md
CHANGED
|
@@ -28,6 +28,28 @@ pnpm add rainbowindex
|
|
|
28
28
|
|
|
29
29
|
Requires Node `>=20.19`. The package is **ESM-only** — there is no CommonJS build, so `require("rainbowindex")` is only supported on runtimes that can `require()` ES modules (Node 20.19+); use `import` otherwise (e.g. an ESM `postcss.config.js`/`.mjs`). `postcss` is a required peer dependency, `vite` an optional one; `lightningcss`, `chokidar`, and `tinyglobby` are bundled as direct deps.
|
|
30
30
|
|
|
31
|
+
### From GitHub Packages
|
|
32
|
+
|
|
33
|
+
Every release is also published to [GitHub Packages](https://github.com/rainbowindex/rainbowindex/pkgs/npm/rainbowindex) as `@rainbowindex/rainbowindex` — the same build under an owner-scoped name, which that registry requires. Point the scope at the registry in your project's `.npmrc`:
|
|
34
|
+
|
|
35
|
+
```ini
|
|
36
|
+
@rainbowindex:registry=https://npm.pkg.github.com
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
GitHub Packages authenticates every read, including public ones, so put a [personal access token (classic)](https://github.com/settings/tokens) with the `read:packages` scope in your `~/.npmrc`:
|
|
40
|
+
|
|
41
|
+
```ini
|
|
42
|
+
//npm.pkg.github.com/:_authToken=YOUR_TOKEN
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Then install under the alias `rainbowindex`, so every import, `@import`, and CLI invocation in the docs below works unchanged:
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
pnpm add rainbowindex@npm:@rainbowindex/rainbowindex
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Without the alias — `pnpm add @rainbowindex/rainbowindex` — the package resolves under its scoped name, and specifiers become `@rainbowindex/rainbowindex`, `@rainbowindex/rainbowindex/vite`, and so on.
|
|
52
|
+
|
|
31
53
|
## Quick start (Vite)
|
|
32
54
|
|
|
33
55
|
The fastest path is the Vite plugin, which auto-injects PostCSS config and discovers your CSS entry on first dev-server listen.
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { C as ColorDefinition, a as CompilationContext, b as CompilationSnapshot,
|
|
2
|
-
export { s as safelist } from './safelist-
|
|
1
|
+
export { C as ColorDefinition, a as CompilationContext, b as CompilationSnapshot, F as FluidConfig, T as TextSize, c as Theme, d as createCompilationContext, e as defaultTheme, f as finalizeCompilationContext, r as registerColorNames, g as registerCustomFontFamilies, h as registerCustomTextSizes, i as registerCustomUtility } from './context-ruu2x_jR.js';
|
|
2
|
+
export { D as DEFAULT_TEXT_SIZES, c as createRi, r as ri, s as safelist } from './safelist-D9-Plqta.js';
|
|
3
3
|
|
|
4
4
|
declare function browserEntryUnavailable(): never;
|
|
5
5
|
|
package/dist/browser.mjs
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// src/scanner/source-files.ts
|
|
2
|
+
var SOURCE_FILE_EXTENSIONS = Object.freeze([
|
|
3
|
+
"html",
|
|
4
|
+
"js",
|
|
5
|
+
"jsx",
|
|
6
|
+
"ts",
|
|
7
|
+
"tsx",
|
|
8
|
+
"md",
|
|
9
|
+
"mdx",
|
|
10
|
+
"vue",
|
|
11
|
+
"svelte"
|
|
12
|
+
]);
|
|
13
|
+
function isSourceFile(file) {
|
|
14
|
+
return SOURCE_FILE_EXTENSIONS.some((ext) => file.endsWith(`.${ext}`));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
isSourceFile
|
|
19
|
+
};
|