@squoosh-kit/resize 0.0.42 → 0.0.43

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.
Files changed (61) hide show
  1. package/dist/bridge.d.ts +4 -1
  2. package/dist/bridge.d.ts.map +1 -1
  3. package/dist/index.browser.mjs +577 -2
  4. package/dist/index.browser.mjs.map +14 -4
  5. package/dist/index.bun.js +577 -2
  6. package/dist/index.bun.js.map +14 -4
  7. package/dist/index.d.ts +2 -1
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.node.cjs +599 -2
  10. package/dist/index.node.cjs.map +14 -4
  11. package/dist/index.node.mjs +577 -2
  12. package/dist/index.node.mjs.map +14 -4
  13. package/dist/resize.worker.browser.mjs +503 -2
  14. package/dist/resize.worker.browser.mjs.map +10 -4
  15. package/dist/resize.worker.bun.js +503 -2
  16. package/dist/resize.worker.bun.js.map +10 -4
  17. package/dist/resize.worker.node.cjs +517 -2
  18. package/dist/resize.worker.node.cjs.map +10 -4
  19. package/dist/resize.worker.node.mjs +503 -2
  20. package/dist/resize.worker.node.mjs.map +10 -4
  21. package/package.json +2 -2
  22. package/dist/bridge.browser.mjs +0 -4
  23. package/dist/bridge.browser.mjs.map +0 -13
  24. package/dist/bridge.bun.js +0 -5
  25. package/dist/bridge.bun.js.map +0 -13
  26. package/dist/bridge.node.cjs +0 -3
  27. package/dist/bridge.node.cjs.map +0 -13
  28. package/dist/bridge.node.mjs +0 -4
  29. package/dist/bridge.node.mjs.map +0 -13
  30. package/dist/chunk-5vdxd0v3.js +0 -4
  31. package/dist/chunk-5vdxd0v3.js.map +0 -10
  32. package/dist/chunk-8y42hv65.js +0 -5
  33. package/dist/chunk-8y42hv65.js.map +0 -9
  34. package/dist/chunk-bhj61bkd.js +0 -4
  35. package/dist/chunk-bhj61bkd.js.map +0 -9
  36. package/dist/chunk-c6cx0d7q.js +0 -4
  37. package/dist/chunk-c6cx0d7q.js.map +0 -9
  38. package/dist/chunk-djaabg7r.js +0 -3
  39. package/dist/chunk-djaabg7r.js.map +0 -9
  40. package/dist/chunk-gw29pvyv.js +0 -3
  41. package/dist/chunk-gw29pvyv.js.map +0 -10
  42. package/dist/chunk-q0apy7nk.js +0 -5
  43. package/dist/chunk-q0apy7nk.js.map +0 -10
  44. package/dist/chunk-szbj3b6y.js +0 -4
  45. package/dist/chunk-szbj3b6y.js.map +0 -10
  46. package/dist/types.browser.mjs +0 -2
  47. package/dist/types.browser.mjs.map +0 -9
  48. package/dist/types.bun.js +0 -3
  49. package/dist/types.bun.js.map +0 -9
  50. package/dist/types.node.cjs +0 -3
  51. package/dist/types.node.cjs.map +0 -9
  52. package/dist/types.node.mjs +0 -2
  53. package/dist/types.node.mjs.map +0 -9
  54. package/dist/validators.browser.mjs +0 -4
  55. package/dist/validators.browser.mjs.map +0 -10
  56. package/dist/validators.bun.js +0 -5
  57. package/dist/validators.bun.js.map +0 -10
  58. package/dist/validators.node.cjs +0 -3
  59. package/dist/validators.node.cjs.map +0 -10
  60. package/dist/validators.node.mjs +0 -4
  61. package/dist/validators.node.mjs.map +0 -10
