New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cepheus

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cepheus - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

lib/types/adjust.d.ts

2

lib/types/constants.d.ts
export declare const LENGTH = 120;
export declare const INTERPOLATOR: unique symbol;
export declare const MAX: number;
//# sourceMappingURL=constants.d.ts.map

5

lib/types/create-interpolator.d.ts

@@ -1,3 +0,4 @@

import type { Interpolator, State } from './types';
export declare const createInterpolator: (model: unknown, initialState?: State) => Interpolator;
import { Options } from '.';
import { Interpolator } from './types';
export declare const createInterpolator: (options: Options) => Interpolator;
//# sourceMappingURL=create-interpolator.d.ts.map

@@ -1,9 +0,21 @@

export { LENGTH } from './constants';
export { adjust } from './adjust';
export { alias } from './alias';
export { barycentric } from './barycentric';
export { cartesian } from './cartesian';
export { color } from './color';
export { INTERPOLATOR, LENGTH } from './constants';
export { createInterpolator } from './create-interpolator';
export { normalize } from './normalize';
export { normalizeAngle } from './normalize-angle';
export { parseModel } from './parse-model';
export { szudzik } from './szudzik';
export type { Interpolator, ModelParsed, ModelUnparsed, Point, State, Subscription, Triangle, Unsubscribe } from './types';
export { xor } from './xor';
export { isModel } from './is-model';
export { parse } from './parse';
export { chroma, darkMode, lightness, model } from './setters';
export { subscribe } from './subscribe';
export { ColorSpace } from './types';
export type { Interpolator, Model, ModelUnparsed, Options, Point, State, Subscription, Triangle, Unsubscribe } from './types';
export { lerp } from './utilities/lerp';
export { lerpAngle } from './utilities/lerp-angle';
export { lerpArray } from './utilities/lerp-array';
export { normalize } from './utilities/normalize';
export { normalizeAngle } from './utilities/normalize-angle';
export { szudzik } from './utilities/szudzik';
export { xor } from './utilities/xor';
//# sourceMappingURL=index.d.ts.map

@@ -0,5 +1,11 @@

import { INTERPOLATOR } from './constants';
export type Point = [x: number, y: number];
export type Triangle = [Point, Point, Point];
export type Line = [Point, Point];
export declare enum ColorSpace {
srgb = 0,
p3 = 1
}
export type ModelUnparsed = [
colorSpace: number,
interval: number,

@@ -11,3 +17,4 @@ length: number,

];
export interface ModelParsed {
export interface Model {
colorSpace: ColorSpace;
colors: Map<number, Array<[number, number, number]>>;

@@ -18,4 +25,8 @@ interval: number;

triangle: Triangle;
alias?: (value: string | number) => number | undefined;
}
export type Unsubscribe = () => unknown;
export type Subscription = () => Promise<unknown> | unknown;
export interface State {
model: Model;
lightness: [low: number, high: number];

@@ -25,17 +36,15 @@ chroma: [low: number, high: number];

}
export type Unsubscribe = () => void;
export type Subscription = () => void;
export interface Options extends Partial<Omit<State, 'model'>>, Pick<State, 'model'> {
}
export interface Interpolator {
triangle: () => Readonly<Triangle>;
lightness: () => Readonly<State['lightness']>;
chroma: () => Readonly<State['chroma']>;
darkMode: () => Readonly<State['darkMode']>;
updateLightness: (a?: number, b?: number) => void;
updateChroma: (a?: number, b?: number) => void;
updateDarkMode: (value: boolean) => void;
subscribe: (cb: Subscription) => Unsubscribe;
cartesian: (color: number, x: number, y: number, extend?: boolean) => [number, number, number] | undefined;
barycentric: (color: number, alpha: number, beta: number, gamma: number, invert?: boolean) => [number, number, number] | undefined;
get: (color: number, chroma: number, lightness: number, invert?: boolean) => [number, number, number] | undefined;
[INTERPOLATOR]: {
triangle: Triangle;
state: State;
subscriptions: Set<Subscription>;
updateModel: (model: Model) => Promise<void>;
updateLightness: (a?: number, b?: number) => Promise<void>;
updateChroma: (a?: number, b?: number) => Promise<void>;
updateDarkMode: (value: boolean) => Promise<void>;
};
}
//# sourceMappingURL=types.d.ts.map
{
"name": "cepheus",
"description": "",
"version": "0.4.0",
"version": "0.5.0",
"author": "escapace <opensource@escapace.com>",

@@ -10,20 +10,21 @@ "bugs": "https://github.com/escapace/cepheus/issues",

"@types/mocha": "10.0.1",
"@types/node": "18.13.0",
"@typescript-eslint/eslint-plugin": "5.52.0",
"@typescript-eslint/parser": "5.52.0",
"c8": "7.12.0",
"@types/node": "18.15.11",
"@typescript-eslint/eslint-plugin": "5.57.1",
"@typescript-eslint/parser": "5.57.1",
"c8": "7.13.0",
"chai": "4.3.7",
"eslint": "8.34.0",
"eslint-config-escapace": "3.16.1",
"eslint-config-prettier": "8.6.0",
"eslint": "8.38.0",
"eslint-config-escapace": "3.17.0",
"eslint-config-prettier": "8.8.0",
"eslint-plugin-editorconfig": "4.0.2",
"eslint-plugin-no-null": "1.0.2",
"mocha": "10.2.0",
"prettier": "2.8.4",
"prettier-config-escapace": "1.0.4",
"typescript": "4.9.5"
"prettier": "2.8.7",
"prettier-config-escapace": "1.0.5",
"typescript": "5.0.4"
},
"exports": {
".": {
"import": "./lib/esm/index.mjs"
"import": "./lib/esm/index.mjs",
"types": "./lib/types/index.d.ts"
}

@@ -30,0 +31,0 @@ },

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

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