@jomae/catalog 0.4.0 → 0.7.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.
Files changed (244) hide show
  1. package/README.md +21 -3
  2. package/dist/baseline.d.ts +25 -0
  3. package/dist/baseline.d.ts.map +1 -1
  4. package/dist/baseline.js +25 -1
  5. package/dist/baseline.js.map +1 -1
  6. package/dist/categories.d.ts +20 -0
  7. package/dist/categories.d.ts.map +1 -0
  8. package/dist/categories.js +62 -0
  9. package/dist/categories.js.map +1 -0
  10. package/dist/detect.d.ts +2 -1
  11. package/dist/detect.d.ts.map +1 -1
  12. package/dist/detect.js +17 -2
  13. package/dist/detect.js.map +1 -1
  14. package/dist/generated/baseline-history.d.ts +21 -0
  15. package/dist/generated/baseline-history.d.ts.map +1 -0
  16. package/dist/generated/baseline-history.js +20 -0
  17. package/dist/generated/baseline-history.js.map +1 -0
  18. package/dist/generated/baseline.d.ts +10 -0
  19. package/dist/generated/baseline.d.ts.map +1 -1
  20. package/dist/generated/baseline.js +250 -67
  21. package/dist/generated/baseline.js.map +1 -1
  22. package/dist/generated/guides.d.ts +16 -0
  23. package/dist/generated/guides.d.ts.map +1 -0
  24. package/dist/generated/guides.js +153 -0
  25. package/dist/generated/guides.js.map +1 -0
  26. package/dist/generated/sizes.d.ts.map +1 -1
  27. package/dist/generated/sizes.js +280 -55
  28. package/dist/generated/sizes.js.map +1 -1
  29. package/dist/generated/support-claims.d.ts +15 -0
  30. package/dist/generated/support-claims.d.ts.map +1 -0
  31. package/dist/generated/support-claims.js +69 -0
  32. package/dist/generated/support-claims.js.map +1 -0
  33. package/dist/guides.d.ts +46 -0
  34. package/dist/guides.d.ts.map +1 -0
  35. package/dist/guides.js +55 -0
  36. package/dist/guides.js.map +1 -0
  37. package/dist/history.d.ts +11 -0
  38. package/dist/history.d.ts.map +1 -0
  39. package/dist/history.js +14 -0
  40. package/dist/history.js.map +1 -0
  41. package/dist/index.d.ts +7 -1
  42. package/dist/index.d.ts.map +1 -1
  43. package/dist/index.js +7 -1
  44. package/dist/index.js.map +1 -1
  45. package/dist/markdown.d.ts +24 -0
  46. package/dist/markdown.d.ts.map +1 -0
  47. package/dist/markdown.js +194 -0
  48. package/dist/markdown.js.map +1 -0
  49. package/dist/rules/abort-controller.d.ts.map +1 -1
  50. package/dist/rules/abort-controller.js +2 -1
  51. package/dist/rules/abort-controller.js.map +1 -1
  52. package/dist/rules/accordion.d.ts.map +1 -1
  53. package/dist/rules/accordion.js +3 -0
  54. package/dist/rules/accordion.js.map +1 -1
  55. package/dist/rules/array-grouping.d.ts +3 -0
  56. package/dist/rules/array-grouping.d.ts.map +1 -0
  57. package/dist/rules/array-grouping.js +29 -0
  58. package/dist/rules/array-grouping.js.map +1 -0
  59. package/dist/rules/aspect-ratio.d.ts.map +1 -1
  60. package/dist/rules/aspect-ratio.js +1 -0
  61. package/dist/rules/aspect-ratio.js.map +1 -1
  62. package/dist/rules/base64.d.ts +3 -0
  63. package/dist/rules/base64.d.ts.map +1 -0
  64. package/dist/rules/base64.js +41 -0
  65. package/dist/rules/base64.js.map +1 -0
  66. package/dist/rules/broadcast-channel.d.ts.map +1 -1
  67. package/dist/rules/broadcast-channel.js +1 -0
  68. package/dist/rules/broadcast-channel.js.map +1 -1
  69. package/dist/rules/carousel.d.ts.map +1 -1
  70. package/dist/rules/carousel.js +7 -0
  71. package/dist/rules/carousel.js.map +1 -1
  72. package/dist/rules/clipboard.d.ts.map +1 -1
  73. package/dist/rules/clipboard.js +4 -1
  74. package/dist/rules/clipboard.js.map +1 -1
  75. package/dist/rules/color-functions.d.ts.map +1 -1
  76. package/dist/rules/color-functions.js +1 -0
  77. package/dist/rules/color-functions.js.map +1 -1
  78. package/dist/rules/compression-streams.d.ts.map +1 -1
  79. package/dist/rules/compression-streams.js +2 -1
  80. package/dist/rules/compression-streams.js.map +1 -1
  81. package/dist/rules/container-queries.d.ts.map +1 -1
  82. package/dist/rules/container-queries.js +2 -0
  83. package/dist/rules/container-queries.js.map +1 -1
  84. package/dist/rules/content-visibility.d.ts.map +1 -1
  85. package/dist/rules/content-visibility.js +3 -1
  86. package/dist/rules/content-visibility.js.map +1 -1
  87. package/dist/rules/custom-highlight.d.ts +3 -0
  88. package/dist/rules/custom-highlight.d.ts.map +1 -0
  89. package/dist/rules/custom-highlight.js +39 -0
  90. package/dist/rules/custom-highlight.js.map +1 -0
  91. package/dist/rules/date-time-input.d.ts.map +1 -1
  92. package/dist/rules/date-time-input.js +2 -0
  93. package/dist/rules/date-time-input.js.map +1 -1
  94. package/dist/rules/dialog.d.ts.map +1 -1
  95. package/dist/rules/dialog.js +8 -0
  96. package/dist/rules/dialog.js.map +1 -1
  97. package/dist/rules/discrete-transitions.d.ts.map +1 -1
  98. package/dist/rules/discrete-transitions.js +6 -0
  99. package/dist/rules/discrete-transitions.js.map +1 -1
  100. package/dist/rules/drag-and-drop.d.ts.map +1 -1
  101. package/dist/rules/drag-and-drop.js +26 -8
  102. package/dist/rules/drag-and-drop.js.map +1 -1
  103. package/dist/rules/duration-format.d.ts +3 -0
  104. package/dist/rules/duration-format.d.ts.map +1 -0
  105. package/dist/rules/duration-format.js +37 -0
  106. package/dist/rules/duration-format.js.map +1 -0
  107. package/dist/rules/event-target.d.ts +3 -0
  108. package/dist/rules/event-target.d.ts.map +1 -0
  109. package/dist/rules/event-target.js +51 -0
  110. package/dist/rules/event-target.js.map +1 -0
  111. package/dist/rules/fetch.d.ts +3 -0
  112. package/dist/rules/fetch.d.ts.map +1 -0
  113. package/dist/rules/fetch.js +46 -0
  114. package/dist/rules/fetch.js.map +1 -0
  115. package/dist/rules/field-sizing.d.ts.map +1 -1
  116. package/dist/rules/field-sizing.js +3 -1
  117. package/dist/rules/field-sizing.js.map +1 -1
  118. package/dist/rules/fluid-type.d.ts.map +1 -1
  119. package/dist/rules/fluid-type.js +3 -1
  120. package/dist/rules/fluid-type.js.map +1 -1
  121. package/dist/rules/focus-visible.d.ts.map +1 -1
  122. package/dist/rules/focus-visible.js +1 -0
  123. package/dist/rules/focus-visible.js.map +1 -1
  124. package/dist/rules/fullscreen.d.ts.map +1 -1
  125. package/dist/rules/fullscreen.js +2 -1
  126. package/dist/rules/fullscreen.js.map +1 -1
  127. package/dist/rules/height-animation.d.ts.map +1 -1
  128. package/dist/rules/height-animation.js +2 -0
  129. package/dist/rules/height-animation.js.map +1 -1
  130. package/dist/rules/index.d.ts.map +1 -1
  131. package/dist/rules/index.js +64 -3
  132. package/dist/rules/index.js.map +1 -1
  133. package/dist/rules/inert.d.ts +3 -0
  134. package/dist/rules/inert.d.ts.map +1 -0
  135. package/dist/rules/inert.js +37 -0
  136. package/dist/rules/inert.js.map +1 -0
  137. package/dist/rules/intersection-observer.d.ts.map +1 -1
  138. package/dist/rules/intersection-observer.js +2 -0
  139. package/dist/rules/intersection-observer.js.map +1 -1
  140. package/dist/rules/lazy-loading.d.ts.map +1 -1
  141. package/dist/rules/lazy-loading.js +2 -0
  142. package/dist/rules/lazy-loading.js.map +1 -1
  143. package/dist/rules/line-clamp.d.ts.map +1 -1
  144. package/dist/rules/line-clamp.js +2 -1
  145. package/dist/rules/line-clamp.js.map +1 -1
  146. package/dist/rules/masonry.d.ts.map +1 -1
  147. package/dist/rules/masonry.js +1 -0
  148. package/dist/rules/masonry.js.map +1 -1
  149. package/dist/rules/natural-sort.d.ts +3 -0
  150. package/dist/rules/natural-sort.d.ts.map +1 -0
  151. package/dist/rules/natural-sort.js +41 -0
  152. package/dist/rules/natural-sort.js.map +1 -0
  153. package/dist/rules/number-format.d.ts.map +1 -1
  154. package/dist/rules/number-format.js +3 -1
  155. package/dist/rules/number-format.js.map +1 -1
  156. package/dist/rules/page-visibility.d.ts.map +1 -1
  157. package/dist/rules/page-visibility.js +5 -0
  158. package/dist/rules/page-visibility.js.map +1 -1
  159. package/dist/rules/popover.d.ts.map +1 -1
  160. package/dist/rules/popover.js +8 -1
  161. package/dist/rules/popover.js.map +1 -1
  162. package/dist/rules/random-uuid.d.ts +3 -0
  163. package/dist/rules/random-uuid.d.ts.map +1 -0
  164. package/dist/rules/random-uuid.js +31 -0
  165. package/dist/rules/random-uuid.js.map +1 -0
  166. package/dist/rules/relative-time.d.ts.map +1 -1
  167. package/dist/rules/relative-time.js +1 -0
  168. package/dist/rules/relative-time.js.map +1 -1
  169. package/dist/rules/resizable-panels.d.ts.map +1 -1
  170. package/dist/rules/resizable-panels.js +4 -7
  171. package/dist/rules/resizable-panels.js.map +1 -1
  172. package/dist/rules/resize-observer.d.ts.map +1 -1
  173. package/dist/rules/resize-observer.js +2 -1
  174. package/dist/rules/resize-observer.js.map +1 -1
  175. package/dist/rules/screen-wake-lock.d.ts.map +1 -1
  176. package/dist/rules/screen-wake-lock.js +3 -1
  177. package/dist/rules/screen-wake-lock.js.map +1 -1
  178. package/dist/rules/scroll-animations.d.ts.map +1 -1
  179. package/dist/rules/scroll-animations.js +9 -1
  180. package/dist/rules/scroll-animations.js.map +1 -1
  181. package/dist/rules/scroll-lock.d.ts.map +1 -1
  182. package/dist/rules/scroll-lock.js +8 -7
  183. package/dist/rules/scroll-lock.js.map +1 -1
  184. package/dist/rules/scrollbars.d.ts.map +1 -1
  185. package/dist/rules/scrollbars.js +5 -0
  186. package/dist/rules/scrollbars.js.map +1 -1
  187. package/dist/rules/select.d.ts.map +1 -1
  188. package/dist/rules/select.js +7 -0
  189. package/dist/rules/select.js.map +1 -1
  190. package/dist/rules/server-sent-events.d.ts +3 -0
  191. package/dist/rules/server-sent-events.d.ts.map +1 -0
  192. package/dist/rules/server-sent-events.js +38 -0
  193. package/dist/rules/server-sent-events.js.map +1 -0
  194. package/dist/rules/smooth-scroll.d.ts.map +1 -1
  195. package/dist/rules/smooth-scroll.js +2 -0
  196. package/dist/rules/smooth-scroll.js.map +1 -1
  197. package/dist/rules/speech-recognition.d.ts.map +1 -1
  198. package/dist/rules/speech-recognition.js +19 -10
  199. package/dist/rules/speech-recognition.js.map +1 -1
  200. package/dist/rules/speech-synthesis.d.ts.map +1 -1
  201. package/dist/rules/speech-synthesis.js +3 -0
  202. package/dist/rules/speech-synthesis.js.map +1 -1
  203. package/dist/rules/sticky.d.ts.map +1 -1
  204. package/dist/rules/sticky.js +2 -0
  205. package/dist/rules/sticky.js.map +1 -1
  206. package/dist/rules/structured-clone.d.ts.map +1 -1
  207. package/dist/rules/structured-clone.js +13 -2
  208. package/dist/rules/structured-clone.js.map +1 -1
  209. package/dist/rules/text-box-trim.d.ts.map +1 -1
  210. package/dist/rules/text-box-trim.js +3 -1
  211. package/dist/rules/text-box-trim.js.map +1 -1
  212. package/dist/rules/text-wrap-balance.d.ts.map +1 -1
  213. package/dist/rules/text-wrap-balance.js +2 -0
  214. package/dist/rules/text-wrap-balance.js.map +1 -1
  215. package/dist/rules/url-search-params.d.ts +3 -0
  216. package/dist/rules/url-search-params.d.ts.map +1 -0
  217. package/dist/rules/url-search-params.js +42 -0
  218. package/dist/rules/url-search-params.js.map +1 -0
  219. package/dist/rules/view-transitions.d.ts.map +1 -1
  220. package/dist/rules/view-transitions.js +9 -0
  221. package/dist/rules/view-transitions.js.map +1 -1
  222. package/dist/rules/web-bluetooth.d.ts.map +1 -1
  223. package/dist/rules/web-bluetooth.js +1 -0
  224. package/dist/rules/web-bluetooth.js.map +1 -1
  225. package/dist/rules/web-crypto.d.ts +3 -0
  226. package/dist/rules/web-crypto.d.ts.map +1 -0
  227. package/dist/rules/web-crypto.js +32 -0
  228. package/dist/rules/web-crypto.js.map +1 -0
  229. package/dist/rules/web-share.d.ts.map +1 -1
  230. package/dist/rules/web-share.js +1 -0
  231. package/dist/rules/web-share.js.map +1 -1
  232. package/dist/schema.d.ts +22 -0
  233. package/dist/schema.d.ts.map +1 -1
  234. package/dist/schema.js +63 -4
  235. package/dist/schema.js.map +1 -1
  236. package/dist/search.d.ts +29 -0
  237. package/dist/search.d.ts.map +1 -0
  238. package/dist/search.js +84 -0
  239. package/dist/search.js.map +1 -0
  240. package/dist/support.d.ts +11 -0
  241. package/dist/support.d.ts.map +1 -0
  242. package/dist/support.js +31 -0
  243. package/dist/support.js.map +1 -0
  244. package/package.json +2 -2
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.d.ts","sourceRoot":"","sources":["../../src/rules/fetch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,SAAS,EAAE,IA6CvB,CAAC"}
@@ -0,0 +1,46 @@
1
+ export const fetchRule = {
2
+ id: "fetch",
3
+ title: "HTTP requests",
4
+ category: "async-data",
5
+ replaces: [
6
+ "axios",
7
+ "superagent",
8
+ "redaxios",
9
+ "whatwg-fetch",
10
+ "unfetch",
11
+ "isomorphic-fetch",
12
+ "cross-fetch",
13
+ ],
14
+ featureIds: ["fetch"],
15
+ native: "fetch()",
16
+ human: {
17
+ explainer: "axios was written when fetch was not everywhere and XMLHttpRequest was the floor. Most of what it adds is now a few lines at the call site: fetch resolves for any response the server sent, so you check response.ok yourself, and it hands back a stream, so you call response.json(). Cancellation is an AbortController, and a timeout is AbortSignal.timeout() passed as the signal. Interceptors and upload progress are what is genuinely missing, and they are the reasons to keep the library.",
18
+ snippet: `const res = await fetch("/api/items", {
19
+ method: "POST",
20
+ headers: { "Content-Type": "application/json" },
21
+ body: JSON.stringify(payload),
22
+ // Aborts and rejects after five seconds.
23
+ signal: AbortSignal.timeout(5000),
24
+ });
25
+
26
+ // fetch only rejects on a network error, so check the status yourself.
27
+ if (!res.ok) throw new Error(\`\${res.status} \${res.statusText}\`);
28
+ const items = await res.json();`,
29
+ mdnUrl: "https://developer.mozilla.org/en-US/docs/Web/API/Window/fetch",
30
+ },
31
+ agent: {
32
+ when: "making HTTP requests from the browser or from Node {{nodejs:api.fetch}} and up",
33
+ unless: [
34
+ "You use interceptors to attach auth headers or refresh a token on 401 across every call. fetch has no hook for that, so it becomes a wrapper every request has to route through.",
35
+ "You rely on a 4xx or 5xx rejecting. fetch resolves for any response the server sent, so every call site needs an explicit response.ok check and existing catch blocks quietly stop firing.",
36
+ "You need upload progress. Download progress can come off the response stream, but tracking bytes sent still needs XMLHttpRequest, which is what axios uses underneath.",
37
+ "You share one client with Node below {{nodejs:api.fetch}}, where there is no global fetch, or you depend on axios features with no equivalent: XSRF cookie handling, automatic transforms, or the adapter system.",
38
+ "Your tests mock axios directly. Moving to fetch means rewriting those mocks, which is real work for no behaviour change.",
39
+ "You need a request timeout below Chrome {{chrome:abortsignal-timeout}}, Safari {{safari:abortsignal-timeout}} or Firefox {{firefox:abortsignal-timeout}}. fetch itself is far older than all three, but AbortSignal.timeout() is not, so an older target needs a setTimeout calling controller.abort().",
40
+ ],
41
+ snippet: `const res = await fetch(url, { signal: AbortSignal.timeout(5000) });
42
+ if (!res.ok) throw new Error(String(res.status));
43
+ const data = await res.json();`,
44
+ },
45
+ };
46
+ //# sourceMappingURL=fetch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetch.js","sourceRoot":"","sources":["../../src/rules/fetch.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAS;IAC7B,EAAE,EAAE,OAAO;IACX,KAAK,EAAE,eAAe;IACtB,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE;QACR,OAAO;QACP,YAAY;QACZ,UAAU;QACV,cAAc;QACd,SAAS;QACT,kBAAkB;QAClB,aAAa;KACd;IACD,UAAU,EAAE,CAAC,OAAO,CAAC;IACrB,MAAM,EAAE,SAAS;IACjB,KAAK,EAAE;QACL,SAAS,EACP,yeAAye;QAC3e,OAAO,EAAE;;;;;;;;;;gCAUmB;QAC5B,MAAM,EAAE,+DAA+D;KACxE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,gFAAgF;QACtF,MAAM,EAAE;YACN,kLAAkL;YAClL,4LAA4L;YAC5L,wKAAwK;YACxK,mNAAmN;YACnN,0HAA0H;YAC1H,ySAAyS;SAC1S;QACD,OAAO,EAAE;;+BAEkB;KAC5B;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"field-sizing.d.ts","sourceRoot":"","sources":["../../src/rules/field-sizing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,WAAW,EAAE,IA2CzB,CAAC"}
1
+ {"version":3,"file":"field-sizing.d.ts","sourceRoot":"","sources":["../../src/rules/field-sizing.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,WAAW,EAAE,IA6CzB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export const fieldSizing = {
2
2
  id: "field-sizing",
3
3
  title: "Auto-growing textareas",
4
+ category: "forms",
4
5
  replaces: [
5
6
  "react-textarea-autosize",
6
7
  "autosize",
@@ -30,7 +31,7 @@ input[type="text"] {
30
31
  agent: {
31
32
  when: "a textarea or input should grow to fit what the user has typed",
32
33
  unless: [
33
- "You need Safari or Firefox support today. field-sizing reached Baseline newly available only in mid-2026, so verify against your support target and keep a fallback if you cannot afford a fixed-height textarea.",
34
+ "Your support target reaches below Chrome {{chrome:field-sizing}}, Firefox {{firefox:field-sizing}} or Safari {{safari:field-sizing}}. Every engine ships field-sizing now, but Safari only at the end of 2025 and Firefox in 2026, so an older target still needs the fallback.",
34
35
  "You need the measured height in JavaScript, for example to sync a neighbouring element.",
35
36
  "You need to animate the height change. field-sizing resizes without a transition.",
36
37
  ],
@@ -40,5 +41,6 @@ input[type="text"] {
40
41
  max-height: 12lh;
41
42
  }`,
42
43
  },
44
+ guides: ["form-fields-automatically-fit-contents"],
43
45
  };
44
46
  //# sourceMappingURL=field-sizing.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"field-sizing.js","sourceRoot":"","sources":["../../src/rules/field-sizing.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAS;IAC/B,EAAE,EAAE,cAAc;IAClB,KAAK,EAAE,wBAAwB;IAC/B,QAAQ,EAAE;QACR,yBAAyB;QACzB,UAAU;QACV,yBAAyB;QACzB,uBAAuB;QACvB,cAAc;KACf;IACD,UAAU,EAAE,CAAC,cAAc,CAAC;IAC5B,MAAM,EAAE,uBAAuB;IAC/B,KAAK,EAAE;QACL,SAAS,EACP,oYAAoY;QACtY,OAAO,EAAE;;;;;;;;;;;;EAYX;QACE,MAAM,EAAE,+DAA+D;KACxE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,gEAAgE;QACtE,MAAM,EAAE;YACN,mNAAmN;YACnN,yFAAyF;YACzF,mFAAmF;SACpF;QACD,OAAO,EAAE;;;;EAIX;KACC;CACF,CAAC"}
1
+ {"version":3,"file":"field-sizing.js","sourceRoot":"","sources":["../../src/rules/field-sizing.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAS;IAC/B,EAAE,EAAE,cAAc;IAClB,KAAK,EAAE,wBAAwB;IAC/B,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE;QACR,yBAAyB;QACzB,UAAU;QACV,yBAAyB;QACzB,uBAAuB;QACvB,cAAc;KACf;IACD,UAAU,EAAE,CAAC,cAAc,CAAC;IAC5B,MAAM,EAAE,uBAAuB;IAC/B,KAAK,EAAE;QACL,SAAS,EACP,oYAAoY;QACtY,OAAO,EAAE;;;;;;;;;;;;EAYX;QACE,MAAM,EAAE,+DAA+D;KACxE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,gEAAgE;QACtE,MAAM,EAAE;YACN,iRAAiR;YACjR,yFAAyF;YACzF,mFAAmF;SACpF;QACD,OAAO,EAAE;;;;EAIX;KACC;IACD,MAAM,EAAE,CAAC,wCAAwC,CAAC;CACnD,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"fluid-type.d.ts","sourceRoot":"","sources":["../../src/rules/fluid-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,SAAS,EAAE,IA8BvB,CAAC"}
1
+ {"version":3,"file":"fluid-type.d.ts","sourceRoot":"","sources":["../../src/rules/fluid-type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,SAAS,EAAE,IAgCvB,CAAC"}
@@ -1,7 +1,8 @@
1
1
  export const fluidType = {
2
2
  id: "fluid-type-clamp",
3
3
  title: "Fluid type scales",
4
- replaces: ["fitty", "fittext.js", "textfit", "react-textfit"],
4
+ category: "typography",
5
+ replaces: ["fittext.js"],
5
6
  featureIds: ["min-max-clamp"],
6
7
  native: "clamp() with a viewport-relative middle value",
7
8
  human: {
@@ -27,5 +28,6 @@ export const fluidType = {
27
28
  snippet: `h1 { font-size: clamp(2rem, 1.5rem + 2.5vw, 4rem); }
28
29
  .card h2 { font-size: clamp(1.25rem, 0.9rem + 2cqi, 2rem); }`,
29
30
  },
31
+ guides: ["fluid-scaling"],
30
32
  };
31
33
  //# sourceMappingURL=fluid-type.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fluid-type.js","sourceRoot":"","sources":["../../src/rules/fluid-type.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAS;IAC7B,EAAE,EAAE,kBAAkB;IACtB,KAAK,EAAE,mBAAmB;IAC1B,QAAQ,EAAE,CAAC,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,eAAe,CAAC;IAC7D,UAAU,EAAE,CAAC,eAAe,CAAC;IAC7B,MAAM,EAAE,+CAA+C;IACvD,KAAK,EAAE;QACL,SAAS,EACP,uaAAua;QACza,OAAO,EAAE;;;;;;;;EAQX;QACE,MAAM,EAAE,wDAAwD;KACjE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,6FAA6F;QACnG,MAAM,EAAE;YACN,oMAAoM;YACpM,gGAAgG;YAChG,kDAAkD;SACnD;QACD,OAAO,EAAE;6DACgD;KAC1D;CACF,CAAC"}
1
+ {"version":3,"file":"fluid-type.js","sourceRoot":"","sources":["../../src/rules/fluid-type.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAS;IAC7B,EAAE,EAAE,kBAAkB;IACtB,KAAK,EAAE,mBAAmB;IAC1B,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,CAAC,YAAY,CAAC;IACxB,UAAU,EAAE,CAAC,eAAe,CAAC;IAC7B,MAAM,EAAE,+CAA+C;IACvD,KAAK,EAAE;QACL,SAAS,EACP,uaAAua;QACza,OAAO,EAAE;;;;;;;;EAQX;QACE,MAAM,EAAE,wDAAwD;KACjE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,6FAA6F;QACnG,MAAM,EAAE;YACN,oMAAoM;YACpM,gGAAgG;YAChG,kDAAkD;SACnD;QACD,OAAO,EAAE;6DACgD;KAC1D;IACD,MAAM,EAAE,CAAC,eAAe,CAAC;CAC1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"focus-visible.d.ts","sourceRoot":"","sources":["../../src/rules/focus-visible.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,YAAY,EAAE,IAyB1B,CAAC"}
1
+ {"version":3,"file":"focus-visible.d.ts","sourceRoot":"","sources":["../../src/rules/focus-visible.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,YAAY,EAAE,IA0B1B,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export const focusVisible = {
2
2
  id: "focus-visible",
3
3
  title: "Keyboard-only focus styling",
4
+ category: "forms",
4
5
  replaces: ["focus-visible"],
5
6
  featureIds: ["focus-visible"],
6
7
  native: ":focus-visible",
@@ -1 +1 @@
1
- {"version":3,"file":"focus-visible.js","sourceRoot":"","sources":["../../src/rules/focus-visible.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAS;IAChC,EAAE,EAAE,eAAe;IACnB,KAAK,EAAE,6BAA6B;IACpC,QAAQ,EAAE,CAAC,eAAe,CAAC;IAC3B,UAAU,EAAE,CAAC,eAAe,CAAC;IAC7B,MAAM,EAAE,gBAAgB;IACxB,KAAK,EAAE;QACL,SAAS,EACP,8XAA8X;QAChY,OAAO,EAAE;;;;;EAKX;QACE,MAAM,EAAE,iEAAiE;KAC1E;IACD,KAAK,EAAE;QACL,IAAI,EAAE,0FAA0F;QAChG,MAAM,EAAE;YACN,gJAAgJ;YAChJ,8LAA8L;SAC/L;QACD,OAAO,EAAE,4DAA4D;KACtE;CACF,CAAC"}
1
+ {"version":3,"file":"focus-visible.js","sourceRoot":"","sources":["../../src/rules/focus-visible.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAS;IAChC,EAAE,EAAE,eAAe;IACnB,KAAK,EAAE,6BAA6B;IACpC,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE,CAAC,eAAe,CAAC;IAC3B,UAAU,EAAE,CAAC,eAAe,CAAC;IAC7B,MAAM,EAAE,gBAAgB;IACxB,KAAK,EAAE;QACL,SAAS,EACP,8XAA8X;QAChY,OAAO,EAAE;;;;;EAKX;QACE,MAAM,EAAE,iEAAiE;KAC1E;IACD,KAAK,EAAE;QACL,IAAI,EAAE,0FAA0F;QAChG,MAAM,EAAE;YACN,gJAAgJ;YAChJ,8LAA8L;SAC/L;QACD,OAAO,EAAE,4DAA4D;KACtE;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"fullscreen.d.ts","sourceRoot":"","sources":["../../src/rules/fullscreen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,UAAU,EAAE,IA6BxB,CAAC"}
1
+ {"version":3,"file":"fullscreen.d.ts","sourceRoot":"","sources":["../../src/rules/fullscreen.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,UAAU,EAAE,IA8BxB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export const fullscreen = {
2
2
  id: "fullscreen",
3
3
  title: "Fullscreen toggling",
4
+ category: "device-apis",
4
5
  replaces: ["screenfull", "react-full-screen", "vue-fullscreen"],
5
6
  featureIds: ["fullscreen"],
6
7
  native: "Element.requestFullscreen()",
@@ -18,7 +19,7 @@ export const fullscreen = {
18
19
  agent: {
19
20
  when: "toggling an element, such as a video player or image viewer, into and out of fullscreen",
20
21
  unless: [
21
- "You support Safari before version 16.4, where the unprefixed API only recently landed.",
22
+ "You support Safari below {{safari:api.Element.requestFullscreen}}, where the unprefixed API only recently landed.",
22
23
  "You're targeting iOS Safari specifically. It still doesn't support fullscreen on arbitrary elements, only on the built-in video player.",
23
24
  "You need the older vendor-prefixed fallback chain screenfull still maintains for browsers this old.",
24
25
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"fullscreen.js","sourceRoot":"","sources":["../../src/rules/fullscreen.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAS;IAC9B,EAAE,EAAE,YAAY;IAChB,KAAK,EAAE,qBAAqB;IAC5B,QAAQ,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,CAAC;IAC/D,UAAU,EAAE,CAAC,YAAY,CAAC;IAC1B,MAAM,EAAE,6BAA6B;IACrC,KAAK,EAAE;QACL,SAAS,EACP,gQAAgQ;QAClQ,OAAO,EAAE;;;;;;EAMX;QACE,MAAM,EACJ,4EAA4E;KAC/E;IACD,KAAK,EAAE;QACL,IAAI,EAAE,yFAAyF;QAC/F,MAAM,EAAE;YACN,wFAAwF;YACxF,yIAAyI;YACzI,qGAAqG;SACtG;QACD,OAAO,EACL,kFAAkF;KACrF;CACF,CAAC"}
1
+ {"version":3,"file":"fullscreen.js","sourceRoot":"","sources":["../../src/rules/fullscreen.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAS;IAC9B,EAAE,EAAE,YAAY;IAChB,KAAK,EAAE,qBAAqB;IAC5B,QAAQ,EAAE,aAAa;IACvB,QAAQ,EAAE,CAAC,YAAY,EAAE,mBAAmB,EAAE,gBAAgB,CAAC;IAC/D,UAAU,EAAE,CAAC,YAAY,CAAC;IAC1B,MAAM,EAAE,6BAA6B;IACrC,KAAK,EAAE;QACL,SAAS,EACP,gQAAgQ;QAClQ,OAAO,EAAE;;;;;;EAMX;QACE,MAAM,EACJ,4EAA4E;KAC/E;IACD,KAAK,EAAE;QACL,IAAI,EAAE,yFAAyF;QAC/F,MAAM,EAAE;YACN,mHAAmH;YACnH,yIAAyI;YACzI,qGAAqG;SACtG;QACD,OAAO,EACL,kFAAkF;KACrF;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"height-animation.d.ts","sourceRoot":"","sources":["../../src/rules/height-animation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,eAAe,EAAE,IA8C7B,CAAC"}
1
+ {"version":3,"file":"height-animation.d.ts","sourceRoot":"","sources":["../../src/rules/height-animation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,eAAe,EAAE,IAgD7B,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export const heightAnimation = {
2
2
  id: "height-auto-animation",
3
3
  title: "Animating to height auto",
4
+ category: "animation",
4
5
  replaces: ["react-collapse", "react-animate-height", "react-smooth-collapse"],
5
6
  featureIds: ["interpolate-size", "calc-size"],
6
7
  native: "interpolate-size: allow-keywords, or calc-size()",
@@ -43,5 +44,6 @@ export const heightAnimation = {
43
44
  .panel { height: 0; overflow: hidden; transition: height 0.3s; }
44
45
  .panel[data-open] { height: auto; }`,
45
46
  },
47
+ guides: ["animate-to-intrinsic-sizes", "calculate-with-intrinsic-sizes"],
46
48
  };
47
49
  //# sourceMappingURL=height-animation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"height-animation.js","sourceRoot":"","sources":["../../src/rules/height-animation.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAS;IACnC,EAAE,EAAE,uBAAuB;IAC3B,KAAK,EAAE,0BAA0B;IACjC,QAAQ,EAAE,CAAC,gBAAgB,EAAE,sBAAsB,EAAE,uBAAuB,CAAC;IAC7E,UAAU,EAAE,CAAC,kBAAkB,EAAE,WAAW,CAAC;IAC7C,MAAM,EAAE,kDAAkD;IAC1D,KAAK,EAAE;QACL,SAAS,EACP,ybAAyb;QAC3b,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;EAsBX;QACE,MAAM,EAAE,4DAA4D;KACrE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,qEAAqE;QAC3E,MAAM,EAAE;YACN,4NAA4N;YAC5N,6IAA6I;YAC7I,gGAAgG;YAChG,8GAA8G;SAC/G;QACD,OAAO,EAAE;;oCAEuB;KACjC;CACF,CAAC"}
1
+ {"version":3,"file":"height-animation.js","sourceRoot":"","sources":["../../src/rules/height-animation.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAS;IACnC,EAAE,EAAE,uBAAuB;IAC3B,KAAK,EAAE,0BAA0B;IACjC,QAAQ,EAAE,WAAW;IACrB,QAAQ,EAAE,CAAC,gBAAgB,EAAE,sBAAsB,EAAE,uBAAuB,CAAC;IAC7E,UAAU,EAAE,CAAC,kBAAkB,EAAE,WAAW,CAAC;IAC7C,MAAM,EAAE,kDAAkD;IAC1D,KAAK,EAAE;QACL,SAAS,EACP,ybAAyb;QAC3b,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;EAsBX;QACE,MAAM,EAAE,4DAA4D;KACrE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,qEAAqE;QAC3E,MAAM,EAAE;YACN,4NAA4N;YAC5N,6IAA6I;YAC7I,gGAAgG;YAChG,8GAA8G;SAC/G;QACD,OAAO,EAAE;;oCAEuB;KACjC;IACD,MAAM,EAAE,CAAC,4BAA4B,EAAE,gCAAgC,CAAC;CACzE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AA8CzC;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,SAAS,IAAI,EA6ChC,CAAC;AAEF,yBAAyB;AACzB,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,IAAI,CAE/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,IAAI,CAEpD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AA0JzC;;;GAGG;AACH,eAAO,MAAM,KAAK,EAAE,SAAS,IAAI,EAAqC,CAAC;AAEvE,yBAAyB;AACzB,eAAO,MAAM,SAAS,EAAE,WAAW,CAAC,MAAM,EAAE,IAAI,CAE/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,EAAE,IAAI,CAEpD,CAAC"}
@@ -1,6 +1,9 @@
1
+ import { resolveSupportClaims } from "../support.js";
1
2
  import { abortController } from "./abort-controller.js";
2
3
  import { accordion } from "./accordion.js";
4
+ import { arrayGrouping } from "./array-grouping.js";
3
5
  import { aspectRatio } from "./aspect-ratio.js";
6
+ import { base64 } from "./base64.js";
4
7
  import { broadcastChannel } from "./broadcast-channel.js";
5
8
  import { carousel } from "./carousel.js";
6
9
  import { clipboard } from "./clipboard.js";
@@ -8,22 +11,29 @@ import { colorFunctions } from "./color-functions.js";
8
11
  import { compressionStreams } from "./compression-streams.js";
9
12
  import { containerQueries } from "./container-queries.js";
10
13
  import { contentVisibility } from "./content-visibility.js";
14
+ import { customHighlight } from "./custom-highlight.js";
11
15
  import { dateTimeInput } from "./date-time-input.js";
12
16
  import { dialog } from "./dialog.js";
13
17
  import { discreteTransitions } from "./discrete-transitions.js";
14
18
  import { dragAndDrop } from "./drag-and-drop.js";
19
+ import { durationFormat } from "./duration-format.js";
20
+ import { eventTarget } from "./event-target.js";
21
+ import { fetchRule } from "./fetch.js";
15
22
  import { fieldSizing } from "./field-sizing.js";
16
23
  import { fluidType } from "./fluid-type.js";
17
24
  import { focusVisible } from "./focus-visible.js";
18
25
  import { fullscreen } from "./fullscreen.js";
19
26
  import { heightAnimation } from "./height-animation.js";
27
+ import { inert } from "./inert.js";
20
28
  import { intersectionObserver } from "./intersection-observer.js";
21
29
  import { lazyLoading } from "./lazy-loading.js";
22
30
  import { lineClamp } from "./line-clamp.js";
23
31
  import { masonry } from "./masonry.js";
32
+ import { naturalSort } from "./natural-sort.js";
24
33
  import { numberFormat } from "./number-format.js";
25
34
  import { pageVisibility } from "./page-visibility.js";
26
35
  import { popover } from "./popover.js";
36
+ import { randomUuid } from "./random-uuid.js";
27
37
  import { relativeTime } from "./relative-time.js";
28
38
  import { resizablePanels } from "./resizable-panels.js";
29
39
  import { resizeObserver } from "./resize-observer.js";
@@ -32,6 +42,7 @@ import { scrollAnimations } from "./scroll-animations.js";
32
42
  import { scrollLock } from "./scroll-lock.js";
33
43
  import { scrollbars } from "./scrollbars.js";
34
44
  import { select } from "./select.js";
45
+ import { serverSentEvents } from "./server-sent-events.js";
35
46
  import { smoothScroll } from "./smooth-scroll.js";
36
47
  import { speechRecognition } from "./speech-recognition.js";
37
48
  import { speechSynthesis } from "./speech-synthesis.js";
@@ -39,14 +50,47 @@ import { sticky } from "./sticky.js";
39
50
  import { structuredCloneRule } from "./structured-clone.js";
40
51
  import { textBoxTrim } from "./text-box-trim.js";
41
52
  import { textWrapBalance } from "./text-wrap-balance.js";
53
+ import { urlSearchParams } from "./url-search-params.js";
42
54
  import { viewTransitions } from "./view-transitions.js";
43
55
  import { webBluetooth } from "./web-bluetooth.js";
56
+ import { webCrypto } from "./web-crypto.js";
44
57
  import { webShare } from "./web-share.js";
45
58
  /**
46
- * Every rule in the catalog. Order is not significant: surfaces sort by
47
- * replaceable weight or support tier, not by position here.
59
+ * Interpolates the {{browser:key}} tokens a rule's prose uses in place of a
60
+ * hand-typed browser version. Done once here, so the website, the CLI, the
61
+ * MCP server and the skill reference all read resolved prose without any of
62
+ * them knowing the mechanism exists.
48
63
  */
49
- export const rules = [
64
+ function withResolvedClaims(rule) {
65
+ return {
66
+ ...rule,
67
+ // title and native render in page titles, OG cards, the CLI header and
68
+ // every finding. They were left out once and a token shipped raw.
69
+ title: resolveSupportClaims(rule.title),
70
+ native: resolveSupportClaims(rule.native),
71
+ human: {
72
+ ...rule.human,
73
+ explainer: resolveSupportClaims(rule.human.explainer),
74
+ snippet: resolveSupportClaims(rule.human.snippet),
75
+ },
76
+ agent: {
77
+ ...rule.agent,
78
+ when: resolveSupportClaims(rule.agent.when),
79
+ unless: rule.agent.unless.map(resolveSupportClaims),
80
+ snippet: resolveSupportClaims(rule.agent.snippet),
81
+ },
82
+ ...(rule.manualBaseline
83
+ ? {
84
+ manualBaseline: {
85
+ ...rule.manualBaseline,
86
+ note: resolveSupportClaims(rule.manualBaseline.note),
87
+ },
88
+ }
89
+ : {}),
90
+ };
91
+ }
92
+ /** The rules exactly as authored, tokens and all. */
93
+ const rawRules = [
50
94
  abortController,
51
95
  accordion,
52
96
  aspectRatio,
@@ -57,6 +101,7 @@ export const rules = [
57
101
  compressionStreams,
58
102
  containerQueries,
59
103
  contentVisibility,
104
+ customHighlight,
60
105
  dateTimeInput,
61
106
  dialog,
62
107
  discreteTransitions,
@@ -66,6 +111,7 @@ export const rules = [
66
111
  focusVisible,
67
112
  fullscreen,
68
113
  heightAnimation,
114
+ inert,
69
115
  intersectionObserver,
70
116
  lazyLoading,
71
117
  lineClamp,
@@ -91,7 +137,22 @@ export const rules = [
91
137
  viewTransitions,
92
138
  webBluetooth,
93
139
  webShare,
140
+ arrayGrouping,
141
+ base64,
142
+ durationFormat,
143
+ eventTarget,
144
+ fetchRule,
145
+ naturalSort,
146
+ randomUuid,
147
+ serverSentEvents,
148
+ urlSearchParams,
149
+ webCrypto,
94
150
  ];
151
+ /**
152
+ * Every rule in the catalog. Order is not significant: surfaces sort by
153
+ * replaceable weight or support tier, not by position here.
154
+ */
155
+ export const rules = rawRules.map(withResolvedClaims);
95
156
  /** Lookup by rule id. */
96
157
  export const rulesById = new Map(rules.map((rule) => [rule.id, rule]));
97
158
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MA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H,MAAM,CAAC,MAAM,cAAc,GAA8B,IAAI,GAAG,CAC9D,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,GAAG,EAAE,IAAI,CAAU,CAAC,CAAC,CAC1E,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Rule } from "../schema.ts";
2
+ export declare const inert: Rule;
3
+ //# sourceMappingURL=inert.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inert.d.ts","sourceRoot":"","sources":["../../src/rules/inert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,KAAK,EAAE,IAqCnB,CAAC"}
@@ -0,0 +1,37 @@
1
+ export const inert = {
2
+ id: "inert",
3
+ title: "Focus trapping",
4
+ category: "forms",
5
+ replaces: [
6
+ "focus-trap",
7
+ "focus-trap-react",
8
+ "react-focus-lock",
9
+ "focus-lock",
10
+ "vue-focus-lock",
11
+ "wicg-inert",
12
+ ],
13
+ featureIds: ["inert"],
14
+ native: "the inert attribute",
15
+ human: {
16
+ explainer: "A focus trap works by listening for keydown, noticing that Tab has left the overlay, and putting focus back. The inert attribute comes at it from the other side: mark the rest of the page inert and the browser drops it from the tab order, from the accessibility tree and from pointer events, so there is no escape to catch. If the overlay is a <dialog> opened with showModal(), the browser applies the same treatment to everything behind it and you write nothing at all.",
17
+ snippet: `<!-- While the panel is open, the rest of the page is unreachable:
18
+ no tab stops, no clicks, and hidden from screen readers. -->
19
+ <main id="page" inert>...</main>
20
+ <aside class="panel">...</aside>`,
21
+ mdnUrl: "https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Global_attributes/inert",
22
+ },
23
+ agent: {
24
+ when: "keeping keyboard focus inside an open modal, drawer or menu",
25
+ unless: [
26
+ "Focus has to cycle from the last element in the overlay back to the first. inert stops focus reaching the rest of the page, and the browser then moves on to the URL bar rather than wrapping inside your container.",
27
+ "You rely on the library restoring focus to the element that opened the overlay. inert does not track that, so storing the previous activeElement and calling focus() on close is yours to write.",
28
+ "The overlay lives inside the same subtree you would have to mark inert, so there is no ancestor you can set the attribute on without disabling the overlay along with it.",
29
+ "You are using the initial-focus, Escape handling and scroll locking the library bundles around the trap, and separating those out costs more than keeping the dependency.",
30
+ "Your support target includes browsers older than Chrome {{chrome:inert}}, Firefox {{firefox:inert}} or Safari {{safari:inert}}. They ignore inert, and focus escapes quietly rather than failing in a way you would notice.",
31
+ ],
32
+ snippet: `page.inert = true; // opening the overlay
33
+ page.inert = false; // closing it`,
34
+ },
35
+ guides: ["accessibility", "navigation-drawer"],
36
+ };
37
+ //# sourceMappingURL=inert.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inert.js","sourceRoot":"","sources":["../../src/rules/inert.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,KAAK,GAAS;IACzB,EAAE,EAAE,OAAO;IACX,KAAK,EAAE,gBAAgB;IACvB,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE;QACR,YAAY;QACZ,kBAAkB;QAClB,kBAAkB;QAClB,YAAY;QACZ,gBAAgB;QAChB,YAAY;KACb;IACD,UAAU,EAAE,CAAC,OAAO,CAAC;IACrB,MAAM,EAAE,qBAAqB;IAC7B,KAAK,EAAE;QACL,SAAS,EACP,wdAAwd;QAC1d,OAAO,EAAE;;;iCAGoB;QAC7B,MAAM,EACJ,qFAAqF;KACxF;IACD,KAAK,EAAE;QACL,IAAI,EAAE,6DAA6D;QACnE,MAAM,EAAE;YACN,sNAAsN;YACtN,kMAAkM;YAClM,2KAA2K;YAC3K,2KAA2K;YAC3K,6NAA6N;SAC9N;QACD,OAAO,EAAE;mCACsB;KAChC;IACD,MAAM,EAAE,CAAC,eAAe,EAAE,mBAAmB,CAAC;CAC/C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"intersection-observer.d.ts","sourceRoot":"","sources":["../../src/rules/intersection-observer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,oBAAoB,EAAE,IAmClC,CAAC"}
1
+ {"version":3,"file":"intersection-observer.d.ts","sourceRoot":"","sources":["../../src/rules/intersection-observer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,oBAAoB,EAAE,IAqClC,CAAC"}
@@ -1,11 +1,13 @@
1
1
  export const intersectionObserver = {
2
2
  id: "intersection-observer",
3
3
  title: "Visibility tracking",
4
+ category: "async-data",
4
5
  replaces: [
5
6
  "react-intersection-observer",
6
7
  "react-visibility-sensor",
7
8
  "react-in-viewport",
8
9
  "svelte-intersection-observer",
10
+ "intersection-observer",
9
11
  ],
10
12
  featureIds: ["intersection-observer"],
11
13
  native: "IntersectionObserver",
@@ -1 +1 @@
1
- {"version":3,"file":"intersection-observer.js","sourceRoot":"","sources":["../../src/rules/intersection-observer.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAS;IACxC,EAAE,EAAE,uBAAuB;IAC3B,KAAK,EAAE,qBAAqB;IAC5B,QAAQ,EAAE;QACR,6BAA6B;QAC7B,yBAAyB;QACzB,mBAAmB;QACnB,8BAA8B;KAC/B;IACD,UAAU,EAAE,CAAC,uBAAuB,CAAC;IACrC,MAAM,EAAE,sBAAsB;IAC9B,KAAK,EAAE;QACL,SAAS,EACP,wTAAwT;QAC1T,OAAO,EAAE;;;;;;;;qDAQwC;QACjD,MAAM,EACJ,4EAA4E;KAC/E;IACD,KAAK,EAAE;QACL,IAAI,EAAE,mIAAmI;QACzI,MAAM,EAAE;YACN,uOAAuO;YACvO,+JAA+J;SAChK;QACD,OAAO,EACL,qEAAqE;KACxE;CACF,CAAC"}
1
+ {"version":3,"file":"intersection-observer.js","sourceRoot":"","sources":["../../src/rules/intersection-observer.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,oBAAoB,GAAS;IACxC,EAAE,EAAE,uBAAuB;IAC3B,KAAK,EAAE,qBAAqB;IAC5B,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE;QACR,6BAA6B;QAC7B,yBAAyB;QACzB,mBAAmB;QACnB,8BAA8B;QAC9B,uBAAuB;KACxB;IACD,UAAU,EAAE,CAAC,uBAAuB,CAAC;IACrC,MAAM,EAAE,sBAAsB;IAC9B,KAAK,EAAE;QACL,SAAS,EACP,wTAAwT;QAC1T,OAAO,EAAE;;;;;;;;qDAQwC;QACjD,MAAM,EACJ,4EAA4E;KAC/E;IACD,KAAK,EAAE;QACL,IAAI,EAAE,mIAAmI;QACzI,MAAM,EAAE;YACN,uOAAuO;YACvO,+JAA+J;SAChK;QACD,OAAO,EACL,qEAAqE;KACxE;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"lazy-loading.d.ts","sourceRoot":"","sources":["../../src/rules/lazy-loading.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,WAAW,EAAE,IAmCzB,CAAC"}
1
+ {"version":3,"file":"lazy-loading.d.ts","sourceRoot":"","sources":["../../src/rules/lazy-loading.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,WAAW,EAAE,IAqCzB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export const lazyLoading = {
2
2
  id: "lazy-loading",
3
3
  title: "Lazy-loaded images and iframes",
4
+ category: "async-data",
4
5
  replaces: [
5
6
  "lozad",
6
7
  "lazysizes",
@@ -31,5 +32,6 @@ export const lazyLoading = {
31
32
  snippet: `<img src="/photo.jpg" alt="" loading="lazy" />
32
33
  <iframe src="/embed" loading="lazy"></iframe>`,
33
34
  },
35
+ guides: ["optimize-image-priority"],
34
36
  };
35
37
  //# sourceMappingURL=lazy-loading.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lazy-loading.js","sourceRoot":"","sources":["../../src/rules/lazy-loading.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAS;IAC/B,EAAE,EAAE,cAAc;IAClB,KAAK,EAAE,gCAAgC;IACvC,QAAQ,EAAE;QACR,OAAO;QACP,WAAW;QACX,kBAAkB;QAClB,gBAAgB;QAChB,iCAAiC;QACjC,SAAS;QACT,cAAc;QACd,cAAc;KACf;IACD,UAAU,EAAE,CAAC,cAAc,CAAC;IAC5B,MAAM,EAAE,gBAAgB;IACxB,KAAK,EAAE;QACL,SAAS,EACP,4XAA4X;QAC9X,OAAO,EAAE;iEACoD;QAC7D,MAAM,EACJ,uEAAuE;KAC1E;IACD,KAAK,EAAE;QACL,IAAI,EAAE,gFAAgF;QACtF,MAAM,EAAE;YACN,gJAAgJ;YAChJ,6GAA6G;YAC7G,0IAA0I;YAC1I,4HAA4H;YAC5H,4GAA4G;SAC7G;QACD,OAAO,EAAE;8CACiC;KAC3C;CACF,CAAC"}
1
+ {"version":3,"file":"lazy-loading.js","sourceRoot":"","sources":["../../src/rules/lazy-loading.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAS;IAC/B,EAAE,EAAE,cAAc;IAClB,KAAK,EAAE,gCAAgC;IACvC,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE;QACR,OAAO;QACP,WAAW;QACX,kBAAkB;QAClB,gBAAgB;QAChB,iCAAiC;QACjC,SAAS;QACT,cAAc;QACd,cAAc;KACf;IACD,UAAU,EAAE,CAAC,cAAc,CAAC;IAC5B,MAAM,EAAE,gBAAgB;IACxB,KAAK,EAAE;QACL,SAAS,EACP,4XAA4X;QAC9X,OAAO,EAAE;iEACoD;QAC7D,MAAM,EACJ,uEAAuE;KAC1E;IACD,KAAK,EAAE;QACL,IAAI,EAAE,gFAAgF;QACtF,MAAM,EAAE;YACN,gJAAgJ;YAChJ,6GAA6G;YAC7G,0IAA0I;YAC1I,4HAA4H;YAC5H,4GAA4G;SAC7G;QACD,OAAO,EAAE;8CACiC;KAC3C;IACD,MAAM,EAAE,CAAC,yBAAyB,CAAC;CACpC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"line-clamp.d.ts","sourceRoot":"","sources":["../../src/rules/line-clamp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,SAAS,EAAE,IAuCvB,CAAC"}
1
+ {"version":3,"file":"line-clamp.d.ts","sourceRoot":"","sources":["../../src/rules/line-clamp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,SAAS,EAAE,IAwCvB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export const lineClamp = {
2
2
  id: "line-clamp",
3
3
  title: "Multi-line text truncation",
4
+ category: "typography",
4
5
  replaces: [
5
6
  "react-clamp-lines",
6
7
  "react-line-clamp",
@@ -12,7 +13,7 @@ export const lineClamp = {
12
13
  manualBaseline: {
13
14
  status: "widely",
14
15
  verifiedOn: "2026-09-03",
15
- note: "web-features tracks the unprefixed line-clamp property under the ID 'line-clamp', which has near-zero real-world support. The -webkit- prefixed form this rule actually recommends has been supported in every major engine for years (Firefox since 68, Safari and Chrome far longer), so the automated resolution would misreport a decades-safe technique as limited availability.",
16
+ note: "web-features tracks the unprefixed line-clamp property under the ID 'line-clamp', which has near-zero real-world support. The -webkit- prefixed form this rule actually recommends has been supported in every major engine for years (BCD records it only under a prefixed entry, so there is no unprefixed version to cite here), so the automated resolution would misreport a decades-safe technique as limited availability.",
16
17
  },
17
18
  native: "-webkit-line-clamp",
18
19
  human: {
@@ -1 +1 @@
1
- {"version":3,"file":"line-clamp.js","sourceRoot":"","sources":["../../src/rules/line-clamp.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAS;IAC7B,EAAE,EAAE,YAAY;IAChB,KAAK,EAAE,4BAA4B;IACnC,QAAQ,EAAE;QACR,mBAAmB;QACnB,kBAAkB;QAClB,UAAU;QACV,YAAY;QACZ,WAAW;KACZ;IACD,UAAU,EAAE,EAAE;IACd,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,UAAU,EAAE,YAAY;QACxB,IAAI,EAAE,uXAAuX;KAC9X;IACD,MAAM,EAAE,oBAAoB;IAC5B,KAAK,EAAE;QACL,SAAS,EACP,yVAAyV;QAC3V,OAAO,EAAE;;;;;EAKX;QACE,MAAM,EACJ,qEAAqE;KACxE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,wEAAwE;QAC9E,MAAM,EAAE;YACN,oIAAoI;YACpI,4IAA4I;YAC5I,0NAA0N;SAC3N;QACD,OAAO,EACL,2GAA2G;KAC9G;CACF,CAAC"}
1
+ {"version":3,"file":"line-clamp.js","sourceRoot":"","sources":["../../src/rules/line-clamp.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAS;IAC7B,EAAE,EAAE,YAAY;IAChB,KAAK,EAAE,4BAA4B;IACnC,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE;QACR,mBAAmB;QACnB,kBAAkB;QAClB,UAAU;QACV,YAAY;QACZ,WAAW;KACZ;IACD,UAAU,EAAE,EAAE;IACd,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,UAAU,EAAE,YAAY;QACxB,IAAI,EAAE,maAAma;KAC1a;IACD,MAAM,EAAE,oBAAoB;IAC5B,KAAK,EAAE;QACL,SAAS,EACP,yVAAyV;QAC3V,OAAO,EAAE;;;;;EAKX;QACE,MAAM,EACJ,qEAAqE;KACxE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,wEAAwE;QAC9E,MAAM,EAAE;YACN,oIAAoI;YACpI,4IAA4I;YAC5I,0NAA0N;SAC3N;QACD,OAAO,EACL,2GAA2G;KAC9G;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"masonry.d.ts","sourceRoot":"","sources":["../../src/rules/masonry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,OAAO,EAAE,IA2DrB,CAAC"}
1
+ {"version":3,"file":"masonry.d.ts","sourceRoot":"","sources":["../../src/rules/masonry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,OAAO,EAAE,IA4DrB,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export const masonry = {
2
2
  id: "css-masonry",
3
3
  title: "Masonry layouts",
4
+ category: "layout",
4
5
  replaces: [
5
6
  "react-masonry-css",
6
7
  "masonry-layout",
@@ -1 +1 @@
1
- {"version":3,"file":"masonry.js","sourceRoot":"","sources":["../../src/rules/masonry.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,OAAO,GAAS;IAC3B,EAAE,EAAE,aAAa;IACjB,KAAK,EAAE,iBAAiB;IACxB,QAAQ,EAAE;QACR,mBAAmB;QACnB,gBAAgB;QAChB,yBAAyB;QACzB,OAAO;QACP,qBAAqB;QACrB,aAAa;QACb,iBAAiB;KAClB;IACD,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,MAAM,EAAE,4BAA4B;IACpC,KAAK,EAAE;QACL,SAAS,EACP,wiBAAwiB;QAC1iB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;EAoBX;QACE,MAAM,EACJ,iFAAiF;KACpF;IACD,KAAK,EAAE;QACL,IAAI,EAAE,uFAAuF;QAC7F,MAAM,EAAE;YACN,8LAA8L;YAC9L,6EAA6E;YAC7E,iEAAiE;YACjE,yHAAyH;SAC1H;QACD,OAAO,EAAE;;;;;;;;EAQX;KACC;CACF,CAAC"}
1
+ {"version":3,"file":"masonry.js","sourceRoot":"","sources":["../../src/rules/masonry.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,OAAO,GAAS;IAC3B,EAAE,EAAE,aAAa;IACjB,KAAK,EAAE,iBAAiB;IACxB,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE;QACR,mBAAmB;QACnB,gBAAgB;QAChB,yBAAyB;QACzB,OAAO;QACP,qBAAqB;QACrB,aAAa;QACb,iBAAiB;KAClB;IACD,UAAU,EAAE,CAAC,SAAS,CAAC;IACvB,MAAM,EAAE,4BAA4B;IACpC,KAAK,EAAE;QACL,SAAS,EACP,wiBAAwiB;QAC1iB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;EAoBX;QACE,MAAM,EACJ,iFAAiF;KACpF;IACD,KAAK,EAAE;QACL,IAAI,EAAE,uFAAuF;QAC7F,MAAM,EAAE;YACN,8LAA8L;YAC9L,6EAA6E;YAC7E,iEAAiE;YACjE,yHAAyH;SAC1H;QACD,OAAO,EAAE;;;;;;;;EAQX;KACC;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { Rule } from "../schema.ts";
2
+ export declare const naturalSort: Rule;
3
+ //# sourceMappingURL=natural-sort.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"natural-sort.d.ts","sourceRoot":"","sources":["../../src/rules/natural-sort.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,WAAW,EAAE,IAyCzB,CAAC"}
@@ -0,0 +1,41 @@
1
+ export const naturalSort = {
2
+ id: "natural-sort",
3
+ title: "Natural and locale-aware sorting",
4
+ category: "formatting",
5
+ replaces: [
6
+ "natural-compare",
7
+ "natural-compare-lite",
8
+ "natural-orderby",
9
+ "string-natural-compare",
10
+ ],
11
+ featureIds: ["intl"],
12
+ native: "Intl.Collator with numeric: true",
13
+ human: {
14
+ explainer: 'A plain sort() compares strings code unit by code unit, which puts "item10" before "item9" and files every accented word after z. Intl.Collator with numeric: true reads runs of digits as numbers and orders letters the way the locale expects. Passing collator.compare straight to sort() is also faster than a comparator that re-parses on every call, because the collator is built once.',
15
+ snippet: `const collator = new Intl.Collator("en", {
16
+ numeric: true,
17
+ sensitivity: "base",
18
+ });
19
+
20
+ ["item10", "item9", "Item2"].sort(collator.compare);
21
+ // ["Item2", "item9", "item10"]
22
+
23
+ // Locale rules, not code unit order.
24
+ ["Öl", "Oase", "Zebra"].sort(new Intl.Collator("de").compare);
25
+ // ["Oase", "Öl", "Zebra"]`,
26
+ mdnUrl: "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator",
27
+ },
28
+ agent: {
29
+ when: "sorting strings that contain numbers, or sorting for a human reader",
30
+ unless: [
31
+ "You need byte-identical output to the library's algorithm. Tie-breaking on case, punctuation and leading zeroes differs between implementations, so a snapshot test or a stored sort order will move.",
32
+ "The ordering has to match a server that sorts with a different collation, in which case the two need to agree on one algorithm rather than each picking its own.",
33
+ "You sort very large lists and measured Intl.Collator as too slow for the case. It is usually faster, but only when the collator is created once outside the sort.",
34
+ "You sort identifiers rather than text for people, where a stable code point order is the correct behaviour and locale rules would be wrong.",
35
+ "The package arrived as a direct dependency of your tooling rather than your application code, where removing it changes nothing that ships.",
36
+ ],
37
+ snippet: `const collator = new Intl.Collator(undefined, { numeric: true });
38
+ list.sort(collator.compare);`,
39
+ },
40
+ };
41
+ //# sourceMappingURL=natural-sort.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"natural-sort.js","sourceRoot":"","sources":["../../src/rules/natural-sort.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAS;IAC/B,EAAE,EAAE,cAAc;IAClB,KAAK,EAAE,kCAAkC;IACzC,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE;QACR,iBAAiB;QACjB,sBAAsB;QACtB,iBAAiB;QACjB,wBAAwB;KACzB;IACD,UAAU,EAAE,CAAC,MAAM,CAAC;IACpB,MAAM,EAAE,kCAAkC;IAC1C,KAAK,EAAE;QACL,SAAS,EACP,kYAAkY;QACpY,OAAO,EAAE;;;;;;;;;;2BAUc;QACvB,MAAM,EACJ,gGAAgG;KACnG;IACD,KAAK,EAAE;QACL,IAAI,EAAE,qEAAqE;QAC3E,MAAM,EAAE;YACN,uMAAuM;YACvM,kKAAkK;YAClK,mKAAmK;YACnK,6IAA6I;YAC7I,6IAA6I;SAC9I;QACD,OAAO,EAAE;6BACgB;KAC1B;CACF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"number-format.d.ts","sourceRoot":"","sources":["../../src/rules/number-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,YAAY,EAAE,IA0B1B,CAAC"}
1
+ {"version":3,"file":"number-format.d.ts","sourceRoot":"","sources":["../../src/rules/number-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,YAAY,EAAE,IA4B1B,CAAC"}
@@ -1,6 +1,7 @@
1
1
  export const numberFormat = {
2
2
  id: "number-format",
3
3
  title: "Locale-aware number and currency formatting",
4
+ category: "formatting",
4
5
  replaces: ["numeral", "accounting", "currency.js", "format-number"],
5
6
  featureIds: ["intl"],
6
7
  native: "Intl.NumberFormat",
@@ -13,8 +14,9 @@ export const numberFormat = {
13
14
  mdnUrl: "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat",
14
15
  },
15
16
  agent: {
16
- when: "formatting a number as currency, a percentage, a unit, or a locale-correct thousands-grouped number for display",
17
+ when: "formatting a number as currency, a percentage, or a locale-correct thousands-grouped number for display",
17
18
  unless: [
19
+ 'You format units or compact notation. style: "unit" and notation: "compact" arrived long after the rest of Intl.NumberFormat, in Chrome {{chrome:javascript.builtins.Intl.NumberFormat.NumberFormat.options_parameter.options_unit_parameter}}, Firefox {{firefox:javascript.builtins.Intl.NumberFormat.NumberFormat.options_parameter.options_unit_parameter}} and Safari {{safari:javascript.builtins.Intl.NumberFormat.NumberFormat.options_parameter.options_unit_parameter}}, so an older target does not get them.',
18
20
  "You need safe decimal arithmetic, such as adding money values without floating-point rounding errors. currency.js and accounting.js do that math for you; Intl.NumberFormat only formats a number you already computed correctly.",
19
21
  "You need to parse a formatted string back into a number. Intl.NumberFormat is format-only; these libraries often provide the reverse direction too.",
20
22
  "You need a custom format pattern, such as a specific abbreviation style, that the options Intl.NumberFormat exposes cannot express.",
@@ -1 +1 @@
1
- {"version":3,"file":"number-format.js","sourceRoot":"","sources":["../../src/rules/number-format.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAS;IAChC,EAAE,EAAE,eAAe;IACnB,KAAK,EAAE,6CAA6C;IACpD,QAAQ,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC;IACnE,UAAU,EAAE,CAAC,MAAM,CAAC;IACpB,MAAM,EAAE,mBAAmB;IAC3B,KAAK,EAAE;QACL,SAAS,EACP,wZAAwZ;QAC1Z,OAAO,EAAE;;;kCAGqB;QAC9B,MAAM,EACJ,oGAAoG;KACvG;IACD,KAAK,EAAE;QACL,IAAI,EAAE,iHAAiH;QACvH,MAAM,EAAE;YACN,mOAAmO;YACnO,qJAAqJ;YACrJ,qIAAqI;SACtI;QACD,OAAO,EACL,uFAAuF;KAC1F;CACF,CAAC"}
1
+ {"version":3,"file":"number-format.js","sourceRoot":"","sources":["../../src/rules/number-format.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAS;IAChC,EAAE,EAAE,eAAe;IACnB,KAAK,EAAE,6CAA6C;IACpD,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,CAAC,SAAS,EAAE,YAAY,EAAE,aAAa,EAAE,eAAe,CAAC;IACnE,UAAU,EAAE,CAAC,MAAM,CAAC;IACpB,MAAM,EAAE,mBAAmB;IAC3B,KAAK,EAAE;QACL,SAAS,EACP,wZAAwZ;QAC1Z,OAAO,EAAE;;;kCAGqB;QAC9B,MAAM,EACJ,oGAAoG;KACvG;IACD,KAAK,EAAE;QACL,IAAI,EAAE,yGAAyG;QAC/G,MAAM,EAAE;YACN,0fAA0f;YAC1f,mOAAmO;YACnO,qJAAqJ;YACrJ,qIAAqI;SACtI;QACD,OAAO,EACL,uFAAuF;KAC1F;CACF,CAAC"}