Skip to content

Commit

Permalink
update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
scheibo committed Nov 24, 2024
1 parent 3f3af84 commit d4bd80b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 9 deletions.
4 changes: 2 additions & 2 deletions examples/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
"devDependencies": {
"parcel-reporter-static-files-copy": "^1.5.3",
"parcel": "^2.13.0",
"vite-plugin-commonjs": "^0.10.3",
"vite-plugin-commonjs": "^0.10.4",
"vite": "^5.4.11",
"typescript": "^5.6.3"
"typescript": "^5.7.2"
},
"scripts": {
"prestart": "tsc -p .",
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
"@types/jest": "^29.5.14",
"@types/minimist": "^1.2.5",
"@types/mustache": "^4.2.5",
"@types/node": "^22.9.0",
"@types/node": "^22.9.3",
"@types/react": "^18.3.12",
"@types/semver": "^7.5.8",
"@types/vscode": "^1.95.0",
Expand All @@ -124,7 +124,7 @@
"source-map-support": "^0.5.21",
"table": "^6.8.2",
"trakr": "^0.2.0",
"typescript": "^5.6.3",
"typescript": "^5.7.2",
"vitest": "^2.1.5"
},
"scripts": {
Expand Down
1 change: 1 addition & 0 deletions src/tools/display/debug.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import * as engine from '../../pkg';
import {LAYOUT, LE} from '../../pkg/data';
import * as gen1 from '../../pkg/gen1';

import {Fragment} from './dom';
import {Battle, Gen, Generation, adapt} from './ui';
import * as util from './util';

Expand Down
3 changes: 1 addition & 2 deletions src/tools/display/dom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,5 +92,4 @@ export const h = (
return element;
};

export const Fragment =
(typeof DocumentFragment === 'function' ? DocumentFragment : () => {}) as Fragment;
export const Fragment = (props: {children: any}) => props.children as Fragment;
7 changes: 4 additions & 3 deletions src/tools/display/select.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
/** @license MIT modified from Pixabay's https://github.com/Pixabay/JavaScript-autoComplete */
import {Fragment} from './dom';

const FRAME_MS = 20;
// const DELAY_MS = 150;
const HIDE_MS = 350;

export const Select = ({options, unmount, placeholder, render}: {
options: string[];
options: string[] ;
unmount?: Promise<void>;
placeholder?: string;
render?: (option: string, search: string) => JSX.Element;
Expand Down Expand Up @@ -174,7 +175,7 @@ export const Select = ({options, unmount, placeholder, render}: {
return true;
});

let timer: number;
// let timer: number;
const keys =
['End', 'Home', 'ArrowLeft', 'ArrowUp', 'ArrowRight', 'ArrowDown', 'Enter', 'Escape'];
input.addEventListener('keyup', e => {
Expand All @@ -183,7 +184,7 @@ export const Select = ({options, unmount, placeholder, render}: {
const val = input.value;
if (val !== last) {
last = val;
clearTimeout(timer);
// clearTimeout(timer);
if (cache) if (val in cache) return suggest(cache[val]);
// timer = setTimeout(() => suggest(searcher.search(val)), DELAY_MS) as any as number;
}
Expand Down

0 comments on commit d4bd80b

Please sign in to comment.