Compare commits
1 Commits
mozjpeg-wa
...
enter-fix
Author | SHA1 | Date | |
---|---|---|---|
5508fc47c8 |
12
package-lock.json
generated
12
package-lock.json
generated
@ -2176,7 +2176,7 @@
|
|||||||
},
|
},
|
||||||
"camelcase-keys": {
|
"camelcase-keys": {
|
||||||
"version": "2.1.0",
|
"version": "2.1.0",
|
||||||
"resolved": "http://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz",
|
||||||
"integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
|
"integrity": "sha1-MIvur/3ygRkFHvodkyITyRuPkuc=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -9888,7 +9888,7 @@
|
|||||||
},
|
},
|
||||||
"meow": {
|
"meow": {
|
||||||
"version": "3.7.0",
|
"version": "3.7.0",
|
||||||
"resolved": "http://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz",
|
||||||
"integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
|
"integrity": "sha1-cstmi0JSKCkKu/qFaJJYcwioAfs=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -9906,7 +9906,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "http://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||||
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||||
"dev": true
|
"dev": true
|
||||||
}
|
}
|
||||||
@ -10272,7 +10272,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"semver": {
|
"semver": {
|
||||||
"version": "5.3.0",
|
"version": "5.3.0",
|
||||||
"resolved": "http://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-5.3.0.tgz",
|
||||||
"integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
|
"integrity": "sha1-myzl094C0XxgEq0yaqa00M9U+U8=",
|
||||||
"dev": true
|
"dev": true
|
||||||
}
|
}
|
||||||
@ -12797,7 +12797,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"source-map": {
|
"source-map": {
|
||||||
"version": "0.4.4",
|
"version": "0.4.4",
|
||||||
"resolved": "http://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
|
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.4.4.tgz",
|
||||||
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
|
"integrity": "sha1-66T12pwNyZneaAMti092FzZSA2s=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
@ -13726,7 +13726,7 @@
|
|||||||
},
|
},
|
||||||
"tar": {
|
"tar": {
|
||||||
"version": "2.2.1",
|
"version": "2.2.1",
|
||||||
"resolved": "http://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
|
"resolved": "https://registry.npmjs.org/tar/-/tar-2.2.1.tgz",
|
||||||
"integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
|
"integrity": "sha1-jk0qJWwOIYXGsYrWlK7JaLg8sdE=",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"requires": {
|
"requires": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { h, Component } from 'preact';
|
import { h, Component } from 'preact';
|
||||||
import { bind } from '../../lib/initial-util';
|
import { bind } from '../../lib/initial-util';
|
||||||
import { inputFieldValueAsNumber, konami } from '../../lib/util';
|
import { inputFieldValueAsNumber, konami, preventDefault } from '../../lib/util';
|
||||||
import { QuantizeOptions } from './processor-meta';
|
import { QuantizeOptions } from './processor-meta';
|
||||||
import * as style from '../../components/Options/style.scss';
|
import * as style from '../../components/Options/style.scss';
|
||||||
import Expander from '../../components/expander';
|
import Expander from '../../components/expander';
|
||||||
@ -42,7 +42,7 @@ export default class QuantizerOptions extends Component<Props, State> {
|
|||||||
|
|
||||||
render({ options }: Props, { extendedSettings }: State) {
|
render({ options }: Props, { extendedSettings }: State) {
|
||||||
return (
|
return (
|
||||||
<form class={style.optionsSection}>
|
<form class={style.optionsSection} onSubmit={preventDefault}>
|
||||||
<Expander>
|
<Expander>
|
||||||
{extendedSettings ?
|
{extendedSettings ?
|
||||||
<label class={style.optionTextFirst}>
|
<label class={style.optionTextFirst}>
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { h, Component } from 'preact';
|
import { h, Component } from 'preact';
|
||||||
import { bind } from '../../lib/initial-util';
|
import { bind } from '../../lib/initial-util';
|
||||||
import { inputFieldChecked, inputFieldValueAsNumber } from '../../lib/util';
|
import { inputFieldChecked, inputFieldValueAsNumber, preventDefault } from '../../lib/util';
|
||||||
import { EncodeOptions, MozJpegColorSpace } from './encoder-meta';
|
import { EncodeOptions, MozJpegColorSpace } from './encoder-meta';
|
||||||
import * as style from '../../components/Options/style.scss';
|
import * as style from '../../components/Options/style.scss';
|
||||||
import Checkbox from '../../components/checkbox';
|
import Checkbox from '../../components/checkbox';
|
||||||
@ -58,7 +58,7 @@ export default class MozJPEGEncoderOptions extends Component<Props, State> {
|
|||||||
// I'm rendering both lossy and lossless forms, as it becomes much easier when
|
// I'm rendering both lossy and lossless forms, as it becomes much easier when
|
||||||
// gathering the data.
|
// gathering the data.
|
||||||
return (
|
return (
|
||||||
<form class={style.optionsSection}>
|
<form class={style.optionsSection} onSubmit={preventDefault}>
|
||||||
<div class={style.optionOneCell}>
|
<div class={style.optionOneCell}>
|
||||||
<Range
|
<Range
|
||||||
name="quality"
|
name="quality"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { h, Component } from 'preact';
|
import { h, Component } from 'preact';
|
||||||
import { bind } from '../../lib/initial-util';
|
import { bind } from '../../lib/initial-util';
|
||||||
import { inputFieldValueAsNumber } from '../../lib/util';
|
import { inputFieldValueAsNumber, preventDefault } from '../../lib/util';
|
||||||
import { EncodeOptions } from './encoder-meta';
|
import { EncodeOptions } from './encoder-meta';
|
||||||
import Range from '../../components/range';
|
import Range from '../../components/range';
|
||||||
import * as style from '../../components/Options/style.scss';
|
import * as style from '../../components/Options/style.scss';
|
||||||
@ -23,7 +23,7 @@ export default class OptiPNGEncoderOptions extends Component<Props, {}> {
|
|||||||
|
|
||||||
render({ options }: Props) {
|
render({ options }: Props) {
|
||||||
return (
|
return (
|
||||||
<form class={style.optionsSection}>
|
<form class={style.optionsSection} onSubmit={preventDefault}>
|
||||||
<div class={style.optionOneCell}>
|
<div class={style.optionOneCell}>
|
||||||
<Range
|
<Range
|
||||||
name="level"
|
name="level"
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { h, Component } from 'preact';
|
import { h, Component } from 'preact';
|
||||||
import linkState from 'linkstate';
|
import linkState from 'linkstate';
|
||||||
import { bind, linkRef } from '../../lib/initial-util';
|
import { bind, linkRef } from '../../lib/initial-util';
|
||||||
import { inputFieldValueAsNumber, inputFieldValue } from '../../lib/util';
|
import { inputFieldValueAsNumber, inputFieldValue, preventDefault } from '../../lib/util';
|
||||||
import { ResizeOptions } from './processor-meta';
|
import { ResizeOptions } from './processor-meta';
|
||||||
import * as style from '../../components/Options/style.scss';
|
import * as style from '../../components/Options/style.scss';
|
||||||
import Checkbox from '../../components/checkbox';
|
import Checkbox from '../../components/checkbox';
|
||||||
@ -78,7 +78,7 @@ export default class ResizerOptions extends Component<Props, State> {
|
|||||||
|
|
||||||
render({ options, isVector }: Props, { maintainAspect }: State) {
|
render({ options, isVector }: Props, { maintainAspect }: State) {
|
||||||
return (
|
return (
|
||||||
<form ref={linkRef(this, 'form')} class={style.optionsSection}>
|
<form ref={linkRef(this, 'form')} class={style.optionsSection} onSubmit={preventDefault}>
|
||||||
<label class={style.optionTextFirst}>
|
<label class={style.optionTextFirst}>
|
||||||
Method:
|
Method:
|
||||||
<Select
|
<Select
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { h, Component } from 'preact';
|
import { h, Component } from 'preact';
|
||||||
import { bind } from '../../lib/initial-util';
|
import { bind } from '../../lib/initial-util';
|
||||||
import { inputFieldCheckedAsNumber, inputFieldValueAsNumber } from '../../lib/util';
|
import { inputFieldCheckedAsNumber, inputFieldValueAsNumber, preventDefault } from '../../lib/util';
|
||||||
import { EncodeOptions, WebPImageHint } from './encoder-meta';
|
import { EncodeOptions, WebPImageHint } from './encoder-meta';
|
||||||
import * as style from '../../components/Options/style.scss';
|
import * as style from '../../components/Options/style.scss';
|
||||||
import Checkbox from '../../components/checkbox';
|
import Checkbox from '../../components/checkbox';
|
||||||
@ -319,7 +319,7 @@ export default class WebPEncoderOptions extends Component<Props, State> {
|
|||||||
// I'm rendering both lossy and lossless forms, as it becomes much easier when
|
// I'm rendering both lossy and lossless forms, as it becomes much easier when
|
||||||
// gathering the data.
|
// gathering the data.
|
||||||
return (
|
return (
|
||||||
<form class={style.optionsSection}>
|
<form class={style.optionsSection} onSubmit={preventDefault}>
|
||||||
<label class={style.optionInputFirst}>
|
<label class={style.optionInputFirst}>
|
||||||
<Checkbox
|
<Checkbox
|
||||||
name="lossless"
|
name="lossless"
|
||||||
|
@ -297,3 +297,10 @@ export async function transitionHeight(el: HTMLElement, opts: TransitionOptions)
|
|||||||
el.addEventListener('transitioncancel', listener);
|
el.addEventListener('transitioncancel', listener);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Simple event listener that prevents the default.
|
||||||
|
*/
|
||||||
|
export function preventDefault(event: Event) {
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user