@sanvika/ui 0.3.3 → 0.3.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sanvika/ui",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "type": "module",
5
5
  "private": false,
6
6
  "description": "Sanvika Production — shared UI component library for 50+ projects (pure JS, CSS Modules, props-driven) + cloud-driven Navbar/Theme presets via ui.sanvikaproduction.com",
@@ -1,3 +1,2 @@
1
1
  // @sanvika/ui/react-native — ThemeProvider + FAPK palette (no DOM/CSS)
2
2
  export { ThemeProvider, useTheme, ThemeContext, FAPK_THEME_COLORS } from './ThemeProvider.jsx';
3
- export { FAPK_THEME_COLORS as themeColors } from './themeColors.js';
@@ -23,12 +23,12 @@ export class SanvikaUI {
23
23
  #secret;
24
24
 
25
25
  constructor({ url, clientId, serviceKey, secret } = {}) {
26
- const finalUrl = url || _readEnv("UI_URL");
26
+ const finalUrl = url || _readEnv("UI_URL") || "https://ui.sanvikaproduction.com";
27
27
  const finalClientId = clientId || _readEnv("CLIENT_ID") || _readEnv("UI_CLIENT_ID");
28
28
  const finalServiceKey = serviceKey || _readEnv("SANVIKA_SERVICE_KEY") || "";
29
29
  const finalSecret = secret || _readEnv("UI_CLIENT_SECRET") || ""; // Tier 2 fallback (optional)
30
- if (!finalUrl || !finalClientId) {
31
- throw new Error("@sanvika/ui/server: UI_URL and CLIENT_ID are required");
30
+ if (!finalClientId) {
31
+ throw new Error("@sanvika/ui/server: CLIENT_ID is required");
32
32
  }
33
33
  this.#url = finalUrl.replace(/\/$/, "");
34
34
  this.#clientId = finalClientId;