@micrio/client 6.1.2 → 6.1.3
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/micrio.min.d.ts +10 -35
- package/micrio.min.js +2 -2
- package/package.json +1 -1
package/micrio.min.d.ts
CHANGED
|
@@ -88,14 +88,9 @@ declare module '@micrio/client' {
|
|
|
88
88
|
* @returns A copy of the current screen viewport array, or undefined if not initialized.
|
|
89
89
|
*/
|
|
90
90
|
getViewRaw: () => Float64Array;
|
|
91
|
-
/**
|
|
92
|
-
* Gets the current image view rectangle [x0, y0, x1, y1] relative to the image (0-1).
|
|
93
|
-
* @returns A copy of the current screen viewport array, or undefined if not initialized.
|
|
94
|
-
*/
|
|
95
|
-
getViewLegacy: () => Models.Camera.ViewRect | undefined;
|
|
96
91
|
/**
|
|
97
92
|
* Sets the camera view instantly to the specified viewport.
|
|
98
|
-
* @param view The target viewport as
|
|
93
|
+
* @param view The target viewport as a View [x0, y0, width, height].
|
|
99
94
|
* @param opts Options for setting the view.
|
|
100
95
|
*/
|
|
101
96
|
setView(view: Models.Camera.View, opts?: {
|
|
@@ -184,7 +179,7 @@ declare module '@micrio/client' {
|
|
|
184
179
|
aniIsKinetic(): boolean;
|
|
185
180
|
/**
|
|
186
181
|
* Animates the camera smoothly to a target viewport.
|
|
187
|
-
* @param view The target viewport as
|
|
182
|
+
* @param view The target viewport as a View [x0, y0, width, height].
|
|
188
183
|
* @param opts Optional animation settings.
|
|
189
184
|
* @returns A Promise that resolves when the animation completes, or rejects if aborted.
|
|
190
185
|
*/
|
|
@@ -413,8 +408,6 @@ declare module '@micrio/client' {
|
|
|
413
408
|
* @returns Formatted time string (e.g., "1:23", "1:05:09", "-0:15").
|
|
414
409
|
*/
|
|
415
410
|
export function parseTime(s: number): string;
|
|
416
|
-
/** Type for error codes */
|
|
417
|
-
export type ErrorCode = typeof ErrorCodes[keyof typeof ErrorCodes];
|
|
418
411
|
/**
|
|
419
412
|
* Centralized data loading controller.
|
|
420
413
|
* Uses the `bundle.json` endpoint which returns info + data for multiple
|
|
@@ -427,6 +420,7 @@ declare module '@micrio/client' {
|
|
|
427
420
|
*
|
|
428
421
|
* @author Marcel Duin <marcel@micr.io>
|
|
429
422
|
*/
|
|
423
|
+
type BundleImage = Models.ImageBundle.BundleImage;
|
|
430
424
|
export const DataLoader: {
|
|
431
425
|
/** Returns the info for an image ID, or undefined if not found in its bundle. */
|
|
432
426
|
getInfo(id: string): Promise<Models.ImageInfo.ImageInfo | undefined>;
|
|
@@ -444,23 +438,10 @@ declare module '@micrio/client' {
|
|
|
444
438
|
/** Returns the organisation data from the bundle, or undefined. */
|
|
445
439
|
getOrganisation(): Models.ImageInfo.Organisation | undefined;
|
|
446
440
|
/**
|
|
447
|
-
* Returns
|
|
448
|
-
*
|
|
449
|
-
*/
|
|
450
|
-
getBundleImage(id: string): Promise<{
|
|
451
|
-
data: Models.ImageData.ImageData;
|
|
452
|
-
info: Models.ImageInfo.ImageInfo;
|
|
453
|
-
} | undefined>;
|
|
454
|
-
/**
|
|
455
|
-
* Bulk variant of {@link getBundleImage}.
|
|
456
|
-
*
|
|
457
|
-
* Fetches the bundle for the first non‑IIIF ID, then resolves every requested
|
|
458
|
-
* image from the cached bundle results.
|
|
441
|
+
* Returns the full bundle entry (info + data) for a single image ID,
|
|
442
|
+
* fetching the bundle once if not cached.
|
|
459
443
|
*/
|
|
460
|
-
|
|
461
|
-
info: Models.ImageInfo.ImageInfo;
|
|
462
|
-
data: Models.ImageData.ImageData;
|
|
463
|
-
}>>;
|
|
444
|
+
getBundleImage(id: string): Promise<BundleImage | undefined>;
|
|
464
445
|
};
|
|
465
446
|
/**
|
|
466
447
|
* # Micrio State management
|
|
@@ -940,7 +921,7 @@ declare module '@micrio/client' {
|
|
|
940
921
|
version: string;
|
|
941
922
|
/** Created date */
|
|
942
923
|
created?: number;
|
|
943
|
-
/** Has new viewport model, optimized for 360 images */
|
|
924
|
+
/** Has new viewport model, optimized for 360 images. Server-side only, not read client-side. */
|
|
944
925
|
viewsWH?: boolean;
|
|
945
926
|
/** For V5+: published revisions per language */
|
|
946
927
|
revision?: RevisionType;
|
|
@@ -1023,7 +1004,7 @@ declare module '@micrio/client' {
|
|
|
1023
1004
|
type Settings = {
|
|
1024
1005
|
/** The starting viewport */
|
|
1025
1006
|
view?: Camera.View;
|
|
1026
|
-
/** Restrict navigation to this viewport (`[x0,y0,
|
|
1007
|
+
/** Restrict navigation to this viewport (`[x0, y0, width, height]`) */
|
|
1027
1008
|
restrict?: Camera.View;
|
|
1028
1009
|
/** Load a cover-initing image focussed on this coordinate (`[x, y]`) */
|
|
1029
1010
|
focus?: [number, number];
|
|
@@ -1681,8 +1662,6 @@ declare module '@micrio/client' {
|
|
|
1681
1662
|
keepMarkers?: boolean;
|
|
1682
1663
|
/** Don't disable user navigation when running */
|
|
1683
1664
|
keepInteraction?: boolean;
|
|
1684
|
-
/** The tour is a direct outside instance using legacy [x0,y0,x1,y1] viewports */
|
|
1685
|
-
isLegacy?: boolean;
|
|
1686
1665
|
/** Current running tour instance */
|
|
1687
1666
|
instance?: VideoTourInstance;
|
|
1688
1667
|
};
|
|
@@ -3143,7 +3122,7 @@ declare module '@micrio/client' {
|
|
|
3143
3122
|
/**
|
|
3144
3123
|
* Parsed media source information.
|
|
3145
3124
|
*/
|
|
3146
|
-
|
|
3125
|
+
interface ParsedMediaSource {
|
|
3147
3126
|
/** The detected media type */
|
|
3148
3127
|
type: MediaType;
|
|
3149
3128
|
/** The frame type for iframe embeds (YouTube/Vimeo) */
|
|
@@ -3171,10 +3150,6 @@ declare module '@micrio/client' {
|
|
|
3171
3150
|
* Parses a media source URL and determines its type and configuration.
|
|
3172
3151
|
*/
|
|
3173
3152
|
export function parseMediaSource(src: string | undefined, tour: Models.ImageData.VideoTour | null, useNativeFrames?: boolean, currentTime?: number): ParsedMediaSource;
|
|
3174
|
-
/**
|
|
3175
|
-
* Checks if the browser natively supports HLS playback.
|
|
3176
|
-
*/
|
|
3177
|
-
export function hasNativeHLS(el?: HTMLMediaElement): boolean;
|
|
3178
3153
|
/**
|
|
3179
3154
|
* Returns a shared Audio element instance for iOS.
|
|
3180
3155
|
* This is a workaround for iOS audio playback restrictions where user
|
|
@@ -3260,7 +3235,7 @@ declare module '@micrio/client' {
|
|
|
3260
3235
|
*/
|
|
3261
3236
|
type MarkerData = Models.ImageData.Marker;
|
|
3262
3237
|
export type MarkerCoords = [x: number, y: number, w?: number, h?: number];
|
|
3263
|
-
|
|
3238
|
+
interface ClusterResult {
|
|
3264
3239
|
overlapped: number[];
|
|
3265
3240
|
clusterMarkers: MarkerData[];
|
|
3266
3241
|
}
|