@cssints/ramp 0.6.0 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,4 +1,3 @@
1
- //#region src/index.d.ts
2
1
  /** A hex colour: cheap in the types (createTokens checks it without the walk of every colour syntax). */
3
2
  export type Hex = `#${string}`;
4
3
  /** The step names of an N-step ramp: `"1"` to `"N"` (`t.blue._1` in code, `--blue-1` in CSS). */
@@ -52,5 +51,4 @@ export declare function ramp<const R extends readonly number[]>(base: string, op
52
51
  * @param {Ramp<K>} r a ramp
53
52
  * @returns {RampOverrides<K>} its steps as `{ _1: hex, … }`
54
53
  */
55
- export declare const overrides: <K extends string>(r: Ramp<K>) => RampOverrides<K>;
56
- //#endregion
54
+ export declare const overrides: <K extends string>(r: Ramp<K>) => RampOverrides<K>;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { clampRgb, converter, formatHex, inGamut, parse, wcagLuminance } from "culori";
2
- //#region src/index.ts
2
+ // src/index.ts
3
3
  const toOklch = converter("oklch");
4
4
  const toRgb = converter("rgb");
5
5
  const inSrgb = inGamut("rgb");
@@ -92,5 +92,4 @@ function ramp(base, options) {
92
92
  * @returns {RampOverrides<K>} its steps as `{ _1: hex, … }`
93
93
  */
94
94
  const overrides = (r) => Object.fromEntries(Object.entries(r).flatMap(([k, v]) => k === "$type" ? [] : [[`_${k}`, v.$value]]));
95
- //#endregion
96
95
  export { luminance, overrides, ramp, ratio };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cssints/ramp",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "OKLCH colour ramps for cssints as DTCG data: a lightness ramp, or steps picked by WCAG 2 contrast against a background",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -24,7 +24,7 @@
24
24
  "culori": "^4.0.2"
25
25
  },
26
26
  "peerDependencies": {
27
- "cssints": "^0.6.0"
27
+ "cssints": "^0.7.0"
28
28
  },
29
29
  "engines": {
30
30
  "node": ">=22"