Package-level declarations
Types
Public URLs on the Skimbyte project website (the MkDocs site deployed to GitHub Pages by .github/workflows/deploy-site.yml). These ship in release builds, so they live in a committed constant rather than the local.properties-backed BackendConfig.
Properties
Common aspect ratios used by the profile images.
Upload ceiling for profile/banner images: the result of compressForUpload fits within this.
Functions
The OAuth redirect URI this platform can actually receive, passed to the auth server's /start endpoint (which validates it against its exact-match allowlist).
The OAuth redirect URI this platform can actually receive, passed to the auth server's /start endpoint (which validates it against its exact-match allowlist).
The OAuth redirect URI this platform can actually receive, passed to the auth server's /start endpoint (which validates it against its exact-match allowlist).
The OAuth redirect URI this platform can actually receive, passed to the auth server's /start endpoint (which validates it against its exact-match allowlist).
RFC 8252 §7.3 loopback redirect for desktop: a JVM process can't register a custom URL scheme with the OS (the system browser would dead-end on skimbyte://… with "address is invalid"), so the browser is redirected to this localhost listener instead, which forwards the full callback URL — token query params included — into the shared GoogleAuthCallback bridge.
The OAuth redirect URI this platform can actually receive, passed to the auth server's /start endpoint (which validates it against its exact-match allowlist).
The centered crop rectangle that trims a sourceWidth x sourceHeight image to targetAspect (width / height). Pure, so the platform crop codecs share one definition and it can be unit-tested.
Clamps this rectangle to lie within a sourceWidth x sourceHeight image, or null if it doesn't overlap the image at all (degenerate). Keeps the platform crop codecs from throwing on an off-image or oversized rect produced by gesture rounding.
Ensures image is at most maxBytes by re-encoding it as JPEG, stepping the quality down and then repeatedly downscaling and re-compressing until it fits (not a single pass — it keeps shrinking and re-encoding each cycle until the output is within maxBytes). Returns image unchanged when it is already within the limit, or when it cannot be decoded. Backed per-platform because only the native image codecs can resize and re-encode bitmaps; the crop step still emits large PNGs, so this is the common chokepoint that keeps avatar and banner uploads small.
Ensures image is at most maxBytes by re-encoding it as JPEG, stepping the quality down and then repeatedly downscaling and re-compressing until it fits (not a single pass — it keeps shrinking and re-encoding each cycle until the output is within maxBytes). Returns image unchanged when it is already within the limit, or when it cannot be decoded. Backed per-platform because only the native image codecs can resize and re-encode bitmaps; the crop step still emits large PNGs, so this is the common chokepoint that keeps avatar and banner uploads small.
Ensures image is at most maxBytes by re-encoding it as JPEG, stepping the quality down and then repeatedly downscaling and re-compressing until it fits (not a single pass — it keeps shrinking and re-encoding each cycle until the output is within maxBytes). Returns image unchanged when it is already within the limit, or when it cannot be decoded. Backed per-platform because only the native image codecs can resize and re-encode bitmaps; the crop step still emits large PNGs, so this is the common chokepoint that keeps avatar and banner uploads small.
Ensures image is at most maxBytes by re-encoding it as JPEG, stepping the quality down and then repeatedly downscaling and re-compressing until it fits (not a single pass — it keeps shrinking and re-encoding each cycle until the output is within maxBytes). Returns image unchanged when it is already within the limit, or when it cannot be decoded. Backed per-platform because only the native image codecs can resize and re-encode bitmaps; the crop step still emits large PNGs, so this is the common chokepoint that keeps avatar and banner uploads small.
Ensures image is at most maxBytes by re-encoding it as JPEG, stepping the quality down and then repeatedly downscaling and re-compressing until it fits (not a single pass — it keeps shrinking and re-encoding each cycle until the output is within maxBytes). Returns image unchanged when it is already within the limit, or when it cannot be decoded. Backed per-platform because only the native image codecs can resize and re-encode bitmaps; the crop step still emits large PNGs, so this is the common chokepoint that keeps avatar and banner uploads small.
Ensures image is at most maxBytes by re-encoding it as JPEG, stepping the quality down and then repeatedly downscaling and re-compressing until it fits (not a single pass — it keeps shrinking and re-encoding each cycle until the output is within maxBytes). Returns image unchanged when it is already within the limit, or when it cannot be decoded. Backed per-platform because only the native image codecs can resize and re-encode bitmaps; the crop step still emits large PNGs, so this is the common chokepoint that keeps avatar and banner uploads small.
The source-pixel rectangle currently inside the crop frame, given the cover-fit base plus the user's userScale and pan offsets (frame pixels, measured from the frame centre). Pure, so the interactive cropper's gesture mapping is unit-testable independent of Compose.
Center-crops image to targetAspect (width / height) on-device and returns the cropped bytes. Real on Android and JVM; a no-op passthrough on iOS/JS/Wasm until a platform image codec is wired there. Returns the original image unchanged if it can't be decoded.
Center-crops image to targetAspect (width / height) on-device and returns the cropped bytes. Real on Android and JVM; a no-op passthrough on iOS/JS/Wasm until a platform image codec is wired there. Returns the original image unchanged if it can't be decoded.
Center-crops image to targetAspect (width / height) on-device and returns the cropped bytes. Real on Android and JVM; a no-op passthrough on iOS/JS/Wasm until a platform image codec is wired there. Returns the original image unchanged if it can't be decoded.
Center-crops image to targetAspect (width / height) on-device and returns the cropped bytes. Real on Android and JVM; a no-op passthrough on iOS/JS/Wasm until a platform image codec is wired there. Returns the original image unchanged if it can't be decoded.
Center-crops image to targetAspect (width / height) on-device and returns the cropped bytes. Real on Android and JVM; a no-op passthrough on iOS/JS/Wasm until a platform image codec is wired there. Returns the original image unchanged if it can't be decoded.
Center-crops image to targetAspect (width / height) on-device and returns the cropped bytes. Real on Android and JVM; a no-op passthrough on iOS/JS/Wasm until a platform image codec is wired there. Returns the original image unchanged if it can't be decoded.
Decodes just the pixel dimensions of bytes without loading the full bitmap, or null if the bytes can't be decoded. Lets the interactive cropper map on-screen gestures back to source pixels.
Decodes just the pixel dimensions of bytes without loading the full bitmap, or null if the bytes can't be decoded. Lets the interactive cropper map on-screen gestures back to source pixels.
Decodes just the pixel dimensions of bytes without loading the full bitmap, or null if the bytes can't be decoded. Lets the interactive cropper map on-screen gestures back to source pixels.
Decodes just the pixel dimensions of bytes without loading the full bitmap, or null if the bytes can't be decoded. Lets the interactive cropper map on-screen gestures back to source pixels.
Decodes just the pixel dimensions of bytes without loading the full bitmap, or null if the bytes can't be decoded. Lets the interactive cropper map on-screen gestures back to source pixels.
Decodes just the pixel dimensions of bytes without loading the full bitmap, or null if the bytes can't be decoded. Lets the interactive cropper map on-screen gestures back to source pixels.
Estimates how many minutes it takes to read text, used for the "N min read" badge on a story card. Counts whitespace-separated tokens and divides by wordsPerMinute (200 is a common average for adult silent reading of prose), rounding up. Always returns at least 1 so even a one-line summary reads as "1 min read" rather than "0".
Whether this device can capture a photo from a camera — checked before offering the "Take photo" option so it never appears where it can't work (a desktop with no webcam, say). Gallery/file picking is always available and is offered regardless.
Whether this device can capture a photo from a camera — checked before offering the "Take photo" option so it never appears where it can't work (a desktop with no webcam, say). Gallery/file picking is always available and is offered regardless.
Whether this device can capture a photo from a camera — checked before offering the "Take photo" option so it never appears where it can't work (a desktop with no webcam, say). Gallery/file picking is always available and is offered regardless.
Whether this device can capture a photo from a camera — checked before offering the "Take photo" option so it never appears where it can't work (a desktop with no webcam, say). Gallery/file picking is always available and is offered regardless.
Whether this device can capture a photo from a camera — checked before offering the "Take photo" option so it never appears where it can't work (a desktop with no webcam, say). Gallery/file picking is always available and is offered regardless.
Whether this device can capture a photo from a camera — checked before offering the "Take photo" option so it never appears where it can't work (a desktop with no webcam, say). Gallery/file picking is always available and is offered regardless.
Returns a zero-arg launch function; calling it opens the camera to capture a photo. onResult receives the captured image, or null if the user cancelled or capture failed. Mirrors rememberImagePickerLauncher so the edit sheet treats camera and gallery the same way.
Returns a zero-arg launch function; calling it opens the camera to capture a photo. onResult receives the captured image, or null if the user cancelled or capture failed. Mirrors rememberImagePickerLauncher so the edit sheet treats camera and gallery the same way.
Returns a zero-arg launch function; calling it opens the camera to capture a photo. onResult receives the captured image, or null if the user cancelled or capture failed. Mirrors rememberImagePickerLauncher so the edit sheet treats camera and gallery the same way.
Returns a zero-arg launch function; calling it opens the camera to capture a photo. onResult receives the captured image, or null if the user cancelled or capture failed. Mirrors rememberImagePickerLauncher so the edit sheet treats camera and gallery the same way.
Returns a zero-arg launch function; calling it opens the camera to capture a photo. onResult receives the captured image, or null if the user cancelled or capture failed. Mirrors rememberImagePickerLauncher so the edit sheet treats camera and gallery the same way.
Returns a zero-arg launch function; calling it opens the camera to capture a photo. onResult receives the captured image, or null if the user cancelled or capture failed. Mirrors rememberImagePickerLauncher so the edit sheet treats camera and gallery the same way.
Returns a zero-arg launch function; calling it opens the platform's native image picker. onResult receives the picked image, or null if the user cancelled.
Returns a zero-arg launch function; calling it opens the platform's native image picker. onResult receives the picked image, or null if the user cancelled.
Returns a zero-arg launch function; calling it opens the platform's native image picker. onResult receives the picked image, or null if the user cancelled.
Returns a zero-arg launch function; calling it opens the platform's native image picker. onResult receives the picked image, or null if the user cancelled.
Returns a zero-arg launch function; calling it opens the platform's native image picker. onResult receives the picked image, or null if the user cancelled.
Returns a zero-arg launch function; calling it opens the platform's native image picker. onResult receives the picked image, or null if the user cancelled.