react-native-live-widgets 1.2.2 → 1.2.3

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 CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable changes to `react-native-live-widgets` will be documented in this file.
4
4
 
5
+ ## [1.2.3] - 2026-11-18
6
+ ### Fixed & Improved
7
+ - **Automatic Xcode String Catalog Linking (`Localizable.xcstrings`)**:
8
+ - `codegen.js` now automatically inspects `project.pbxproj` and links `Localizable.xcstrings` into the `PBXResourcesBuildPhase` and `PBXFileReference` of the `LiveWidgetsExtension` target, preventing raw i18n keys (e.g., `widgets.main.title`, `widgets.shift.title`) from leaking into the iOS Widget Gallery.
9
+ - Automatically updates `CFBundleLocalizations` (`vi`, `en`, `ja`) inside `LiveWidgetsExtension/Info.plist` and synchronizes project `knownRegions`.
10
+ - **Full Bilingual i18n Web Documentation**:
11
+ - Completed English translations across `docs/index.html` (sidebar categories, links, exact hit layer, and quick start sections) with 101/101 dynamic `data-i18n` keys.
12
+ - **Library Peer Dependency Deduplication**:
13
+ - Sanitized library build environment to eliminate nested React instances, preventing `Cannot read property 'useRef' of null` dispatch errors in host apps.
14
+
5
15
  ## [1.2.2] - 2026-11-18
6
16
  ### Added
7
17
  - **All-in-One Automated Setup Integration**: `npx react-native-live-widgets init` now automatically runs the entire icon extraction and codegen pipeline out of the box (syncing 9,500+ Apple SF Symbols and 3,800+ Google Material Icons into TypeScript auto-complete, generating `LiveWidgetsBundle.swift`, and synchronizing string catalogs).
