device-passport 1.0.0 → 1.1.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/CHANGELOG.md +30 -0
- package/README.md +69 -2
- package/dist/adapters/index.cjs +19 -0
- package/dist/adapters/index.d.cts +156 -0
- package/dist/adapters/index.d.mts +156 -0
- package/dist/adapters/index.d.ts +156 -0
- package/dist/adapters/index.mjs +3 -0
- package/dist/evaluator/index.cjs +702 -0
- package/dist/evaluator/index.d.cts +204 -0
- package/dist/evaluator/index.d.mts +204 -0
- package/dist/evaluator/index.d.ts +204 -0
- package/dist/evaluator/index.mjs +680 -0
- package/dist/geo/index.cjs +50 -0
- package/dist/geo/index.d.cts +209 -0
- package/dist/geo/index.d.mts +209 -0
- package/dist/geo/index.d.ts +209 -0
- package/dist/geo/index.mjs +18 -0
- package/dist/index.cjs +113 -3543
- package/dist/index.d.cts +45 -903
- package/dist/index.d.mts +45 -903
- package/dist/index.d.ts +45 -903
- package/dist/index.mjs +11 -3438
- package/dist/shared/device-passport.BBf9OKap.mjs +1237 -0
- package/dist/shared/device-passport.BPd2-w8e.cjs +1265 -0
- package/dist/shared/device-passport.CLaBZWUV.cjs +1569 -0
- package/dist/shared/device-passport.C_F1vBE8.d.cts +79 -0
- package/dist/shared/device-passport.C_F1vBE8.d.mts +79 -0
- package/dist/shared/device-passport.C_F1vBE8.d.ts +79 -0
- package/dist/shared/device-passport.Cjxlv8xI.cjs +245 -0
- package/dist/shared/device-passport.CyQtcZeD.mjs +237 -0
- package/dist/shared/device-passport.NHw_f6HT.mjs +1535 -0
- package/dist/storage/index.cjs +10 -0
- package/dist/storage/index.d.cts +128 -0
- package/dist/storage/index.d.mts +128 -0
- package/dist/storage/index.d.ts +128 -0
- package/dist/storage/index.mjs +3 -0
- package/dist/types/index.cjs +2 -0
- package/dist/types/index.d.cts +215 -0
- package/dist/types/index.d.mts +215 -0
- package/dist/types/index.d.ts +215 -0
- package/dist/types/index.mjs +1 -0
- package/package.json +27 -2
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { C as COUNTRY_LOCALES, T as TIMEZONE_TO_COUNTRY, h as hasCountryConfig, e as extractCountryFromProxyUrl, a as alignGeoContext, t as toLocaleProfile } from '../shared/device-passport.BBf9OKap.mjs';
|
|
2
|
+
export { A as ALPHA3_TO_ALPHA2, b as COUNTRY_NAME_TO_CODE, D as DEFAULT_ACCEPT_LANGUAGE, c as DEFAULT_COUNTRY, d as DEFAULT_LOCALE, f as DEFAULT_TIMEZONE, g as detectCountry, i as formatAcceptLanguage, j as getAllSupportedCountries, k as getCountryConfig, l as getCountryForTimezone, m as getDefaultTimezoneForCountry, n as getTimezoneOffsetMinutes, o as getTimezonesForCountry, p as isGeoAligned, q as isTimezoneAlignedWithCountry, r as isValidTimezone, s as listAllTimezones, u as normalizeCountryCode, v as parseAcceptLanguage, w as toGeoLocation } from '../shared/device-passport.BBf9OKap.mjs';
|
|
3
|
+
|
|
4
|
+
const GEO_LOCALES = COUNTRY_LOCALES;
|
|
5
|
+
const TIMEZONE_MATRIX = TIMEZONE_TO_COUNTRY;
|
|
6
|
+
const isValidCountryCode = hasCountryConfig;
|
|
7
|
+
function detectGeoFromUrl(url) {
|
|
8
|
+
return extractCountryFromProxyUrl(url);
|
|
9
|
+
}
|
|
10
|
+
function getLocaleProfile(countryCode, timezone) {
|
|
11
|
+
const geo = alignGeoContext({
|
|
12
|
+
country: countryCode || void 0,
|
|
13
|
+
timezone
|
|
14
|
+
});
|
|
15
|
+
return toLocaleProfile(geo);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export { COUNTRY_LOCALES, GEO_LOCALES, TIMEZONE_MATRIX, TIMEZONE_TO_COUNTRY, alignGeoContext, detectGeoFromUrl, extractCountryFromProxyUrl, getLocaleProfile, hasCountryConfig, isValidCountryCode, toLocaleProfile };
|