@nitida/asset-client 0.21.0 → 0.23.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/AGENTS.md +7 -0
- package/README.md +9 -4
- package/dist/index.cjs +67 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +183 -42
- package/dist/index.d.ts +183 -42
- package/dist/index.js +61 -13
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/access.ts +21 -1
- package/src/index.ts +37 -30
- package/src/transform.ts +202 -32
package/dist/index.d.cts
CHANGED
|
@@ -56,8 +56,22 @@ declare function deriveAccessKey(signingKey: string): Promise<Uint8Array>;
|
|
|
56
56
|
* path.
|
|
57
57
|
*/
|
|
58
58
|
declare function accessMessage(tenantPrefix: string, exp: number, resourcePath: string): string;
|
|
59
|
+
/**
|
|
60
|
+
* The longest life a signed URL may claim: **7 days**.
|
|
61
|
+
*
|
|
62
|
+
* ⚠️ Must equal `MAX_SIGNED_TRANSFORM_TTL_SECONDS` on the origin and
|
|
63
|
+
* `MAX_SIGNED_URL_TTL_SECONDS` in the CDN worker — one policy, three runtimes,
|
|
64
|
+
* pinned in all three suites. Both verifiers refuse anything longer, so a
|
|
65
|
+
* bigger number here would only mint a URL that 401s.
|
|
66
|
+
*
|
|
67
|
+
* Why there is a ceiling at all: `expiresInSeconds` was validated as
|
|
68
|
+
* "> 0" and nothing else, so `{ expiresInSeconds: 315_360_000 }` produced a
|
|
69
|
+
* ten-year link that every check called valid. "Has an expiry" and "expires"
|
|
70
|
+
* are different properties, and only the second makes a leaked link die.
|
|
71
|
+
*/
|
|
72
|
+
declare const MAX_SIGNED_URL_TTL_SECONDS: number;
|
|
59
73
|
type SignAccessOptions = {
|
|
60
|
-
/** Lifetime in seconds. Required — see the header. */
|
|
74
|
+
/** Lifetime in seconds, 1 .. 604 800. Required — see the header. */
|
|
61
75
|
expiresInSeconds: number;
|
|
62
76
|
/** Injectable clock, for tests that need a URL already dead on arrival. */
|
|
63
77
|
nowSeconds?: number;
|
|
@@ -248,13 +262,24 @@ declare function getPaletteBlurBackground(palette: AssetPalette | null | undefin
|
|
|
248
262
|
* Requesting any OTHER width returns HTTP 400 at the edge (unsigned URLs). These are the
|
|
249
263
|
* 1× base ladder values; DPR ×2/×3 multiples are applied + whitelisted server-side. Import
|
|
250
264
|
* this instead of hardcoding magic widths so an unsupported size is caught in review/IDE.
|
|
265
|
+
*
|
|
266
|
+
* ⭐ **180 es el `apple-touch-icon`, y está acá por eso.** Apple pide 180×180 para
|
|
267
|
+
* el icono de pantalla de inicio en un iPhone 3×, y el monorepo de neo ya lo
|
|
268
|
+
* estandarizó: `webapp-storefront` commitea un `apple-icon.png` de 180×180 por
|
|
269
|
+
* tenant. Sin este escalón, una app que sirve el icono desde el CDN tiene que
|
|
270
|
+
* elegir entre 160 (iOS lo agranda, sale borroso) y 240 (lo achica, sale bien
|
|
271
|
+
* pero pesa de más). Medido 2026-08-29 sobre la foto de un agente: 240² en PNG
|
|
272
|
+
* son 57,5 KB contra 6,5 KB del WebP a 400², así que el tamaño de más no es
|
|
273
|
+
* gratis. El caso real: `apps/bio-web/src/lib/seo/favicon.ts`, que sirve **la
|
|
274
|
+
* foto del propio negocio** como icono de su página.
|
|
251
275
|
*/
|
|
252
|
-
declare const TRANSFORM_WIDTHS: readonly [96, 128, 160, 240, 256, 320, 400, 480, 600, 640, 800, 960, 1080, 1200, 1280, 1440, 1600, 1920, 2560, 3840];
|
|
276
|
+
declare const TRANSFORM_WIDTHS: readonly [96, 128, 160, 180, 240, 256, 320, 400, 480, 600, 640, 800, 960, 1080, 1200, 1280, 1440, 1600, 1920, 2560, 3840];
|
|
253
277
|
/**
|
|
254
278
|
* A CDN-whitelisted transform width — the only widths `TransformOptions.width`
|
|
255
279
|
* accepts. Off-ladder widths are a compile error; for signed URLs that need a
|
|
256
|
-
*
|
|
257
|
-
*
|
|
280
|
+
* signature, use {@link getSignedTransformUrl} /
|
|
281
|
+
* `aq.transform(asset, opts, { sign: true, expiresInSeconds })` — which names
|
|
282
|
+
* the caller but does NOT widen the ladder.
|
|
258
283
|
*/
|
|
259
284
|
type TransformWidth = (typeof TRANSFORM_WIDTHS)[number];
|
|
260
285
|
type TransformFit = "cover" | "contain" | "fill" | "inside" | "outside";
|
|
@@ -265,9 +290,9 @@ type TransformOptions = {
|
|
|
265
290
|
/**
|
|
266
291
|
* Target max-side width in CSS pixels (multiplied by `dpr` server-side).
|
|
267
292
|
* MUST be a {@link TRANSFORM_WIDTHS} value — off-ladder widths are rejected
|
|
268
|
-
* (HTTP 400) by the edge whitelist
|
|
269
|
-
*
|
|
270
|
-
*
|
|
293
|
+
* (HTTP 400) by the edge whitelist, so the type forbids them at compile
|
|
294
|
+
* time. Signing does NOT lift this: since doc blindaje WS-6 the edge
|
|
295
|
+
* validates signed and unsigned requests identically.
|
|
271
296
|
*/
|
|
272
297
|
width?: TransformWidth;
|
|
273
298
|
/** Target max-side height. Multiplied by `dpr` server-side. */
|
|
@@ -278,7 +303,43 @@ type TransformOptions = {
|
|
|
278
303
|
gravity?: TransformGravity;
|
|
279
304
|
/** Output format. `auto` → the platform's policy decides. */
|
|
280
305
|
format?: TransformFormat;
|
|
281
|
-
/**
|
|
306
|
+
/**
|
|
307
|
+
* @deprecated **Do not set this.** Omit the key — that is the correct call for
|
|
308
|
+
* every surface this platform serves. Kept in the type for one narrow case
|
|
309
|
+
* (a hard, MEASURED byte budget), and struck through on purpose so reaching
|
|
310
|
+
* for it is a decision, not an accident.
|
|
311
|
+
*
|
|
312
|
+
* There are only two things you can pass, and neither is worth having:
|
|
313
|
+
*
|
|
314
|
+
* **`"auto"` is a no-op.** Byte-for-byte identical to omitting the key —
|
|
315
|
+
* measured 2026-08-31 on a production laddered asset at `width=1920`:
|
|
316
|
+
* both answered 136 680 B, sha256 `3a9ba57d…`, `x-transform-source:
|
|
317
|
+
* original`. It buys nothing but the illusion of having chosen.
|
|
318
|
+
*
|
|
319
|
+
* **A NUMBER costs you image quality.** It is not an encoder knob — it
|
|
320
|
+
* selects WHICH BYTES the server decodes. With a number in hand, `/t/`
|
|
321
|
+
* short-circuits to the smallest STORED variant that covers the request, and
|
|
322
|
+
* that variant already went through one lossy pass, so the output is a second
|
|
323
|
+
* generation. `"auto"` is a *string*, fails that `typeof` test, and therefore
|
|
324
|
+
* keeps the master path. Measured on two corpora:
|
|
325
|
+
*
|
|
326
|
+
* - 5 photographs, `width=800` → 7–9 % smaller **and worse 5 of 5**, down
|
|
327
|
+
* to −3.01 dB PSNR (`/guides/transform-benchmark/`).
|
|
328
|
+
* - 5056 px architectural renders at 1280 / 1920 / 3840 — the widths that
|
|
329
|
+
* MATCH `md`/`lg`/`xl` exactly, so no downscale hides the first pass →
|
|
330
|
+
* **+2…+8 % HEAVIER and −0.50…−0.85 dB, 3 of 3**. Not even a byte saving
|
|
331
|
+
* to trade for it.
|
|
332
|
+
*
|
|
333
|
+
* Raising the number does not undo it: doubly-compressed at 80 is worse than
|
|
334
|
+
* single-pass at 60, and 31 % heavier.
|
|
335
|
+
*
|
|
336
|
+
* If you truly have a byte budget, pin it AND upload that asset with
|
|
337
|
+
* `presets: ["original"]` — with no ladder there is nothing to short-circuit
|
|
338
|
+
* to, and the pin becomes an honest encoder setting again.
|
|
339
|
+
*
|
|
340
|
+
* The one-line check is on the response: `x-transform-source` names the
|
|
341
|
+
* variant the edge decoded. `original` = one pass; `md`/`lg`/`xl` = two.
|
|
342
|
+
*/
|
|
282
343
|
quality?: "auto" | number;
|
|
283
344
|
/** Device pixel ratio. Width/height are multiplied by this before resize. */
|
|
284
345
|
dpr?: 1 | 2 | 3;
|
|
@@ -312,20 +373,39 @@ type TransformOptions = {
|
|
|
312
373
|
duration?: number;
|
|
313
374
|
};
|
|
314
375
|
/**
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
*
|
|
321
|
-
*
|
|
322
|
-
*
|
|
323
|
-
*
|
|
376
|
+
* Options for a SIGNED transform URL.
|
|
377
|
+
*
|
|
378
|
+
* ⚠️ **`width` is the same ladder as unsigned**, since `@nitida/asset-client`
|
|
379
|
+
* 0.22.0. This type used to widen it to any `number`, because a valid `?sig=`
|
|
380
|
+
* made the CDN edge skip its whitelist entirely — so a signature bought an
|
|
381
|
+
* off-ladder size. It does not any more: the edge validates every `/t/`
|
|
382
|
+
* request identically and answers 400 for an off-ladder width whether or not
|
|
383
|
+
* it is signed (doc blindaje WS-6). Keeping the wide type would only let
|
|
384
|
+
* TypeScript bless a URL that 400s.
|
|
385
|
+
*
|
|
386
|
+
* A signature now buys IDENTITY: which tenant asked, proven with its key, until
|
|
387
|
+
* `exp`. That is what a strict tenant and the paid-effect cost guard require.
|
|
324
388
|
*/
|
|
325
|
-
type SignedTransformOptions =
|
|
326
|
-
|
|
389
|
+
type SignedTransformOptions = TransformOptions;
|
|
390
|
+
/**
|
|
391
|
+
* `width` widened to any `number` — the PRIVATE tree's option type.
|
|
392
|
+
*
|
|
393
|
+
* ⚠️ Not an escape hatch for the public tree: `/t/` answers 400 for an
|
|
394
|
+
* off-ladder width, signed or not (doc blindaje WS-6). What this is for is the
|
|
395
|
+
* `/a/<tenant>/t/…` tree, where the ladder deliberately does NOT apply — the
|
|
396
|
+
* request arrives HMAC-verified against the tenant's key, so only a key-holder
|
|
397
|
+
* can ask, and "any width/crop/format, not just the materialised ones" is the
|
|
398
|
+
* written promise of `getPrivateTransformUrl`.
|
|
399
|
+
*
|
|
400
|
+
* Also used by the two builders that take an explicit ladder the caller chose
|
|
401
|
+
* (`getTransformSrcSet`) or that are documented as unchecked
|
|
402
|
+
* (`getTransformUrlUnchecked`).
|
|
403
|
+
*/
|
|
404
|
+
type PrivateTransformOptions = Omit<TransformOptions, "width"> & {
|
|
327
405
|
width?: number;
|
|
328
406
|
};
|
|
407
|
+
/** @deprecated internal alias kept for the builders below. */
|
|
408
|
+
type AnyWidthTransformOptions = PrivateTransformOptions;
|
|
329
409
|
/**
|
|
330
410
|
* Serialize transform options into the canonical DSL path segment.
|
|
331
411
|
* Empty options return an empty string (caller should fall back to a
|
|
@@ -352,7 +432,7 @@ type SignedTransformOptions = Omit<TransformOptions, "width"> & {
|
|
|
352
432
|
* to be an aquienpz asset.
|
|
353
433
|
*/
|
|
354
434
|
declare function extractAssetSha(url: string | null | undefined): string | null;
|
|
355
|
-
declare function serializeTransform(opts:
|
|
435
|
+
declare function serializeTransform(opts: AnyWidthTransformOptions): string;
|
|
356
436
|
/**
|
|
357
437
|
* Build a transform URL for a VIDEO asset. Same DSL shape as image
|
|
358
438
|
* transforms; the server branches on the asset's `kind` column. Video
|
|
@@ -426,20 +506,66 @@ declare function getHlsStreamingUrl(asset: Pick<AssetDTO, "sha"> & VisibilityHin
|
|
|
426
506
|
|
|
427
507
|
declare function getTransformUrl(asset: Pick<AssetDTO, "sha"> & VisibilityHint, opts: TransformOptions): string | null;
|
|
428
508
|
/**
|
|
429
|
-
* Build AND sign a transform URL
|
|
509
|
+
* Build AND sign a transform URL.
|
|
430
510
|
*
|
|
431
|
-
*
|
|
432
|
-
*
|
|
433
|
-
*
|
|
434
|
-
* {@link getTransformUrl} (+ {@link signTransformUrl} if you need a signature).
|
|
511
|
+
* A signature names the caller — it is what a `strict_transforms` tenant
|
|
512
|
+
* requires and what the paid-effect (`effect=genfill`) cost guard requires. It
|
|
513
|
+
* does NOT widen the ladder; see {@link SignedTransformOptions}.
|
|
435
514
|
*
|
|
436
515
|
* Returns `null` only when `opts` serialize to an empty DSL (no transform
|
|
437
516
|
* requested) — same contract as {@link getTransformUrl}.
|
|
438
517
|
*/
|
|
439
|
-
declare function getSignedTransformUrl(asset: Pick<AssetDTO, "sha"> & VisibilityHint, opts: SignedTransformOptions, signingKey: string): Promise<string> | null;
|
|
518
|
+
declare function getSignedTransformUrl(asset: Pick<AssetDTO, "sha"> & VisibilityHint, opts: SignedTransformOptions, signingKey: string, signOpts: SignTransformOptions): Promise<string> | null;
|
|
519
|
+
/**
|
|
520
|
+
* The longest life a signed transform URL may claim: **7 days**.
|
|
521
|
+
*
|
|
522
|
+
* ⚠️ Must equal `MAX_SIGNED_TRANSFORM_TTL_SECONDS` on the origin
|
|
523
|
+
* (`transform.signing.ts`), which enforces it on every verify — asking for
|
|
524
|
+
* more here would only build a URL the platform answers 401 to, which is why
|
|
525
|
+
* this throws instead.
|
|
526
|
+
*/
|
|
527
|
+
declare const MAX_SIGNED_TRANSFORM_TTL_SECONDS: number;
|
|
528
|
+
/**
|
|
529
|
+
* The shortest, so that the minute-rounding below can never mint a dead URL.
|
|
530
|
+
* 120 s = two rounding steps of headroom.
|
|
531
|
+
*/
|
|
532
|
+
declare const MIN_SIGNED_TRANSFORM_TTL_SECONDS = 120;
|
|
533
|
+
type SignTransformOptions = {
|
|
534
|
+
/**
|
|
535
|
+
* Lifetime in seconds, 120 .. 604 800. Required — there is no "forever"
|
|
536
|
+
* option, for the same reason `signAccessUrl` has none: a signed URL that
|
|
537
|
+
* never expires is a public URL the moment someone forwards it.
|
|
538
|
+
*/
|
|
539
|
+
expiresInSeconds: number;
|
|
540
|
+
/**
|
|
541
|
+
* The tenant this signature speaks for. Defaults to the process-global
|
|
542
|
+
* (`setTenantId`, or a `NitidaClient` with `tenantId`) — the tenant is part
|
|
543
|
+
* of the signed message, so it cannot be guessed from the asset.
|
|
544
|
+
*/
|
|
545
|
+
tenantId?: number;
|
|
546
|
+
/** Injectable clock, for tests that need a URL already dead on arrival. */
|
|
547
|
+
nowSeconds?: number;
|
|
548
|
+
};
|
|
549
|
+
/**
|
|
550
|
+
* The public name of a signing key, derived from the key itself, so a signer
|
|
551
|
+
* never has to be told a second value. Byte-identical to the origin's
|
|
552
|
+
* `deriveKid`.
|
|
553
|
+
*/
|
|
554
|
+
declare function deriveTransformKid(signingKey: string): Promise<string>;
|
|
555
|
+
/**
|
|
556
|
+
* The signed message. Byte-identical to the origin's `transformMessage`.
|
|
557
|
+
*
|
|
558
|
+
* nitida/transform/v2 \n <tenantPrefix> \n <exp> \n <dsl>/<filename>
|
|
559
|
+
*/
|
|
560
|
+
declare function transformMessage(args: {
|
|
561
|
+
tenantPrefix: string;
|
|
562
|
+
exp: number;
|
|
563
|
+
canonicalDsl: string;
|
|
564
|
+
filename: string;
|
|
565
|
+
}): string;
|
|
440
566
|
/**
|
|
441
567
|
* Sign a transform URL with the tenant's HMAC signing key. Appends
|
|
442
|
-
* `?
|
|
568
|
+
* `?kid=<8 hex>&exp=<unix seconds>&sig=<64 hex>`.
|
|
443
569
|
*
|
|
444
570
|
* Must agree byte-for-byte with the server's `verifyTransformSignature`.
|
|
445
571
|
* Uses WebCrypto, so works in browsers, Node ≥ 16, Bun, and Workers.
|
|
@@ -447,8 +573,20 @@ declare function getSignedTransformUrl(asset: Pick<AssetDTO, "sha"> & Visibility
|
|
|
447
573
|
* The canonical DSL is the one already produced by `serializeTransform`
|
|
448
574
|
* (sort keys + lowercase strings), so signing a URL built by `getTransformUrl`
|
|
449
575
|
* is automatic — the same canonical form is in the URL path.
|
|
576
|
+
*
|
|
577
|
+
* ## ⚠️ `exp` IS ROUNDED DOWN TO THE MINUTE, AND THAT IS LOAD-BEARING
|
|
578
|
+
*
|
|
579
|
+
* The edge cache key for `/t/` is the FULL URL. A per-request `exp` would make
|
|
580
|
+
* every render of the same image a distinct cache entry — turning a path that
|
|
581
|
+
* reaches the origin roughly never into one that reaches it on every view.
|
|
582
|
+
* Rounding down to the minute means every renderer signing the same URL in the
|
|
583
|
+
* same minute produces the same bytes, so the entry is shared. Down, never up,
|
|
584
|
+
* so the URL never outlives the lifetime the caller asked for.
|
|
585
|
+
*
|
|
586
|
+
* A build-time signer that wants ONE stable URL per deploy should pass a fixed
|
|
587
|
+
* `nowSeconds` (the build timestamp) rather than a longer lifetime.
|
|
450
588
|
*/
|
|
451
|
-
declare function signTransformUrl(unsignedUrl: string, signingKey: string): Promise<string>;
|
|
589
|
+
declare function signTransformUrl(unsignedUrl: string, signingKey: string, opts: SignTransformOptions): Promise<string>;
|
|
452
590
|
/**
|
|
453
591
|
* Build a responsive `srcSet` string by generating one transform URL per
|
|
454
592
|
* width. All other options apply to every URL.
|
|
@@ -583,19 +721,23 @@ type VariantPreset = "thumb" | "sm" | "md" | "lg" | "xl" | "original" | "poster"
|
|
|
583
721
|
* **`probe` is requestable and was not on `VariantPreset` at all**, so the type
|
|
584
722
|
* forbade a request the server has always accepted.
|
|
585
723
|
*
|
|
586
|
-
*
|
|
587
|
-
*
|
|
588
|
-
*
|
|
589
|
-
*
|
|
724
|
+
* Generated from the Elysia schemas of all four write routes — `/assets/process`,
|
|
725
|
+
* the presign route, `/assets/:id/regenerate` and both multipart routes —
|
|
726
|
+
* by `scripts/gen-docs.ts` (doc derivar WS-4). `bun run gen:docs` rewrites it;
|
|
727
|
+
* `--check` fails the build if a route's schema drifts and nobody reran it.
|
|
728
|
+
* `probe` is still frames at evenly spaced offsets, stored under indexed keys
|
|
729
|
+
* (`-pr0.jpg`, `-pr1.jpg`, …) — requestable, and deliberately absent from the
|
|
730
|
+
* compact `presets` wire string, so it is here and not on `VariantPreset`.
|
|
590
731
|
*/
|
|
591
|
-
|
|
732
|
+
declare const REQUESTABLE_PRESETS: readonly ["aiproxy", "lg", "md", "original", "poster", "probe", "sm", "thumb", "video", "xl"];
|
|
733
|
+
type RequestablePreset = (typeof REQUESTABLE_PRESETS)[number];
|
|
592
734
|
/**
|
|
593
|
-
*
|
|
594
|
-
*
|
|
595
|
-
*
|
|
596
|
-
*
|
|
597
|
-
*
|
|
598
|
-
*
|
|
735
|
+
* `REQUESTABLE_PRESETS` (above) is the same set as `RequestablePreset`, at
|
|
736
|
+
* RUNTIME. The type stops the mistake in TypeScript. It cannot stop it
|
|
737
|
+
* anywhere else, and "anywhere else" is where it keeps happening: a preset
|
|
738
|
+
* list assembled from config, from a route body, from JSON, or from a
|
|
739
|
+
* script's argv arrives as `string[]`, and the only way past the type was a
|
|
740
|
+
* cast.
|
|
599
741
|
*
|
|
600
742
|
* Measured in neo-real-estate on 2026-08-23, in THREE independent files:
|
|
601
743
|
*
|
|
@@ -607,7 +749,6 @@ type RequestablePreset = Exclude<VariantPreset, "hls" | "mp3"> | "probe";
|
|
|
607
749
|
*
|
|
608
750
|
* So the narrowing lives here, once, instead of being re-invented per repo.
|
|
609
751
|
*/
|
|
610
|
-
declare const REQUESTABLE_PRESETS: readonly RequestablePreset[];
|
|
611
752
|
/** Type guard for a single value. */
|
|
612
753
|
declare const isRequestablePreset: (v: string) => v is RequestablePreset;
|
|
613
754
|
/**
|
|
@@ -957,7 +1098,7 @@ declare function getPrivateAssetUrl(asset: Pick<AssetDTO, "sha"> & OriginalHints
|
|
|
957
1098
|
* `number`: a signed URL is a trusted caller, so the edge ladder does not
|
|
958
1099
|
* apply — the same rule `getSignedTransformUrl` already follows.
|
|
959
1100
|
*/
|
|
960
|
-
declare function getPrivateTransformUrl(asset: Pick<AssetDTO, "sha">, opts:
|
|
1101
|
+
declare function getPrivateTransformUrl(asset: Pick<AssetDTO, "sha">, opts: PrivateTransformOptions, signingKey: string, signOpts: SignAccessOptions): Promise<string | null>;
|
|
961
1102
|
/**
|
|
962
1103
|
* Did the processor actually generate this preset?
|
|
963
1104
|
*
|
|
@@ -995,4 +1136,4 @@ declare function getAssetDimensions(asset: Pick<AssetDTO, "w" | "h">): {
|
|
|
995
1136
|
height: number;
|
|
996
1137
|
} | null;
|
|
997
1138
|
|
|
998
|
-
export { type AssetDTO, type AssetPalette, type AssetVariant, type HlsRung, PRESET_EXT, PRESET_LONG, PRESET_MAX_DIM, PRESET_SHORT, type PaletteSwatch, REQUESTABLE_PRESETS, type RequestablePreset, type ResolveSlotOptions, type SignAccessOptions, type SignedTransformOptions, type SlotDTO, type SlotResolution, TRANSFORM_WIDTHS, type TransformEffect, type TransformFit, type TransformFormat, type TransformGravity, type TransformOptions, type TransformWidth, type VariantEntryPreset, type VariantPreset, type VisibilityHint, accessMessage, assertPublic, assertSha, bestTextContrast, computeVariantDimensions, configureSlotResolver, contrastRatio, deriveAccessKey, extractAssetSha, getAmbientGradient, getAssetDimensions, getAssetSrcSet, getAssetUrl, getCdnBase, getHlsLadder, getHlsStreamingUrl, getPaletteBlurBackground, getPaletteCssVars, getPrivateAssetUrl, getPrivateTransformUrl, getSignedTransformUrl, getTenantId, getTextColorForBackground, getTransformSrcSet, getTransformUrl, getVideoTransformUrl, hasPreset, hlsLadderAlignment, invalidateSlotCache, isRequestablePreset, iteratePaletteSwatches, pickAmbientBackground, relativeLuminance, resolveSlot, resolveSlots, serializeTransform, setCdnBase, setTenantId, signAccessUrl, signTransformUrl, toRequestablePresets };
|
|
1139
|
+
export { type AssetDTO, type AssetPalette, type AssetVariant, type HlsRung, MAX_SIGNED_TRANSFORM_TTL_SECONDS, MAX_SIGNED_URL_TTL_SECONDS, MIN_SIGNED_TRANSFORM_TTL_SECONDS, PRESET_EXT, PRESET_LONG, PRESET_MAX_DIM, PRESET_SHORT, type PaletteSwatch, type PrivateTransformOptions, REQUESTABLE_PRESETS, type RequestablePreset, type ResolveSlotOptions, type SignAccessOptions, type SignTransformOptions, type SignedTransformOptions, type SlotDTO, type SlotResolution, TRANSFORM_WIDTHS, type TransformEffect, type TransformFit, type TransformFormat, type TransformGravity, type TransformOptions, type TransformWidth, type VariantEntryPreset, type VariantPreset, type VisibilityHint, accessMessage, assertPublic, assertSha, bestTextContrast, computeVariantDimensions, configureSlotResolver, contrastRatio, deriveAccessKey, deriveTransformKid, extractAssetSha, getAmbientGradient, getAssetDimensions, getAssetSrcSet, getAssetUrl, getCdnBase, getHlsLadder, getHlsStreamingUrl, getPaletteBlurBackground, getPaletteCssVars, getPrivateAssetUrl, getPrivateTransformUrl, getSignedTransformUrl, getTenantId, getTextColorForBackground, getTransformSrcSet, getTransformUrl, getVideoTransformUrl, hasPreset, hlsLadderAlignment, invalidateSlotCache, isRequestablePreset, iteratePaletteSwatches, pickAmbientBackground, relativeLuminance, resolveSlot, resolveSlots, serializeTransform, setCdnBase, setTenantId, signAccessUrl, signTransformUrl, toRequestablePresets, transformMessage };
|