Jake Archibald
cad09160b6
Reducing browser spinner time ( #1157 )
2021-09-20 13:49:53 +01:00
Surma
9663c23489
Merge pull request #1151 from ergunsh/improve-encode-types
...
Improve `encode` API and its types
2021-09-17 13:50:29 +01:00
ergunsh
95a1b35c91
Update encodedWith to contain resolved values
...
We already await the promises that we set on the `encodedWith` instead of setting already
resolved promises to `encodedWith` we can set the resolved values
So, the users can use like
`const { mozjpeg: { binary } } = await image.encode({ mozjpeg })` or
they can first run
`await image.encode({ mozjpeg })` and then
`image.encodedWith.mozjpeg.binary`
2021-09-10 15:18:14 +02:00
ergunsh
914cdea41d
Return encode result from Image.encode calls
...
Before this, there were one way to use the API:
call `await image.encode({ mozjpeg: {} })`
then use `encodedWith` by asserting that `mozjpeg` property exists on it
After adding return value to encode, people
will be able to use it like
`const { mozjpeg } = await image.encode({ mozjpeg: {} });`
which provides better type safety
2021-09-10 14:45:20 +02:00
ergunsh
6bfce29af6
Improve typing of Image.encode
...
Instead of returning `any` we're now returning the whole object.
Still from typing perspective, the API is not that
great since we don't have any type relation
between `encode` calls and `encodedWith` property. Maybe we can think about
returning directly from `encode` call
with the returned object having properties
that is supplied in `encode` calls
2021-09-10 14:08:21 +02:00
Surma
64cad1cc23
Merge pull request #1123 from styfle/load-file-async
...
Reduce `@squoosh/lib` Node.js API usage (make it run on the web)
2021-09-08 22:30:53 +01:00
Steven
87f25d909b
Merge branch 'dev' into load-file-async
2021-09-08 17:04:50 -04:00
Steven
bdfdaf53af
Remove unused readme link per atjn
...
Co-authored-by: Anton <dev@atjn.dk >
2021-09-08 17:04:46 -04:00
Surma
1ab9e8b3ab
Merge pull request #1141 from ergunsh/improve-exposed-types
2021-09-08 17:57:46 +01:00
Ergün Erdoğmuş
2718077d3d
Merge branch 'dev' into improve-exposed-types
2021-09-08 19:48:01 +03:00
Jake Archibald
255dfa434a
Update pointer-tracker ( #1147 )
2021-09-07 14:43:19 +01:00
François Beaufort
0bef05bcd4
Remove origin trial header
2021-09-06 15:00:48 +01:00
ergunsh
c4bc369c6b
Fix typo in triangle
2021-09-03 15:03:28 +03:00
ergunsh
68ce8f420d
Improve encode parameter typing
2021-09-03 14:54:08 +03:00
ergunsh
27f103fee5
Improve preprocess parameter type
2021-09-03 11:53:52 +03:00
Steven
c21d3714a8
Fix link in readme
2021-09-02 16:38:22 -04:00
Steven
3ea0d88c4f
Apply suggestions from atjn
...
Co-authored-by: Anton <dev@atjn.dk >
2021-09-02 16:36:37 -04:00
Surma
00cfdafdf3
Merge pull request #1138 from jcao219/fix-windows-path
...
Use pathify to calculate absolute paths for cross-platform compatibility
2021-08-31 13:34:28 +01:00
Jimmy Cao
92f52319da
Use pathify to calculate absolute paths for cross-platform compatibility
2021-08-31 00:18:21 -07:00
Jake Archibald
023304803f
JPEG-XL: Better 'effort' and adding noise synth ( #1039 )
2021-08-27 14:18:54 +01:00
Vishal
6b08cd2355
Aliasing toggle button ( #1132 )
2021-08-26 16:44:20 +01:00
Jake Archibald
db1a5138e6
Fix pinch zoom on iOS ( #1133 )
2021-08-26 15:59:42 +01:00
Jake Archibald
a547491146
Maintain DC_SCAN_OPT_MODE if subsampling is > 2. Fixes #1129 ( #1130 )
2021-08-26 14:29:13 +01:00
Jake Archibald
6e427f9208
The observer is null if user prefers reduced motion
...
Turns out TypeScript is there for a reason and shouldn't be bypassed. Fixes #1135
2021-08-25 14:10:57 +01:00
Jake Archibald
0d35fbd349
Fix horizontal scroll on option elements on mobile ( #1134 )
2021-08-25 09:25:09 +01:00
Mike DelGaudio
4e901c714c
[RFC] Add Three Homepage Sections ( #1112 )
2021-08-25 09:08:22 +01:00
Adam Burgess
b74788e036
Stable mousewheel scrolling, one wheel up + one wheel down = no change ( #1131 )
2021-08-24 14:52:25 +01:00
Vishal
14c3d190e9
Max cap on scale #905 ( #1128 )
2021-08-23 13:27:17 +01:00
Steven
202d0bc088
Generalize file to ArrayLike<number>
2021-08-20 18:48:30 -04:00
Steven
bdb5b16372
Remove Buffer from decodeFile()
2021-08-20 18:36:23 -04:00
Steven
30140c2b7a
Fix CLI bug
2021-08-20 18:35:29 -04:00
Steven
10996cdbca
Add missing import
2021-08-20 16:08:01 -04:00
Steven
e5806507d4
Remove Node.js API surface in libsquoosh
2021-08-20 15:11:14 -04:00
Steven
1c5b44f9a1
Add loadFile parameter to ImagePool
2021-08-16 16:51:23 -04:00
Surma
eeaa19589e
Merge pull request #1120 from veluca93/jxl_05
...
Bump JPEG XL to v0.5.
2021-08-14 09:23:04 +01:00
Luca Versari
35b8c56f1a
Bump JPEG XL to v0.5.
2021-08-13 23:27:44 +02:00
Surma
816d1f92fd
Merge pull request #1110 from styfle/libsquoosh-ts-remaining
2021-08-10 12:38:11 +01:00
Steven
4091f2efec
Remove unused export
2021-08-06 13:20:14 -04:00
Steven
821d14c6ab
Merge branch 'dev' into libsquoosh-ts-remaining
2021-08-06 13:02:46 -04:00
Steven
a72ca46531
Move as to input param instead of return type
2021-08-06 12:49:17 -04:00
ergunsh
fafcf97f0c
Update code for the review comments
...
* Make decode module return value `ImageData`
* Fix global definition of ImageData
* Use concrete Encoder types for encode functions
* Use ArrayBufferView in FileLike instead of using a similar type
* Throw error when the `encode` functions
return null
* Use generic types for WorkerPool
* Fix `encode` function typing
in `index.ts`
* Remove ts-ignore for web-streams-polyfill
and handle nulls for TransformStream
* Fix rollup entry point (now we need to have
`index.ts` instead of `index.js`)
2021-08-06 16:05:14 +03:00
Surma
d526877147
Merge pull request #1099 from mikedelgaudio/add-meta-info
2021-07-27 11:48:04 +01:00
Jake Archibald
0ed7ef842f
Include site origin in build
2021-07-27 11:30:58 +01:00
Steven
de4eb9c8f7
Add encode() and decode() types
2021-07-26 23:22:28 -04:00
Steven
16a53caa48
Convert remaining JS to TS in libSquoosh
2021-07-26 22:37:00 -04:00
Mike DelGaudio
3d4c62fede
Merge branch 'dev' into add-meta-info
2021-07-26 12:23:06 -04:00
Mike DelGaudio
ce7be359c0
remove keywords
...
Co-authored-by: Anton <dev@atjn.dk >
2021-07-26 12:23:00 -04:00
Surma
3f2dd66726
Merge pull request #1030 from veluca93/jxl_github
2021-07-23 13:49:46 +01:00
Surma
9198f748b8
Merge branch 'dev' into jxl_github
2021-07-23 13:37:37 +01:00
Surma
a726adf0e8
Merge pull request #1107 from styfle/patch-1
...
Fix typo uncluding => including
2021-07-23 13:15:21 +01:00