Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sanity/color

Package Overview
Dependencies
Maintainers
16
Versions
92
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sanity/color - npm Package Compare versions

Comparing version 1.0.0-alpha.0 to 1.0.0

dist/cjs/colorPalette.d.ts

73

dist/cjs/config.d.ts

@@ -0,65 +1,12 @@

import { ColorHueConfig } from './types';
export declare const black = "#101112";
export declare const white = "#fff";
export declare const gray: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const red: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const orange: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const yellow: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const green: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const cyan: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const blue: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const purple: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const magenta: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const gray: ColorHueConfig;
export declare const red: ColorHueConfig;
export declare const orange: ColorHueConfig;
export declare const yellow: ColorHueConfig;
export declare const green: ColorHueConfig;
export declare const cyan: ColorHueConfig;
export declare const blue: ColorHueConfig;
export declare const purple: ColorHueConfig;
export declare const magenta: ColorHueConfig;

@@ -1,5 +0,4 @@

import { ColorPallette } from './types';
import { ColorPalette } from './types';
export * from './constants';
export * from './types';
declare const color: ColorPallette;
export default color;
export declare const color: ColorPalette;
"use strict";
var __assign = (this && this.__assign) || function () {
__assign = Object.assign || function(t) {
for (var s, i = 1, n = arguments.length; i < n; i++) {
s = arguments[i];
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
t[p] = s[p];
}
return t;
};
return __assign.apply(this, arguments);
};
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {

@@ -9,2 +20,14 @@ if (k2 === undefined) k2 = k;

}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
var __exportStar = (this && this.__exportStar) || function(m, exports) {

@@ -14,20 +37,8 @@ for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p);

Object.defineProperty(exports, "__esModule", { value: true });
exports.color = void 0;
var hues = __importStar(require("./colorPalette"));
var config_1 = require("./config");
var helpers_1 = require("./helpers");
__exportStar(require("./constants"), exports);
__exportStar(require("./types"), exports);
var color = {
black: { title: 'Black', hex: config_1.black },
white: { title: 'White', hex: config_1.white },
gray: helpers_1.createColorTints(config_1.gray),
red: helpers_1.createColorTints(config_1.red),
orange: helpers_1.createColorTints(config_1.orange),
yellow: helpers_1.createColorTints(config_1.yellow),
green: helpers_1.createColorTints(config_1.green),
cyan: helpers_1.createColorTints(config_1.cyan),
blue: helpers_1.createColorTints(config_1.blue),
purple: helpers_1.createColorTints(config_1.purple),
magenta: helpers_1.createColorTints(config_1.magenta),
};
exports.default = color;
exports.color = __assign(__assign({}, hues), { black: { title: 'Black', hex: config_1.black }, white: { title: 'White', hex: config_1.white } });
//# sourceMappingURL=index.js.map

