3dviewer-sdk 1.0.11 → 1.0.12
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/index.d.mts +4 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.js +7 -3
- package/dist/index.mjs +7 -3
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -232,6 +232,7 @@ declare class NodeModule {
|
|
|
232
232
|
|
|
233
233
|
type FilesConfig = {
|
|
234
234
|
baseUrl?: string;
|
|
235
|
+
conversionBaseUrl?: string;
|
|
235
236
|
viewerPath?: string;
|
|
236
237
|
uploadPath?: string;
|
|
237
238
|
};
|
|
@@ -319,6 +320,7 @@ declare class FilesModule {
|
|
|
319
320
|
private resolveFile;
|
|
320
321
|
private normalizeBaseUrl;
|
|
321
322
|
private resolveBaseUrl;
|
|
323
|
+
private resolveConversionBaseUrl;
|
|
322
324
|
private resolveViewerPath;
|
|
323
325
|
private resolveViewerOrigin;
|
|
324
326
|
private resolveHostConversion;
|
|
@@ -480,6 +482,7 @@ type Viewer3DOptions = {
|
|
|
480
482
|
container: HTMLElement | string;
|
|
481
483
|
url?: string;
|
|
482
484
|
baseUrl?: string;
|
|
485
|
+
conversionBaseUrl?: string;
|
|
483
486
|
viewerPath?: string;
|
|
484
487
|
uploadPath?: string;
|
|
485
488
|
file?: File;
|
|
@@ -520,4 +523,4 @@ declare class Viewer3D {
|
|
|
520
523
|
private handleMessage;
|
|
521
524
|
}
|
|
522
525
|
|
|
523
|
-
export { type ConvertOptions, type ConvertV2Options, type FileInfoCheckInput, type FileInfoCheckPayloadItem, type FilesConfig, type InitialToolbarVisibility, type LanguageCode, type LoadStage, type LoadStatePayload, type MarkupAction, type MarkupListItem, type MarkupOperationResultPayload, type PreparedViewerData, Viewer3D };
|
|
526
|
+
export { type ConvertOptions, type ConvertV2Options, type FileInfoCheckInput, type FileInfoCheckPayloadItem, type FilesConfig, type InitialToolbarVisibility, type LanguageCode, type LoadStage, type LoadStatePayload, type MarkupAction, type MarkupListItem, type MarkupOperationResultPayload, type PreparedViewerData, Viewer3D, type Viewer3DOptions };
|
package/dist/index.d.ts
CHANGED
|
@@ -232,6 +232,7 @@ declare class NodeModule {
|
|
|
232
232
|
|
|
233
233
|
type FilesConfig = {
|
|
234
234
|
baseUrl?: string;
|
|
235
|
+
conversionBaseUrl?: string;
|
|
235
236
|
viewerPath?: string;
|
|
236
237
|
uploadPath?: string;
|
|
237
238
|
};
|
|
@@ -319,6 +320,7 @@ declare class FilesModule {
|
|
|
319
320
|
private resolveFile;
|
|
320
321
|
private normalizeBaseUrl;
|
|
321
322
|
private resolveBaseUrl;
|
|
323
|
+
private resolveConversionBaseUrl;
|
|
322
324
|
private resolveViewerPath;
|
|
323
325
|
private resolveViewerOrigin;
|
|
324
326
|
private resolveHostConversion;
|
|
@@ -480,6 +482,7 @@ type Viewer3DOptions = {
|
|
|
480
482
|
container: HTMLElement | string;
|
|
481
483
|
url?: string;
|
|
482
484
|
baseUrl?: string;
|
|
485
|
+
conversionBaseUrl?: string;
|
|
483
486
|
viewerPath?: string;
|
|
484
487
|
uploadPath?: string;
|
|
485
488
|
file?: File;
|
|
@@ -520,4 +523,4 @@ declare class Viewer3D {
|
|
|
520
523
|
private handleMessage;
|
|
521
524
|
}
|
|
522
525
|
|
|
523
|
-
export { type ConvertOptions, type ConvertV2Options, type FileInfoCheckInput, type FileInfoCheckPayloadItem, type FilesConfig, type InitialToolbarVisibility, type LanguageCode, type LoadStage, type LoadStatePayload, type MarkupAction, type MarkupListItem, type MarkupOperationResultPayload, type PreparedViewerData, Viewer3D };
|
|
526
|
+
export { type ConvertOptions, type ConvertV2Options, type FileInfoCheckInput, type FileInfoCheckPayloadItem, type FilesConfig, type InitialToolbarVisibility, type LanguageCode, type LoadStage, type LoadStatePayload, type MarkupAction, type MarkupListItem, type MarkupOperationResultPayload, type PreparedViewerData, Viewer3D, type Viewer3DOptions };
|
package/dist/index.js
CHANGED
|
@@ -296,6 +296,11 @@ var FilesModule = class {
|
|
|
296
296
|
const raw = this.config.baseUrl || this.viewer.getOptions().baseUrl || DEFAULT_API_BASE_URL;
|
|
297
297
|
return this.normalizeBaseUrl(raw);
|
|
298
298
|
}
|
|
299
|
+
// Resolve conversion API base URL with legacy baseUrl fallback.
|
|
300
|
+
resolveConversionBaseUrl() {
|
|
301
|
+
const raw = this.config.conversionBaseUrl || this.viewer.getOptions().conversionBaseUrl;
|
|
302
|
+
return (raw == null ? void 0 : raw.trim()) ? this.normalizeBaseUrl(raw) : this.resolveBaseUrl();
|
|
303
|
+
}
|
|
299
304
|
// Resolve viewer route path (e.g. /mainviewer).
|
|
300
305
|
resolveViewerPath() {
|
|
301
306
|
const configuredPath = this.config.viewerPath || this.viewer.getOptions().viewerPath;
|
|
@@ -331,10 +336,9 @@ var FilesModule = class {
|
|
|
331
336
|
}
|
|
332
337
|
return this.normalizeBaseUrl(DEFAULT_VIEWER_ORIGIN);
|
|
333
338
|
}
|
|
334
|
-
//
|
|
339
|
+
// Use the configured conversion API root as-is.
|
|
335
340
|
resolveHostConversion() {
|
|
336
|
-
|
|
337
|
-
return baseUrl.endsWith("/service/conversion") ? baseUrl : `${baseUrl}/service/conversion`;
|
|
341
|
+
return this.resolveConversionBaseUrl();
|
|
338
342
|
}
|
|
339
343
|
// Resolve upload path sent to conversion APIs.
|
|
340
344
|
getUploadPath() {
|
package/dist/index.mjs
CHANGED
|
@@ -270,6 +270,11 @@ var FilesModule = class {
|
|
|
270
270
|
const raw = this.config.baseUrl || this.viewer.getOptions().baseUrl || DEFAULT_API_BASE_URL;
|
|
271
271
|
return this.normalizeBaseUrl(raw);
|
|
272
272
|
}
|
|
273
|
+
// Resolve conversion API base URL with legacy baseUrl fallback.
|
|
274
|
+
resolveConversionBaseUrl() {
|
|
275
|
+
const raw = this.config.conversionBaseUrl || this.viewer.getOptions().conversionBaseUrl;
|
|
276
|
+
return (raw == null ? void 0 : raw.trim()) ? this.normalizeBaseUrl(raw) : this.resolveBaseUrl();
|
|
277
|
+
}
|
|
273
278
|
// Resolve viewer route path (e.g. /mainviewer).
|
|
274
279
|
resolveViewerPath() {
|
|
275
280
|
const configuredPath = this.config.viewerPath || this.viewer.getOptions().viewerPath;
|
|
@@ -305,10 +310,9 @@ var FilesModule = class {
|
|
|
305
310
|
}
|
|
306
311
|
return this.normalizeBaseUrl(DEFAULT_VIEWER_ORIGIN);
|
|
307
312
|
}
|
|
308
|
-
//
|
|
313
|
+
// Use the configured conversion API root as-is.
|
|
309
314
|
resolveHostConversion() {
|
|
310
|
-
|
|
311
|
-
return baseUrl.endsWith("/service/conversion") ? baseUrl : `${baseUrl}/service/conversion`;
|
|
315
|
+
return this.resolveConversionBaseUrl();
|
|
312
316
|
}
|
|
313
317
|
// Resolve upload path sent to conversion APIs.
|
|
314
318
|
getUploadPath() {
|