@phun-ky/speccer 9.6.2 → 10.0.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
@@ -4,29 +4,34 @@
4
4
 
5
5
  [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-green.svg)](http://makeapullrequest.com) [![SemVer 2.0](https://img.shields.io/badge/SemVer-2.0-green.svg)](http://semver.org/spec/v2.0.0.html) ![npm version](https://img.shields.io/npm/v/@phun-ky/speccer) ![issues](https://img.shields.io/github/issues/phun-ky/speccer) ![license](https://img.shields.io/npm/l/@phun-ky/speccer) ![size](https://img.shields.io/bundlephobia/min/@phun-ky/speccer) ![npm](https://img.shields.io/npm/dm/%40phun-ky/speccer) ![GitHub Repo stars](https://img.shields.io/github/stars/phun-ky/speccer) [![codecov](https://codecov.io/gh/phun-ky/speccer/graph/badge.svg?token=VA91DL7ZLZ)](https://codecov.io/gh/phun-ky/speccer) [![build](https://github.com/phun-ky/speccer/actions/workflows/check.yml/badge.svg)](https://github.com/phun-ky/speccer/actions/workflows/check.yml)
6
6
 
7
+ ## About
8
+
7
9
  ![Image of speccer](./public/speccer.png)
8
10
 
11
+ **SPECCER** was originally created to simplify documenting components in a design system, but it can be used to highlight any HTML element on a webpage. If you need to draw attention to elements, **SPECCER** is your tool!
12
+
13
+ ## Table of Contents<!-- omit from toc -->
14
+
9
15
  - [@phun-ky/speccer](#phun-kyspeccer)
10
16
  - [About](#about)
11
17
  - [Installation](#installation)
12
- - [API](#api)
13
18
  - [Usage](#usage)
14
19
  - [Typescript](#typescript)
15
20
  - [ESM](#esm)
21
+ - [Lazy loading](#lazy-loading)
16
22
  - [Script](#script)
23
+ - [Advanced usage](#advanced-usage)
17
24
  - [React](#react)
18
- - [Advanced usage](#advanced-usage)
19
- - [Lazy](#lazy)
20
25
  - [Features](#features)
21
26
  - [Element spacing](#element-spacing)
22
27
  - [Element dimensions](#element-dimensions)
23
28
  - [Subtle measure](#subtle-measure)
24
- - [Highlight the anatomy of an element](#highlight-the-anatomy-of-an-element)
29
+ - [Pin element to highlight the anatomy](#pin-element-to-highlight-the-anatomy)
25
30
  - [Align with parent container](#align-with-parent-container)
26
31
  - [Custom literals](#custom-literals)
27
32
  - [Subtle anatomy](#subtle-anatomy)
28
33
  - [Curly brackets](#curly-brackets)
29
- - [Highlight anatomy programatically](#highlight-anatomy-programatically)
34
+ - [Pin programatically](#pin-programatically)
30
35
  - [Element typography](#element-typography)
31
36
  - [Syntax highlighting for typography](#syntax-highlighting-for-typography)
32
37
  - [Grid spacing](#grid-spacing)
@@ -35,14 +40,15 @@
35
40
  - [Tab stops](#tab-stops)
36
41
  - [Landmarks and regions](#landmarks-and-regions)
37
42
  - [Keys and shortcut](#keys-and-shortcut)
38
- - [Customization](#customization)
43
+ - [Customization](#customization)
44
+ - [API](#api)
45
+ - [Development](#development)
39
46
  - [Contributing](#contributing)
47
+ - [License](#license)
48
+ - [Changelog](#changelog)
49
+ - [FAQ](#faq)
40
50
  - [Sponsor me](#sponsor-me)
41
51
 
42
- ## About
43
-
44
- **SPECCER** was originally created to simplify documenting components in a design system, but it can be used to highlight any HTML element on a webpage. If you need to draw attention to elements, **SPECCER** is your tool!
45
-
46
52
  ## Installation
47
53
 
48
54
  ```shell-session
@@ -51,10 +57,6 @@ npm i --save @phun-ky/speccer
51
57
 
52
58
  [See a live demo](https://codepen.io/phun-ky/pen/OJejexN).
53
59
 
54
- ## API
55
-
56
- Full API documentation is available [here](https://github.com/phun-ky/speccer/blob/main/api/README.md).
57
-
58
60
  ## Usage
59
61
 
60
62
  ### Typescript
@@ -73,6 +75,45 @@ import speccer from '@phun-ky/speccer';
73
75
  speccer();
74
76
  ```
75
77
 
78
+ #### Lazy loading
79
+
80
+ If you're importing speccer instead of with a script tag, [you can use the following approach](https://codepen.io/phun-ky/pen/VwRRLyY) to apply lazy loading:
81
+
82
+ ```javascript
83
+ import { pinElements } from "https://esm.sh/@phun-ky/speccer";
84
+
85
+ /**
86
+ * Callback function for IntersectionObserver
87
+ * @param {IntersectionObserverEntry[]} entries - Array of entries being observed
88
+ * @param {IntersectionObserver} observer - The IntersectionObserver instance
89
+ * @returns {Promise<void>} Promise that resolves when element dissection is complete
90
+ */
91
+ const intersectionCallback: IntersectionObserverCallback = async (entries, observer) => {
92
+ entries.forEach(async (entry) => {
93
+ if (entry.intersectionRatio > 0) {
94
+ await pinElements(entry.target);
95
+ observer.unobserve(entry.target);
96
+ }
97
+ });
98
+ };
99
+
100
+ // Creating IntersectionObserver instance with the callback
101
+ const pinElementObserver = new IntersectionObserver(intersectionCallback);
102
+
103
+ /**
104
+ * Function to observe elements using IntersectionObserver
105
+ * @param {Element} el - The element to be observed
106
+ */
107
+ const observeElement = (el: Element): void => {
108
+ pinElementObserver.observe(el);
109
+ };
110
+
111
+ // Observing elements with the specified data attribute
112
+ document.querySelectorAll('[data-speccer="pin-area"]').forEach((el) => {
113
+ observeElement(el);
114
+ });
115
+ ```
116
+
76
117
  ### Script
77
118
 
78
119
  Or place these `script` and `link` tags in your web page:
@@ -94,6 +135,29 @@ Or with a CDN:
94
135
 
95
136
  And then follow the steps below to display the specifications you want :)
96
137
 
138
+ #### Advanced usage
139
+
140
+ If you want to control speccer a bit more, you have some options. Apply one of these attributes to the script element for different types of initialization:
141
+
142
+ ```html
143
+ <script src="../speccer.js" data-<manual|instant|dom|lazy></script>
144
+ ```
145
+
146
+ Or with a CDN:
147
+
148
+ ```html
149
+ <script src="https://unpkg.com/@phun-ky/speccer/dist/speccer.js" data-<manual|instant|dom|lazy></script>
150
+ ```
151
+
152
+ | Tag | Description |
153
+ | -------------- | ------------------------------------------------------------------- |
154
+ | `data-manual` | Makes `window.speccer()` available to be used when you feel like it |
155
+ | `data-instant` | fires off `speccer()` right away |
156
+ | `data-dom` | Waits for `DOMContentLoaded` |
157
+ | `data-lazy` | Lazy loads `speccer()` per specced element |
158
+
159
+ If no attribute is applied, it will default to `data-dom`, as in, it will initialize when `DOMContentLoaded` is fired.
160
+
97
161
  ### React
98
162
 
99
163
  If you use React, you can use an effect like this:
@@ -129,77 +193,6 @@ const Component = () => {
129
193
  export default Component;
130
194
  ```
131
195
 
132
- ## Advanced usage
133
-
134
- If you want to control speccer a bit more, you have some options. Apply one of these attributes to the script element for different types of initialization:
135
-
136
- ```html
137
- <script src="../speccer.js" data-<manual|instant|dom|lazy></script>
138
- ```
139
-
140
- Or with a CDN:
141
-
142
- ```html
143
- <script src="https://unpkg.com/@phun-ky/speccer/dist/speccer.js" data-<manual|instant|dom|lazy></script>
144
- ```
145
-
146
- | Tag | Description |
147
- | -------------- | ------------------------------------------------------------------- |
148
- | `data-manual` | Makes `window.speccer()` available to be used when you feel like it |
149
- | `data-instant` | fires off `speccer()` right away |
150
- | `data-dom` | Waits for `DOMContentLoaded` |
151
- | `data-lazy` | Lazy loads `speccer()` per specced element |
152
-
153
- If no attribute is applied, it will default to `data-dom`, as in, it will initialize when `DOMContentLoaded` is fired.
154
-
155
- ### Lazy
156
-
157
- If you're importing speccer instead of with a script tag, [you can use the following approach](https://codepen.io/phun-ky/pen/VwRRLyY) to apply lazy loading:
158
-
159
- ```javascript
160
- import { dissect, ElementDissectionResult } from "https://esm.sh/@phun-ky/speccer";
161
-
162
- /**
163
- * Function to dissect an HTML element
164
- * @param {Element} target - The element to be dissected
165
- * @returns {Promise<ElementDissectionResult>} Promise that resolves with the dissection result
166
- */
167
- const dissectElement = (target: Element): Promise<ElementDissectionResult> => {
168
- return dissect.element(target);
169
- };
170
-
171
- /**
172
- * Callback function for IntersectionObserver
173
- * @param {IntersectionObserverEntry[]} entries - Array of entries being observed
174
- * @param {IntersectionObserver} observer - The IntersectionObserver instance
175
- * @returns {Promise<void>} Promise that resolves when element dissection is complete
176
- */
177
- const intersectionCallback: IntersectionObserverCallback = async (entries, observer) => {
178
- entries.forEach(async (entry) => {
179
- if (entry.intersectionRatio > 0) {
180
- await dissectElement(entry.target);
181
- observer.unobserve(entry.target);
182
- }
183
- });
184
- };
185
-
186
- // Creating IntersectionObserver instance with the callback
187
- const dissectElementObserver = new IntersectionObserver(intersectionCallback);
188
-
189
- /**
190
- * Function to observe elements using IntersectionObserver
191
- * @param {Element} el - The element to be observed
192
- */
193
- const observeElement = (el: Element): void => {
194
- dissectElementObserver.observe(el);
195
- };
196
-
197
- // Observing elements with the specified data attribute
198
- document.querySelectorAll('[data-anatomy-section]').forEach((el) => {
199
- observeElement(el);
200
- });
201
- ```
202
-
203
196
  ## Features
204
197
 
205
198
  ### Element spacing
@@ -209,7 +202,7 @@ document.querySelectorAll('[data-anatomy-section]').forEach((el) => {
209
202
  Use the following attribute to display element padding and margin:
210
203
 
211
204
  ```html
212
- <div data-speccer class="..."></div>
205
+ <div data-speccer="spacing" class="..."></div>
213
206
  ```
214
207
 
215
208
  This will display the element _and all of it's children_ padding and margin.
@@ -222,7 +215,7 @@ Display dimensions with:
222
215
 
223
216
  ```html
224
217
  <div
225
- data-speccer-measure="[height right|left] | [width top|bottom]"
218
+ data-speccer="measure [height right|left] | [width top|bottom]"
226
219
  class="..."
227
220
  ></div>
228
221
  ```
@@ -236,21 +229,21 @@ Where `height` and `width` comes with placement flags. Default for `height` is `
236
229
  Use a subtle style:
237
230
 
238
231
  ```html
239
- <div data-speccer-measure="height left subtle" class="..."></div>
232
+ <div data-speccer="measure height left subtle" class="..."></div>
240
233
  ```
241
234
 
242
235
  This will give a dashed border.
243
236
 
244
- ### Highlight the anatomy of an element
237
+ ### Pin element to highlight the anatomy
245
238
 
246
239
  ![Image of speccer](./public/anatomy.png)
247
240
 
248
- In your component examples, use the following attribute. Remember to use the `data-anatomy-section` as an attribute on a parent element to scope the marking.
241
+ In your component examples, use the following attribute. Remember to use the `data-speccer="pin-area"`-attribute on a parent element to scope the marking.
249
242
 
250
243
  ```html
251
- <div data-anatomy-section>
244
+ <div data-speccer="pin-area">
252
245
  <div
253
- data-anatomy="outline [full|enclose][curly] [left|right|top|bottom]"
246
+ data-speccer="pin [bracket|enclose][curly] [left|right|top|bottom]"
254
247
  class="..."
255
248
  ></div>
256
249
  </div>
@@ -265,13 +258,13 @@ This will place a pin to the outline of the element. Default is `top`.
265
258
  You can also align the pins to the parent container.
266
259
 
267
260
  ```html
268
- <div data-anatomy-section>
269
- <div data-anatomy="outline parent [left|right|top|bottom]" class="..."></div>
261
+ <div data-speccer="pin-area">
262
+ <div data-speccer="pin parent [left|right|top|bottom]" class="..."></div>
270
263
  </div>
271
264
  ```
272
265
 
273
266
  > [!NOTE]
274
- > Only works with `outline [left|right|top|bottom]`, and not with `enclose`, `full` or `curly`!
267
+ > Only works with `pin [left|right|top|bottom]`, and not with `enclose`, `bracket` or `curly`!
275
268
 
276
269
  The lines from the element to the pin is drawn with a svg path and circle, so remember to add the following svg into your document:
277
270
 
@@ -319,8 +312,8 @@ window.SPECCER_LITERALS = [
319
312
  You can also give a more subtle touch to the anatomy elements.
320
313
 
321
314
  ```html
322
- <div data-anatomy-section>
323
- <div data-anatomy="outline top subtle" class="..."></div>
315
+ <div data-speccer="pin-area">
316
+ <div data-speccer="pin top subtle" class="..."></div>
324
317
  </div>
325
318
  ```
326
319
 
@@ -328,10 +321,10 @@ This will give a dashed border, and a more subtle pin style.
328
321
 
329
322
  #### Curly brackets
330
323
 
331
- You can use curly brackets with the `curly` tag in `data-anatomy` along side `outline full` to provide a more sleek style.
324
+ You can use curly brackets with the `curly` tag in `data-speccer` along side `pin bracket` to provide a more sleek style.
332
325
 
333
326
  > [!NOTE]
334
- > Only works with `outline full`
327
+ > Only works with `pin bracket`
335
328
 
336
329
  The curly brackets are made with SVG paths, and it is required to have the following snippet on your page for it to render:
337
330
 
@@ -352,9 +345,9 @@ The curly brackets are made with SVG paths, and it is required to have the follo
352
345
  </svg>
353
346
  ```
354
347
 
355
- #### Highlight anatomy programatically
348
+ #### Pin programatically
356
349
 
357
- from v9.5 you can utilize the `dissect` feature to highlight the anatomy of an element programaticaly. [Here is an example with a click event](https://codepen.io/phun-ky/full/LYKOWyP).
350
+ from v9.5 you can utilize the `pin` feature to highlight the anatomy of an element programaticaly. [Here is an example with a click event](https://codepen.io/phun-ky/bracket/LYKOWyP).
358
351
 
359
352
  [Kazam_screencast_00002.webm](https://github.com/user-attachments/assets/5c78cece-de46-4876-81f2-98c9108a2103)
360
353
 
@@ -365,7 +358,7 @@ from v9.5 you can utilize the `dissect` feature to highlight the anatomy of an e
365
358
  Display typography details:
366
359
 
367
360
  ```html
368
- <p data-speccer-typography="[left|right|top|bottom]" class="...">Some text</p>
361
+ <p data-speccer="typography [left|right|top|bottom]" class="...">Some text</p>
369
362
  ```
370
363
 
371
364
  This will place a box to display typography information. Default is `left`.
@@ -375,12 +368,10 @@ This will place a box to display typography information. Default is `left`.
375
368
 
376
369
  #### Syntax highlighting for typography
377
370
 
378
- If you want to produce a box that uses `pre` and `code` tags with support for syntax highlighting ([PrismJS](https://prismjs.com/) compatible), add `syntax` to the `data-speccer-typography` attribute.
371
+ If you want to produce a box that uses `pre` and `code` tags with support for syntax highlighting ([PrismJS](https://prismjs.com/) compatible), add `syntax` to the `data-speccer="typography"` attribute.
379
372
 
380
373
  ```html
381
- <p data-speccer-typography="[left|right|top|bottom][syntax]" class="...">
382
- Some text
383
- </p>
374
+ <p data-speccer="typography syntax right" class="...">Some text</p>
384
375
  ```
385
376
 
386
377
  You can then override the colors, based on these variables:
@@ -430,7 +421,7 @@ This will highlight the grid spacing in a `display: grid;` element.
430
421
  In your component examples, use the following attribute on your grid container.
431
422
 
432
423
  ```html
433
- <div data-speccer-grid="grid" …>…</div>
424
+ <div data-speccer="grid" …>…</div>
434
425
  ```
435
426
 
436
427
  ### Mark elements
@@ -442,7 +433,7 @@ This will mark the given elements.
442
433
  In your component examples, use the following attribute.
443
434
 
444
435
  ```html
445
- <div data-speccer-mark …>…</div>
436
+ <div data-speccer="mark" …>…</div>
446
437
  ```
447
438
 
448
439
  ### A11y notation
@@ -455,25 +446,31 @@ Prior art: [Jeremy Elder](https://twitter.com/JeremyElder)
455
446
 
456
447
  ![Screenshot of speccer a11y tab stops in use](./public/a11y-tabstop.png)
457
448
 
458
- If you want to display tab stops, append `data-speccer-a11y-tabstops` as an attribute to the container you want to display the tab stops in.
449
+ If you want to display tab stops, append `data-speccer="a11y tabstops"` as an attribute to the container you want to display the tab stops in.
459
450
 
460
451
  #### Landmarks and regions
461
452
 
462
453
  ![Screenshot of speccer a11y landmarks in use](./public/a11y-landmark.png)
463
454
 
464
- If you want to display landmarks and regions, append `data-speccer-a11y-landmark` as an attribute to the container you want to display the landmarks and regions in.
455
+ If you want to display landmarks and regions, append `data-speccer="a11y landmark"` as an attribute to the container you want to display the landmarks and regions in.
465
456
 
466
457
  #### Keys and shortcut
467
458
 
468
459
  ![Screenshot of speccer a11y shortcuts in use](./public/a11y-shortcut.png)
469
460
 
470
- If you want to display the shortcut with keys used for elements, use `data-speccer-a11y-shortcut="<shortcut>"` on the element that uses this shortcut:
461
+ If you want to display the shortcut with keys used for elements, use `data-speccer="a11y shortcut"` and `data-speccer-a11y-shortcut="<shortcut>"` on the element that uses this shortcut:
471
462
 
472
463
  ```html
473
- <button type="button" data-speccer-a11y-shortcut="ctrl + s">Save</button>
464
+ <button
465
+ type="button"
466
+ data-speccer="a11y shortcut"
467
+ data-speccer-a11y-shortcut="ctrl + s"
468
+ >
469
+ Save
470
+ </button>
474
471
  ```
475
472
 
476
- ## Customization
473
+ ### Customization
477
474
 
478
475
  ![Screenshot of speccer in a dark mode example](./public/darkmode.png)
479
476
 
@@ -481,38 +478,94 @@ Allthough the styling works nicely with dark mode, you can use the provided CSS
481
478
 
482
479
  ```css
483
480
  .ph-speccer.speccer {
484
- --ph-speccer-color-padding: rgba(219, 111, 255, 0.4);
485
- --ph-speccer-color-padding-hover: #db6fff;
486
- --ph-speccer-color-margin: rgba(255, 247, 111, 0.4);
487
- --ph-speccer-color-margin-hover: #fff76f;
488
- --ph-speccer-color-text-light: #fff;
489
- --ph-speccer-color-text-dark: #333;
490
- --ph-speccer-color-contrast: #ff3aa8;
491
- --ph-speccer-spacing-color: var(--ph-speccer-color-contrast);
492
- --ph-speccer-measure-color: #f00;
493
- --ph-speccer-pin-color: var(--ph-speccer-color-contrast);
494
- --ph-speccer-typography-background-color: #fff;
495
- --ph-speccer-typography-color-property: #3f85f2;
496
- --ph-speccer-typography-color-text: #57575b;
497
- --ph-speccer-typography-color-value: var(--ph-speccer-color-contrast);
498
- --ph-speccer-depth-opacity-400: 0.4;
499
- --ph-speccer-font-family: 'Menlo for Powerline', 'Menlo Regular for Powerline',
500
- 'DejaVu Sans Mono', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono',
501
- monospace;
502
- --ph-speccer-font-size: 12px;
503
- --ph-speccer-line-height: 12px;
481
+ --ph-speccer-color-artificialStrawberry: #ff3aa8;
482
+ --ph-speccer-color-venusSlipperOrchid: #db6fff;
483
+ --ph-speccer-color-superBanana: #fff76f;
484
+ --ph-speccer-color-white: #ffffff;
485
+ --ph-speccer-color-carbon: #333333;
486
+ --ph-speccer-color-red: #ff0000;
487
+ --ph-speccer-color-niuZaiSeDenim: #0074e8;
488
+ --ph-speccer-color-beautifulBlue: #1868b2;
489
+ --ph-speccer-color-fuchsiaBlue: #7e60c5;
490
+ --ph-speccer-base-color: var(--ph-speccer-color-artificialStrawberry);
491
+ --ph-speccer-spacing-color: var(--ph-speccer-base-color);
492
+ --ph-speccer-spacing-color-padding: rgb(
493
+ from var(--ph-speccer-color-venusSlipperOrchid) r g b /
494
+ var(--ph-speccer-opacity-40)
495
+ );
496
+ --ph-speccer-spacing-color-padding-hover: var(
497
+ --ph-speccer-color-venusSlipperOrchid
498
+ );
499
+ --ph-speccer-spacing-color-margin: rgb(
500
+ from var(--ph-speccer-color-superBanana) r g b /
501
+ var(--ph-speccer-opacity-40)
502
+ );
503
+ --ph-speccer-spacing-color-margin-hover: var(--ph-speccer-color-superBanana);
504
+ --ph-speccer-typography-background-color: var(--ph-speccer-color-white);
505
+ --ph-speccer-typography-color-property: var(--ph-speccer-color-niuZaiSeDenim);
506
+ --ph-speccer-typography-color-text: var(--ph-speccer-base-color);
507
+ --ph-speccer-typography-color-value: var(--ph-speccer-base-color);
508
+ --ph-speccer-mark-background-color: rgb(
509
+ from var(--ph-speccer-base-color) r g b / var(--ph-speccer-opacity-20)
510
+ );
511
+ --ph-speccer-mark-border-color: var(--ph-speccer-base-color);
512
+ --ph-speccer-mark-border-width: 1px;
513
+ --ph-speccer-mark-border-style: solid;
514
+ --ph-speccer-measure-color: var(--ph-speccer-color-red);
515
+ --ph-speccer-measure-size: 8px;
516
+ --ph-speccer-a11y-color-background: var(--ph-speccer-color-beautifulBlue);
517
+ --ph-speccer-a11y-landmark-color-background: var(
518
+ --ph-speccer-color-fuchsiaBlue
519
+ );
520
+ --ph-speccer-color-text-light: var(--ph-speccer-color-white);
521
+ --ph-speccer-color-text-dark: var(--ph-speccer-color-carbon);
522
+ --ph-speccer-pin-color: var(--ph-speccer-base-color);
504
523
  --ph-speccer-pin-size: 24px;
505
524
  --ph-speccer-pin-space: 48px;
525
+ --ph-speccer-line-height: 12px;
506
526
  --ph-speccer-line-width: 1px;
507
527
  --ph-speccer-line-width-negative: -1px;
508
- --ph-speccer-measure-size: 8px;
528
+ --ph-speccer-opacity-20: 0.2;
529
+ --ph-speccer-opacity-40: 0.4;
530
+ --ph-speccer-font-family: 'Menlo for Powerline', 'Menlo Regular for Powerline',
531
+ 'DejaVu Sans Mono', Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono',
532
+ monospace;
533
+ --ph-speccer-font-size: 12px;
534
+ --ph-speccer-transition-default: all 2s cubic-bezier(0.4, 0, 0.2, 1);
509
535
  }
510
536
  ```
511
537
 
538
+ ## API
539
+
540
+ Full API documentation is available [here](https://github.com/phun-ky/speccer/blob/main/api/README.md).
541
+
542
+ ## Development
543
+
544
+ ```
545
+ // Build
546
+ $ npm run build
547
+ // Run dev
548
+ $ npm run dev
549
+ // Test
550
+ $ npm test
551
+ ```
552
+
512
553
  ## Contributing
513
554
 
514
555
  Want to contribute? Please read the [CONTRIBUTING.md](https://github.com/phun-ky/speccer/blob/main/CONTRIBUTING.md) and [CODE_OF_CONDUCT.md](https://github.com/phun-ky/speccer/blob/main/CODE_OF_CONDUCT.md)
515
556
 
557
+ ## License
558
+
559
+ This project is licensed under the MIT License - see the [LICENSE](https://github.com/phun-ky/speccer/blob/main/LICENSE) file for details.
560
+
561
+ ## Changelog
562
+
563
+ See the [CHANGELOG.md](https://github.com/phun-ky/speccer/blob/main/CHANGELOG.md) for details on the latest updates.
564
+
565
+ ## FAQ
566
+
567
+ See the [discussions](https://github.com/phun-ky/speccer/discussions/categories/q-a) for an FAQ or to ask questions if no answer is given.
568
+
516
569
  ## Sponsor me
517
570
 
518
571
  I'm an Open Source evangelist, creating stuff that does not exist yet to help get rid of secondary activities and to enhance systems already in place, be it documentation or web sites.
@@ -522,3 +575,5 @@ The sponsorship is an unique opportunity to alleviate more hours for me to maint
522
575
  [Support me on GitHub Sponsors](https://github.com/sponsors/phun-ky).
523
576
 
524
577
  ![Speccer banner, with logo and slogan: A zero dependency package to highlight elements](./public/speccer-banner.png)
578
+
579
+ p.s. **Ukraine is still under brutal Russian invasion. A lot of Ukrainian people are hurt, without shelter and need help**. You can help in various ways, for instance, directly helping refugees, spreading awareness, putting pressure on your local government or companies. You can also support Ukraine by donating e.g. to [Red Cross](https://www.icrc.org/en/donate/ukraine), [Ukraine humanitarian organisation](https://savelife.in.ua/en/donate-en/#donate-army-card-weekly) or [donate Ambulances for Ukraine](https://www.gofundme.com/f/help-to-save-the-lives-of-civilians-in-a-war-zone).