@@ -13,17 +13,7 @@ export interface ColorHueConfig {

export declare type ColorTintKey = '50' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | '950';
export interface ColorTints {
'50': ColorValue;
'100': ColorValue;
'200': ColorValue;
'300': ColorValue;
'400': ColorValue;
'500': ColorValue;
'600': ColorValue;
'700': ColorValue;
'800': ColorValue;
'900': ColorValue;
'950': ColorValue;
}
export declare type ColorTints = {
[key in ColorTintKey]: ColorValue;
};
export declare type ColorHueKey = 'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'cyan' | 'blue' | 'purple' | 'magenta';
export interface ColorPallette {
export interface ColorPalette {
black: ColorValue;

@@ -30,0 +20,0 @@ white: ColorValue;

@@ -0,65 +1,12 @@

import { ColorHueConfig } from './types';
export declare const black = "#101112";
export declare const white = "#fff";
export declare const gray: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const red: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const orange: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const yellow: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const green: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const cyan: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const blue: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const purple: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const magenta: {
title: string;
darkest: string;
mid: string;
lightest: string;
midPoint: number;
};
export declare const gray: ColorHueConfig;
export declare const red: ColorHueConfig;
export declare const orange: ColorHueConfig;
export declare const yellow: ColorHueConfig;
export declare const green: ColorHueConfig;
export declare const cyan: ColorHueConfig;
export declare const blue: ColorHueConfig;
export declare const purple: ColorHueConfig;
export declare const magenta: ColorHueConfig;

@@ -1,5 +0,4 @@

import { ColorPallette } from './types';
import { ColorPalette } from './types';
export * from './constants';
export * from './types';
declare const color: ColorPallette;
export default color;
export declare const color: ColorPalette;

@@ -1,19 +0,6 @@

import { black, white, gray, red, orange, yellow, green, cyan, blue, purple, magenta } from './config';
import { createColorTints } from './helpers';
import * as hues from './colorPalette';
import { black as blackHex, white as whiteHex } from './config';
export * from './constants';
export * from './types';
const color = {
black: { title: 'Black', hex: black },
white: { title: 'White', hex: white },
gray: createColorTints(gray),
red: createColorTints(red),
orange: createColorTints(orange),
yellow: createColorTints(yellow),
green: createColorTints(green),
cyan: createColorTints(cyan),
blue: createColorTints(blue),
purple: createColorTints(purple),
magenta: createColorTints(magenta),
};
export default color;
export const color = Object.assign(Object.assign({}, hues), { black: { title: 'Black', hex: blackHex }, white: { title: 'White', hex: whiteHex } });
//# sourceMappingURL=index.js.map

@@ -13,17 +13,7 @@ export interface ColorHueConfig {

export declare type ColorTintKey = '50' | '100' | '200' | '300' | '400' | '500' | '600' | '700' | '800' | '900' | '950';
export interface ColorTints {
'50': ColorValue;
'100': ColorValue;
'200': ColorValue;
'300': ColorValue;
'400': ColorValue;
'500': ColorValue;
'600': ColorValue;
'700': ColorValue;
'800': ColorValue;
'900': ColorValue;
'950': ColorValue;
}
export declare type ColorTints = {
[key in ColorTintKey]: ColorValue;
};
export declare type ColorHueKey = 'gray' | 'red' | 'orange' | 'yellow' | 'green' | 'cyan' | 'blue' | 'purple' | 'magenta';
export interface ColorPallette {
export interface ColorPalette {
black: ColorValue;

@@ -30,0 +20,0 @@ white: ColorValue;

{
"name": "@sanity/color",
"version": "1.0.0-alpha.0",
"version": "1.0.0",
"description": "The Sanity color palette.",
"main": "dist/cjs/index.js",
"module": "dist/es/index.js",
"sideEffects": false,
"files": [

@@ -15,4 +16,5 @@ "/dist"

"clean": "rimraf dist",
"lint": "eslint . --ext .js,.jsx,.mjs,.ts,.tsx",
"prebuild": "npm run clean",
"generate": "ts-node scripts/build.ts",
"lint": "eslint . --ext .js,.ts",
"prebuild": "npm run clean && npm run generate",
"prepublishOnly": "npm run build",

@@ -22,6 +24,5 @@ "test": "echo \"Error: no test specified\" && exit 1",

},
"dependencies": {
"polished": "^3.6.5"
},
"devDependencies": {
"@types/node": "^14.0.14",
"@types/prettier": "^2.0.1",
"@typescript-eslint/eslint-plugin": "3.4.0",

@@ -34,4 +35,6 @@ "@typescript-eslint/parser": "3.4.0",

"npm-run-all": "4.1.5",
"polished": "^3.6.5",
"prettier": "^2.0.5",
"rimraf": "3.0.2",
"ts-node": "^8.10.2",
"typescript": "3.9.5"

@@ -38,0 +41,0 @@ },

@@ -9,6 +9,8 @@ # @sanity/color

[![npm version](https://img.shields.io/npm/v/@sanity/color.svg?style=flat-square)](https://www.npmjs.com/package/@sanity/color)
## Usage
```js
import color from '@sanity/color'
import {color, COLOR_HUES, COLOR_TINTS} from '@sanity/color'

@@ -15,0 +17,0 @@ console.log(color.black.title)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc