@nanostores/logger 0.1.0 → 0.1.1

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/README.md CHANGED
@@ -3,10 +3,24 @@
3
3
  <img align="right" width="92" height="92" title="Nano Stores logo"
4
4
  src="https://nanostores.github.io/nanostores/logo.svg">
5
5
 
6
- Logger of lifecycles, actions and changes for **[Nano Stores]**,
6
+ Logger of lifecycles, changes and actions for **[Nano Stores]**,
7
7
  a tiny state manager with many atomic tree-shakable stores.
8
8
 
9
+ * **Clean.** All messages are stacked in compact, collapsible nested groups.
10
+ * **Descriptive.** Detailed descriptions with a clear comparison of the old and new values.
11
+ * **Pretty designed.** Compact logo and color badges for quick reading.
12
+ * **Flexible.** Ability to disable and filter certain types of messages.
13
+ * **Supports all types of stores**: Atom, Map and Deep Map.
14
+
9
15
  [Nano Stores]: https://github.com/nanostores/nanostores/
10
16
 
17
+ <p align="center">
18
+ <picture>
19
+ <source media="(prefers-color-scheme: dark)" srcset="./img/dark.png">
20
+ <source media="(prefers-color-scheme: light)" srcset="./img/light.png">
21
+ <img alt="Nano Stores Logger" src="./img/light.png">
22
+ </picture>
23
+ </p>
24
+
11
25
  ## Docs
12
26
  Read full docs **[here](https://github.com/nanostores/logger#readme)**.
package/logger/index.d.ts CHANGED
@@ -24,12 +24,12 @@ interface LoggerOptionsMessages {
24
24
 
25
25
  interface LoggerOptions {
26
26
  /**
27
- * Disable action logs with specific name.
27
+ * Disable logs of actions with a specific name.
28
28
  */
29
29
  ignoreActions?: string[]
30
30
 
31
31
  /**
32
- * Disable specific log types.
32
+ * Disable specific types of logs.
33
33
  */
34
34
  messages?: LoggerOptionsMessages
35
35
  }
@@ -42,8 +42,8 @@ interface LoggerOptions {
42
42
  * import { $profile, $users } from './stores/index.js'
43
43
  *
44
44
  * let destroy = logger({
45
- * 'Profile Store': $profile,
46
- * 'Users Store': $users
45
+ * 'Profile': $profile,
46
+ * 'Users': $users
47
47
  * })
48
48
  * ```
49
49
  *
package/logger/index.js CHANGED
@@ -23,24 +23,24 @@ function borders(full) {
23
23
 
24
24
  const STYLES = {
25
25
  badges: {
26
- action: badge('#5351A4'),
27
- arguments: badge('#429BD7'),
26
+ action: badge('#00899A'),
27
+ arguments: badge('#007281'),
28
28
  change: badge('#0E8A00'),
29
- error: badge('#c21f1f'),
30
- mount: badge('#1F49E0'),
31
- new: badge('#4FA574'),
32
- old: badge('#a44f4f'),
33
- unmount: badge('#5C5C5C'),
34
- value: badge('#429BD7')
29
+ error: badge('#C30000'),
30
+ mount: badge('#0059D1'),
31
+ new: badge('#0C7800'),
32
+ old: badge('#943636'),
33
+ unmount: badge('#5E5E5E'),
34
+ value: badge('#8A6F00')
35
35
  },
36
- bold: 'font-weight: 700',
36
+ bold: 'font-weight: 700;',
37
37
  logo: `
38
38
  padding: 0 5px 2px;
39
39
  color: white;
40
40
  background-color: black;
41
41
  border-radius: 4px 0 0 4px;
42
42
  `,
43
- regular: 'font-weight: 400'
43
+ regular: 'font-weight: 400;'
44
44
  }
45
45
 
46
46
  function createLog({ logo, message, type, value }) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@nanostores/logger",
3
- "version": "0.1.0",
4
- "description": "Logger of lifecycles, actions and changes for Nano Stores",
3
+ "version": "0.1.1",
4
+ "description": "Logger of lifecycles, changes and actions for Nano Stores",
5
5
  "keywords": [
6
6
  "nanostores",
7
7
  "devtools",