@webspatial/react-sdk 0.0.5 → 0.0.6

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.
@@ -147,7 +147,7 @@ import { Spatial } from "@webspatial/core-sdk";
147
147
  var spatial = null;
148
148
  var _currentSession = null;
149
149
  function getSession() {
150
- if ("true") return null;
150
+ if (true) return null;
151
151
  if (!spatial) {
152
152
  spatial = new Spatial();
153
153
  }
@@ -163,7 +163,7 @@ function getSession() {
163
163
 
164
164
  // src/utils/debugTool.ts
165
165
  async function getStat() {
166
- if ("true") return;
166
+ if (true) return;
167
167
  const statsInfo = await getSession()._getStats();
168
168
  return statsInfo;
169
169
  }
@@ -216,7 +216,7 @@ async function inspectRootWindowContainer(simple) {
216
216
  return rootWindowContainerInfo;
217
217
  }
218
218
  function enableDebugTool() {
219
- if ("true") return;
219
+ if (true) return;
220
220
  const session = getSession();
221
221
  Object.assign(window, {
222
222
  session,
@@ -469,7 +469,7 @@ var SpatialWindowManager = class {
469
469
  this.entity?._setName(debugName);
470
470
  }
471
471
  async initInternal(url) {
472
- if ("true") return;
472
+ if (true) return;
473
473
  this.entity = await getSession().createEntity();
474
474
  this.webview = await getSession().createWindowComponent();
475
475
  await this.webview.loadURL(url);
@@ -482,7 +482,7 @@ var SpatialWindowManager = class {
482
482
  await this.entity.setParent(ent);
483
483
  }
484
484
  async initInternalFromWindow(parentSpatialWindowManager) {
485
- if ("true") return;
485
+ if (true) return;
486
486
  var w = await getSession().createWindowContext();
487
487
  this.window = w;
488
488
  this.entity = await getSession().createEntity();
@@ -1873,7 +1873,7 @@ function renderInPortalInstance(cssSpatialRootContextObject, cssSpatialID, inPro
1873
1873
  }
1874
1874
  function CSSSpatialComponentBase(inProps, ref) {
1875
1875
  const { [CSSSpatialID]: cssSpatialID, ...props } = inProps;
1876
- const isWebEnv = "true";
1876
+ const isWebEnv = true;
1877
1877
  if (isWebEnv) {
1878
1878
  return renderInWebEnv(props, ref);
1879
1879
  } else {
@@ -1992,7 +1992,7 @@ var SpatialViewEl = forwardRef6(
1992
1992
  return /* @__PURE__ */ jsx7("div", { ref: divRef, ...props, children: "WebSpatial is not supported in this browser" });
1993
1993
  }
1994
1994
  useEffect8(() => {
1995
- if ("true") return;
1995
+ if (true) return;
1996
1996
  activePromise.current = runAsync(async () => {
1997
1997
  if (activePromise.current) {
1998
1998
  await activePromise.current;
@@ -2005,7 +2005,7 @@ var SpatialViewEl = forwardRef6(
2005
2005
  }
2006
2006
  });
2007
2007
  return () => {
2008
- if ("true") return;
2008
+ if (true) return;
2009
2009
  runAsync(async () => {
2010
2010
  await activePromise.current;
2011
2011
  spatialEntity.current?.destroy();
@@ -2124,7 +2124,7 @@ var Model3DNative = class {
2124
2124
  return this.initPromise;
2125
2125
  }
2126
2126
  async initInternal(modelUrl, onSuccess, onFailure) {
2127
- if ("true") return;
2127
+ if (true) return;
2128
2128
  var session = getSession();
2129
2129
  if (!session) {
2130
2130
  return;