@neurodyn/react-model-viewer 0.0.11 → 0.0.13

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.
Files changed (2) hide show
  1. package/dist/index.js +13 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6158,8 +6158,8 @@ function QRCode({ data, foreground, background, robustness = 'M', className, ...
6158
6158
  }
6159
6159
  const MODEL_VIEWER_URL = "https://integrations.vizbl.com/model-viewer";
6160
6160
  const AR_DEVICE_REQUIREMENTS_DISCLAIMER = {
6161
- en: '*Requires AR-supported device and browser. We recommend iOS 12 or later with Safari, or Android 7.0 or later with Chrome.',
6162
- ru: '*Требуется устройство и браузер с поддержкой AR. Рекомендуем iOS 12 или новее с Safari либо Android 7.0 или новее с Chrome.'
6161
+ en: '*Requires AR-supported device and browser. We recommend iOS 18 or later with Safari, or Android 7.0 or later with Chrome.',
6162
+ ru: '*Требуется устройство и браузер с поддержкой AR. Рекомендуем iOS 18 или новее с Safari либо Android 7.0 или новее с Chrome.'
6163
6163
  };
6164
6164
  const DEFAULT_API_TIMEOUT = 30000;
6165
6165
  function createDefaultClient(defaultBaseURL) {
@@ -7077,13 +7077,17 @@ function buildNativeArUrl(glbUrl, usdzUrl, objectType, ios = isIOSDevice()) {
7077
7077
  const verticalPlacement = 'wall' === objectType || 'ceiling' === objectType ? '&enable_vertical_placement=true' : '';
7078
7078
  return `intent://arvr.google.com/scene-viewer/1.0?file=${encodeURIComponent(new URL(glbUrl).toString())}&resizable=false${verticalPlacement}&mode=ar_preferred#Intent;scheme=https;package=com.google.android.googlequicksearchbox;action=android.intent.action.VIEW;end;`;
7079
7079
  }
7080
- function launchDirectAr(options, openAppClipInNewTab = false) {
7081
- if ('advanced' === options.experience && isSupportedAppClipDevice()) {
7082
- const appClipUrl = buildAppClipUrl(options.appClipBundleId, options.tinuuid, options.hostname, options.hid);
7083
- if (openAppClipInNewTab) window.open(appClipUrl, '_blank');
7084
- else window.location.assign(appClipUrl);
7085
- return;
7086
- }
7080
+ function navigateToAppClip(url) {
7081
+ try {
7082
+ if (window.top && window.top !== window) {
7083
+ window.top.location.href = url;
7084
+ return;
7085
+ }
7086
+ } catch {}
7087
+ window.location.assign(url);
7088
+ }
7089
+ function launchDirectAr(options) {
7090
+ if ('advanced' === options.experience && isSupportedAppClipDevice()) return void navigateToAppClip(buildAppClipUrl(options.appClipBundleId, options.tinuuid, options.hostname, options.hid));
7087
7091
  const link = document.createElement('a');
7088
7092
  const image = document.createElement('img');
7089
7093
  link.rel = 'ar';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@neurodyn/react-model-viewer",
3
3
  "type": "module",
4
- "version": "0.0.11",
4
+ "version": "0.0.13",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },