@micrio/client 6.1.4 → 6.1.5
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 +11 -64
- package/micrio.min.js +2 -2
- package/package.json +1 -1
package/micrio.min.d.ts
CHANGED
|
@@ -329,7 +329,7 @@ declare module '@micrio/client' {
|
|
|
329
329
|
* Initializes the engine (replaces WebAssembly loading).
|
|
330
330
|
* @throws Error if engine initialization fails
|
|
331
331
|
*/
|
|
332
|
-
load():
|
|
332
|
+
load(): void;
|
|
333
333
|
private _hostDrawQuad;
|
|
334
334
|
private _hostGetTileOpacity;
|
|
335
335
|
private _hostSetTileOpacity;
|
|
@@ -444,6 +444,8 @@ declare module '@micrio/client' {
|
|
|
444
444
|
getSpaceData(id: string): Models.Spaces.Space | undefined;
|
|
445
445
|
/** Returns the organisation data from the bundle, or undefined. */
|
|
446
446
|
getOrganisation(): Models.ImageInfo.Organisation | undefined;
|
|
447
|
+
/** Returns the album info for an album ID from the bundle cache. */
|
|
448
|
+
getAlbum(id: string): Models.ImageInfo.GallerySettings | undefined;
|
|
447
449
|
/**
|
|
448
450
|
* Returns the full bundle entry (info + data) for a single image ID,
|
|
449
451
|
* fetching the bundle once if not cached.
|
|
@@ -1120,7 +1122,6 @@ declare module '@micrio/client' {
|
|
|
1120
1122
|
markersScale?: boolean;
|
|
1121
1123
|
/** Albums */
|
|
1122
1124
|
gallery?: GallerySettings;
|
|
1123
|
-
album?: AlbumInfo; /** V5 only */
|
|
1124
1125
|
/** FOR OMNI OBJECTS */
|
|
1125
1126
|
omni?: OmniSettings;
|
|
1126
1127
|
/** Optional marker settings */
|
|
@@ -1169,6 +1170,10 @@ declare module '@micrio/client' {
|
|
|
1169
1170
|
watermarkOpacity?: number;
|
|
1170
1171
|
};
|
|
1171
1172
|
type GallerySettings = {
|
|
1173
|
+
/** Album/image ID for the gallery */
|
|
1174
|
+
id?: string;
|
|
1175
|
+
/** Gallery name */
|
|
1176
|
+
name?: string;
|
|
1172
1177
|
/** Gallery has an associated .bin archive with thumbnails */
|
|
1173
1178
|
archive?: string;
|
|
1174
1179
|
/** Archive layer offset */
|
|
@@ -1183,6 +1188,8 @@ declare module '@micrio/client' {
|
|
|
1183
1188
|
isSpreads?: boolean;
|
|
1184
1189
|
/** For spreads, number of cover pages to show as single page */
|
|
1185
1190
|
coverPages?: number;
|
|
1191
|
+
/** Optional viewer settings that override/merge with defaults */
|
|
1192
|
+
settings?: Partial<ImageInfo.Settings>;
|
|
1186
1193
|
revisions?: {
|
|
1187
1194
|
[key: string]: RevisionType;
|
|
1188
1195
|
};
|
|
@@ -1770,6 +1777,7 @@ declare module '@micrio/client' {
|
|
|
1770
1777
|
id: string;
|
|
1771
1778
|
data: Models.Spaces.Space;
|
|
1772
1779
|
}[];
|
|
1780
|
+
album?: ImageInfo.GallerySettings;
|
|
1773
1781
|
};
|
|
1774
1782
|
}
|
|
1775
1783
|
namespace Assets {
|
|
@@ -1962,36 +1970,13 @@ declare module '@micrio/client' {
|
|
|
1962
1970
|
blur?: number;
|
|
1963
1971
|
}
|
|
1964
1972
|
}
|
|
1965
|
-
/** Albums */
|
|
1966
|
-
interface AlbumInfo {
|
|
1967
|
-
/** The album ID */
|
|
1968
|
-
id: string;
|
|
1969
|
-
/** The album name */
|
|
1970
|
-
name: string;
|
|
1971
|
-
/** The album UX type */
|
|
1972
|
-
type: ('swipe' | 'switch' | 'grid');
|
|
1973
|
-
/** The album image sorting */
|
|
1974
|
-
sort?: ('name' | '-name' | 'created' | '-created' | 'random');
|
|
1975
|
-
/** Album pages are shown as book spreads */
|
|
1976
|
-
isSpreads?: boolean;
|
|
1977
|
-
/** The number of single cover pages in case of spreads */
|
|
1978
|
-
coverPages?: number;
|
|
1979
|
-
/** Published revision number */
|
|
1980
|
-
revision: number;
|
|
1981
|
-
/** Available page data (markers, etc) */
|
|
1982
|
-
published: {
|
|
1983
|
-
[key: string]: RevisionType;
|
|
1984
|
-
};
|
|
1985
|
-
/** Album organisation */
|
|
1986
|
-
organisation?: ImageInfo.Organisation;
|
|
1987
|
-
}
|
|
1988
1973
|
interface Album {
|
|
1989
1974
|
/** The number of pages in this album */
|
|
1990
1975
|
numPages: number;
|
|
1991
1976
|
/** The current page index */
|
|
1992
1977
|
currentIndex: number;
|
|
1993
1978
|
/** The album info */
|
|
1994
|
-
info?:
|
|
1979
|
+
info?: ImageInfo.GallerySettings;
|
|
1995
1980
|
/** Go to previous page */
|
|
1996
1981
|
prev: () => void;
|
|
1997
1982
|
/** Go to next page */
|
|
@@ -2269,8 +2254,6 @@ declare module '@micrio/client' {
|
|
|
2269
2254
|
'volume'?: number;
|
|
2270
2255
|
/** Fade music to this volume while other audio plays (between 0 and 1). Default: 0 */
|
|
2271
2256
|
'data-mutedvolume'?: number;
|
|
2272
|
-
/** Configuration for the grid which the viewer will use. */
|
|
2273
|
-
'data-grid'?: string;
|
|
2274
2257
|
/** Toggle limited rendering mode in WebAssembly. */
|
|
2275
2258
|
'data-limited'?: boolean;
|
|
2276
2259
|
}
|
|
@@ -2370,13 +2353,6 @@ declare module '@micrio/client' {
|
|
|
2370
2353
|
/** Was panning active before pinching started? */
|
|
2371
2354
|
wasPanning: boolean;
|
|
2372
2355
|
};
|
|
2373
|
-
/** State for debouncing 'update' events. */
|
|
2374
|
-
updates: {
|
|
2375
|
-
/** Timeout ID for the debounced update. */
|
|
2376
|
-
to: number;
|
|
2377
|
-
/** Stack of event types that triggered the update. */
|
|
2378
|
-
stack: string[];
|
|
2379
|
-
};
|
|
2380
2356
|
};
|
|
2381
2357
|
/** Event listener options for passive listeners. */
|
|
2382
2358
|
export const eventPassive: AddEventListenerOptions;
|
|
@@ -2632,34 +2608,6 @@ declare module '@micrio/client' {
|
|
|
2632
2608
|
*/
|
|
2633
2609
|
private click;
|
|
2634
2610
|
}
|
|
2635
|
-
/**
|
|
2636
|
-
* List of internal Micrio event types that should trigger a debounced 'update' event.
|
|
2637
|
-
* The 'update' event signals that the overall state relevant for external integrations might have changed.
|
|
2638
|
-
* @readonly
|
|
2639
|
-
*/
|
|
2640
|
-
export const UpdateEvents: (keyof Models.MicrioEventMap)[];
|
|
2641
|
-
/**
|
|
2642
|
-
* Update event handler module.
|
|
2643
|
-
* Manages debounced 'update' event dispatching when internal state changes.
|
|
2644
|
-
*/
|
|
2645
|
-
export class UpdateHandler {
|
|
2646
|
-
private ctx;
|
|
2647
|
-
constructor(ctx: EventContext);
|
|
2648
|
-
/** Hooks listeners for events that should trigger a debounced 'update' event. */
|
|
2649
|
-
hook(): void;
|
|
2650
|
-
/** Unhooks listeners for the debounced 'update' event. */
|
|
2651
|
-
unhook(): void;
|
|
2652
|
-
/**
|
|
2653
|
-
* Event listener callback that queues the event type and triggers the debounced dispatch.
|
|
2654
|
-
* @param e The Event object.
|
|
2655
|
-
*/
|
|
2656
|
-
private handleEvent;
|
|
2657
|
-
/**
|
|
2658
|
-
* Dispatches the 'update' event with the accumulated event types and current state.
|
|
2659
|
-
* Clears the event stack.
|
|
2660
|
-
*/
|
|
2661
|
-
private dispatch;
|
|
2662
|
-
}
|
|
2663
2611
|
/**
|
|
2664
2612
|
* Handles user input events (mouse, touch, keyboard, wheel, gestures) for the Micrio viewer.
|
|
2665
2613
|
* Translates browser events into camera movements (pan, zoom), dispatches custom Micrio events,
|
|
@@ -2681,7 +2629,6 @@ declare module '@micrio/client' {
|
|
|
2681
2629
|
private wheelHandler;
|
|
2682
2630
|
private keyboardHandler;
|
|
2683
2631
|
private doubleTapHandler;
|
|
2684
|
-
private updateHandler;
|
|
2685
2632
|
isEnabled(): boolean;
|
|
2686
2633
|
isPanning(): boolean;
|
|
2687
2634
|
isPinching(): boolean;
|