@zag-js/i18n-utils 1.4.2 → 1.6.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/index.d.mts CHANGED
@@ -6,7 +6,7 @@ interface FilterReturn {
6
6
  interface FilterOptions extends Intl.CollatorOptions {
7
7
  locale?: string | undefined;
8
8
  }
9
- declare function filter(options?: FilterOptions): FilterReturn;
9
+ declare function createFilter(options?: FilterOptions): FilterReturn;
10
10
 
11
11
  interface FormatBytesOptions {
12
12
  unit?: "bit" | "byte" | undefined;
@@ -48,4 +48,4 @@ interface LocaleOptions {
48
48
  }
49
49
  declare function trackLocale(options?: LocaleOptions): () => void;
50
50
 
51
- export { type FilterOptions, type FilterReturn, type FormatBytesOptions, type Locale, type LocaleOptions, filter, formatBytes, formatDate, formatList, formatNumber, formatRelativeTime, getDefaultLocale, getLocaleDir, isRTL, trackLocale };
51
+ export { type FilterOptions, type FilterReturn, type FormatBytesOptions, type Locale, type LocaleOptions, createFilter, formatBytes, formatDate, formatList, formatNumber, formatRelativeTime, getDefaultLocale, getLocaleDir, isRTL, trackLocale };
package/dist/index.d.ts CHANGED
@@ -6,7 +6,7 @@ interface FilterReturn {
6
6
  interface FilterOptions extends Intl.CollatorOptions {
7
7
  locale?: string | undefined;
8
8
  }
9
- declare function filter(options?: FilterOptions): FilterReturn;
9
+ declare function createFilter(options?: FilterOptions): FilterReturn;
10
10
 
11
11
  interface FormatBytesOptions {
12
12
  unit?: "bit" | "byte" | undefined;
@@ -48,4 +48,4 @@ interface LocaleOptions {
48
48
  }
49
49
  declare function trackLocale(options?: LocaleOptions): () => void;
50
50
 
51
- export { type FilterOptions, type FilterReturn, type FormatBytesOptions, type Locale, type LocaleOptions, filter, formatBytes, formatDate, formatList, formatNumber, formatRelativeTime, getDefaultLocale, getLocaleDir, isRTL, trackLocale };
51
+ export { type FilterOptions, type FilterReturn, type FormatBytesOptions, type Locale, type LocaleOptions, createFilter, formatBytes, formatDate, formatList, formatNumber, formatRelativeTime, getDefaultLocale, getLocaleDir, isRTL, trackLocale };
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ function i18nCache(Ins) {
18
18
 
19
19
  // src/filter.ts
20
20
  var collatorCache = i18nCache(Intl.Collator);
21
- function filter(options) {
21
+ function createFilter(options) {
22
22
  const { locale, ...rest } = options || {};
23
23
  const collator = collatorCache(locale || "en-US", { usage: "search", ...rest });
24
24
  function normalize(string) {
@@ -435,7 +435,7 @@ function trackLocale(options = {}) {
435
435
  };
436
436
  }
437
437
 
438
- exports.filter = filter;
438
+ exports.createFilter = createFilter;
439
439
  exports.formatBytes = formatBytes;
440
440
  exports.formatDate = formatDate;
441
441
  exports.formatList = formatList;
package/dist/index.mjs CHANGED
@@ -16,7 +16,7 @@ function i18nCache(Ins) {
16
16
 
17
17
  // src/filter.ts
18
18
  var collatorCache = i18nCache(Intl.Collator);
19
- function filter(options) {
19
+ function createFilter(options) {
20
20
  const { locale, ...rest } = options || {};
21
21
  const collator = collatorCache(locale || "en-US", { usage: "search", ...rest });
22
22
  function normalize(string) {
@@ -433,4 +433,4 @@ function trackLocale(options = {}) {
433
433
  };
434
434
  }
435
435
 
436
- export { filter, formatBytes, formatDate, formatList, formatNumber, formatRelativeTime, getDefaultLocale, getLocaleDir, isRTL, trackLocale };
436
+ export { createFilter, formatBytes, formatDate, formatList, formatNumber, formatRelativeTime, getDefaultLocale, getLocaleDir, isRTL, trackLocale };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zag-js/i18n-utils",
3
- "version": "1.4.2",
3
+ "version": "1.6.0",
4
4
  "description": "Interationalization utilities for Zag.js",
5
5
  "keywords": [
6
6
  "js",
@@ -24,7 +24,7 @@
24
24
  },
25
25
  "clean-package": "../../../clean-package.config.json",
26
26
  "dependencies": {
27
- "@zag-js/dom-query": "1.4.2"
27
+ "@zag-js/dom-query": "1.6.0"
28
28
  },
29
29
  "devDependencies": {
30
30
  "clean-package": "2.2.0",