simple-color-picker
Advanced tools
Comparing version 0.1.2 to 1.0.0
{ | ||
"name": "simple-color-picker", | ||
"version": "0.1.2", | ||
"description": "Simple Color picker in common.js.", | ||
"version": "1.0.0", | ||
"description": "Simple Color picker for the web", | ||
"author": "Guillaume Gouessan <guillaume.gouessan@gmail.com>", | ||
@@ -23,34 +23,31 @@ "license": "MIT", | ||
], | ||
"main": "src/index.js", | ||
"typings": "src/index.d.ts", | ||
"source": "src/index.ts", | ||
"main": "dist/simple-color-picker.js", | ||
"module": "dist/simple-color-picker.module.js", | ||
"unpkg": "dist/simple-color-picker.umd.js", | ||
"scripts": { | ||
"start": "npm run example & npm run css:watch", | ||
"example": "budo example/example.js:example/example-build.js --live | garnish", | ||
"example:build": "browserify example/example.js | uglifyjs -nm > example/example-build.js", | ||
"css": "stylus -u autoprefixer-stylus src/css -o ./src/", | ||
"css:watch": "stylus -u autoprefixer-stylus src/css -w -o ./src/", | ||
"test": "browserify test/test.js | tap-closer | smokestack | faucet", | ||
"test:nc": "browserify test/test.js | smokestack | faucet" | ||
"build": "microbundle --css-modules false", | ||
"example": "rimraf example/dist && parcel example/src/index.html -d example/dist", | ||
"example:build": "rimraf example/dist && parcel build example/src/index.html --public-url '.' -d example/dist", | ||
"test": "uvu -r ts-node/register tests -i \\d+.styl$", | ||
"cover": "nyc npm test", | ||
"gh-pages": "gh-pages -d example/dist -b gh-pages" | ||
}, | ||
"nyc": { | ||
"extends": "@istanbuljs/nyc-config-typescript" | ||
}, | ||
"devDependencies": { | ||
"autoprefixer-stylus": "^0.11.0", | ||
"browserify": "^13.0.1", | ||
"budo": "^9.3.0", | ||
"faucet": "0.0.1", | ||
"garnish": "^5.2.0", | ||
"jsdom": "^9.4.1", | ||
"raf": "^3.2.0", | ||
"smokestack": "^3.4.1", | ||
"stylus": "^0.54.5", | ||
"tap-closer": "^1.0.0", | ||
"tape": "^4.6.0", | ||
"uglify-js": "^2.7.0", | ||
"watchify": "^3.7.0" | ||
"@istanbuljs/nyc-config-typescript": "^1.0.1", | ||
"browser-env": "^3.3.0", | ||
"gh-pages": "^3.1.0", | ||
"microbundle": "^0.12.4", | ||
"nyc": "^15.1.0", | ||
"parcel-bundler": "^1.12.4", | ||
"rimraf": "^3.0.2", | ||
"stylus": "^0.54.8", | ||
"ts-node": "^9.0.0", | ||
"typescript": "^4.0.3", | ||
"uvu": "^0.3.4" | ||
}, | ||
"dependencies": { | ||
"component-emitter": "^1.2.1", | ||
"dom-transform": "^2.1.0", | ||
"is-number": "^3.0.0", | ||
"tinycolor2": "^1.3.0" | ||
} | ||
"dependencies": {} | ||
} |
@@ -1,8 +0,6 @@ | ||
[![unstable](http://badges.github.io/stability-badges/dist/unstable.svg)](http://github.com/badges/stability-badges) | ||
# simple-color-picker | ||
Simple Color picker in common.js. | ||
Simple Color picker. | ||
[demo](http://superguigui.github.io/simple-color-picker) | ||
[demo](https://superguigui.github.io/simple-color-picker) | ||
@@ -36,7 +34,8 @@ ## Installation | ||
width: 200, | ||
height: 200 | ||
height: 200, | ||
window: document.getElementsByTagName('iframe')[0].contentWindow | ||
}); | ||
``` | ||
None of these options are mendatory. | ||
None of these options are mandatory. | ||
@@ -50,3 +49,3 @@ ### `color` | ||
### `el` | ||
A dom node to add the colorpicker to. You can also use `colorPicker.appendTo(domNode)` afterwards if you prefer. | ||
A dom node or CSS selector(querySelector) to add the colorpicker to. You can also use `colorPicker.appendTo(domNode | '#id')` afterwards if you prefer. | ||
@@ -59,5 +58,8 @@ ### `width` | ||
### `window` | ||
Reference to a window object. This will allow Simple Color Picker to apply event listeners in the correct context in the event that you are using it inside of an iFrame from a script that resides outside of it. | ||
## Methods | ||
### `.appendTo(domElement)` | ||
### `.appendTo(domElement | CSS selector)` | ||
Add the colorPicker instance to a domElement. | ||
@@ -96,3 +98,3 @@ | ||
### `.getHSV()` | ||
Returns color as {h: 100, s: 1, v: 1} object. | ||
Returns color as {h: 1, s: 1, v: 1} object. | ||
@@ -99,0 +101,0 @@ ### `.isDark()` |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
230821
0
11
35
1333
1
102
1
1
- Removedcomponent-emitter@^1.2.1
- Removeddom-transform@^2.1.0
- Removedis-number@^3.0.0
- Removedtinycolor2@^1.3.0
- Removedcomponent-emitter@1.3.1(transitive)
- Removeddom-transform@2.1.0(transitive)
- Removedis-array@1.0.1(transitive)
- Removedis-buffer@1.1.6(transitive)
- Removedis-number@3.0.0(transitive)
- Removedkind-of@3.2.2(transitive)
- Removedprefix@1.0.0(transitive)
- Removedtinycolor2@1.6.0(transitive)
- Removedto-string@0.2.0(transitive)
- Removedtrim@0.0.1(transitive)