@hypernym/colors 1.0.0 → 1.0.2

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/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Ivo Dolenc, Hypernym Studio
3
+ Copyright (c) 2024 Ivo Dolenc, Hypernym Studio
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,12 +1,24 @@
1
- # @hypernym/colors
1
+ <h1 align="center">Hypernym Colors</h1>
2
2
 
3
- Ultra lightweight color utilities for console.
3
+ <p align="center">Ultra lightweight color utilities for console.</p>
4
4
 
5
- <sub><a href="https://github.com/hypernym-studio/colors">Repository</a> | <a href="https://www.npmjs.com/package/@hypernym/colors">Package</a> | <a href="https://github.com/hypernym-studio/colors/releases">Releases</a> | <a href="https://github.com/hypernym-studio/colors/discussions">Discussions</a></sub>
5
+ <p align="center">
6
+ <a href="https://github.com/hypernym-studio/colors">Repository</a>
7
+ <span>✦</span>
8
+ <a href="https://www.npmjs.com/package/@hypernym/colors">Package</a>
9
+ <span>✦</span>
10
+ <a href="https://github.com/hypernym-studio/colors/releases">Releases</a>
11
+ <span>✦</span>
12
+ <a href="https://github.com/hypernym-studio/colors/discussions">Discussions</a>
13
+ </p>
6
14
 
7
- ```sh
8
- npm i -D @hypernym/colors
9
- ```
15
+ <br>
16
+
17
+ <pre align="center">
18
+ pnpm add @hypernym/colors
19
+ </pre>
20
+
21
+ <br>
10
22
 
11
23
  ## Features
12
24
 
@@ -24,12 +36,12 @@ console.log(bold(green('hypernym')), cyan('colors'))
24
36
 
25
37
  ## Community
26
38
 
