Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Commit

Permalink
feat: full log
Browse files Browse the repository at this point in the history
Signed-off-by: peterpeterparker <[email protected]>
  • Loading branch information
peterpeterparker committed Aug 15, 2022
1 parent 3b4c805 commit 00d532f
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

### Others

- editor: v8.1.0 ([CHANGELOG](https://github.com/deckgo/deckdeckgo/blob/main/utils/editor/CHANGELOG.md))
- editor: v8.1.1 ([CHANGELOG](https://github.com/deckgo/deckdeckgo/blob/main/utils/editor/CHANGELOG.md))

<a name="7.0.1"></a>

Expand Down
6 changes: 6 additions & 0 deletions utils/editor/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 8.1.1 (2022-08-15)

### Features

- make `level` mandatory for `log` (since previous declaration was not supported anyway)

# 8.1.0 (2022-08-15)

### Features
Expand Down
2 changes: 1 addition & 1 deletion utils/editor/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@deckdeckgo/editor",
"version": "8.1.0",
"version": "8.1.1",
"author": "David Dal Busco",
"description": "Types for the DeckDeckGo editor",
"license": "AGPL-3.0-or-later",
Expand Down
9 changes: 2 additions & 7 deletions utils/editor/src/events/log.events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,7 @@ export interface Log {
duration?: number;
}

export const log = (detail: Pick<Partial<Log>, 'level'> & Omit<Log, 'level'>) => {
const logDetail: Log = {
level: 'info',
...detail
};

const $event: CustomEvent<Log> = new CustomEvent<Log>('ddgLog', {detail: logDetail, bubbles: true});
export const log = (detail: Log) => {
const $event: CustomEvent<Log> = new CustomEvent<Log>('ddgLog', {detail, bubbles: true});
document.dispatchEvent($event);
};

0 comments on commit 00d532f

Please sign in to comment.