Skip to content

Commit

Permalink
chore: 🤖 release v7.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
phun-ky committed Oct 16, 2023
1 parent f83edb9 commit df16766
Show file tree
Hide file tree
Showing 14 changed files with 348 additions and 97 deletions.
50 changes: 49 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,51 @@


## [7.0.0](https://github.com/phun-ky/speccer/compare/v6.3.2...v7.0.0) (2023-10-16)


### ⚠ BREAKING CHANGES

* Renamed `src/index.ts` to `src/main.ts`

### Tasks

* 🤖 Add correct types of commits to preset ([5fd6e4a](https://github.com/phun-ky/speccer/commit/5fd6e4a1b555e32437300638f2c0c91c171e6cea))
* 🤖 Add github actions ([1942f8d](https://github.com/phun-ky/speccer/commit/1942f8d49ebf0e4086ed9d30e7d9f162ee8d3eb1)), closes [#30](https://github.com/phun-ky/speccer/issues/30)
* 🤖 Adjust tsconfig ([7d1c89e](https://github.com/phun-ky/speccer/commit/7d1c89e9a689c4cdd2b3eb40702162968aa1ac11))
* 🤖 build ([28a21f2](https://github.com/phun-ky/speccer/commit/28a21f2d913ee31c4503afcdfa176e8f180b0e15))
* 🤖 bump rollup-plugin-typescript2 from 0.31.2 to 0.35.0 ([9412bec](https://github.com/phun-ky/speccer/commit/9412beca0b5e2cb45731e989cb8897ff6525c706))
* 🤖 bump stylus from 0.56.0 to 0.60.0 ([0351289](https://github.com/phun-ky/speccer/commit/03512897870349a1bd707771cf098a2d7100ebf1))
* 🤖 bump tough-cookie from 4.1.2 to 4.1.3 ([e6438c0](https://github.com/phun-ky/speccer/commit/e6438c001622ec774fd189e3ba9a442455810b92))
* 🤖 Do not hide chores ([1794e18](https://github.com/phun-ky/speccer/commit/1794e18bc70ca9b27a20d0ef836f761da35b6066))
* 🤖 Remove old `index.d.ts` file ([b30fa69](https://github.com/phun-ky/speccer/commit/b30fa69a4c9b1659bf109c7a702f25a5323d9f65))
* 🤖 Use `release-it` instead of `standard-version` ([0e44c3d](https://github.com/phun-ky/speccer/commit/0e44c3d89978987c6eeed9f97bcd661227b9e2c4)), closes [#41](https://github.com/phun-ky/speccer/issues/41)


### Documentation

* ✏️ Add API documentation ([a4598c5](https://github.com/phun-ky/speccer/commit/a4598c5260695b2b48511a5b92e25be42e02d485))
* ✏️ Update `README.md` ([1b1f48b](https://github.com/phun-ky/speccer/commit/1b1f48b6d5135ac360ed0405de30737dafaeb201)), closes [#39](https://github.com/phun-ky/speccer/issues/39)


### Feature

* 🎸 Add logos ([771812a](https://github.com/phun-ky/speccer/commit/771812a6d27f325341860ab55c0e24b3e5af9c13))
* 🎸 Add mark feature ([b21435c](https://github.com/phun-ky/speccer/commit/b21435c0c81ba6c139d7dbf3e2b5007e9d23f448)), closes [#22](https://github.com/phun-ky/speccer/issues/22)


### Bug

* 🐛 Fix release ([dc7803a](https://github.com/phun-ky/speccer/commit/dc7803a73b3ce136b5c6dc218bbe7b031f7eb888))
* 🐛 Make sure we publish to npm ([6a76f76](https://github.com/phun-ky/speccer/commit/6a76f7689cabbf337155bf4dea668fa93ac697f1)), closes [#45](https://github.com/phun-ky/speccer/issues/45)
* 🐛 skipChecks for npm publish ([0c22c31](https://github.com/phun-ky/speccer/commit/0c22c31fe292a1d896e5843e245cbd78bfb2a790))


### Refactoring

* 💡 Add more inline documentation and updated some ([71d6809](https://github.com/phun-ky/speccer/commit/71d6809d63ce2e32fb15980ca2d8223c538bfa97))
* 💡 Adjust folder structure to a more meaningful way ([42597fa](https://github.com/phun-ky/speccer/commit/42597fa8a74941d1e40cfd8ab904fbafd1354a81)), closes [#48](https://github.com/phun-ky/speccer/issues/48)
* 💡 Make sure we release on every change ([ce4a627](https://github.com/phun-ky/speccer/commit/ce4a627f93a87ce3888c7b9b48b57207a76bdb0b)), closes [#43](https://github.com/phun-ky/speccer/issues/43)

# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
Expand Down Expand Up @@ -191,4 +239,4 @@ build files.

### Features

- Add release script ([4cb72cb](https://github.com/phun-ky/speccer/commit/4cb72cbea7dd1d6bcb8f1102384b14eecaa9eef0))
- Add release script ([4cb72cb](https://github.com/phun-ky/speccer/commit/4cb72cbea7dd1d6bcb8f1102384b14eecaa9eef0))
62 changes: 49 additions & 13 deletions api/modules/config_browser.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,70 +8,106 @@

**activate**(`speccer`): `void`

A function to activate speccer based on script attributes.

#### Parameters

| Name | Type |
| :------ | :------ |
| `speccer` | [`SpeccerFunctionType`](types_speccer.md#speccerfunctiontype) |
| Name | Type | Description |
| :------ | :------ | :------ |
| `speccer` | [`SpeccerFunctionType`](types_speccer.md#speccerfunctiontype) | The speccer function to execute. |

#### Returns

`void`

**`Example`**

```ts
// Usage example:
// activate(mySpeccer);
```

#### Defined in

[config/browser.ts:72](https://github.com/phun-ky/speccer/blob/main/src/config/browser.ts#L72)
[config/browser.ts:114](https://github.com/phun-ky/speccer/blob/main/src/config/browser.ts#L114)

___

### dom

**dom**(`speccer`): `void`

A function to initialize speccer when the DOM is ready.

#### Parameters

| Name | Type |
| :------ | :------ |
| `speccer` | [`SpeccerFunctionType`](types_speccer.md#speccerfunctiontype) |
| Name | Type | Description |
| :------ | :------ | :------ |
| `speccer` | [`SpeccerFunctionType`](types_speccer.md#speccerfunctiontype) | The speccer function to execute. |

#### Returns

`void`

**`Example`**

```ts
// Usage example:
// dom(mySpeccer);
```

#### Defined in

[config/browser.ts:12](https://github.com/phun-ky/speccer/blob/main/src/config/browser.ts#L12)
[config/browser.ts:23](https://github.com/phun-ky/speccer/blob/main/src/config/browser.ts#L23)

___

### lazy

**lazy**(): `void`

A function to initialize lazy speccer functionality.

#### Returns

`void`

**`Example`**

```ts
// Usage example:
// lazy();
```

#### Defined in

[config/browser.ts:23](https://github.com/phun-ky/speccer/blob/main/src/config/browser.ts#L23)
[config/browser.ts:43](https://github.com/phun-ky/speccer/blob/main/src/config/browser.ts#L43)

___

### manual

**manual**(`speccer`): `void`

A function to manually activate speccer.

#### Parameters

| Name | Type |
| :------ | :------ |
| `speccer` | [`SpeccerFunctionType`](types_speccer.md#speccerfunctiontype) |
| Name | Type | Description |
| :------ | :------ | :------ |
| `speccer` | [`SpeccerFunctionType`](types_speccer.md#speccerfunctiontype) | The speccer function to execute. |

#### Returns

`void`

**`Example`**

```ts
// Usage example:
// manual(mySpeccer);
```

#### Defined in

[config/browser.ts:68](https://github.com/phun-ky/speccer/blob/main/src/config/browser.ts#L68)
[config/browser.ts:99](https://github.com/phun-ky/speccer/blob/main/src/config/browser.ts#L99)
46 changes: 34 additions & 12 deletions api/modules/features_dissect.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,38 +8,60 @@

**create**(`textContent?`, `area`, `n?`): `HTMLElement`

Create a dissected element with optional text content, area description, and element type.

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `textContent` | `string` | `''` |
| `area` | `string` | `undefined` |
| `n` | `string` | `'span'` |
| Name | Type | Default value | Description |
| :------ | :------ | :------ | :------ |
| `textContent` | `string` | `''` | The text content to add to the element. |
| `area` | `string` | `undefined` | The area description for styling. |
| `n` | `string` | `'span'` | The element type. |

#### Returns

`HTMLElement`

- The created dissected element.

**`Example`**

```ts
const dissectedElement = create('A', 'outline top', 'div');
document.body.appendChild(dissectedElement);
```

#### Defined in

[features/dissect/index.ts:15](https://github.com/phun-ky/speccer/blob/main/src/features/dissect/index.ts#L15)
[features/dissect/index.ts:29](https://github.com/phun-ky/speccer/blob/main/src/features/dissect/index.ts#L29)

___

### element

**element**(`sectionEl`): `void`
**element**(`sectionEl`): `Promise`<`void`\>

Create dissected elements based on the section element and its data-anatomy attributes.

#### Parameters

| Name | Type |
| :------ | :------ |
| `sectionEl` | `HTMLElement` |
| Name | Type | Description |
| :------ | :------ | :------ |
| `sectionEl` | `HTMLElement` | The section element containing dissected elements. |

#### Returns

`void`
`Promise`<`void`\>

- A promise that resolves after creating dissected elements.

**`Example`**

```ts
const sectionElement = document.getElementById('section');
element(sectionElement);
```

#### Defined in

[features/dissect/index.ts:43](https://github.com/phun-ky/speccer/blob/main/src/features/dissect/index.ts#L43)
[features/dissect/index.ts:70](https://github.com/phun-ky/speccer/blob/main/src/features/dissect/index.ts#L70)
33 changes: 24 additions & 9 deletions api/modules/features_dissect_utils_styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,36 @@

### styles

**styles**(`area`, `targetEl`, `dissectionEl`, `options?`): `Promise`<{ `height`: `string` ; `left`: `string` ; `top`: `string` ; `width`: `string` } \| { `height`: `string` ; `left`: `string` ; `top`: `string` ; `width?`: `undefined` } \| { `height?`: `undefined` ; `left`: `string` ; `top`: `string` ; `width?`: `undefined` } \| { `height?`: `undefined` ; `left`: `string` ; `top`: `string` ; `width`: `string` }\>
**styles**(`area`, `targetEl`, `dissectionEl`, `options?`): `Promise`<{ `height?`: `string` ; `left`: `string` ; `top`: `string` ; `width?`: `string` }\>

Get styles for dissected elements based on the specified area and options.

#### Parameters

| Name | Type |
| :------ | :------ |
| `area` | `string` |
| `targetEl` | `HTMLElement` |
| `dissectionEl` | `HTMLElement` |
| `options?` | [`DissectStylesOptionsType`](types_bezier.md#dissectstylesoptionstype) |
| Name | Type | Description |
| :------ | :------ | :------ |
| `area` | `string` | The area description. |
| `targetEl` | `HTMLElement` | The target element. |
| `dissectionEl` | `HTMLElement` | The dissection element. |
| `options?` | [`DissectStylesOptionsType`](types_bezier.md#dissectstylesoptionstype) | Optional styles options. |

#### Returns

`Promise`<{ `height`: `string` ; `left`: `string` ; `top`: `string` ; `width`: `string` } \| { `height`: `string` ; `left`: `string` ; `top`: `string` ; `width?`: `undefined` } \| { `height?`: `undefined` ; `left`: `string` ; `top`: `string` ; `width?`: `undefined` } \| { `height?`: `undefined` ; `left`: `string` ; `top`: `string` ; `width`: `string` }\>
`Promise`<{ `height?`: `string` ; `left`: `string` ; `top`: `string` ; `width?`: `string` }\>

- The computed styles.

**`Example`**

```ts
const area = 'top-left';
const targetElement = document.getElementById('target');
const dissectionElement = document.getElementById('dissection');
const options = { isCurly: true };
const styles = await styles(area, targetElement, dissectionElement, options);
console.log(styles);
```

#### Defined in

[features/dissect/utils/styles.ts:12](https://github.com/phun-ky/speccer/blob/main/src/features/dissect/utils/styles.ts#L12)
[features/dissect/utils/styles.ts:31](https://github.com/phun-ky/speccer/blob/main/src/features/dissect/utils/styles.ts#L31)
38 changes: 30 additions & 8 deletions api/modules/features_mark.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,58 @@

**create**(`n?`): `HTMLElement`

Create a marker element with an optional element type.

#### Parameters

| Name | Type | Default value |
| :------ | :------ | :------ |
| `n` | `string` | `'span'` |
| Name | Type | Default value | Description |
| :------ | :------ | :------ | :------ |
| `n` | `string` | `'span'` | The element type. |

#### Returns

`HTMLElement`

- The created marker element.

**`Example`**

```typescript
const marker = create('div');
document.body.appendChild(marker);
```

#### Defined in

[features/mark/index.ts:8](https://github.com/phun-ky/speccer/blob/main/src/features/mark/index.ts#L8)
[features/mark/index.ts:20](https://github.com/phun-ky/speccer/blob/main/src/features/mark/index.ts#L20)

___

### element

**element**(`elementToMark`): `Promise`<`void`\>

Create a marker element and add it to the body with styles matching a specified element.

#### Parameters

| Name | Type |
| :------ | :------ |
| `elementToMark` | `HTMLElement` |
| Name | Type | Description |
| :------ | :------ | :------ |
| `elementToMark` | `HTMLElement` | The target element to match styles with. |

#### Returns

`Promise`<`void`\>

- A promise that resolves after creating and styling the marker element.

**`Example`**

```typescript
const elementToMark = document.getElementById('target');
element(elementToMark);
```

#### Defined in

[features/mark/index.ts:17](https://github.com/phun-ky/speccer/blob/main/src/features/mark/index.ts#L17)
[features/mark/index.ts:41](https://github.com/phun-ky/speccer/blob/main/src/features/mark/index.ts#L41)
Loading

0 comments on commit df16766

Please sign in to comment.