@zydon/common 2.5.41 → 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.
- package/dist/chunk-IB2EDGUN.js +13 -0
- package/dist/chunk-JAHXVWFM.js +6 -0
- package/dist/chunk-SO64ZYQB.js +3 -0
- package/dist/components/Common/index.js +2 -1
- package/dist/hooks/useDeepCompareEffect.js +3 -3
- package/dist/theme/styles/index.d.ts +1 -1
- package/dist/theme/theme-provider.js +2 -1
- package/dist/utils/compare.d.ts +25 -2
- package/dist/utils/compare.js +1 -1
- package/dist/utils/eager.d.ts +36 -0
- package/dist/utils/eager.js +3 -0
- package/dist/utils/object.d.ts +9 -0
- package/dist/utils/object.js +1 -0
- package/package.json +2 -3
- package/dist/chunk-VVMQMROT.js +0 -5
- package/dist/chunk-XI2QTFJA.js +0 -13
|
@@ -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 };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { b } from '../chunk-JAHXVWFM.js';
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
3
|
|
|
4
|
-
var
|
|
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 {
|
|
6
|
+
export { u as default };
|
|
@@ -443,7 +443,7 @@ declare function paper({ theme, color, dropdown }: PaperProps): {
|
|
|
443
443
|
wordWrap?: csstype.Property.WordWrap | readonly NonNullable<csstype.Property.WordWrap | undefined>[] | readonly csstype.Property.WordWrap[] | undefined;
|
|
444
444
|
writingMode?: csstype.Property.WritingMode | readonly NonNullable<csstype.Property.WritingMode | undefined>[] | readonly csstype.Property.WritingMode[] | undefined;
|
|
445
445
|
zIndex?: csstype.Property.ZIndex | readonly NonNullable<csstype.Property.ZIndex | undefined>[] | readonly ((string & {}) | csstype.Globals | "auto")[] | undefined;
|
|
446
|
-
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal"
|
|
446
|
+
zoom?: csstype.Property.Zoom | readonly NonNullable<csstype.Property.Zoom | undefined>[] | readonly ("reset" | (string & {}) | csstype.Globals | "normal")[] | undefined;
|
|
447
447
|
all?: csstype.Globals | readonly NonNullable<csstype.Globals | undefined>[] | readonly csstype.Globals[] | undefined;
|
|
448
448
|
animation?: csstype.Property.Animation<string & {}> | readonly NonNullable<csstype.Property.Animation<string & {}> | undefined>[] | readonly ((string & {}) | csstype.Globals | "normal" | "reverse" | "auto" | "none" | "both" | "alternate" | "alternate-reverse" | "backwards" | "forwards" | "infinite" | "paused" | "running" | "ease" | "ease-in" | "ease-in-out" | "ease-out" | "step-end" | "step-start" | "linear")[] | undefined;
|
|
449
449
|
animationRange?: csstype.Property.AnimationRange<string | number> | readonly NonNullable<csstype.Property.AnimationRange<string | number> | undefined>[] | readonly (string | (string & {}))[] | undefined;
|
package/dist/utils/compare.d.ts
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
export { default as isEqual } from 'react-fast-compare';
|
|
2
2
|
|
|
3
|
-
|
|
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 };
|
package/dist/utils/compare.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { a as isEqual } from '../chunk-
|
|
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,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.
|
|
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",
|
package/dist/chunk-VVMQMROT.js
DELETED
package/dist/chunk-XI2QTFJA.js
DELETED
|
@@ -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 };
|