@corbet-labs/cink 0.1.0 → 0.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@corbet-labs/cink",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Handwritten signature image rendering for correspondence. Pixels, not signatures. Mirrors the cink Rust crate release line.",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "publishConfig": {
@@ -1,3 +1,3 @@
1
1
  // GENERATED by scripts/sync-assets.sh — do not edit.
2
- export const PACKAGE_VERSION = "0.1.0";
2
+ export const PACKAGE_VERSION = "0.1.1";
3
3
  export const DEFAULTS = {"max_pixels": 1600, "formats": ["png", "jpeg", "svg"]};
package/src/index.ts CHANGED
@@ -32,6 +32,11 @@ export function defaultMaxPixels(): number {
32
32
  return defaults.max_pixels;
33
33
  }
34
34
 
35
+ /** Accepted image formats, from `tables/defaults.json`. */
36
+ export function supportedFormats(): string[] {
37
+ return [...defaults.formats].sort();
38
+ }
39
+
35
40
  const PNG_MAGIC = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a];
36
41
 
37
42
  function pngDimensions(bytes: Uint8Array): [number, number] | null {