@intlayer/core 8.5.1 → 8.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.
Files changed (113) hide show
  1. package/dist/cjs/formatters/compact.cjs +1 -1
  2. package/dist/cjs/formatters/compact.cjs.map +1 -1
  3. package/dist/cjs/formatters/currency.cjs +1 -1
  4. package/dist/cjs/formatters/currency.cjs.map +1 -1
  5. package/dist/cjs/formatters/date.cjs +1 -1
  6. package/dist/cjs/formatters/date.cjs.map +1 -1
  7. package/dist/cjs/formatters/index.cjs +1 -1
  8. package/dist/cjs/formatters/list.cjs +1 -1
  9. package/dist/cjs/formatters/list.cjs.map +1 -1
  10. package/dist/cjs/formatters/number.cjs +1 -1
  11. package/dist/cjs/formatters/number.cjs.map +1 -1
  12. package/dist/cjs/formatters/percentage.cjs +2 -2
  13. package/dist/cjs/formatters/percentage.cjs.map +1 -1
  14. package/dist/cjs/formatters/relativeTime.cjs +1 -1
  15. package/dist/cjs/formatters/relativeTime.cjs.map +1 -1
  16. package/dist/cjs/formatters/units.cjs +1 -1
  17. package/dist/cjs/formatters/units.cjs.map +1 -1
  18. package/dist/cjs/index.cjs +16 -9
  19. package/dist/cjs/interpreter/getContent/getContent.cjs +8 -8
  20. package/dist/cjs/interpreter/getContent/getContent.cjs.map +1 -1
  21. package/dist/cjs/interpreter/splitAndJoinInsertion.cjs +10 -35
  22. package/dist/cjs/interpreter/splitAndJoinInsertion.cjs.map +1 -1
  23. package/dist/cjs/localization/generateSitemap.cjs +111 -0
  24. package/dist/cjs/localization/generateSitemap.cjs.map +1 -0
  25. package/dist/cjs/localization/getBrowserLocale.cjs +1 -1
  26. package/dist/cjs/localization/getBrowserLocale.cjs.map +1 -1
  27. package/dist/cjs/localization/getLocale.cjs +2 -2
  28. package/dist/cjs/localization/getLocale.cjs.map +1 -1
  29. package/dist/cjs/localization/getLocalizedUrl.cjs +1 -1
  30. package/dist/cjs/localization/getPrefix.cjs +1 -1
  31. package/dist/cjs/localization/index.cjs +8 -7
  32. package/dist/cjs/localization/localeMapper.cjs +1 -1
  33. package/dist/cjs/transpiler/html/getHTMLCustomComponents.cjs +2 -3
  34. package/dist/cjs/transpiler/html/getHTMLCustomComponents.cjs.map +1 -1
  35. package/dist/cjs/utils/index.cjs +9 -3
  36. package/dist/cjs/utils/intl.cjs +88 -72
  37. package/dist/cjs/utils/intl.cjs.map +1 -1
  38. package/dist/cjs/utils/localeStorage.cjs +191 -64
  39. package/dist/cjs/utils/localeStorage.cjs.map +1 -1
  40. package/dist/esm/formatters/compact.mjs +2 -2
  41. package/dist/esm/formatters/compact.mjs.map +1 -1
  42. package/dist/esm/formatters/currency.mjs +2 -2
  43. package/dist/esm/formatters/currency.mjs.map +1 -1
  44. package/dist/esm/formatters/date.mjs +2 -2
  45. package/dist/esm/formatters/date.mjs.map +1 -1
  46. package/dist/esm/formatters/index.mjs +2 -2
  47. package/dist/esm/formatters/list.mjs +2 -2
  48. package/dist/esm/formatters/list.mjs.map +1 -1
  49. package/dist/esm/formatters/number.mjs +2 -2
  50. package/dist/esm/formatters/number.mjs.map +1 -1
  51. package/dist/esm/formatters/percentage.mjs +3 -3
  52. package/dist/esm/formatters/percentage.mjs.map +1 -1
  53. package/dist/esm/formatters/relativeTime.mjs +2 -2
  54. package/dist/esm/formatters/relativeTime.mjs.map +1 -1
  55. package/dist/esm/formatters/units.mjs +2 -2
  56. package/dist/esm/formatters/units.mjs.map +1 -1
  57. package/dist/esm/index.mjs +10 -10
  58. package/dist/esm/interpreter/getContent/getContent.mjs +8 -8
  59. package/dist/esm/interpreter/getContent/getContent.mjs.map +1 -1
  60. package/dist/esm/interpreter/splitAndJoinInsertion.mjs +10 -35
  61. package/dist/esm/interpreter/splitAndJoinInsertion.mjs.map +1 -1
  62. package/dist/esm/localization/generateSitemap.mjs +109 -0
  63. package/dist/esm/localization/generateSitemap.mjs.map +1 -0
  64. package/dist/esm/localization/getBrowserLocale.mjs +2 -2
  65. package/dist/esm/localization/getBrowserLocale.mjs.map +1 -1
  66. package/dist/esm/localization/getLocale.mjs +3 -3
  67. package/dist/esm/localization/getLocale.mjs.map +1 -1
  68. package/dist/esm/localization/getLocalizedUrl.mjs +1 -1
  69. package/dist/esm/localization/getPrefix.mjs +1 -1
  70. package/dist/esm/localization/index.mjs +7 -7
  71. package/dist/esm/localization/localeMapper.mjs +1 -1
  72. package/dist/esm/transpiler/html/getHTMLCustomComponents.mjs +2 -4
  73. package/dist/esm/transpiler/html/getHTMLCustomComponents.mjs.map +1 -1
  74. package/dist/esm/utils/index.mjs +4 -4
  75. package/dist/esm/utils/intl.mjs +87 -72
  76. package/dist/esm/utils/intl.mjs.map +1 -1
  77. package/dist/esm/utils/localeStorage.mjs +186 -65
  78. package/dist/esm/utils/localeStorage.mjs.map +1 -1
  79. package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts +10 -10
  80. package/dist/types/deepTransformPlugins/getFilterMissingTranslationsContent.d.ts.map +1 -1
  81. package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts +10 -10
  82. package/dist/types/deepTransformPlugins/getFilterTranslationsOnlyContent.d.ts.map +1 -1
  83. package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts +10 -10
  84. package/dist/types/deepTransformPlugins/getFilteredLocalesContent.d.ts.map +1 -1
  85. package/dist/types/dictionaryManipulator/orderDictionaries.d.ts +2 -2
  86. package/dist/types/dictionaryManipulator/orderDictionaries.d.ts.map +1 -1
  87. package/dist/types/formatters/index.d.ts +2 -2
  88. package/dist/types/formatters/number.d.ts +4 -1
  89. package/dist/types/formatters/number.d.ts.map +1 -1
  90. package/dist/types/formatters/percentage.d.ts +4 -1
  91. package/dist/types/formatters/percentage.d.ts.map +1 -1
  92. package/dist/types/index.d.ts +4 -4
  93. package/dist/types/interpreter/getContent/getContent.d.ts.map +1 -1
  94. package/dist/types/interpreter/splitAndJoinInsertion.d.ts +0 -17
  95. package/dist/types/interpreter/splitAndJoinInsertion.d.ts.map +1 -1
  96. package/dist/types/localization/generateSitemap.d.ts +93 -0
  97. package/dist/types/localization/generateSitemap.d.ts.map +1 -0
  98. package/dist/types/localization/getBrowserLocale.d.ts +2 -2
  99. package/dist/types/localization/getBrowserLocale.d.ts.map +1 -1
  100. package/dist/types/localization/index.d.ts +2 -2
  101. package/dist/types/transpiler/html/getHTMLCustomComponents.d.ts.map +1 -1
  102. package/dist/types/utils/index.d.ts +3 -3
  103. package/dist/types/utils/intl.d.ts +15 -11
  104. package/dist/types/utils/intl.d.ts.map +1 -1
  105. package/dist/types/utils/localeStorage.d.ts +85 -68
  106. package/dist/types/utils/localeStorage.d.ts.map +1 -1
  107. package/package.json +8 -8
  108. package/dist/cjs/getStorageAttributes.cjs +0 -135
  109. package/dist/cjs/getStorageAttributes.cjs.map +0 -1
  110. package/dist/esm/getStorageAttributes.mjs +0 -133
  111. package/dist/esm/getStorageAttributes.mjs.map +0 -1
  112. package/dist/types/getStorageAttributes.d.ts +0 -29
  113. package/dist/types/getStorageAttributes.d.ts.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { NodeProps, Plugins } from "../interpreter/getContent/plugins.js";
