crumb-widget 1.3.0 → 1.4.0

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/module.d.ts CHANGED
@@ -1,59 +1,22 @@
1
- export declare type Column = 'time' | 'name' | 'location' | 'address' | 'service_body';
2
-
3
- export declare interface CrumbWidgetConfig {
4
- language?: string;
5
- view?: 'list' | 'map' | 'both';
6
- columns?: Column[];
7
- geolocation?: boolean;
8
- geolocationRadius?: number;
9
- distanceOptions?: number[];
10
- distanceUnit?: 'mi' | 'km';
11
- height?: number;
12
- darkMode?: 'auto' | true | false;
13
- nowOffset?: number;
14
- hideHeader?: boolean;
15
- /** Base path for History API routing (e.g. '/meetings'). Enables clean URLs without '#'. */
16
- basePath?: string;
17
- map?: {
18
- tiles?: TilesConfig;
19
- tiles_dark?: TilesConfig;
20
- markers?: {
21
- location?: MarkerConfig;
22
- };
23
- };
24
- }
25
-
26
- declare interface MarkerConfig {
27
- html: string;
28
- width: number;
29
- height: number;
30
- }
31
-
32
- /**
33
- * Mount the Crumb Widget into the given element.
34
- *
35
- * @example
36
- * ```ts
37
- * import { mountCrumbWidget } from 'crumb-widget';
38
- *
39
- * mountCrumbWidget(document.getElementById('my-widget'), {
40
- * serverUrl: 'https://bmlt.example.org/main_server/',
41
- * serviceBodyIds: [1, 2, 3],
42
- * });
43
- * ```
44
- */
45
- export declare function mountCrumbWidget(el: HTMLElement, options: MountOptions): void;
46
-
47
- export declare interface MountOptions extends CrumbWidgetConfig {
48
- /** URL of the BMLT server (required) */
49
- serverUrl: string;
50
- /** Service body IDs to filter by (defaults to all) */
51
- serviceBodyIds?: number[];
52
- }
53
-
54
- declare interface TilesConfig {
55
- url: string;
56
- attribution: string;
57
- }
58
-
59
- export { }
1
+ import { CrumbWidgetConfig, Column } from './types';
2
+ export type { CrumbWidgetConfig, Column };
3
+ export interface MountOptions extends CrumbWidgetConfig {
4
+ /** URL of the BMLT server (required) */
5
+ serverUrl: string;
6
+ /** Service body IDs to filter by (defaults to all) */
7
+ serviceBodyIds?: number[];
8
+ }
9
+ /**
10
+ * Mount the Crumb Widget into the given element.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * import { mountCrumbWidget } from 'crumb-widget';
15
+ *
16
+ * mountCrumbWidget(document.getElementById('my-widget'), {
17
+ * serverUrl: 'https://bmlt.example.org/main_server/',
18
+ * serviceBodyIds: [1, 2, 3],
19
+ * });
20
+ * ```
21
+ */
22
+ export declare function mountCrumbWidget(el: HTMLElement, options: MountOptions): void;