@navservice/usuario 1.59.0 → 1.61.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/build/es/index.js CHANGED
@@ -2389,7 +2389,7 @@ const _session_storage = new class {
2389
2389
  }
2390
2390
  get_item_session_storage(chave) {
2391
2391
  try {
2392
- if ("undefined" != typeof window) {
2392
+ if ("u" > typeof window) {
2393
2393
  const valorAtual = window.sessionStorage.getItem(chave);
2394
2394
  return valorAtual ? JSON.parse(valorAtual) : valorAtual;
2395
2395
  }
@@ -2748,7 +2748,7 @@ const _local_storage = new class {
2748
2748
  }
2749
2749
  get_item_local_storage(chave) {
2750
2750
  try {
2751
- if ("undefined" != typeof window) {
2751
+ if ("u" > typeof window) {
2752
2752
  const valorAtual = window.localStorage.getItem(chave);
2753
2753
  return valorAtual ? JSON.parse(valorAtual) : valorAtual;
2754
2754
  }
@@ -4048,7 +4048,7 @@ const DrawerPadrao = /*#__PURE__*/ forwardRef(({ title, children, onClose }, ref
4048
4048
  ref: closeBtnRef,
4049
4049
  onClick: ()=>ref?.current?.fechar(),
4050
4050
  "aria-label": "Fechar",
4051
- className: " inline-flex items-center justify-center h-9 w-9 rounded-full border border-theme-border bg-theme-bg text-basic-400 hover:bg-default-800 focus:outline-none focus:ring-2 focus:ring-primary-600 transition ",
4051
+ className: " inline-flex items-center justify-center h-9 w-9 rounded-full border border-theme-border bg-theme-bg text-basic-400 hover:bg-default-800 focus:outline-none focus:ring-2 focus:ring-primary-600 transition ",
4052
4052
  children: /*#__PURE__*/ jsx(X, {
4053
4053
  className: "h-4 w-4"
4054
4054
  })
@@ -4514,7 +4514,7 @@ const EnviarCodigoOtpParaEmail_EnviarCodigoOtpEmail = /*#__PURE__*/ forwardRef(f
4514
4514
  type: "button",
4515
4515
  onClick: confirmarCodigo,
4516
4516
  disabled: !otpCompleto,
4517
- className: " relative w-full rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 text-white py-3.5 text-sm font-bold flex items-center justify-center gap-2 transition-all shadow-lg shadow-blue-500/25 hover:shadow-blue-500/40 disabled:opacity-50 disabled:cursor-not-allowed disabled:grayscale-[0.5] overflow-hidden ",
4517
+ className: " relative w-full rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 text-white py-3.5 text-sm font-bold flex items-center justify-center gap-2 transition-all shadow-lg shadow-blue-500/25 hover:shadow-blue-500/40 disabled:opacity-50 disabled:cursor-not-allowed disabled:grayscale-[0.5] overflow-hidden ",
4518
4518
  children: [
4519
4519
  /*#__PURE__*/ jsx(CircleCheck, {
4520
4520
  className: "w-4 h-4"
@@ -4870,7 +4870,7 @@ function AuthAtivarDesativarAuthenticatorButton() {
4870
4870
  /*#__PURE__*/ jsxs("button", {
4871
4871
  type: "button",
4872
4872
  onClick: abrirDrawer,
4873
- className: " w-full flex items-center justify-between px-2 py-2 text-sm rounded-md text-zinc-700 dark:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 transition ",
4873
+ className: " w-full flex items-center justify-between px-2 py-2 text-sm rounded-md text-zinc-700 dark:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 transition ",
4874
4874
  children: [
4875
4875
  /*#__PURE__*/ jsxs("div", {
4876
4876
  className: "flex items-center gap-2",
@@ -5182,7 +5182,7 @@ function RecuperarSenhaComCodigoOtpButton() {
5182
5182
  /*#__PURE__*/ jsxs("button", {
5183
5183
  type: "button",
5184
5184
  onClick: ()=>drawerRef.current?.abrir(),
5185
- className: " w-full flex items-center justify-between px-2 py-2 text-sm rounded-md text-zinc-700 dark:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 transition ",
5185
+ className: " w-full flex items-center justify-between px-2 py-2 text-sm rounded-md text-zinc-700 dark:text-zinc-200 hover:bg-zinc-100 dark:hover:bg-zinc-800 transition ",
5186
5186
  children: [
5187
5187
  /*#__PURE__*/ jsxs("div", {
5188
5188
  className: "flex items-center gap-2",
@@ -5408,7 +5408,7 @@ function EsqueciMinhaSenha({ email: emailProp }) {
5408
5408
  ]
5409
5409
  }),
5410
5410
  /*#__PURE__*/ jsxs("div", {
5411
- className: " relative rounded-2xl p-7 flex flex-col gap-6 transition-all duration-300 bg-white border border-slate-200 shadow-[0_20px_50px_rgba(0,0,0,0.04)] dark:bg-slate-900/90 dark:backdrop-blur-2xl dark:border-white/[0.1] dark:shadow-[0_0_0_1px_rgba(255,255,255,0.05),_0_30px_60px_rgba(0,0,0,0.4)] ",
5411
+ className: " relative rounded-2xl p-7 flex flex-col gap-6 transition-all duration-300 bg-white border border-slate-200 shadow-[0_20px_50px_rgba(0,0,0,0.04)] dark:bg-slate-900/90 dark:backdrop-blur-2xl dark:border-white/[0.1] dark:shadow-[0_0_0_1px_rgba(255,255,255,0.05),_0_30px_60px_rgba(0,0,0,0.4)] ",
5412
5412
  children: [
5413
5413
  /*#__PURE__*/ jsxs("div", {
5414
5414
  className: "flex flex-col gap-1.5",
@@ -7216,7 +7216,7 @@ function AuthLogin() {
7216
7216
  }),
7217
7217
  /*#__PURE__*/ jsxs(motion.form, {
7218
7218
  onSubmit: handleSubmit(onSubmit),
7219
- className: " relative rounded-2xl p-7 flex flex-col gap-6 transition-all duration-300 bg-white border border-slate-200 shadow-[0_20px_50px_rgba(0,0,0,0.04)] dark:bg-slate-900/90 dark:backdrop-blur-2xl dark:border-white/[0.1] dark:shadow-[0_0_0_1px_rgba(255,255,255,0.05),_0_30px_60px_rgba(0,0,0,0.4)] ",
7219
+ className: " relative rounded-2xl p-7 flex flex-col gap-6 transition-all duration-300 bg-white border border-slate-200 shadow-[0_20px_50px_rgba(0,0,0,0.04)] dark:bg-slate-900/90 dark:backdrop-blur-2xl dark:border-white/[0.1] dark:shadow-[0_0_0_1px_rgba(255,255,255,0.05),_0_30px_60px_rgba(0,0,0,0.4)] ",
7220
7220
  children: [
7221
7221
  /*#__PURE__*/ jsxs("div", {
7222
7222
  className: "flex flex-col gap-5",
@@ -7296,7 +7296,7 @@ function AuthLogin() {
7296
7296
  },
7297
7297
  type: "submit",
7298
7298
  disabled: loading_auth,
7299
- className: " relative w-full rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 text-white py-3.5 text-sm font-bold flex items-center justify-center gap-2 transition-all shadow-lg shadow-blue-500/25 hover:shadow-blue-500/40 disabled:opacity-70 disabled:cursor-not-allowed overflow-hidden ",
7299
+ className: " relative w-full rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 text-white py-3.5 text-sm font-bold flex items-center justify-center gap-2 transition-all shadow-lg shadow-blue-500/25 hover:shadow-blue-500/40 disabled:opacity-70 disabled:cursor-not-allowed overflow-hidden ",
7300
7300
  children: [
7301
7301
  loading_auth && /*#__PURE__*/ jsx(LoaderCircle, {
7302
7302
  className: "w-4 h-4 animate-spin"
@@ -7475,7 +7475,7 @@ function AuthRegister() {
7475
7475
  }),
7476
7476
  /*#__PURE__*/ jsxs(motion.form, {
7477
7477
  onSubmit: handleSubmit(onSubmit),
7478
- className: " relative rounded-2xl p-7 flex flex-col gap-5 transition-all duration-300 bg-white border border-slate-200 shadow-[0_20px_50px_rgba(0,0,0,0.04)] dark:bg-slate-900/90 dark:backdrop-blur-2xl dark:border-white/[0.1] dark:shadow-[0_0_0_1px_rgba(255,255,255,0.05),_0_30px_60px_rgba(0,0,0,0.4)] ",
7478
+ className: " relative rounded-2xl p-7 flex flex-col gap-5 transition-all duration-300 bg-white border border-slate-200 shadow-[0_20px_50px_rgba(0,0,0,0.04)] dark:bg-slate-900/90 dark:backdrop-blur-2xl dark:border-white/[0.1] dark:shadow-[0_0_0_1px_rgba(255,255,255,0.05),_0_30px_60px_rgba(0,0,0,0.4)] ",
7479
7479
  children: [
7480
7480
  /*#__PURE__*/ jsxs("div", {
7481
7481
  className: "flex flex-col gap-4",
@@ -7581,7 +7581,7 @@ function AuthRegister() {
7581
7581
  },
7582
7582
  type: "submit",
7583
7583
  disabled: loading_auth,
7584
- className: " w-full mt-2 inline-flex items-center justify-center gap-2 rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 py-3.5 text-sm font-black tracking-wide text-white shadow-lg shadow-blue-500/30 transition-all hover:shadow-xl hover:shadow-blue-500/50 disabled:opacity-50 disabled:cursor-not-allowed ",
7584
+ className: " w-full mt-2 inline-flex items-center justify-center gap-2 rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 py-3.5 text-sm font-black tracking-wide text-white shadow-lg shadow-blue-500/30 transition-all hover:shadow-xl hover:shadow-blue-500/50 disabled:opacity-50 disabled:cursor-not-allowed ",
7585
7585
  children: [
7586
7586
  loading_auth ? /*#__PURE__*/ jsx(LoaderCircle, {
7587
7587
  className: "h-4 w-4 animate-spin"
@@ -7857,7 +7857,7 @@ const VerificarAuthenticator = ()=>{
7857
7857
  },
7858
7858
  onClick: handleConfirm,
7859
7859
  disabled: !isCodeComplete || isLoading,
7860
- className: " w-full inline-flex items-center justify-center gap-2 rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 py-3.5 text-sm font-black tracking-wide text-white shadow-lg shadow-blue-500/30 transition-all hover:shadow-xl hover:shadow-blue-500/50 disabled:opacity-50 disabled:cursor-not-allowed ",
7860
+ className: " w-full inline-flex items-center justify-center gap-2 rounded-xl bg-gradient-to-r from-blue-600 to-cyan-600 py-3.5 text-sm font-black tracking-wide text-white shadow-lg shadow-blue-500/30 transition-all hover:shadow-xl hover:shadow-blue-500/50 disabled:opacity-50 disabled:cursor-not-allowed ",
7861
7861
  children: [
7862
7862
  isLoading ? /*#__PURE__*/ jsx(LoaderCircle, {
7863
7863
  className: "h-4 w-4 animate-spin"
@@ -8297,7 +8297,7 @@ function DarkMode() {
8297
8297
  ]);
8298
8298
  return /*#__PURE__*/ jsx("button", {
8299
8299
  onClick: ()=>setDark(!dark),
8300
- className: " w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-theme-text/80 hover:bg-theme-bg hover:translate-x-[2px] transition-all ",
8300
+ className: " w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-theme-text/80 hover:bg-theme-bg hover:translate-x-[2px] transition-all ",
8301
8301
  children: /*#__PURE__*/ jsxs("div", {
8302
8302
  className: "flex items-center gap-3",
8303
8303
  children: [
@@ -8436,7 +8436,7 @@ function Profile({ isCollapsed = false }) {
8436
8436
  children: [
8437
8437
  menuItems.map((item, idx)=>/*#__PURE__*/ jsx("button", {
8438
8438
  onClick: item.action,
8439
- className: " w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-theme-text/80 hover:bg-theme-bg hover:translate-x-[2px] transition-all ",
8439
+ className: " w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-theme-text/80 hover:bg-theme-bg hover:translate-x-[2px] transition-all ",
8440
8440
  children: /*#__PURE__*/ jsxs("div", {
8441
8441
  className: "flex items-center gap-3",
8442
8442
  children: [
@@ -8452,7 +8452,7 @@ function Profile({ isCollapsed = false }) {
8452
8452
  /*#__PURE__*/ jsx(DarkMode, {}),
8453
8453
  /*#__PURE__*/ jsx("button", {
8454
8454
  onClick: ()=>contexto_contexto_usuario.contexto.state.set_signout(),
8455
- className: " w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-error-600 font-semibold hover:bg-error-50/10 hover:translate-x-[2px] transition-all ",
8455
+ className: " w-full flex items-center justify-between px-3 py-2.5 rounded-lg text-sm text-error-600 font-semibold hover:bg-error-50/10 hover:translate-x-[2px] transition-all ",
8456
8456
  children: /*#__PURE__*/ jsxs("div", {
8457
8457
  className: "flex items-center gap-3",
8458
8458
  children: [
@@ -8490,7 +8490,7 @@ function Profile({ isCollapsed = false }) {
8490
8490
  });
8491
8491
  }
8492
8492
  const NavBar = ()=>/*#__PURE__*/ jsxs("nav", {
8493
- className: " fixed inset-x-0 top-0 z-40 h-16 flex items-center justify-between px-4 md:px-6 bg-theme-card/80 text-theme-text border-b border-theme-border backdrop-blur-xl supports-[backdrop-filter]:bg-theme-card/70 shadow-sm will-change-transform ",
8493
+ className: " fixed inset-x-0 top-0 z-40 h-16 flex items-center justify-between px-4 md:px-6 bg-theme-card/80 text-theme-text border-b border-theme-border backdrop-blur-xl supports-[backdrop-filter]:bg-theme-card/70 shadow-sm will-change-transform ",
8494
8494
  children: [
8495
8495
  /*#__PURE__*/ jsx("div", {
8496
8496
  className: "flex items-center gap-3",
@@ -8568,7 +8568,7 @@ function Header(props) {
8568
8568
  scale: 0.98
8569
8569
  },
8570
8570
  onClick: ()=>navigate("/auth/register"),
8571
- className: " relative group px-5 py-2 rounded-lg text-sm font-medium text-white bg-gradient-to-r from-blue-600 to-cyan-600 transition-all duration-300 before:absolute before:inset-0 before:rounded-lg before:bg-gradient-to-r before:from-blue-600 before:to-cyan-600 before:blur-md before:opacity-0 before:transition-opacity before:duration-500 hover:before:opacity-100 before:-z-10 ",
8571
+ className: " relative group px-5 py-2 rounded-lg text-sm font-medium text-white bg-gradient-to-r from-blue-600 to-cyan-600 transition-all duration-300 before:absolute before:inset-0 before:rounded-lg before:bg-gradient-to-r before:from-blue-600 before:to-cyan-600 before:blur-md before:opacity-0 before:transition-opacity before:duration-500 hover:before:opacity-100 before:-z-10 ",
8572
8572
  children: /*#__PURE__*/ jsx("span", {
8573
8573
  className: "relative z-10",
8574
8574
  children: "Registrar"
@@ -33,10 +33,12 @@ declare namespace t {
33
33
  PUBLIC_GOOGLE_CLIENT_ID_AUTH0?: string;
34
34
  PUBLIC_BASE_URL_SERVICE_USUARIO?: string;
35
35
  PUBLIC_BASE_URL_SERVICE_ASSINATURA?: string;
36
- CORS_ORIGIN?: string;
37
- JSON_WEB_TOKEN_AUTH_USER?: string;
36
+ JSON_WEB_TOKEN_AUTH_USER: string;
37
+ JSON_WEB_TOKEN_AUTH_MICRO_SERVICO: string;
38
+ JSON_WEB_REFRESH_TOKEN_AUTH_USER: string;
38
39
  GOOGLE_CLIENT_ID_AUTH0?: string;
39
40
  RESEND_API_KEY?: string;
41
+ CORS_ORIGIN?: string;
40
42
  DB_SERVICE_USUARIO?: D1Database;
41
43
  ASSETS?: Fetcher;
42
44
  };
package/package.json CHANGED
@@ -1,47 +1,47 @@
1
- {
2
- "name": "@navservice/usuario",
3
- "version": "1.59.0",
4
- "description": "Service de autenticação de usuários unificado",
5
- "type": "module",
6
- "main": "./build/lib/index.js",
7
- "module": "./build/es/index.js",
8
- "types": "./build/es/index.d.ts",
9
- "exports": {
10
- ".": {
11
- "import": "./build/es/index.js",
12
- "require": "./build/lib/index.js",
13
- "types": "./build/es/biblioteca/src/index.d.ts"
14
- }
15
- },
16
- "files": [
17
- "build"
18
- ],
19
- "scripts": {
20
- "build": "rslib build"
21
- },
22
- "peerDependencies": {
23
- "react": "^19",
24
- "react-dom": "^19",
25
- "react-router-dom": "^7",
26
- "@react-oauth/google": "^0.12",
27
- "google-auth-library": "^10",
28
- "framer-motion": "^12.31.0",
29
- "qrcode.react": "^4",
30
- "zod": "^4",
31
- "zustand": "^5"
32
- },
33
- "devDependencies": {
34
- "framer-motion": "^12.31.0",
35
- "typescript": "^5",
36
- "react": "^19",
37
- "react-dom": "^19",
38
- "react-router-dom": "^7",
39
- "zod": "^4",
40
- "zustand": "^5",
41
- "@react-oauth/google": "^0.12"
42
- },
43
- "publishConfig": {
44
- "access": "public",
45
- "provenance": false
46
- }
47
- }
1
+ {
2
+ "name": "@navservice/usuario",
3
+ "version": "1.61.0",
4
+ "description": "Service de autenticação de usuários unificado",
5
+ "type": "module",
6
+ "main": "./build/lib/index.js",
7
+ "module": "./build/es/index.js",
8
+ "types": "./build/es/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./build/es/index.js",
12
+ "require": "./build/lib/index.js",
13
+ "types": "./build/es/biblioteca/src/index.d.ts"
14
+ }
15
+ },
16
+ "files": [
17
+ "build"
18
+ ],
19
+ "scripts": {
20
+ "build": "rslib build"
21
+ },
22
+ "peerDependencies": {
23
+ "react": "^19",
24
+ "react-dom": "^19",
25
+ "react-router-dom": "^7",
26
+ "@react-oauth/google": "^0.12",
27
+ "google-auth-library": "^10",
28
+ "framer-motion": "^12.31.0",
29
+ "qrcode.react": "^4",
30
+ "zod": "^4",
31
+ "zustand": "^5"
32
+ },
33
+ "devDependencies": {
34
+ "framer-motion": "^12.31.0",
35
+ "typescript": "^5",
36
+ "react": "^19",
37
+ "react-dom": "^19",
38
+ "react-router-dom": "^7",
39
+ "zod": "^4",
40
+ "zustand": "^5",
41
+ "@react-oauth/google": "^0.12"
42
+ },
43
+ "publishConfig": {
44
+ "access": "public",
45
+ "provenance": false
46
+ }
47
+ }