touchcontroller
Advanced tools
Comparing version 4.1.0 to 4.2.0
import { IListener } from '../interfaces/IListener'; | ||
import { Touch as MyTouch } from '../touch/Touch'; | ||
import { Touch } from '../touch/Touch'; | ||
import { IElement } from './../interfaces/IElement'; | ||
@@ -12,4 +12,4 @@ import { EventManager } from './../utils/EventManager'; | ||
acceptsEvent(event: Event): event is TouchEvent; | ||
init(element: IElement, anchorElement: IElement, newTouch: (touch: MyTouch) => void): void; | ||
init(element: IElement, anchorElement: IElement, newTouch: (touch: Touch) => void): void; | ||
startFromExternalEvent(element: IElement, originalEvent: TouchEvent): Promise<void>; | ||
} |
@@ -23,2 +23,3 @@ import { MultitouchControllerDebugLayer } from './debug/MultiTouchControllerDebugLayer'; | ||
import { CanvasRectangle } from './utils/CanvasRectangle'; | ||
import { DomTouch } from './utils/DomTouch'; | ||
import { EventManager } from './utils/EventManager'; | ||
@@ -31,2 +32,2 @@ import { getBoundingClientRectEnhanced } from './utils/getBoundingClientRectEnhanced'; | ||
import { WithOptional } from './utils/WithOptional'; | ||
export { Omit, sign, Touch, Scene, average, padArray, IElement, Particle, IListener, TouchFrame, Multitouch, SourceCache, WithOptional, EventManager, emulateTouch, VectorAverage, TAverageItems, TouchListener, MouseListener, DrawController, CanvasRectangle, TouchController, ITouchController, IParticleOptions, IElementListeners, createImageFromSrc, createCanvasFromSrc, multitouchTransforms, MultitouchController, IEmulateTouchOptions, particleOptionsAverage, IParticleOptionsExternals, TouchControllerDebugLayer, createColoredCanvasFromSrc, IMultitouchTransformsOptions, IEmulateTouchOptionsAdvanced, getBoundingClientRectEnhanced, multitouchTransformsOnElement, MultitouchControllerDebugLayer }; | ||
export { Omit, sign, Touch, Scene, average, padArray, DomTouch, IElement, Particle, IListener, TouchFrame, Multitouch, SourceCache, WithOptional, EventManager, emulateTouch, VectorAverage, TAverageItems, TouchListener, MouseListener, DrawController, CanvasRectangle, TouchController, ITouchController, IParticleOptions, IElementListeners, createImageFromSrc, createCanvasFromSrc, multitouchTransforms, MultitouchController, IEmulateTouchOptions, particleOptionsAverage, IParticleOptionsExternals, TouchControllerDebugLayer, createColoredCanvasFromSrc, IMultitouchTransformsOptions, IEmulateTouchOptionsAdvanced, getBoundingClientRectEnhanced, multitouchTransformsOnElement, MultitouchControllerDebugLayer }; |
@@ -10,1 +10,6 @@ import { Vector } from 'xyzt'; | ||
export declare function particleOptionsAverage(...items: TAverageItems<IParticleOptions>): IParticleOptions; | ||
/** | ||
* TODO: Anotate | ||
* TODO: breakup into files | ||
* TODO: Write tests | ||
*/ |
@@ -7,1 +7,7 @@ export declare class SourceCache<TId, TSource> { | ||
} | ||
/** | ||
* TODO: Maybe to indipendent LIB | ||
* TODO: Anotate | ||
* TODO: breakup into files | ||
* TODO: Write tests | ||
*/ |
@@ -14,1 +14,6 @@ import { BoundingBox, ITransform, Transform } from 'xyzt'; | ||
export {}; | ||
/** | ||
* TODO: Anotate | ||
* TODO: breakup into files | ||
* TODO: Write tests | ||
*/ |
@@ -18,1 +18,6 @@ import { Destroyable, IDestroyable } from 'destroyable'; | ||
export {}; | ||
/** | ||
* TODO: Anotate | ||
* TODO: breakup into files | ||
* TODO: Write tests | ||
*/ |
import { IElement } from '../interfaces/IElement'; | ||
export declare function getBoundingClientRectEnhanced(element: IElement): DOMRect; | ||
/** | ||
* TODO: Maybe better function name | ||
* TODO: Anotate | ||
* TODO: Write tests | ||
*/ |
export declare function createImageFromSrc(src: string): Promise<HTMLImageElement>; | ||
export declare function createCanvasFromSrc(src: string): Promise<HTMLCanvasElement>; | ||
export declare function createColoredCanvasFromSrc(src: string, color: string): Promise<HTMLCanvasElement>; | ||
/** | ||
* TODO: Anotate | ||
* TODO: breakup into files | ||
* TODO: Write tests | ||
*/ |
export declare function sign(x: number): 0 | -1 | 1; | ||
/** | ||
* TODO: Use native | ||
*/ |
export declare type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>; | ||
/** | ||
* TODO: Use type-fest | ||
*/ |
interface IPadArrayOptions<T> { | ||
padWith: T | T[]; | ||
length: number; | ||
crop?: boolean; | ||
isCropped?: boolean; | ||
} | ||
export declare function padArray<T>(array: T[], { padWith, length, crop }: IPadArrayOptions<T>): T[]; | ||
export declare function padArray<T>(array: T[], { padWith, length, isCropped: crop }: IPadArrayOptions<T>): T[]; | ||
export {}; | ||
/** | ||
* TODO: Anotate bot IPadArrayOptions and padArray | ||
* TODO: breakup into files | ||
*/ |
import { Omit } from './Omit'; | ||
export declare type WithOptional<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>; | ||
/** | ||
* TODO: Use type-fest | ||
*/ |
141
package.json
{ | ||
"name": "touchcontroller", | ||
"version": "4.1.0", | ||
"author": "Pavol Hejný <me@pavolhejny.com> (https://pavolhejny.com)", | ||
"description": "Touch and mouse controller for web apps and games", | ||
"main": "./dist/main.js", | ||
"types": "./dist/typings/main.d.ts", | ||
"files": [ | ||
"dist/**" | ||
], | ||
"scripts": { | ||
"start": "npm run develop", | ||
"build": "rm -rf ./dist && webpack --config webpack.production.config.js", | ||
"develop-samples-server": "node server.js", | ||
"develop-build": "chokidar \"src/**/*.ts\" --initial --kill --debounce 100 -c \"webpack --config ./webpack.development.config.js\"", | ||
"test": "jest --config jestconfig.json", | ||
"test-watch": "jest --config jestconfig.json --watchAll", | ||
"lint": "npx eslint \"src/**/*.{ts,tsx}\"", | ||
"lint-fix": "npx eslint \"src/**/*.{ts,tsx}\" --fix", | ||
"lint-watch": "chokidar \"{src,test,samples}/**/*.{ts,json,js,html,css}\" --verbose --command \"npx eslint {path} --fix\"", | ||
"pretty-imports": "npx organize-imports-cli tsconfig.json", | ||
"autofix": "npm run pretty-imports && npm run lint-fix", | ||
"autofix-commit": "git diff --exit-code && npm run autofix && git add src && git commit --allow-empty -m \"Autofixing\"", | ||
"documentation": "echo \"TODO: make typedoc working\"", | ||
"--documentation": "npx typedoc --excludePrivate --hideGenerator --mode file --theme minimal --out docs --name \"TouchController\" ./src", | ||
"documentation-commit": "git diff --exit-code && npm run documentation && git add docs && git commit --allow-empty -m \"TouchController\"", | ||
"generate-main-exports": "ts-node ./scripts/generate-main-exports/generate-main-exports.ts", | ||
"generate-main-exports-commit": "git diff --exit-code && npm run generate-main-exports && npm run autofix && git add src && git commit --allow-empty -m \"Updating exports\"", | ||
"preversion": "npm test && npm run autofix-commit && npm run generate-main-exports-commit && npm run build && npm run documentation-commit", | ||
"postversion": "git push && git push --tags && npm publish", | ||
"update-packages": "npm-check-updates -u && git add ./package.json && git commit -m \"Update packages\" && npm run force-reinstall", | ||
"force-reinstall": "rm ./package-lock.json && rm -rf ./node_modules && npm install && git add ./package-lock.json && git commit -m \"Force reinstall\"" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/hejny/touchcontroller.git" | ||
}, | ||
"keywords": [], | ||
"license": "ISC", | ||
"bugs": { | ||
"url": "https://github.com/hejny/touchcontroller/issues" | ||
}, | ||
"homepage": "https://github.com/hejny/touchcontroller", | ||
"dependencies": { | ||
"destroyable": "^0.5.0" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^26.0.15", | ||
"@types/uuid": "^8.3.0", | ||
"@typescript-eslint/eslint-plugin": "^4.8.2", | ||
"@typescript-eslint/parser": "^4.8.2", | ||
"chokidar-cli": "^2.1.0", | ||
"codecov": "^3.8.1", | ||
"eslint": "^7.14.0", | ||
"express": "^4.17.1", | ||
"glob-promise": "^3.4.0", | ||
"jest": "^26.6.3", | ||
"open": "^7.3.0", | ||
"rxjs": "^6.6.7", | ||
"serve-index": "^1.9.1", | ||
"serve-static": "^1.14.1", | ||
"ts-jest": "^26.4.4", | ||
"ts-loader": "^8.0.11", | ||
"ts-node": "^9.0.0", | ||
"typescript": "^4.1.2", | ||
"update": "^0.7.4", | ||
"uuid": "^8.3.1", | ||
"waitasecond": "^1.5.0", | ||
"webpack": "^5.6.0", | ||
"webpack-cli": "^4.2.0", | ||
"xyzt": "^4.6.0" | ||
} | ||
"name": "touchcontroller", | ||
"version": "4.2.0", | ||
"author": "Pavol Hejný <me@pavolhejny.com> (https://pavolhejny.com)", | ||
"description": "Touch and mouse controller for web apps and games", | ||
"main": "./dist/main.js", | ||
"types": "./dist/typings/main.d.ts", | ||
"files": [ | ||
"dist/**" | ||
], | ||
"scripts": { | ||
"start": "npm run develop", | ||
"build": "rm -rf ./dist && webpack --config webpack.production.config.js", | ||
"develop-samples-server": "node server.js", | ||
"develop-build": "chokidar \"src/**/*.ts\" --initial --kill --debounce 100 -c \"webpack --config ./webpack.development.config.js\"", | ||
"test": "jest --config jestconfig.json", | ||
"lint": "npx eslint \"src/**/*.{ts,tsx}\"", | ||
"lint-fix": "npx eslint \"src/**/*.{ts,tsx}\" --fix", | ||
"lint-watch": "chokidar \"{src,test,samples}/**/*.{ts,json,js,html,css}\" --verbose --command \"npx eslint {path} --fix\"", | ||
"pretty-imports": "npx organize-imports-cli tsconfig.json", | ||
"autofix": "npm run pretty-imports && npm run lint-fix", | ||
"autofix-commit": "git diff --exit-code && npm run autofix && git add src && git commit --allow-empty -m \"Autofixing\"", | ||
"documentation": "echo \"TODO: make typedoc working\"", | ||
"--documentation": "npx typedoc --excludePrivate --hideGenerator --mode file --theme minimal --out docs --name \"TouchController\" ./src", | ||
"documentation-commit": "git diff --exit-code && npm run documentation && git add docs && git commit --allow-empty -m \"TouchController\"", | ||
"generate-main-exports": "ts-node ./scripts/generate-main-exports/generate-main-exports.ts", | ||
"generate-main-exports-commit": "git diff --exit-code && npm run generate-main-exports && npm run autofix && git add src && git commit --allow-empty -m \"Updating exports\"", | ||
"preversion": "npm test && npm run autofix-commit && npm run generate-main-exports-commit && npm run build && npm run documentation-commit", | ||
"postversion": "git push && git push --tags && npm publish", | ||
"update-packages": "npm-check-updates -u && git add ./package.json && git commit -m \"Update packages\" && npm run force-reinstall", | ||
"force-reinstall": "rm ./package-lock.json && rm -rf ./node_modules && npm install && git add ./package-lock.json && git commit -m \"Force reinstall\"" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/hejny/touchcontroller" | ||
}, | ||
"keywords": [], | ||
"license": "SEE LICENSE IN LICENSE", | ||
"bugs": { | ||
"url": "https://github.com/hejny/touchcontroller/issues" | ||
}, | ||
"homepage": "https://github.com/hejny/touchcontroller", | ||
"dependencies": { | ||
"destroyable": "0.5.0" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "26.0.15", | ||
"@types/uuid": "8.3.0", | ||
"@typescript-eslint/eslint-plugin": "4.8.2", | ||
"@typescript-eslint/parser": "4.8.2", | ||
"chokidar-cli": "2.1.0", | ||
"codecov": "3.8.1", | ||
"eslint": "7.14.0", | ||
"express": "4.17.1", | ||
"glob-promise": "3.4.0", | ||
"jest": "26.6.3", | ||
"open": "7.3.0", | ||
"rxjs": "6.6.7", | ||
"serve-index": "1.9.1", | ||
"serve-static": "1.14.1", | ||
"ts-jest": "26.4.4", | ||
"ts-loader": "8.0.11", | ||
"ts-node": "9.0.0", | ||
"typescript": "4.1.2", | ||
"update": "0.7.4", | ||
"uuid": "8.3.1", | ||
"waitasecond": "1.5.0", | ||
"webpack": "5.6.0", | ||
"webpack-cli": "4.2.0", | ||
"xyzt": "4.6.0" | ||
} | ||
} |
@@ -1,5 +0,61 @@ | ||
# TouchController | ||
# 🤏 TouchController | ||
<!--Badges--> | ||
<!--⚠️WARNING: This section was generated by https://github.com/hejny/batch-project-editor/blob/main/src/workflows/800-badges/badges.ts so every manual change will be overwritten.--> | ||
[![License of 🤏 TouchController](https://img.shields.io/github/license/hejny/touchcontroller.svg?style=flat)](https://github.com/hejny/touchcontroller/blob/main/LICENSE) | ||
[![NPM Version of 🤏 TouchController](https://badge.fury.io/js/touchcontroller.svg)](https://www.npmjs.com/package/touchcontroller) | ||
[![Quality of package 🤏 TouchController](https://packagequality.com/shield/touchcontroller.svg)](https://packagequality.com/#?package=touchcontroller) | ||
[![Known Vulnerabilities](https://snyk.io/test/github/hejny/touchcontroller/badge.svg)](https://snyk.io/test/github/hejny/touchcontroller) | ||
[![Issues](https://img.shields.io/github/issues/hejny/touchcontroller.svg?style=flat)](https://github.com/hejny/touchcontroller/issues) | ||
<!--/Badges--> | ||
Touch and mouse controller for web apps and games | ||
<!--Wallpaper--> | ||
<!--⚠️WARNING: This section was generated by https://github.com/hejny/batch-project-editor/blob/main/src//workflows/315-ai-generated-wallpaper/4-aiGeneratedWallpaperUseInReadme.ts so every manual change will be overwritten.--> | ||
![Wallpaper of 🤏 TouchController](assets/ai/wallpaper/gallery/3d757952-ba8c-44bb-ab43-36b51866f577-0_0.png) | ||
<!--/Wallpaper--> | ||
TODO: README, documentation and web | ||
<!--Contributing--> | ||
<!--⚠️WARNING: This section was generated by https://github.com/hejny/batch-project-editor/blob/main/src/workflows/810-contributing/contributing.ts so every manual change will be overwritten.--> | ||
## 🖋️ Contributing | ||
I am open to pull requests, feedback, and suggestions. Or if you like this utility, you can [☕ buy me a coffee](https://www.buymeacoffee.com/hejny) or [donate via cryptocurrencies](https://github.com/hejny/hejny/blob/main/documents/crypto.md). | ||
You can also ⭐ star the touchcontroller package, [follow me on GitHub](https://github.com/hejny) or [various other social networks](https://www.pavolhejny.com/contact/). | ||
<!--/Contributing--> | ||
<!--Partners--> | ||
<!--⚠️WARNING: This section was generated by https://github.com/hejny/batch-project-editor/blob/main/src/workflows/820-partners/partners.ts so every manual change will be overwritten.--> | ||
## ✨ Partners | ||
<a href="https://collboard.com/"> | ||
<img src="https://collboard.fra1.cdn.digitaloceanspaces.com/assets/18.12.1/logo-small.png" alt="Collboard logo" width="50" /> | ||
</a> | ||
| ||
<a href="https://czech.events/"> | ||
<img src="https://czech.events/design/logos/czech.events.transparent-logo.png" alt="Czech.events logo" width="50" /> | ||
</a> | ||
| ||
<a href="https://sigmastamp.ml/"> | ||
<img src="https://www.sigmastamp.ml/sigmastamp-logo.white.svg" alt="SigmaStamp logo" width="50" /> | ||
</a> | ||
[Become a partner](https://www.pavolhejny.com/contact/) | ||
<!--/Partners--> |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1665640
45
8072
61
1
Updateddestroyable@0.5.0