27
- Feel free to use the official [discussions](https://github.com/hypernym-studio/colors/discussions) for any additional questions.
39
+ Feel free to ask questions or share new ideas.
40
+
41
+ Use the official [discussions](https://github.com/hypernym-studio/colors/discussions) to get involved.
28
42
 
29
43
  ## License
30
44
 
31
- Developed in 🇭🇷 Croatia
45
+ Developed in 🇭🇷 Croatia, © Hypernym Studio.
32
46
 
33
47
  Released under the [MIT](LICENSE.txt) license.
34
-
35
- © Hypernym Studio
package/dist/index.mjs ADDED
@@ -0,0 +1,29 @@
1
+ const _ = `\x1B[`;
2
+ const reset = (v) => `${_}0m${v}${_}0m`;
3
+ const bold = (v) => `${_}1m${v}${_}22m`;
4
+ const dim = (v) => `${_}2m${v}${_}22m`;
5
+ const italic = (v) => `${_}3m${v}${_}23m`;
6
+ const underline = (v) => `${_}4m${v}${_}24m`;
7
+ const inverse = (v) => `${_}7m${v}${_}27m`;
8
+ const hidden = (v) => `${_}8m${v}${_}28m`;
9
+ const crossout = (v) => `${_}9m${v}${_}29m`;
10
+ const black = (v) => `${_}30m${v}${_}39m`;
11
+ const bgBlack = (v) => `${_}40m${v}${_}49m`;
12
+ const red = (v) => `${_}31m${v}${_}39m`;
13
+ const bgRed = (v) => `${_}41m${v}${_}49m`;
14
+ const green = (v) => `${_}32m${v}${_}39m`;
15
+ const bgGreen = (v) => `${_}42m${v}${_}49m`;
16
+ const yellow = (v) => `${_}33m${v}${_}39m`;
17
+ const bgYellow = (v) => `${_}43m${v}${_}49m`;
18
+ const blue = (v) => `${_}34m${v}${_}39m`;
19
+ const bgBlue = (v) => `${_}44m${v}${_}49m`;
20
+ const magenta = (v) => `${_}35m${v}${_}39m`;
21
+ const bgMagenta = (v) => `${_}45m${v}${_}49m`;
22
+ const cyan = (v) => `${_}36m${v}${_}39m`;
23
+ const bgCyan = (v) => `${_}46m${v}${_}49m`;
24
+ const white = (v) => `${_}37m${v}${_}39m`;
25
+ const bgWhite = (v) => `${_}47m${v}${_}49m`;
26
+ const gray = (v) => `${_}90m${v}${_}39m`;
27
+ const bgGray = (v) => `${_}100m${v}${_}49m`;
28
+
29
+ export { bgBlack, bgBlue, bgCyan, bgGray, bgGreen, bgMagenta, bgRed, bgWhite, bgYellow, black, blue, bold, crossout, cyan, dim, gray, green, hidden, inverse, italic, magenta, red, reset, underline, white, yellow };
@@ -1,5 +1,3 @@
1
- type Color = (v: string | number) => string;
2
-
3
1
  declare const reset: Color;
4
2
  declare const bold: Color;
5
3
  declare const dim: Color;
@@ -27,4 +25,6 @@ declare const bgWhite: Color;
27
25
  declare const gray: Color;
28
26
  declare const bgGray: Color;
29
27
 
30
- export { type Color, reset, bold, dim, italic, underline, inverse, hidden, crossout, black, bgBlack, red, bgRed, green, bgGreen, yellow, bgYellow, blue, bgBlue, magenta, bgMagenta, cyan, bgCyan, white, bgWhite, gray, bgGray };
28
+ type Color = (v: string | number) => string;
29
+
30
+ export { type Color, bgBlack, bgBlue, bgCyan, bgGray, bgGreen, bgMagenta, bgRed, bgWhite, bgYellow, black, blue, bold, crossout, cyan, dim, gray, green, hidden, inverse, italic, magenta, red, reset, underline, white, yellow };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hypernym/colors",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "author": "Hypernym Studio",
5
5
  "description": "Ultra lightweight color utilities for console.",
6
6
  "license": "MIT",
@@ -10,12 +10,12 @@
10
10
  "type": "module",
11
11
  "exports": {
12
12
  ".": {
13
- "types": "./src/types/index.d.ts",
14
- "import": "./src/index.mjs"
13
+ "types": "./dist/types/index.d.mts",
14
+ "import": "./dist/index.mjs"
15
15
  }
16
16
  },
17
17
  "files": [
18
- "src"
18
+ "dist"
19
19
  ],
20
20
  "keywords": [
21
21
  "cli",
@@ -28,21 +28,37 @@
28
28
  "log",
29
29
  "esm"
30
30
  ],
31
- "scripts": {
32
- "lint": "ESLINT_USE_FLAT_CONFIG=true eslint -c .config/eslint.config.js .",
33
- "lint:fix": "ESLINT_USE_FLAT_CONFIG=true eslint -c .config/eslint.config.js --fix .",
34
- "format": "prettier --config .config/prettier.config.js --write ."
31
+ "sideEffects": false,
32
+ "engines": {
33
+ "node": ">=20.0.0",
34
+ "pnpm": ">=9.0.0"
35
+ },
36
+ "peerDependencies": {
37
+ "@types/node": ">=20.0.0",
38
+ "typescript": ">=5.0.0"
39
+ },
40
+ "peerDependenciesMeta": {
41
+ "@types/node": {
42
+ "optional": true
43
+ },
44
+ "typescript": {
45
+ "optional": true
46
+ }
35
47
  },
36
48
  "devDependencies": {
37
- "@hypernym/eslint-config": "^2.0.0",
38
- "@hypernym/prettier-config": "^2.0.0",
39
- "@hypernym/tsconfig": "^1.0.1",
40
- "@types/node": "^20.6.3",
41
- "eslint": "^8.49.0",
42
- "prettier": "^3.0.3",
43
- "typescript": "^5.2.2"
49
+ "@hypernym/bundler": "^0.14.0",
50
+ "@hypernym/eslint-config": "^3.5.1",
51
+ "@hypernym/prettier-config": "^3.2.0",
52
+ "@hypernym/tsconfig": "^2.4.0",
53
+ "@types/node": "^22.8.6",
54
+ "eslint": "^9.14.0",
55
+ "prettier": "^3.3.3",
56
+ "typescript": "^5.6.3"
44
57
  },
45
- "engines": {
46
- "node": ">=v18.0.0"
58
+ "scripts": {
59
+ "build": "hyperbundler",
60
+ "lint": "eslint .",
61
+ "lint:fix": "eslint --fix .",
62
+ "format": "prettier --write ."
47
63
  }
48
- }
64
+ }
package/src/index.mjs DELETED
@@ -1,56 +0,0 @@
1
- const _ = `\x1B[`
2
- const reset = (v) => `${_}0m${v}${_}0m`
3
- const bold = (v) => `${_}1m${v}${_}22m`
4
- const dim = (v) => `${_}2m${v}${_}22m`
5
- const italic = (v) => `${_}3m${v}${_}23m`
6
- const underline = (v) => `${_}4m${v}${_}24m`
7
- const inverse = (v) => `${_}7m${v}${_}27m`
8
- const hidden = (v) => `${_}8m${v}${_}28m`
9
- const crossout = (v) => `${_}9m${v}${_}29m`
10
- const black = (v) => `${_}30m${v}${_}39m`
11
- const bgBlack = (v) => `${_}40m${v}${_}49m`
12
- const red = (v) => `${_}31m${v}${_}39m`
13
- const bgRed = (v) => `${_}41m${v}${_}49m`
14
- const green = (v) => `${_}32m${v}${_}39m`
15
- const bgGreen = (v) => `${_}42m${v}${_}49m`
16
- const yellow = (v) => `${_}33m${v}${_}39m`
17
- const bgYellow = (v) => `${_}43m${v}${_}49m`
18
- const blue = (v) => `${_}34m${v}${_}39m`
19
- const bgBlue = (v) => `${_}44m${v}${_}49m`
20
- const magenta = (v) => `${_}35m${v}${_}39m`
21
- const bgMagenta = (v) => `${_}45m${v}${_}49m`
22
- const cyan = (v) => `${_}36m${v}${_}39m`
23
- const bgCyan = (v) => `${_}46m${v}${_}49m`
24
- const white = (v) => `${_}37m${v}${_}39m`
25
- const bgWhite = (v) => `${_}47m${v}${_}49m`
26
- const gray = (v) => `${_}90m${v}${_}39m`
27
- const bgGray = (v) => `${_}100m${v}${_}49m`
28
-
29
- export {
30
- reset,
31
- bold,
32
- dim,
33
- italic,
34
- underline,
35
- inverse,
36
- hidden,
37
- crossout,
38
- black,
39
- bgBlack,
40
- red,
41
- bgRed,
42
- green,
43
- bgGreen,
44
- yellow,
45
- bgYellow,
46
- blue,
47
- bgBlue,
48
- magenta,
49
- bgMagenta,
50
- cyan,
51
- bgCyan,
52
- white,
53
- bgWhite,
54
- gray,
55
- bgGray,
56
- }