docthub-core-components 3.3.21 → 3.3.23

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.
@@ -28,7 +28,7 @@ const t = {
28
28
  paymentPolicy: "https://dev.dochub.in/payment-policy/",
29
29
  disclaimerPolicy: "https://dev.dochub.in/disclaimer-policy/",
30
30
  blogs: "https://blogs.dochub.in/",
31
- jobsDropYourResume: "https://jobs.dochub.in/drop-your-resume",
31
+ jobsDropYourResume: "https://jobsv2.dochub.in/drop-your-resume",
32
32
  // Due to removing localization, `/en` is omitted from enterprise login/register URLs (QA + PROD).
33
33
  enterpriseLogin: "https://enterprise.dochub.in/login/",
34
34
  // When domain is changed to enterprise.dochub.in, update the URL
@@ -3,29 +3,29 @@ const f = ["localhost", "127.0.0.1", "[::1]"];
3
3
  function d(n) {
4
4
  return f.some((o) => n === o);
5
5
  }
6
- function l(n) {
6
+ function p(n) {
7
7
  return n.endsWith(".com");
8
8
  }
9
- function p(n) {
9
+ function l(n) {
10
10
  return n.endsWith(".in");
11
11
  }
12
12
  function s(n) {
13
13
  const o = n.toLowerCase();
14
- return d(o) ? "qa" : l(o) ? "production" : p(o) ? "qa" : null;
14
+ return d(o) ? "qa" : p(o) ? "production" : l(o) ? "qa" : null;
15
15
  }
16
16
  function u(n) {
17
17
  return n ? n === "production" || n === "prod" ? "production" : n === "qa" || n === "dev" ? "qa" : null : null;
18
18
  }
19
19
  function a() {
20
- var e;
21
- const n = typeof import.meta < "u" ? import.meta : void 0, o = u((e = n == null ? void 0 : n.env) == null ? void 0 : e.VITE_NAV_ENV);
20
+ var r;
21
+ const n = typeof import.meta < "u" ? import.meta : void 0, o = u((r = n == null ? void 0 : n.env) == null ? void 0 : r.VITE_NAV_ENV);
22
22
  if (o !== null) return o;
23
23
  if (typeof process < "u") {
24
- const i = u(process.env.NEXT_PUBLIC_NAV_ENV);
25
- if (i !== null) return i;
26
- const t = process.env.NODE_ENV, r = u(t);
27
- if (r !== null && !(t === "production" && typeof window < "u"))
28
- return r;
24
+ const e = u(process.env.NEXT_PUBLIC_NAV_ENV);
25
+ if (e !== null) return e;
26
+ const t = process.env.NODE_ENV;
27
+ if (t === "qa" || t === "dev") return "qa";
28
+ if (t === "prod") return "production";
29
29
  }
30
30
  return null;
31
31
  }
@@ -40,7 +40,7 @@ function v() {
40
40
  }
41
41
  }
42
42
  function c() {
43
- var o, e, i;
43
+ var o, r, e;
44
44
  const n = a();
45
45
  if (n !== null) return n;
46
46
  if (typeof window < "u" && ((o = window.location) != null && o.hostname)) {
@@ -50,19 +50,19 @@ function c() {
50
50
  if (typeof window > "u") {
51
51
  const t = v();
52
52
  if (t !== null) return t;
53
- const r = typeof import.meta < "u" ? import.meta : void 0;
54
- if ((e = r == null ? void 0 : r.env) != null && e.PROD || typeof process < "u" && ((i = process.env) == null ? void 0 : i.NODE_ENV) === "production") return "production";
53
+ const i = typeof import.meta < "u" ? import.meta : void 0;
54
+ if ((r = i == null ? void 0 : i.env) != null && r.PROD || typeof process < "u" && ((e = process.env) == null ? void 0 : e.NODE_ENV) === "production") return "production";
55
55
  }
56
56
  return "qa";
57
57
  }
58
- function m() {
58
+ function E() {
59
59
  return c() === "production";
60
60
  }
61
- function E() {
61
+ function m() {
62
62
  return c() === "qa";
63
63
  }
64
64
  export {
65
- m as isProdNav,
66
- E as isQaNav,
65
+ E as isProdNav,
66
+ m as isQaNav,
67
67
  c as resolveNavEnv
68
68
  };
@@ -3,8 +3,8 @@
3
3
  * Used by both individual and organization nav menus.
4
4
  *
5
5
  * Resolution order:
6
- * 1. Explicit override — `VITE_NAV_ENV`, then `NEXT_PUBLIC_NAV_ENV`, then `NODE_ENV`
7
- * (same values; `NEXT_PUBLIC_NAV_ENV` wins over `NODE_ENV` when both are set)
6
+ * 1. Explicit override — `VITE_NAV_ENV`, then `NEXT_PUBLIC_NAV_ENV`, then custom
7
+ * `NODE_ENV` (`qa` / `dev` / `prod` only; `NEXT_PUBLIC_NAV_ENV` wins when both set)
8
8
  * 2. `window.location.hostname` — localhost → QA; *.com → prod; *.in → QA
9
9
  * 3. SSR only — parse `NEXT_PUBLIC_BASE_URL` hostname (Next.js) when `window` is unavailable
10
10
  * 4. `import.meta.env.PROD` — Vite prod build (SSR fallback)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "docthub-core-components",
3
- "version": "3.3.21",
3
+ "version": "3.3.23",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",