@micrio/client 6.1.2 → 6.1.4

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 CHANGED
@@ -12,10 +12,23 @@ declare module '@micrio/client' {
12
12
  * @returns A Promise resolving to the loaded TextureBitmap.
13
13
  */
14
14
  export const loadTexture: (src: string) => Promise<TextureBitmap>;
15
+ /**
16
+ * Mathematical utility functions.
17
+ * @author Marcel Duin <marcel@micr.io>
18
+ */
15
19
  /**
16
20
  * Calculates the positive modulo (floored division remainder).
17
21
  */
18
22
  export const mod: (n: number, m?: number) => number;
23
+ /**
24
+ * Converts a Camera.View tuple `[x, y, w, h]` to a center-based JSON object.
25
+ */
26
+ export const toCenterJSON: (v: Models.Camera.View) => {
27
+ centerX: number;
28
+ centerY: number;
29
+ width: number;
30
+ height: number;
31
+ };
19
32
  /**
20
33
  * Defines various enums used throughout the Micrio application,
21
34
  * primarily for standardizing action types and option values.
@@ -88,14 +101,9 @@ declare module '@micrio/client' {
88
101
  * @returns A copy of the current screen viewport array, or undefined if not initialized.
89
102
  */
90
103
  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
104
  /**
97
105
  * Sets the camera view instantly to the specified viewport.
98
- * @param view The target viewport as either a View [x0, y0, x1, y1] or View {centerX, centerY, width, height}.
106
+ * @param view The target viewport as a View [x0, y0, width, height].
99
107
  * @param opts Options for setting the view.
100
108
  */
101
109
  setView(view: Models.Camera.View, opts?: {
@@ -184,7 +192,7 @@ declare module '@micrio/client' {
184
192
  aniIsKinetic(): boolean;
185
193
  /**
186
194
  * Animates the camera smoothly to a target viewport.
187
- * @param view The target viewport as either a View [x0, y0, x1, y1] or View {centerX, centerY, width, height}.
195
+ * @param view The target viewport as a View [x0, y0, width, height].
188
196
  * @param opts Optional animation settings.
189
197
  * @returns A Promise that resolves when the animation completes, or rejects if aborted.
190
198
  */
@@ -407,14 +415,6 @@ declare module '@micrio/client' {
407
415
  */
408
416
  animateTo(idx: number): void;
409
417
  }
410
- /**
411
- * Converts seconds into a human-readable time string (hh?:mm:ss).
412
- * @param s Time in seconds. Can be negative for remaining time display.
413
- * @returns Formatted time string (e.g., "1:23", "1:05:09", "-0:15").
414
- */
415
- export function parseTime(s: number): string;
416
- /** Type for error codes */
417
- export type ErrorCode = typeof ErrorCodes[keyof typeof ErrorCodes];
418
418
  /**
419
419
  * Centralized data loading controller.
420
420
  * Uses the `bundle.json` endpoint which returns info + data for multiple
@@ -427,6 +427,7 @@ declare module '@micrio/client' {
427
427
  *
428
428
  * @author Marcel Duin <marcel@micr.io>
429
429
  */
430
+ type BundleImage = Models.ImageBundle.BundleImage;
430
431
  export const DataLoader: {
431
432
  /** Returns the info for an image ID, or undefined if not found in its bundle. */
432
433
  getInfo(id: string): Promise<Models.ImageInfo.ImageInfo | undefined>;
@@ -444,23 +445,10 @@ declare module '@micrio/client' {
444
445
  /** Returns the organisation data from the bundle, or undefined. */
445
446
  getOrganisation(): Models.ImageInfo.Organisation | undefined;
446
447
  /**
447
- * Returns both info + data for a single image ID, or undefined if the image
448
- * is not present in its bundle.
448
+ * Returns the full bundle entry (info + data) for a single image ID,
449
+ * fetching the bundle once if not cached.
449
450
  */
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.
459
- */
460
- getBundleImages(ids: string[]): Promise<Map<string, {
461
- info: Models.ImageInfo.ImageInfo;
462
- data: Models.ImageData.ImageData;
463
- }>>;
451
+ getBundleImage(id: string): Promise<BundleImage | undefined>;
464
452
  };
465
453
  /**
466
454
  * # Micrio State management
@@ -619,36 +607,6 @@ declare module '@micrio/client' {
619
607
  /** Fades out the image smoothly or instantly. */
620
608
  fadeOut(direct?: boolean): void;
621
609
  }
622
- /**
623
- * Direction-keyed area rectangles for grid/gallery slide and swipe transitions.
624
- * Areas use [x0, y0, x1, y1] in normalized parent-canvas coordinates and
625
- * extend outside [0,1] to represent off-screen positions.
626
- *
627
- * Direction conventions (degrees of motion of the entering image):
628
- * 0 = enters from top
629
- * 90 = enters from right
630
- * 180 = enters from bottom
631
- * 270 = enters from left
632
- *
633
- * @author Marcel Duin <marcel@micr.io>
634
- */
635
- /** Slide transition entry areas (entering image starts half-off-screen). */
636
- export const slideAreas: Record<number, Models.Camera.ViewRect>;
637
- /** Swipe transition entry areas (entering image starts fully off-screen). */
638
- export const swipeAreas: Record<number, Models.Camera.ViewRect>;
639
- /** Swipe transition exit areas (leaving image moves fully off-screen). */
640
- export const swipeExitAreas: Record<number, Models.Camera.ViewRect>;
641
- /** Centered visible slot. */
642
- export const centerArea: Models.Camera.ViewRect;
643
- /** Off-screen slot to the left, same height. */
644
- export const leftSlot: Models.Camera.ViewRect;
645
- /** Off-screen slot to the right, same height. */
646
- export const rightSlot: Models.Camera.ViewRect;
647
- /**
648
- * Returns the horizontal slot area for an integer offset from the active slot.
649
- * offset=0 → centered visible; positive → off to the right; negative → off to the left.
650
- */
651
- export const horizontalSlot: (offset: number) => Models.Camera.ViewRect;
652
610
  /**
653
611
  * Micrio grid display controller
654
612
  * @author Marcel Duin <marcel@micr.io>
@@ -940,7 +898,7 @@ declare module '@micrio/client' {
940
898
  version: string;
941
899
  /** Created date */
942
900
  created?: number;
943
- /** Has new viewport model, optimized for 360 images */
901
+ /** Has new viewport model, optimized for 360 images. Server-side only, not read client-side. */
944
902
  viewsWH?: boolean;
945
903
  /** For V5+: published revisions per language */
946
904
  revision?: RevisionType;
@@ -1023,7 +981,7 @@ declare module '@micrio/client' {
1023
981
  type Settings = {
1024
982
  /** The starting viewport */
1025
983
  view?: Camera.View;
1026
- /** Restrict navigation to this viewport (`[x0,y0,x1,y1]`) */
984
+ /** Restrict navigation to this viewport (`[x0, y0, width, height]`) */
1027
985
  restrict?: Camera.View;
1028
986
  /** Load a cover-initing image focussed on this coordinate (`[x, y]`) */
1029
987
  focus?: [number, number];
@@ -1681,8 +1639,6 @@ declare module '@micrio/client' {
1681
1639
  keepMarkers?: boolean;
1682
1640
  /** Don't disable user navigation when running */
1683
1641
  keepInteraction?: boolean;
1684
- /** The tour is a direct outside instance using legacy [x0,y0,x1,y1] viewports */
1685
- isLegacy?: boolean;
1686
1642
  /** Current running tour instance */
1687
1643
  instance?: VideoTourInstance;
1688
1644
  };
@@ -2487,101 +2443,6 @@ declare module '@micrio/client' {
2487
2443
  /** Has touch support */
2488
2444
  hasTouch: boolean;
2489
2445
  }
2490
- /**
2491
- * List of internal Micrio event types that should trigger a debounced 'update' event.
2492
- * The 'update' event signals that the overall state relevant for external integrations might have changed.
2493
- * @readonly
2494
- */
2495
- export const UpdateEvents: (keyof Models.MicrioEventMap)[];
2496
- /**
2497
- * Update event handler module.
2498
- * Manages debounced 'update' event dispatching when internal state changes.
2499
- */
2500
- export class UpdateHandler {
2501
- private ctx;
2502
- constructor(ctx: EventContext);
2503
- /** Hooks listeners for events that should trigger a debounced 'update' event. */
2504
- hook(): void;
2505
- /** Unhooks listeners for the debounced 'update' event. */
2506
- unhook(): void;
2507
- /**
2508
- * Event listener callback that queues the event type and triggers the debounced dispatch.
2509
- * @param e The Event object.
2510
- */
2511
- private handleEvent;
2512
- /**
2513
- * Dispatches the 'update' event with the accumulated event types and current state.
2514
- * Clears the event stack.
2515
- */
2516
- private dispatch;
2517
- }
2518
- export { UpdateEvents } from "ts/events/update";
2519
- /**
2520
- * Handles user input events (mouse, touch, keyboard, wheel, gestures) for the Micrio viewer.
2521
- * Translates browser events into camera movements (pan, zoom), dispatches custom Micrio events,
2522
- * and manages interaction states like panning, pinching, and enabled/disabled states.
2523
- * Accessed via `micrio.events`.
2524
- * @author Marcel Duin <marcel@micr.io>
2525
- */
2526
- export class Events implements EventContext {
2527
- /** Writable Svelte store indicating if event handling is currently enabled. Set to false during tours or animations. */
2528
- enabled: Writable<boolean>;
2529
- /** Getter for the current value of the {@link enabled} store. */
2530
- get $enabled(): boolean;
2531
- /** Current pinch zoom factor relative to the start of the pinch. Undefined when not pinching. */
2532
- pinchFactor: number | undefined;
2533
- private dragHandler;
2534
- private pinchHandler;
2535
- private pointerPinchHandler;
2536
- private gestureHandler;
2537
- private wheelHandler;
2538
- private keyboardHandler;
2539
- private doubleTapHandler;
2540
- private updateHandler;
2541
- isEnabled(): boolean;
2542
- isPanning(): boolean;
2543
- isPinching(): boolean;
2544
- setPanning(value: boolean): void;
2545
- setPinching(value: boolean): void;
2546
- isWheeling(): boolean;
2547
- setWheeling(value: boolean): void;
2548
- isControlZoom(): boolean;
2549
- isTwoFingerPan(): boolean;
2550
- getVisible(): MicrioImage[] | undefined;
2551
- setCapturedPointerId(id: number | undefined): void;
2552
- setPinchFactor(value: number | undefined): void;
2553
- setPScale(value: number): void;
2554
- setHasUsedCtrl(value: boolean): void;
2555
- /**
2556
- * Checks if the user is currently interacting with the map via panning, pinching, or wheeling.
2557
- * @returns True if the user is actively navigating.
2558
- */
2559
- get isNavigating(): boolean;
2560
- /** Hooks all necessary event listeners based on current settings. */
2561
- hook(): void;
2562
- /** Unhooks all attached event listeners. */
2563
- unhook(): void;
2564
- /** Hooks keyboard event listeners. */
2565
- hookKeys(): void;
2566
- /** Unhooks keyboard event listeners. */
2567
- unhookKeys(): void;
2568
- /** Hooks zoom-related event listeners (pinch, scroll, double-tap/click). */
2569
- hookZoom(): void;
2570
- /** Unhooks zoom-related event listeners. */
2571
- unhookZoom(): void;
2572
- /** Hooks mouse wheel/scroll event listeners. */
2573
- hookScroll(): void;
2574
- /** Unhooks mouse wheel/scroll event listeners. */
2575
- unhookScroll(): void;
2576
- /** Hooks touch pinch and macOS gesture event listeners. */
2577
- hookPinch(): void;
2578
- /** Unhooks touch pinch and macOS gesture event listeners. */
2579
- unhookPinch(): void;
2580
- /** Hooks pointer down/move/up listeners for drag panning. */
2581
- hookDrag(): void;
2582
- /** Unhooks pointer listeners for drag panning. */
2583
- unhookDrag(): void;
2584
- }
2585
2446
  /**
2586
2447
  * Drag/pan event handler module.
2587
2448
  * Handles pointer down/move/up events for panning the image.
@@ -2771,16 +2632,100 @@ declare module '@micrio/client' {
2771
2632
  */
2772
2633
  private click;
2773
2634
  }
2774
- export { Events } from "ts/events/facade";
2775
- export { DragHandler } from "ts/events/drag";
2776
- export { PinchHandler } from "ts/events/pinch";
2777
- export { PointerPinchHandler } from "ts/events/pointer-pinch";
2778
- export { GestureHandler } from "ts/events/gesture";
2779
- export { WheelHandler } from "ts/events/wheel";
2780
- export { KeyboardHandler } from "ts/events/keyboard";
2781
- export { DoubleTapHandler } from "ts/events/doubletap";
2782
- export { UpdateHandler } from "ts/events/update";
2783
- export { type AllEvents, type EventStateVars, type EventContext, eventPassive, eventPassiveCapture, noEventPassive, cancelPrevent, } from "ts/events/shared";
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
+ /**
2664
+ * Handles user input events (mouse, touch, keyboard, wheel, gestures) for the Micrio viewer.
2665
+ * Translates browser events into camera movements (pan, zoom), dispatches custom Micrio events,
2666
+ * and manages interaction states like panning, pinching, and enabled/disabled states.
2667
+ * Accessed via `micrio.events`.
2668
+ * @author Marcel Duin <marcel@micr.io>
2669
+ */
2670
+ export class Events implements EventContext {
2671
+ /** Writable Svelte store indicating if event handling is currently enabled. Set to false during tours or animations. */
2672
+ enabled: Writable<boolean>;
2673
+ /** Getter for the current value of the {@link enabled} store. */
2674
+ get $enabled(): boolean;
2675
+ /** Current pinch zoom factor relative to the start of the pinch. Undefined when not pinching. */
2676
+ pinchFactor: number | undefined;
2677
+ private dragHandler;
2678
+ private pinchHandler;
2679
+ private pointerPinchHandler;
2680
+ private gestureHandler;
2681
+ private wheelHandler;
2682
+ private keyboardHandler;
2683
+ private doubleTapHandler;
2684
+ private updateHandler;
2685
+ isEnabled(): boolean;
2686
+ isPanning(): boolean;
2687
+ isPinching(): boolean;
2688
+ setPanning(value: boolean): void;
2689
+ setPinching(value: boolean): void;
2690
+ isWheeling(): boolean;
2691
+ setWheeling(value: boolean): void;
2692
+ isControlZoom(): boolean;
2693
+ isTwoFingerPan(): boolean;
2694
+ getVisible(): MicrioImage[] | undefined;
2695
+ setCapturedPointerId(id: number | undefined): void;
2696
+ setPinchFactor(value: number | undefined): void;
2697
+ setPScale(value: number): void;
2698
+ setHasUsedCtrl(value: boolean): void;
2699
+ /**
2700
+ * Checks if the user is currently interacting with the map via panning, pinching, or wheeling.
2701
+ * @returns True if the user is actively navigating.
2702
+ */
2703
+ get isNavigating(): boolean;
2704
+ /** Hooks all necessary event listeners based on current settings. */
2705
+ hook(): void;
2706
+ /** Unhooks all attached event listeners. */
2707
+ unhook(): void;
2708
+ /** Hooks keyboard event listeners. */
2709
+ hookKeys(): void;
2710
+ /** Unhooks keyboard event listeners. */
2711
+ unhookKeys(): void;
2712
+ /** Hooks zoom-related event listeners (pinch, scroll, double-tap/click). */
2713
+ hookZoom(): void;
2714
+ /** Unhooks zoom-related event listeners. */
2715
+ unhookZoom(): void;
2716
+ /** Hooks mouse wheel/scroll event listeners. */
2717
+ hookScroll(): void;
2718
+ /** Unhooks mouse wheel/scroll event listeners. */
2719
+ unhookScroll(): void;
2720
+ /** Hooks touch pinch and macOS gesture event listeners. */
2721
+ hookPinch(): void;
2722
+ /** Unhooks touch pinch and macOS gesture event listeners. */
2723
+ unhookPinch(): void;
2724
+ /** Hooks pointer down/move/up listeners for drag panning. */
2725
+ hookDrag(): void;
2726
+ /** Unhooks pointer listeners for drag panning. */
2727
+ unhookDrag(): void;
2728
+ }
2784
2729
  /**
2785
2730
  * Language-related constants and utilities.
2786
2731
  */
@@ -2981,8 +2926,6 @@ declare module '@micrio/client' {
2981
2926
  */
2982
2927
  constructor(micrio: HTMLMicrioElement);
2983
2928
  }
2984
- export { i18n, langs } from "ts/i18n/strings";
2985
- export { locale, languageNames, rtlLanguageCodes } from "ts/i18n/locale";
2986
2929
  /**
2987
2930
  * Manages the loading, playback, and WebGL integration of embedded videos
2988
2931
  * that are rendered directly onto the Micrio canvas texture (not as HTML elements).
@@ -3119,84 +3062,21 @@ declare module '@micrio/client' {
3119
3062
  setVolume(volume: number): void;
3120
3063
  destroy(): void;
3121
3064
  }
3122
- export type PREDEFINED = [string, Models.ImageInfo.ImageInfo, Models.ImageData.ImageData | undefined];
3123
- /** Enum for identifying media type. */
3124
- export enum MediaType {
3125
- None = 0,
3126
- IFrame = 1,
3127
- Video = 2,
3128
- Audio = 3,
3129
- VideoTour = 4,
3130
- Micrio = 5
3131
- }
3132
- /** Enum for identifying iframe player type. */
3133
- export enum FrameType {
3134
- YouTube = 1,
3135
- Vimeo = 2
3136
- }
3137
3065
  /**
3138
- * Media utilities for source parsing, type detection, and player management.
3139
- * @author Marcel Duin <marcel@micr.io>
3140
- */
3141
- /** YouTube no-cookies host */
3142
- export const YOUTUBE_HOST = "https://www.youtube-nocookie.com";
3143
- /**
3144
- * Parsed media source information.
3145
- */
3146
- export interface ParsedMediaSource {
3147
- /** The detected media type */
3148
- type: MediaType;
3149
- /** The frame type for iframe embeds (YouTube/Vimeo) */
3150
- frameType?: FrameType;
3151
- /** The normalized/processed source URL */
3152
- src?: string;
3153
- /** YouTube video ID (if applicable) */
3154
- youtubeId?: string;
3155
- /** Vimeo video ID (if applicable) */
3156
- vimeoId?: string;
3157
- /** Vimeo hash token (if applicable) */
3158
- vimeoToken?: string;
3159
- /** Cloudflare video ID (if applicable) */
3160
- cloudflareId?: string;
3161
- /** Micrio embed data [id, width?, height?, lang?] */
3162
- micrioEmbed?: string[];
3163
- /** Start time extracted from URL (seconds) */
3164
- startTime?: number;
3165
- /** Whether the source is a Cloudflare stream */
3166
- isCloudflare: boolean;
3167
- /** M3U8 URL for HLS streams */
3168
- hlsSrc?: string;
3169
- }
3170
- /**
3171
- * Parses a media source URL and determines its type and configuration.
3172
- */
3173
- 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
- /**
3179
- * Returns a shared Audio element instance for iOS.
3180
- * This is a workaround for iOS audio playback restrictions where user
3181
- * interaction is required per audio element.
3182
- */
3183
- export function getIOSAudioElement(): HTMLAudioElement;
3184
- /**
3185
- * Adapter for YouTube IFrame Player API.
3066
+ * Adapter for Vimeo Player API.
3186
3067
  */
3187
- export class YouTubePlayerAdapter implements MediaPlayerAdapter {
3068
+ export class VimeoPlayerAdapter implements MediaPlayerAdapter {
3188
3069
  private frame;
3189
3070
  private config;
3190
3071
  private callbacks;
3191
- readonly requiresTimeTick = true;
3072
+ readonly requiresTimeTick = false;
3192
3073
  private player;
3193
3074
  private destroyed;
3194
3075
  constructor(frame: HTMLIFrameElement, config: PlayerConfig, callbacks?: PlayerEventCallbacks);
3195
3076
  /**
3196
- * Loads the YouTube API and initializes the player.
3077
+ * Loads the Vimeo API and initializes the player.
3197
3078
  */
3198
3079
  initialize(): Promise<void>;
3199
- private handleStateChange;
3200
3080
  play(): Promise<void>;
3201
3081
  pause(): void;
3202
3082
  getCurrentTime(): Promise<number>;
@@ -3204,24 +3084,25 @@ declare module '@micrio/client' {
3204
3084
  getDuration(): Promise<number>;
3205
3085
  isPaused(): Promise<boolean>;
3206
3086
  setMuted(muted: boolean): void;
3207
- setVolume(_volume: number): void;
3087
+ setVolume(volume: number): void;
3208
3088
  destroy(): void;
3209
3089
  }
3210
3090
  /**
3211
- * Adapter for Vimeo Player API.
3091
+ * Adapter for YouTube IFrame Player API.
3212
3092
  */
3213
- export class VimeoPlayerAdapter implements MediaPlayerAdapter {
3093
+ export class YouTubePlayerAdapter implements MediaPlayerAdapter {
3214
3094
  private frame;
3215
3095
  private config;
3216
3096
  private callbacks;
3217
- readonly requiresTimeTick = false;
3097
+ readonly requiresTimeTick = true;
3218
3098
  private player;
3219
3099
  private destroyed;
3220
3100
  constructor(frame: HTMLIFrameElement, config: PlayerConfig, callbacks?: PlayerEventCallbacks);
3221
3101
  /**
3222
- * Loads the Vimeo API and initializes the player.
3102
+ * Loads the YouTube API and initializes the player.
3223
3103
  */
3224
3104
  initialize(): Promise<void>;
3105
+ private handleStateChange;
3225
3106
  play(): Promise<void>;
3226
3107
  pause(): void;
3227
3108
  getCurrentTime(): Promise<number>;
@@ -3229,45 +3110,24 @@ declare module '@micrio/client' {
3229
3110
  getDuration(): Promise<number>;
3230
3111
  isPaused(): Promise<boolean>;
3231
3112
  setMuted(muted: boolean): void;
3232
- setVolume(volume: number): void;
3113
+ setVolume(_volume: number): void;
3233
3114
  destroy(): void;
3234
3115
  }
3235
- /**
3236
- * Media player adapters module.
3237
- * Provides unified interfaces for different media player types.
3238
- * @author Marcel Duin <marcel@micr.io>
3239
- */
3240
- export type { MediaPlayerAdapter, PlayerEventCallbacks, PlayerConfig } from "ts/media/types";
3241
- export { HTML5PlayerAdapter } from "ts/media/html5-adapter";
3242
- export { YouTubePlayerAdapter } from "ts/media/youtube-adapter";
3243
- export { VimeoPlayerAdapter } from "ts/media/vimeo-adapter";
3244
- export { HLSPlayerAdapter } from "ts/media/hls-adapter";
3245
- export { GLEmbedVideo } from "ts/media/embedvideo";
3246
- export { VideoTourInstance } from "ts/media/videotour";
3247
- export { Grid } from "ts/nav/grid";
3248
- export { GallerySwiper } from "ts/nav/swiper";
3249
- export { Engine } from "ts/render/engine";
3250
- export { WebGL } from "ts/render/webgl";
3251
- export { Canvas } from "ts/render/canvas";
3252
- export { PostProcessor } from "ts/render/postprocess";
3253
- export { archive } from "ts/render/archive";
3254
- export { loadTexture, runningThreads, numThreads, abortDownload } from "ts/render/textures";
3255
- export type { TextureBitmap } from "ts/render/textures";
3256
- /**
3257
- * Marker clustering algorithm for calculating overlapping markers
3258
- * and generating cluster marker objects.
3259
- * @author Marcel Duin <marcel@micr.io>
3260
- */
3261
- type MarkerData = Models.ImageData.Marker;
3262
- export type MarkerCoords = [x: number, y: number, w?: number, h?: number];
3263
- export interface ClusterResult {
3264
- overlapped: number[];
3265
- clusterMarkers: MarkerData[];
3116
+ export type PREDEFINED = [string, Models.ImageInfo.ImageInfo, Models.ImageData.ImageData | undefined];
3117
+ /** Enum for identifying media type. */
3118
+ export enum MediaType {
3119
+ None = 0,
3120
+ IFrame = 1,
3121
+ Video = 2,
3122
+ Audio = 3,
3123
+ VideoTour = 4,
3124
+ Micrio = 5
3125
+ }
3126
+ /** Enum for identifying iframe player type. */
3127
+ export enum FrameType {
3128
+ YouTube = 1,
3129
+ Vimeo = 2
3266
3130
  }
3267
- /**
3268
- * Calculates which markers overlap and generates synthetic cluster markers.
3269
- */
3270
- export function calcClusters(visibleMarkers: MarkerData[] | undefined, coords: Map<string, MarkerCoords>, r: number, isOmni: boolean): ClusterResult;
3271
3131
  }declare module "svelte/store" {
3272
3132
  /** Callback to inform of a value updates.
3273
3133
  */