2
- import * as _intlayer_types_dictionary0 from "@intlayer/types/dictionary";
2
+ import * as _$_intlayer_types_dictionary0 from "@intlayer/types/dictionary";
3
3
  import { ContentNode, Dictionary } from "@intlayer/types/dictionary";
4
4
  import { DeclaredLocales, LocalesValues } from "@intlayer/types/module_augmentation";
5
5
 
@@ -24,12 +24,12 @@ declare const getFilterMissingTranslationsContent: <T extends ContentNode, L ext
24
24
  declare const getFilterMissingTranslationsDictionary: (dictionary: Dictionary, localeToCheck: LocalesValues) => {
25
25
  content: any;
26
26
  $schema?: "https://intlayer.org/schema.json";
27
- id?: _intlayer_types_dictionary0.DictionaryId;
27
+ id?: _$_intlayer_types_dictionary0.DictionaryId;
28
28
  projectIds?: string[];
29
- localId?: _intlayer_types_dictionary0.LocalDictionaryId;
30
- localIds?: _intlayer_types_dictionary0.LocalDictionaryId[];
31
- format?: _intlayer_types_dictionary0.DictionaryFormat;
32
- key: _intlayer_types_dictionary0.DictionaryKey;
29
+ localId?: _$_intlayer_types_dictionary0.LocalDictionaryId;
30
+ localIds?: _$_intlayer_types_dictionary0.LocalDictionaryId[];
31
+ format?: _$_intlayer_types_dictionary0.DictionaryFormat;
32
+ key: _$_intlayer_types_dictionary0.DictionaryKey;
33
33
  title?: string;
34
34
  description?: string;
35
35
  versions?: string[];
@@ -37,12 +37,12 @@ declare const getFilterMissingTranslationsDictionary: (dictionary: Dictionary, l
37
37
  filePath?: string;
38
38
  tags?: string[];
39
39
  locale?: LocalesValues;
40
- contentAutoTransformation?: _intlayer_types_dictionary0.ContentAutoTransformation;
41
- fill?: _intlayer_types_dictionary0.Fill;
40
+ contentAutoTransformation?: _$_intlayer_types_dictionary0.ContentAutoTransformation;
41
+ fill?: _$_intlayer_types_dictionary0.Fill;
42
42
  filled?: true;
43
43
  priority?: number;
44
- importMode?: _intlayer_types_dictionary0.ImportMode;
45
- location?: _intlayer_types_dictionary0.DictionaryLocation;
44
+ importMode?: _$_intlayer_types_dictionary0.ImportMode;
45
+ location?: _$_intlayer_types_dictionary0.DictionaryLocation;
46
46
  schema: undefined;
47
47
  };
48
48
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"getFilterMissingTranslationsContent.d.ts","names":[],"sources":["../../../src/deepTransformPlugins/getFilterMissingTranslationsContent.ts"],"mappings":";;;;;;;cAoMa,mCAAA,GACX,aAAA,EAAe,aAAA,KACd,OAAA;;;AAFH;;;;;;;;;AA8LA;;;cAAa,mCAAA,aACD,WAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,IAAA,EAAM,CAAA,EACN,aAAA,EAAe,CAAA,EACf,SAAA,EAAW,SAAA;AAAA,cAoBA,sCAAA,GACX,UAAA,EAAY,UAAA,EACZ,aAAA,EAAe,aAAA;;;OAAa,2BAAA,CAAA,YAAA"}
1
+ {"version":3,"file":"getFilterMissingTranslationsContent.d.ts","names":[],"sources":["../../../src/deepTransformPlugins/getFilterMissingTranslationsContent.ts"],"mappings":";;;;;;;cAoMa,mCAAA,GACX,aAAA,EAAe,aAAA,KACd,OAAA;;;AAFH;;;;;;;;;AA8LA;;;cAAa,mCAAA,aACD,WAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,IAAA,EAAM,CAAA,EACN,aAAA,EAAe,CAAA,EACf,SAAA,EAAW,SAAA;AAAA,cAoBA,sCAAA,GACX,UAAA,EAAY,UAAA,EACZ,aAAA,EAAe,aAAA;;;OAAa,6BAAA,CAAA,YAAA"}
@@ -1,5 +1,5 @@
1
1
  import { DeepTransformContent, NodeProps, Plugins } from "../interpreter/getContent/plugins.js";
2
- import * as _intlayer_types_dictionary0 from "@intlayer/types/dictionary";
2
+ import * as _$_intlayer_types_dictionary0 from "@intlayer/types/dictionary";
3
3
  import { ContentNode, Dictionary } from "@intlayer/types/dictionary";
4
4
  import { DeclaredLocales, LocalesValues } from "@intlayer/types/module_augmentation";
5
5
 
@@ -16,12 +16,12 @@ declare const getFilterTranslationsOnlyContent: <T extends ContentNode, L extend
16
16
  declare const getFilterTranslationsOnlyDictionary: (dictionary: Dictionary, locale?: LocalesValues, fallback?: LocalesValues) => {
17
17
  content: any;
18
18
  $schema?: "https://intlayer.org/schema.json";
19
- id?: _intlayer_types_dictionary0.DictionaryId;
19
+ id?: _$_intlayer_types_dictionary0.DictionaryId;
20
20
  projectIds?: string[];
21
- localId?: _intlayer_types_dictionary0.LocalDictionaryId;
22
- localIds?: _intlayer_types_dictionary0.LocalDictionaryId[];
23
- format?: _intlayer_types_dictionary0.DictionaryFormat;
24
- key: _intlayer_types_dictionary0.DictionaryKey;
21
+ localId?: _$_intlayer_types_dictionary0.LocalDictionaryId;
22
+ localIds?: _$_intlayer_types_dictionary0.LocalDictionaryId[];
23
+ format?: _$_intlayer_types_dictionary0.DictionaryFormat;
24
+ key: _$_intlayer_types_dictionary0.DictionaryKey;
25
25
  title?: string;
26
26
  description?: string;
27
27
  versions?: string[];
@@ -29,12 +29,12 @@ declare const getFilterTranslationsOnlyDictionary: (dictionary: Dictionary, loca
29
29
  filePath?: string;
30
30
  tags?: string[];
31
31
  locale?: LocalesValues;
32
- contentAutoTransformation?: _intlayer_types_dictionary0.ContentAutoTransformation;
33
- fill?: _intlayer_types_dictionary0.Fill;
32
+ contentAutoTransformation?: _$_intlayer_types_dictionary0.ContentAutoTransformation;
33
+ fill?: _$_intlayer_types_dictionary0.Fill;
34
34
  filled?: true;
35
35
  priority?: number;
36
- importMode?: _intlayer_types_dictionary0.ImportMode;
37
- location?: _intlayer_types_dictionary0.DictionaryLocation;
36
+ importMode?: _$_intlayer_types_dictionary0.ImportMode;
37
+ location?: _$_intlayer_types_dictionary0.DictionaryLocation;
38
38
  schema: undefined;
39
39
  };
40
40
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"getFilterTranslationsOnlyContent.d.ts","names":[],"sources":["../../../src/deepTransformPlugins/getFilterTranslationsOnlyContent.ts"],"mappings":";;;;;;;cAqCa,4BAAA,GACX,MAAA,EAAQ,aAAA,EACR,QAAA,GAAW,aAAA,KACV,OAAA;;;AAHH;;;;cAuFa,gCAAA,aACD,WAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,IAAA,EAAM,CAAA,EACN,MAAA,EAAQ,CAAA,EACR,SAAA,EAAW,SAAA,EACX,QAAA,GAAW,aAAA,KAUL,oBAAA,CAAqB,CAAA;AAAA,cAGhB,mCAAA,GACX,UAAA,EAAY,UAAA,EACZ,MAAA,GAAQ,aAAA,EAER,QAAA,GAAW,aAAA;;;OAAa,2BAAA,CAAA,YAAA"}
1
+ {"version":3,"file":"getFilterTranslationsOnlyContent.d.ts","names":[],"sources":["../../../src/deepTransformPlugins/getFilterTranslationsOnlyContent.ts"],"mappings":";;;;;;;cAqCa,4BAAA,GACX,MAAA,EAAQ,aAAA,EACR,QAAA,GAAW,aAAA,KACV,OAAA;;;AAHH;;;;cAuFa,gCAAA,aACD,WAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,IAAA,EAAM,CAAA,EACN,MAAA,EAAQ,CAAA,EACR,SAAA,EAAW,SAAA,EACX,QAAA,GAAW,aAAA,KAUL,oBAAA,CAAqB,CAAA;AAAA,cAGhB,mCAAA,GACX,UAAA,EAAY,UAAA,EACZ,MAAA,GAAQ,aAAA,EAER,QAAA,GAAW,aAAA;;;OAAa,6BAAA,CAAA,YAAA"}
@@ -1,5 +1,5 @@
1
1
  import { NodeProps } from "../interpreter/getContent/plugins.js";
