@countriesdb/widget 0.1.1
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/LICENSE +26 -0
- package/README.md +202 -0
- package/dist/dom-manipulation.d.ts +29 -0
- package/dist/dom-manipulation.js +133 -0
- package/dist/event-system.d.ts +16 -0
- package/dist/event-system.js +43 -0
- package/dist/follow-logic.d.ts +20 -0
- package/dist/follow-logic.js +213 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.esm.js +863 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +1111 -0
- package/dist/index.js.map +1 -0
- package/dist/initialization.d.ts +54 -0
- package/dist/initialization.js +321 -0
- package/dist/types.d.ts +35 -0
- package/dist/types.js +4 -0
- package/package.json +62 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @countriesdb/widget
|
|
3
|
+
*
|
|
4
|
+
* Plain JavaScript widget for CountriesDB.
|
|
5
|
+
* Provides DOM manipulation and auto-initialization for country/subdivision selects.
|
|
6
|
+
*/
|
|
7
|
+
import type { WidgetOptions } from './types';
|
|
8
|
+
declare const NS_KEY = "__CountriesWidgetNS__";
|
|
9
|
+
interface WidgetNamespace {
|
|
10
|
+
initialized: boolean;
|
|
11
|
+
initPromise: Promise<boolean> | null;
|
|
12
|
+
version: number;
|
|
13
|
+
}
|
|
14
|
+
declare global {
|
|
15
|
+
interface Window {
|
|
16
|
+
[NS_KEY]: WidgetNamespace;
|
|
17
|
+
CountriesWidgetLoad: typeof CountriesWidgetLoad;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Main widget initialization function
|
|
22
|
+
*/
|
|
23
|
+
declare function CountriesWidgetLoad(options?: WidgetOptions): Promise<boolean>;
|
|
24
|
+
export default CountriesWidgetLoad;
|