Socket
Socket
Sign inDemoInstall

simple-color-picker

Package Overview
Dependencies
0
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 1.0.0

dist/color.d.ts

57

package.json
{
"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()`

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc