tailwind-canonical 0.7.0 → 0.7.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 CHANGED
@@ -140,6 +140,11 @@ npx tailwind-canonical --fix --reporter json ./src
140
140
  npx tailwind-canonical --reporter sarif ./src > results.sarif
141
141
  ```
142
142
 
143
+ Each result's `artifactLocation.uri` is relative to the git root (falling back to the working
144
+ directory), with `uriBaseId: "%SRCROOT%"`, so Code Scanning maps it from any subdirectory.
145
+ Results also carry `level`, a full `region` (start/end column) and line-independent
146
+ `partialFingerprints`; `tool.driver.version` records the emitting version.
147
+
143
148
  **GitHub Actions integration:**
144
149
  ```yaml
145
150
  - run: npx tailwind-canonical --reporter sarif ./src > results.sarif
@@ -349,10 +354,14 @@ left-2 right-2 → inset-x-2
349
354
  | `h-[64px]` | `h-16` | Spacing scale ÷4 |
350
355
  | `w-[50%]` | `w-1/2` | Percentage fractions |
351
356
  | `opacity-[0.5]` | `opacity-50` | Opacity scale |
352
- | `text-[11px]` | `text-2xs` | Built-in extra token |
353
- | `text-[8px]`–`text-[10px]` | `text-3xs` | Built-in extra token |
357
+ | `text-[11px]` | `text-2xs` | Requires `customTextTokens` |
358
+ | `text-[8px]`–`text-[10px]` | `text-3xs` | Requires `customTextTokens` |
359
+
360
+ `text-2xs` and `text-3xs` are not stock Tailwind tokens, so they are not in the built-in text size map — without config, `text-[11px]` and `text-[8px]`–`text-[10px]` are left untouched. Enable them with `customTextTokens`:
354
361
 
355
- `text-2xs` (11px) and `text-3xs` (8–10px) are part of the built-in text size map — they convert with no config. Override or extend the map via `customTextTokens`.
362
+ ```ts
363
+ export default { customTextTokens: { 8: '3xs', 9: '3xs', 10: '3xs', 11: '2xs' } }
364
+ ```
356
365
 
357
366
  Non-divisible values (`h-[22px]`, `px-[7px]`) are left untouched.
358
367
 
package/dist/cli/cli.d.ts CHANGED
@@ -1,13 +1,5 @@
1
- export type Sink = {
2
- log: (s: string) => void;
3
- error: (s: string) => void;
4
- write: (s: string) => void;
5
- };
6
- export type RunResult = {
7
- exitCode: number;
8
- watching?: boolean;
9
- };
10
- type Reporter = 'text' | 'json' | 'sarif';
1
+ import type { Reporter, RunResult, Sink } from './types.js';
2
+ export type { RunResult, Sink } from './types.js';
11
3
  type Flags = {
12
4
  fix: boolean;
13
5
  merge: boolean;
@@ -37,4 +29,3 @@ export declare function parseArgs(argv: string[]): Flags;
37
29
  */
38
30
  export declare function flagWarnings(flags: Flags): string[];
39
31
  export declare function run(argv: string[], cwd: string, sink?: Sink): Promise<RunResult>;
40
- export {};