@zydon/common 2.5.40 → 2.5.42

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.
@@ -0,0 +1,13 @@
1
+ import { a as a$1 } from './chunk-SO64ZYQB.js';
2
+ import { a } from './chunk-GUFT6XPG.js';
3
+ import { a as a$2, e } from './chunk-BH5YHBAI.js';
4
+ import { a as a$4, b as b$1 } from './chunk-OSDHZZEM.js';
5
+ import { q, s, a as a$3 } from './chunk-FDP5MHVS.js';
6
+ import { c } from './chunk-D27ND54J.js';
7
+ import A from '@mui/material/CssBaseline';
8
+ import { Experimental_CssVarsProvider, experimental_extendTheme, lighten, darken } from '@mui/material/styles';
9
+ import { jsxs, jsx } from 'react/jsx-runtime';
10
+
11
+ var g={modeStorageKey:"theme-mode",defaultMode:"light"};var C={};var b=e=>({lighter:lighten(e,.815),light:lighten(e,.225),main:e,dark:darken(e,.15),darker:darken(e,.35),contrastText:"#000"});function S(e$1,t,m=""){let o=b(t.primaryColor);a$1(q,"dark.palette.primary",o),a$1(q,"light.palette.primary",o);let i={colorSchemes:q,shadows:a$2(t.colorScheme),customShadows:s(t.colorScheme,o.main),shape:{borderRadius:8},components:a$3,typography:{...e,fontFamily:c(t.fontFamily)},cssVarPrefix:m,shouldSkipGeneratingVar:k},r=a$4(i,t);return experimental_extendTheme(r,e$1,b$1(t),C)}function k(e,t){let m=["mixins","overlays","direction","breakpoints","cssVarPrefix","unstable_sxConfig","typography"],o={global:["tonalOffset","dividerChannel","contrastThreshold"],grey:["A100","A200","A400","A700"],text:["icon"]};if(e[0]==="palette"){let r=e[1],n=o[r]||o.global;return e.some(x=>n?.includes(x))}return e.some(r=>m?.includes(r))}var V=({primaryColor:e,children:t,colorScheme:m="light",contrast:o="default",cssVarPrefix:i})=>{let r=S(a[1].systemValue,{primaryColor:e,colorScheme:m,contrast:o,navLayout:"vertical",navColor:"integrate",compactLayout:!0,fontFamily:"Public Sans"},i);return jsxs(Experimental_CssVarsProvider,{theme:r,defaultMode:"light",defaultColorScheme:"light",modeStorageKey:g.modeStorageKey,children:[jsx(A,{}),t]})},H=V;
12
+
13
+ export { H as a };
@@ -0,0 +1,6 @@
1
+ import t from 'react-fast-compare';
2
+ export { default as a } from 'react-fast-compare';
3
+
4
+ var o=(e,n)=>t(e,n)?!0:e instanceof Set&&n instanceof Set?e.size!==n.size?!1:t([...e],[...n]):!1;
5
+
6
+ export { o as b };
@@ -0,0 +1,3 @@
1
+ var c=(o,s,i)=>{let e=s.split("."),n=o;for(let r=0;r<e.length-1;r++){let t=e[r];(!(t in n)||typeof n[t]!="object"||n[t]===null||Array.isArray(n[t]))&&(n[t]={}),n=n[t];}n[e[e.length-1]]=i;};
2
+
3
+ export { c as a };
@@ -1,4 +1,5 @@
1
- import { a } from '../../chunk-XI2QTFJA.js';
1
+ import { a } from '../../chunk-IB2EDGUN.js';
2
+ import '../../chunk-SO64ZYQB.js';
2
3
  import '../../chunk-GUFT6XPG.js';
3
4
  import '../../chunk-BH5YHBAI.js';
4
5
  import '../../chunk-OSDHZZEM.js';
@@ -1,6 +1,6 @@
1
- import { a } from '../chunk-VVMQMROT.js';
1
+ import { b } from '../chunk-JAHXVWFM.js';
2
2
  import { useEffect, useRef } from 'react';
3
3
 
