@neurodyn/model-viewer 0.0.2 → 0.0.4

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.
@@ -55,10 +55,10 @@ class src_ModelViewer {
55
55
  constructor(target, props = {}){
56
56
  for (const element of resolveTargets(target)){
57
57
  const viewerProps = readTriggerProps(element, props);
58
- if (!viewerProps.tinuuid || !viewerProps.apiKey) continue;
58
+ if (!viewerProps.tinuuid) continue;
59
59
  const root = createRoot(element);
60
60
  root.render(createElement(ModelViewer, {
61
- apiKey: viewerProps.apiKey,
61
+ apiKey: viewerProps.apiKey ?? '',
62
62
  hid: viewerProps.hid,
63
63
  tinuuid: viewerProps.tinuuid
64
64
  }));
@@ -91,9 +91,9 @@ class src_ModelViewerDialog {
91
91
  handleClick = (event)=>{
92
92
  if (this.destroyed || !(event.currentTarget instanceof Element)) return;
93
93
  const props = readTriggerProps(event.currentTarget, this.props);
94
- if (!props.tinuuid || !props.apiKey) return;
94
+ if (!props.tinuuid) return;
95
95
  this.renderer.open({
96
- apiKey: props.apiKey,
96
+ apiKey: props.apiKey ?? '',
97
97
  hid: props.hid,
98
98
  tinuuid: props.tinuuid
99
99
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@neurodyn/model-viewer",
3
3
  "type": "module",
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -22,7 +22,7 @@
22
22
  "react": "^19.2.0",
23
23
  "react-dom": "^19.2.0",
24
24
  "selector-observer": "^2.1.6",
25
- "@neurodyn/react-model-viewer": "0.0.2"
25
+ "@neurodyn/react-model-viewer": "0.0.4"
26
26
  },
27
27
  "devDependencies": {
28
28
  "@microsoft/api-extractor": "^7.58.0",