vim-web 0.3.44-dev.51 → 0.3.44-dev.53
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/types/react-viewers/errors/index.d.ts +1 -2
- package/dist/types/react-viewers/index.d.ts +1 -0
- package/dist/types/utils/url.d.ts +2 -0
- package/dist/vim-web.iife.js +50 -40
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +50 -40
- package/dist/vim-web.js.map +1 -1
- package/package.json +1 -1
- package/dist/types/react-viewers/errors/errorUtils.d.ts +0 -2
|
@@ -6,6 +6,7 @@ export * as Settings from './settings';
|
|
|
6
6
|
export * as Webgl from './webgl';
|
|
7
7
|
export * as Ultra from './ultra';
|
|
8
8
|
export * as Errors from './errors';
|
|
9
|
+
export * as Urls from './urls';
|
|
9
10
|
export * from './container';
|
|
10
11
|
export type * from './helpers';
|
|
11
12
|
export type * from './panels';
|
|
@@ -6,3 +6,5 @@
|
|
|
6
6
|
export declare function isURL(str: string): boolean;
|
|
7
7
|
export declare function isFileURI(inputString: string | null | undefined): boolean;
|
|
8
8
|
export declare function isWebSocketUrl(input: string): boolean;
|
|
9
|
+
export declare function isLocalUrl(url: string): boolean;
|
|
10
|
+
export declare function isFilePathOrUri(input: string): boolean;
|
package/dist/vim-web.iife.js
CHANGED
|
@@ -29211,7 +29211,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29211
29211
|
constructor(manager) {
|
|
29212
29212
|
super(manager);
|
|
29213
29213
|
}
|
|
29214
|
-
load(
|
|
29214
|
+
load(urls2, onLoad, onProgress, onError) {
|
|
29215
29215
|
const texture = new CubeTexture();
|
|
29216
29216
|
texture.colorSpace = SRGBColorSpace;
|
|
29217
29217
|
const loader = new ImageLoader(this.manager);
|
|
@@ -29219,7 +29219,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29219
29219
|
loader.setPath(this.path);
|
|
29220
29220
|
let loaded = 0;
|
|
29221
29221
|
function loadTexture(i2) {
|
|
29222
|
-
loader.load(
|
|
29222
|
+
loader.load(urls2[i2], function(image) {
|
|
29223
29223
|
texture.images[i2] = image;
|
|
29224
29224
|
loaded++;
|
|
29225
29225
|
if (loaded === 6) {
|
|
@@ -29228,7 +29228,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
|
|
|
29228
29228
|
}
|
|
29229
29229
|
}, void 0, onError);
|
|
29230
29230
|
}
|
|
29231
|
-
for (let i2 = 0; i2 <
|
|
29231
|
+
for (let i2 = 0; i2 < urls2.length; ++i2) {
|
|
29232
29232
|
loadTexture(i2);
|
|
29233
29233
|
}
|
|
29234
29234
|
return texture;
|
|
@@ -50721,6 +50721,25 @@ void main() {
|
|
|
50721
50721
|
return false;
|
|
50722
50722
|
}
|
|
50723
50723
|
}
|
|
50724
|
+
function isLocalUrl(url) {
|
|
50725
|
+
try {
|
|
50726
|
+
const parsedUrl = new URL(url);
|
|
50727
|
+
return parsedUrl.hostname === "localhost" || parsedUrl.hostname === "127.0.0.1";
|
|
50728
|
+
} catch (e) {
|
|
50729
|
+
return false;
|
|
50730
|
+
}
|
|
50731
|
+
}
|
|
50732
|
+
function isFilePathOrUri(input) {
|
|
50733
|
+
const fileUriPattern = /^file:\/\//i;
|
|
50734
|
+
if (fileUriPattern.test(input)) {
|
|
50735
|
+
return true;
|
|
50736
|
+
}
|
|
50737
|
+
const urlPattern = /^(https?|ftp|data|mailto|tel):/i;
|
|
50738
|
+
if (urlPattern.test(input)) {
|
|
50739
|
+
return false;
|
|
50740
|
+
}
|
|
50741
|
+
return true;
|
|
50742
|
+
}
|
|
50724
50743
|
class Validation {
|
|
50725
50744
|
//= ===========================================================================
|
|
50726
50745
|
// BASIC NUMBER VALIDATIONS
|
|
@@ -74901,8 +74920,33 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
74901
74920
|
function link(url, text) {
|
|
74902
74921
|
return /* @__PURE__ */ jsxRuntimeExports.jsx("a", { href: url, target: "_blank", className: vcLink, children: text });
|
|
74903
74922
|
}
|
|
74923
|
+
const errorStyle = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
74924
|
+
__proto__: null,
|
|
74925
|
+
bold,
|
|
74926
|
+
bullet,
|
|
74927
|
+
detailText,
|
|
74928
|
+
dotList,
|
|
74929
|
+
footer: footer$1,
|
|
74930
|
+
link,
|
|
74931
|
+
mainText,
|
|
74932
|
+
numList,
|
|
74933
|
+
subTitle,
|
|
74934
|
+
vcColorLink,
|
|
74935
|
+
vcColorPrimary,
|
|
74936
|
+
vcColorSecondary,
|
|
74937
|
+
vcLabel,
|
|
74938
|
+
vcLink,
|
|
74939
|
+
vcRoboto
|
|
74940
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
74904
74941
|
const support = "https://docs.vimaec.com";
|
|
74905
74942
|
const supportUltra = "https://docs.vimaec.com/docs/vim-for-windows/configuring-vim-ultra";
|
|
74943
|
+
const supportControls = "https://docs.vimaec.com/docs/vim-cloud/webgl-navigation-and-controls-guide";
|
|
74944
|
+
const urls = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
74945
|
+
__proto__: null,
|
|
74946
|
+
support,
|
|
74947
|
+
supportControls,
|
|
74948
|
+
supportUltra
|
|
74949
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
74906
74950
|
function fileOpeningError(url) {
|
|
74907
74951
|
return {
|
|
74908
74952
|
title: "File Opening Error",
|
|
@@ -74922,25 +74966,6 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
74922
74966
|
dotList([bullet("File path:", url)])
|
|
74923
74967
|
] });
|
|
74924
74968
|
}
|
|
74925
|
-
function isLocalUrl(url) {
|
|
74926
|
-
try {
|
|
74927
|
-
const parsedUrl = new URL(url);
|
|
74928
|
-
return parsedUrl.hostname === "localhost" || parsedUrl.hostname === "127.0.0.1";
|
|
74929
|
-
} catch (e) {
|
|
74930
|
-
return false;
|
|
74931
|
-
}
|
|
74932
|
-
}
|
|
74933
|
-
function isFilePathOrUri(input) {
|
|
74934
|
-
const fileUriPattern = /^file:\/\//i;
|
|
74935
|
-
if (fileUriPattern.test(input)) {
|
|
74936
|
-
return true;
|
|
74937
|
-
}
|
|
74938
|
-
const urlPattern = /^(https?|ftp|data|mailto|tel):/i;
|
|
74939
|
-
if (urlPattern.test(input)) {
|
|
74940
|
-
return false;
|
|
74941
|
-
}
|
|
74942
|
-
return true;
|
|
74943
|
-
}
|
|
74944
74969
|
function serverFileDownloadingError(url, authToken, server) {
|
|
74945
74970
|
if (isFilePathOrUri(url)) {
|
|
74946
74971
|
return fileOpeningError(url);
|
|
@@ -75081,29 +75106,13 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75081
75106
|
}
|
|
75082
75107
|
const index$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
75083
75108
|
__proto__: null,
|
|
75084
|
-
|
|
75085
|
-
bullet,
|
|
75086
|
-
detailText,
|
|
75087
|
-
dotList,
|
|
75109
|
+
Style: errorStyle,
|
|
75088
75110
|
fileOpeningError,
|
|
75089
|
-
footer: footer$1,
|
|
75090
|
-
isFilePathOrUri,
|
|
75091
|
-
isLocalUrl,
|
|
75092
|
-
link,
|
|
75093
|
-
mainText,
|
|
75094
|
-
numList,
|
|
75095
75111
|
serverCompatibilityError,
|
|
75096
75112
|
serverConnectionError,
|
|
75097
75113
|
serverFileDownloadingError,
|
|
75098
75114
|
serverFileLoadingError,
|
|
75099
|
-
serverStreamError
|
|
75100
|
-
subTitle,
|
|
75101
|
-
vcColorLink,
|
|
75102
|
-
vcColorPrimary,
|
|
75103
|
-
vcColorSecondary,
|
|
75104
|
-
vcLabel,
|
|
75105
|
-
vcLink,
|
|
75106
|
-
vcRoboto
|
|
75115
|
+
serverStreamError
|
|
75107
75116
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
75108
75117
|
class ComponentLoader {
|
|
75109
75118
|
constructor(viewer, modal) {
|
|
@@ -76352,6 +76361,7 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
76352
76361
|
Icons: icons,
|
|
76353
76362
|
Settings: index$4,
|
|
76354
76363
|
Ultra: index$1,
|
|
76364
|
+
Urls: urls,
|
|
76355
76365
|
Webgl: index$2,
|
|
76356
76366
|
createContainer
|
|
76357
76367
|
}, Symbol.toStringTag, { value: "Module" }));
|