tiny-essentials 1.20.3 → 1.21.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.
Files changed (126) hide show
  1. package/README.md +13 -11
  2. package/dist/_/numbers.cjs +136 -0
  3. package/dist/_/numbers.d.mts +24 -0
  4. package/dist/_/numbers.mjs +102 -0
  5. package/dist/v1/TinyAdvancedRaffle.min.js +1 -0
  6. package/dist/v1/TinyArrayPaginator.min.js +1 -0
  7. package/dist/v1/TinyBasicsEs.min.js +1 -1
  8. package/dist/v1/TinyCookieConsent.min.js +1 -0
  9. package/dist/v1/TinyDayNightCycle.min.js +1 -0
  10. package/dist/v1/TinyEssentials.min.js +1 -1
  11. package/dist/v1/TinyGamepad.min.js +1 -0
  12. package/dist/v1/TinyI18.min.js +1 -0
  13. package/dist/v1/TinyInventory.min.js +1 -0
  14. package/dist/v1/TinyInventoryTrader.min.js +1 -0
  15. package/dist/v1/TinyLocalStorage.min.js +1 -1
  16. package/dist/v1/TinyNeedBar.min.js +1 -0
  17. package/dist/v1/TinyRateLimiter.min.js +1 -1
  18. package/dist/v1/TinySmartScroller.min.js +1 -1
  19. package/dist/v1/TinyToastNotify.min.js +1 -1
  20. package/dist/v1/TinyUploadClicker.min.js +1 -1
  21. package/dist/v1/basics/array.cjs +21 -0
  22. package/dist/v1/basics/array.d.mts +8 -0
  23. package/dist/v1/basics/array.mjs +18 -0
  24. package/dist/v1/basics/clock.cjs +127 -11
  25. package/dist/v1/basics/clock.d.mts +26 -0
  26. package/dist/v1/basics/clock.mjs +96 -1
  27. package/dist/v1/basics/index.cjs +2 -8
  28. package/dist/v1/basics/index.d.mts +3 -8
  29. package/dist/v1/basics/index.mjs +2 -3
  30. package/dist/v1/basics/simpleMath.cjs +46 -0
  31. package/dist/v1/basics/simpleMath.d.mts +27 -0
  32. package/dist/v1/basics/simpleMath.mjs +42 -0
  33. package/dist/v1/build/TinyAdvancedRaffle.cjs +7 -0
  34. package/dist/v1/build/TinyAdvancedRaffle.d.mts +3 -0
  35. package/dist/v1/build/TinyAdvancedRaffle.mjs +2 -0
  36. package/dist/v1/build/TinyArrayPaginator.cjs +7 -0
  37. package/dist/v1/build/TinyArrayPaginator.d.mts +3 -0
  38. package/dist/v1/build/TinyArrayPaginator.mjs +2 -0
  39. package/dist/v1/build/TinyCookieConsent.cjs +7 -0
  40. package/dist/v1/build/TinyCookieConsent.d.mts +3 -0
  41. package/dist/v1/build/TinyCookieConsent.mjs +2 -0
  42. package/dist/v1/build/TinyDayNightCycle.cjs +7 -0
  43. package/dist/v1/build/TinyDayNightCycle.d.mts +3 -0
  44. package/dist/v1/build/TinyDayNightCycle.mjs +2 -0
  45. package/dist/v1/build/TinyGamepad.cjs +7 -0
  46. package/dist/v1/build/TinyGamepad.d.mts +3 -0
  47. package/dist/v1/build/TinyGamepad.mjs +2 -0
  48. package/dist/v1/build/TinyI18.cjs +7 -0
  49. package/dist/v1/build/TinyI18.d.mts +3 -0
  50. package/dist/v1/build/TinyI18.mjs +2 -0
  51. package/dist/v1/build/TinyInventory.cjs +7 -0
  52. package/dist/v1/build/TinyInventory.d.mts +3 -0
  53. package/dist/v1/build/TinyInventory.mjs +2 -0
  54. package/dist/v1/build/TinyInventoryTrader.cjs +7 -0
  55. package/dist/v1/build/TinyInventoryTrader.d.mts +3 -0
  56. package/dist/v1/build/TinyInventoryTrader.mjs +2 -0
  57. package/dist/v1/build/TinyNeedBar.cjs +7 -0
  58. package/dist/v1/build/TinyNeedBar.d.mts +3 -0
  59. package/dist/v1/build/TinyNeedBar.mjs +2 -0
  60. package/dist/v1/css/TinyCookieConsent.min.css +1 -0
  61. package/dist/v1/index.cjs +20 -8
  62. package/dist/v1/index.d.mts +12 -8
  63. package/dist/v1/index.mjs +11 -3
  64. package/dist/v1/libs/TinyAdvancedRaffle.cjs +1654 -0
  65. package/dist/v1/libs/TinyAdvancedRaffle.d.mts +851 -0
  66. package/dist/v1/libs/TinyAdvancedRaffle.mjs +1477 -0
  67. package/dist/v1/libs/TinyArrayPaginator.cjs +132 -0
  68. package/dist/v1/libs/TinyArrayPaginator.d.mts +78 -0
  69. package/dist/v1/libs/TinyArrayPaginator.mjs +119 -0
  70. package/dist/v1/libs/TinyCookieConsent.cjs +278 -0
  71. package/dist/v1/libs/TinyCookieConsent.d.mts +142 -0
  72. package/dist/v1/libs/TinyCookieConsent.mjs +248 -0
  73. package/dist/v1/libs/TinyDayNightCycle.cjs +1389 -0
  74. package/dist/v1/libs/TinyDayNightCycle.d.mts +673 -0
  75. package/dist/v1/libs/TinyDayNightCycle.mjs +1232 -0
  76. package/dist/v1/libs/TinyGamepad.cjs +2690 -0
  77. package/dist/v1/libs/TinyGamepad.d.mts +1286 -0
  78. package/dist/v1/libs/TinyGamepad.mjs +2386 -0
  79. package/dist/v1/libs/TinyHtml.d.mts +2 -2
  80. package/dist/v1/libs/TinyI18.cjs +946 -0
  81. package/dist/v1/libs/TinyI18.d.mts +418 -0
  82. package/dist/v1/libs/TinyI18.mjs +873 -0
  83. package/dist/v1/libs/TinyInventory.cjs +1788 -0
  84. package/dist/v1/libs/TinyInventory.d.mts +871 -0
  85. package/dist/v1/libs/TinyInventory.mjs +1650 -0
  86. package/dist/v1/libs/TinyInventoryTrader.cjs +242 -0
  87. package/dist/v1/libs/TinyInventoryTrader.d.mts +95 -0
  88. package/dist/v1/libs/TinyInventoryTrader.mjs +212 -0
  89. package/dist/v1/libs/TinyLocalStorage.cjs +14 -1
  90. package/dist/v1/libs/TinyLocalStorage.mjs +8 -1
  91. package/dist/v1/libs/TinyNeedBar.cjs +272 -0
  92. package/dist/v1/libs/TinyNeedBar.d.mts +223 -0
  93. package/dist/v1/libs/TinyNeedBar.mjs +241 -0
  94. package/dist/v1/libs/TinyRateLimiter.cjs +0 -13
  95. package/dist/v1/libs/TinyRateLimiter.d.mts +0 -8
  96. package/dist/v1/libs/TinyRateLimiter.mjs +0 -12
  97. package/dist/v1/libs/TinySmartScroller.cjs +0 -51
  98. package/dist/v1/libs/TinySmartScroller.d.mts +0 -36
  99. package/dist/v1/libs/TinySmartScroller.mjs +0 -46
  100. package/dist/v1/libs/TinyToastNotify.cjs +2 -2
  101. package/dist/v1/libs/TinyToastNotify.mjs +2 -2
  102. package/dist/v1/libs/TinyUploadClicker.cjs +1 -1
  103. package/docs/v1/Ai-Tips.md +51 -0
  104. package/docs/v1/Personal-Ai-Prompts(portuguese).md +134 -0
  105. package/docs/v1/Personal-Ai-Prompts.md +113 -0
  106. package/docs/v1/README.md +24 -0
  107. package/docs/v1/basics/array.md +17 -0
  108. package/docs/v1/basics/clock.md +51 -11
  109. package/docs/v1/basics/simpleMath.md +73 -0
  110. package/docs/v1/libs/TinyAdvancedRaffle.md +674 -0
  111. package/docs/v1/libs/TinyArrayPaginator.md +150 -0
  112. package/docs/v1/libs/TinyCookieConsent.md +152 -0
  113. package/docs/v1/libs/TinyDayNightCycle.md +711 -0
  114. package/docs/v1/libs/TinyGamepad.md +980 -0
  115. package/docs/v1/libs/TinyI18.md +515 -0
  116. package/docs/v1/libs/TinyInventory.md +777 -0
  117. package/docs/v1/libs/TinyInventoryTrader.md +114 -0
  118. package/docs/v1/libs/TinyNeedBar.md +226 -0
  119. package/package.json +7 -5
  120. package/dist/v1/basics/html_deprecated.cjs +0 -124
  121. package/dist/v1/basics/html_deprecated.d.mts +0 -40
  122. package/dist/v1/basics/html_deprecated.mjs +0 -97
  123. package/dist/v1/css/TinyDraggerExample.css +0 -21
  124. package/dist/v1/css/TinyNotify.css +0 -350
  125. package/dist/v1/css/aiMarker.css +0 -4
  126. package/docs/v1/basics/html_deprecated.md +0 -127
