Skip to content

Commit

Permalink
chore: 🤖 release v9.0.4
Browse files Browse the repository at this point in the history
  • Loading branch information
phun-ky committed Feb 16, 2024
1 parent a171bbe commit c0e3a9e
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 21 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## [9.0.4](https://github.com/phun-ky/speccer/compare/v9.0.3...v9.0.4) (2024-02-16)


### Tasks

* 🤖 Adjust dev script ([9316d0a](https://github.com/phun-ky/speccer/commit/9316d0a41da30a764f94a59ffe0330b118700bf8))


### Bug

* 🐛 Add test for typography position util ([39f3ae4](https://github.com/phun-ky/speccer/commit/39f3ae4a1f3a632fd909b054419ec12329f963b2))
* 🐛 Revert `for..of` to `.forEach` to solve racing condition ([55c2cde](https://github.com/phun-ky/speccer/commit/55c2cde9fe6cae4106250c75d5fc350b04c1efba)), closes [#106](https://github.com/phun-ky/speccer/issues/106)

## [9.0.3](https://github.com/phun-ky/speccer/compare/v9.0.2...v9.0.3) (2024-02-13)

## [9.0.2](https://github.com/phun-ky/speccer/compare/v9.0.1...v9.0.2) (2024-02-13)
Expand Down
3 changes: 3 additions & 0 deletions api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
- [features/spacing](modules/features_spacing.md)
- [features/spacing/utils/position](modules/features_spacing_utils_position.md)
- [features/typography](modules/features_typography.md)
- [features/typography/utils/\_\_tests\_\_/position](modules/features_typography_utils___tests___position.md)
- [features/typography/utils/position](modules/features_typography_utils_position.md)
- [features/typography/utils/template](modules/features_typography_utils_template.md)
- [main](modules/main.md)
Expand All @@ -25,6 +26,7 @@
- [types/interfaces/position](modules/types_interfaces_position.md)
- [types/position](modules/types_position.md)
- [types/speccer](modules/types_speccer.md)
- [types/xy](modules/types_xy.md)
- [utils/\_\_tests\_\_/angle](modules/utils___tests___angle.md)
- [utils/\_\_tests\_\_/area](modules/utils___tests___area.md)
- [utils/\_\_tests\_\_/attributes](modules/utils___tests___attributes.md)
Expand All @@ -43,6 +45,7 @@
- [utils/\_\_tests\_\_/position](modules/utils___tests___position.md)
- [utils/\_\_tests\_\_/styles](modules/utils___tests___styles.md)
- [utils/\_\_tests\_\_/wait](modules/utils___tests___wait.md)
- [utils/\_\_tests\_\_/xy](modules/utils___tests___xy.md)
- [utils/angle](modules/utils_angle.md)
- [utils/area](modules/utils_area.md)
- [utils/attributes](modules/utils_attributes.md)
Expand Down
2 changes: 1 addition & 1 deletion api/modules/features_dissect_utils_styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,4 @@ console.log(styles);

#### Defined in

[features/dissect/utils/styles.ts:31](https://github.com/phun-ky/speccer/blob/main/src/features/dissect/utils/styles.ts#L31)
[features/dissect/utils/styles.ts:32](https://github.com/phun-ky/speccer/blob/main/src/features/dissect/utils/styles.ts#L32)
34 changes: 17 additions & 17 deletions api/modules/utils_xy.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,24 @@ Object containing functions to retrieve specific x and y coordinates from a DOMR

| Name | Type | Description |
| :------ | :------ | :------ |
| `bottom` | (`rect`: `DOMRect`) => \{ `x`: `number` ; `y`: `number` } | Get the x and y coordinates of the bottom center of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const bottomCenterCoordinates = xy.bottom(rect); // bottomCenterCoordinates.x and bottomCenterCoordinates.y will contain the coordinates ``` |
| `bottom-center` | (`rect`: `DOMRect`) => \{ `x`: `number` ; `y`: `number` } | Get the x and y coordinates of the bottom center of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const bottomCenterCoordinates = xy['bottom-center'](rect); // bottomCenterCoordinates.x and bottomCenterCoordinates.y will contain the coordinates ``` |
| `bottom-left` | (`rect`: `DOMRect`) => \{ `x`: `number` ; `y`: `number` } | Get the x and y coordinates of the bottom left of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const bottomLeftCoordinates = xy['bottom-left'](rect); // bottomLeftCoordinates.x and bottomLeftCoordinates.y will contain the coordinates ``` |
| `bottom-right` | (`rect`: `DOMRect`) => \{ `x`: `number` ; `y`: `number` } | Get the x and y coordinates of the bottom right of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const bottomRight = xy['bottom-right'](rect); // bottomRight.x and bottomRight.y will contain the coordinates ``` |
| `center` | (`rect`: `DOMRect`) => \{ `x`: `number` ; `y`: `number` } | Get the x and y coordinates of the center of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const centerCoordinates = xy.center(rect); // centerCoordinates.x and centerCoordinates.y will contain the coordinates ``` |
| `left` | (`rect`: `DOMRect`) => \{ `x`: `number` ; `y`: `number` } | Get the x and y coordinates of the left of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const leftCoordinates = xy.left(rect); // leftCoordinates.x and leftCoordinates.y will contain the coordinates ``` |
| `left-bottom` | (`rect`: `DOMRect`) => \{ `x`: `number` ; `y`: `number` } | Get the x and y coordinates of the left bottom of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const leftBottomCoordinates = xy['left-bottom'](rect); // leftBottomCoordinates.x and leftBottomCoordinates.y will contain the coordinates ``` |
| `left-center` | (`rect`: `DOMRect`) => \{ `x`: `number` ; `y`: `number` } | Get the x and y coordinates of the left center of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const leftCenterCoordinates = xy['left-center'](rect); // leftCenterCoordinates.x and leftCenterCoordinates.y will contain the coordinates ``` |
| `left-top` | (`rect`: `DOMRect`) => \{ `x`: `number` ; `y`: `number` } | Get the x and y coordinates of the left top of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const leftTop = xy['left-top'](rect); // leftTop.x and leftTop.y will contain the coordinates ``` |
| `right` | (`rect`: `DOMRect`) => \{ `x`: `number` ; `y`: `number` } | Get the x and y coordinates of the right center of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const rightCenterCoordinates = xy.right(rect); // rightCenterCoordinates.x and rightCenterCoordinates.y will contain the coordinates ``` |
| `right-bottom` | (`rect`: `DOMRect`) => \{ `x`: `number` ; `y`: `number` } | Get the x and y coordinates of the right bottom of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const rightBottomCoordinates = xy['right-bottom'](rect); // rightBottomCoordinates.x and rightBottomCoordinates.y will contain the coordinates ``` |
| `right-center` | (`rect`: `DOMRect`) => \{ `x`: `number` ; `y`: `number` } | Get the x and y coordinates of the right center of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const rightCenterCoordinates = xy['right-center'](rect); // rightCenterCoordinates.x and rightCenterCoordinates.y will contain the coordinates ``` |
| `bottom` | (`rect`: `DOMRect`) => [`SpeccerCoordinatesInterface`](../interfaces/types_xy.SpeccerCoordinatesInterface.md) | Get the x and y coordinates of the bottom center of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const bottomCenterCoordinates = xy.bottom(rect); // bottomCenterCoordinates.x and bottomCenterCoordinates.y will contain the coordinates ``` |
| `bottom-center` | (`rect`: `DOMRect`) => [`SpeccerCoordinatesInterface`](../interfaces/types_xy.SpeccerCoordinatesInterface.md) | Get the x and y coordinates of the bottom center of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const bottomCenterCoordinates = xy['bottom-center'](rect); // bottomCenterCoordinates.x and bottomCenterCoordinates.y will contain the coordinates ``` |
| `bottom-left` | (`rect`: `DOMRect`) => [`SpeccerCoordinatesInterface`](../interfaces/types_xy.SpeccerCoordinatesInterface.md) | Get the x and y coordinates of the bottom left of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const bottomLeftCoordinates = xy['bottom-left'](rect); // bottomLeftCoordinates.x and bottomLeftCoordinates.y will contain the coordinates ``` |
| `bottom-right` | (`rect`: `DOMRect`) => [`SpeccerCoordinatesInterface`](../interfaces/types_xy.SpeccerCoordinatesInterface.md) | Get the x and y coordinates of the bottom right of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const bottomRight = xy['bottom-right'](rect); // bottomRight.x and bottomRight.y will contain the coordinates ``` |
| `center` | (`rect`: `DOMRect`) => [`SpeccerCoordinatesInterface`](../interfaces/types_xy.SpeccerCoordinatesInterface.md) | Get the x and y coordinates of the center of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const centerCoordinates = xy.center(rect); // centerCoordinates.x and centerCoordinates.y will contain the coordinates ``` |
| `left` | (`rect`: `DOMRect`) => [`SpeccerCoordinatesInterface`](../interfaces/types_xy.SpeccerCoordinatesInterface.md) | Get the x and y coordinates of the left of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const leftCoordinates = xy.left(rect); // leftCoordinates.x and leftCoordinates.y will contain the coordinates ``` |
| `left-bottom` | (`rect`: `DOMRect`) => [`SpeccerCoordinatesInterface`](../interfaces/types_xy.SpeccerCoordinatesInterface.md) | Get the x and y coordinates of the left bottom of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const leftBottomCoordinates = xy['left-bottom'](rect); // leftBottomCoordinates.x and leftBottomCoordinates.y will contain the coordinates ``` |
| `left-center` | (`rect`: `DOMRect`) => [`SpeccerCoordinatesInterface`](../interfaces/types_xy.SpeccerCoordinatesInterface.md) | Get the x and y coordinates of the left center of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const leftCenterCoordinates = xy['left-center'](rect); // leftCenterCoordinates.x and leftCenterCoordinates.y will contain the coordinates ``` |
| `left-top` | (`rect`: `DOMRect`) => [`SpeccerCoordinatesInterface`](../interfaces/types_xy.SpeccerCoordinatesInterface.md) | Get the x and y coordinates of the left top of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const leftTop = xy['left-top'](rect); // leftTop.x and leftTop.y will contain the coordinates ``` |
| `right` | (`rect`: `DOMRect`) => [`SpeccerCoordinatesInterface`](../interfaces/types_xy.SpeccerCoordinatesInterface.md) | Get the x and y coordinates of the right center of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const rightCenterCoordinates = xy.right(rect); // rightCenterCoordinates.x and rightCenterCoordinates.y will contain the coordinates ``` |
| `right-bottom` | (`rect`: `DOMRect`) => [`SpeccerCoordinatesInterface`](../interfaces/types_xy.SpeccerCoordinatesInterface.md) | Get the x and y coordinates of the right bottom of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const rightBottomCoordinates = xy['right-bottom'](rect); // rightBottomCoordinates.x and rightBottomCoordinates.y will contain the coordinates ``` |
| `right-center` | (`rect`: `DOMRect`) => [`SpeccerCoordinatesInterface`](../interfaces/types_xy.SpeccerCoordinatesInterface.md) | Get the x and y coordinates of the right center of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const rightCenterCoordinates = xy['right-center'](rect); // rightCenterCoordinates.x and rightCenterCoordinates.y will contain the coordinates ``` |
| `right-top` | (`rect`: `DOMRect`) => \{ `x`: `number` ; `y`: `number` } | - |
| `top` | (`rect`: `DOMRect`) => \{ `x`: `number` ; `y`: `number` } | Get the x and y coordinates of the top center of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const topCenterCoordinates = xy.top(rect); // topCenterCoordinates.x and topCenterCoordinates.y will contain the coordinates ``` |
| `top-center` | (`rect`: `DOMRect`) => \{ `x`: `number` ; `y`: `number` } | Get the x and y coordinates of the top center of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const topCenterCoordinates = xy['top-center'](rect); // topCenterCoordinates.x and topCenterCoordinates.y will contain the coordinates ``` |
| `top-left` | (`rect`: `DOMRect`) => \{ `x`: `number` ; `y`: `number` } | Get the x and y coordinates of the top left of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const topLeftCoordinates = xy['top-left'](rect); // topLeftCoordinates.x and topLeftCoordinates.y will contain the coordinates ``` |
| `top-right` | (`rect`: `DOMRect`) => \{ `x`: `number` ; `y`: `number` } | Get the x and y coordinates of the top right of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const topRightCoordinates = xy['top-right'](rect); // topRightCoordinates.x and topRightCoordinates.y will contain the coordinates ``` |
| `top` | (`rect`: `DOMRect`) => [`SpeccerCoordinatesInterface`](../interfaces/types_xy.SpeccerCoordinatesInterface.md) | Get the x and y coordinates of the top center of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const topCenterCoordinates = xy.top(rect); // topCenterCoordinates.x and topCenterCoordinates.y will contain the coordinates ``` |
| `top-center` | (`rect`: `DOMRect`) => [`SpeccerCoordinatesInterface`](../interfaces/types_xy.SpeccerCoordinatesInterface.md) | Get the x and y coordinates of the top center of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const topCenterCoordinates = xy['top-center'](rect); // topCenterCoordinates.x and topCenterCoordinates.y will contain the coordinates ``` |
| `top-left` | (`rect`: `DOMRect`) => [`SpeccerCoordinatesInterface`](../interfaces/types_xy.SpeccerCoordinatesInterface.md) | Get the x and y coordinates of the top left of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const topLeftCoordinates = xy['top-left'](rect); // topLeftCoordinates.x and topLeftCoordinates.y will contain the coordinates ``` |
| `top-right` | (`rect`: `DOMRect`) => [`SpeccerCoordinatesInterface`](../interfaces/types_xy.SpeccerCoordinatesInterface.md) | Get the x and y coordinates of the top right of a DOMRect. **`Example`** ```ts const rect = element.getBoundingClientRect(); const topRightCoordinates = xy['top-right'](rect); // topRightCoordinates.x and topRightCoordinates.y will contain the coordinates ``` |

#### Defined in

[utils/xy.ts:6](https://github.com/phun-ky/speccer/blob/main/src/utils/xy.ts#L6)
[utils/xy.ts:8](https://github.com/phun-ky/speccer/blob/main/src/utils/xy.ts#L8)
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@phun-ky/speccer",
"version": "9.0.3",
"version": "9.0.4",
"description": "A script to annotate, show spacing specs and to display typography information in documentation/website on HTML elements",
"main": "dist/speccer.js",
"module": "dist/speccer.esm.js",
Expand Down

0 comments on commit c0e3a9e

Please sign in to comment.