@micrio/client 5.3.1 → 5.3.2
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/README.md +31 -31
- package/micrio.min.d.ts +426 -260
- package/micrio.min.js +4 -4
- package/package.json +22 -22
package/micrio.min.d.ts
CHANGED
|
@@ -4,7 +4,14 @@ declare module '@micrio/client' {
|
|
|
4
4
|
* Defines the current version of the Micrio library.
|
|
5
5
|
* This constant is used internally and exposed statically via `HTMLMicrioElement.VERSION`.
|
|
6
6
|
*/
|
|
7
|
-
export const VERSION = "5.3.
|
|
7
|
+
export const VERSION = "5.3.2";
|
|
8
|
+
/**
|
|
9
|
+
* Loads an image texture asynchronously. Adds the request to the queue
|
|
10
|
+
* and returns a Promise that resolves with the TextureBitmap or rejects on error.
|
|
11
|
+
* @param src The URL of the image to load.
|
|
12
|
+
* @returns A Promise resolving to the loaded TextureBitmap.
|
|
13
|
+
*/
|
|
14
|
+
export const loadTexture: (src: string) => Promise<TextureBitmap>;
|
|
8
15
|
export type PREDEFINED = [string, Models.ImageInfo.ImageInfo, Models.ImageData.ImageData | undefined];
|
|
9
16
|
/** Enum for identifying media type. */
|
|
10
17
|
export enum MediaType {
|
|
@@ -102,158 +109,6 @@ declare module '@micrio/client' {
|
|
|
102
109
|
}
|
|
103
110
|
}
|
|
104
111
|
}
|
|
105
|
-
/**
|
|
106
|
-
* Micrio grid display controller
|
|
107
|
-
* @author Marcel Duin <marcel@micr.io>
|
|
108
|
-
*/
|
|
109
|
-
/**
|
|
110
|
-
* Controls the display and interaction logic for grid layouts.
|
|
111
|
-
* Instantiated on the primary {@link MicrioImage} if grid data is present.
|
|
112
|
-
* Accessed via `micrioImage.grid`.
|
|
113
|
-
*/
|
|
114
|
-
export class Grid {
|
|
115
|
-
micrio: HTMLMicrioElement;
|
|
116
|
-
image: MicrioImage;
|
|
117
|
-
/** Array of {@link MicrioImage} instances currently part of the grid definition (loaded). */
|
|
118
|
-
readonly images: MicrioImage[];
|
|
119
|
-
/** Array of {@link MicrioImage} instances currently visible in the grid layout. */
|
|
120
|
-
current: MicrioImage[];
|
|
121
|
-
/** If true, the HTML grid overlay remains visible and interactive even when an image is focused. */
|
|
122
|
-
clickable: boolean;
|
|
123
|
-
/** Writable Svelte store holding the currently focused {@link MicrioImage} instance, or undefined if in grid view. */
|
|
124
|
-
readonly focussed: Writable<MicrioImage | undefined>;
|
|
125
|
-
/** Getter for the current value of the {@link focussed} store. */
|
|
126
|
-
get $focussed(): MicrioImage | undefined;
|
|
127
|
-
/** Writable Svelte store holding an array of {@link MicrioImage} instances whose markers should be displayed in the grid view. */
|
|
128
|
-
readonly markersShown: Writable<MicrioImage[]>;
|
|
129
|
-
/** Array storing the history of grid layouts for back navigation. */
|
|
130
|
-
history: Models.Grid.GridHistory[];
|
|
131
|
-
/** Writable Svelte store indicating the current depth in the grid history stack. */
|
|
132
|
-
depth: Writable<number>;
|
|
133
|
-
/** Default animation duration (seconds) when transitioning *into* a new layout or focused view. */
|
|
134
|
-
aniDurationIn: number;
|
|
135
|
-
/** Default animation duration (seconds) when transitioning *out* of a focused view or going back in history. */
|
|
136
|
-
aniDurationOut: number;
|
|
137
|
-
/** Delay (seconds) between individual image transitions for 'delayed' effects. */
|
|
138
|
-
transitionDelay: number;
|
|
139
|
-
/**
|
|
140
|
-
* The Grid constructor. Initializes the grid based on image settings.
|
|
141
|
-
* @param micrio The main HTMLMicrioElement instance.
|
|
142
|
-
* @param image The MicrioImage instance acting as the virtual container for the grid.
|
|
143
|
-
*/
|
|
144
|
-
constructor(micrio: HTMLMicrioElement, image: MicrioImage);
|
|
145
|
-
/**
|
|
146
|
-
* Sets the grid layout based on an input string or array of image definitions.
|
|
147
|
-
* This is the main method for changing the grid's content and appearance.
|
|
148
|
-
*
|
|
149
|
-
* @param input The grid definition. Can be:
|
|
150
|
-
* - A semicolon-separated string following the format defined in `Grid.getString`.
|
|
151
|
-
* - An array of {@link MicrioImage} instances.
|
|
152
|
-
* - An array of objects `{image: MicrioImage, ...GridImageOptions}`.
|
|
153
|
-
* @param opts Options controlling the transition and layout.
|
|
154
|
-
* @returns A Promise that resolves with the array of currently displayed {@link MicrioImage} instances when the transition completes.
|
|
155
|
-
*/
|
|
156
|
-
set(input?: string | MicrioImage[] | ({
|
|
157
|
-
image: MicrioImage;
|
|
158
|
-
} & Models.Grid.GridImageOptions)[], opts?: {
|
|
159
|
-
/** If true, does not add the previous layout to the history stack. */
|
|
160
|
-
noHistory?: boolean;
|
|
161
|
-
/** If true, keeps the HTML grid element in the DOM (used internally). */
|
|
162
|
-
keepGrid?: boolean;
|
|
163
|
-
/** If true, arranges images in a single horizontal row. */
|
|
164
|
-
horizontal?: boolean;
|
|
165
|
-
/** Overrides the default animation duration for the main grid view transition. */
|
|
166
|
-
duration?: number;
|
|
167
|
-
/** If provided, animates the main grid view to this viewport rectangle. */
|
|
168
|
-
view?: Models.Camera.View;
|
|
169
|
-
/** If true, skips the main grid camera animation. */
|
|
170
|
-
noCamAni?: boolean;
|
|
171
|
-
/** If true, forces area animation even for images not currently visible. */
|
|
172
|
-
forceAreaAni?: boolean;
|
|
173
|
-
/** If true, does not unfocus the currently focused image when setting a new layout. */
|
|
174
|
-
noBlur?: boolean;
|
|
175
|
-
/** If true, skips the fade-in animation for new images. */
|
|
176
|
-
noFade?: boolean;
|
|
177
|
-
/** Specifies the transition animation type (e.g., 'crossfade', 'slide-left', 'behind-delayed'). */
|
|
178
|
-
transition?: Models.Grid.GridSetTransition;
|
|
179
|
-
/** If true, forces animation even if duration is 0. */
|
|
180
|
-
forceAni?: boolean;
|
|
181
|
-
/** If true, limits individual image views to cover their grid cell. */
|
|
182
|
-
coverLimit?: boolean;
|
|
183
|
-
/** If true, sets the initial view of images to cover their grid cell (but doesn't enforce limit). */
|
|
184
|
-
cover?: boolean;
|
|
185
|
-
/** Scale factor (0-1) applied to each grid cell (creates margins). */
|
|
186
|
-
scale?: number;
|
|
187
|
-
/** Overrides the automatic calculation of grid columns. */
|
|
188
|
-
columns?: number;
|
|
189
|
-
}): Promise<MicrioImage[]>;
|
|
190
|
-
/**
|
|
191
|
-
* Parses an individual image grid string into a GridImage object.
|
|
192
|
-
* @param s The grid string for a single image.
|
|
193
|
-
* @returns The parsed {@link Models.Grid.GridImage} object.
|
|
194
|
-
*/
|
|
195
|
-
getImage(s: string): Models.Grid.GridImage;
|
|
196
|
-
/**
|
|
197
|
-
* Converts an ImageInfo object and options back into the grid string format.
|
|
198
|
-
* @returns The grid encoded string for this image.
|
|
199
|
-
*/
|
|
200
|
-
getString: (i: Models.ImageInfo.ImageInfo, opts?: Models.Grid.GridImageOptions) => string;
|
|
201
|
-
/** Fade out unused images in the grid
|
|
202
|
-
* @param images The images to hide
|
|
203
|
-
*/
|
|
204
|
-
private removeImages;
|
|
205
|
-
/** Checks whether current viewed image is (part of) grid */
|
|
206
|
-
insideGrid(): boolean;
|
|
207
|
-
/** Reset the grid to its initial layout
|
|
208
|
-
* @param duration Duration in seconds
|
|
209
|
-
* @param noCamAni Don't do any camera animating
|
|
210
|
-
* @param forceAni Force animation on all grid images
|
|
211
|
-
* @returns Promise when the transition is complete
|
|
212
|
-
*/
|
|
213
|
-
reset(duration?: number, noCamAni?: boolean, forceAni?: boolean): Promise<MicrioImage[]>;
|
|
214
|
-
/** Fly to the viewports of any markers containing a class name
|
|
215
|
-
* @param tag The class name to match
|
|
216
|
-
* @param duration Optional duration in ms
|
|
217
|
-
* @param noZoom Don't zoom into the markers, just filter the images
|
|
218
|
-
* @returns Promise when the transition is complete
|
|
219
|
-
*/
|
|
220
|
-
flyToMarkers(tag?: string, duration?: number, noZoom?: boolean): Promise<MicrioImage[]>;
|
|
221
|
-
/** Go back one step in the grid history
|
|
222
|
-
* @param duration Optional duration for transition
|
|
223
|
-
* @returns Promise when the transition is complete
|
|
224
|
-
*/
|
|
225
|
-
back(duration?: number): Promise<void>;
|
|
226
|
-
/** Open a grid image full size and set it as the main active image
|
|
227
|
-
* @param img The image
|
|
228
|
-
* @param opts Focus options
|
|
229
|
-
* @returns Promise for when the transition completes
|
|
230
|
-
*/
|
|
231
|
-
focus(img: MicrioImage | undefined, opts?: Models.Grid.FocusOptions): Promise<void>;
|
|
232
|
-
/** Unfocusses any currently focussed image */
|
|
233
|
-
blur(): void;
|
|
234
|
-
/** Do an (external) action
|
|
235
|
-
* @param action The action type enum or string
|
|
236
|
-
* @param data Optional action data
|
|
237
|
-
* @param duration Optional action duration
|
|
238
|
-
*/
|
|
239
|
-
action(action: Enums.Grid.GridActionType | string, data?: string, duration?: number): void;
|
|
240
|
-
/** Enlarge a specific image idx of the currently shown grid
|
|
241
|
-
* @param idx The image index of the current grid
|
|
242
|
-
* @param width The image target number of columns
|
|
243
|
-
* @param height The image target number of rows
|
|
244
|
-
* @returns Promise when the transition is completed
|
|
245
|
-
*/
|
|
246
|
-
enlarge(idx: number, width: number, height?: number): Promise<MicrioImage[]>;
|
|
247
|
-
/** Get the relative in-grid viewport of the image */
|
|
248
|
-
getRelativeView(image: MicrioImage, view: Models.Camera.View): Models.Camera.View;
|
|
249
|
-
}
|
|
250
|
-
/**
|
|
251
|
-
* Loads an image texture asynchronously. Adds the request to the queue
|
|
252
|
-
* and returns a Promise that resolves with the TextureBitmap or rejects on error.
|
|
253
|
-
* @param src The URL of the image to load.
|
|
254
|
-
* @returns A Promise resolving to the loaded TextureBitmap.
|
|
255
|
-
*/
|
|
256
|
-
export const loadTexture: (src: string) => Promise<TextureBitmap>;
|
|
257
112
|
/**
|
|
258
113
|
* Represents the virtual camera used to view a {@link MicrioImage}.
|
|
259
114
|
* Provides methods for controlling the viewport (position, zoom, rotation),
|
|
@@ -810,6 +665,151 @@ declare module '@micrio/client' {
|
|
|
810
665
|
/** Fades out the image smoothly or instantly. */
|
|
811
666
|
fadeOut(direct?: boolean): void;
|
|
812
667
|
}
|
|
668
|
+
/**
|
|
669
|
+
* Micrio grid display controller
|
|
670
|
+
* @author Marcel Duin <marcel@micr.io>
|
|
671
|
+
*/
|
|
672
|
+
/**
|
|
673
|
+
* Controls the display and interaction logic for grid layouts.
|
|
674
|
+
* Instantiated on the primary {@link MicrioImage} if grid data is present.
|
|
675
|
+
* Accessed via `micrioImage.grid`.
|
|
676
|
+
*/
|
|
677
|
+
export class Grid {
|
|
678
|
+
micrio: HTMLMicrioElement;
|
|
679
|
+
image: MicrioImage;
|
|
680
|
+
/** Array of {@link MicrioImage} instances currently part of the grid definition (loaded). */
|
|
681
|
+
readonly images: MicrioImage[];
|
|
682
|
+
/** Array of {@link MicrioImage} instances currently visible in the grid layout. */
|
|
683
|
+
current: MicrioImage[];
|
|
684
|
+
/** If true, the HTML grid overlay remains visible and interactive even when an image is focused. */
|
|
685
|
+
clickable: boolean;
|
|
686
|
+
/** Writable Svelte store holding the currently focused {@link MicrioImage} instance, or undefined if in grid view. */
|
|
687
|
+
readonly focussed: Writable<MicrioImage | undefined>;
|
|
688
|
+
/** Getter for the current value of the {@link focussed} store. */
|
|
689
|
+
get $focussed(): MicrioImage | undefined;
|
|
690
|
+
/** Writable Svelte store holding an array of {@link MicrioImage} instances whose markers should be displayed in the grid view. */
|
|
691
|
+
readonly markersShown: Writable<MicrioImage[]>;
|
|
692
|
+
/** Array storing the history of grid layouts for back navigation. */
|
|
693
|
+
history: Models.Grid.GridHistory[];
|
|
694
|
+
/** Writable Svelte store indicating the current depth in the grid history stack. */
|
|
695
|
+
depth: Writable<number>;
|
|
696
|
+
/** Default animation duration (seconds) when transitioning *into* a new layout or focused view. */
|
|
697
|
+
aniDurationIn: number;
|
|
698
|
+
/** Default animation duration (seconds) when transitioning *out* of a focused view or going back in history. */
|
|
699
|
+
aniDurationOut: number;
|
|
700
|
+
/** Delay (seconds) between individual image transitions for 'delayed' effects. */
|
|
701
|
+
transitionDelay: number;
|
|
702
|
+
/**
|
|
703
|
+
* The Grid constructor. Initializes the grid based on image settings.
|
|
704
|
+
* @param micrio The main HTMLMicrioElement instance.
|
|
705
|
+
* @param image The MicrioImage instance acting as the virtual container for the grid.
|
|
706
|
+
*/
|
|
707
|
+
constructor(micrio: HTMLMicrioElement, image: MicrioImage);
|
|
708
|
+
/**
|
|
709
|
+
* Sets the grid layout based on an input string or array of image definitions.
|
|
710
|
+
* This is the main method for changing the grid's content and appearance.
|
|
711
|
+
*
|
|
712
|
+
* @param input The grid definition. Can be:
|
|
713
|
+
* - A semicolon-separated string following the format defined in `Grid.getString`.
|
|
714
|
+
* - An array of {@link MicrioImage} instances.
|
|
715
|
+
* - An array of objects `{image: MicrioImage, ...GridImageOptions}`.
|
|
716
|
+
* @param opts Options controlling the transition and layout.
|
|
717
|
+
* @returns A Promise that resolves with the array of currently displayed {@link MicrioImage} instances when the transition completes.
|
|
718
|
+
*/
|
|
719
|
+
set(input?: string | MicrioImage[] | ({
|
|
720
|
+
image: MicrioImage;
|
|
721
|
+
} & Models.Grid.GridImageOptions)[], opts?: {
|
|
722
|
+
/** If true, does not add the previous layout to the history stack. */
|
|
723
|
+
noHistory?: boolean;
|
|
724
|
+
/** If true, keeps the HTML grid element in the DOM (used internally). */
|
|
725
|
+
keepGrid?: boolean;
|
|
726
|
+
/** If true, arranges images in a single horizontal row. */
|
|
727
|
+
horizontal?: boolean;
|
|
728
|
+
/** Overrides the default animation duration for the main grid view transition. */
|
|
729
|
+
duration?: number;
|
|
730
|
+
/** If provided, animates the main grid view to this viewport rectangle. */
|
|
731
|
+
view?: Models.Camera.View;
|
|
732
|
+
/** If true, skips the main grid camera animation. */
|
|
733
|
+
noCamAni?: boolean;
|
|
734
|
+
/** If true, forces area animation even for images not currently visible. */
|
|
735
|
+
forceAreaAni?: boolean;
|
|
736
|
+
/** If true, does not unfocus the currently focused image when setting a new layout. */
|
|
737
|
+
noBlur?: boolean;
|
|
738
|
+
/** If true, skips the fade-in animation for new images. */
|
|
739
|
+
noFade?: boolean;
|
|
740
|
+
/** Specifies the transition animation type (e.g., 'crossfade', 'slide-left', 'behind-delayed'). */
|
|
741
|
+
transition?: Models.Grid.GridSetTransition;
|
|
742
|
+
/** If true, forces animation even if duration is 0. */
|
|
743
|
+
forceAni?: boolean;
|
|
744
|
+
/** If true, limits individual image views to cover their grid cell. */
|
|
745
|
+
coverLimit?: boolean;
|
|
746
|
+
/** If true, sets the initial view of images to cover their grid cell (but doesn't enforce limit). */
|
|
747
|
+
cover?: boolean;
|
|
748
|
+
/** Scale factor (0-1) applied to each grid cell (creates margins). */
|
|
749
|
+
scale?: number;
|
|
750
|
+
/** Overrides the automatic calculation of grid columns. */
|
|
751
|
+
columns?: number;
|
|
752
|
+
}): Promise<MicrioImage[]>;
|
|
753
|
+
/**
|
|
754
|
+
* Parses an individual image grid string into a GridImage object.
|
|
755
|
+
* @param s The grid string for a single image.
|
|
756
|
+
* @returns The parsed {@link Models.Grid.GridImage} object.
|
|
757
|
+
*/
|
|
758
|
+
getImage(s: string): Models.Grid.GridImage;
|
|
759
|
+
/**
|
|
760
|
+
* Converts an ImageInfo object and options back into the grid string format.
|
|
761
|
+
* @returns The grid encoded string for this image.
|
|
762
|
+
*/
|
|
763
|
+
getString: (i: Models.ImageInfo.ImageInfo, opts?: Models.Grid.GridImageOptions) => string;
|
|
764
|
+
/** Fade out unused images in the grid
|
|
765
|
+
* @param images The images to hide
|
|
766
|
+
*/
|
|
767
|
+
private removeImages;
|
|
768
|
+
/** Checks whether current viewed image is (part of) grid */
|
|
769
|
+
insideGrid(): boolean;
|
|
770
|
+
/** Reset the grid to its initial layout
|
|
771
|
+
* @param duration Duration in seconds
|
|
772
|
+
* @param noCamAni Don't do any camera animating
|
|
773
|
+
* @param forceAni Force animation on all grid images
|
|
774
|
+
* @returns Promise when the transition is complete
|
|
775
|
+
*/
|
|
776
|
+
reset(duration?: number, noCamAni?: boolean, forceAni?: boolean): Promise<MicrioImage[]>;
|
|
777
|
+
/** Fly to the viewports of any markers containing a class name
|
|
778
|
+
* @param tag The class name to match
|
|
779
|
+
* @param duration Optional duration in ms
|
|
780
|
+
* @param noZoom Don't zoom into the markers, just filter the images
|
|
781
|
+
* @returns Promise when the transition is complete
|
|
782
|
+
*/
|
|
783
|
+
flyToMarkers(tag?: string, duration?: number, noZoom?: boolean): Promise<MicrioImage[]>;
|
|
784
|
+
/** Go back one step in the grid history
|
|
785
|
+
* @param duration Optional duration for transition
|
|
786
|
+
* @returns Promise when the transition is complete
|
|
787
|
+
*/
|
|
788
|
+
back(duration?: number): Promise<void>;
|
|
789
|
+
/** Open a grid image full size and set it as the main active image
|
|
790
|
+
* @param img The image
|
|
791
|
+
* @param opts Focus options
|
|
792
|
+
* @returns Promise for when the transition completes
|
|
793
|
+
*/
|
|
794
|
+
focus(img: MicrioImage | undefined, opts?: Models.Grid.FocusOptions): Promise<void>;
|
|
795
|
+
/** Unfocusses any currently focussed image */
|
|
796
|
+
blur(): void;
|
|
797
|
+
/** Do an (external) action
|
|
798
|
+
* @param action The action type enum or string
|
|
799
|
+
* @param data Optional action data
|
|
800
|
+
* @param duration Optional action duration
|
|
801
|
+
*/
|
|
802
|
+
action(action: Enums.Grid.GridActionType | string, data?: string, duration?: number): void;
|
|
803
|
+
/** Enlarge a specific image idx of the currently shown grid
|
|
804
|
+
* @param idx The image index of the current grid
|
|
805
|
+
* @param width The image target number of columns
|
|
806
|
+
* @param height The image target number of rows
|
|
807
|
+
* @returns Promise when the transition is completed
|
|
808
|
+
*/
|
|
809
|
+
enlarge(idx: number, width: number, height?: number): Promise<MicrioImage[]>;
|
|
810
|
+
/** Get the relative in-grid viewport of the image */
|
|
811
|
+
getRelativeView(image: MicrioImage, view: Models.Camera.View): Models.Camera.View;
|
|
812
|
+
}
|
|
813
813
|
/**
|
|
814
814
|
* Video tour controller. Manages playback and camera animation for video tours
|
|
815
815
|
* defined by a timeline of view rectangles and durations.
|
|
@@ -1489,7 +1489,7 @@ declare module '@micrio/client' {
|
|
|
1489
1489
|
/** Positional audio asset */
|
|
1490
1490
|
positionalAudio?: Assets.AudioLocation;
|
|
1491
1491
|
/** Optional function that overrides all behavior */
|
|
1492
|
-
onclick?: (m:
|
|
1492
|
+
onclick?: (m: ImageData.Marker) => void;
|
|
1493
1493
|
/** Additional options */
|
|
1494
1494
|
data?: MarkerData;
|
|
1495
1495
|
};
|
|
@@ -1875,7 +1875,7 @@ declare module '@micrio/client' {
|
|
|
1875
1875
|
/** Custom icon lib */
|
|
1876
1876
|
icons?: Assets.Image[];
|
|
1877
1877
|
/** Multi-image marker tours */
|
|
1878
|
-
markerTours?:
|
|
1878
|
+
markerTours?: ImageData.MarkerTour[];
|
|
1879
1879
|
}
|
|
1880
1880
|
interface WaypointInterface {
|
|
1881
1881
|
el?: HTMLElement;
|
|
@@ -1925,7 +1925,7 @@ declare module '@micrio/client' {
|
|
|
1925
1925
|
type MarkerFocusTransition = ('crossfade' | 'slide' | 'slide-horiz' | 'slide-vert' | 'slide-up' | 'slide-down' | 'slide-right' | 'slide-left' | 'swipe' | 'swipe-horiz' | 'swipe-vert' | 'swipe-up' | 'swipe-down' | 'swipe-right' | 'swipe-left' | 'behind' | 'behind-left' | 'behind-right');
|
|
1926
1926
|
type GridSetTransition = ('crossfade' | 'behind' | 'behind-delayed' | 'appear-delayed');
|
|
1927
1927
|
/** Virtual ImageInfo extension to support grid logic */
|
|
1928
|
-
interface GridImage extends Partial<
|
|
1928
|
+
interface GridImage extends Partial<ImageInfo.ImageInfo> {
|
|
1929
1929
|
size: [number, number?];
|
|
1930
1930
|
area?: Camera.View;
|
|
1931
1931
|
view?: Camera.View;
|
|
@@ -1946,7 +1946,7 @@ declare module '@micrio/client' {
|
|
|
1946
1946
|
/** Transition duration in ms */
|
|
1947
1947
|
duration?: number;
|
|
1948
1948
|
/** Transition animation, defaults to crossfade */
|
|
1949
|
-
transition?:
|
|
1949
|
+
transition?: Grid.MarkerFocusTransition;
|
|
1950
1950
|
/** Set the target viewport immediately */
|
|
1951
1951
|
noViewAni?: boolean;
|
|
1952
1952
|
/** Animate the previously focussed image to this view during exit transition */
|
|
@@ -2036,11 +2036,11 @@ declare module '@micrio/client' {
|
|
|
2036
2036
|
namespace State {
|
|
2037
2037
|
/** Popover interface state type */
|
|
2038
2038
|
interface PopoverType {
|
|
2039
|
-
contentPage?:
|
|
2039
|
+
contentPage?: ImageData.Menu;
|
|
2040
2040
|
image?: MicrioImage;
|
|
2041
|
-
marker?:
|
|
2042
|
-
markerTour?:
|
|
2043
|
-
gallery?:
|
|
2041
|
+
marker?: ImageData.Marker;
|
|
2042
|
+
markerTour?: ImageData.MarkerTour;
|
|
2043
|
+
gallery?: Assets.Image[];
|
|
2044
2044
|
galleryStart?: string;
|
|
2045
2045
|
showLangSelect?: boolean;
|
|
2046
2046
|
}
|
|
@@ -2056,6 +2056,166 @@ declare module '@micrio/client' {
|
|
|
2056
2056
|
portrait: boolean;
|
|
2057
2057
|
}
|
|
2058
2058
|
}
|
|
2059
|
+
type MicrioEvent<T = any> = Event & {
|
|
2060
|
+
detail: T;
|
|
2061
|
+
};
|
|
2062
|
+
interface MicrioEventDetails {
|
|
2063
|
+
'show': HTMLMicrioElement;
|
|
2064
|
+
'pre-info': ImageInfo.ImageInfo;
|
|
2065
|
+
'pre-data': {
|
|
2066
|
+
[micrioId: string]: ImageData.ImageData;
|
|
2067
|
+
};
|
|
2068
|
+
'print': ImageInfo.ImageInfo;
|
|
2069
|
+
'load': MicrioImage;
|
|
2070
|
+
'lang-switch': string;
|
|
2071
|
+
'zoom': {
|
|
2072
|
+
image: MicrioImage;
|
|
2073
|
+
view: Camera.View;
|
|
2074
|
+
};
|
|
2075
|
+
'move': {
|
|
2076
|
+
image: MicrioImage;
|
|
2077
|
+
view: Camera.View;
|
|
2078
|
+
};
|
|
2079
|
+
'draw': void;
|
|
2080
|
+
'resize': DOMRect;
|
|
2081
|
+
'panstart': void;
|
|
2082
|
+
'panend': {
|
|
2083
|
+
duration: number;
|
|
2084
|
+
movedX: number;
|
|
2085
|
+
movedY: number;
|
|
2086
|
+
};
|
|
2087
|
+
'pinchstart': void;
|
|
2088
|
+
'pinchend': {
|
|
2089
|
+
duration: number;
|
|
2090
|
+
movedX: number;
|
|
2091
|
+
movedY: number;
|
|
2092
|
+
};
|
|
2093
|
+
'marker-open': ImageData.Marker;
|
|
2094
|
+
'marker-opened': ImageData.Marker;
|
|
2095
|
+
'marker-closed': ImageData.Marker;
|
|
2096
|
+
'tour-start': ImageData.Tour;
|
|
2097
|
+
'tour-stop': ImageData.Tour;
|
|
2098
|
+
'tour-minimize': ImageData.Tour;
|
|
2099
|
+
'tour-step': ImageData.MarkerTour;
|
|
2100
|
+
'serialtour-play': ImageData.MarkerTour;
|
|
2101
|
+
'serialtour-pause': ImageData.MarkerTour;
|
|
2102
|
+
'videotour-start': ImageData.VideoTour;
|
|
2103
|
+
'videotour-stop': ImageData.VideoTour;
|
|
2104
|
+
'videotour-play': void;
|
|
2105
|
+
'videotour-pause': void;
|
|
2106
|
+
'tour-ended': ImageData.VideoTour;
|
|
2107
|
+
'tour-event': ImageData.Event;
|
|
2108
|
+
'audio-init': void;
|
|
2109
|
+
'audio-mute': void;
|
|
2110
|
+
'audio-unmute': void;
|
|
2111
|
+
'autoplay-blocked': void;
|
|
2112
|
+
'media-play': void;
|
|
2113
|
+
'media-pause': void;
|
|
2114
|
+
'media-ended': void;
|
|
2115
|
+
'timeupdate': number;
|
|
2116
|
+
'page-open': ImageData.Menu;
|
|
2117
|
+
'page-closed': ImageData.Menu;
|
|
2118
|
+
'gallery-show': number;
|
|
2119
|
+
'grid-init': Grid;
|
|
2120
|
+
'grid-load': void;
|
|
2121
|
+
'grid-layout-set': Grid;
|
|
2122
|
+
'grid-focus': MicrioImage;
|
|
2123
|
+
'grid-blur': void;
|
|
2124
|
+
'splitscreen-start': MicrioImage;
|
|
2125
|
+
'splitscreen-stop': MicrioImage;
|
|
2126
|
+
'update': Array<string>;
|
|
2127
|
+
}
|
|
2128
|
+
type MicrioEventMap = {
|
|
2129
|
+
[K in keyof MicrioEventDetails]: MicrioEvent<MicrioEventDetails[K]>;
|
|
2130
|
+
};
|
|
2131
|
+
namespace Attributes {
|
|
2132
|
+
interface MicrioCustomAttributes {
|
|
2133
|
+
/** The image ID */
|
|
2134
|
+
'id'?: string;
|
|
2135
|
+
/** The data language code to use. Default: 'en' */
|
|
2136
|
+
'lang'?: string;
|
|
2137
|
+
/** For custom hosted Micrio images, specify the root URL. Default: Based on image */
|
|
2138
|
+
'data-path'?: string;
|
|
2139
|
+
/** Set this to 'cover' to start the image using the full viewport. Default: undefined */
|
|
2140
|
+
'data-inittype'?: string;
|
|
2141
|
+
/** The user cannot zoom out further than the full viewport. Default: undefined */
|
|
2142
|
+
'data-coverlimit'?: boolean;
|
|
2143
|
+
/** Only start loading the image when it's been scrolled into the user's view. Default: false */
|
|
2144
|
+
'lazyload'?: boolean;
|
|
2145
|
+
/** Do not load any metadata (markers, tours, etc). Default: false */
|
|
2146
|
+
'data-skipmeta'?: boolean;
|
|
2147
|
+
/** Simulate an <img/> element. No logo, loader bar, and no event listeners. Default: false */
|
|
2148
|
+
'data-static'?: boolean;
|
|
2149
|
+
/** Read and write deeplinks to opened tours and markers. Default: null */
|
|
2150
|
+
'data-router'?: string;
|
|
2151
|
+
/** Sending user input as GA Events to any available GTag instance (does nothing if none). Default: true */
|
|
2152
|
+
'data-gtag'?: boolean;
|
|
2153
|
+
/** Set the speed factor for camera animations. Default: 1 */
|
|
2154
|
+
'data-camspeed'?: number;
|
|
2155
|
+
/** Can pan outside the image's limits. Default: false */
|
|
2156
|
+
'data-freemove'?: boolean;
|
|
2157
|
+
/** Set the percentage (1=100%) of how far a user can zoom in. Default: 1 */
|
|
2158
|
+
'data-zoomlimit'?: number;
|
|
2159
|
+
/** Set the initial viewport rectangle of the image. Default: [0,0,1,1] */
|
|
2160
|
+
'data-view'?: number[];
|
|
2161
|
+
/** Set focus point of the image, treated as the center in case of image overflows. Default: [0.5, 0.5] */
|
|
2162
|
+
'data-focus'?: number[];
|
|
2163
|
+
/** Keep drawing frames, even if there is no movement. Default: false */
|
|
2164
|
+
'data-keeprendering'?: boolean;
|
|
2165
|
+
/** When turned off, high DPI screens will have its zoom limited to visually 100% of pixel size. Default: true */
|
|
2166
|
+
'data-normalize-dpr'?: boolean;
|
|
2167
|
+
/** No event handlers will be set up, and the image will be non-interactive. Default: true */
|
|
2168
|
+
'data-events'?: boolean;
|
|
2169
|
+
/** Use your keyboard to navigate through the image. Default: false */
|
|
2170
|
+
'data-keys'?: boolean;
|
|
2171
|
+
/** Use trackpad/touchscreen pinching for zooming. Default: true */
|
|
2172
|
+
'data-pinch-zoom'?: boolean;
|
|
2173
|
+
/** Use mousewheel/trackpad scrolling for zooming. Default: true */
|
|
2174
|
+
'data-scroll-zoom'?: boolean;
|
|
2175
|
+
/** The user must press CTRL/CMD when zooming with the mousewheel. Default: false */
|
|
2176
|
+
'data-control-zoom'?: boolean;
|
|
2177
|
+
/** Requires the user to use two fingers to pan the image on touch devices. Default: false */
|
|
2178
|
+
'data-two-finger-pan'?: boolean;
|
|
2179
|
+
/** The user cannot zoom at all. Default: true */
|
|
2180
|
+
'data-zooming'?: boolean;
|
|
2181
|
+
/** Use dragging and touch events for panning. Default: true */
|
|
2182
|
+
'data-dragging'?: boolean;
|
|
2183
|
+
/** No HTML UI elements will be printed. Default: true */
|
|
2184
|
+
'data-ui'?: boolean;
|
|
2185
|
+
/** No control buttons will be printed. Default: true */
|
|
2186
|
+
'data-controls'?: boolean;
|
|
2187
|
+
/** Show a fullscreen switching button on supported platforms. Default: true */
|
|
2188
|
+
'data-fullscreen'?: boolean;
|
|
2189
|
+
/** Show a social sharing link menu. Default: false */
|
|
2190
|
+
'data-social'?: boolean;
|
|
2191
|
+
/** The Micrio logo is displayed. Default: true */
|
|
2192
|
+
'data-logo'?: boolean;
|
|
2193
|
+
/** The optional Organisation logo (top right) will be hidden. Default: true */
|
|
2194
|
+
'data-logo-org'?: boolean;
|
|
2195
|
+
/** No top menu bar will be printed. Default: true */
|
|
2196
|
+
'data-toolbar'?: boolean;
|
|
2197
|
+
/** Show an image info panel with the title and description. Default: false */
|
|
2198
|
+
'data-show-info'?: boolean;
|
|
2199
|
+
/** An interactive minimap will be shown. Default: false */
|
|
2200
|
+
'data-minimap'?: boolean;
|
|
2201
|
+
/** The minimap will always be visible. Default: true */
|
|
2202
|
+
'data-minimap-hide'?: boolean;
|
|
2203
|
+
/** The minimap height in pixels. Default: 160 */
|
|
2204
|
+
'data-minimap-height'?: number;
|
|
2205
|
+
/** The minimap width in pixels. Default: 200 */
|
|
2206
|
+
'data-minimap-width'?: number;
|
|
2207
|
+
/** All audio will be disabled if this attribute is present. */
|
|
2208
|
+
'muted'?: boolean;
|
|
2209
|
+
/** The general sound volume for music/sfx (between 0 and 1). Default: 1 */
|
|
2210
|
+
'volume'?: number;
|
|
2211
|
+
/** Fade music to this volume while other audio plays (between 0 and 1). Default: 0 */
|
|
2212
|
+
'data-mutedvolume'?: number;
|
|
2213
|
+
/** Configuration for the grid which the viewer will use. */
|
|
2214
|
+
'data-grid'?: string;
|
|
2215
|
+
/** Toggle limited rendering mode in WebAssembly. */
|
|
2216
|
+
'data-limited'?: boolean;
|
|
2217
|
+
}
|
|
2218
|
+
}
|
|
2059
2219
|
}
|
|
2060
2220
|
/**
|
|
2061
2221
|
* Handles WebGL postprocessing effects.
|
|
@@ -2297,6 +2457,12 @@ declare module '@micrio/client' {
|
|
|
2297
2457
|
defaultSettings?: Partial<Models.ImageInfo.Settings>;
|
|
2298
2458
|
/** Holds data for the current 360 space, if applicable (loaded via `data-space` attribute or API). */
|
|
2299
2459
|
spaceData: Models.Spaces.Space | undefined;
|
|
2460
|
+
addEventListener<K extends keyof Models.MicrioEventMap>(type: K, listener: (this: HTMLMicrioElement, ev: Models.MicrioEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2461
|
+
addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMicrioElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2462
|
+
addEventListener(type: string, listener: (this: HTMLMicrioElement, ev: Event) => any, options?: boolean | AddEventListenerOptions): void;
|
|
2463
|
+
removeEventListener<K extends keyof Models.MicrioEventMap>(type: K, listener: (this: HTMLMicrioElement, ev: Models.MicrioEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2464
|
+
removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLMicrioElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
2465
|
+
removeEventListener(type: string, listener: (this: HTMLMicrioElement, ev: Event) => any, options?: boolean | EventListenerOptions): void;
|
|
2300
2466
|
/** Destroys the Micrio instance, cleans up resources, and removes event listeners. */
|
|
2301
2467
|
destroy(): void;
|
|
2302
2468
|
/**
|
|
@@ -2386,102 +2552,102 @@ declare module '@micrio/client' {
|
|
|
2386
2552
|
/** Cleans up resources when the parent Embed component is unmounted. */
|
|
2387
2553
|
unmount(): void;
|
|
2388
2554
|
}
|
|
2389
|
-
}declare module "svelte/store" {
|
|
2390
|
-
/** Callback to inform of a value updates.
|
|
2391
|
-
*/
|
|
2392
|
-
export type Subscriber<T> = (value: T) => void;
|
|
2393
|
-
/** Unsubscribes from value updates.
|
|
2394
|
-
*/
|
|
2395
|
-
export type Unsubscriber = () => void;
|
|
2396
|
-
/** Callback to update a value.
|
|
2397
|
-
*/
|
|
2398
|
-
export type Updater<T> = (value: T) => T;
|
|
2399
|
-
/** Cleanup logic callback. */
|
|
2400
|
-
type Invalidator<T> = (value?: T) => void;
|
|
2401
|
-
/** Start and stop notification callbacks.
|
|
2402
|
-
* @internal
|
|
2403
|
-
*/
|
|
2404
|
-
export type StartStopNotifier<T> = (set: Subscriber<T>) => Unsubscriber | void;
|
|
2405
|
-
/** Readable interface for subscribing. See the main SvelteStore article on how to use it in Micrio. */
|
|
2406
|
-
export interface Readable<T> {
|
|
2407
|
-
/**
|
|
2408
|
-
* Subscribe on value changes.
|
|
2409
|
-
* @param run subscription callback
|
|
2410
|
-
* @param invalidate cleanup callback
|
|
2411
|
-
*/
|
|
2412
|
-
subscribe(this: void, run: Subscriber<T>, invalidate?: Invalidator<T>): Unsubscriber;
|
|
2413
|
-
}
|
|
2414
|
-
/** Writable interface for both updating and subscribing. See the main SvelteStore article on how to use it in Micrio. */
|
|
2415
|
-
export interface Writable<T> extends Readable<T> {
|
|
2416
|
-
/**
|
|
2417
|
-
* Set value and inform subscribers.
|
|
2418
|
-
* @param value to set
|
|
2419
|
-
*/
|
|
2420
|
-
set(this: void, value: T): void;
|
|
2421
|
-
/**
|
|
2422
|
-
* Update value using callback and inform subscribers.
|
|
2423
|
-
* @param updater callback
|
|
2424
|
-
*/
|
|
2425
|
-
update(this: void, updater: Updater<T>): void;
|
|
2426
|
-
}
|
|
2427
|
-
/**
|
|
2428
|
-
* Creates a `Readable` store that allows reading by subscription.
|
|
2429
|
-
* @internal
|
|
2430
|
-
* @param value initial value
|
|
2431
|
-
* @param {StartStopNotifier}start start and stop notifications for subscriptions
|
|
2432
|
-
*/
|
|
2433
|
-
export function readable<T>(value?: T, start?: StartStopNotifier<T>): Readable<T>;
|
|
2434
|
-
/**
|
|
2435
|
-
* Create a `Writable` store that allows both updating and reading by subscription.
|
|
2436
|
-
* @internal
|
|
2437
|
-
* @param {*=}value initial value
|
|
2438
|
-
* @param {StartStopNotifier=}start start and stop notifications for subscriptions
|
|
2439
|
-
*/
|
|
2440
|
-
export function writable<T>(value?: T, start?: StartStopNotifier<T>): Writable<T>;
|
|
2441
|
-
/** One or more `Readable`s.
|
|
2442
|
-
* @internal
|
|
2443
|
-
*/
|
|
2444
|
-
type Stores = Readable<any> | [Readable<any>, ...Array<Readable<any>>] | Array<Readable<any>>;
|
|
2445
|
-
/** One or more values from `Readable` stores.
|
|
2446
|
-
* @internal
|
|
2447
|
-
*/
|
|
2448
|
-
type StoresValues<T> = T extends Readable<infer U> ? U : {
|
|
2449
|
-
[K in keyof T]: T[K] extends Readable<infer U> ? U : never;
|
|
2450
|
-
};
|
|
2451
|
-
/**
|
|
2452
|
-
* Derived value store by synchronizing one or more readable stores and
|
|
2453
|
-
* applying an aggregation function over its input values.
|
|
2454
|
-
*
|
|
2455
|
-
* @internal
|
|
2456
|
-
* @param stores - input stores
|
|
2457
|
-
* @param fn - function callback that aggregates the values
|
|
2458
|
-
* @param initial_value - when used asynchronously
|
|
2459
|
-
*/
|
|
2460
|
-
export function derived<S extends Stores, T>(stores: S, fn: (values: StoresValues<S>, set: (value: T) => void) => Unsubscriber | void, initial_value?: T): Readable<T>;
|
|
2461
|
-
/**
|
|
2462
|
-
* Derived value store by synchronizing one or more readable stores and
|
|
2463
|
-
* applying an aggregation function over its input values.
|
|
2464
|
-
*
|
|
2465
|
-
* @internal
|
|
2466
|
-
* @param stores - input stores
|
|
2467
|
-
* @param fn - function callback that aggregates the values
|
|
2468
|
-
* @param initial_value - initial value
|
|
2469
|
-
*/
|
|
2470
|
-
export function derived<S extends Stores, T>(stores: S, fn: (values: StoresValues<S>) => T, initial_value?: T): Readable<T>;
|
|
2471
|
-
/**
|
|
2472
|
-
* Derived value store by synchronizing one or more readable stores and
|
|
2473
|
-
* applying an aggregation function over its input values.
|
|
2474
|
-
*
|
|
2475
|
-
* @internal
|
|
2476
|
-
* @param stores - input stores
|
|
2477
|
-
* @param fn - function callback that aggregates the values
|
|
2478
|
-
*/
|
|
2479
|
-
export function derived<S extends Stores, T>(stores: S, fn: (values: StoresValues<S>) => T): Readable<T>;
|
|
2480
|
-
/**
|
|
2481
|
-
* Get the current value from a store by subscribing and immediately unsubscribing.
|
|
2482
|
-
* @internal
|
|
2483
|
-
* @param store readable
|
|
2484
|
-
*/
|
|
2485
|
-
export function get<T>(store: Readable<T>): T;
|
|
2486
|
-
|
|
2487
|
-
}
|
|
2555
|
+
}declare module "svelte/store" {
|
|
2556
|
+
/** Callback to inform of a value updates.
|
|
2557
|
+
*/
|
|
2558
|
+
export type Subscriber<T> = (value: T) => void;
|
|
2559
|
+
/** Unsubscribes from value updates.
|
|
2560
|
+
*/
|
|
2561
|
+
export type Unsubscriber = () => void;
|
|
2562
|
+
/** Callback to update a value.
|
|
2563
|
+
*/
|
|
2564
|
+
export type Updater<T> = (value: T) => T;
|
|
2565
|
+
/** Cleanup logic callback. */
|
|
2566
|
+
type Invalidator<T> = (value?: T) => void;
|
|
2567
|
+
/** Start and stop notification callbacks.
|
|
2568
|
+
* @internal
|
|
2569
|
+
*/
|
|
2570
|
+
export type StartStopNotifier<T> = (set: Subscriber<T>) => Unsubscriber | void;
|
|
2571
|
+
/** Readable interface for subscribing. See the main SvelteStore article on how to use it in Micrio. */
|
|
2572
|
+
export interface Readable<T> {
|
|
2573
|
+
/**
|
|
2574
|
+
* Subscribe on value changes.
|
|
2575
|
+
* @param run subscription callback
|
|
2576
|
+
* @param invalidate cleanup callback
|
|
2577
|
+
*/
|
|
2578
|
+
subscribe(this: void, run: Subscriber<T>, invalidate?: Invalidator<T>): Unsubscriber;
|
|
2579
|
+
}
|
|
2580
|
+
/** Writable interface for both updating and subscribing. See the main SvelteStore article on how to use it in Micrio. */
|
|
2581
|
+
export interface Writable<T> extends Readable<T> {
|
|
2582
|
+
/**
|
|
2583
|
+
* Set value and inform subscribers.
|
|
2584
|
+
* @param value to set
|
|
2585
|
+
*/
|
|
2586
|
+
set(this: void, value: T): void;
|
|
2587
|
+
/**
|
|
2588
|
+
* Update value using callback and inform subscribers.
|
|
2589
|
+
* @param updater callback
|
|
2590
|
+
*/
|
|
2591
|
+
update(this: void, updater: Updater<T>): void;
|
|
2592
|
+
}
|
|
2593
|
+
/**
|
|
2594
|
+
* Creates a `Readable` store that allows reading by subscription.
|
|
2595
|
+
* @internal
|
|
2596
|
+
* @param value initial value
|
|
2597
|
+
* @param {StartStopNotifier}start start and stop notifications for subscriptions
|
|
2598
|
+
*/
|
|
2599
|
+
export function readable<T>(value?: T, start?: StartStopNotifier<T>): Readable<T>;
|
|
2600
|
+
/**
|
|
2601
|
+
* Create a `Writable` store that allows both updating and reading by subscription.
|
|
2602
|
+
* @internal
|
|
2603
|
+
* @param {*=}value initial value
|
|
2604
|
+
* @param {StartStopNotifier=}start start and stop notifications for subscriptions
|
|
2605
|
+
*/
|
|
2606
|
+
export function writable<T>(value?: T, start?: StartStopNotifier<T>): Writable<T>;
|
|
2607
|
+
/** One or more `Readable`s.
|
|
2608
|
+
* @internal
|
|
2609
|
+
*/
|
|
2610
|
+
type Stores = Readable<any> | [Readable<any>, ...Array<Readable<any>>] | Array<Readable<any>>;
|
|
2611
|
+
/** One or more values from `Readable` stores.
|
|
2612
|
+
* @internal
|
|
2613
|
+
*/
|
|
2614
|
+
type StoresValues<T> = T extends Readable<infer U> ? U : {
|
|
2615
|
+
[K in keyof T]: T[K] extends Readable<infer U> ? U : never;
|
|
2616
|
+
};
|
|
2617
|
+
/**
|
|
2618
|
+
* Derived value store by synchronizing one or more readable stores and
|
|
2619
|
+
* applying an aggregation function over its input values.
|
|
2620
|
+
*
|
|
2621
|
+
* @internal
|
|
2622
|
+
* @param stores - input stores
|
|
2623
|
+
* @param fn - function callback that aggregates the values
|
|
2624
|
+
* @param initial_value - when used asynchronously
|
|
2625
|
+
*/
|
|
2626
|
+
export function derived<S extends Stores, T>(stores: S, fn: (values: StoresValues<S>, set: (value: T) => void) => Unsubscriber | void, initial_value?: T): Readable<T>;
|
|
2627
|
+
/**
|
|
2628
|
+
* Derived value store by synchronizing one or more readable stores and
|
|
2629
|
+
* applying an aggregation function over its input values.
|
|
2630
|
+
*
|
|
2631
|
+
* @internal
|
|
2632
|
+
* @param stores - input stores
|
|
2633
|
+
* @param fn - function callback that aggregates the values
|
|
2634
|
+
* @param initial_value - initial value
|
|
2635
|
+
*/
|
|
2636
|
+
export function derived<S extends Stores, T>(stores: S, fn: (values: StoresValues<S>) => T, initial_value?: T): Readable<T>;
|
|
2637
|
+
/**
|
|
2638
|
+
* Derived value store by synchronizing one or more readable stores and
|
|
2639
|
+
* applying an aggregation function over its input values.
|
|
2640
|
+
*
|
|
2641
|
+
* @internal
|
|
2642
|
+
* @param stores - input stores
|
|
2643
|
+
* @param fn - function callback that aggregates the values
|
|
2644
|
+
*/
|
|
2645
|
+
export function derived<S extends Stores, T>(stores: S, fn: (values: StoresValues<S>) => T): Readable<T>;
|
|
2646
|
+
/**
|
|
2647
|
+
* Get the current value from a store by subscribing and immediately unsubscribing.
|
|
2648
|
+
* @internal
|
|
2649
|
+
* @param store readable
|
|
2650
|
+
*/
|
|
2651
|
+
export function get<T>(store: Readable<T>): T;
|
|
2652
|
+
|
|
2653
|
+
}
|