@@ -0,0 +1,418 @@
1
+ export default TinyI18;
2
+ /**
3
+ * Supported operating modes for TinyI18.
4
+ * - `"local"` → All translations are managed entirely in memory (browser + Node.js).
5
+ * - `"file"` → Translations are loaded from JSON files on disk (Node.js only).
6
+ */
7
+ export type ModeTypes = "local" | "file";
8
+ /**
9
+ * Dictionary of translation keys mapped to values.
10
+ */
11
+ export type Dict = Record<string, any>;
12
+ /**
13
+ * `$pattern` - Regex string (will be compiled into RegExp).
14
+ *
15
+ * `$fn` - Helper function name associated with this entry.
16
+ *
17
+ * `[key]` - Additional key-value pairs for interpolation or extra metadata.
18
+ */
19
+ export type FileValue = {
20
+ $pattern: string;
21
+ $fn: string;
22
+ [key: string]: string;
23
+ };
24
+ /**
25
+ * Represents a valid locale code string.
26
+ * Example: "en", "pt-BR", "fr".
27
+ */
28
+ export type LocaleCode = string;
29
+ /**
30
+ * Represents a single regex-based translation entry.
31
+ */
32
+ export type PatternEntry = {
33
+ /**
34
+ * - Compiled regular expression used for matching.
35
+ */
36
+ $pattern: RegExp;
37
+ /**
38
+ * - Translation value or resolver function associated with the pattern.
39
+ */
40
+ value: any;
41
+ /**
42
+ * - Translation value or resolver function associated with the pattern.
43
+ */
44
+ elseValue: any;
45
+ };
46
+ export type FileModeEntryJSON = {
47
+ /**
48
+ * - regex as string e.g. "^user\\.(\\d+)$"
49
+ */
50
+ $pattern?: string | undefined;
51
+ /**
52
+ * - string or { $fn: string, args?: any }
53
+ */
54
+ value: string | Object;
55
+ /**
56
+ * - string or { $fn: string, args?: any }
57
+ */
58
+ elseValue: string | Object;
59
+ };
60
+ export type TinyI18Options = {
61
+ mode: ModeTypes;
62
+ defaultLocale: LocaleCode;
63
+ /**
64
+ * - Required in file mode. Directory with <locale>.json
65
+ */
66
+ basePath?: string | undefined;
67
+ /**
68
+ * - Optional initial map { locale: dict } for local mode
69
+ */
70
+ localResources?: Dict | undefined;
71
+ /**
72
+ * - If true, throws on missing keys; else returns key
73
+ */
74
+ strict?: boolean | undefined;
75
+ };
76
+ export type ResolveOptions = {
77
+ /**
78
+ * - force resolve using a specific locale first
79
+ */
80
+ locale?: string | undefined;
81
+ };
82
+ /**
83
+ * Represents statistics for a specific locale.
84
+ */
85
+ export type StatLocale = {
86
+ /**
87
+ * - The locale code (e.g., "en", "pt-BR").
88
+ */
89
+ locale: string;
90
+ /**
91
+ * - Total number of static string entries in this locale.
92
+ */
93
+ strings: number;
94
+ /**
95
+ * - Total number of regex-based pattern entries in this locale.
96
+ */
97
+ patterns: number;
98
+ /**
99
+ * - Whether this locale is the default fallback.
100
+ */
101
+ isDefault: boolean;
102
+ /**
103
+ * - Whether this locale is currently loaded/active.
104
+ */
105
+ isCurrent: boolean;
106
+ };
107
+ /**
108
+ * Read-only view of registered helpers, exposed to function-based entries.
109
+ *
110
+ * Provides safe access to:
111
+ * - check if a helper exists by name
112
+ * - call a helper by name, passing arguments
113
+ */
114
+ export type HelpersReadonly<T extends unknown, R extends unknown> = {
115
+ /**
116
+ * - Check if a helper with given name is registered.
117
+ */
118
+ has?: ((name: string) => boolean) | undefined;
119
+ /**
120
+ * -
121
+ * Invoke a helper by name with an argument and optional extras.
122
+ */
123
+ call?: ((name: string, arg: T, extras?: HelpersReadonly<T, R>) => R) | undefined;
124
+ };
125
+ /**
126
+ * A helper callback function used in translations.
127
+ *
128
+ * - Receives user-supplied parameters and a read-only facade for calling other helpers.
129
+ * - Must return a string (e.g. processed, interpolated, or formatted output).
130
+ */
131
+ export type HelperCallback = (params: Dict, helpers: HelpersReadonly<any, any>) => string;
132
+ /**
133
+ * Supported operating modes for TinyI18.
134
+ * - `"local"` → All translations are managed entirely in memory (browser + Node.js).
135
+ * - `"file"` → Translations are loaded from JSON files on disk (Node.js only).
136
+ * @typedef {"local" | "file"} ModeTypes
137
+ */
138
+ /**
139
+ * Dictionary of translation keys mapped to values.
140
+ *
141
+ * @typedef {Record<string, any>} Dict
142
+ */
143
+ /**
144
+ * Represents a translation entry as it appears in JSON files.
145
+ *
146
+ * @typedef {{
147
+ * $pattern: string,
148
+ * $fn: string,
149
+ * [key: string]: string
150
+ * }} FileValue
151
+ *
152
+ * `$pattern` - Regex string (will be compiled into RegExp).
153
+ *
154
+ * `$fn` - Helper function name associated with this entry.
155
+
156
+ * `[key]` - Additional key-value pairs for interpolation or extra metadata.
157
+ */
158
+ /**
159
+ * Represents a valid locale code string.
160
+ * Example: "en", "pt-BR", "fr".
161
+ *
162
+ * @typedef {string} LocaleCode
163
+ */
164
+ /**
165
+ * Value types stored per locale:
166
+ * - string: a direct translation with optional {named} interpolation
167
+ * - Function: (params, helpers) => any (advanced rendering; HTML-safe if you control it)
168
+ * - { $pattern: RegExp, value: string | { $fn: string, args?: any } | Function }
169
+ * - { $fn: string, args?: any } // in file mode; resolved to a registered function
170
+ */
171
+ /**
172
+ * Represents a single regex-based translation entry.
173
+ *
174
+ * @typedef {Object} PatternEntry
175
+ * @property {RegExp} $pattern - Compiled regular expression used for matching.
176
+ * @property {any} value - Translation value or resolver function associated with the pattern.
177
+ * @property {any} elseValue - Translation value or resolver function associated with the pattern.
178
+ */
179
+ /**
180
+ * @typedef {Object} FileModeEntryJSON
181
+ * @property {string} [$pattern] - regex as string e.g. "^user\\.(\\d+)$"
182
+ * @property {string|Object} value - string or { $fn: string, args?: any }
183
+ * @property {string|Object} elseValue - string or { $fn: string, args?: any }
184
+ */
185
+ /**
186
+ * @typedef {Object} TinyI18Options
187
+ * @property {ModeTypes} mode
188
+ * @property {LocaleCode} defaultLocale
189
+ * @property {string} [basePath] - Required in file mode. Directory with <locale>.json
190
+ * @property {Dict} [localResources] - Optional initial map { locale: dict } for local mode
191
+ * @property {boolean} [strict=true] - If true, throws on missing keys; else returns key
192
+ */
193
+ /**
194
+ * @typedef {Object} ResolveOptions
195
+ * @property {LocaleCode} [locale] - force resolve using a specific locale first
196
+ */
197
+ /**
198
+ * Represents statistics for a specific locale.
199
+ *
200
+ * @typedef {Object} StatLocale
201
+ * @property {string} locale - The locale code (e.g., "en", "pt-BR").
202
+ * @property {number} strings - Total number of static string entries in this locale.
203
+ * @property {number} patterns - Total number of regex-based pattern entries in this locale.
204
+ * @property {boolean} isDefault - Whether this locale is the default fallback.
205
+ * @property {boolean} isCurrent - Whether this locale is currently loaded/active.
206
+ */
207
+ /**
208
+ * Read-only view of registered helpers, exposed to function-based entries.
209
+ *
210
+ * Provides safe access to:
211
+ * - check if a helper exists by name
212
+ * - call a helper by name, passing arguments
213
+ *
214
+ * @template {any} T
215
+ * @template {any} R
216
+ * @typedef {Object} HelpersReadonly
217
+ * @property {(name: string) => boolean} [has] - Check if a helper with given name is registered.
218
+ * @property {(name: string, arg: T, extras?: HelpersReadonly<T, R>) => R} [call] -
219
+ * Invoke a helper by name with an argument and optional extras.
220
+ */
221
+ /**
222
+ * A helper callback function used in translations.
223
+ *
224
+ * - Receives user-supplied parameters and a read-only facade for calling other helpers.
225
+ * - Must return a string (e.g. processed, interpolated, or formatted output).
226
+ *
227
+ * @callback HelperCallback
228
+ * @param {Dict} params - Key-value parameters passed from the translation entry.
229
+ * @param {HelpersReadonly<any, any>} helpers - Read-only access to other registered helpers.
230
+ * @returns {string} Processed string result.
231
+ */
232
+ /**
233
+ * TinyI18 — Professional and flexible i18n manager with dual mode (local/file),
234
+ * regex-based keys, and function-based entries for advanced rendering (incl. HTML).
235
+ *
236
+ * - Mode "local": in-memory resources (Node + Browser).
237
+ * - Mode "file": JSON files on disk via fs/path (Node only).
238
+ * - Keeps only default + selected locale in memory.
239
+ * - Selected locale overrides default; fallback resolves to default.
240
+ * - Supports string entries, regex pattern entries, and function-backed entries.
241
+ * - Safe: no dynamic code eval from files; functions in file mode are referenced by name ("$fn").
242
+ */
243
+ declare class TinyI18 {
244
+ /**
245
+ * Merges multiple JSON locale files into a single file for TinyI18 usage.
246
+ * @param {Object} options
247
+ * @param {string[]} options.files - List of JSON file paths to merge.
248
+ * @param {string} options.output - Path where the merged JSON file will be written.
249
+ * @param {number} [options.spaces=0] - Number of spaces to use for indentation in the output file (0 for compact JSON).
250
+ * @throws {TypeError} If arguments are invalid.
251
+ * @throws {Error} If file reading or writing fails.
252
+ */
253
+ static mergeLocaleFiles({ files, output, spaces }: {
254
+ files: string[];
255
+ output: string;
256
+ spaces?: number | undefined;
257
+ }): Promise<void>;
258
+ /**
259
+ * Creates a new TinyI18 instance for managing localized strings and patterns.
260
+ *
261
+ * Supports two modes:
262
+ * - "local": loads translations directly from provided objects.
263
+ * - "file": loads translations from JSON files on demand.
264
+ *
265
+ * Ensures the default locale is always initialized. In "file" mode, `basePath` is required.
266
+ *
267
+ * @param {TinyI18Options} options - Configuration options for the instance.
268
+ */
269
+ constructor(options: TinyI18Options);
270
+ /**
271
+ * Gets the currently selected locale, or null if only default is active.
272
+ * @returns {LocaleCode|null}
273
+ */
274
+ get currentLocale(): LocaleCode | null;
275
+ /**
276
+ * The default locale code chosen at construction time.
277
+ * This locale is always kept in memory as a fallback.
278
+ * @type {LocaleCode}
279
+ */
280
+ get defaultLocale(): LocaleCode;
281
+ /**
282
+ * The current operating mode of this instance.
283
+ * Determines whether translations are managed in memory ("local")
284
+ * or loaded from JSON files ("file").
285
+ * @type {ModeTypes}
286
+ */
287
+ get mode(): ModeTypes;
288
+ /**
289
+ * Whether strict mode is enabled.
290
+ * - `true` → Missing keys, invalid regex, or helper errors throw exceptions.
291
+ * - `false` → Failures are ignored silently, returning fallback values.
292
+ * @type {boolean}
293
+ */
294
+ get strict(): boolean;
295
+ /**
296
+ * Base directory path used in `"file"` mode to locate locale JSON files.
297
+ * - In `"local"` mode this will always be `null`.
298
+ * - In `"file"` mode this is the root folder passed to the constructor.
299
+ * @type {string|null}
300
+ */
301
+ get basePath(): string | null;
302
+ /**
303
+ * Returns basic stats for debugging/memory insights.
304
+ * @returns {StatLocale[]}
305
+ */
306
+ get stats(): StatLocale[];
307
+ /**
308
+ * Deep-cloned view of string tables (Map → Object).
309
+ * Preserves strings, $fn objects, and functions.
310
+ * @returns {Record<string, Dict>}
311
+ */
312
+ get stringTables(): Record<string, Dict>;
313
+ /**
314
+ * Deep-cloned view of pattern tables (Map → Object).
315
+ * Recreates RegExp objects to avoid mutation.
316
+ * @returns {Record<string, PatternEntry[]>}
317
+ */
318
+ get patternTables(): Record<string, PatternEntry[]>;
319
+ /**
320
+ * Deep-cloned view of helpers (Map → Object).
321
+ * Functions are referenced (cannot deep clone functions).
322
+ * @returns {Record<string, HelperCallback>}
323
+ */
324
+ get helpers(): Record<string, HelperCallback>;
325
+ /**
326
+ * Deep-cloned view of regex cache (Map → Object).
327
+ * Recreates RegExp objects to avoid mutation.
328
+ * @returns {Record<string, RegExp>}
329
+ */
330
+ get regexCache(): Record<string, RegExp>;
331
+ /**
332
+ * Clears the internal regex cache.
333
+ *
334
+ * The regex cache stores compiled {@link RegExp} objects to avoid
335
+ * recompiling frequently used patterns. This wrapper ensures cache
336
+ * management is always controlled via the API instead of direct access.
337
+ */
338
+ clearRegexCache(): void;
339
+ /**
340
+ * Registers a helper function available to function-based entries and $fn references.
341
+ * @param {string} name
342
+ * @param {HelperCallback} fn
343
+ */
344
+ registerHelper(name: string, fn: HelperCallback): void;
345
+ /**
346
+ * Unregisters a previously registered helper function.
347
+ *
348
+ * If the helper does not exist, this method silently does nothing.
349
+ *
350
+ * @param {string} name - The name of the helper to remove.
351
+ * @returns {boolean} `true` if the helper was removed, `false` if it was not found.
352
+ */
353
+ unregisterHelper(name: string): boolean;
354
+ /**
355
+ * Loads or updates a locale data in-memory (local mode only).
356
+ * @param {LocaleCode} locale
357
+ * @param {Dict} data
358
+ */
359
+ loadLocaleLocal(locale: LocaleCode, data: Dict): void;
360
+ /**
361
+ * Sets the current selected locale. In file mode, loads it from disk.
362
+ * Keeps only the default and the selected locale in memory (unloads previous selected).
363
+ * @param {LocaleCode|null} locale - null -> keep only default
364
+ */
365
+ setLocale(locale: LocaleCode | null): Promise<void>;
366
+ /**
367
+ * Resolves a translation by exact key.
368
+ *
369
+ * Resolution order:
370
+ * 1. Current locale (if set)
371
+ * 2. Default locale (fallback)
372
+ *
373
+ * @param {string} key - Translation key (dot.notation).
374
+ * @param {Dict} [params] - Parameters for string interpolation or helper functions.
375
+ * @param {ResolveOptions} [options] - Override resolution options (e.g., force locale).
376
+ * @returns {any} - Usually string, but may be HTMLElement, DocumentFragment, or any return type from a helper.
377
+ */
378
+ t(key: string, params?: Dict, options?: ResolveOptions): any;
379
+ /**
380
+ * Alias of t()
381
+ * @param {string} key
382
+ * @param {Dict} [params]
383
+ * @param {ResolveOptions} [options]
384
+ * @returns {any}
385
+ */
386
+ get(key: string, params?: Dict, options?: ResolveOptions): any;
387
+ /**
388
+ * Resolves a translation by regex pattern match.
389
+ *
390
+ * If multiple patterns exist, returns the first matching entry.
391
+ *
392
+ * @param {string} key - Input string to test against regex patterns.
393
+ * @param {ResolveOptions} [options] - Override resolution options (e.g., force locale).
394
+ * @returns {any} - Translation value (string or custom return type).
395
+ */
396
+ p(key: string, options?: ResolveOptions): any;
397
+ /**
398
+ * Alias of p()
399
+ * @param {string} key
400
+ * @param {ResolveOptions} [options]
401
+ * @returns {any}
402
+ */
403
+ resolveByPattern(key: string, options?: ResolveOptions): any;
404
+ /**
405
+ * Clears everything except the default locale (keeps its data).
406
+ * Selected locale becomes null.
407
+ */
408
+ resetToDefaultOnly(): void;
409
+ /**
410
+ * Returns stats for a specific locale.
411
+ * @param {LocaleCode} locale
412
+ * @returns {StatLocale}
413
+ * @throws {Error} If the locale is not registered.
414
+ */
415
+ getStatsForLocale(locale: LocaleCode): StatLocale;
416
+ #private;
417
+ }
418
+ //# sourceMappingURL=TinyI18.d.mts.map