@neurodyn/room-viewer 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/room-viewer.js
CHANGED
|
@@ -3,6 +3,13 @@ import { createElement } from "react";
|
|
|
3
3
|
import { createRoot } from "react-dom/client";
|
|
4
4
|
const DIALOG_ROOT_ID_PREFIX = 'neurodyn-room-viewer-dialog-root';
|
|
5
5
|
let nextContainerId = 0;
|
|
6
|
+
function productKey({ type, tinuuid, src }) {
|
|
7
|
+
return JSON.stringify([
|
|
8
|
+
type ?? null,
|
|
9
|
+
tinuuid ?? null,
|
|
10
|
+
tinuuid ? null : src ?? null
|
|
11
|
+
]);
|
|
12
|
+
}
|
|
6
13
|
class RoomViewerDialogRenderer {
|
|
7
14
|
container = null;
|
|
8
15
|
props = null;
|
|
@@ -37,6 +44,7 @@ class RoomViewerDialogRenderer {
|
|
|
37
44
|
if (!this.props) return;
|
|
38
45
|
this.ensureRoot().render(createElement(RoomViewerDialog, {
|
|
39
46
|
...this.props,
|
|
47
|
+
key: productKey(this.props),
|
|
40
48
|
onOpenChange: this.handleOpenChange,
|
|
41
49
|
open: this.openState
|
|
42
50
|
}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@neurodyn/room-viewer",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.2.
|
|
4
|
+
"version": "0.2.2",
|
|
5
5
|
"description": "Vizbl Room Viewer: show rugs, flooring and wall art in the shopper’s own room from a photo.",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"vizbl",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"react": "^19.2.0",
|
|
46
46
|
"react-dom": "^19.2.0",
|
|
47
|
-
"@neurodyn/react-room-viewer": "0.3.
|
|
47
|
+
"@neurodyn/react-room-viewer": "0.3.2"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@google/model-viewer": "4.2.0",
|