Skip to content

Commit

Permalink
finalize types (still on alpha; need to bump to 10.0.0)
Browse files Browse the repository at this point in the history
  • Loading branch information
bencmbrook committed Jul 10, 2023
1 parent 9837d22 commit 005cf51
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
10 changes: 5 additions & 5 deletions .pnp.cjs

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

Binary file not shown.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"devDependencies": {
"@monaco-editor/react": "^4.4.5",
"@transcend-io/airgap.js-types": "^10.0.0-alpha.0",
"@transcend-io/airgap.js-types": "^10.0.0-alpha.2",
"@transcend-io/type-utils": "^1.0.7",
"@types/node": "^17.0.21",
"@typescript-eslint/eslint-plugin": "^5.12.1",
Expand Down
11 changes: 9 additions & 2 deletions src/hooks/useViewState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import type {
ResponseViewState,
InitialViewState,
ViewState,
ViewStateEventDetails,
TranscendEventType,
} from '@transcend-io/airgap.js-types';
import { logger } from '../logger';
import type { HandleSetViewState } from '../types';
Expand Down Expand Up @@ -137,9 +139,14 @@ export function useViewState({
);

// Now that the viewState has updated, dispatch an event on the `transcend` API / event target
const eventDetails: ViewStateEventDetails = {
viewState: state.current,
previousViewState: state.previous,
};
const eventType: TranscendEventType = 'view-state-change';
eventTarget.dispatchEvent(
new CustomEvent('view-state-change', {
detail: { viewState: state.current, previousViewState: state.previous },
new CustomEvent(eventType, {
detail: eventDetails,
}),
);

Expand Down
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1155,14 +1155,14 @@ __metadata:
languageName: node
linkType: hard

"@transcend-io/airgap.js-types@npm:^10.0.0-alpha.0":
version: 10.0.0-alpha.0
resolution: "@transcend-io/airgap.js-types@npm:10.0.0-alpha.0"
"@transcend-io/airgap.js-types@npm:^10.0.0-alpha.2":
version: 10.0.0-alpha.2
resolution: "@transcend-io/airgap.js-types@npm:10.0.0-alpha.2"
dependencies:
"@transcend-io/type-utils": ^1.0.5
fp-ts: ^2.11.8
io-ts: ^2.2.16
checksum: 9c99d436727263b3820da9cd6a859a400fc3688775bf46a46814f865e8cfbbc1ca220bd53d5c7fe6014e4805febf0bb84113342d521fc0c7679c9f4bdb0368f1
checksum: f35921a0c0e29651921f51e73184a660ebe13ab61bd7997dc332c13dec6fbec1c56a2b8615ae33ea9529db8302381ffd8c490754039b820f7cacbd7e64d7840a
languageName: node
linkType: hard

Expand All @@ -1183,7 +1183,7 @@ __metadata:
resolution: "@transcend-io/consent-manager-ui@workspace:."
dependencies:
"@monaco-editor/react": ^4.4.5
"@transcend-io/airgap.js-types": ^10.0.0-alpha.0
"@transcend-io/airgap.js-types": ^10.0.0-alpha.2
"@transcend-io/internationalization": ^1.5.1
"@transcend-io/logger": ^1.0.14
"@transcend-io/type-utils": ^1.0.7
Expand Down

0 comments on commit 005cf51

Please sign in to comment.