@maksims/colorizer.js 2.0.2 → 2.0.3

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/CHANGELOG.md CHANGED
@@ -1,21 +1,3 @@
1
- ## Docs
2
- docs: update README.md
3
-
4
1
  ## Chore
5
- chore(package.json): update path to the main file
6
- chore: update library version
7
- chore: update package description
8
- chore: add CHANGELOG.md
9
-
10
- ## Refactor
11
- refactor(const/STYLES): rename TRANSPARENT into DIM
12
- refactor(const/STYLES): rewrite in js
13
- refactor: move styling contexts into separate module
14
- refactor: remove is-fill-context-valid utility while doc have description how library should be used
15
- refactor: remove colorizer type file
16
- refactor: rewrite library entire in js and jsdoc
17
-
18
- ## Features
19
- feat(const/STYLES): add hidde/invisible mode
20
- feat(const/STYLES): add reverse/inverse
21
- feat(const/STYLES): add blinking
2
+ chore: add type declaration
3
+ chore: add path to the .d.ts file
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@maksims/colorizer.js",
3
- "version": "2.0.2",
3
+ "version": "2.0.3",
4
4
  "description": "Small library for simple coloring and styling of console output with ANSI charcters.",
5
5
  "homepage": "https://github.com/MaksimsTurs/colorizer.js#readme",
6
6
  "license": "ISC",
7
7
  "author": "MaksimsTurs",
8
8
  "type": "module",
9
9
  "main": "./src/colorizer.js",
10
+ "types": "./types/colorizer.d.ts",
10
11
  "bugs": {
11
12
  "url": "https://github.com/MaksimsTurs/colorizer.js/issues"
12
13
  },
@@ -0,0 +1,26 @@
1
+ export default Colorizer;
2
+ declare class Colorizer {
3
+ strikeThrought(): Colorizer;
4
+ blinking(): Colorizer;
5
+ underline(): Colorizer;
6
+ dim(): Colorizer;
7
+ italic(): Colorizer;
8
+ bold(): Colorizer;
9
+ reverse(): Colorizer;
10
+ hidden(): Colorizer;
11
+ /**
12
+ * @description Set font styles, should be called before any styling function.
13
+ */
14
+ font(): Colorizer;
15
+ /**
16
+ * @description Set background styles, should be called before any of styling functions.
17
+ */
18
+ background(): Colorizer;
19
+ rgb(r: number, g: number, b: number): Colorizer;
20
+ /**
21
+ * @description Combine all styles together and returns styled text.
22
+ */
23
+ text(text: string): string;
24
+
25
+ private styles: string[]
26
+ }