@sanvika/ui 0.3.0 → 0.3.2

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.0",
3
+ "version": "0.3.2",
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",
@@ -34,6 +34,11 @@
34
34
  "react": ">=18.0.0",
35
35
  "react-dom": ">=18.0.0"
36
36
  },
37
+ "scripts": {
38
+ "build": "rollup -c rollup.config.js",
39
+ "build:lib": "rollup -c rollup.config.js",
40
+ "prepublishOnly": "rollup -c rollup.config.js"
41
+ },
37
42
  "devDependencies": {
38
43
  "@babel/core": "^7.29.0",
39
44
  "@babel/preset-react": "^7.28.5",
@@ -41,9 +46,5 @@
41
46
  "@rollup/plugin-node-resolve": "^16.0.3",
42
47
  "rollup": "^4.60.1",
43
48
  "rollup-plugin-postcss": "^4.0.2"
44
- },
45
- "scripts": {
46
- "build": "rollup -c rollup.config.js",
47
- "build:lib": "rollup -c rollup.config.js"
48
49
  }
49
- }
50
+ }
@@ -1,6 +1,6 @@
1
1
  // src/layouts/Layout.jsx
2
- import Navbar from "../components/layout/Navbar";
3
- import Footer from "../components/layout/Footer";
2
+ import Navbar from "../components/layout/Navbar.jsx";
3
+ import Footer from "../components/layout/Footer.jsx";
4
4
  import styles from "../styles/components/layouts/Layout.module.css";
5
5
 
6
6
  /**
@@ -1,7 +1,7 @@
1
1
  // @sanvika/ui/server v0.3.0
2
2
  // HTTP client for ui.sanvikaproduction.com — cloud-driven Navbar configs and Theme presets.
3
3
  // Universal S2S Auth Pattern (ecosystem rule §21):
4
- // PROJECT_NAME — clientId
4
+ // CLIENT_ID — clientId
5
5
  // SANVIKA_SERVICE_KEY — Tier 1 trust
6
6
  // UI_URL — service endpoint
7
7
  // UI_CLIENT_SECRET — (optional, Tier 2 fallback for 3rd-party)
@@ -24,11 +24,11 @@ export class SanvikaUI {
24
24
 
25
25
  constructor({ url, clientId, serviceKey, secret } = {}) {
26
26
  const finalUrl = url || _readEnv("UI_URL");
27
- const finalClientId = clientId || _readEnv("PROJECT_NAME") || _readEnv("UI_CLIENT_ID");
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
30
  if (!finalUrl || !finalClientId) {
31
- throw new Error("@sanvika/ui/server: UI_URL and PROJECT_NAME are required");
31
+ throw new Error("@sanvika/ui/server: UI_URL and CLIENT_ID are required");
32
32
  }
33
33
  this.#url = finalUrl.replace(/\/$/, "");
34
34
  this.#clientId = finalClientId;