From 52ebb7e726a481abb8c389230e0011d369f9705e Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 25 Jun 2024 09:10:03 +0000 Subject: [PATCH 1/2] chore(deps): update dependency docusaurus-plugin-typedoc to v1 --- documentation/package.json | 2 +- documentation/yarn.lock | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/documentation/package.json b/documentation/package.json index c1384b3c5fa..3f97446d578 100644 --- a/documentation/package.json +++ b/documentation/package.json @@ -41,7 +41,7 @@ "devDependencies": { "@types/react": "18.3.3", "copyfiles": "2.4.1", - "docusaurus-plugin-typedoc": "0.22.0", + "docusaurus-plugin-typedoc": "1.0.1", "replace": "1.2.2", "rimraf": "5.0.7", "typedoc": "0.25.13", diff --git a/documentation/yarn.lock b/documentation/yarn.lock index 127f670c995..6c15c8dd3e9 100644 --- a/documentation/yarn.lock +++ b/documentation/yarn.lock @@ -1910,7 +1910,7 @@ __metadata: clsx: 2.1.1 copyfiles: 2.4.1 cross-env: 7.0.3 - docusaurus-plugin-typedoc: 0.22.0 + docusaurus-plugin-typedoc: 1.0.1 ieee754: 1.2.1 react: 18.3.1 react-dom: 18.3.1 @@ -5716,13 +5716,12 @@ __metadata: languageName: node linkType: hard -"docusaurus-plugin-typedoc@npm:0.22.0": - version: 0.22.0 - resolution: "docusaurus-plugin-typedoc@npm:0.22.0" +"docusaurus-plugin-typedoc@npm:1.0.1": + version: 1.0.1 + resolution: "docusaurus-plugin-typedoc@npm:1.0.1" peerDependencies: - typedoc: ">=0.24.0" - typedoc-plugin-markdown: ">=3.15.0" - checksum: b6c3330cff167b1a908a502460d9b2b2afddd066e1b4e1825b1d069ddce25fd721479afbf0a41b48c4ecaf0bbfa90d00721b6b5c9ed6e0c16c3d72ccd6b02684 + typedoc-plugin-markdown: ">=4.0.0" + checksum: 0a1f0720f3b62d37cc7cacfa8100769e8354785215b84f33951f38d65951a04d7a3b719089717a1d5dbd653f029931a7e624908334519f16fa60798a5d8224ca languageName: node linkType: hard From dca093b7c1276f9452615c1230161fa51e814383 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Flatval?= Date: Tue, 25 Jun 2024 12:33:19 +0200 Subject: [PATCH 2/2] chore: don't reset event handlers in-between runs Currently it crashes, and I don't know how to fix this in a nice way --- documentation/docs/components/LiveCodeSnippet.tsx | 1 - documentation/docs/utils/viewerUtilities.ts | 12 ------------ 2 files changed, 13 deletions(-) diff --git a/documentation/docs/components/LiveCodeSnippet.tsx b/documentation/docs/components/LiveCodeSnippet.tsx index ed988e47b82..82d7a03e6e1 100644 --- a/documentation/docs/components/LiveCodeSnippet.tsx +++ b/documentation/docs/components/LiveCodeSnippet.tsx @@ -65,7 +65,6 @@ function transformCode(code: string): string { } if (viewer) { - resetViewerEventHandlers(viewer); if (model instanceof CogniteCadModel) { resetCogniteCadModel(model); } diff --git a/documentation/docs/utils/viewerUtilities.ts b/documentation/docs/utils/viewerUtilities.ts index 95d1d17a76e..889ef5df040 100644 --- a/documentation/docs/utils/viewerUtilities.ts +++ b/documentation/docs/utils/viewerUtilities.ts @@ -1,20 +1,8 @@ import { CogniteCadModel, - Cognite3DViewer, DefaultNodeAppearance, } from '@cognite/reveal'; -/** - * Resets all event handlers on the viewer provided. This uses - * internal functionality and actual applications needs to implement - * this to better approaches than this. - */ -export function resetViewerEventHandlers(viewer: Cognite3DViewer): void { - const eventListeners = (viewer as any)._events; - eventListeners.cameraChange.unsubscribeAll(); - eventListeners.click.unsubscribeAll(); - eventListeners.hover.unsubscribeAll(); -} /** * Resets state of model to the default state (i.e. appearance and styled sets)