domma-js 0.54.0 → 0.56.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.
@@ -20,6 +20,7 @@ export * from './theme';
20
20
  export * from './icons';
21
21
  export * from './flags';
22
22
  export * from './smooth-caret';
23
+ export * from './i18n';
23
24
 
24
25
  // Import types for the main Domma object
25
26
  import {DommaCollection} from './dom';
@@ -35,6 +36,7 @@ import {Theme, theme} from './theme';
35
36
  import {Icons, icons} from './icons';
36
37
  import {Flags} from './flags';
37
38
  import {SmoothCaret} from './smooth-caret';
39
+ import {I18n, I18nTranslateOptions} from './i18n';
38
40
 
39
41
  // ============================================
40
42
  // Main Domma Interface
@@ -85,6 +87,12 @@ export interface DommaStatic {
85
87
  /** Icon library */
86
88
  icons: Icons;
87
89
 
90
+ /** Translations, plurals and Intl formatting */
91
+ i18n: I18n;
92
+
93
+ /** Shortcut for {@link I18n.t} */
94
+ t(key: string, params?: Record<string, any> | null, options?: I18nTranslateOptions): string;
95
+
88
96
  /** Nation flags (opt-in module - present when domma-flags is loaded) */
89
97
  flags?: Flags;
90
98
 
@@ -224,6 +232,8 @@ export interface DommaLoadOptions {
224
232
  purifyWarning?: boolean;
225
233
  /** false: no deprecation warnings */
226
234
  deprecationWarnings?: boolean;
235
+ /** false: no console warning for a missing translation */
236
+ i18nWarnings?: boolean;
227
237
  }
228
238
 
229
239
  declare global {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "domma-js",
3
- "version": "0.54.0",
3
+ "version": "0.56.0",
4
4
  "description": "Dynamic Object Manipulation & Modeling API - A complete front-end toolkit.",
5
5
  "main": "public/dist/domma.min.js",
6
6
  "module": "public/dist/domma.esm.js",