@lovalingo/lovalingo 0.3.4 → 0.4.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.
package/README.md CHANGED
@@ -31,6 +31,16 @@ npm install @lovalingo/lovalingo react-router-dom
31
31
 
32
32
  Pricing and onboarding: https://lovalingo.com
33
33
 
34
+ ## API endpoint (recommended default)
35
+
36
+ By default the runtime uses `https://cdn.lovalingo.com` (Cloudflare edge) for `bootstrap/bundle/dom-rules`.
37
+
38
+ You can override it (advanced):
39
+
40
+ ```tsx
41
+ <LovalingoProvider apiBase="https://<your-supabase-project>.supabase.co" ... />
42
+ ```
43
+
34
44
  ## React Router
35
45
 
36
46
  ### Query mode (default)
@@ -11,7 +11,7 @@ const LOCALE_STORAGE_KEY = 'Lovalingo_locale';
11
11
  const LOADING_BG_STORAGE_PREFIX = "Lovalingo_loading_bg_color";
12
12
  const BRANDING_STORAGE_PREFIX = "Lovalingo_branding_enabled";
13
13
  const CRITICAL_CACHE_PREFIX = "Lovalingo_critical_v0_3";
14
- export const LovalingoProvider = ({ children, apiKey: apiKeyProp, publicAnonKey, defaultLocale, locales, apiBase = 'https://leuskvkajliuzalrlwhw.supabase.co', routing = 'query', // Default to query mode (backward compatible)
14
+ export const LovalingoProvider = ({ children, apiKey: apiKeyProp, publicAnonKey, defaultLocale, locales, apiBase = 'https://cdn.lovalingo.com', routing = 'query', // Default to query mode (backward compatible)
15
15
  autoPrefixLinks = true, autoApplyRules = true, switcherPosition = 'bottom-right', switcherOffsetY = 20, switcherTheme = 'dark', editMode: initialEditMode = false, editKey = 'KeyE', pathNormalization = { enabled: true }, // Enable by default
16
16
  mode = 'dom', // Default to legacy DOM mode for backward compatibility
17
17
  sitemap = true, // Default: true - Auto-inject sitemap link tag
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lovalingo/lovalingo",
3
- "version": "0.3.4",
3
+ "version": "0.4.0",
4
4
  "description": "React translation runtime with i18n routing, deterministic bundles + DOM rules, and zero-flash rendering.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",