@jomae/catalog 0.6.0 → 0.9.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 +1 -1
- package/dist/generated/baseline-history.js +4 -4
- package/dist/generated/baseline.d.ts.map +1 -1
- package/dist/generated/baseline.js +113 -1
- package/dist/generated/baseline.js.map +1 -1
- package/dist/generated/guides.d.ts.map +1 -1
- package/dist/generated/guides.js +6 -2
- package/dist/generated/guides.js.map +1 -1
- package/dist/generated/lint-rules.d.ts +26 -0
- package/dist/generated/lint-rules.d.ts.map +1 -0
- package/dist/generated/lint-rules.js +361 -0
- package/dist/generated/lint-rules.js.map +1 -0
- package/dist/generated/sizes.d.ts.map +1 -1
- package/dist/generated/sizes.js +128 -13
- package/dist/generated/sizes.js.map +1 -1
- package/dist/generated/support-claims.d.ts.map +1 -1
- package/dist/generated/support-claims.js +7 -1
- package/dist/generated/support-claims.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/lint.d.ts +53 -0
- package/dist/lint.d.ts.map +1 -0
- package/dist/lint.js +41 -0
- package/dist/lint.js.map +1 -0
- package/dist/markdown.d.ts +31 -0
- package/dist/markdown.d.ts.map +1 -0
- package/dist/markdown.js +273 -0
- package/dist/markdown.js.map +1 -0
- package/dist/rules/abort-controller.d.ts.map +1 -1
- package/dist/rules/abort-controller.js +3 -0
- package/dist/rules/abort-controller.js.map +1 -1
- package/dist/rules/accordion.d.ts.map +1 -1
- package/dist/rules/accordion.js +3 -0
- package/dist/rules/accordion.js.map +1 -1
- package/dist/rules/array-grouping.d.ts.map +1 -1
- package/dist/rules/array-grouping.js +1 -0
- package/dist/rules/array-grouping.js.map +1 -1
- package/dist/rules/aspect-ratio.d.ts.map +1 -1
- package/dist/rules/aspect-ratio.js +4 -0
- package/dist/rules/aspect-ratio.js.map +1 -1
- package/dist/rules/base64.d.ts.map +1 -1
- package/dist/rules/base64.js +3 -0
- package/dist/rules/base64.js.map +1 -1
- package/dist/rules/broadcast-channel.d.ts.map +1 -1
- package/dist/rules/broadcast-channel.js +3 -0
- package/dist/rules/broadcast-channel.js.map +1 -1
- package/dist/rules/carousel.d.ts.map +1 -1
- package/dist/rules/carousel.js +5 -0
- package/dist/rules/carousel.js.map +1 -1
- package/dist/rules/clipboard.d.ts.map +1 -1
- package/dist/rules/clipboard.js +3 -0
- package/dist/rules/clipboard.js.map +1 -1
- package/dist/rules/container-queries.d.ts.map +1 -1
- package/dist/rules/container-queries.js +3 -0
- package/dist/rules/container-queries.js.map +1 -1
- package/dist/rules/date-time-input.d.ts.map +1 -1
- package/dist/rules/date-time-input.js +4 -0
- package/dist/rules/date-time-input.js.map +1 -1
- package/dist/rules/dialog.d.ts.map +1 -1
- package/dist/rules/dialog.js +4 -0
- package/dist/rules/dialog.js.map +1 -1
- package/dist/rules/discrete-transitions.d.ts.map +1 -1
- package/dist/rules/discrete-transitions.js +4 -0
- package/dist/rules/discrete-transitions.js.map +1 -1
- package/dist/rules/display-names.d.ts +3 -0
- package/dist/rules/display-names.d.ts.map +1 -0
- package/dist/rules/display-names.js +33 -0
- package/dist/rules/display-names.js.map +1 -0
- package/dist/rules/duration-format.d.ts.map +1 -1
- package/dist/rules/duration-format.js +3 -0
- package/dist/rules/duration-format.js.map +1 -1
- package/dist/rules/event-target.d.ts.map +1 -1
- package/dist/rules/event-target.js +1 -0
- package/dist/rules/event-target.js.map +1 -1
- package/dist/rules/focus-visible.d.ts.map +1 -1
- package/dist/rules/focus-visible.js +4 -0
- package/dist/rules/focus-visible.js.map +1 -1
- package/dist/rules/fullscreen.d.ts.map +1 -1
- package/dist/rules/fullscreen.js +3 -0
- package/dist/rules/fullscreen.js.map +1 -1
- package/dist/rules/height-animation.d.ts.map +1 -1
- package/dist/rules/height-animation.js +5 -1
- package/dist/rules/height-animation.js.map +1 -1
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/index.js +16 -0
- package/dist/rules/index.js.map +1 -1
- package/dist/rules/inert.d.ts.map +1 -1
- package/dist/rules/inert.js +4 -0
- package/dist/rules/inert.js.map +1 -1
- package/dist/rules/intersection-observer.d.ts.map +1 -1
- package/dist/rules/intersection-observer.js +1 -0
- package/dist/rules/intersection-observer.js.map +1 -1
- package/dist/rules/lazy-loading.d.ts.map +1 -1
- package/dist/rules/lazy-loading.js +4 -0
- package/dist/rules/lazy-loading.js.map +1 -1
- package/dist/rules/line-clamp.d.ts.map +1 -1
- package/dist/rules/line-clamp.js +4 -0
- package/dist/rules/line-clamp.js.map +1 -1
- package/dist/rules/list-format.d.ts +3 -0
- package/dist/rules/list-format.d.ts.map +1 -0
- package/dist/rules/list-format.js +37 -0
- package/dist/rules/list-format.js.map +1 -0
- package/dist/rules/masonry.d.ts.map +1 -1
- package/dist/rules/masonry.js +4 -0
- package/dist/rules/masonry.js.map +1 -1
- package/dist/rules/natural-sort.d.ts.map +1 -1
- package/dist/rules/natural-sort.js +4 -0
- package/dist/rules/natural-sort.js.map +1 -1
- package/dist/rules/number-format.d.ts.map +1 -1
- package/dist/rules/number-format.js +4 -0
- package/dist/rules/number-format.js.map +1 -1
- package/dist/rules/page-visibility.d.ts.map +1 -1
- package/dist/rules/page-visibility.js +3 -0
- package/dist/rules/page-visibility.js.map +1 -1
- package/dist/rules/popover.d.ts.map +1 -1
- package/dist/rules/popover.js +5 -0
- package/dist/rules/popover.js.map +1 -1
- package/dist/rules/random-uuid.d.ts.map +1 -1
- package/dist/rules/random-uuid.js +4 -0
- package/dist/rules/random-uuid.js.map +1 -1
- package/dist/rules/relative-time.d.ts.map +1 -1
- package/dist/rules/relative-time.js +4 -0
- package/dist/rules/relative-time.js.map +1 -1
- package/dist/rules/resizable-panels.d.ts.map +1 -1
- package/dist/rules/resizable-panels.js +3 -0
- package/dist/rules/resizable-panels.js.map +1 -1
- package/dist/rules/resize-observer.d.ts.map +1 -1
- package/dist/rules/resize-observer.js +4 -0
- package/dist/rules/resize-observer.js.map +1 -1
- package/dist/rules/scroll-animations.d.ts.map +1 -1
- package/dist/rules/scroll-animations.js +4 -0
- package/dist/rules/scroll-animations.js.map +1 -1
- package/dist/rules/scroll-lock.d.ts.map +1 -1
- package/dist/rules/scroll-lock.js +3 -0
- package/dist/rules/scroll-lock.js.map +1 -1
- package/dist/rules/scrollbars.d.ts.map +1 -1
- package/dist/rules/scrollbars.js +3 -0
- package/dist/rules/scrollbars.js.map +1 -1
- package/dist/rules/segmenter.d.ts +3 -0
- package/dist/rules/segmenter.d.ts.map +1 -0
- package/dist/rules/segmenter.js +41 -0
- package/dist/rules/segmenter.js.map +1 -0
- package/dist/rules/select.d.ts.map +1 -1
- package/dist/rules/select.js +3 -0
- package/dist/rules/select.js.map +1 -1
- package/dist/rules/signal-timeout.d.ts +3 -0
- package/dist/rules/signal-timeout.d.ts.map +1 -0
- package/dist/rules/signal-timeout.js +31 -0
- package/dist/rules/signal-timeout.js.map +1 -0
- package/dist/rules/smooth-scroll.d.ts.map +1 -1
- package/dist/rules/smooth-scroll.js +4 -0
- package/dist/rules/smooth-scroll.js.map +1 -1
- package/dist/rules/sticky.d.ts.map +1 -1
- package/dist/rules/sticky.js +4 -0
- package/dist/rules/sticky.js.map +1 -1
- package/dist/rules/structured-clone.d.ts.map +1 -1
- package/dist/rules/structured-clone.js +1 -0
- package/dist/rules/structured-clone.js.map +1 -1
- package/dist/rules/text-wrap-balance.d.ts.map +1 -1
- package/dist/rules/text-wrap-balance.js +3 -0
- package/dist/rules/text-wrap-balance.js.map +1 -1
- package/dist/rules/url-pattern.d.ts +3 -0
- package/dist/rules/url-pattern.d.ts.map +1 -0
- package/dist/rules/url-pattern.js +36 -0
- package/dist/rules/url-pattern.js.map +1 -0
- package/dist/rules/url-search-params.d.ts.map +1 -1
- package/dist/rules/url-search-params.js +1 -0
- package/dist/rules/url-search-params.js.map +1 -1
- package/dist/rules/web-animations.d.ts +3 -0
- package/dist/rules/web-animations.d.ts.map +1 -0
- package/dist/rules/web-animations.js +40 -0
- package/dist/rules/web-animations.js.map +1 -0
- package/dist/rules/web-locks.d.ts +3 -0
- package/dist/rules/web-locks.d.ts.map +1 -0
- package/dist/rules/web-locks.js +35 -0
- package/dist/rules/web-locks.js.map +1 -0
- package/dist/rules/web-share.d.ts.map +1 -1
- package/dist/rules/web-share.js +3 -0
- package/dist/rules/web-share.js.map +1 -1
- package/dist/rules/with-resolvers.d.ts +3 -0
- package/dist/rules/with-resolvers.d.ts.map +1 -0
- package/dist/rules/with-resolvers.js +30 -0
- package/dist/rules/with-resolvers.js.map +1 -0
- package/dist/schema.d.ts +4 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +34 -0
- package/dist/schema.js.map +1 -1
- package/dist/search.d.ts +29 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +84 -0
- package/dist/search.js.map +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"abort-controller.js","sourceRoot":"","sources":["../../src/rules/abort-controller.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAS;IACnC,EAAE,EAAE,kBAAkB;IACtB,KAAK,EAAE,uBAAuB;IAC9B,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,CAAC,cAAc,EAAE,oBAAoB,EAAE,0BAA0B,CAAC;IAC5E,UAAU,EAAE,CAAC,UAAU,CAAC;IACxB,MAAM,EAAE,iCAAiC;IACzC,KAAK,EAAE;QACL,SAAS,EACP,6TAA6T;QAC/T,OAAO,EAAE;;;oBAGO;QAChB,MAAM,EAAE,kEAAkE;KAC3E;IACD,KAAK,EAAE;QACL,IAAI,EAAE,qEAAqE;QAC3E,MAAM,EAAE;YACN,iNAAiN;YACjN,8IAA8I;SAC/I;QACD,OAAO,EAAE;2CAC8B;
|
|
1
|
+
{"version":3,"file":"abort-controller.js","sourceRoot":"","sources":["../../src/rules/abort-controller.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,eAAe,GAAS;IACnC,EAAE,EAAE,kBAAkB;IACtB,KAAK,EAAE,uBAAuB;IAC9B,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,CAAC,cAAc,EAAE,oBAAoB,EAAE,0BAA0B,CAAC;IAC5E,UAAU,EAAE,CAAC,UAAU,CAAC;IACxB,MAAM,EAAE,iCAAiC;IACzC,KAAK,EAAE;QACL,SAAS,EACP,6TAA6T;QAC/T,OAAO,EAAE;;;oBAGO;QAChB,MAAM,EAAE,kEAAkE;KAC3E;IACD,KAAK,EAAE;QACL,IAAI,EAAE,qEAAqE;QAC3E,MAAM,EAAE;YACN,iNAAiN;YACjN,8IAA8I;SAC/I;QACD,OAAO,EAAE;2CAC8B;QACvC,UAAU,EAAE;YACV,uGAAuG;SACxG;KACF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../src/rules/accordion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"accordion.d.ts","sourceRoot":"","sources":["../../src/rules/accordion.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,SAAS,EAAE,IAyDvB,CAAC"}
|
package/dist/rules/accordion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../src/rules/accordion.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAS;IAC7B,EAAE,EAAE,qBAAqB;IACzB,KAAK,EAAE,YAAY;IACnB,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE,CAAC,4BAA4B,EAAE,mBAAmB,EAAE,cAAc,CAAC;IAC7E,UAAU,EAAE,CAAC,cAAc,CAAC;IAC5B,MAAM,EAAE,2CAA2C;IACnD,KAAK,EAAE;QACL,SAAS,EACP,2WAA2W;QAC7W,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;SAqBJ;QACL,MAAM,EACJ,wEAAwE;KAC3E;IACD,KAAK,EAAE;QACL,IAAI,EAAE,8EAA8E;QACpF,MAAM,EAAE;YACN,2OAA2O;YAC3O,iHAAiH;YACjH,+LAA+L;YAC/L,mIAAmI;YACnI,kHAAkH;SACnH;QACD,OAAO,EAAE;;;;;;;WAOF;
|
|
1
|
+
{"version":3,"file":"accordion.js","sourceRoot":"","sources":["../../src/rules/accordion.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAS;IAC7B,EAAE,EAAE,qBAAqB;IACzB,KAAK,EAAE,YAAY;IACnB,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE,CAAC,4BAA4B,EAAE,mBAAmB,EAAE,cAAc,CAAC;IAC7E,UAAU,EAAE,CAAC,cAAc,CAAC;IAC5B,MAAM,EAAE,2CAA2C;IACnD,KAAK,EAAE;QACL,SAAS,EACP,2WAA2W;QAC7W,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;SAqBJ;QACL,MAAM,EACJ,wEAAwE;KAC3E;IACD,KAAK,EAAE;QACL,IAAI,EAAE,8EAA8E;QACpF,MAAM,EAAE;YACN,2OAA2O;YAC3O,iHAAiH;YACjH,+LAA+L;YAC/L,mIAAmI;YACnI,kHAAkH;SACnH;QACD,OAAO,EAAE;;;;;;;WAOF;QACP,UAAU,EAAE;YACV,yFAAyF;SAC1F;KACF;IACD,MAAM,EAAE,CAAC,uBAAuB,CAAC;CAClC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-grouping.d.ts","sourceRoot":"","sources":["../../src/rules/array-grouping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"array-grouping.d.ts","sourceRoot":"","sources":["../../src/rules/array-grouping.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,aAAa,EAAE,IA8B3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array-grouping.js","sourceRoot":"","sources":["../../src/rules/array-grouping.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAS;IACjC,EAAE,EAAE,gBAAgB;IACpB,KAAK,EAAE,wBAAwB;IAC/B,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,CAAC,gBAAgB,EAAE,eAAe,EAAE,aAAa,CAAC;IAC5D,UAAU,EAAE,CAAC,aAAa,CAAC;IAC3B,MAAM,EAAE,oCAAoC;IAC5C,KAAK,EAAE;QACL,SAAS,EACP,uYAAuY;QACzY,OAAO,EAAE;;;;mEAIsD;QAC/D,MAAM,EACJ,iGAAiG;KACpG;IACD,KAAK,EAAE;QACL,IAAI,EAAE,iEAAiE;QACvE,MAAM,EAAE;YACN,0JAA0J;YAC1J,oJAAoJ;YACpJ,4LAA4L;YAC5L,+IAA+I;YAC/I,4GAA4G;SAC7G;QACD,OAAO,EAAE,gEAAgE;KAC1E;
|
|
1
|
+
{"version":3,"file":"array-grouping.js","sourceRoot":"","sources":["../../src/rules/array-grouping.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAS;IACjC,EAAE,EAAE,gBAAgB;IACpB,KAAK,EAAE,wBAAwB;IAC/B,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,CAAC,gBAAgB,EAAE,eAAe,EAAE,aAAa,CAAC;IAC5D,UAAU,EAAE,CAAC,aAAa,CAAC;IAC3B,MAAM,EAAE,oCAAoC;IAC5C,KAAK,EAAE;QACL,SAAS,EACP,uYAAuY;QACzY,OAAO,EAAE;;;;mEAIsD;QAC/D,MAAM,EACJ,iGAAiG;KACpG;IACD,KAAK,EAAE;QACL,IAAI,EAAE,iEAAiE;QACvE,MAAM,EAAE;YACN,0JAA0J;YAC1J,oJAAoJ;YACpJ,4LAA4L;YAC5L,+IAA+I;YAC/I,4GAA4G;SAC7G;QACD,OAAO,EAAE,gEAAgE;KAC1E;IACD,QAAQ,EAAE,yBAAyB;CACpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aspect-ratio.d.ts","sourceRoot":"","sources":["../../src/rules/aspect-ratio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"aspect-ratio.d.ts","sourceRoot":"","sources":["../../src/rules/aspect-ratio.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,WAAW,EAAE,IAsCzB,CAAC"}
|
|
@@ -30,6 +30,10 @@ export const aspectRatio = {
|
|
|
30
30
|
],
|
|
31
31
|
snippet: `.video { aspect-ratio: 16 / 9; width: 100%; }
|
|
32
32
|
.thumb { aspect-ratio: 1; object-fit: cover; }`,
|
|
33
|
+
handRolled: [
|
|
34
|
+
"a padding-bottom percentage on a wrapper with the real content positioned absolutely inside it",
|
|
35
|
+
"reading offsetWidth and setting height from it to keep a box in proportion",
|
|
36
|
+
],
|
|
33
37
|
},
|
|
34
38
|
};
|
|
35
39
|
//# sourceMappingURL=aspect-ratio.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"aspect-ratio.js","sourceRoot":"","sources":["../../src/rules/aspect-ratio.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAS;IAC/B,EAAE,EAAE,cAAc;IAClB,KAAK,EAAE,qBAAqB;IAC5B,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,CAAC,oBAAoB,CAAC;IAChC,UAAU,EAAE,CAAC,cAAc,CAAC;IAC5B,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE;QACL,SAAS,EACP,0SAA0S;QAC5S,OAAO,EAAE;;;;;;;;;;;EAWX;QACE,MAAM,EAAE,+DAA+D;KACxE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,oFAAoF;QAC1F,MAAM,EAAE;YACN,0FAA0F;YAC1F,8JAA8J;YAC9J,mEAAmE;SACpE;QACD,OAAO,EAAE;+CACkC;
|
|
1
|
+
{"version":3,"file":"aspect-ratio.js","sourceRoot":"","sources":["../../src/rules/aspect-ratio.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAS;IAC/B,EAAE,EAAE,cAAc;IAClB,KAAK,EAAE,qBAAqB;IAC5B,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE,CAAC,oBAAoB,CAAC;IAChC,UAAU,EAAE,CAAC,cAAc,CAAC;IAC5B,MAAM,EAAE,cAAc;IACtB,KAAK,EAAE;QACL,SAAS,EACP,0SAA0S;QAC5S,OAAO,EAAE;;;;;;;;;;;EAWX;QACE,MAAM,EAAE,+DAA+D;KACxE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,oFAAoF;QAC1F,MAAM,EAAE;YACN,0FAA0F;YAC1F,8JAA8J;YAC9J,mEAAmE;SACpE;QACD,OAAO,EAAE;+CACkC;QAC3C,UAAU,EAAE;YACV,gGAAgG;YAChG,4EAA4E;SAC7E;KACF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../src/rules/base64.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"base64.d.ts","sourceRoot":"","sources":["../../src/rules/base64.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,MAAM,EAAE,IA2CpB,CAAC"}
|
package/dist/rules/base64.js
CHANGED
|
@@ -36,6 +36,9 @@ const encoded = btoa(String.fromCharCode(...bytes));
|
|
|
36
36
|
const decoded = new TextDecoder().decode(
|
|
37
37
|
Uint8Array.from(atob(encoded), (c) => c.charCodeAt(0)),
|
|
38
38
|
);`,
|
|
39
|
+
handRolled: [
|
|
40
|
+
"btoa wrapped in unescape and encodeURIComponent to survive characters outside Latin-1",
|
|
41
|
+
],
|
|
39
42
|
},
|
|
40
43
|
};
|
|
41
44
|
//# sourceMappingURL=base64.js.map
|
package/dist/rules/base64.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base64.js","sourceRoot":"","sources":["../../src/rules/base64.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAS;IAC1B,EAAE,EAAE,QAAQ;IACZ,KAAK,EAAE,iBAAiB;IACxB,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,MAAM,CAAC;IAC1C,UAAU,EAAE,CAAC,oBAAoB,EAAE,eAAe,CAAC;IACnD,MAAM,EAAE,8CAA8C;IACtD,KAAK,EAAE;QACL,SAAS,EACP,6VAA6V;QAC/V,OAAO,EAAE;;;;;;;;;;;;yCAY4B;QACrC,MAAM,EAAE,0DAA0D;KACnE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,4CAA4C;QAClD,MAAM,EAAE;YACN,qNAAqN;YACrN,mJAAmJ;YACnJ,4IAA4I;YAC5I,+GAA+G;YAC/G,qGAAqG;SACtG;QACD,OAAO,EAAE;;;;GAIV;
|
|
1
|
+
{"version":3,"file":"base64.js","sourceRoot":"","sources":["../../src/rules/base64.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAS;IAC1B,EAAE,EAAE,QAAQ;IACZ,KAAK,EAAE,iBAAiB;IACxB,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,CAAC,WAAW,EAAE,SAAS,EAAE,MAAM,CAAC;IAC1C,UAAU,EAAE,CAAC,oBAAoB,EAAE,eAAe,CAAC;IACnD,MAAM,EAAE,8CAA8C;IACtD,KAAK,EAAE;QACL,SAAS,EACP,6VAA6V;QAC/V,OAAO,EAAE;;;;;;;;;;;;yCAY4B;QACrC,MAAM,EAAE,0DAA0D;KACnE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,4CAA4C;QAClD,MAAM,EAAE;YACN,qNAAqN;YACrN,mJAAmJ;YACnJ,4IAA4I;YAC5I,+GAA+G;YAC/G,qGAAqG;SACtG;QACD,OAAO,EAAE;;;;GAIV;QACC,UAAU,EAAE;YACV,uFAAuF;SACxF;KACF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broadcast-channel.d.ts","sourceRoot":"","sources":["../../src/rules/broadcast-channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"broadcast-channel.d.ts","sourceRoot":"","sources":["../../src/rules/broadcast-channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,gBAAgB,EAAE,IA4B9B,CAAC"}
|
|
@@ -21,6 +21,9 @@ channel.onmessage = (event) => console.log(event.data);`,
|
|
|
21
21
|
],
|
|
22
22
|
snippet: `const channel = new BroadcastChannel("cart-updates");
|
|
23
23
|
channel.postMessage({ itemCount: 3 });`,
|
|
24
|
+
handRolled: [
|
|
25
|
+
"writing to localStorage only so other tabs receive the storage event, then deleting the key",
|
|
26
|
+
],
|
|
24
27
|
},
|
|
25
28
|
};
|
|
26
29
|
//# sourceMappingURL=broadcast-channel.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"broadcast-channel.js","sourceRoot":"","sources":["../../src/rules/broadcast-channel.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAS;IACpC,EAAE,EAAE,mBAAmB;IACvB,KAAK,EAAE,qBAAqB;IAC5B,QAAQ,EAAE,aAAa;IACvB,QAAQ,EAAE,CAAC,mBAAmB,CAAC;IAC/B,UAAU,EAAE,CAAC,mBAAmB,CAAC;IACjC,MAAM,EAAE,kBAAkB;IAC1B,KAAK,EAAE;QACL,SAAS,EACP,oTAAoT;QACtT,OAAO,EAAE;;wDAE2C;QACpD,MAAM,EAAE,mEAAmE;KAC5E;IACD,KAAK,EAAE;QACL,IAAI,EAAE,oEAAoE;QAC1E,MAAM,EAAE;YACN,wIAAwI;YACxI,0GAA0G;YAC1G,0HAA0H;SAC3H;QACD,OAAO,EAAE;uCAC0B;
|
|
1
|
+
{"version":3,"file":"broadcast-channel.js","sourceRoot":"","sources":["../../src/rules/broadcast-channel.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAS;IACpC,EAAE,EAAE,mBAAmB;IACvB,KAAK,EAAE,qBAAqB;IAC5B,QAAQ,EAAE,aAAa;IACvB,QAAQ,EAAE,CAAC,mBAAmB,CAAC;IAC/B,UAAU,EAAE,CAAC,mBAAmB,CAAC;IACjC,MAAM,EAAE,kBAAkB;IAC1B,KAAK,EAAE;QACL,SAAS,EACP,oTAAoT;QACtT,OAAO,EAAE;;wDAE2C;QACpD,MAAM,EAAE,mEAAmE;KAC5E;IACD,KAAK,EAAE;QACL,IAAI,EAAE,oEAAoE;QAC1E,MAAM,EAAE;YACN,wIAAwI;YACxI,0GAA0G;YAC1G,0HAA0H;SAC3H;QACD,OAAO,EAAE;uCAC0B;QACnC,UAAU,EAAE;YACV,6FAA6F;SAC9F;KACF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../src/rules/carousel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"carousel.d.ts","sourceRoot":"","sources":["../../src/rules/carousel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,QAAQ,EAAE,IA6FtB,CAAC"}
|
package/dist/rules/carousel.js
CHANGED
|
@@ -78,6 +78,11 @@ export const carousel = {
|
|
|
78
78
|
.carousel::scroll-button(inline-end) { content: "\\2192"; }
|
|
79
79
|
.carousel > *::scroll-marker { content: ""; }
|
|
80
80
|
.carousel > *::scroll-marker:target-current { opacity: 1; }`,
|
|
81
|
+
handRolled: [
|
|
82
|
+
"a scroll listener on a horizontal strip dividing scrollLeft by item width to work out the active index",
|
|
83
|
+
"prev and next buttons calling scrollBy, each with its own disabled state recomputed on every scroll",
|
|
84
|
+
"rendering dots from the item count and toggling an active class on whichever one is current",
|
|
85
|
+
],
|
|
81
86
|
},
|
|
82
87
|
guides: [
|
|
83
88
|
"carousel-snap-highlights",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"carousel.js","sourceRoot":"","sources":["../../src/rules/carousel.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,QAAQ,GAAS;IAC5B,EAAE,EAAE,yBAAyB;IAC7B,KAAK,EAAE,WAAW;IAClB,QAAQ,EAAE,WAAW;IACrB,QAAQ,EAAE;QACR,QAAQ;QACR,gBAAgB;QAChB,sBAAsB;QACtB,aAAa;QACb,gBAAgB;QAChB,aAAa;QACb,UAAU;QACV,eAAe;QACf,oBAAoB;QACpB,oBAAoB;KACrB;IACD,UAAU,EAAE,CAAC,aAAa,EAAE,gBAAgB,EAAE,gBAAgB,CAAC;IAC/D,MAAM,EAAE,8DAA8D;IACtE,KAAK,EAAE;QACL,SAAS,E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AAwB;QACxB,+BAA+B;KAChC;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../src/rules/clipboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"clipboard.d.ts","sourceRoot":"","sources":["../../src/rules/clipboard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,SAAS,EAAE,IAsCvB,CAAC"}
|
package/dist/rules/clipboard.js
CHANGED
|
@@ -30,6 +30,9 @@ export const clipboard = {
|
|
|
30
30
|
"You're running without focus or without a secure origin (HTTPS). The API rejects in both cases, so you still need a fallback path for that error.",
|
|
31
31
|
],
|
|
32
32
|
snippet: "await navigator.clipboard.writeText(text);",
|
|
33
|
+
handRolled: [
|
|
34
|
+
"an off-screen textarea or contenteditable element created only so text can be selected and execCommand'd",
|
|
35
|
+
],
|
|
33
36
|
},
|
|
34
37
|
};
|
|
35
38
|
//# sourceMappingURL=clipboard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../src/rules/clipboard.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAS;IAC7B,EAAE,EAAE,WAAW;IACf,KAAK,EAAE,gBAAgB;IACvB,QAAQ,EAAE,aAAa;IACvB,QAAQ,EAAE;QACR,mBAAmB;QACnB,gBAAgB;QAChB,cAAc;QACd,yBAAyB;QACzB,gBAAgB;QAChB,gBAAgB;QAChB,eAAe;QACf,oBAAoB;KACrB;IACD,UAAU,EAAE,CAAC,iBAAiB,CAAC;IAC/B,MAAM,EAAE,iCAAiC;IACzC,KAAK,EAAE;QACL,SAAS,EACP,+QAA+Q;QACjR,OAAO,EAAE;;EAEX;QACE,MAAM,EACJ,sEAAsE;KACzE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,wEAAwE;QAC9E,MAAM,EAAE;YACN,gKAAgK;YAChK,mLAAmL;YACnL,8JAA8J;YAC9J,mJAAmJ;SACpJ;QACD,OAAO,EAAE,4CAA4C;
|
|
1
|
+
{"version":3,"file":"clipboard.js","sourceRoot":"","sources":["../../src/rules/clipboard.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,SAAS,GAAS;IAC7B,EAAE,EAAE,WAAW;IACf,KAAK,EAAE,gBAAgB;IACvB,QAAQ,EAAE,aAAa;IACvB,QAAQ,EAAE;QACR,mBAAmB;QACnB,gBAAgB;QAChB,cAAc;QACd,yBAAyB;QACzB,gBAAgB;QAChB,gBAAgB;QAChB,eAAe;QACf,oBAAoB;KACrB;IACD,UAAU,EAAE,CAAC,iBAAiB,CAAC;IAC/B,MAAM,EAAE,iCAAiC;IACzC,KAAK,EAAE;QACL,SAAS,EACP,+QAA+Q;QACjR,OAAO,EAAE;;EAEX;QACE,MAAM,EACJ,sEAAsE;KACzE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,wEAAwE;QAC9E,MAAM,EAAE;YACN,gKAAgK;YAChK,mLAAmL;YACnL,8JAA8J;YAC9J,mJAAmJ;SACpJ;QACD,OAAO,EAAE,4CAA4C;QACrD,UAAU,EAAE;YACV,0GAA0G;SAC3G;KACF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-queries.d.ts","sourceRoot":"","sources":["../../src/rules/container-queries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,gBAAgB,EAAE,
|
|
1
|
+
{"version":3,"file":"container-queries.d.ts","sourceRoot":"","sources":["../../src/rules/container-queries.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,gBAAgB,EAAE,IA4D9B,CAAC"}
|
|
@@ -51,6 +51,9 @@ export const containerQueries = {
|
|
|
51
51
|
@container card (width >= 400px) {
|
|
52
52
|
.card { grid-template-columns: 8rem 1fr; }
|
|
53
53
|
}`,
|
|
54
|
+
handRolled: [
|
|
55
|
+
"a ResizeObserver toggling size classes on an element so it can style itself by its own width",
|
|
56
|
+
],
|
|
54
57
|
},
|
|
55
58
|
guides: ["size-aware-styling"],
|
|
56
59
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"container-queries.js","sourceRoot":"","sources":["../../src/rules/container-queries.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAS;IACpC,EAAE,EAAE,mBAAmB;IACvB,KAAK,EAAE,sBAAsB;IAC7B,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE;QACR,uBAAuB;QACvB,mBAAmB;QACnB,cAAc;QACd,uBAAuB;QACvB,yBAAyB;QACzB,YAAY;KACb;IACD,UAAU,EAAE,CAAC,mBAAmB,CAAC;IACjC,MAAM,EAAE,mBAAmB;IAC3B,KAAK,EAAE;QACL,SAAS,EACP,6YAA6Y;QAC/Y,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;EAsBX;QACE,MAAM,EACJ,oFAAoF;KACvF;IACD,KAAK,EAAE;QACL,IAAI,EAAE,oFAAoF;QAC1F,MAAM,EAAE;YACN,qIAAqI;YACrI,yKAAyK;YACzK,4HAA4H;YAC5H,mIAAmI;SACpI;QACD,OAAO,EAAE;;;EAGX;
|
|
1
|
+
{"version":3,"file":"container-queries.js","sourceRoot":"","sources":["../../src/rules/container-queries.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,gBAAgB,GAAS;IACpC,EAAE,EAAE,mBAAmB;IACvB,KAAK,EAAE,sBAAsB;IAC7B,QAAQ,EAAE,QAAQ;IAClB,QAAQ,EAAE;QACR,uBAAuB;QACvB,mBAAmB;QACnB,cAAc;QACd,uBAAuB;QACvB,yBAAyB;QACzB,YAAY;KACb;IACD,UAAU,EAAE,CAAC,mBAAmB,CAAC;IACjC,MAAM,EAAE,mBAAmB;IAC3B,KAAK,EAAE;QACL,SAAS,EACP,6YAA6Y;QAC/Y,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;EAsBX;QACE,MAAM,EACJ,oFAAoF;KACvF;IACD,KAAK,EAAE;QACL,IAAI,EAAE,oFAAoF;QAC1F,MAAM,EAAE;YACN,qIAAqI;YACrI,yKAAyK;YACzK,4HAA4H;YAC5H,mIAAmI;SACpI;QACD,OAAO,EAAE;;;EAGX;QACE,UAAU,EAAE;YACV,8FAA8F;SAC/F;KACF;IACD,MAAM,EAAE,CAAC,oBAAoB,CAAC;CAC/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-time-input.d.ts","sourceRoot":"","sources":["../../src/rules/date-time-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"date-time-input.d.ts","sourceRoot":"","sources":["../../src/rules/date-time-input.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,aAAa,EAAE,IAuC3B,CAAC"}
|
|
@@ -30,6 +30,10 @@ export const dateTimeInput = {
|
|
|
30
30
|
'You need type="week" or type="month". Their browser support has not caught up to type="date" and type="time".',
|
|
31
31
|
],
|
|
32
32
|
snippet: `<input type="date" min="2024-01-01" required>`,
|
|
33
|
+
handRolled: [
|
|
34
|
+
"building a month grid from Date arithmetic, with the leading blanks worked out from getDay",
|
|
35
|
+
"a text input with a placeholder like dd/mm/yyyy and a hand-written parser checking what was typed",
|
|
36
|
+
],
|
|
33
37
|
},
|
|
34
38
|
};
|
|
35
39
|
//# sourceMappingURL=date-time-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-time-input.js","sourceRoot":"","sources":["../../src/rules/date-time-input.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAS;IACjC,EAAE,EAAE,iBAAiB;IACrB,KAAK,EAAE,uBAAuB;IAC9B,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE;QACR,kBAAkB;QAClB,WAAW;QACX,iBAAiB;QACjB,kBAAkB;QAClB,qBAAqB;QACrB,iBAAiB;KAClB;IACD,UAAU,EAAE,CAAC,iBAAiB,CAAC;IAC/B,MAAM,EAAE,6CAA6C;IACrD,KAAK,EAAE;QACL,SAAS,EACP,8YAA8Y;QAChZ,OAAO,EAAE;;;SAGJ;QACL,MAAM,EACJ,iFAAiF;KACpF;IACD,KAAK,EAAE;QACL,IAAI,EAAE,oDAAoD;QAC1D,MAAM,EAAE;YACN,+LAA+L;YAC/L,4GAA4G;YAC5G,iIAAiI;YACjI,6HAA6H;YAC7H,+GAA+G;SAChH;QACD,OAAO,EAAE,+CAA+C;
|
|
1
|
+
{"version":3,"file":"date-time-input.js","sourceRoot":"","sources":["../../src/rules/date-time-input.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,aAAa,GAAS;IACjC,EAAE,EAAE,iBAAiB;IACrB,KAAK,EAAE,uBAAuB;IAC9B,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE;QACR,kBAAkB;QAClB,WAAW;QACX,iBAAiB;QACjB,kBAAkB;QAClB,qBAAqB;QACrB,iBAAiB;KAClB;IACD,UAAU,EAAE,CAAC,iBAAiB,CAAC;IAC/B,MAAM,EAAE,6CAA6C;IACrD,KAAK,EAAE;QACL,SAAS,EACP,8YAA8Y;QAChZ,OAAO,EAAE;;;SAGJ;QACL,MAAM,EACJ,iFAAiF;KACpF;IACD,KAAK,EAAE;QACL,IAAI,EAAE,oDAAoD;QAC1D,MAAM,EAAE;YACN,+LAA+L;YAC/L,4GAA4G;YAC5G,iIAAiI;YACjI,6HAA6H;YAC7H,+GAA+G;SAChH;QACD,OAAO,EAAE,+CAA+C;QACxD,UAAU,EAAE;YACV,4FAA4F;YAC5F,mGAAmG;SACpG;KACF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/rules/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"dialog.d.ts","sourceRoot":"","sources":["../../src/rules/dialog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,MAAM,EAAE,IAmEpB,CAAC"}
|
package/dist/rules/dialog.js
CHANGED
|
@@ -52,6 +52,10 @@ export const dialog = {
|
|
|
52
52
|
</dialog>
|
|
53
53
|
<script>document.querySelector("#d").showModal();</script>
|
|
54
54
|
<style>dialog::backdrop { background: rgb(0 0 0 / 0.5); }</style>`,
|
|
55
|
+
handRolled: [
|
|
56
|
+
"a div with role=dialog and aria-modal, placed with position fixed and a z-index over the page",
|
|
57
|
+
"a document keydown listener added when an overlay opens and removed when it closes, only to catch Escape",
|
|
58
|
+
],
|
|
55
59
|
},
|
|
56
60
|
guides: [
|
|
57
61
|
"light-dismiss-a-dialog",
|
package/dist/rules/dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialog.js","sourceRoot":"","sources":["../../src/rules/dialog.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,MAAM,GAAS;IAC1B,EAAE,EAAE,gBAAgB;IACpB,KAAK,EAAE,eAAe;IACtB,QAAQ,EAAE,OAAO;IACjB,QAAQ,EAAE;QACR,aAAa;QACb,wBAAwB;QACxB,kBAAkB;QAClB,eAAe;QACf,YAAY;QACZ,aAAa;QACb,cAAc;QACd,iB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C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discrete-transitions.d.ts","sourceRoot":"","sources":["../../src/rules/discrete-transitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,mBAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"discrete-transitions.d.ts","sourceRoot":"","sources":["../../src/rules/discrete-transitions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,mBAAmB,EAAE,IAmEjC,CAAC"}
|
|
@@ -54,6 +54,10 @@ export const discreteTransitions = {
|
|
|
54
54
|
}
|
|
55
55
|
@starting-style { .el { opacity: 0; } }
|
|
56
56
|
.el[hidden] { display: none; opacity: 0; }`,
|
|
57
|
+
handRolled: [
|
|
58
|
+
"a setTimeout matching the CSS duration, so an element stays mounted long enough to animate out",
|
|
59
|
+
"an isClosing or isLeaving flag held only to keep something rendered while its exit animation runs",
|
|
60
|
+
],
|
|
57
61
|
},
|
|
58
62
|
guides: [
|
|
59
63
|
"animate-element-entry-exit",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discrete-transitions.js","sourceRoot":"","sources":["../../src/rules/discrete-transitions.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAS;IACvC,EAAE,EAAE,sBAAsB;IAC1B,KAAK,EAAE,4BAA4B;IACnC,QAAQ,EAAE,WAAW;IACrB,QAAQ,EAAE;QACR,eAAe;QACf,QAAQ;QACR,wBAAwB;QACxB,cAAc;KACf;IACD,UAAU,EAAE,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;IACrD,MAAM,EAAE,0DAA0D;IAClE,KAAK,EAAE;QACL,SAAS,EACP,6hBAA6hB;QAC/hB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;EAsBX;QACE,MAAM,EAAE,kEAAkE;KAC3E;IACD,KAAK,EAAE;QACL,IAAI,EAAE,mFAAmF;QACzF,MAAM,EAAE;YACN,gOAAgO;YAChO,0KAA0K;YAC1K,0DAA0D;YAC1D,qHAAqH;YACrH,qHAAqH;YACrH,gHAAgH;YAChH,oKAAoK;SACrK;QACD,OAAO,EAAE;;;;;2CAK8B;
|
|
1
|
+
{"version":3,"file":"discrete-transitions.js","sourceRoot":"","sources":["../../src/rules/discrete-transitions.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,mBAAmB,GAAS;IACvC,EAAE,EAAE,sBAAsB;IAC1B,KAAK,EAAE,4BAA4B;IACnC,QAAQ,EAAE,WAAW;IACrB,QAAQ,EAAE;QACR,eAAe;QACf,QAAQ;QACR,wBAAwB;QACxB,cAAc;KACf;IACD,UAAU,EAAE,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;IACrD,MAAM,EAAE,0DAA0D;IAClE,KAAK,EAAE;QACL,SAAS,EACP,6hBAA6hB;QAC/hB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;EAsBX;QACE,MAAM,EAAE,kEAAkE;KAC3E;IACD,KAAK,EAAE;QACL,IAAI,EAAE,mFAAmF;QACzF,MAAM,EAAE;YACN,gOAAgO;YAChO,0KAA0K;YAC1K,0DAA0D;YAC1D,qHAAqH;YACrH,qHAAqH;YACrH,gHAAgH;YAChH,oKAAoK;SACrK;QACD,OAAO,EAAE;;;;;2CAK8B;QACvC,UAAU,EAAE;YACV,gGAAgG;YAChG,mGAAmG;SACpG;KACF;IACD,MAAM,EAAE;QACN,4BAA4B;QAC5B,sBAAsB;QACtB,4BAA4B;KAC7B;CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display-names.d.ts","sourceRoot":"","sources":["../../src/rules/display-names.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,YAAY,EAAE,IAiC1B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export const displayNames = {
|
|
2
|
+
id: "intl-display-names",
|
|
3
|
+
title: "Country and language names",
|
|
4
|
+
category: "formatting",
|
|
5
|
+
replaces: ["i18n-iso-countries", "country-list", "iso-639-1"],
|
|
6
|
+
featureIds: ["intl-display-names"],
|
|
7
|
+
native: "Intl.DisplayNames",
|
|
8
|
+
human: {
|
|
9
|
+
explainer: 'A list of country names is a data file, and one per language you support. i18n-iso-countries makes you register each locale you want; country-list and iso-639-1 carry English only. Intl.DisplayNames reads the names the browser already ships with its locale data, so "DE" renders as "Germany" in English and "Deutschland" in German with nothing bundled and nothing registered. It covers regions, languages, scripts and currencies through the same constructor.',
|
|
10
|
+
snippet: `const regions = new Intl.DisplayNames(["en"], { type: "region" });
|
|
11
|
+
regions.of("DE"); // "Germany"
|
|
12
|
+
regions.of("JP"); // "Japan"
|
|
13
|
+
|
|
14
|
+
new Intl.DisplayNames(["de"], { type: "language" }).of("fr");
|
|
15
|
+
// "Französisch"
|
|
16
|
+
|
|
17
|
+
new Intl.DisplayNames(["en"], { type: "currency" }).of("EUR");
|
|
18
|
+
// "Euro"`,
|
|
19
|
+
mdnUrl: "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/DisplayNames",
|
|
20
|
+
},
|
|
21
|
+
agent: {
|
|
22
|
+
when: "turning a country, language, script or currency code into its name in a given locale",
|
|
23
|
+
unless: [
|
|
24
|
+
"You need the reverse lookup, from a name back to a code. These libraries index both directions, where Intl.DisplayNames only goes code to name.",
|
|
25
|
+
"You need to render a list of every country, for a select menu. Intl.DisplayNames answers one code at a time and publishes no enumeration, so the list of codes still has to come from somewhere.",
|
|
26
|
+
"You need data beyond the name: alpha-3 codes, numeric codes, calling codes or capitals. i18n-iso-countries carries those, and Intl.DisplayNames takes ISO 3166-1 alpha-2 or UN M49 and returns a string.",
|
|
27
|
+
"You assert exact strings in tests, or need output identical across browsers. Names come from each engine's own CLDR snapshot, so they differ between engines and can change when a browser updates.",
|
|
28
|
+
"The same code runs on a Node build compiled with small-icu, where only English data is present and every other locale silently falls back.",
|
|
29
|
+
],
|
|
30
|
+
snippet: `new Intl.DisplayNames(["en"], { type: "region" }).of("DE"); // "Germany"`,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=display-names.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display-names.js","sourceRoot":"","sources":["../../src/rules/display-names.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAS;IAChC,EAAE,EAAE,oBAAoB;IACxB,KAAK,EAAE,4BAA4B;IACnC,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,CAAC,oBAAoB,EAAE,cAAc,EAAE,WAAW,CAAC;IAC7D,UAAU,EAAE,CAAC,oBAAoB,CAAC;IAClC,MAAM,EAAE,mBAAmB;IAC3B,KAAK,EAAE;QACL,SAAS,EACP,4cAA4c;QAC9c,OAAO,EAAE;;;;;;;;UAQH;QACN,MAAM,EACJ,oGAAoG;KACvG;IACD,KAAK,EAAE;QACL,IAAI,EAAE,sFAAsF;QAC5F,MAAM,EAAE;YACN,iJAAiJ;YACjJ,kMAAkM;YAClM,0MAA0M;YAC1M,qMAAqM;YACrM,4IAA4I;SAC7I;QACD,OAAO,EAAE,0EAA0E;KACpF;CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"duration-format.d.ts","sourceRoot":"","sources":["../../src/rules/duration-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"duration-format.d.ts","sourceRoot":"","sources":["../../src/rules/duration-format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,cAAc,EAAE,IAwC5B,CAAC"}
|
|
@@ -31,6 +31,9 @@ new Intl.DurationFormat("de", { style: "narrow" }).format({
|
|
|
31
31
|
hours: 1,
|
|
32
32
|
minutes: 30,
|
|
33
33
|
});`,
|
|
34
|
+
handRolled: [
|
|
35
|
+
"already-split hours, minutes and seconds joined with hardcoded unit labels and plural rules",
|
|
36
|
+
],
|
|
34
37
|
},
|
|
35
38
|
guides: ["format-human-readable-durations"],
|
|
36
39
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"duration-format.js","sourceRoot":"","sources":["../../src/rules/duration-format.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAS;IAClC,EAAE,EAAE,iBAAiB;IACrB,KAAK,EAAE,0BAA0B;IACjC,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,CAAC,mBAAmB,EAAE,WAAW,CAAC;IAC5C,UAAU,EAAE,CAAC,sBAAsB,CAAC;IACpC,MAAM,EAAE,qBAAqB;IAC7B,KAAK,EAAE;QACL,SAAS,EACP,mZAAmZ;QACrZ,OAAO,EAAE;;;;;;;;qBAQQ;QACjB,MAAM,EACJ,sGAAsG;KACzG;IACD,KAAK,EAAE;QACL,IAAI,EAAE,kEAAkE;QACxE,MAAM,EAAE;YACN,wNAAwN;YACxN,wNAAwN;YACxN,gIAAgI;YAChI,kKAAkK;YAClK,+IAA+I;SAChJ;QACD,OAAO,EAAE;;;IAGT;
|
|
1
|
+
{"version":3,"file":"duration-format.js","sourceRoot":"","sources":["../../src/rules/duration-format.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,cAAc,GAAS;IAClC,EAAE,EAAE,iBAAiB;IACrB,KAAK,EAAE,0BAA0B;IACjC,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE,CAAC,mBAAmB,EAAE,WAAW,CAAC;IAC5C,UAAU,EAAE,CAAC,sBAAsB,CAAC;IACpC,MAAM,EAAE,qBAAqB;IAC7B,KAAK,EAAE;QACL,SAAS,EACP,mZAAmZ;QACrZ,OAAO,EAAE;;;;;;;;qBAQQ;QACjB,MAAM,EACJ,sGAAsG;KACzG;IACD,KAAK,EAAE;QACL,IAAI,EAAE,kEAAkE;QACxE,MAAM,EAAE;YACN,wNAAwN;YACxN,wNAAwN;YACxN,gIAAgI;YAChI,kKAAkK;YAClK,+IAA+I;SAChJ;QACD,OAAO,EAAE;;;IAGT;QACA,UAAU,EAAE;YACV,6FAA6F;SAC9F;KACF;IACD,MAAM,EAAE,CAAC,iCAAiC,CAAC;CAC5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-target.d.ts","sourceRoot":"","sources":["../../src/rules/event-target.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"event-target.d.ts","sourceRoot":"","sources":["../../src/rules/event-target.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,eAAO,MAAM,WAAW,EAAE,IAmDzB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-target.js","sourceRoot":"","sources":["../../src/rules/event-target.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAS;IAC/B,EAAE,EAAE,cAAc;IAClB,KAAK,EAAE,gBAAgB;IACvB,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE;QACR,MAAM;QACN,cAAc;QACd,YAAY;QACZ,eAAe;QACf,eAAe;KAChB;IACD,UAAU,EAAE,EAAE;IACd,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,UAAU,EAAE,YAAY;QACxB,IAAI,EAAE,ipBAAipB;KACxpB;IACD,MAAM,EAAE,8BAA8B;IACtC,KAAK,EAAE;QACL,SAAS,EACP,kZAAkZ;QACpZ,OAAO,EAAE;;;;;;;;;;;;oBAYO;QAChB,MAAM,EAAE,8DAA8D;KACvE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,oEAAoE;QAC1E,MAAM,EAAE;YACN,8JAA8J;YAC9J,yHAAyH;YACzH,yJAAyJ;YACzJ,qJAAqJ;YACrJ,wTAAwT;YACxT,6IAA6I;SAC9I;QACD,OAAO,EAAE;;iEAEoD;KAC9D;
|
|
1
|
+
{"version":3,"file":"event-target.js","sourceRoot":"","sources":["../../src/rules/event-target.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,WAAW,GAAS;IAC/B,EAAE,EAAE,cAAc;IAClB,KAAK,EAAE,gBAAgB;IACvB,QAAQ,EAAE,YAAY;IACtB,QAAQ,EAAE;QACR,MAAM;QACN,cAAc;QACd,YAAY;QACZ,eAAe;QACf,eAAe;KAChB;IACD,UAAU,EAAE,EAAE;IACd,cAAc,EAAE;QACd,MAAM,EAAE,QAAQ;QAChB,UAAU,EAAE,YAAY;QACxB,IAAI,EAAE,ipBAAipB;KACxpB;IACD,MAAM,EAAE,8BAA8B;IACtC,KAAK,EAAE;QACL,SAAS,EACP,kZAAkZ;QACpZ,OAAO,EAAE;;;;;;;;;;;;oBAYO;QAChB,MAAM,EAAE,8DAA8D;KACvE;IACD,KAAK,EAAE;QACL,IAAI,EAAE,oEAAoE;QAC1E,MAAM,EAAE;YACN,8JAA8J;YAC9J,yHAAyH;YACzH,yJAAyJ;YACzJ,qJAAqJ;YACrJ,wTAAwT;YACxT,6IAA6I;SAC9I;QACD,OAAO,EAAE;;iEAEoD;KAC9D;IACD,QAAQ,EAAE,6BAA6B;CACxC,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,
|
|
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,IA8B1B,CAAC"}
|
|
@@ -22,6 +22,10 @@ button:focus-visible {
|
|
|
22
22
|
"You need the exact same heuristic across every browser version, including ones that shipped :focus-visible before the spec's behavior settled. Small heuristic differences existed early on.",
|
|
23
23
|
],
|
|
24
24
|
snippet: "button:focus-visible { outline: 2px solid var(--accent); }",
|
|
25
|
+
handRolled: [
|
|
26
|
+
"listening for keydown and mousedown on the document to track whether the last input was a keyboard",
|
|
27
|
+
"toggling a class such as using-keyboard on the body so focus rings can be shown conditionally",
|
|
28
|
+
],
|
|
25
29
|
},
|
|
26
30
|
};
|
|
27
31
|
//# sourceMappingURL=focus-visible.js.map
|
|
@@ -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,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;
|
|
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;QACrE,UAAU,EAAE;YACV,oGAAoG;YACpG,+FAA+F;SAChG;KACF;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,
|
|
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,IAiCxB,CAAC"}
|
package/dist/rules/fullscreen.js
CHANGED
|
@@ -24,6 +24,9 @@ export const fullscreen = {
|
|
|
24
24
|
"You need the older vendor-prefixed fallback chain screenfull still maintains for browsers this old.",
|
|
25
25
|
],
|
|
26
26
|
snippet: "document.fullscreenElement ? document.exitFullscreen() : el.requestFullscreen();",
|
|
27
|
+
handRolled: [
|
|
28
|
+
"a chain of vendor-prefixed calls such as webkitRequestFullscreen and msRequestFullscreen",
|
|
29
|
+
],
|
|
27
30
|
},
|
|
28
31
|
};
|
|
29
32
|
//# sourceMappingURL=fullscreen.js.map
|
|
@@ -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,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;
|
|
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;QACpF,UAAU,EAAE;YACV,0FAA0F;SAC3F;KACF;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,
|
|
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,IAoD7B,CAAC"}
|
|
@@ -43,7 +43,11 @@ export const heightAnimation = {
|
|
|
43
43
|
snippet: `:root { interpolate-size: allow-keywords; }
|
|
44
44
|
.panel { height: 0; overflow: hidden; transition: height 0.3s; }
|
|
45
45
|
.panel[data-open] { height: auto; }`,
|
|
46
|
+
handRolled: [
|
|
47
|
+
"reading scrollHeight and animating max-height to that pixel value to open a panel",
|
|
48
|
+
"a transitionend listener setting height back to auto once an opening animation has finished",
|
|
49
|
+
],
|
|
46
50
|
},
|
|
47
|
-
guides: ["animate-to-intrinsic-sizes"],
|
|
51
|
+
guides: ["animate-to-intrinsic-sizes", "calculate-with-intrinsic-sizes"],
|
|
48
52
|
};
|
|
49
53
|
//# 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,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;
|
|
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;QAChC,UAAU,EAAE;YACV,mFAAmF;YACnF,6FAA6F;SAC9F;KACF;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;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AA0KzC;;;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"}
|
package/dist/rules/index.js
CHANGED
|
@@ -15,6 +15,7 @@ import { customHighlight } from "./custom-highlight.js";
|
|
|
15
15
|
import { dateTimeInput } from "./date-time-input.js";
|
|
16
16
|
import { dialog } from "./dialog.js";
|
|
17
17
|
import { discreteTransitions } from "./discrete-transitions.js";
|
|
18
|
+
import { displayNames } from "./display-names.js";
|
|
18
19
|
import { dragAndDrop } from "./drag-and-drop.js";
|
|
19
20
|
import { durationFormat } from "./duration-format.js";
|
|
20
21
|
import { eventTarget } from "./event-target.js";
|
|
@@ -28,6 +29,7 @@ import { inert } from "./inert.js";
|
|
|
28
29
|
import { intersectionObserver } from "./intersection-observer.js";
|
|
29
30
|
import { lazyLoading } from "./lazy-loading.js";
|
|
30
31
|
import { lineClamp } from "./line-clamp.js";
|
|
32
|
+
import { listFormat } from "./list-format.js";
|
|
31
33
|
import { masonry } from "./masonry.js";
|
|
32
34
|
import { naturalSort } from "./natural-sort.js";
|
|
33
35
|
import { numberFormat } from "./number-format.js";
|
|
@@ -41,8 +43,10 @@ import { screenWakeLock } from "./screen-wake-lock.js";
|
|
|
41
43
|
import { scrollAnimations } from "./scroll-animations.js";
|
|
42
44
|
import { scrollLock } from "./scroll-lock.js";
|
|
43
45
|
import { scrollbars } from "./scrollbars.js";
|
|
46
|
+
import { segmenter } from "./segmenter.js";
|
|
44
47
|
import { select } from "./select.js";
|
|
45
48
|
import { serverSentEvents } from "./server-sent-events.js";
|
|
49
|
+
import { signalTimeout } from "./signal-timeout.js";
|
|
46
50
|
import { smoothScroll } from "./smooth-scroll.js";
|
|
47
51
|
import { speechRecognition } from "./speech-recognition.js";
|
|
48
52
|
import { speechSynthesis } from "./speech-synthesis.js";
|
|
@@ -50,11 +54,15 @@ import { sticky } from "./sticky.js";
|
|
|
50
54
|
import { structuredCloneRule } from "./structured-clone.js";
|
|
51
55
|
import { textBoxTrim } from "./text-box-trim.js";
|
|
52
56
|
import { textWrapBalance } from "./text-wrap-balance.js";
|
|
57
|
+
import { urlPattern } from "./url-pattern.js";
|
|
53
58
|
import { urlSearchParams } from "./url-search-params.js";
|
|
54
59
|
import { viewTransitions } from "./view-transitions.js";
|
|
60
|
+
import { webAnimations } from "./web-animations.js";
|
|
55
61
|
import { webBluetooth } from "./web-bluetooth.js";
|
|
56
62
|
import { webCrypto } from "./web-crypto.js";
|
|
63
|
+
import { webLocks } from "./web-locks.js";
|
|
57
64
|
import { webShare } from "./web-share.js";
|
|
65
|
+
import { withResolvers } from "./with-resolvers.js";
|
|
58
66
|
/**
|
|
59
67
|
* Interpolates the {{browser:key}} tokens a rule's prose uses in place of a
|
|
60
68
|
* hand-typed browser version. Done once here, so the website, the CLI, the
|
|
@@ -147,6 +155,14 @@ const rawRules = [
|
|
|
147
155
|
serverSentEvents,
|
|
148
156
|
urlSearchParams,
|
|
149
157
|
webCrypto,
|
|
158
|
+
webLocks,
|
|
159
|
+
displayNames,
|
|
160
|
+
listFormat,
|
|
161
|
+
webAnimations,
|
|
162
|
+
segmenter,
|
|
163
|
+
urlPattern,
|
|
164
|
+
withResolvers,
|
|
165
|
+
signalTimeout,
|
|
150
166
|
];
|
|
151
167
|
/**
|
|
152
168
|
* Every rule in the catalog. Order is not significant: surfaces sort by
|
package/dist/rules/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/rules/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,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ACX,SAAS;IACT,OAAO;IACP,YAAY;IACZ,cAAc;IACd,OAAO;IACP,YAAY;IACZ,eAAe;IACf,cAAc;IACd,cAAc;IACd,gBAAgB;IAChB,UAAU;IACV,UAAU;IACV,MAAM;IACN,YAAY;IACZ,iBAAiB;IACjB,eAAe;IACf,MAAM;IACN,mBAAmB;IACnB,WAAW;IACX,eAAe;IACf,eAAe;IACf,YAAY;IACZ,QAAQ;IACR,aAAa;IACb,MAAM;IACN,cAAc;IACd,WAAW;IACX,SAAS;IACT,WAAW;IACX,UAAU;IACV,gBAAgB;IAChB,eAAe;IACf,SAAS;IACT,QAAQ;IACR,YAAY;IACZ,UAAU;IACV,aAAa;IACb,SAAS;IACT,UAAU;IACV,aAAa;IACb,aAAa;CACd,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,KAAK,GAAoB,QAAQ,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;AAEvE,yBAAyB;AACzB,MAAM,CAAC,MAAM,SAAS,GAA8B,IAAI,GAAG,CACzD,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,CACrC,CAAC;AAEF;;;GAGG;AACH,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"}
|
|
@@ -1 +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,
|
|
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,IAyCnB,CAAC"}
|
package/dist/rules/inert.js
CHANGED
|
@@ -31,6 +31,10 @@ export const inert = {
|
|
|
31
31
|
],
|
|
32
32
|
snippet: `page.inert = true; // opening the overlay
|
|
33
33
|
page.inert = false; // closing it`,
|
|
34
|
+
handRolled: [
|
|
35
|
+
"a keydown handler watching for Tab and calling preventDefault so focus cannot leave an overlay",
|
|
36
|
+
"a querySelectorAll over a list of focusable selectors, used to decide where focus is allowed to go",
|
|
37
|
+
],
|
|
34
38
|
},
|
|
35
39
|
guides: ["accessibility", "navigation-drawer"],
|
|
36
40
|
};
|
package/dist/rules/inert.js.map
CHANGED
|
@@ -1 +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;
|
|
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;QAC/B,UAAU,EAAE;YACV,gGAAgG;YAChG,oGAAoG;SACrG;KACF;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,
|
|
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,IAsClC,CAAC"}
|
|
@@ -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,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;
|
|
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;IACD,QAAQ,EAAE,8BAA8B;CACzC,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,
|
|
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,IAyCzB,CAAC"}
|
|
@@ -31,6 +31,10 @@ export const lazyLoading = {
|
|
|
31
31
|
],
|
|
32
32
|
snippet: `<img src="/photo.jpg" alt="" loading="lazy" />
|
|
33
33
|
<iframe src="/embed" loading="lazy"></iframe>`,
|
|
34
|
+
handRolled: [
|
|
35
|
+
"an IntersectionObserver that swaps a data-src attribute into src when an image nears the viewport",
|
|
36
|
+
"a scroll listener deciding which images are close enough to start loading",
|
|
37
|
+
],
|
|
34
38
|
},
|
|
35
39
|
guides: ["optimize-image-priority"],
|
|
36
40
|
};
|