@nitida/sdk 0.25.0 → 0.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -18,10 +18,10 @@ eliminates type drift between server and client surfaces.
18
18
  | Where you run | Import | What it bundles |
19
19
  |---|---|---|
20
20
  | Node 20+, Bun, Cloud Run, Lambda, Edge, agents, cron | **`@nitida/sdk/server`** | `NitidaClient` + URL builders + `signTransformUrl`. **No browser-only code.** Hard guarantee against shipping `Blob`-workflow helpers to the wrong runtime. |
21
- | Browser (Next.js client, Vite, CRA, web workers) | **`@nitida/sdk/web`** | `NitidaClient` + everything in `/server` + `createWebUploader` (multipart, parallel parts, IndexedDB resume) + `compressImage` (HEIC→WebP, compressorjs). |
21
+ | Browser (Next.js client, Vite, CRA, web workers) | **`@nitida/sdk/web`** | `NitidaClient` + everything in `/server` + `compressImage` (HEIC→WebP, compressorjs). Multipart is not exposed see *Large uploads (web)*. |
22
22
  | React Native / Expo apps | `@nitida/sdk/native` | `compressImage` for RN (libjpeg-turbo via `react-native-compressor`). Pair with `/expo`. |
23
23
  | Expo background uploads | `@nitida/sdk/expo` | `createExpoUploader` — native `URLSession` (iOS) / `WorkManager` (Android) sessions that survive app backgrounding. |
24
- | Next.js / React (hooks) | `@nitida/sdk/react` | `NitidaProvider` + `useSlot` / `useSlots` / `useAsset`. |
24
+ | Next.js / React (hooks) | `@nitida/sdk/react` | `NitidaProvider` + `useSlot` / `useSlots` / `useNitidaClient`. |
25
25
  | Backwards-compat (root) | `@nitida/sdk` | Same shape as today; equivalent to `/web` for the public symbols. **Prefer the explicit subpath in new code.** |
26
26
 
27
27
  Uploaders + compressors are **optional** peer deps (`@aquienpz/asset-uploader-{web,expo}`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nitida/sdk",
3
- "version": "0.25.0",
3
+ "version": "0.25.1",
4
4
  "description": "nitida — the media SDK: browser and mobile upload with resume, client-side compression, on-the-fly transforms behind a CDN, video transcode, HLS ladders and AI proxies. Multi-tenant.",
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -574,9 +574,12 @@ than JPEG at the same quality) and leaves the archived `original` as JPEG.
574
574
  ### 8e. Palette — free, synchronous, on the DTO
575
575
 
576
576
  Extracted during processing for every image; by the time an asset is `ready`
577
- its palette is on it. `getAssetPalette(asset)` dominant + 6 swatches, each
578
- with a luminance-derived text colour. Use for ambient backgrounds and load
579
- placeholders.
577
+ the palette is **already on the DTO** as `asset.palette` there is no call to
578
+ make and nothing to download. `iteratePaletteSwatches(asset.palette)` expands it
579
+ to dominant + up to 6 swatches; `pickAmbientBackground` and `getAmbientGradient`
580
+ take the same value, and `bestTextContrast(hex)` gives the text colour **with
581
+ the ratio it achieved**, so you can decide instead of assuming. Use for ambient
582
+ backgrounds and load placeholders.
580
583
 
581
584
  ### 8f. AI proxies — we produce, YOU analyse
582
585