4
- var f=n=>{let e=useRef();return a(n,e.current)||(e.current=n),e.current},o=(n,e)=>{useEffect(n,e.map(f));},m=o;
4
+ var o=t=>{let e=useRef();return b(t,e.current)||(e.current=t),e.current},p=(t,e)=>{useEffect(t,e.map(o));},u=p;
5
5
 
6
- export { m as default };
6
+ export { u as default };
@@ -1,4 +1,5 @@
1
- export { a as default } from '../chunk-XI2QTFJA.js';
1
+ export { a as default } from '../chunk-IB2EDGUN.js';
2
+ import '../chunk-SO64ZYQB.js';
2
3
  import '../chunk-GUFT6XPG.js';
3
4
  import '../chunk-BH5YHBAI.js';
4
5
  import '../chunk-OSDHZZEM.js';
@@ -1,3 +1,26 @@
1
- declare const isEqual: (a?: unknown, b?: unknown) => boolean;
1
+ export { default as isEqual } from 'react-fast-compare';
2
2
 
3
- export { isEqual };
3
+ /**
4
+ * Realiza comparação profunda entre dois valores com tratamento especial para Sets.
5
+ *
6
+ * Esta função utiliza react-fast-compare como base, mas adiciona lógica especial
7
+ * para Sets que contêm objetos, já que react-fast-compare pode não comparar
8
+ * corretamente Sets com objetos complexos em algumas situações.
9
+ *
10
+ * @param a - Primeiro valor a ser comparado
11
+ * @param b - Segundo valor a ser comparado
12
+ * @returns true se os valores são profundamente iguais, false caso contrário
13
+ *
14
+ * @example
15
+ * ```typescript
16
+ * const set1 = new Set([{id: 1}, {id: 2}]);
17
+ * const set2 = new Set([{id: 1}, {id: 2}]);
18
+ * deepCompareWithSets(set1, set2); // true
19
+ *
20
+ * deepCompareWithSets([1, 2, 3], [1, 2, 3]); // true
21
+ * deepCompareWithSets({a: 1}, {a: 1}); // true
22
+ * ```
23
+ */
24
+ declare const deepCompareWithSets: (a: unknown, b: unknown) => boolean;
25
+
26
+ export { deepCompareWithSets };
@@ -1 +1 @@
1
- export { a as isEqual } from '../chunk-VVMQMROT.js';
1
+ export { b as deepCompareWithSets, a as isEqual } from '../chunk-JAHXVWFM.js';
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Executa imediatamente uma função e retorna seu resultado.
3
+ *
4
+ * Esta função utilitária é usada para avaliar expressões de forma "eager" (ansiosa),
5
+ * executando a função fornecida imediatamente e retornando seu valor. É útil em
6
+ * situações onde você quer forçar a execução imediata de uma função que poderia
7
+ * ser avaliada de forma lazy (preguiçosa).
8
+ *
9
+ * @template T - O tipo do valor retornado pela função
10
+ * @param fn - A função a ser executada imediatamente
11
+ * @returns O resultado da execução da função
12
+ *
13
+ * @example
14
+ * ```typescript
15
+ * // Execução imediata de uma computação
16
+ * const result = eager(() => {
17
+ * console.log('Executando agora!');
18
+ * return 42;
19
+ * }); // result = 42, e o console.log é executado imediatamente
20
+ *
21
+ * // Útil para inicialização de valores
22
+ * const config = eager(() => ({
23
+ * apiUrl: process.env.API_URL || 'http://localhost:3000',
24
+ * timeout: 5000
25
+ * }));
26
+ *
27
+ * // Forçar execução de side effects
28
+ * eager(() => {
29
+ * localStorage.setItem('initialized', 'true');
30
+ * return null;
31
+ * });
32
+ * ```
33
+ */
34
+ declare const eager: <T>(fn: () => T) => T;
35
+
36
+ export { eager };
@@ -0,0 +1,3 @@
1
+ var o=e=>e();
2
+
3
+ export { o as eager };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Define uma propriedade aninhada em um objeto usando notação de ponto
3
+ * @param obj - O objeto onde definir a propriedade
4
+ * @param path - O caminho da propriedade usando notação de ponto (ex: 'a.b.c')
5
+ * @param value - O valor a ser definido
6
+ */
7
+ declare const setNestedProperty: (obj: Record<string, unknown>, path: string, value: unknown) => void;
8
+
9
+ export { setNestedProperty };
@@ -0,0 +1 @@
1
+ export { a as setNestedProperty } from '../chunk-SO64ZYQB.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zydon/common",
3
- "version": "2.5.40",
3
+ "version": "2.5.42",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "module": "./dist/index.js",
@@ -91,7 +91,6 @@
91
91
  "@testing-library/user-event": "14.5.2",