2
- import * as _intlayer_types_dictionary0 from "@intlayer/types/dictionary";
2
+ import * as _$_intlayer_types_dictionary0 from "@intlayer/types/dictionary";
3
3
  import { ContentNode, Dictionary } from "@intlayer/types/dictionary";
4
4
  import { LocalesValues } from "@intlayer/types/module_augmentation";
5
5
 
@@ -8,12 +8,12 @@ declare const getFilteredLocalesContent: (node: ContentNode, locales: LocalesVal
8
8
  declare const getFilteredLocalesDictionary: (dictionary: Dictionary, locale: LocalesValues | LocalesValues[]) => {
9
9
  content: any;
10
10
  $schema?: "https://intlayer.org/schema.json";
11
- id?: _intlayer_types_dictionary0.DictionaryId;
11
+ id?: _$_intlayer_types_dictionary0.DictionaryId;
12
12
  projectIds?: string[];
13
- localId?: _intlayer_types_dictionary0.LocalDictionaryId;
14
- localIds?: _intlayer_types_dictionary0.LocalDictionaryId[];
15
- format?: _intlayer_types_dictionary0.DictionaryFormat;
16
- key: _intlayer_types_dictionary0.DictionaryKey;
13
+ localId?: _$_intlayer_types_dictionary0.LocalDictionaryId;
14
+ localIds?: _$_intlayer_types_dictionary0.LocalDictionaryId[];
15
+ format?: _$_intlayer_types_dictionary0.DictionaryFormat;
16
+ key: _$_intlayer_types_dictionary0.DictionaryKey;
17
17
  title?: string;
18
18
  description?: string;
19
19
  versions?: string[];
@@ -21,12 +21,12 @@ declare const getFilteredLocalesDictionary: (dictionary: Dictionary, locale: Loc
21
21
  filePath?: string;
22
22
  tags?: string[];
23
23
  locale?: LocalesValues;
24
- contentAutoTransformation?: _intlayer_types_dictionary0.ContentAutoTransformation;
25
- fill?: _intlayer_types_dictionary0.Fill;
24
+ contentAutoTransformation?: _$_intlayer_types_dictionary0.ContentAutoTransformation;
25
+ fill?: _$_intlayer_types_dictionary0.Fill;
26
26
  filled?: true;
27
27
  priority?: number;
28
- importMode?: _intlayer_types_dictionary0.ImportMode;
29
- location?: _intlayer_types_dictionary0.DictionaryLocation;
28
+ importMode?: _$_intlayer_types_dictionary0.ImportMode;
29
+ location?: _$_intlayer_types_dictionary0.DictionaryLocation;
30
30
  schema: undefined;
31
31
  };
32
32
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"getFilteredLocalesContent.d.ts","names":[],"sources":["../../../src/deepTransformPlugins/getFilteredLocalesContent.ts"],"mappings":";;;;;;cAuCa,yBAAA,GACX,IAAA,EAAM,WAAA,EACN,OAAA,EAAS,aAAA,GAAgB,aAAA,IACzB,SAAA,EAAW,SAAA;AAAA,cAwBA,4BAAA,GACX,UAAA,EAAY,UAAA,EACZ,MAAA,EAAQ,aAAA,GAAgB,aAAA;;;OAAa,2BAAA,CAAA,YAAA"}
1
+ {"version":3,"file":"getFilteredLocalesContent.d.ts","names":[],"sources":["../../../src/deepTransformPlugins/getFilteredLocalesContent.ts"],"mappings":";;;;;;cAuCa,yBAAA,GACX,IAAA,EAAM,WAAA,EACN,OAAA,EAAS,aAAA,GAAgB,aAAA,IACzB,SAAA,EAAW,SAAA;AAAA,cAwBA,4BAAA,GACX,UAAA,EAAY,UAAA,EACZ,MAAA,EAAQ,aAAA,GAAgB,aAAA;;;OAAa,6BAAA,CAAA,YAAA"}
@@ -1,5 +1,5 @@
1
1
  import { Dictionary } from "@intlayer/types/dictionary";
2
- import * as _intlayer_types_config0 from "@intlayer/types/config";
2
+ import * as _$_intlayer_types_config0 from "@intlayer/types/config";
3
3
 
4
4
  //#region src/dictionaryManipulator/orderDictionaries.d.ts
5
5
  /**
@@ -9,7 +9,7 @@ import * as _intlayer_types_config0 from "@intlayer/types/config";
9
9
  * @param priorityStrategy - The priority strategy ('local_first' or 'distant_first')
10
10
  * @returns Ordered array of dictionaries
11
11
  */
12
- declare const orderDictionaries: (dictionaries: Dictionary[], configuration?: _intlayer_types_config0.IntlayerConfig) => Dictionary[];
12
+ declare const orderDictionaries: (dictionaries: Dictionary[], configuration?: _$_intlayer_types_config0.IntlayerConfig) => Dictionary[];
13
13
  //#endregion
14
14
  export { orderDictionaries };
15
15
  //# sourceMappingURL=orderDictionaries.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"orderDictionaries.d.ts","names":[],"sources":["../../../src/dictionaryManipulator/orderDictionaries.ts"],"mappings":";;;;;;;AAUA;;;;cAAa,iBAAA,GACX,YAAA,EAAc,UAAA,IACd,aAAA,GADwB,uBAAA,CACxB,cAAA,KACC,UAAA"}
1
+ {"version":3,"file":"orderDictionaries.d.ts","names":[],"sources":["../../../src/dictionaryManipulator/orderDictionaries.ts"],"mappings":";;;;;;;AAUA;;;;cAAa,iBAAA,GACX,YAAA,EAAc,UAAA,IACd,aAAA,GADwB,yBAAA,CACxB,cAAA,KACC,UAAA"}
@@ -1,10 +1,10 @@
1
1
  import { compact } from "./compact.js";
2
2
  import { currency } from "./currency.js";
3
3
  import { DateTimePreset, date, presets } from "./date.js";
4
- import { CachedIntl, WrappedIntl, bindIntl, createCachedIntl } from "../utils/intl.js";
4
+ import { CachedIntl, WrappedIntl, bindIntl, getCachedIntl } from "../utils/intl.js";
5
5
  import { list } from "./list.js";
6
6
  import { number } from "./number.js";
7
7
  import { percentage } from "./percentage.js";
8
8
  import { relativeTime } from "./relativeTime.js";
9
9
  import { units } from "./units.js";
10
- export { CachedIntl, CachedIntl as Intl, DateTimePreset, WrappedIntl, bindIntl, compact, createCachedIntl, currency, date, list, number, percentage, presets, relativeTime, units };
10
+ export { CachedIntl, CachedIntl as Intl, DateTimePreset, WrappedIntl, bindIntl, compact, currency, date, getCachedIntl, list, number, percentage, presets, relativeTime, units };
@@ -10,7 +10,10 @@ import { LocalesValues } from "@intlayer/types/module_augmentation";
10
10
  * @example
11
11
  * number("1000000", { locale: Locales.FRENCH }); // "1 000 000"
12
12
  */
13
- declare const number: (value: string | number, options?: Intl.NumberFormatOptions & {
13
+ declare const number: (value: string | number, {
14
+ locale,
15
+ ...options
16
+ }?: Intl.NumberFormatOptions & {
14
17
  locale?: LocalesValues;
15
18
  }) => string;
16
19
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"number.d.ts","names":[],"sources":["../../../src/formatters/number.ts"],"mappings":";;;;;AAaA;;;;;;;cAAa,MAAA,GACX,KAAA,mBACA,OAAA,GAAU,IAAA,CAAK,mBAAA;EAAwB,MAAA,GAAS,aAAA;AAAA"}
1
+ {"version":3,"file":"number.d.ts","names":[],"sources":["../../../src/formatters/number.ts"],"mappings":";;;;;AAaA;;;;;;;cAAa,MAAA,GACX,KAAA;EACA,MAAA;EAAA,GAAA;AAAA,IAGG,IAAA,CAAK,mBAAA;EAAwB,MAAA,GAAS,aAAA;AAAA"}
@@ -10,7 +10,10 @@ import { LocalesValues } from "@intlayer/types/module_augmentation";
10
10
  * @example
11
11
  * percentage(0.25, { minimumFractionDigits: 2 }); // "25.00%"
12
12
  */
13
- declare const percentage: (value: string | number, options?: Intl.NumberFormatOptions & {
13
+ declare const percentage: (value: string | number, {
14
+ locale,
15
+ ...options
16
+ }?: Intl.NumberFormatOptions & {
14
17
  locale?: LocalesValues;
15
18
  }) => string;
16
19
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"percentage.d.ts","names":[],"sources":["../../../src/formatters/percentage.ts"],"mappings":";;;;;AAaA;;;;;;;cAAa,UAAA,GACX,KAAA,mBACA,OAAA,GAAU,IAAA,CAAK,mBAAA;EAAwB,MAAA,GAAS,aAAA;AAAA"}
1
+ {"version":3,"file":"percentage.d.ts","names":[],"sources":["../../../src/formatters/percentage.ts"],"mappings":";;;;;AAaA;;;;;;;cAAa,UAAA,GACX,KAAA;EACA,MAAA;EAAA,GAAA;AAAA,IAGG,IAAA,CAAK,mBAAA;EAAwB,MAAA,GAAS,aAAA;AAAA"}
@@ -48,14 +48,14 @@ import { updateNodeChildren } from "./dictionaryManipulator/updateNodeChildren.j
48
48
  import { compact } from "./formatters/compact.js";
49
49
  import { currency } from "./formatters/currency.js";
50
50
  import { DateTimePreset, date, presets } from "./formatters/date.js";
51
- import { CachedIntl, WrappedIntl, bindIntl, createCachedIntl } from "./utils/intl.js";
51
+ import { CachedIntl, WrappedIntl, bindIntl, getCachedIntl } from "./utils/intl.js";
52
52
  import { list } from "./formatters/list.js";
53
53
  import { number } from "./formatters/number.js";
54
54
  import { percentage } from "./formatters/percentage.js";
55
55
  import { relativeTime } from "./formatters/relativeTime.js";
56
56
  import { units } from "./formatters/units.js";
57
- import { ProcessedStorageAttributes, getStorageAttributes } from "./getStorageAttributes.js";
58
- import { LocaleStorage, LocaleStorageOptions, getLocaleFromStorage, setLocaleInStorage } from "./utils/localeStorage.js";
57
+ import { GenerateSitemapOptions, SitemapUrlEntry, generateSitemap, generateSitemapUrl } from "./localization/generateSitemap.js";
58
+ import { CookieBuildAttributes, LocaleStorage, LocaleStorageClient, LocaleStorageClientOptions, LocaleStorageOptions, LocaleStorageServer, LocaleStorageServerOptions, getLocaleFromStorage, getLocaleFromStorageClient, getLocaleFromStorageServer, setLocaleInStorage, setLocaleInStorageClient, setLocaleInStorageServer } from "./utils/localeStorage.js";
59
59
  import { getBrowserLocale, localeStorageOptions } from "./localization/getBrowserLocale.js";
60
60
  import { getHTMLTextDir } from "./localization/getHTMLTextDir.js";
61
61
  import { getLocale } from "./localization/getLocale.js";
@@ -85,4 +85,4 @@ import { getCookie } from "./utils/getCookie.js";
85
85
  import { isSameKeyPath } from "./utils/isSameKeyPath.js";
86
86
  import { isValidElement } from "./utils/isValidReactElement.js";
87
87
  import { parseYaml } from "./utils/parseYaml.js";
88
- export { ATTRIBUTES_TO_SANITIZE, ATTRIBUTE_TO_NODE_PROP_MAP, ATTR_EXTRACTOR_R, BLOCKQUOTE_ALERT_R, BLOCKQUOTE_R, BLOCKQUOTE_TRIM_LEFT_MULTILINE_R, BLOCK_END_R, BREAK_LINE_R, BREAK_THEMATIC_R, BlockQuoteNode, BoldTextNode, BreakLineNode, BreakThematicNode, CAPTURE_LETTER_AFTER_HYPHEN, CODE_BLOCK_FENCED_R, CODE_BLOCK_R, CODE_INLINE_R, CONSECUTIVE_NEWLINE_R, CR_NEWLINE_R, CUSTOM_COMPONENT_R, CachedIntl, CachedIntl as Intl, CodeBlockNode, CodeFencedNode, CodeInlineNode, CompileOptions, ComponentOverrides, ConditionCond, ConditionContent, ConditionContentStates, CustomComponentNode, DO_NOT_PROCESS_HTML_ELEMENTS, DURATION_DELAY_TRIGGER, DateTimePreset, DeepTransformContent, DotPath, ElementType, EnterFormat, EnumerationCond, EnumerationContent, EnumerationContentState, EscapedTextNode, FOOTNOTE_R, FOOTNOTE_REFERENCE_R, FORMFEED_R, FRONT_MATTER_R, FileCond, FileContent, FileContentConstructor, FootnoteNode, FootnoteReferenceNode, GFMTaskNode, GFM_TASK_R, Gender, GenderCond, GenderContent, GenderContentStates, GetNestingResult, GetPrefixOptions, GetPrefixResult, HEADING_ATX_COMPLIANT_R, HEADING_R, HEADING_SETEXT_R, HTMLCommentNode, HTMLContent, HTMLContentConstructor, HTMLNode, HTMLSelfClosingNode, HTMLTag, HTMLTagsType, HTMLValidationIssue, HTMLValidationResult, HTML_BLOCK_ELEMENT_R, HTML_CHAR_CODE_R, HTML_COMMENT_R, HTML_CUSTOM_ATTR_R, HTML_LEFT_TRIM_AMOUNT_R, HTML_SELF_CLOSING_ELEMENT_R, HTML_TAGS, HeadingNode, HeadingSetextNode, IInterpreterPlugin, IInterpreterPluginState, INLINE_SKIP_R, INTERPOLATION_R, ImageNode, InsertionCond, InsertionContent, InsertionContentConstructor, IsAny, ItalicTextNode, JsonValue, LINK_AUTOLINK_BARE_URL_R, LINK_AUTOLINK_R, LIST_LOOKBEHIND_R, LOOKAHEAD, LinkAngleBraceNode, LinkBareURLNode, LinkNode, ListType, LocaleStorage, LocaleStorageOptions, LocalizedPathResult, MarkdownContent, MarkdownContentConstructor, MarkdownContext, MarkdownOptions, MarkdownRuntime, HTMLValidationIssue as MarkdownValidationIssue, MarkdownValidationResult, MarkedTextNode, NAMED_CODES_TO_UNICODE, NP_TABLE_R, NestedCond, NestedContent, NestedContentState, NestedParser, NewlineNode, NodeProps, ORDERED, ORDERED_LIST_BULLET, ORDERED_LIST_ITEM_PREFIX, ORDERED_LIST_ITEM_PREFIX_R, ORDERED_LIST_ITEM_R, ORDERED_LIST_R, OrderedListNode, PARAGRAPH_R, ParagraphNode, ParseState, Parser, ParserResult, Plugins, Priority, PriorityValue, ProcessedStorageAttributes, REFERENCE_IMAGE_OR_LINK, REFERENCE_IMAGE_R, REFERENCE_LINK_R, ReferenceImageNode, ReferenceLinkNode, ReferenceNode, RenderRuleHook, Rule, RuleOutput, RuleType, RuleTypeValue, Rules, SHORTCODE_R, SHOULD_RENDER_AS_BLOCK_R, StrikethroughTextNode, TABLE_CENTER_ALIGN, TABLE_LEFT_ALIGN, TABLE_RIGHT_ALIGN, TABLE_TRIM_PIPES, TAB_R, TEXT_BOLD_R, TEXT_EMPHASIZED_R, TEXT_ESCAPED_R, TEXT_MARKED_R, TEXT_PLAIN_R, TEXT_STRIKETHROUGHED_R, TRIM_STARTING_NEWLINES, TableNode, TableSeparatorNode, TextNode, TranslationCond, TranslationContent, UNESCAPE_R, UNORDERED, UNORDERED_LIST_BULLET, UNORDERED_LIST_ITEM_PREFIX, UNORDERED_LIST_ITEM_PREFIX_R, UNORDERED_LIST_ITEM_R, UNORDERED_LIST_R, UnionKeys, UnorderedListNode, VOID_ELEMENTS, ValidDotPathsFor, ValueAtKey, WrappedIntl, allowInline, anyScopeRegex, attributeValueToNodePropValue, bindIntl, blockRegex, buildMaskPlugin, captureNothing, checkIsURLAbsolute, checkMissingLocalesPlugin, compact, compile, compileWithOptions, condition as cond, conditionPlugin, createCachedIntl, createCompiler, createRenderer, currency, cx, date, deepTransformNode, editDictionaryByKeyPath, enumeration as enu, enumerationPlugin, file, fileContent, filePlugin, filterMissingTranslationsOnlyPlugin, filterTranslationsOnlyPlugin, findMatchingCondition, gender, genderPlugin, generateListItemPrefix, generateListItemPrefixRegex, generateListItemRegex, generateListRegex, get, getBasePlugins, getBrowserLocale, getCanonicalPath, getCondition, getContent, getContentNodeByKeyPath, getCookie, getDefaultNode, getDictionary, getEmptyNode, getEnumeration, getFilterMissingTranslationsContent, getFilterMissingTranslationsDictionary, getFilterTranslationsOnlyContent, getFilterTranslationsOnlyDictionary, getFilteredLocalesContent, getFilteredLocalesDictionary, getHTML, getHTMLTextDir, getInsertionValues, getInternalPath, getIntlayer, getLocale, getLocaleFromPath, getLocaleFromStorage, getLocaleLang, getLocaleName, getLocalizedContent, getLocalizedPath, getLocalizedUrl, getMarkdownMetadata, getMaskContent, getMissingLocalesContent, getMissingLocalesContentFromDictionary, getMultilingualDictionary, getMultilingualUrls, getNesting, getNodeChildren, getNodeType, getPathWithoutLocale, getPerLocaleDictionary, getPrefix, getReplacedValuesContent, getRewritePath, getRewriteRules, getSplittedContent, getSplittedDictionaryContent, getStorageAttributes, getTranslation, html, i18nextToIntlayerFormatter, icuToIntlayerFormatter, inlineRegex, insertion as insert, insertContentInDictionary, insertionPlugin, intlayerToI18nextFormatter, intlayerToICUFormatter, intlayerToVueI18nFormatter, isSameKeyPath, isValidElement, list, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, localeStorageOptions, markdown as md, mergeDictionaries, nesting as nest, nestedPlugin, normalizeAttributeKey, normalizeDictionaries, normalizeDictionary, normalizeWhitespace, number, orderDictionaries, parseBlock, parseCaptureInline, parseInline, parseSimpleInline, parseStyleAttribute, parseTableAlign, parseTableAlignCapture, parseTableCells, parseTableRow, parseYaml, parserFor, percentage, presets, qualifies, relativeTime, removeContentNodeByKeyPath, renameContentNodeByKeyPath, renderFor, renderNothing, sanitizer, setLocaleInStorage, simpleInlineRegex, slugify, some, splitInsertionTemplate, startsWith, translation as t, translationPlugin, trimEnd, trimLeadingWhitespaceOutsideFences, unescapeString, units, unquote, updateNodeChildren, validateHTML, validateMarkdown, validatePrefix, vueI18nToIntlayerFormatter };
88
+ export { ATTRIBUTES_TO_SANITIZE, ATTRIBUTE_TO_NODE_PROP_MAP, ATTR_EXTRACTOR_R, BLOCKQUOTE_ALERT_R, BLOCKQUOTE_R, BLOCKQUOTE_TRIM_LEFT_MULTILINE_R, BLOCK_END_R, BREAK_LINE_R, BREAK_THEMATIC_R, BlockQuoteNode, BoldTextNode, BreakLineNode, BreakThematicNode, CAPTURE_LETTER_AFTER_HYPHEN, CODE_BLOCK_FENCED_R, CODE_BLOCK_R, CODE_INLINE_R, CONSECUTIVE_NEWLINE_R, CR_NEWLINE_R, CUSTOM_COMPONENT_R, CachedIntl, CachedIntl as Intl, CodeBlockNode, CodeFencedNode, CodeInlineNode, CompileOptions, ComponentOverrides, ConditionCond, ConditionContent, ConditionContentStates, CookieBuildAttributes, CustomComponentNode, DO_NOT_PROCESS_HTML_ELEMENTS, DURATION_DELAY_TRIGGER, DateTimePreset, DeepTransformContent, DotPath, ElementType, EnterFormat, EnumerationCond, EnumerationContent, EnumerationContentState, EscapedTextNode, FOOTNOTE_R, FOOTNOTE_REFERENCE_R, FORMFEED_R, FRONT_MATTER_R, FileCond, FileContent, FileContentConstructor, FootnoteNode, FootnoteReferenceNode, GFMTaskNode, GFM_TASK_R, Gender, GenderCond, GenderContent, GenderContentStates, GenerateSitemapOptions, GetNestingResult, GetPrefixOptions, GetPrefixResult, HEADING_ATX_COMPLIANT_R, HEADING_R, HEADING_SETEXT_R, HTMLCommentNode, HTMLContent, HTMLContentConstructor, HTMLNode, HTMLSelfClosingNode, HTMLTag, HTMLTagsType, HTMLValidationIssue, HTMLValidationResult, HTML_BLOCK_ELEMENT_R, HTML_CHAR_CODE_R, HTML_COMMENT_R, HTML_CUSTOM_ATTR_R, HTML_LEFT_TRIM_AMOUNT_R, HTML_SELF_CLOSING_ELEMENT_R, HTML_TAGS, HeadingNode, HeadingSetextNode, IInterpreterPlugin, IInterpreterPluginState, INLINE_SKIP_R, INTERPOLATION_R, ImageNode, InsertionCond, InsertionContent, InsertionContentConstructor, IsAny, ItalicTextNode, JsonValue, LINK_AUTOLINK_BARE_URL_R, LINK_AUTOLINK_R, LIST_LOOKBEHIND_R, LOOKAHEAD, LinkAngleBraceNode, LinkBareURLNode, LinkNode, ListType, LocaleStorage, LocaleStorageClient, LocaleStorageClientOptions, LocaleStorageOptions, LocaleStorageServer, LocaleStorageServerOptions, LocalizedPathResult, MarkdownContent, MarkdownContentConstructor, MarkdownContext, MarkdownOptions, MarkdownRuntime, HTMLValidationIssue as MarkdownValidationIssue, MarkdownValidationResult, MarkedTextNode, NAMED_CODES_TO_UNICODE, NP_TABLE_R, NestedCond, NestedContent, NestedContentState, NestedParser, NewlineNode, NodeProps, ORDERED, ORDERED_LIST_BULLET, ORDERED_LIST_ITEM_PREFIX, ORDERED_LIST_ITEM_PREFIX_R, ORDERED_LIST_ITEM_R, ORDERED_LIST_R, OrderedListNode, PARAGRAPH_R, ParagraphNode, ParseState, Parser, ParserResult, Plugins, Priority, PriorityValue, REFERENCE_IMAGE_OR_LINK, REFERENCE_IMAGE_R, REFERENCE_LINK_R, ReferenceImageNode, ReferenceLinkNode, ReferenceNode, RenderRuleHook, Rule, RuleOutput, RuleType, RuleTypeValue, Rules, SHORTCODE_R, SHOULD_RENDER_AS_BLOCK_R, SitemapUrlEntry, StrikethroughTextNode, TABLE_CENTER_ALIGN, TABLE_LEFT_ALIGN, TABLE_RIGHT_ALIGN, TABLE_TRIM_PIPES, TAB_R, TEXT_BOLD_R, TEXT_EMPHASIZED_R, TEXT_ESCAPED_R, TEXT_MARKED_R, TEXT_PLAIN_R, TEXT_STRIKETHROUGHED_R, TRIM_STARTING_NEWLINES, TableNode, TableSeparatorNode, TextNode, TranslationCond, TranslationContent, UNESCAPE_R, UNORDERED, UNORDERED_LIST_BULLET, UNORDERED_LIST_ITEM_PREFIX, UNORDERED_LIST_ITEM_PREFIX_R, UNORDERED_LIST_ITEM_R, UNORDERED_LIST_R, UnionKeys, UnorderedListNode, VOID_ELEMENTS, ValidDotPathsFor, ValueAtKey, WrappedIntl, allowInline, anyScopeRegex, attributeValueToNodePropValue, bindIntl, blockRegex, buildMaskPlugin, captureNothing, checkIsURLAbsolute, checkMissingLocalesPlugin, compact, compile, compileWithOptions, condition as cond, conditionPlugin, createCompiler, createRenderer, currency, cx, date, deepTransformNode, editDictionaryByKeyPath, enumeration as enu, enumerationPlugin, file, fileContent, filePlugin, filterMissingTranslationsOnlyPlugin, filterTranslationsOnlyPlugin, findMatchingCondition, gender, genderPlugin, generateListItemPrefix, generateListItemPrefixRegex, generateListItemRegex, generateListRegex, generateSitemap, generateSitemapUrl, get, getBasePlugins, getBrowserLocale, getCachedIntl, getCanonicalPath, getCondition, getContent, getContentNodeByKeyPath, getCookie, getDefaultNode, getDictionary, getEmptyNode, getEnumeration, getFilterMissingTranslationsContent, getFilterMissingTranslationsDictionary, getFilterTranslationsOnlyContent, getFilterTranslationsOnlyDictionary, getFilteredLocalesContent, getFilteredLocalesDictionary, getHTML, getHTMLTextDir, getInsertionValues, getInternalPath, getIntlayer, getLocale, getLocaleFromPath, getLocaleFromStorage, getLocaleFromStorageClient, getLocaleFromStorageServer, getLocaleLang, getLocaleName, getLocalizedContent, getLocalizedPath, getLocalizedUrl, getMarkdownMetadata, getMaskContent, getMissingLocalesContent, getMissingLocalesContentFromDictionary, getMultilingualDictionary, getMultilingualUrls, getNesting, getNodeChildren, getNodeType, getPathWithoutLocale, getPerLocaleDictionary, getPrefix, getReplacedValuesContent, getRewritePath, getRewriteRules, getSplittedContent, getSplittedDictionaryContent, getTranslation, html, i18nextToIntlayerFormatter, icuToIntlayerFormatter, inlineRegex, insertion as insert, insertContentInDictionary, insertionPlugin, intlayerToI18nextFormatter, intlayerToICUFormatter, intlayerToVueI18nFormatter, isSameKeyPath, isValidElement, list, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, localeStorageOptions, markdown as md, mergeDictionaries, nesting as nest, nestedPlugin, normalizeAttributeKey, normalizeDictionaries, normalizeDictionary, normalizeWhitespace, number, orderDictionaries, parseBlock, parseCaptureInline, parseInline, parseSimpleInline, parseStyleAttribute, parseTableAlign, parseTableAlignCapture, parseTableCells, parseTableRow, parseYaml, parserFor, percentage, presets, qualifies, relativeTime, removeContentNodeByKeyPath, renameContentNodeByKeyPath, renderFor, renderNothing, sanitizer, setLocaleInStorage, setLocaleInStorageClient, setLocaleInStorageServer, simpleInlineRegex, slugify, some, splitInsertionTemplate, startsWith, translation as t, translationPlugin, trimEnd, trimLeadingWhitespaceOutsideFences, unescapeString, units, unquote, updateNodeChildren, validateHTML, validateMarkdown, validatePrefix, vueI18nToIntlayerFormatter };
@@ -1 +1 @@
1
- {"version":3,"file":"getContent.d.ts","names":[],"sources":["../../../../src/interpreter/getContent/getContent.ts"],"mappings":";;;;;cAqBa,cAAA,GACX,MAAA,GAAS,aAAA,EACT,QAAA,eACC,OAAA;;AAHH;;;;;cAsBa,UAAA,aACD,WAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,IAAA,EAAM,CAAA,EACN,SAAA,EAAW,SAAA,EACX,OAAA,GAAS,OAAA,OAKH,oBAAA,CAAqB,CAAA,EAAG,uBAAA,EAAyB,CAAA"}
1
+ {"version":3,"file":"getContent.d.ts","names":[],"sources":["../../../../src/interpreter/getContent/getContent.ts"],"mappings":";;;;;cAqBa,cAAA,GACX,MAAA,GAAS,aAAA,EACT,QAAA,eACC,OAAA;;AAHH;;;;;cAyBa,UAAA,aACD,WAAA,YACA,aAAA,GAAgB,eAAA,EAE1B,IAAA,EAAM,CAAA,EACN,SAAA,EAAW,SAAA,EACX,OAAA,GAAS,OAAA,OAKH,oBAAA,CAAqB,CAAA,EAAG,uBAAA,EAAyB,CAAA"}
@@ -1,21 +1,4 @@
1
1
  //#region src/interpreter/splitAndJoinInsertion.d.ts
2
- /**
3
- * Core logic for splitting insertion strings and joining with values.
4
- * Returns an array of parts that can be wrapped by framework-specific Fragment implementations.
5
- *
6
- * @param template - The template string with {{ placeholder }} syntax
7
- * @param values - Map of placeholder names to their replacement values
8
- * @returns Object with `isSimple` flag and `parts` array
9
- *
10
- * @example
11
- * ```ts
12
- * const result = splitInsertionTemplate('Hello {{ name }}!', { name: 'World' });
13
- * // { isSimple: true, parts: 'Hello World!' }
14
- *
15
- * const result = splitInsertionTemplate('Hello {{ name }}!', { name: <Component /> });
16
- * // { isSimple: false, parts: ['Hello ', <Component />, '!'] }
17
- * ```
18
- */
19
2
  declare const splitInsertionTemplate: <T = any>(template: string, values?: Record<string, T>) => {
20
3
  isSimple: boolean;
21
4
  parts: string | T[];
@@ -1 +1 @@
1
- {"version":3,"file":"splitAndJoinInsertion.d.ts","names":[],"sources":["../../../src/interpreter/splitAndJoinInsertion.ts"],"mappings":";;AA+BA;;;;;;;;;;;;;;;;cAAa,sBAAA,YACX,QAAA,UACA,MAAA,GAAQ,MAAA,SAAe,CAAA;EACpB,QAAA;EAAmB,KAAA,WAAgB,CAAA;AAAA"}
1
+ {"version":3,"file":"splitAndJoinInsertion.d.ts","names":[],"sources":["../../../src/interpreter/splitAndJoinInsertion.ts"],"mappings":";cAaa,sBAAA,YACX,QAAA,UACA,MAAA,GAAQ,MAAA,SAAe,CAAA;EACpB,QAAA;EAAmB,KAAA,WAAgB,CAAA;AAAA"}
@@ -0,0 +1,93 @@
1
+ import { LocalesValues } from "@intlayer/types/module_augmentation";
2
+ import { RoutingConfig } from "@intlayer/types/config";
3
+
4
+ //#region src/localization/generateSitemap.d.ts
5
+ type SitemapUrlEntry = {
6
+ /** The canonical path, e.g. '/dashboard' */path: string;
7
+ changefreq?: string;
8
+ priority?: number; /** ISO date string, e.g. '2024-01-15' */
9
+ lastmod?: string;
10
+ };
11
+ type GenerateSitemapOptions = {
12
+ /** Base site URL without trailing slash, e.g. 'https://example.com' */siteUrl: string;
13
+ /**
14
+ * Whether to include xhtml:link alternate tags for multilingual support.
15
+ *
16
+ * When enabled, alternate links are only generated for modes where URLs
17
+ * differ per locale:
18
+ * - 'prefix-no-default': included
19
+ * - 'prefix-all': included
20
+ * - 'search-params': included
21
+ * - 'no-prefix': excluded (all locales share the same URL)
22
+ *
23
+ * @default true
24
+ */
25
+ xhtmlLinks?: boolean;
26
+ locales?: LocalesValues[];
27
+ defaultLocale?: LocalesValues;
28
+ mode?: RoutingConfig['mode'];
29
+ rewrite?: RoutingConfig['rewrite'];
30
+ };
31
+ /**
32
+ * Generates a single `<url>` sitemap entry for the given path.
33
+ *
34
+ * Example:
35
+ *
36
+ * ```ts
37
+ * generateSitemapUrl('/dashboard', {
38
+ * siteUrl: 'https://example.com',
39
+ * changefreq: 'weekly',
40
+ * priority: 0.8,
41
+ * xhtmlLinks: true,
42
+ * locales: ['en', 'fr'],
43
+ * defaultLocale: 'en',
44
+ * mode: 'prefix-no-default',
45
+ * });
46
+ * // Returns:
47
+ * // <url>
48
+ * // <loc>https://example.com/dashboard</loc>
49
+ * // <changefreq>weekly</changefreq>
50
+ * // <priority>0.8</priority>
51
+ * // <xhtml:link rel="alternate" hrefLang="en" href="https://example.com/dashboard"/>
52
+ * // <xhtml:link rel="alternate" hrefLang="fr" href="https://example.com/fr/dashboard"/>
53
+ * // <xhtml:link rel="alternate" hrefLang="x-default" href="https://example.com/dashboard"/>
54
+ * // </url>
55
+ * ```
56
+ *
57
+ * @param path - The canonical path to generate the entry for.
58
+ * @param options - Configuration options.
59
+ * @returns A `<url>` XML string.
60
+ */
61
+ declare const generateSitemapUrl: (path: string, options: SitemapUrlEntry & GenerateSitemapOptions) => string;
62
+ /**
63
+ * Generates a full XML sitemap string from an array of URL entries.
64
+ *
65
+ * Automatically adds `xmlns:xhtml` to the `<urlset>` declaration when
66
+ * xhtml:link alternate tags are included.
67
+ *
68
+ * Example:
69
+ *
70
+ * ```ts
71
+ * generateSitemap(
72
+ * [
73
+ * { path: '/', changefreq: 'daily', priority: 1.0 },
74
+ * { path: '/about', changefreq: 'monthly', priority: 0.5 },
75
+ * ],
76
+ * {
77
+ * siteUrl: 'https://example.com',
78
+ * xhtmlLinks: true,
79
+ * locales: ['en', 'fr'],
80
+ * defaultLocale: 'en',
81
+ * mode: 'prefix-no-default',
82
+ * }
83
+ * );
84
+ * ```
85
+ *
86
+ * @param entries - Array of URL entries to include in the sitemap.
87
+ * @param options - Sitemap generation options.
88
+ * @returns A full XML sitemap string.
89
+ */
90
+ declare const generateSitemap: (entries: SitemapUrlEntry[], options: GenerateSitemapOptions) => string;
91
+ //#endregion
92
+ export { GenerateSitemapOptions, SitemapUrlEntry, generateSitemap, generateSitemapUrl };
93
+ //# sourceMappingURL=generateSitemap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generateSitemap.d.ts","names":[],"sources":["../../../src/localization/generateSitemap.ts"],"mappings":";;;;KAKY,eAAA;8CAEV,IAAA;EACA,UAAA;EACA,QAAA,WAJyB;EAMzB,OAAA;AAAA;AAAA,KAGU,sBAAA;EAHV,uEAKA,OAAA;EALO;AAGT;;;;;;;;;;;EAeE,UAAA;EACA,OAAA,GAAU,aAAA;EACV,aAAA,GAAgB,aAAA;EAChB,IAAA,GAAO,aAAA;EACP,OAAA,GAAU,aAAA;AAAA;;;;;AA6CZ;;;;;;;;;;AA0EA;;;;;;;;;;;;;;;;cA1Ea,kBAAA,GACX,IAAA,UACA,OAAA,EAAS,eAAA,GAAkB,sBAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAwEhB,eAAA,GACX,OAAA,EAAS,eAAA,IACT,OAAA,EAAS,sBAAA"}
@@ -1,4 +1,4 @@
1
- import { LocaleStorageOptions } from "../utils/localeStorage.js";
1
+ import { LocaleStorageClientOptions } from "../utils/localeStorage.js";
2
2
  import { Locale } from "@intlayer/types/allLocales";
3
3
 
4
4
  //#region src/localization/getBrowserLocale.d.ts
@@ -8,7 +8,7 @@ declare enum LanguageDetector {
8
8
  Navigator = "navigator",
9
9
  HtmlTag = "htmlTag"
10
10
  }
11
- declare const localeStorageOptions: LocaleStorageOptions;
11
+ declare const localeStorageOptions: LocaleStorageClientOptions;
12
12
  type LanguageDetectorOptions = {
13
13
  order?: LanguageDetector[];
14
14
  lookupQuerystring?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"getBrowserLocale.d.ts","names":[],"sources":["../../../src/localization/getBrowserLocale.tsx"],"mappings":";;;;aASY,gBAAA;EACV,WAAA;EACA,OAAA;EACA,SAAA;EACA,OAAA;AAAA;AAAA,cAGW,oBAAA,EAAsB,oBAAA;AAAA,KA2B9B,uBAAA;EACH,KAAA,GAAQ,gBAAA;EACR,iBAAA;EACA,OAAA,GAAU,WAAA;AAAA;AA9BZ;;;;;AAwBE;;;;;;;;;;AAxBF,cA4La,gBAAA,GACX,WAAA,GAAa,uBAAA,iBACZ,MAAA"}
1
+ {"version":3,"file":"getBrowserLocale.d.ts","names":[],"sources":["../../../src/localization/getBrowserLocale.tsx"],"mappings":";;;;aASY,gBAAA;EACV,WAAA;EACA,OAAA;EACA,SAAA;EACA,OAAA;AAAA;AAAA,cAGW,oBAAA,EAAsB,0BAAA;AAAA,KA2B9B,uBAAA;EACH,KAAA,GAAQ,gBAAA;EACR,iBAAA;EACA,OAAA,GAAU,WAAA;AAAA;AA9BZ;;;;;AAwBE;;;;;;;;;;AAxBF,cA4La,gBAAA,GACX,WAAA,GAAa,uBAAA,iBACZ,MAAA"}
@@ -1,4 +1,4 @@
1
- import { ProcessedStorageAttributes, getStorageAttributes } from "../getStorageAttributes.js";
1
+ import { GenerateSitemapOptions, SitemapUrlEntry, generateSitemap, generateSitemapUrl } from "./generateSitemap.js";
2
2
  import { getBrowserLocale, localeStorageOptions } from "./getBrowserLocale.js";
3
3
  import { getHTMLTextDir } from "./getHTMLTextDir.js";
4
4
  import { getLocale } from "./getLocale.js";
@@ -14,4 +14,4 @@ import { localeFlatMap, localeMap, localeRecord } from "./localeMapper.js";
14
14
  import { localeResolver } from "./localeResolver.js";
15
15
  import { LocalizedPathResult, getCanonicalPath, getInternalPath, getLocalizedPath, getRewritePath, getRewriteRules } from "./rewriteUtils.js";
16
16
  import { validatePrefix } from "./validatePrefix.js";
17
- export { type GetPrefixOptions, type GetPrefixResult, type LocalizedPathResult, ProcessedStorageAttributes, getBrowserLocale, getCanonicalPath, getHTMLTextDir, getInternalPath, getLocale, getLocaleFromPath, getLocaleLang, getLocaleName, getLocalizedPath, getLocalizedUrl, getMultilingualUrls, getPathWithoutLocale, getPrefix, getRewritePath, getRewriteRules, getStorageAttributes, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, localeStorageOptions, validatePrefix };
17
+ export { type GenerateSitemapOptions, type GetPrefixOptions, type GetPrefixResult, type LocalizedPathResult, type SitemapUrlEntry, generateSitemap, generateSitemapUrl, getBrowserLocale, getCanonicalPath, getHTMLTextDir, getInternalPath, getLocale, getLocaleFromPath, getLocaleLang, getLocaleName, getLocalizedPath, getLocalizedUrl, getMultilingualUrls, getPathWithoutLocale, getPrefix, getRewritePath, getRewriteRules, localeDetector, localeFlatMap, localeMap, localeRecord, localeResolver, localeStorageOptions, validatePrefix };
@@ -1 +1 @@
1
- {"version":3,"file":"getHTMLCustomComponents.d.ts","names":[],"sources":["../../../../src/transpiler/html/getHTMLCustomComponents.ts"],"mappings":";;AA6BA;;;;cAAa,uBAAA,GACX,OAAA,aACC,MAAA,SAAe,MAAA"}
1
+ {"version":3,"file":"getHTMLCustomComponents.d.ts","names":[],"sources":["../../../../src/transpiler/html/getHTMLCustomComponents.ts"],"mappings":";;AA2BA;;;;cAAa,uBAAA,GACX,OAAA,aACC,MAAA,SAAe,MAAA"}
@@ -1,8 +1,8 @@
1
- import { CachedIntl, WrappedIntl, bindIntl, createCachedIntl } from "./intl.js";
2
- import { LocaleStorage, LocaleStorageOptions, getLocaleFromStorage, setLocaleInStorage } from "./localeStorage.js";
1
+ import { CachedIntl, WrappedIntl, bindIntl, getCachedIntl } from "./intl.js";
2
+ import { CookieBuildAttributes, LocaleStorage, LocaleStorageClient, LocaleStorageClientOptions, LocaleStorageOptions, LocaleStorageServer, LocaleStorageServerOptions, getLocaleFromStorage, getLocaleFromStorageClient, getLocaleFromStorageServer, setLocaleInStorage, setLocaleInStorageClient, setLocaleInStorageServer } from "./localeStorage.js";
3
3
  import { checkIsURLAbsolute } from "./checkIsURLAbsolute.js";
4
4
  import { getCookie } from "./getCookie.js";
5
5
  import { isSameKeyPath } from "./isSameKeyPath.js";
6
6
  import { isValidElement } from "./isValidReactElement.js";
7
7
  import { parseYaml } from "./parseYaml.js";
8
- export { CachedIntl, CachedIntl as Intl, LocaleStorage, LocaleStorageOptions, WrappedIntl, bindIntl, checkIsURLAbsolute, createCachedIntl, getCookie, getLocaleFromStorage, isSameKeyPath, isValidElement, parseYaml, setLocaleInStorage };
8
+ export { CachedIntl, CachedIntl as Intl, CookieBuildAttributes, LocaleStorage, LocaleStorageClient, LocaleStorageClientOptions, LocaleStorageOptions, LocaleStorageServer, LocaleStorageServerOptions, WrappedIntl, bindIntl, checkIsURLAbsolute, getCachedIntl, getCookie, getLocaleFromStorage, getLocaleFromStorageClient, getLocaleFromStorageServer, isSameKeyPath, isValidElement, parseYaml, setLocaleInStorage, setLocaleInStorageClient, setLocaleInStorageServer };
@@ -7,27 +7,31 @@ type ReplaceLocaleWithLocalesValues<T> = T extends (new (locales: any, options?:
7
7
  new (options?: Options & {
8
8
  locale?: LocalesValues;
9
9
  }): Instance;
10
+ (locales?: LocalesValues, options?: Options): Instance;
11
+ (options?: Options & {
12
+ locale?: LocalesValues;
13
+ }): Instance;
10
14
  } : T extends (new (locales: any) => infer Instance) ? {
11
15
  new (locales?: LocalesValues): Instance;
12
16
  new (options?: {
13
17
  locale?: LocalesValues;
14
18
  }): Instance;
19
+ (locales?: LocalesValues): Instance;
20
+ (options?: {
21
+ locale?: LocalesValues;
22
+ }): Instance;
15
23
  } : T;
16
24
  type WrappedIntl = { [K in keyof typeof Intl]: K extends keyof IntlConstructors ? ReplaceLocaleWithLocalesValues<(typeof Intl)[K]> : (typeof Intl)[K] };
17
25
  /**
18
- * Factory that turns the global `Intl` into a cached clone.
26
+ * Generic caching instantiator for Intl constructors.
19
27
  */
20
- declare const createCachedIntl: () => WrappedIntl;
21
- declare const CachedIntl: WrappedIntl;
28
+ declare const getCachedIntl: <T extends new (...args: any[]) => any>(Ctor: T, locale?: LocalesValues | string, options?: any) => InstanceType<T>;
22
29
  /**
23
- * Creates a proxied Intl object with a preset locale.
24
- *
25
- * @example
26
- * const intl = bindIntl(Locales.FRENCH);
27
- * new intl.NumberFormat(undefined, { style: 'currency', currency: 'EUR' }).format(10);
28
- * // Uses 'fr' automatically
30
+ * Optional: Keep bindIntl if your library exports it publicly.
31
+ * It now uses the much smaller getCachedIntl under the hood.
29
32
  */
30
- declare const bindIntl: (locale: LocalesValues) => WrappedIntl;
33
+ declare const bindIntl: (boundLocale: LocalesValues) => WrappedIntl;
34
+ declare const CachedIntl: any;
31
35
  //#endregion
32
- export { CachedIntl, CachedIntl as Intl, WrappedIntl, bindIntl, createCachedIntl };
36
+ export { CachedIntl, CachedIntl as Intl, WrappedIntl, bindIntl, getCachedIntl };
33
37
  //# sourceMappingURL=intl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"intl.d.ts","names":[],"sources":["../../../src/utils/intl.ts"],"mappings":";;;KA8BK,gBAAA,wBACgB,IAAA,YAAgB,IAAA,EAAM,CAAA,mBACpC,IAAA,iBAED,CAAA,mBACgB,IAAA,EAAM,CAAA;AAAA,KAIvB,8BAAA,MAAoC,CAAA,eACvC,OAAA,OACA,OAAA;EAAA,KAGS,OAAA,GAAU,aAAA,EAAe,OAAA,GAAU,OAAA,GAAU,QAAA;EAAA,KAC7C,OAAA,GAAU,OAAA;IAAY,MAAA,GAAS,aAAA;EAAA,IAAkB,QAAA;AAAA,IAExD,CAAA,eACI,OAAA;EAAA,KAGK,OAAA,GAAU,aAAA,GAAgB,QAAA;EAAA,KAC1B,OAAA;IAAY,MAAA,GAAS,aAAA;EAAA,IAAkB,QAAA;AAAA,IAE9C,CAAA;AAAA,KAGM,WAAA,wBACS,IAAA,GAAO,CAAA,eAAgB,gBAAA,GACtC,8BAAA,SAAuC,IAAA,EAAM,CAAA,aACrC,IAAA,EAAM,CAAA;;;;cAuFP,gBAAA,QAAuB,WAAA;AAAA,cAiCvB,UAAA,EAAU,WAAA;;AAjJM;;;;;;;cA2JhB,QAAA,GAAY,MAAA,EAAQ,aAAA,KAAgB,WAAA"}
1
+ {"version":3,"file":"intl.d.ts","names":[],"sources":["../../../src/utils/intl.ts"],"mappings":";;;KAgCK,gBAAA,wBACgB,IAAA,YAAgB,IAAA,EAAM,CAAA,mBACpC,IAAA,iBAED,CAAA,mBACgB,IAAA,EAAM,CAAA;AAAA,KAGvB,8BAAA,MAAoC,CAAA,eACvC,OAAA,OACA,OAAA;EAAA,KAGS,OAAA,GAAU,aAAA,EAAe,OAAA,GAAU,OAAA,GAAU,QAAA;EAAA,KAC7C,OAAA,GAAU,OAAA;IAAY,MAAA,GAAS,aAAA;EAAA,IAAkB,QAAA;EAAA,CACrD,OAAA,GAAU,aAAA,EAAe,OAAA,GAAU,OAAA,GAAU,QAAA;EAAA,CAC7C,OAAA,GAAU,OAAA;IAAY,MAAA,GAAS,aAAA;EAAA,IAAkB,QAAA;AAAA,IAEpD,CAAA,eACI,OAAA;EAAA,KAGK,OAAA,GAAU,aAAA,GAAgB,QAAA;EAAA,KAC1B,OAAA;IAAY,MAAA,GAAS,aAAA;EAAA,IAAkB,QAAA;EAAA,CAC3C,OAAA,GAAU,aAAA,GAAgB,QAAA;EAAA,CAC1B,OAAA;IAAY,MAAA,GAAS,aAAA;EAAA,IAAkB,QAAA;AAAA,IAE1C,CAAA;AAAA,KAEM,WAAA,wBACS,IAAA,GAAO,CAAA,eAAgB,gBAAA,GACtC,8BAAA,SAAuC,IAAA,EAAM,CAAA,aACrC,IAAA,EAAM,CAAA;;;;cAMP,aAAA,qBAAmC,IAAA,iBAC9C,IAAA,EAAM,CAAA,EACN,MAAA,GAAS,aAAA,WACT,OAAA,WACC,YAAA,CAAa,CAAA;;;;;cA0BH,QAAA,GAAY,WAAA,EAAa,aAAA,KAAgB,WAAA;AAAA,cA+BzC,UAAA"}