@lokascript/i18n 2.8.0 → 2.9.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.
package/CHANGELOG.md ADDED
@@ -0,0 +1,51 @@
1
+ # Changelog
2
+
3
+ All notable changes to @lokascript/i18n will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [1.0.0] - 2025-01-19
9
+
10
+ ### Added
11
+
12
+ - Grammar transformation engine for natural word order in 13 languages
13
+ - Language profiles with word order rules (SVO, SOV, VSO)
14
+ - Semantic role markers (destination, source, patient, style, instrument, manner)
15
+ - Support for agglutinative languages with join tokens (Turkish: -i, Japanese: を, Korean: 을/를)
16
+ - Dictionary validation system with coverage reports
17
+ - Runtime locale switching with automatic detection
18
+ - SSR integration with server-side locale detection
19
+ - CLDR-compliant pluralization rules for complex languages
20
+ - Locale-aware formatting (numbers, dates, currency, units)
21
+ - Vite and Webpack plugin integration
22
+ - Language detection from hyperscript code content
23
+ - Comprehensive test suite (424+ tests passing)
24
+
25
+ ### Supported Languages
26
+
27
+ - English (SVO), Spanish (SVO), French (SVO), German (SVO/V2), Portuguese (SVO)
28
+ - Japanese (SOV), Korean (SOV), Turkish (SOV)
29
+ - Arabic (VSO)
30
+ - Chinese (SVO), Indonesian (SVO), Quechua (SOV), Swahili (SVO)
31
+
32
+ ### Features
33
+
34
+ - Transform hyperscript to match native language grammar
35
+ - Handle possessive markers and case systems
36
+ - Support for different grammatical structures (prepositional vs postpositional)
37
+ - Bidirectional text support (Arabic, Hebrew)
38
+ - Conflict resolution with priority-based keyword mapping
39
+ - Translation validation with detailed error reporting
40
+
41
+ ### Breaking Changes from 0.x
42
+
43
+ - Grammar transformer API standardized
44
+ - Language profile structure reorganized
45
+ - Plugin configuration format updated
46
+
47
+ ### Notes
48
+
49
+ - This is the first stable release after extensive linguistic validation
50
+ - Grammar transformations preserve semantic meaning across languages
51
+ - All language profiles include native speaker review where available
package/dist/index.cjs CHANGED
@@ -7152,10 +7152,14 @@ function isDigit(char) {
7152
7152
  return /\d/.test(char);
7153
7153
  }
7154
7154
  function isIdentifierStart(char) {
7155
- return /[a-zA-Z_$áéíóúñÑàèìòùÀÈÌÒÙ一-龯ㄱ-ㅎㅏ-ㅣ가-힣]/.test(char);
7155
+ return /[a-zA-Z_$\u00e1\u00e9\u00ed\u00f3\u00fa\u00f1\u00d1\u00e0\u00e8\u00ec\u00f2\u00f9\u00c0\u00c8\u00cc\u00d2\u00d9\u4e00-\u9faf\u3131-\u314e\u314f-\u3163\uac00-\ud7a3]/.test(
7156
+ char
7157
+ );
7156
7158
  }
7157
7159
  function isIdentifierPart(char) {
7158
- return /[a-zA-Z0-9_$áéíóúñÑàèìòùÀÈÌÒÙ一-龯ㄱ-ㅎㅏ-ㅣ가-힣-]/.test(char);
7160
+ return /[a-zA-Z0-9_$\u00e1\u00e9\u00ed\u00f3\u00fa\u00f1\u00d1\u00e0\u00e8\u00ec\u00f2\u00f9\u00c0\u00c8\u00cc\u00d2\u00d9\u4e00-\u9faf\u3131-\u314e\u314f-\u3163\uac00-\ud7a3-]/.test(
7161
+ char
7162
+ );
7159
7163
  }
7160
7164
  function consumeWhitespace(text, start) {
7161
7165
  let end = start;
@@ -9058,7 +9062,9 @@ var NumberFormatter = class {
9058
9062
  const mergedOptions = { ...this.defaultOptions, ...options };
9059
9063
  try {
9060
9064
  const result = new Intl.NumberFormat(this.locale, mergedOptions).format(value);
9061
- if (mergedOptions.style === "currency" && !/[$€£¥₹₩₽฿₪₴₱₫₵₦]/.test(result)) {
9065
+ if (mergedOptions.style === "currency" && !/[$\u20ac\u00a3\u00a5\u20b9\u20a9\u20bd\u0e3f\u20aa\u20b4\u20b1\u20ab\u20b5\u20a6]/.test(
9066
+ result
9067
+ )) {
9062
9068
  return this.fallbackFormat(value, mergedOptions);
9063
9069
  }
9064
9070
  if (mergedOptions.style === "percent" && !result.includes("%")) {