vim-web 0.3.44-dev.52 → 0.3.44-dev.54
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/panels/index.d.ts +1 -1
- package/dist/types/utils/url.d.ts +2 -0
- package/dist/vim-web.iife.js +39 -37
- package/dist/vim-web.iife.js.map +1 -1
- package/dist/vim-web.js +39 -37
- 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,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
|
@@ -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,6 +74920,24 @@ 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";
|
|
74906
74943
|
const supportControls = "https://docs.vimaec.com/docs/vim-cloud/webgl-navigation-and-controls-guide";
|
|
@@ -74929,25 +74966,6 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
74929
74966
|
dotList([bullet("File path:", url)])
|
|
74930
74967
|
] });
|
|
74931
74968
|
}
|
|
74932
|
-
function isLocalUrl(url) {
|
|
74933
|
-
try {
|
|
74934
|
-
const parsedUrl = new URL(url);
|
|
74935
|
-
return parsedUrl.hostname === "localhost" || parsedUrl.hostname === "127.0.0.1";
|
|
74936
|
-
} catch (e) {
|
|
74937
|
-
return false;
|
|
74938
|
-
}
|
|
74939
|
-
}
|
|
74940
|
-
function isFilePathOrUri(input) {
|
|
74941
|
-
const fileUriPattern = /^file:\/\//i;
|
|
74942
|
-
if (fileUriPattern.test(input)) {
|
|
74943
|
-
return true;
|
|
74944
|
-
}
|
|
74945
|
-
const urlPattern = /^(https?|ftp|data|mailto|tel):/i;
|
|
74946
|
-
if (urlPattern.test(input)) {
|
|
74947
|
-
return false;
|
|
74948
|
-
}
|
|
74949
|
-
return true;
|
|
74950
|
-
}
|
|
74951
74969
|
function serverFileDownloadingError(url, authToken, server) {
|
|
74952
74970
|
if (isFilePathOrUri(url)) {
|
|
74953
74971
|
return fileOpeningError(url);
|
|
@@ -75088,29 +75106,13 @@ Averrage Date/Second ${avgDataRatePS} kb
|
|
|
75088
75106
|
}
|
|
75089
75107
|
const index$3 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
75090
75108
|
__proto__: null,
|
|
75091
|
-
|
|
75092
|
-
bullet,
|
|
75093
|
-
detailText,
|
|
75094
|
-
dotList,
|
|
75109
|
+
Style: errorStyle,
|
|
75095
75110
|
fileOpeningError,
|
|
75096
|
-
footer: footer$1,
|
|
75097
|
-
isFilePathOrUri,
|
|
75098
|
-
isLocalUrl,
|
|
75099
|
-
link,
|
|
75100
|
-
mainText,
|
|
75101
|
-
numList,
|
|
75102
75111
|
serverCompatibilityError,
|
|
75103
75112
|
serverConnectionError,
|
|
75104
75113
|
serverFileDownloadingError,
|
|
75105
75114
|
serverFileLoadingError,
|
|
75106
|
-
serverStreamError
|
|
75107
|
-
subTitle,
|
|
75108
|
-
vcColorLink,
|
|
75109
|
-
vcColorPrimary,
|
|
75110
|
-
vcColorSecondary,
|
|
75111
|
-
vcLabel,
|
|
75112
|
-
vcLink,
|
|
75113
|
-
vcRoboto
|
|
75115
|
+
serverStreamError
|
|
75114
75116
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
75115
75117
|
class ComponentLoader {
|
|
75116
75118
|
constructor(viewer, modal) {
|