package/cli/codegen.js CHANGED
@@ -313,7 +313,7 @@ function buildI18nCatalog(projectRoot, config) {
313
313
  /**
314
314
  * Xuất các file Localizable.strings và Localizable.xcstrings cho iOS Extension target
315
315
  */
316
- function writeI18nFiles(targetDir, catalog, defaultLocale) {
316
+ function writeI18nFiles(targetDir, catalog, defaultLocale, projectRoot) {
317
317
  const locales = Object.keys(catalog);
318
318
  if (locales.length === 0) return;
319
319
 
@@ -377,6 +377,106 @@ function writeI18nFiles(targetDir, catalog, defaultLocale) {
377
377
 
378
378
  console.log(`🌐 Successfully generated iOS localizations (${locales.join(', ')})`);
379
379
  console.log(` - String Catalog: ${path.basename(targetDir)}/Localizable.xcstrings`);
380
+
381
+ if (projectRoot) {
382
+ syncI18nWithXcodeProject(projectRoot, locales, targetDir);
383
+ }
384
+ }
385
+
386
+ /**
387
+ * Tự động liên kết Localizable.xcstrings vào Xcode project.pbxproj và cập nhật CFBundleLocalizations
388
+ */
389
+ function syncI18nWithXcodeProject(projectRoot, locales, targetDir) {
390
+ const iosDir = path.join(projectRoot, 'ios');
391
+ if (!fs.existsSync(iosDir)) return;
392
+
393
+ // 1. Cập nhật CFBundleLocalizations trong Info.plist của Extension
394
+ const infoPlistPath = path.join(targetDir, 'Info.plist');
395
+ if (fs.existsSync(infoPlistPath)) {
396
+ try {
397
+ let plistContent = fs.readFileSync(infoPlistPath, 'utf8');
398
+ if (!plistContent.includes('CFBundleLocalizations')) {
399
+ const localizationsXml = [
400
+ '\t<key>CFBundleLocalizations</key>',
401
+ '\t<array>',
402
+ ...locales.map((loc) => `\t\t<string>${loc}</string>`),
403
+ '\t</array>',
404
+ ].join('\n');
405
+ plistContent = plistContent.replace('</dict>', `${localizationsXml}\n</dict>`);
406
+ fs.writeFileSync(infoPlistPath, plistContent, 'utf8');
407
+ }
408
+ } catch (_e) {}
409
+ }
410
+
411
+ // 2. Tìm project.pbxproj
412
+ try {
413
+ const entries = fs.readdirSync(iosDir);
414
+ const xcodeProj = entries.find((e) => e.endsWith('.xcodeproj'));
415
+ if (!xcodeProj) return;
416
+
417
+ const pbxPath = path.join(iosDir, xcodeProj, 'project.pbxproj');
418
+ if (!fs.existsSync(pbxPath)) return;
419
+
420
+ let pbxContent = fs.readFileSync(pbxPath, 'utf8');
421
+ let modified = false;
422
+
423
+ // Check if Localizable.xcstrings is already referenced
424
+ if (!pbxContent.includes('Localizable.xcstrings')) {
425
+ const buildFileUuid = 'CC0100000000000000000001';
426
+ const fileRefUuid = 'CC0200000000000000000001';
427
+
428
+ // Add to PBXBuildFile
429
+ const buildFileEntry = `/* Begin PBXBuildFile section */\n\t\t${buildFileUuid} /* Localizable.xcstrings in Resources */ = {isa = PBXBuildFile; fileRef = ${fileRefUuid} /* Localizable.xcstrings */; };`;
430
+ if (pbxContent.includes('/* Begin PBXBuildFile section */')) {
431
+ pbxContent = pbxContent.replace('/* Begin PBXBuildFile section */', buildFileEntry);
432
+ modified = true;
433
+ }
434
+
435
+ // Add to PBXFileReference
436
+ const relXcstringsPath = `${path.basename(targetDir)}/Localizable.xcstrings`;
437
+ const fileRefEntry = `/* Begin PBXFileReference section */\n\t\t${fileRefUuid} /* Localizable.xcstrings */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.json.xcstrings; name = Localizable.xcstrings; path = ${relXcstringsPath}; sourceTree = "<group>"; };`;
438
+ if (pbxContent.includes('/* Begin PBXFileReference section */')) {
439
+ pbxContent = pbxContent.replace('/* Begin PBXFileReference section */', fileRefEntry);
440
+ modified = true;
441
+ }
442
+
443
+ // Add to Extension Group children
444
+ const extGroupName = path.basename(targetDir);
445
+ const groupRegex = new RegExp(`(/\\* ${extGroupName} \\*/ = {[\\s\\S]*?children = \\()([\\s\\S]*?\\);)`);
446
+ if (groupRegex.test(pbxContent)) {
447
+ pbxContent = pbxContent.replace(groupRegex, `$1\n\t\t\t\t${fileRefUuid} /* Localizable.xcstrings */,$2`);
448
+ modified = true;
449
+ }
450
+
451
+ // Add to Resources Build Phase of Extension
452
+ const resPhaseRegex = /(isa = PBXResourcesBuildPhase;[\s\S]*?files = \()([\s\S]*?\);)/g;
453
+ const matches = [...pbxContent.matchAll(resPhaseRegex)];
454
+ if (matches.length > 0) {
455
+ const targetMatch = matches.length > 1 ? matches[1] : matches[0];
456
+ const updatedMatch = `${targetMatch[1]}\n\t\t\t\t${buildFileUuid} /* Localizable.xcstrings in Resources */,${targetMatch[2]}`;
457
+ pbxContent = pbxContent.replace(targetMatch[0], updatedMatch);
458
+ modified = true;
459
+ }
460
+ }
461
+
462
+ // Sync knownRegions with locales
463
+ for (const loc of locales) {
464
+ if (!pbxContent.includes(`\t\t\t\t${loc},\n`)) {
465
+ pbxContent = pbxContent.replace(
466
+ /(knownRegions = \([\s\S]*?Base,)/,
467
+ `$1\n\t\t\t\t${loc},`
468
+ );
469
+ modified = true;
470
+ }
471
+ }
472
+
473
+ if (modified) {
474
+ fs.writeFileSync(pbxPath, pbxContent, 'utf8');
475
+ console.log(`📎 Automatically linked Localizable.xcstrings into ${xcodeProj} Resources.`);
476
+ }
477
+ } catch (err) {
478
+ console.warn(`⚠️ [i18n] Could not auto-link Localizable.xcstrings in project.pbxproj:`, err.message);
479
+ }
380
480
  }
381
481
 
382
482
  /**
@@ -728,7 +828,7 @@ function runCodegen(projectRoot = process.cwd(), customConfigPath = null) {
728
828
 
729
829
  // 1. Generate i18n Localizable if catalog exists
730
830
  if (Object.keys(catalog).length > 0) {
731
- writeI18nFiles(targetDir, catalog, defaultLocale);
831
+ writeI18nFiles(targetDir, catalog, defaultLocale, projectRoot);
732
832
  }
733
833
 
734
834
  // 2. Generate Swift source code
package/docs/index.html CHANGED
@@ -129,7 +129,7 @@
129
129
  <!-- Top Announcement Bar -->
130
130
  <div class="bg-gradient-to-r from-sky-900/50 via-indigo-900/40 to-purple-900/50 border-b border-sky-500/20 py-2 px-4 text-center text-xs text-sky-200">
131
131
  <span class="inline-flex items-center space-x-1.5 font-medium">
132
- <span class="px-2 py-0.5 rounded-full bg-emerald-500/20 text-emerald-300 font-semibold text-[10px] uppercase tracking-wide" data-i18n="announcement_tag">Mới v1.2.1</span>
132
+ <span class="px-2 py-0.5 rounded-full bg-emerald-500/20 text-emerald-300 font-semibold text-[10px] uppercase tracking-wide" data-i18n="announcement_tag">Mới v1.2.2</span>
133
133
  <span data-i18n="announcement_text">Exact Dynamic Hit Layer, Native Chronometer Countdown, Swift 6 Ready & Chuẩn hoá <strong>UI IR</strong></span>
134
134
  <a href="#exact-hit-layer" data-i18n="announcement_link" class="underline hover:text-white ml-2">Xem chi tiết &rarr;</a>
135
135
  </span>
@@ -150,8 +150,8 @@
150
150
  </a>
151
151
  <span class="text-[11px] text-slate-400 hidden sm:inline" data-i18n="brand_subtitle">Declarative Widgets & Dynamic Island Engine</span>
152
152
  </div>
153
- <span class="inline-flex items-center px-2 py-0.5 rounded-md text-[11px] font-semibold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20">
154
- v1.2.1
153
+ <span class="inline-flex items-center px-2 py-0.5 rounded-md text-[11px] font-semibold bg-emerald-500/10 text-emerald-400 border border-emerald-500/20" data-i18n="version_tag">
154
+ v1.2.2
155
155
  </span>
156
156
  </div>
157
157
 
@@ -416,7 +416,7 @@
416
416
  <div>
417
417
  <h4 class="text-xs font-bold text-sky-400 uppercase tracking-wider mb-2.5 flex items-center space-x-1.5">
418
418
  <i data-lucide="rocket" class="w-4 h-4"></i>
419
- <span>Bắt đầu</span>
419
+ <span data-i18n="side_header_start">Bắt đầu</span>
420
420
  </h4>
421
421
  <ul class="space-y-1 border-l border-slate-800 pl-3">
422
422
  <li><a href="#quick-start" class="sidebar-link text-slate-300 hover:text-white block py-1 transition" data-i18n="side_quick_start">Cài đặt All-in-One CLI</a></li>
@@ -428,75 +428,75 @@
428
428
  <div>
429
429
  <h4 class="text-xs font-bold text-sky-400 uppercase tracking-wider mb-2.5 flex items-center space-x-1.5">
430
430
  <i data-lucide="code" class="w-4 h-4"></i>
431
- <span>Cú pháp &amp; UI Engine</span>
431
+ <span data-i18n="side_header_syntax">Cú pháp &amp; UI Engine</span>
432
432
  </h4>
433
433
  <ul class="space-y-1 border-l border-slate-800 pl-3">
434
434
  <li><a href="#jsx-support" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_jsx_support">Cú pháp JSX / TSX &amp; StyleSheet</a></li>
435
435
  <li><a href="#widget-preview-comp" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_widget_preview">Mô phỏng &lt;WidgetPreview&gt;</a></li>
436
- <li><a href="#exact-hit-layer" class="sidebar-link text-emerald-400 hover:text-white block py-1 transition font-medium" data-i18n="side_exact_hit">Exact Hit Layer &amp; Chronometer (v1.2.1)</a></li>
437
- <li><a href="#dsl-containers" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">VStack, HStack, ZStack, Grid, Divider</a></li>
438
- <li><a href="#dsl-text-badge" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">UI.Text, UI.Badge &amp; Biến động</a></li>
436
+ <li><a href="#exact-hit-layer" class="sidebar-link text-emerald-400 hover:text-white block py-1 transition font-medium" data-i18n="side_exact_hit">Exact Hit Layer &amp; Chronometer (v1.2.2)</a></li>
437
+ <li><a href="#dsl-containers" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_dsl_containers">VStack, HStack, ZStack, Grid, Divider</a></li>
438
+ <li><a href="#dsl-text-badge" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_dsl_text">UI.Text, UI.Badge &amp; Biến động</a></li>
439
439
  <li><a href="#dsl-image" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_dsl_image">UI.Image &amp; System Icons (Apple / Google)</a></li>
440
- <li><a href="#dsl-timer" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">UI.Timer (Đếm giờ phần cứng)</a></li>
441
- <li><a href="#dsl-progress" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">UI.Progress (Bar, Segmented, Circle)</a></li>
442
- <li><a href="#dsl-equalizer" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">UI.Equalizer (Sóng âm)</a></li>
443
- <li><a href="#dsl-gauge-chart" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">UI.Gauge 240° &amp; UI.Chart</a></li>
444
- <li><a href="#dsl-interactive" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">UI.Button, UI.Toggle &amp; UI.Link</a></li>
445
- <li><a href="#dsl-custom" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">UI.Custom &amp; DynamicNodeRegistry</a></li>
446
- <li><a href="#styling-modifiers" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">Gradient, Shadow, Border, Tinted</a></li>
440
+ <li><a href="#dsl-timer" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_dsl_timer">UI.Timer (Đếm giờ phần cứng)</a></li>
441
+ <li><a href="#dsl-progress" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_dsl_progress">UI.Progress (Bar, Segmented, Circle)</a></li>
442
+ <li><a href="#dsl-equalizer" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_dsl_equalizer">UI.Equalizer (Sóng âm)</a></li>
443
+ <li><a href="#dsl-gauge-chart" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_dsl_gauge">UI.Gauge 240° &amp; UI.Chart</a></li>
444
+ <li><a href="#dsl-interactive" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_dsl_interactive">UI.Button, UI.Toggle &amp; UI.Link</a></li>
445
+ <li><a href="#dsl-custom" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_dsl_custom">UI.Custom &amp; DynamicNodeRegistry</a></li>
446
+ <li><a href="#styling-modifiers" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_styling">Gradient, Shadow, Border, Tinted</a></li>
447
447
  </ul>
448
448
  </div>
449
449
 
450
450
  <div>
451
451
  <h4 class="text-xs font-bold text-sky-400 uppercase tracking-wider mb-2.5 flex items-center space-x-1.5">
452
452
  <i data-lucide="book-open" class="w-4 h-4"></i>
453
- <span>Core API Reference</span>
453
+ <span data-i18n="side_header_api">Core API Reference</span>
454
454
  </h4>
455
455
  <ul class="space-y-1 border-l border-slate-800 pl-3">
456
- <li><a href="#api-liveactivity" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">LiveActivity &amp; Dynamic Island</a></li>
457
- <li><a href="#api-widget" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">Widget API, Multi-page &amp; Lock Screen</a></li>
458
- <li><a href="#api-hooks" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">React Hooks &amp; SharedStorage</a></li>
459
- <li><a href="#api-remote-sync" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">Remote API Sync (Kill App)</a></li>
460
- <li><a href="#api-push-token" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">APNs &amp; FCM Push Tokens</a></li>
456
+ <li><a href="#api-liveactivity" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_api_liveactivity">LiveActivity &amp; Dynamic Island</a></li>
457
+ <li><a href="#api-widget" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_api_widget">Widget API, Multi-page &amp; Lock Screen</a></li>
458
+ <li><a href="#api-hooks" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_api_hooks">React Hooks &amp; SharedStorage</a></li>
459
+ <li><a href="#api-remote-sync" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_api_remote">Remote API Sync (Kill App)</a></li>
460
+ <li><a href="#api-push-token" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_api_push">APNs &amp; FCM Push Tokens</a></li>
461
461
  </ul>
462
462
  </div>
463
463
 
464
464
  <div>
465
465
  <h4 class="text-xs font-bold text-emerald-400 uppercase tracking-wider mb-2.5 flex items-center space-x-1.5">
466
466
  <i data-lucide="cpu" class="w-4 h-4"></i>
467
- <span>Kiến trúc &amp; Trợ năng (v1.2.1)</span>
467
+ <span data-i18n="side_header_arch">Kiến trúc &amp; Trợ năng (v1.2.2)</span>
468
468
  </h4>
469
469
  <ul class="space-y-1 border-l border-emerald-950 pl-3">
470
- <li><a href="#ir-semantic" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">3 Trụ cột Kiến trúc &amp; UI IR</a></li>
471
- <li><a href="#a11y-layer" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">Accessibility (VoiceOver &amp; TalkBack)</a></li>
472
- <li><a href="#capability-matrix" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">Bảng Năng lực &amp; Lộ trình 6 Phases</a></li>
473
- <li><a href="#extended-families-lifecycle" class="sidebar-link text-emerald-400 hover:text-white block py-1 transition font-medium">StandBy, ControlWidget &amp; Lifecycle</a></li>
474
- <li><a href="#troubleshooting" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">Xử lý sự cố thường gặp</a></li>
470
+ <li><a href="#ir-semantic" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_ir_semantic">3 Trụ cột Kiến trúc &amp; UI IR</a></li>
471
+ <li><a href="#a11y-layer" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_a11y">Accessibility (VoiceOver &amp; TalkBack)</a></li>
472
+ <li><a href="#capability-matrix" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_capability">Bảng Năng lực &amp; Lộ trình 6 Phases</a></li>
473
+ <li><a href="#extended-families-lifecycle" class="sidebar-link text-emerald-400 hover:text-white block py-1 transition font-medium" data-i18n="side_standby">StandBy, ControlWidget &amp; Lifecycle</a></li>
474
+ <li><a href="#troubleshooting" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_troubleshoot">Xử lý sự cố thường gặp</a></li>
475
475
  </ul>
476
476
  </div>
477
477
 
478
478
  <div>
479
479
  <h4 class="text-xs font-bold text-indigo-400 uppercase tracking-wider mb-2.5 flex items-center space-x-1.5">
480
480
  <i data-lucide="bot" class="w-4 h-4"></i>
481
- <span>AI Agent &amp; LLMs</span>
481
+ <span data-i18n="side_header_ai">AI Agent &amp; LLMs</span>
482
482
  </h4>
483
483
  <ul class="space-y-1 border-l border-indigo-950 pl-3">
484
- <li><a href="#llms-ai" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">Chuẩn mở llms.txt &amp; llms-full.txt</a></li>
485
- <li><a href="#agent-skill" class="sidebar-link text-slate-400 hover:text-white block py-1 transition">Agent Skill (SKILL.md)</a></li>
484
+ <li><a href="#llms-ai" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_llms">Chuẩn mở llms.txt &amp; llms-full.txt</a></li>
485
+ <li><a href="#agent-skill" class="sidebar-link text-slate-400 hover:text-white block py-1 transition" data-i18n="side_skill">Agent Skill (SKILL.md)</a></li>
486
486
  </ul>
487
487
  </div>
488
488
 
489
489
  <div>
490
490
  <h4 class="text-xs font-bold text-slate-500 uppercase tracking-wider mb-2.5 flex items-center space-x-1.5">
491
491
  <i data-lucide="external-link" class="w-4 h-4"></i>
492
- <span>Tài nguyên ngoài</span>
492
+ <span data-i18n="side_header_resources">Tài nguyên ngoài</span>
493
493
  </h4>
494
494
  <ul class="space-y-1 border-l border-slate-800 pl-3 text-xs">
495
- <li><a href="https://react-native-vu.github.io/react-native-live-widgets/" target="_blank" class="text-sky-400 hover:text-sky-300 block py-1 font-medium">Web Docs Chính Thức ↗</a></li>
495
+ <li><a href="https://react-native-vu.github.io/react-native-live-widgets/" target="_blank" class="text-sky-400 hover:text-sky-300 block py-1 font-medium" data-i18n="side_res_web">Web Docs Chính Thức ↗</a></li>
496
496
  <li><a href="https://github.com/React-Native-Vu/LiveWidgetsExampleExpo" target="_blank" class="text-slate-400 hover:text-sky-300 block py-1">Expo Demo GitHub ↗</a></li>
497
497
  <li><a href="https://github.com/React-Native-Vu/LiveWidgetsExample" target="_blank" class="text-slate-400 hover:text-sky-300 block py-1">Bare RN Demo GitHub ↗</a></li>
498
- <li><a href="GUIDE-VI.md" target="_blank" class="text-slate-400 hover:text-sky-300 block py-1">Hướng Dẫn Chi Tiết (VI) ↗</a></li>
499
- <li><a href="GUIDE-EN.md" target="_blank" class="text-slate-400 hover:text-sky-300 block py-1">English Full Guide ↗</a></li>
498
+ <li><a href="GUIDE-VI.md" target="_blank" class="text-slate-400 hover:text-sky-300 block py-1" data-i18n="side_res_guide_vi">Hướng Dẫn Chi Tiết (VI) ↗</a></li>
499
+ <li><a href="GUIDE-EN.md" target="_blank" class="text-slate-400 hover:text-sky-300 block py-1" data-i18n="side_res_guide_en">English Full Guide ↗</a></li>
500
500
  </ul>
501
501
  </div>
502
502
 
@@ -510,9 +510,9 @@
510
510
  <div class="border-b border-cardBorder pb-4">
511
511
  <h2 class="text-2xl sm:text-3xl font-extrabold text-white flex items-center space-x-2.5">
512
512
  <i data-lucide="zap" class="w-7 h-7 text-sky-400"></i>
513
- <span>Cài đặt & Thiết lập Tự động</span>
513
+ <span data-i18n="qs_title">Cài đặt &amp; Thiết lập Tự động</span>
514
514
  </h2>
515
- <p class="mt-2 text-slate-400 text-sm sm:text-base">
515
+ <p class="mt-2 text-slate-400 text-sm sm:text-base" data-i18n="qs_desc">
516
516
  Thư viện tích hợp sẵn bộ <strong>All-in-One CLI Scaffolder</strong> giúp cấu hình Xcode Widget Extension, App Groups và Android permissions chỉ với 1 câu lệnh duy nhất.
517
517
  </p>
518
518
  </div>
@@ -522,14 +522,14 @@
522
522
  <div class="flex items-center justify-between">
523
523
  <span class="font-bold text-white text-base sm:text-lg flex items-center space-x-2">
524
524
  <span class="w-3 h-3 rounded-full bg-emerald-400"></span>
525
- <span>1. Quy trình dành cho Expo (SDK 50, 51, 52, 58+ CNG)</span>
525
+ <span data-i18n="expo_card_title">1. Quy trình dành cho Expo (SDK 50, 51, 52, 58+ CNG)</span>
526
526
  </span>
527
527
  <span class="text-xs bg-emerald-500/10 text-emerald-400 px-2.5 py-1 rounded-full border border-emerald-500/20 font-semibold">
528
528
  Config Plugin
529
529
  </span>
530
530
  </div>
531
531
 
532
- <p class="text-sm text-slate-300 leading-relaxed">
532
+ <p class="text-sm text-slate-300 leading-relaxed" data-i18n="expo_card_desc">
533
533
  Thư viện tương thích 100% với <strong>Continuous Native Generation (CNG)</strong> và <strong>EAS Build</strong>:
534
534
  </p>
535
535
 
@@ -546,7 +546,7 @@ npx expo run:ios
546
546
  npx expo run:android</code></pre>
547
547
  </div>
548
548
 
549
- <p class="text-xs font-semibold text-slate-300">Cấu hình Config Plugin được tự động thêm vào tập tin <code class="text-sky-300">app.json</code>:</p>
549
+ <p class="text-xs font-semibold text-slate-300" data-i18n="expo_plugin_label">Cấu hình Config Plugin được tự động thêm vào tập tin <code class="text-sky-300">app.json</code>:</p>
550
550
  <div class="relative">
551
551
  <button onclick="copyCode(this)" class="absolute top-3 right-3 text-xs bg-slate-800 hover:bg-slate-700 text-slate-300 px-2.5 py-1 rounded-md border border-slate-700 transition">Copy</button>
552
552
  <pre><code class="language-json">{
@@ -573,7 +573,7 @@ npx expo run:android</code></pre>
573
573
  <div class="flex items-center justify-between">
574
574
  <span class="font-bold text-white text-base sm:text-lg flex items-center space-x-2">
575
575
  <span class="w-3 h-3 rounded-full bg-sky-400"></span>
576
- <span>2. Quy trình dành cho Bare React Native CLI</span>
576
+ <span data-i18n="bare_card_title">2. Quy trình dành cho Bare React Native CLI</span>
577
577
  </span>
578
578
  <span class="text-xs bg-sky-500/10 text-sky-400 px-2.5 py-1 rounded-full border border-sky-500/20 font-semibold">
579
579
  CLI Auto-Link
@@ -600,13 +600,13 @@ npx react-native run-android</code></pre>
600
600
  <div class="flex items-center justify-between">
601
601
  <span class="font-bold text-white text-base sm:text-lg flex items-center space-x-2">
602
602
  <span class="w-3 h-3 rounded-full bg-purple-400"></span>
603
- <span>3. Lệnh đồng bộ Codegen &amp; Đa ngôn ngữ (i18n)</span>
603
+ <span data-i18n="codegen_card_title">3. Lệnh đồng bộ Codegen &amp; Đa ngôn ngữ (i18n)</span>
604
604
  </span>
605
605
  <span class="text-xs bg-purple-500/10 text-purple-400 px-2.5 py-1 rounded-full border border-purple-500/20 font-semibold">
606
606
  Codegen Engine
607
607
  </span>
608
608
  </div>
609
- <p class="text-sm text-slate-300 leading-relaxed">
609
+ <p class="text-sm text-slate-300 leading-relaxed" data-i18n="codegen_card_desc">
610
610
  Mỗi khi bạn thêm widget mới hoặc chỉnh sửa nội dung trong tập tin <code class="text-sky-300">widgets.config.ts</code>, chỉ cần chạy 1 câu lệnh để tự động cập nhật toàn bộ:
611
611
  </p>
612
612
  <div class="relative">
@@ -793,17 +793,17 @@ export default function PreviewScreen() {
793
793
  </div>
794
794
  </section>
795
795
 
796
- <!-- Section: Exact Dynamic Hit Layer & Chronometer Countdown (v1.2.1) -->
796
+ <!-- Section: Exact Dynamic Hit Layer & Chronometer Countdown (v1.2.2) -->
797
797
  <section id="exact-hit-layer" class="space-y-6">
798
798
  <div class="border-b border-cardBorder pb-4">
799
799
  <div class="flex items-center space-x-2">
800
- <span class="px-2.5 py-0.5 rounded-full text-xs font-bold bg-emerald-500/20 text-emerald-300 border border-emerald-500/30 uppercase">v1.2.1 Mới</span>
801
- <h2 class="text-2xl sm:text-3xl font-extrabold text-white">
800
+ <span class="px-2.5 py-0.5 rounded-full text-xs font-bold bg-emerald-500/20 text-emerald-300 border border-emerald-500/30 uppercase" data-i18n="hit_badge">v1.2.2 Mới</span>
801
+ <h2 class="text-2xl sm:text-3xl font-extrabold text-white" data-i18n="hit_title">
802
802
  Vùng Bấm Động Từng Pixel, Chronometer &amp; Swift 6 Ready
803
803
  </h2>
804
804
  </div>
805
- <p class="mt-2 text-slate-400 text-sm sm:text-base leading-relaxed">
806
- Bản phát hành <strong>v1.2.1</strong> tái cấu trúc toàn diện hệ thống tương tác cảm ứng trên Android Home Screen Widgets, tích hợp đồng hồ đếm ngược phần cứng native và tương thích hoàn toàn <strong>Swift 6 Language Mode</strong> trên Xcode mới.
805
+ <p class="mt-2 text-slate-400 text-sm sm:text-base leading-relaxed" data-i18n="hit_desc">
806
+ Bản phát hành <strong>v1.2.2</strong> tái cấu trúc toàn diện hệ thống tương tác cảm ứng trên Android Home Screen Widgets, tích hợp đồng hồ đếm ngược phần cứng native và tương thích hoàn toàn <strong>Swift 6 Language Mode</strong> trên Xcode mới.
807
807
  </p>
808
808
  </div>
809
809
 
@@ -811,9 +811,9 @@ export default function PreviewScreen() {
811
811
  <div class="bg-darkCard border border-cardBorder rounded-2xl p-6 space-y-3">
812
812
  <h3 class="font-bold text-white text-base flex items-center space-x-2">
813
813
  <i data-lucide="crosshair" class="w-5 h-5 text-emerald-400"></i>
814
- <span>1. Exact Dynamic Hit Layer (<code>rn_hit_layer</code>)</span>
814
+ <span data-i18n="hit_card1_title">1. Exact Dynamic Hit Layer (<code>rn_hit_layer</code>)</span>
815
815
  </h3>
816
- <p class="text-xs sm:text-sm text-slate-400 leading-relaxed">
816
+ <p class="text-xs sm:text-sm text-slate-400 leading-relaxed" data-i18n="hit_card1_desc">
817
817
  Thay thế hoàn toàn lưới cố định cũ bằng <code>FrameLayout</code> động (<code>rn_live_widget_hit_zone.xml</code>). Giải thuật <code>computeCanvasMapping</code> ánh xạ chính xác toạ độ từ Bitmap Canvas sang khung Launcher thật (xử lý bù viền <code>fitCenter</code> letterboxing). Bấm vào nút/checkbox nào ăn đúng 100% nút đó, vùng trống hoàn toàn không kích hoạt nhầm.
818
818
  </p>
819
819
  </div>
@@ -821,9 +821,9 @@ export default function PreviewScreen() {
821
821
  <div class="bg-darkCard border border-cardBorder rounded-2xl p-6 space-y-3">
822
822
  <h3 class="font-bold text-white text-base flex items-center space-x-2">
823
823
  <i data-lucide="timer" class="w-5 h-5 text-sky-400"></i>
824
- <span>2. Native Chronometer Countdown (Android)</span>
824
+ <span data-i18n="hit_card2_title">2. Native Chronometer Countdown (Android)</span>
825
825
  </h3>
826
- <p class="text-xs sm:text-sm text-slate-400 leading-relaxed">
826
+ <p class="text-xs sm:text-sm text-slate-400 leading-relaxed" data-i18n="hit_card2_desc">
827
827
  Tích hợp trực tiếp <code>android.widget.Chronometer</code> với <code>setChronometerCountDown(true)</code> và <code>baseMillis = SystemClock.elapsedRealtime() + remainingMillis</code>. Khi có timer đếm ngược, hệ thống ẩn text tĩnh trên Bitmap để đồng hồ native tự chạy giật lùi 1s/lần mà không phải vẽ lại ảnh Canvas.
828
828
  </p>
829
829
  </div>
@@ -831,9 +831,9 @@ export default function PreviewScreen() {
831
831
  <div class="bg-darkCard border border-cardBorder rounded-2xl p-6 space-y-3">
832
832
  <h3 class="font-bold text-white text-base flex items-center space-x-2">
833
833
  <i data-lucide="brackets" class="w-5 h-5 text-amber-400"></i>
834
- <span>3. Nội suy Biến động &amp; <code>defaultChecked</code> Store</span>
834
+ <span data-i18n="hit_card3_title">3. Nội suy Biến động &amp; <code>defaultChecked</code> Store</span>
835
835
  </h3>
836
- <p class="text-xs sm:text-sm text-slate-400 leading-relaxed">
836
+ <p class="text-xs sm:text-sm text-slate-400 leading-relaxed" data-i18n="hit_card3_desc">
837
837
  <code>DynamicWidgetStateStore</code> hỗ trợ nội suy chuỗi mẫu <code>{{id}}</code>, <code>{{title}}</code>, giá trị bộ đếm phẳng và tự động lưu trạng thái khởi tạo <code>defaultChecked</code> của công tắc <code>checked: true</code> ngay lần render đầu, giúp tắt công tắc mượt mà ngay lần chạm đầu tiên.
838
838
  </p>
839
839
  </div>
@@ -841,9 +841,9 @@ export default function PreviewScreen() {
841
841
  <div class="bg-darkCard border border-cardBorder rounded-2xl p-6 space-y-3">
842
842
  <h3 class="font-bold text-white text-base flex items-center space-x-2">
843
843
  <i data-lucide="shield-check" class="w-5 h-5 text-purple-400"></i>
844
- <span>4. Tương thích Swift 6 Language Mode (iOS)</span>
844
+ <span data-i18n="hit_card4_title">4. Tương thích Swift 6 Language Mode (iOS)</span>
845
845
  </h3>
846
- <p class="text-xs sm:text-sm text-slate-400 leading-relaxed">
846
+ <p class="text-xs sm:text-sm text-slate-400 leading-relaxed" data-i18n="hit_card4_desc">
847
847
  Khắc phục lỗi biên dịch <code>type '()' cannot conform to 'View'</code> trên Xcode mới bằng cách đóng gói closure cho <code>Font</code> trong <code>renderText()</code>, tách logic accessibility sang hàm thuần <code>buildAccessibilityView(content:) -&gt; AnyView</code>, và bổ sung <code>EmptyView()</code> cho các nhánh <code>ContainerStyleModifier</code>.
848
848
  </p>
849
849
  </div>
@@ -1583,7 +1583,7 @@ LiveActivity.onActivityUpdateTokenChange(({ activityId, token }) =&gt; {
1583
1583
  </div>
1584
1584
  </section>
1585
1585
 
1586
- <!-- Section: Architecture, Semantics & Roadmap (v1.2.1) -->
1586
+ <!-- Section: Architecture, Semantics & Roadmap (v1.2.2) -->
1587
1587
  <section id="ir-semantic" class="space-y-6">
1588
1588
  <div class="border-b border-cardBorder pb-4">
1589
1589
  <div class="flex items-center space-x-2">
@@ -1667,7 +1667,7 @@ console.log(ir.renderStrategy, ir.semanticSummary);</code></pre>
1667
1667
  <div id="capability-matrix" class="bg-darkCard border border-cardBorder rounded-2xl p-6 space-y-5">
1668
1668
  <h3 class="font-bold text-white text-lg flex items-center space-x-2">
1669
1669
  <i data-lucide="table" class="w-5 h-5 text-emerald-400"></i>
1670
- <span>Bảng Năng lực Nền tảng &amp; Lộ trình Phát triển 6 Phases (v1.2.1 Hoàn thiện 100%)</span>
1670
+ <span>Bảng Năng lực Nền tảng &amp; Lộ trình Phát triển 6 Phases (v1.2.2 Hoàn thiện 100%)</span>
1671
1671
  </h3>
1672
1672
 
1673
1673
  <div class="overflow-x-auto">
@@ -1715,7 +1715,7 @@ console.log(ir.renderStrategy, ir.semanticSummary);</code></pre>
1715
1715
  <tr class="border-b border-cardBorder text-slate-400">
1716
1716
  <th class="py-2 pr-3 font-semibold">Phase</th>
1717
1717
  <th class="py-2 pr-3 font-semibold">Nội dung kiến trúc</th>
1718
- <th class="py-2 font-semibold">Trạng thái v1.2.1</th>
1718
+ <th class="py-2 font-semibold">Trạng thái v1.2.2</th>
1719
1719
  </tr>
1720
1720
  </thead>
1721
1721
  <tbody class="divide-y divide-cardBorder text-slate-300">
@@ -1805,7 +1805,7 @@ const cleanedIds = await LiveActivity.cleanupExpired();</code></pre>
1805
1805
  <strong>Ảnh từ URL mạng (<code>https://...</code>) không hiện trên Widget:</strong> Đảm bảo URL là HTTPS hợp lệ; thư viện tự tải ngầm, nén xuống 360px để không vượt giới hạn 30MB của WidgetKit và reload lại Widget khi tải xong.
1806
1806
  </li>
1807
1807
  <li>
1808
- <strong>Lỗi build Swift 6 <code>type '()' cannot conform to 'View'</code> trên Xcode mới:</strong> Cập nhật lên phiên bản <strong><code>1.2.1</code></strong> trở lên (<code>npm install react-native-live-widgets@latest</code>).
1808
+ <strong>Lỗi build Swift 6 <code>type '()' cannot conform to 'View'</code> trên Xcode mới:</strong> Cập nhật lên phiên bản <strong><code>1.2.2</code></strong> trở lên (<code>npm install react-native-live-widgets@latest</code>).
1809
1809
  </li>
1810
1810
  </ul>
1811
1811
  </div>
@@ -1852,7 +1852,7 @@ const cleanedIds = await LiveActivity.cleanupExpired();</code></pre>
1852
1852
  </div>
1853
1853
  </div>
1854
1854
  <p class="text-xs text-slate-400 leading-relaxed">
1855
- Tóm tắt xúc tích về toàn bộ API, UI IR, cấu trúc JSON AST và quy tắc vàng giúp AI lập trình widget chính xác trên v1.2.1.
1855
+ Tóm tắt xúc tích về toàn bộ API, UI IR, cấu trúc JSON AST và quy tắc vàng giúp AI lập trình widget chính xác trên v1.2.2.
1856
1856
  </p>
1857
1857
  <div class="relative">
1858
1858
  <button onclick="copyCode(this)" class="absolute top-2 right-2 text-xs bg-slate-800 text-slate-300 px-2 py-0.5 rounded">Copy</button>
@@ -2242,7 +2242,8 @@ useWidgetAction('INCREMENT', () => {
2242
2242
  // Multilingual i18n Dictionary (Vietnamese & English)
2243
2243
  const translations = {
2244
2244
  vi: {
2245
- announcement_tag: 'Mới v1.2.1',
2245
+ version_tag: 'v1.2.2',
2246
+ announcement_tag: 'Mới v1.2.2',
2246
2247
  announcement_text: 'Exact Dynamic Hit Layer, Native Chronometer Countdown, Swift 6 Ready & Chuẩn hoá <strong>UI IR</strong>',
2247
2248
  announcement_link: 'Xem chi tiết &rarr;',
2248
2249
  brand_subtitle: 'Declarative Widgets & Dynamic Island Engine',
@@ -2282,20 +2283,79 @@ useWidgetAction('INCREMENT', () => {
2282
2283
  f5_desc: 'Hàm Widget.setRemoteConfig() cho phép cấu hình URL API ngầm để hệ điều hành iOS/Android tự động fetch dữ liệu mới cho Widget kể cả khi ứng dụng đã bị tắt.',
2283
2284
  f6_title: 'Chuẩn AI Agent (llms.txt)',
2284
2285
  f6_desc: 'Sẵn sàng 100% cho ChatGPT, Claude Code, Cursor, Antigravity thông qua llms.txt và SKILL.md. Agent của bạn có thể tự lập trình widget không lỗi.',
2286
+
2287
+ // Quick Start Section
2288
+ qs_title: 'Khởi Đầu Cực Nhanh Trong 3 Phút',
2289
+ qs_desc: 'Lựa chọn phương thức thiết lập phù hợp với dự án của bạn: All-in-One CLI tự động hoàn toàn hoặc tích hợp thủ công.',
2290
+ expo_card_title: 'Dự án Expo (EAS Build / Prebuild)',
2291
+ expo_card_desc: 'Thêm plugin vào <code>app.json</code> / <code>app.config.js</code> và kích hoạt quyền cần thiết.',
2292
+ expo_plugin_label: 'Cấu hình Config Plugin trong <code>app.json</code>:',
2293
+ bare_card_title: 'Dự án Bare React Native CLI',
2294
+ codegen_card_title: 'Tự động sinh mã Native với CLI',
2295
+ codegen_card_desc: 'Sử dụng lệnh CLI tích hợp sẵn để tự động cấu hình Target iOS Extension và Android Widget Provider mà không phải mở Xcode / Android Studio.',
2296
+
2297
+ // Exact Hit Layer Section (v1.2.2)
2298
+ hit_badge: 'V1.2.2 MỚI',
2299
+ hit_title: 'Vùng Bấm Động Từng Pixel, Chronometer &amp; Swift 6 Ready',
2300
+ hit_desc: 'Bản phát hành <strong>v1.2.2</strong> tái cấu trúc toàn diện hệ thống tương tác cảm ứng trên Android Home Screen Widgets, tích hợp đồng hồ đếm ngược phần cứng native và tương thích hoàn toàn <strong>Swift 6 Language Mode</strong> trên Xcode mới.',
2301
+ hit_card1_title: '1. Exact Dynamic Hit Layer (<code>rn_hit_layer</code>)',
2302
+ hit_card1_desc: 'Thay thế hoàn toàn lưới cố định cũ bằng <code>FrameLayout</code> động (<code>rn_live_widget_hit_zone.xml</code>). Giải thuật <code>computeCanvasMapping</code> ánh xạ chính xác toạ độ từ Bitmap Canvas sang khung Launcher thật (xử lý bù viền <code>fitCenter</code> letterboxing). Bấm vào nút/checkbox nào ăn đúng 100% nút đó, vùng trống hoàn toàn không kích hoạt nhầm.',
2303
+ hit_card2_title: '2. Native Chronometer Countdown (Android)',
2304
+ hit_card2_desc: 'Tích hợp trực tiếp <code>android.widget.Chronometer</code> với <code>setChronometerCountDown(true)</code> và <code>baseMillis = SystemClock.elapsedRealtime() + remainingMillis</code>. Khi có timer đếm ngược, hệ thống ẩn text tĩnh trên Bitmap để đồng hồ native tự chạy giật lùi 1s/lần mà không phải vẽ lại ảnh Canvas.',
2305
+ hit_card3_title: '3. Nội suy Biến động &amp; <code>defaultChecked</code> Store',
2306
+ hit_card3_desc: '<code>DynamicWidgetStateStore</code> hỗ trợ nội suy chuỗi mẫu <code>{{id}}</code>, <code>{{title}}</code>, giá trị bộ đếm phẳng và tự động lưu trạng thái khởi tạo <code>defaultChecked</code> của công tắc <code>checked: true</code> ngay lần render đầu, giúp tắt công tắc mượt mà ngay lần chạm đầu tiên.',
2307
+ hit_card4_title: '4. Tương thích Swift 6 Language Mode (iOS)',
2308
+ hit_card4_desc: 'Khắc phục lỗi biên dịch <code>type \'()\' cannot conform to \'View\'</code> trên Xcode mới bằng cách đóng gói closure cho <code>Font</code> trong <code>renderText()</code>, tách logic accessibility sang hàm thuần <code>buildAccessibilityView(content:) -&gt; AnyView</code>, và bổ sung <code>EmptyView()</code> cho các nhánh <code>ContainerStyleModifier</code>.',
2309
+
2310
+ // DSL Image
2285
2311
  dsl_image_title: 'Hình ảnh & Biểu tượng Hệ thống: <code>UI.Image</code> & <code>&lt;Image&gt;</code>',
2286
2312
  dsl_image_desc: 'Hỗ trợ <strong>5 nguồn ảnh</strong>: <code>url</code> (tự tải ngầm, nén tối đa 360px tránh vượt ngưỡng 30MB WidgetKit và lưu vào App Group cache), <code>base64</code> (QR/Barcode), <code>systemName</code>, <code>assetName</code>, và <code>filePath</code>. Đặc biệt hỗ trợ icon hệ thống đa nền tảng chuyên biệt: <code>systemNameIos</code> (Apple SF Symbols) và <code>systemNameAndroid</code> (Google Material Icons) với gợi ý type IntelliSense đầy đủ.',
2313
+
2314
+ // Sidebar Elements
2315
+ side_header_start: 'Bắt đầu',
2287
2316
  side_quick_start: 'Cài đặt All-in-One CLI',
2288
2317
  side_expo_setup: 'Expo (Config Plugin & CNG)',
2289
2318
  side_bare_rn: 'Bare React Native CLI',
2290
- side_jsx_support: 'Cú pháp JSX / TSX & StyleSheet',
2319
+ side_header_syntax: 'Cú pháp &amp; UI Engine',
2320
+ side_jsx_support: 'Cú pháp JSX / TSX &amp; StyleSheet',
2291
2321
  side_widget_preview: 'Mô phỏng &lt;WidgetPreview&gt;',
2292
- side_exact_hit: 'Exact Hit Layer & Chronometer (v1.2.1)',
2293
- side_dsl_image: 'UI.Image & System Icons (Apple / Google)',
2322
+ side_exact_hit: 'Exact Hit Layer &amp; Chronometer (v1.2.2)',
2323
+ side_dsl_containers: 'VStack, HStack, ZStack, Grid, Divider',
2324
+ side_dsl_text: 'UI.Text, UI.Badge &amp; Biến động',
2325
+ side_dsl_image: 'UI.Image &amp; System Icons (Apple / Google)',
2326
+ side_dsl_timer: 'UI.Timer (Đếm giờ phần cứng)',
2327
+ side_dsl_progress: 'UI.Progress (Bar, Segmented, Circle)',
2328
+ side_dsl_equalizer: 'UI.Equalizer (Sóng âm)',
2329
+ side_dsl_gauge: 'UI.Gauge 240° &amp; UI.Chart',
2330
+ side_dsl_interactive: 'UI.Button, UI.Toggle &amp; UI.Link',
2331
+ side_dsl_custom: 'UI.Custom &amp; DynamicNodeRegistry',
2332
+ side_styling: 'Gradient, Shadow, Border, Tinted',
2333
+ side_header_api: 'API Reference &amp; Hooks',
2334
+ side_api_liveactivity: 'LiveActivity &amp; Dynamic Island',
2335
+ side_api_widget: 'Widget API, Multi-page &amp; Lock Screen',
2336
+ side_api_hooks: 'React Hooks &amp; SharedStorage',
2337
+ side_api_remote: 'Remote API Sync (Kill App)',
2338
+ side_api_push: 'APNs &amp; FCM Push Tokens',
2339
+ side_header_arch: 'Kiến trúc &amp; Tối ưu',
2340
+ side_ir_semantic: 'UI Intermediate Representation (IR)',
2341
+ side_a11y: 'Accessibility &amp; VoiceOver / TalkBack',
2342
+ side_capability: 'Ma trận Tính năng &amp; Nền tảng',
2343
+ side_standby: 'Chế độ StandBy &amp; Always-On Display',
2344
+ side_troubleshoot: 'Khắc phục sự cố &amp; Lưu ý',
2345
+ side_header_ai: 'Tích hợp AI &amp; Agent',
2346
+ side_llms: 'Chuẩn llms.txt',
2347
+ side_skill: 'AI Agent Skill (Antigravity/Claude)',
2348
+ side_header_resources: 'Tài nguyên &amp; Liên kết',
2349
+ side_res_web: 'Web Docs Chính Thức ↗',
2350
+ side_res_guide_vi: 'Hướng Dẫn Chi Tiết (VI) ↗',
2351
+ side_res_guide_en: 'English Full Guide ↗',
2352
+
2294
2353
  footer_dev: 'react-native-live-widgets — Phát triển bởi <strong>Trần Tuấn Vũ</strong>',
2295
2354
  footer_sub: 'Giấy phép mã nguồn mở MIT • Sẵn sàng cho Production',
2296
2355
  },
2297
2356
  en: {
2298
- announcement_tag: 'New v1.2.1',
2357
+ version_tag: 'v1.2.2',
2358
+ announcement_tag: 'New v1.2.2',
2299
2359
  announcement_text: 'Exact Dynamic Hit Layer, Native Chronometer Countdown, Swift 6 Ready & Standardized <strong>UI IR</strong>',
2300
2360
  announcement_link: 'Learn more &rarr;',
2301
2361
  brand_subtitle: 'Declarative Widgets & Dynamic Island Engine',
@@ -2335,15 +2395,73 @@ useWidgetAction('INCREMENT', () => {
2335
2395
  f5_desc: 'Widget.setRemoteConfig() lets the operating system autonomously fetch JSON from remote REST endpoints and update widgets even when the app is force-closed.',
2336
2396
  f6_title: 'AI Agent Standard (llms.txt)',
2337
2397
  f6_desc: '100% optimized for Claude Code, ChatGPT, Cursor, and Antigravity through llms.txt and SKILL.md. Your coding agent can build error-free widgets.',
2398
+
2399
+ // Quick Start Section
2400
+ qs_title: 'Get Started in Under 3 Minutes',
2401
+ qs_desc: 'Choose the setup method that fits your project: fully automated All-in-One CLI or manual integration.',
2402
+ expo_card_title: 'Expo Project (EAS Build / Prebuild)',
2403
+ expo_card_desc: 'Add plugin to <code>app.json</code> / <code>app.config.js</code> and enable required permissions.',
2404
+ expo_plugin_label: 'Configure Config Plugin in <code>app.json</code>:',
2405
+ bare_card_title: 'Bare React Native CLI Project',
2406
+ codegen_card_title: 'Auto Code Generation via CLI',
2407
+ codegen_card_desc: 'Use the built-in CLI command to automatically configure iOS Extension targets and Android Widget Providers without manually editing Xcode or Android Studio.',
2408
+
2409
+ // Exact Hit Layer Section (v1.2.2)
2410
+ hit_badge: 'V1.2.2 NEW',
2411
+ hit_title: 'Pixel-Exact Dynamic Hit Layer, Chronometer &amp; Swift 6 Ready',
2412
+ hit_desc: 'Release <strong>v1.2.2</strong> introduces a full overhaul of Android Home Screen Widget touch interaction, native hardware countdown chronometers, and full <strong>Swift 6 Language Mode</strong> compatibility on modern Xcode.',
2413
+ hit_card1_title: '1. Exact Dynamic Hit Layer (<code>rn_hit_layer</code>)',
2414
+ hit_card1_desc: 'Completely replaces the legacy fixed grid with a dynamic <code>FrameLayout</code> layer (<code>rn_live_widget_hit_zone.xml</code>). The <code>computeCanvasMapping</code> algorithm maps exact coordinates from Bitmap Canvas to real launcher bounds (handling <code>fitCenter</code> letterbox padding). Every button and checkbox triggers with 100% precision, while empty areas never misfire.',
2415
+ hit_card2_title: '2. Native Chronometer Countdown (Android)',
2416
+ hit_card2_desc: 'Directly integrates <code>android.widget.Chronometer</code> with <code>setChronometerCountDown(true)</code> and <code>baseMillis = SystemClock.elapsedRealtime() + remainingMillis</code>. When countdown timers are active, static text is hidden from the bitmap so native hardware ticks down every second without canvas redraws.',
2417
+ hit_card3_title: '3. Variable Interpolation &amp; <code>defaultChecked</code> Store',
2418
+ hit_card3_desc: '<code>DynamicWidgetStateStore</code> supports template string interpolation for <code>{{id}}</code>, <code>{{title}}</code>, flat counter values, and automatically persists initial <code>defaultChecked</code> states for <code>checked: true</code> toggles on first render for seamless toggle behavior.',
2419
+ hit_card4_title: '4. Swift 6 Language Mode Ready (iOS)',
2420
+ hit_card4_desc: 'Resolves Xcode compiler errors (such as <code>type \'()\' cannot conform to \'View\'</code>) by wrapping font closures inside <code>renderText()</code>, isolating accessibility into <code>buildAccessibilityView(content:) -&gt; AnyView</code>, and adding <code>EmptyView()</code> fallbacks for <code>ContainerStyleModifier</code> branches.',
2421
+
2422
+ // DSL Image
2338
2423
  dsl_image_title: 'Images & System Icons: <code>UI.Image</code> & <code>&lt;Image&gt;</code>',
2339
2424
  dsl_image_desc: 'Supports <strong>5 image sources</strong>: <code>url</code> (auto-downloaded, downscaled to 360px max dimension, and cached), <code>base64</code> (QR/Barcode), <code>systemName</code>, <code>assetName</code>, and <code>filePath</code>. Features dedicated cross-platform props <code>systemNameIos</code> (Apple SF Symbols) and <code>systemNameAndroid</code> (Google Material Icons) with full TypeScript auto-complete.',
2425
+
2426
+ // Sidebar Elements
2427
+ side_header_start: 'Getting Started',
2340
2428
  side_quick_start: 'All-in-One CLI Setup',
2341
2429
  side_expo_setup: 'Expo (Config Plugin & CNG)',
2342
2430
  side_bare_rn: 'Bare React Native CLI',
2343
- side_jsx_support: 'JSX / TSX & StyleSheet Syntax',
2344
- side_widget_preview: '<WidgetPreview> Simulation',
2345
- side_exact_hit: 'Exact Hit Layer & Chronometer (v1.2.1)',
2346
- side_dsl_image: 'UI.Image & System Icons (Apple / Google)',
2431
+ side_header_syntax: 'Syntax &amp; UI Engine',
2432
+ side_jsx_support: 'JSX / TSX &amp; StyleSheet Syntax',
2433
+ side_widget_preview: '&lt;WidgetPreview&gt; Simulation',
2434
+ side_exact_hit: 'Exact Hit Layer &amp; Chronometer (v1.2.2)',
2435
+ side_dsl_containers: 'VStack, HStack, ZStack, Grid, Divider',
2436
+ side_dsl_text: 'UI.Text, UI.Badge &amp; Variables',
2437
+ side_dsl_image: 'UI.Image &amp; System Icons (Apple / Google)',
2438
+ side_dsl_timer: 'UI.Timer (Hardware Countdown)',
2439
+ side_dsl_progress: 'UI.Progress (Bar, Segmented, Circle)',
2440
+ side_dsl_equalizer: 'UI.Equalizer (Sound Waves)',
2441
+ side_dsl_gauge: 'UI.Gauge 240° &amp; UI.Chart',
2442
+ side_dsl_interactive: 'UI.Button, UI.Toggle &amp; UI.Link',
2443
+ side_dsl_custom: 'UI.Custom &amp; DynamicNodeRegistry',
2444
+ side_styling: 'Gradient, Shadow, Border, Tinted',
2445
+ side_header_api: 'API Reference &amp; Hooks',
2446
+ side_api_liveactivity: 'LiveActivity &amp; Dynamic Island',
2447
+ side_api_widget: 'Widget API, Multi-page &amp; Lock Screen',
2448
+ side_api_hooks: 'React Hooks &amp; SharedStorage',
2449
+ side_api_remote: 'Remote API Sync (Kill App)',
2450
+ side_api_push: 'APNs &amp; FCM Push Tokens',
2451
+ side_header_arch: 'Architecture &amp; Optimizations',
2452
+ side_ir_semantic: 'UI Intermediate Representation (IR)',
2453
+ side_a11y: 'Accessibility &amp; VoiceOver / TalkBack',
2454
+ side_capability: 'Feature &amp; Platform Matrix',
2455
+ side_standby: 'StandBy Mode &amp; Always-On Display',
2456
+ side_troubleshoot: 'Troubleshooting &amp; FAQ',
2457
+ side_header_ai: 'AI Agents &amp; Standards',
2458
+ side_llms: 'llms.txt Standard',
2459
+ side_skill: 'AI Agent Skill (Antigravity/Claude)',
2460
+ side_header_resources: 'Resources &amp; Links',
2461
+ side_res_web: 'Official Web Docs ↗',
2462
+ side_res_guide_vi: 'Detailed Guide (VI) ↗',
2463
+ side_res_guide_en: 'English Full Guide ↗',
2464
+
2347
2465
  footer_dev: 'react-native-live-widgets — Developed by <strong>Vu Tran</strong>',
2348
2466
  footer_sub: 'MIT Open Source License • Production Ready',
2349
2467
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-live-widgets",
3
- "version": "1.2.2",
3
+ "version": "1.2.3",
4
4
  "description": "All-in-One Live Activities (iOS 16.1+ WidgetKit / Dynamic Island), Live Updates (Android 16+ ProgressStyle) and Interactive Multi-Page Home Screen Widgets for React Native & Expo with Declarative Dynamic UI Engine",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",