92
92
  "@types/color": "^3.0.6",
93
93
  "@types/jest": "^30.0.0",
94
- "@types/lodash": "^4.17.7",
95
94
  "@types/node": "^20.0.0",
96
95
  "@types/react": "^18.3.4",
97
96
  "@types/react-color": "^3.0.13",
@@ -135,11 +134,11 @@
135
134
  "embla-carousel-react": "^8.2.0",
136
135
  "framer-motion": "^11.3.30",
137
136
  "hugeicons-react": "^0.3.0",
138
- "lodash": "^4.17.21",
139
137
  "react-color": "^2.19.3",
140
138
  "react-cropper": "^2.3.3",
141
139
  "react-dropzone": "^14.2.3",
142
140
  "react-easy-crop": "^5.5.0",
141
+ "react-fast-compare": "^3.2.2",
143
142
  "react-imask": "^7.6.1",
144
143
  "react-number-format": "^5.4.0",
145
144
  "react-window": "^1.8.10",
@@ -1,5 +0,0 @@
1
- import s from 'lodash/isEqual';
2
-
3
- var a=(n,o)=>s(n,o);
4
-
5
- export { a };
@@ -1,13 +0,0 @@
1
- import { a } from './chunk-GUFT6XPG.js';
2
- import { a as a$1, e } from './chunk-BH5YHBAI.js';
3
- import { a as a$3, b as b$1 } from './chunk-OSDHZZEM.js';
4
- import { q, s, a as a$2 } from './chunk-FDP5MHVS.js';
5
- import { c } from './chunk-D27ND54J.js';
6
- import A from '@mui/material/CssBaseline';
7
- import { Experimental_CssVarsProvider, experimental_extendTheme, lighten, darken } from '@mui/material/styles';
8
- import S from 'lodash/set';
9
- import { jsxs, jsx } from 'react/jsx-runtime';
10
-
11
- var y={modeStorageKey:"theme-mode",defaultMode:"light"};var g={};var b=e=>({lighter:lighten(e,.815),light:lighten(e,.225),main:e,dark:darken(e,.15),darker:darken(e,.35),contrastText:"#000"});function P(e$1,t,m=""){let o=b(t.primaryColor);S(q,"dark.palette.primary",o),S(q,"light.palette.primary",o);let i={colorSchemes:q,shadows:a$1(t.colorScheme),customShadows:s(t.colorScheme,o.main),shape:{borderRadius:8},components:a$2,typography:{...e,fontFamily:c(t.fontFamily)},cssVarPrefix:m,shouldSkipGeneratingVar:k},r=a$3(i,t);return experimental_extendTheme(r,e$1,b$1(t),g)}function k(e,t){let m=["mixins","overlays","direction","breakpoints","cssVarPrefix","unstable_sxConfig","typography"],o={global:["tonalOffset","dividerChannel","contrastThreshold"],grey:["A100","A200","A400","A700"],text:["icon"]};if(e[0]==="palette"){let r=e[1],s=o[r]||o.global;return e.some(x=>s?.includes(x))}return e.some(r=>m?.includes(r))}var V=({primaryColor:e,children:t,colorScheme:m="light",contrast:o="default",cssVarPrefix:i})=>{let r=P(a[1].systemValue,{primaryColor:e,colorScheme:m,contrast:o,navLayout:"vertical",navColor:"integrate",compactLayout:!0,fontFamily:"Public Sans"},i);return jsxs(Experimental_CssVarsProvider,{theme:r,defaultMode:"light",defaultColorScheme:"light",modeStorageKey:y.modeStorageKey,children:[jsx(A,{}),t]})},I=V;
12
-
13
- export { I as a };