react-diff-viewer-continued colors turned into tailwind css colors. I commented out the grays so you can use your own. Might want to remove black/white too
| $ vite build | |
| [1/5] analyze client references... | |
| vite v8.0.16 building rsc environment for production... | |
| ✓ 16 modules transformed. | |
| ✓ built in 57ms | |
| [2/5] analyze server references... | |
| vite v8.0.16 building ssr environment for production... | |
| ✓ 288 modules transformed. | |
| ✓ built in 379ms | |
| [3/5] build rsc environment... |
| TZ=UTC stat -f '%Sa' -t "%Y-%m-%dT%H:%M:%SZ" ./path/to/file.txt # last accessed | |
| TZ=UTC stat -f '%Sm' -t "%Y-%m-%dT%H:%M:%SZ" ./path/to/file.txt # last modified | |
| TZ=UTC stat -f '%SB' -t "%Y-%m-%dT%H:%M:%SZ" ./path/to/file.txt # created |
| import { useSyncExternalStore } from "react"; | |
| type Breakpoint = "sm" | "md" | "lg" | "xl" | "2xl"; | |
| type BreakpointWithUtility = Breakpoint | `max-${Breakpoint}`; | |
| const useBreakpoint = (breakpoint: BreakpointWithUtility) => { | |
| const breakpointValue = window | |
| .getComputedStyle(document.body) | |
| .getPropertyValue( |
The Temporal API is very nearly baseline with support in 67.52% of browsers including beta opt-in support in Safari and support in Node.js 26. Of course, the polyfills @js-temporal/polyfill and temporal-polyfill also exist.
One of the larger points of contention is the parsing and formatting support in the Temporal API. Regarding parsing, in addition to object literals or epochNanoseconds/epochMilliseconds, there is currently support for parsing RFC 9557, JavaScript.toString(), ISO 8601, RFC 7231.[^1] While there originally was a proposal for a Temporal.parse API, it has since been abandoned based on the claim that "A type-span
Radix UI offers a custom <ScrollArea> implementation both as its own component and in some of its components (e.g. Select).
Per adobe/react-spectrum#7286, React Aria maintainers claim that due to accessibility issues and being unable to adhere to user system preferences, they don't intend on supporting a customizable scroll area. Per this tweet, it seems maintainer Devon Govett strongly dislikes overriding user preferences.
| import { Decimal } from "decimal.js"; | |
| const DEFAULT_MAX_ITERATIONS = 10; | |
| const DEFAULT_TOLERANCE = 1e-10; // = 1/10_000_000_000 | |
| /** | |
| * Computes the continued fraction coefficients [a_0, a_1, ..., a_n] for a | |
| * **non-negative** finite number | |
| * | |
| * @see {@link https://en.wikipedia.org/wiki/Simple_continued_fraction} |
getImageDimensions TypeScript function using Image constructor and onLoad/onError. Much faster than Window.createImageBitmap. Uses imageOrientation = "from-image" to set width and height based on Exif data.
Pdfimages seems to only extract images with transparency from PDFs by downloading it alongside the image mask. You can probably use something like ImageMagick if you only have a couple of images to convert it back into a PNG with transparency, but since there was a lot of images in my case, this is the script I used.
It uses pdf.js and sharp. Sharp was probably overkill but it makes the exporting part a bit cleaner.