@@ -1,9 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [
5
- ],
6
- "mappings": "",
7
- "debugId": "DD012EC9AF92EB4264756E2164756E21",
8
- "names": []
9
- }
@@ -1,4 +0,0 @@
1
- import{createRequire as k}from"node:module";var g=Object.create;var{getPrototypeOf:h,defineProperty:e,getOwnPropertyNames:i}=Object;var j=Object.prototype.hasOwnProperty;var l=(a,f,b)=>{b=a!=null?g(h(a)):{};let c=f||!a||!a.__esModule?e(b,"default",{value:a,enumerable:!0}):b;for(let d of i(a))if(!j.call(c,d))e(c,d,{get:()=>a[d],enumerable:!0});return c};var n=k(import.meta.url);
2
- export{l as d,n as e};
3
-
4
- //# debugId=F652FC5CA4201BB864756E2164756E21
@@ -1,9 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [
5
- ],
6
- "mappings": "",
7
- "debugId": "F652FC5CA4201BB864756E2164756E21",
8
- "names": []
9
- }
@@ -1,3 +0,0 @@
1
- var j=Object.create;var{getPrototypeOf:k,defineProperty:e,getOwnPropertyNames:h,getOwnPropertyDescriptor:l}=Object,i=Object.prototype.hasOwnProperty;var m=(a,b,c)=>{c=a!=null?j(k(a)):{};let d=b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c;for(let f of h(a))if(!i.call(d,f))e(d,f,{get:()=>a[f],enumerable:!0});return d},g=new WeakMap,n=(a)=>{var b=g.get(a),c;if(b)return b;if(b=e({},"__esModule",{value:!0}),a&&typeof a==="object"||typeof a==="function")h(a).map((d)=>!i.call(b,d)&&e(b,d,{get:()=>a[d],enumerable:!(c=l(a,d))||c.enumerable}));return g.set(a,b),b};var o=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0,configurable:!0,set:(d)=>b[c]=()=>d})};
2
-
3
- //# debugId=13132CCCB2E09AB364756E2164756E21
@@ -1,9 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [
5
- ],
6
- "mappings": "",
7
- "debugId": "13132CCCB2E09AB364756E2164756E21",
8
- "names": []
9
- }
@@ -1,3 +0,0 @@
1
- function H(F){if(!F||typeof F!=="object")throw TypeError("image must be an object");let D=F;if(!("data"in D))throw TypeError("image.data is required");let{data:E}=D;if(!(E instanceof Uint8Array||E instanceof Uint8ClampedArray))throw TypeError("image.data must be Uint8Array or Uint8ClampedArray");if(!("width"in D)||!("height"in D))throw TypeError("image.width and image.height are required");let{width:l,height:q}=D;if(typeof l!=="number"||!Number.isInteger(l)||l<=0)throw RangeError(`image.width must be a positive integer, got ${l}`);if(typeof q!=="number"||!Number.isInteger(q)||q<=0)throw RangeError(`image.height must be a positive integer, got ${q}`);let G=l*q*4;if(E.length<G)throw RangeError(`image.data too small: ${E.length} bytes, expected at least ${G} bytes for ${l}x${q} RGBA image`)}
2
-
3
- //# debugId=09889CC44937212964756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../runtime/src/validators.ts"],
4
- "sourcesContent": [
5
- "import type { ImageInput } from './types.js';\n\nexport function validateArrayBuffer(\n buffer: unknown\n): asserts buffer is ArrayBuffer {\n // Check if SharedArrayBuffer is defined in the current environment before using it\n if (\n typeof SharedArrayBuffer !== 'undefined' &&\n buffer instanceof SharedArrayBuffer\n ) {\n throw new Error(\n 'SharedArrayBuffer is not supported. ' +\n 'Use regular ArrayBuffer or Uint8Array instead.'\n );\n }\n\n if (!(buffer instanceof ArrayBuffer)) {\n throw new TypeError('image.data.buffer must be an ArrayBuffer');\n }\n}\n\nexport function validateImageInput(\n image: unknown\n): asserts image is ImageInput {\n if (!image || typeof image !== 'object') {\n throw new TypeError('image must be an object');\n }\n\n const imageObj = image as Record<string, unknown>;\n\n if (!('data' in imageObj)) {\n throw new TypeError('image.data is required');\n }\n\n const { data } = imageObj;\n if (!(data instanceof Uint8Array || data instanceof Uint8ClampedArray)) {\n throw new TypeError('image.data must be Uint8Array or Uint8ClampedArray');\n }\n\n if (!('width' in imageObj) || !('height' in imageObj)) {\n throw new TypeError('image.width and image.height are required');\n }\n\n const { width, height } = imageObj;\n\n if (typeof width !== 'number' || !Number.isInteger(width) || width <= 0) {\n throw new RangeError(\n `image.width must be a positive integer, got ${width}`\n );\n }\n\n if (typeof height !== 'number' || !Number.isInteger(height) || height <= 0) {\n throw new RangeError(\n `image.height must be a positive integer, got ${height}`\n );\n }\n\n const expectedSize = width * height * 4;\n if (data.length < expectedSize) {\n throw new RangeError(\n `image.data too small: ${data.length} bytes, expected at least ${expectedSize} bytes for ${width}x${height} RGBA image`\n );\n }\n}\n"
6
- ],
7
- "mappings": "AAqBO,SAAS,CAAkB,CAChC,EAC6B,CAC7B,GAAI,CAAC,GAAS,OAAO,IAAU,SAC7B,MAAU,UAAU,yBAAyB,EAG/C,IAAM,EAAW,EAEjB,GAAI,EAAE,SAAU,GACd,MAAU,UAAU,wBAAwB,EAG9C,IAAQ,QAAS,EACjB,GAAI,EAAE,aAAgB,YAAc,aAAgB,mBAClD,MAAU,UAAU,oDAAoD,EAG1E,GAAI,EAAE,UAAW,IAAa,EAAE,WAAY,GAC1C,MAAU,UAAU,2CAA2C,EAGjE,IAAQ,QAAO,UAAW,EAE1B,GAAI,OAAO,IAAU,UAAY,CAAC,OAAO,UAAU,CAAK,GAAK,GAAS,EACpE,MAAU,WACR,+CAA+C,GACjD,EAGF,GAAI,OAAO,IAAW,UAAY,CAAC,OAAO,UAAU,CAAM,GAAK,GAAU,EACvE,MAAU,WACR,gDAAgD,GAClD,EAGF,IAAM,EAAe,EAAQ,EAAS,EACtC,GAAI,EAAK,OAAS,EAChB,MAAU,WACR,yBAAyB,EAAK,mCAAmC,eAA0B,KAAS,cACtG",
8
- "debugId": "09889CC44937212964756E2164756E21",
9
- "names": []
10
- }
@@ -1,5 +0,0 @@
1
- // @bun
2
- function H(F){if(!F||typeof F!=="object")throw TypeError("image must be an object");let D=F;if(!("data"in D))throw TypeError("image.data is required");let{data:E}=D;if(!(E instanceof Uint8Array||E instanceof Uint8ClampedArray))throw TypeError("image.data must be Uint8Array or Uint8ClampedArray");if(!("width"in D)||!("height"in D))throw TypeError("image.width and image.height are required");let{width:l,height:q}=D;if(typeof l!=="number"||!Number.isInteger(l)||l<=0)throw RangeError(`image.width must be a positive integer, got ${l}`);if(typeof q!=="number"||!Number.isInteger(q)||q<=0)throw RangeError(`image.height must be a positive integer, got ${q}`);let G=l*q*4;if(E.length<G)throw RangeError(`image.data too small: ${E.length} bytes, expected at least ${G} bytes for ${l}x${q} RGBA image`)}
3
- export{H as b};
4
-
5
- //# debugId=7AE3A24486B7640E64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../runtime/src/validators.ts"],
4
- "sourcesContent": [
5
- "import type { ImageInput } from './types.js';\n\nexport function validateArrayBuffer(\n buffer: unknown\n): asserts buffer is ArrayBuffer {\n // Check if SharedArrayBuffer is defined in the current environment before using it\n if (\n typeof SharedArrayBuffer !== 'undefined' &&\n buffer instanceof SharedArrayBuffer\n ) {\n throw new Error(\n 'SharedArrayBuffer is not supported. ' +\n 'Use regular ArrayBuffer or Uint8Array instead.'\n );\n }\n\n if (!(buffer instanceof ArrayBuffer)) {\n throw new TypeError('image.data.buffer must be an ArrayBuffer');\n }\n}\n\nexport function validateImageInput(\n image: unknown\n): asserts image is ImageInput {\n if (!image || typeof image !== 'object') {\n throw new TypeError('image must be an object');\n }\n\n const imageObj = image as Record<string, unknown>;\n\n if (!('data' in imageObj)) {\n throw new TypeError('image.data is required');\n }\n\n const { data } = imageObj;\n if (!(data instanceof Uint8Array || data instanceof Uint8ClampedArray)) {\n throw new TypeError('image.data must be Uint8Array or Uint8ClampedArray');\n }\n\n if (!('width' in imageObj) || !('height' in imageObj)) {\n throw new TypeError('image.width and image.height are required');\n }\n\n const { width, height } = imageObj;\n\n if (typeof width !== 'number' || !Number.isInteger(width) || width <= 0) {\n throw new RangeError(\n `image.width must be a positive integer, got ${width}`\n );\n }\n\n if (typeof height !== 'number' || !Number.isInteger(height) || height <= 0) {\n throw new RangeError(\n `image.height must be a positive integer, got ${height}`\n );\n }\n\n const expectedSize = width * height * 4;\n if (data.length < expectedSize) {\n throw new RangeError(\n `image.data too small: ${data.length} bytes, expected at least ${expectedSize} bytes for ${width}x${height} RGBA image`\n );\n }\n}\n"
6
- ],
7
- "mappings": ";AAqBO,SAAS,CAAkB,CAChC,EAC6B,CAC7B,GAAI,CAAC,GAAS,OAAO,IAAU,SAC7B,MAAU,UAAU,yBAAyB,EAG/C,IAAM,EAAW,EAEjB,GAAI,EAAE,SAAU,GACd,MAAU,UAAU,wBAAwB,EAG9C,IAAQ,QAAS,EACjB,GAAI,EAAE,aAAgB,YAAc,aAAgB,mBAClD,MAAU,UAAU,oDAAoD,EAG1E,GAAI,EAAE,UAAW,IAAa,EAAE,WAAY,GAC1C,MAAU,UAAU,2CAA2C,EAGjE,IAAQ,QAAO,UAAW,EAE1B,GAAI,OAAO,IAAU,UAAY,CAAC,OAAO,UAAU,CAAK,GAAK,GAAS,EACpE,MAAU,WACR,+CAA+C,GACjD,EAGF,GAAI,OAAO,IAAW,UAAY,CAAC,OAAO,UAAU,CAAM,GAAK,GAAU,EACvE,MAAU,WACR,gDAAgD,GAClD,EAGF,IAAM,EAAe,EAAQ,EAAS,EACtC,GAAI,EAAK,OAAS,EAChB,MAAU,WACR,yBAAyB,EAAK,mCAAmC,eAA0B,KAAS,cACtG",
8
- "debugId": "7AE3A24486B7640E64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- function H(F){if(!F||typeof F!=="object")throw TypeError("image must be an object");let D=F;if(!("data"in D))throw TypeError("image.data is required");let{data:E}=D;if(!(E instanceof Uint8Array||E instanceof Uint8ClampedArray))throw TypeError("image.data must be Uint8Array or Uint8ClampedArray");if(!("width"in D)||!("height"in D))throw TypeError("image.width and image.height are required");let{width:l,height:q}=D;if(typeof l!=="number"||!Number.isInteger(l)||l<=0)throw RangeError(`image.width must be a positive integer, got ${l}`);if(typeof q!=="number"||!Number.isInteger(q)||q<=0)throw RangeError(`image.height must be a positive integer, got ${q}`);let G=l*q*4;if(E.length<G)throw RangeError(`image.data too small: ${E.length} bytes, expected at least ${G} bytes for ${l}x${q} RGBA image`)}
2
- export{H as b};
3
-
4
- //# debugId=BE7FDBD72E428B8E64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../runtime/src/validators.ts"],
4
- "sourcesContent": [
5
- "import type { ImageInput } from './types.js';\n\nexport function validateArrayBuffer(\n buffer: unknown\n): asserts buffer is ArrayBuffer {\n // Check if SharedArrayBuffer is defined in the current environment before using it\n if (\n typeof SharedArrayBuffer !== 'undefined' &&\n buffer instanceof SharedArrayBuffer\n ) {\n throw new Error(\n 'SharedArrayBuffer is not supported. ' +\n 'Use regular ArrayBuffer or Uint8Array instead.'\n );\n }\n\n if (!(buffer instanceof ArrayBuffer)) {\n throw new TypeError('image.data.buffer must be an ArrayBuffer');\n }\n}\n\nexport function validateImageInput(\n image: unknown\n): asserts image is ImageInput {\n if (!image || typeof image !== 'object') {\n throw new TypeError('image must be an object');\n }\n\n const imageObj = image as Record<string, unknown>;\n\n if (!('data' in imageObj)) {\n throw new TypeError('image.data is required');\n }\n\n const { data } = imageObj;\n if (!(data instanceof Uint8Array || data instanceof Uint8ClampedArray)) {\n throw new TypeError('image.data must be Uint8Array or Uint8ClampedArray');\n }\n\n if (!('width' in imageObj) || !('height' in imageObj)) {\n throw new TypeError('image.width and image.height are required');\n }\n\n const { width, height } = imageObj;\n\n if (typeof width !== 'number' || !Number.isInteger(width) || width <= 0) {\n throw new RangeError(\n `image.width must be a positive integer, got ${width}`\n );\n }\n\n if (typeof height !== 'number' || !Number.isInteger(height) || height <= 0) {\n throw new RangeError(\n `image.height must be a positive integer, got ${height}`\n );\n }\n\n const expectedSize = width * height * 4;\n if (data.length < expectedSize) {\n throw new RangeError(\n `image.data too small: ${data.length} bytes, expected at least ${expectedSize} bytes for ${width}x${height} RGBA image`\n );\n }\n}\n"
6
- ],
7
- "mappings": "AAqBO,SAAS,CAAkB,CAChC,EAC6B,CAC7B,GAAI,CAAC,GAAS,OAAO,IAAU,SAC7B,MAAU,UAAU,yBAAyB,EAG/C,IAAM,EAAW,EAEjB,GAAI,EAAE,SAAU,GACd,MAAU,UAAU,wBAAwB,EAG9C,IAAQ,QAAS,EACjB,GAAI,EAAE,aAAgB,YAAc,aAAgB,mBAClD,MAAU,UAAU,oDAAoD,EAG1E,GAAI,EAAE,UAAW,IAAa,EAAE,WAAY,GAC1C,MAAU,UAAU,2CAA2C,EAGjE,IAAQ,QAAO,UAAW,EAE1B,GAAI,OAAO,IAAU,UAAY,CAAC,OAAO,UAAU,CAAK,GAAK,GAAS,EACpE,MAAU,WACR,+CAA+C,GACjD,EAGF,GAAI,OAAO,IAAW,UAAY,CAAC,OAAO,UAAU,CAAM,GAAK,GAAU,EACvE,MAAU,WACR,gDAAgD,GAClD,EAGF,IAAM,EAAe,EAAQ,EAAS,EACtC,GAAI,EAAK,OAAS,EAChB,MAAU,WACR,yBAAyB,EAAK,mCAAmC,eAA0B,KAAS,cACtG",
8
- "debugId": "BE7FDBD72E428B8E64756E2164756E21",
9
- "names": []
10
- }
@@ -1,2 +0,0 @@
1
-
2
- //# debugId=5254286D45230B5164756E2164756E21
@@ -1,9 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [
5
- ],
6
- "mappings": "",
7
- "debugId": "5254286D45230B5164756E2164756E21",
8
- "names": []
9
- }
package/dist/types.bun.js DELETED
@@ -1,3 +0,0 @@
1
- // @bun
2
-
3
- //# debugId=C62DE98FABB155C564756E2164756E21
@@ -1,9 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [
5
- ],
6
- "mappings": "",
7
- "debugId": "C62DE98FABB155C564756E2164756E21",
8
- "names": []
9
- }
@@ -1,3 +0,0 @@
1
- var o={};module.exports=e(o);
2
-
3
- //# debugId=0F2D1FDC545AF92A64756E2164756E21
@@ -1,9 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [
5
- ],
6
- "mappings": "",
7
- "debugId": "0F2D1FDC545AF92A64756E2164756E21",
8
- "names": []
9
- }
@@ -1,2 +0,0 @@
1
-
2
- //# debugId=285B574416B32CBE64756E2164756E21
@@ -1,9 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": [],
4
- "sourcesContent": [
5
- ],
6
- "mappings": "",
7
- "debugId": "285B574416B32CBE64756E2164756E21",
8
- "names": []
9
- }
@@ -1,4 +0,0 @@
1
- import"./chunk-bhj61bkd.js";function i(t){if(typeof t!=="object"||t===null)throw TypeError("options must be an object");let e=t;if(e.width!==void 0){if(typeof e.width!=="number"||!Number.isInteger(e.width)||e.width<=0)throw RangeError(`options.width must be a positive integer, got ${e.width}`)}if(e.height!==void 0){if(typeof e.height!=="number"||!Number.isInteger(e.height)||e.height<=0)throw RangeError(`options.height must be a positive integer, got ${e.height}`)}if(e.method!==void 0){let o=["triangular","catrom","mitchell","lanczos3"];if(!o.includes(e.method))throw TypeError(`options.method must be one of: ${o.join(", ")}, got ${e.method}`)}if(e.premultiply!==void 0&&typeof e.premultiply!=="boolean")throw TypeError(`options.premultiply must be boolean, got ${typeof e.premultiply}`);if(e.linearRGB!==void 0&&typeof e.linearRGB!=="boolean")throw TypeError(`options.linearRGB must be boolean, got ${typeof e.linearRGB}`)}export{i as validateResizeOptions};
2
- export{i as c};
3
-
4
- //# debugId=D5E531B8ACC57E0364756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/validators.ts"],
4
- "sourcesContent": [
5
- "export function validateResizeOptions(options: unknown): asserts options is {\n width?: number;\n height?: number;\n method?: 'triangular' | 'catrom' | 'mitchell' | 'lanczos3';\n premultiply?: boolean;\n linearRGB?: boolean;\n} {\n if (typeof options !== 'object' || options === null) {\n throw new TypeError('options must be an object');\n }\n\n const opts = options as Record<string, unknown>;\n\n if (opts.width !== undefined) {\n if (\n typeof opts.width !== 'number' ||\n !Number.isInteger(opts.width) ||\n opts.width <= 0\n ) {\n throw new RangeError(\n `options.width must be a positive integer, got ${opts.width}`\n );\n }\n }\n\n if (opts.height !== undefined) {\n if (\n typeof opts.height !== 'number' ||\n !Number.isInteger(opts.height) ||\n opts.height <= 0\n ) {\n throw new RangeError(\n `options.height must be a positive integer, got ${opts.height}`\n );\n }\n }\n\n if (opts.method !== undefined) {\n const validMethods = ['triangular', 'catrom', 'mitchell', 'lanczos3'];\n if (!validMethods.includes(opts.method as string)) {\n throw new TypeError(\n `options.method must be one of: ${validMethods.join(', ')}, got ${opts.method}`\n );\n }\n }\n\n if (opts.premultiply !== undefined && typeof opts.premultiply !== 'boolean') {\n throw new TypeError(\n `options.premultiply must be boolean, got ${typeof opts.premultiply}`\n );\n }\n\n if (opts.linearRGB !== undefined && typeof opts.linearRGB !== 'boolean') {\n throw new TypeError(\n `options.linearRGB must be boolean, got ${typeof opts.linearRGB}`\n );\n }\n}\n"
6
- ],
7
- "mappings": "4BAAO,SAAS,CAAqB,CAAC,EAMpC,CACA,GAAI,OAAO,IAAY,UAAY,IAAY,KAC7C,MAAU,UAAU,2BAA2B,EAGjD,IAAM,EAAO,EAEb,GAAI,EAAK,QAAU,QACjB,GACE,OAAO,EAAK,QAAU,UACtB,CAAC,OAAO,UAAU,EAAK,KAAK,GAC5B,EAAK,OAAS,EAEd,MAAU,WACR,iDAAiD,EAAK,OACxD,EAIJ,GAAI,EAAK,SAAW,QAClB,GACE,OAAO,EAAK,SAAW,UACvB,CAAC,OAAO,UAAU,EAAK,MAAM,GAC7B,EAAK,QAAU,EAEf,MAAU,WACR,kDAAkD,EAAK,QACzD,EAIJ,GAAI,EAAK,SAAW,OAAW,CAC7B,IAAM,EAAe,CAAC,aAAc,SAAU,WAAY,UAAU,EACpE,GAAI,CAAC,EAAa,SAAS,EAAK,MAAgB,EAC9C,MAAU,UACR,kCAAkC,EAAa,KAAK,IAAI,UAAU,EAAK,QACzE,EAIJ,GAAI,EAAK,cAAgB,QAAa,OAAO,EAAK,cAAgB,UAChE,MAAU,UACR,4CAA4C,OAAO,EAAK,aAC1D,EAGF,GAAI,EAAK,YAAc,QAAa,OAAO,EAAK,YAAc,UAC5D,MAAU,UACR,0CAA0C,OAAO,EAAK,WACxD",
8
- "debugId": "D5E531B8ACC57E0364756E2164756E21",
9
- "names": []
10
- }
@@ -1,5 +0,0 @@
1
- // @bun
2
- import"./chunk-8y42hv65.js";function i(t){if(typeof t!=="object"||t===null)throw TypeError("options must be an object");let e=t;if(e.width!==void 0){if(typeof e.width!=="number"||!Number.isInteger(e.width)||e.width<=0)throw RangeError(`options.width must be a positive integer, got ${e.width}`)}if(e.height!==void 0){if(typeof e.height!=="number"||!Number.isInteger(e.height)||e.height<=0)throw RangeError(`options.height must be a positive integer, got ${e.height}`)}if(e.method!==void 0){let o=["triangular","catrom","mitchell","lanczos3"];if(!o.includes(e.method))throw TypeError(`options.method must be one of: ${o.join(", ")}, got ${e.method}`)}if(e.premultiply!==void 0&&typeof e.premultiply!=="boolean")throw TypeError(`options.premultiply must be boolean, got ${typeof e.premultiply}`);if(e.linearRGB!==void 0&&typeof e.linearRGB!=="boolean")throw TypeError(`options.linearRGB must be boolean, got ${typeof e.linearRGB}`)}export{i as validateResizeOptions};
3
- export{i as c};
4
-
5
- //# debugId=B7D538C0C8A2583D64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/validators.ts"],
4
- "sourcesContent": [
5
- "export function validateResizeOptions(options: unknown): asserts options is {\n width?: number;\n height?: number;\n method?: 'triangular' | 'catrom' | 'mitchell' | 'lanczos3';\n premultiply?: boolean;\n linearRGB?: boolean;\n} {\n if (typeof options !== 'object' || options === null) {\n throw new TypeError('options must be an object');\n }\n\n const opts = options as Record<string, unknown>;\n\n if (opts.width !== undefined) {\n if (\n typeof opts.width !== 'number' ||\n !Number.isInteger(opts.width) ||\n opts.width <= 0\n ) {\n throw new RangeError(\n `options.width must be a positive integer, got ${opts.width}`\n );\n }\n }\n\n if (opts.height !== undefined) {\n if (\n typeof opts.height !== 'number' ||\n !Number.isInteger(opts.height) ||\n opts.height <= 0\n ) {\n throw new RangeError(\n `options.height must be a positive integer, got ${opts.height}`\n );\n }\n }\n\n if (opts.method !== undefined) {\n const validMethods = ['triangular', 'catrom', 'mitchell', 'lanczos3'];\n if (!validMethods.includes(opts.method as string)) {\n throw new TypeError(\n `options.method must be one of: ${validMethods.join(', ')}, got ${opts.method}`\n );\n }\n }\n\n if (opts.premultiply !== undefined && typeof opts.premultiply !== 'boolean') {\n throw new TypeError(\n `options.premultiply must be boolean, got ${typeof opts.premultiply}`\n );\n }\n\n if (opts.linearRGB !== undefined && typeof opts.linearRGB !== 'boolean') {\n throw new TypeError(\n `options.linearRGB must be boolean, got ${typeof opts.linearRGB}`\n );\n }\n}\n"
6
- ],
7
- "mappings": ";4BAAO,SAAS,CAAqB,CAAC,EAMpC,CACA,GAAI,OAAO,IAAY,UAAY,IAAY,KAC7C,MAAU,UAAU,2BAA2B,EAGjD,IAAM,EAAO,EAEb,GAAI,EAAK,QAAU,QACjB,GACE,OAAO,EAAK,QAAU,UACtB,CAAC,OAAO,UAAU,EAAK,KAAK,GAC5B,EAAK,OAAS,EAEd,MAAU,WACR,iDAAiD,EAAK,OACxD,EAIJ,GAAI,EAAK,SAAW,QAClB,GACE,OAAO,EAAK,SAAW,UACvB,CAAC,OAAO,UAAU,EAAK,MAAM,GAC7B,EAAK,QAAU,EAEf,MAAU,WACR,kDAAkD,EAAK,QACzD,EAIJ,GAAI,EAAK,SAAW,OAAW,CAC7B,IAAM,EAAe,CAAC,aAAc,SAAU,WAAY,UAAU,EACpE,GAAI,CAAC,EAAa,SAAS,EAAK,MAAgB,EAC9C,MAAU,UACR,kCAAkC,EAAa,KAAK,IAAI,UAAU,EAAK,QACzE,EAIJ,GAAI,EAAK,cAAgB,QAAa,OAAO,EAAK,cAAgB,UAChE,MAAU,UACR,4CAA4C,OAAO,EAAK,aAC1D,EAGF,GAAI,EAAK,YAAc,QAAa,OAAO,EAAK,YAAc,UAC5D,MAAU,UACR,0CAA0C,OAAO,EAAK,WACxD",
8
- "debugId": "B7D538C0C8A2583D64756E2164756E21",
9
- "names": []
10
- }
@@ -1,3 +0,0 @@
1
- var h={};n(h,{validateResizeOptions:()=>r});module.exports=i(h);function r(t){if(typeof t!=="object"||t===null)throw TypeError("options must be an object");let e=t;if(e.width!==void 0){if(typeof e.width!=="number"||!Number.isInteger(e.width)||e.width<=0)throw RangeError(`options.width must be a positive integer, got ${e.width}`)}if(e.height!==void 0){if(typeof e.height!=="number"||!Number.isInteger(e.height)||e.height<=0)throw RangeError(`options.height must be a positive integer, got ${e.height}`)}if(e.method!==void 0){let o=["triangular","catrom","mitchell","lanczos3"];if(!o.includes(e.method))throw TypeError(`options.method must be one of: ${o.join(", ")}, got ${e.method}`)}if(e.premultiply!==void 0&&typeof e.premultiply!=="boolean")throw TypeError(`options.premultiply must be boolean, got ${typeof e.premultiply}`);if(e.linearRGB!==void 0&&typeof e.linearRGB!=="boolean")throw TypeError(`options.linearRGB must be boolean, got ${typeof e.linearRGB}`)}
2
-
3
- //# debugId=DB7790F192AB0E5F64756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/validators.ts"],
4
- "sourcesContent": [
5
- "export function validateResizeOptions(options: unknown): asserts options is {\n width?: number;\n height?: number;\n method?: 'triangular' | 'catrom' | 'mitchell' | 'lanczos3';\n premultiply?: boolean;\n linearRGB?: boolean;\n} {\n if (typeof options !== 'object' || options === null) {\n throw new TypeError('options must be an object');\n }\n\n const opts = options as Record<string, unknown>;\n\n if (opts.width !== undefined) {\n if (\n typeof opts.width !== 'number' ||\n !Number.isInteger(opts.width) ||\n opts.width <= 0\n ) {\n throw new RangeError(\n `options.width must be a positive integer, got ${opts.width}`\n );\n }\n }\n\n if (opts.height !== undefined) {\n if (\n typeof opts.height !== 'number' ||\n !Number.isInteger(opts.height) ||\n opts.height <= 0\n ) {\n throw new RangeError(\n `options.height must be a positive integer, got ${opts.height}`\n );\n }\n }\n\n if (opts.method !== undefined) {\n const validMethods = ['triangular', 'catrom', 'mitchell', 'lanczos3'];\n if (!validMethods.includes(opts.method as string)) {\n throw new TypeError(\n `options.method must be one of: ${validMethods.join(', ')}, got ${opts.method}`\n );\n }\n }\n\n if (opts.premultiply !== undefined && typeof opts.premultiply !== 'boolean') {\n throw new TypeError(\n `options.premultiply must be boolean, got ${typeof opts.premultiply}`\n );\n }\n\n if (opts.linearRGB !== undefined && typeof opts.linearRGB !== 'boolean') {\n throw new TypeError(\n `options.linearRGB must be boolean, got ${typeof opts.linearRGB}`\n );\n }\n}\n"
6
- ],
7
- "mappings": "gEAAO,SAAS,CAAqB,CAAC,EAMpC,CACA,GAAI,OAAO,IAAY,UAAY,IAAY,KAC7C,MAAU,UAAU,2BAA2B,EAGjD,IAAM,EAAO,EAEb,GAAI,EAAK,QAAU,QACjB,GACE,OAAO,EAAK,QAAU,UACtB,CAAC,OAAO,UAAU,EAAK,KAAK,GAC5B,EAAK,OAAS,EAEd,MAAU,WACR,iDAAiD,EAAK,OACxD,EAIJ,GAAI,EAAK,SAAW,QAClB,GACE,OAAO,EAAK,SAAW,UACvB,CAAC,OAAO,UAAU,EAAK,MAAM,GAC7B,EAAK,QAAU,EAEf,MAAU,WACR,kDAAkD,EAAK,QACzD,EAIJ,GAAI,EAAK,SAAW,OAAW,CAC7B,IAAM,EAAe,CAAC,aAAc,SAAU,WAAY,UAAU,EACpE,GAAI,CAAC,EAAa,SAAS,EAAK,MAAgB,EAC9C,MAAU,UACR,kCAAkC,EAAa,KAAK,IAAI,UAAU,EAAK,QACzE,EAIJ,GAAI,EAAK,cAAgB,QAAa,OAAO,EAAK,cAAgB,UAChE,MAAU,UACR,4CAA4C,OAAO,EAAK,aAC1D,EAGF,GAAI,EAAK,YAAc,QAAa,OAAO,EAAK,YAAc,UAC5D,MAAU,UACR,0CAA0C,OAAO,EAAK,WACxD",
8
- "debugId": "DB7790F192AB0E5F64756E2164756E21",
9
- "names": []
10
- }
@@ -1,4 +0,0 @@
1
- import"./chunk-c6cx0d7q.js";function i(t){if(typeof t!=="object"||t===null)throw TypeError("options must be an object");let e=t;if(e.width!==void 0){if(typeof e.width!=="number"||!Number.isInteger(e.width)||e.width<=0)throw RangeError(`options.width must be a positive integer, got ${e.width}`)}if(e.height!==void 0){if(typeof e.height!=="number"||!Number.isInteger(e.height)||e.height<=0)throw RangeError(`options.height must be a positive integer, got ${e.height}`)}if(e.method!==void 0){let o=["triangular","catrom","mitchell","lanczos3"];if(!o.includes(e.method))throw TypeError(`options.method must be one of: ${o.join(", ")}, got ${e.method}`)}if(e.premultiply!==void 0&&typeof e.premultiply!=="boolean")throw TypeError(`options.premultiply must be boolean, got ${typeof e.premultiply}`);if(e.linearRGB!==void 0&&typeof e.linearRGB!=="boolean")throw TypeError(`options.linearRGB must be boolean, got ${typeof e.linearRGB}`)}export{i as validateResizeOptions};
2
- export{i as c};
3
-
4
- //# debugId=A0B497FD9CA604D864756E2164756E21
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/validators.ts"],
4
- "sourcesContent": [
5
- "export function validateResizeOptions(options: unknown): asserts options is {\n width?: number;\n height?: number;\n method?: 'triangular' | 'catrom' | 'mitchell' | 'lanczos3';\n premultiply?: boolean;\n linearRGB?: boolean;\n} {\n if (typeof options !== 'object' || options === null) {\n throw new TypeError('options must be an object');\n }\n\n const opts = options as Record<string, unknown>;\n\n if (opts.width !== undefined) {\n if (\n typeof opts.width !== 'number' ||\n !Number.isInteger(opts.width) ||\n opts.width <= 0\n ) {\n throw new RangeError(\n `options.width must be a positive integer, got ${opts.width}`\n );\n }\n }\n\n if (opts.height !== undefined) {\n if (\n typeof opts.height !== 'number' ||\n !Number.isInteger(opts.height) ||\n opts.height <= 0\n ) {\n throw new RangeError(\n `options.height must be a positive integer, got ${opts.height}`\n );\n }\n }\n\n if (opts.method !== undefined) {\n const validMethods = ['triangular', 'catrom', 'mitchell', 'lanczos3'];\n if (!validMethods.includes(opts.method as string)) {\n throw new TypeError(\n `options.method must be one of: ${validMethods.join(', ')}, got ${opts.method}`\n );\n }\n }\n\n if (opts.premultiply !== undefined && typeof opts.premultiply !== 'boolean') {\n throw new TypeError(\n `options.premultiply must be boolean, got ${typeof opts.premultiply}`\n );\n }\n\n if (opts.linearRGB !== undefined && typeof opts.linearRGB !== 'boolean') {\n throw new TypeError(\n `options.linearRGB must be boolean, got ${typeof opts.linearRGB}`\n );\n }\n}\n"
6
- ],
7
- "mappings": "4BAAO,SAAS,CAAqB,CAAC,EAMpC,CACA,GAAI,OAAO,IAAY,UAAY,IAAY,KAC7C,MAAU,UAAU,2BAA2B,EAGjD,IAAM,EAAO,EAEb,GAAI,EAAK,QAAU,QACjB,GACE,OAAO,EAAK,QAAU,UACtB,CAAC,OAAO,UAAU,EAAK,KAAK,GAC5B,EAAK,OAAS,EAEd,MAAU,WACR,iDAAiD,EAAK,OACxD,EAIJ,GAAI,EAAK,SAAW,QAClB,GACE,OAAO,EAAK,SAAW,UACvB,CAAC,OAAO,UAAU,EAAK,MAAM,GAC7B,EAAK,QAAU,EAEf,MAAU,WACR,kDAAkD,EAAK,QACzD,EAIJ,GAAI,EAAK,SAAW,OAAW,CAC7B,IAAM,EAAe,CAAC,aAAc,SAAU,WAAY,UAAU,EACpE,GAAI,CAAC,EAAa,SAAS,EAAK,MAAgB,EAC9C,MAAU,UACR,kCAAkC,EAAa,KAAK,IAAI,UAAU,EAAK,QACzE,EAIJ,GAAI,EAAK,cAAgB,QAAa,OAAO,EAAK,cAAgB,UAChE,MAAU,UACR,4CAA4C,OAAO,EAAK,aAC1D,EAGF,GAAI,EAAK,YAAc,QAAa,OAAO,EAAK,YAAc,UAC5D,MAAU,UACR,0CAA0C,OAAO,EAAK,WACxD",
8
- "debugId": "A0B497FD9CA604D864756E2164756E21",
9
- "names": []
10
- }