@teacss/linter 0.10.16 → 1.0.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/README.md CHANGED
@@ -402,6 +402,7 @@ Your own options join the preset:
402
402
  | `@[&:not([aria-current=page])]` | the breadcrumb link shared by current and ordinary pages |
403
403
  | `@[:focus-visible>&]`, `@[&_a:focus-visible]`, `@[&:has(>:is(input,textarea,select):focus-visible)]` | the focus rings of card media, `article` links and wrappers of hidden native controls |
404
404
  | `@[&:has(>:first-child>:checked)]` | the checkbox row of a table |
405
+ | `@_:is(hr,th,td,blockquote)` | the rule color of `article` |
405
406
  | `@[&_>_.avatar]` | the ring color of `avatar-group--ring` |
406
407
  | `@[&:where(:dir(rtl))]` | the RTL target of a look |
407
408
  | `transition-property:[scale]` | the press transition written out |
@@ -410,12 +411,12 @@ Your own options join the preset:
410
411
  | `font-size:24px` | the glyph size that `presets.md` writes; another size, such as `font-size:14px`, is reported |
411
412
  | `/^grid-columns:\[repeat\([^@]+\)\]$/` | one `repeat(...)`: `grid-columns:[repeat(2,minmax(0,1fr))]@md`, `grid-columns:[repeat(auto-fit,_minmax(min(100%,16rem),_1fr))]` |
412
413
  | `grid-column:[1/-1]` | the full-width span in `standard.md` |
413
- | `max-w:[65ch]` | the prose measure |
414
+ | `max-w:[34em]` | the prose measure |
414
415
  | `rd:9999px` | the pill radius |
415
416
  | `/^rd:\[calc\(var\(--radius-\w+\)_-_[^@]+\)\]$/` | a radius step minus a length: `rd:[calc(var(--radius-4x)_-_1px)]` |
416
417
  | `p-b:[env(safe-area-inset-bottom)]` | the safe-area padding of a full-bleed surface |
417
418
 
418
- None of these entries matches a class with a condition as a whole, so the conditions of an allowed class are still checked: `max-w:[65ch]@md` and `rd:9999px!` pass, and `max-w:[65ch]@[&>li]` is reported for its condition.
419
+ None of these entries matches a class with a condition as a whole, so the conditions of an allowed class are still checked: `max-w:[34em]@md` and `rd:9999px!` pass, and `max-w:[34em]@[&>li]` is reported for its condition.
419
420
 
420
421
  ### `no-restyle`
421
422
 
@@ -425,7 +426,7 @@ None of these entries matches a class with a condition as a whole, so the condit
425
426
  | --- | --- | --- |
426
427
  | `btn` | One of `btn--primary`, `btn--outline`, `btn--neutral`, `btn--minimal`, `btn--general`, `btn--success`, `btn--warning`, `btn--failure`, whatever their conditions. | "Choose one variant from the catalogue." (`presets.md`) |
427
428
  | `surface-*` | One of the six surface shortcuts, whatever their conditions. | "Choose one surface before merging classes; `cn` does not resolve different surface names." (`presets.md`) |
428
- | `outlined` | Not with a surface shortcut, `toolbar`, `tab-list`, `sheet`, `tooltip-content`, `modal` or `mockup-code`, whatever their conditions. | "Do not add `outlined` to a `surface-*` shortcut or to a component that paints its own border" (`presets.md`) |
429
+ | `outlined` | Not with a surface shortcut, `toolbar`, `tab-list`, `sheet`, `tooltip-content`, `modal`, `mockup-code`, a field (`input`, `textarea`, `select`, `input-shell`, `join-text`, `otp-input`, `otp-slot`, `file-input`, `color-input`), a checkable control (`checkbox`, `radio`, `toggle`), `badge` or `pagination-link`, whatever their conditions. | "Do not add `outlined` to a `surface-*` shortcut or to a component that paints its own border" (`presets.md`) |
429
430
  | `ring` | One of the six rings for the same condition. | "Pick one ring per variant" (`presets.md`) |
430
431
  | `dropdown-panel` | One of `dropdown-panel--popover` and `dropdown-panel--floating`, whatever their conditions. | "Choose one, on `dropdown-panel`, never on `dropdown-content`." (`presets.md`) |
431
432
  | `dropdown-content` | Denies `dropdown-panel--*`. | The same sentence. |
package/dist/preset.js CHANGED
@@ -20,6 +20,7 @@ const arbitrary = {
20
20
  "@[&:has(>:is(input,textarea,select):focus-visible)]",
21
21
  "@[&:has(>:first-child>:checked)]",
22
22
  "@[&_a:focus-visible]",
23
+ "@_:is(hr,th,td,blockquote)",
23
24
  "@[&_>_.avatar]",
24
25
  "@[&:where(:dir(rtl))]",
25
26
  "transition-property:[scale]",
@@ -30,7 +31,7 @@ const arbitrary = {
30
31
  "font-size:24px",
31
32
  "/^grid-columns:\\[repeat\\([^@]+\\)\\]$/",
32
33
  "grid-column:[1/-1]",
33
- "max-w:[65ch]",
34
+ "max-w:[34em]",
34
35
  "rd:9999px",
35
36
  "/^rd:\\[calc\\(var\\(--radius-\\w+\\)_-_[^@]+\\)\\]$/",
36
37
  "p-b:[env(safe-area-inset-bottom)]",
@@ -43,7 +44,34 @@ const restyle = {
43
44
  { pattern: "surface-*", exclusive: [any("surface-panel", "surface-sunken", "surface-tooltip", "surface-menu", "surface-dialog", "surface-fullscreen")] },
44
45
  {
45
46
  pattern: "outlined",
46
- exclusive: ["surface-panel", "surface-sunken", "surface-tooltip", "surface-menu", "surface-dialog", "surface-fullscreen", "toolbar", "tab-list", "sheet", "tooltip-content", "modal", "mockup-code"].map((surface) => any("outlined", surface)),
47
+ exclusive: [
48
+ "surface-panel",
49
+ "surface-sunken",
50
+ "surface-tooltip",
51
+ "surface-menu",
52
+ "surface-dialog",
53
+ "surface-fullscreen",
54
+ "toolbar",
55
+ "tab-list",
56
+ "sheet",
57
+ "tooltip-content",
58
+ "modal",
59
+ "mockup-code",
60
+ "input",
61
+ "textarea",
62
+ "select",
63
+ "input-shell",
64
+ "join-text",
65
+ "otp-input",
66
+ "otp-slot",
67
+ "file-input",
68
+ "color-input",
69
+ "checkbox",
70
+ "radio",
71
+ "toggle",
72
+ "badge",
73
+ "pagination-link",
74
+ ].map((surface) => any("outlined", surface)),
47
75
  },
48
76
  { pattern: "ring", exclusive: [["ring", "ring-flat", "ring-inset", "ring-solid", "ring-shadow", "ring-shadow-flat"]] },
49
77
  { pattern: "dropdown-panel", exclusive: [any("dropdown-panel--popover", "dropdown-panel--floating")] },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teacss/linter",
3
- "version": "0.10.16",
3
+ "version": "1.0.0",
4
4
  "description": "oxlint plugin for TeaCSS: limits which classes a project may write",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -33,7 +33,7 @@
33
33
  "node": ">=26"
34
34
  },
35
35
  "dependencies": {
36
- "@teacss/engine": "0.10.16"
36
+ "@teacss/engine": "1.0.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "oxlint": "1.95.x"