react-lgpd-consent 0.3.6 → 0.4.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/CHANGELOG.md +31 -0
- package/QUICKSTART.en.md +43 -0
- package/QUICKSTART.md +43 -0
- package/README.en.md +1 -0
- package/README.md +1 -0
- package/dist/{PreferencesModal-KAZMVPBD.js → PreferencesModal-D2SEVH3N.js} +1 -1
- package/dist/{chunk-MHCQFGRJ.js → chunk-B5FNONG3.js} +72 -30
- package/dist/index.cjs +87 -54
- package/dist/index.d.cts +85 -38
- package/dist/index.d.ts +85 -38
- package/dist/index.js +17 -26
- package/package.json +48 -46
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import { DialogProps } from '@mui/material/Dialog';
|
|
3
|
-
import * as React$1 from 'react';
|
|
4
3
|
import { Theme } from '@mui/material/styles';
|
|
4
|
+
import * as React$1 from 'react';
|
|
5
5
|
import { PaperProps } from '@mui/material/Paper';
|
|
6
6
|
import { SnackbarProps } from '@mui/material/Snackbar';
|
|
7
7
|
import { FabProps } from '@mui/material/Fab';
|
|
@@ -81,6 +81,7 @@ type Category = 'necessary' | 'analytics' | 'functional' | 'marketing' | 'social
|
|
|
81
81
|
*
|
|
82
82
|
* @example
|
|
83
83
|
* ```typescript
|
|
84
|
+
* // Categoria padrão da biblioteca
|
|
84
85
|
* const analyticsCategory: CategoryDefinition = {
|
|
85
86
|
* id: 'analytics',
|
|
86
87
|
* name: 'Cookies Analíticos',
|
|
@@ -88,6 +89,14 @@ type Category = 'necessary' | 'analytics' | 'functional' | 'marketing' | 'social
|
|
|
88
89
|
* essential: false,
|
|
89
90
|
* cookies: ['_ga', '_ga_*', '_gid']
|
|
90
91
|
* };
|
|
92
|
+
*
|
|
93
|
+
* // Categoria customizada específica do projeto
|
|
94
|
+
* const chatCategory: CategoryDefinition = {
|
|
95
|
+
* id: 'chat',
|
|
96
|
+
* name: 'Chat de Suporte',
|
|
97
|
+
* description: 'Widget de chat para suporte ao cliente',
|
|
98
|
+
* essential: false
|
|
99
|
+
* };
|
|
91
100
|
* ```
|
|
92
101
|
*
|
|
93
102
|
* @public
|
|
@@ -144,11 +153,18 @@ interface CategoryDefinition {
|
|
|
144
153
|
* // Configuração com categorias customizadas
|
|
145
154
|
* const config: ProjectCategoriesConfig = {
|
|
146
155
|
* enabledCategories: ['analytics'],
|
|
147
|
-
* customCategories: [
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
151
|
-
*
|
|
156
|
+
* customCategories: [
|
|
157
|
+
* {
|
|
158
|
+
* id: 'chat',
|
|
159
|
+
* name: 'Chat de Suporte',
|
|
160
|
+
* description: 'Widget de chat para suporte ao cliente'
|
|
161
|
+
* },
|
|
162
|
+
* {
|
|
163
|
+
* id: 'abTesting',
|
|
164
|
+
* name: 'A/B Testing',
|
|
165
|
+
* description: 'Experimentos de interface e funcionalidades'
|
|
166
|
+
* }
|
|
167
|
+
* ]
|
|
152
168
|
* };
|
|
153
169
|
* ```
|
|
154
170
|
*
|
|
@@ -164,6 +180,7 @@ interface ProjectCategoriesConfig {
|
|
|
164
180
|
/**
|
|
165
181
|
* Categorias customizadas específicas do projeto.
|
|
166
182
|
* Permite extensão além das categorias padrão da biblioteca.
|
|
183
|
+
* @example [{ id: 'chat', name: 'Chat de Suporte', description: 'Widget de chat' }]
|
|
167
184
|
*/
|
|
168
185
|
customCategories?: CategoryDefinition[];
|
|
169
186
|
}
|
|
@@ -653,18 +670,23 @@ interface ConsentProviderProps {
|
|
|
653
670
|
*/
|
|
654
671
|
texts?: Partial<ConsentTexts>;
|
|
655
672
|
/**
|
|
656
|
-
* Tema
|
|
657
|
-
*
|
|
673
|
+
* Tema Material-UI a ser aplicado aos componentes via ThemeProvider.
|
|
674
|
+
*
|
|
675
|
+
* Observação importante: a biblioteca NÃO cria/mescla tema automaticamente.
|
|
676
|
+
* Se você fornecer um `theme` aqui, ele será repassado diretamente ao `ThemeProvider`.
|
|
677
|
+
* Se não fornecer, a lib não envolverá com `ThemeProvider` e herdará o tema do app.
|
|
658
678
|
*
|
|
659
679
|
* @example
|
|
660
680
|
* ```tsx
|
|
661
|
-
*
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
* }
|
|
681
|
+
* import { createTheme } from '@mui/material/styles'
|
|
682
|
+
* const appTheme = createTheme({ palette: { primary: { main: '#1976d2' } } })
|
|
683
|
+
*
|
|
684
|
+
* <ConsentProvider theme={appTheme}>
|
|
685
|
+
* <App />
|
|
686
|
+
* </ConsentProvider>
|
|
665
687
|
* ```
|
|
666
688
|
*/
|
|
667
|
-
theme?:
|
|
689
|
+
theme?: Theme;
|
|
668
690
|
/**
|
|
669
691
|
* Tokens de design para customização visual avançada.
|
|
670
692
|
* Oferece controle direto sobre cores, fontes, espaçamento e layout.
|
|
@@ -684,24 +706,24 @@ interface ConsentProviderProps {
|
|
|
684
706
|
* Deve implementar a lógica de consentimento usando as props definidas em `CustomPreferencesModalProps`.
|
|
685
707
|
*/
|
|
686
708
|
PreferencesModalComponent?: React.ComponentType<CustomPreferencesModalProps>;
|
|
687
|
-
/** Props adicionais passadas para o modal customizado. */
|
|
688
|
-
preferencesModalProps?: Record<string,
|
|
709
|
+
/** Props adicionais passadas para o modal customizado (repassadas sem transformação). */
|
|
710
|
+
preferencesModalProps?: Record<string, unknown>;
|
|
689
711
|
/**
|
|
690
712
|
* Componente customizado para substituir o banner padrão de cookies.
|
|
691
713
|
* Se não fornecido, o `CookieBanner` padrão será renderizado.
|
|
692
714
|
* Deve implementar a lógica de consentimento usando as props definidas em `CustomCookieBannerProps`.
|
|
693
715
|
*/
|
|
694
716
|
CookieBannerComponent?: React.ComponentType<CustomCookieBannerProps>;
|
|
695
|
-
/** Props adicionais passadas para o banner customizado. */
|
|
696
|
-
cookieBannerProps?: Record<string,
|
|
717
|
+
/** Props adicionais passadas para o banner customizado (repassadas sem transformação). */
|
|
718
|
+
cookieBannerProps?: Record<string, unknown>;
|
|
697
719
|
/**
|
|
698
720
|
* Componente customizado para substituir o botão flutuante de preferências.
|
|
699
721
|
* Se não fornecido, o `FloatingPreferencesButton` padrão será renderizado.
|
|
700
722
|
* Deve implementar a lógica de consentimento usando as props definidas em `CustomFloatingPreferencesButtonProps`.
|
|
701
723
|
*/
|
|
702
724
|
FloatingPreferencesButtonComponent?: React.ComponentType<CustomFloatingPreferencesButtonProps>;
|
|
703
|
-
/** Props adicionais passadas para o botão flutuante customizado. */
|
|
704
|
-
floatingPreferencesButtonProps?: Record<string,
|
|
725
|
+
/** Props adicionais passadas para o botão flutuante customizado (repassadas sem transformação). */
|
|
726
|
+
floatingPreferencesButtonProps?: Record<string, unknown>;
|
|
705
727
|
/**
|
|
706
728
|
* Desabilita o botão flutuante de preferências.
|
|
707
729
|
* Útil quando o usuário da lib quer ter controle total sobre o acesso às preferências.
|
|
@@ -1521,6 +1543,8 @@ declare const DEFAULT_PROJECT_CATEGORIES: ProjectCategoriesConfig;
|
|
|
1521
1543
|
*
|
|
1522
1544
|
* @param {ProjectCategoriesConfig} [config] A configuração de categorias fornecida pelo desenvolvedor. Se não for fornecida, a configuração padrão será utilizada.
|
|
1523
1545
|
* @returns {DeveloperGuidance} Um objeto `DeveloperGuidance` com a análise da configuração.
|
|
1546
|
+
*
|
|
1547
|
+
* Since v0.4.0: inclui `customCategories` em `activeCategoriesInfo` (com `uiRequired=false` se `essential=true`).
|
|
1524
1548
|
*/
|
|
1525
1549
|
declare function analyzeDeveloperConfiguration(config?: ProjectCategoriesConfig): DeveloperGuidance;
|
|
1526
1550
|
|
|
@@ -1600,7 +1624,7 @@ declare function ConsentGate(props: Readonly<{
|
|
|
1600
1624
|
*
|
|
1601
1625
|
* @param {string} id Um identificador único para o elemento `<script>` a ser criado.
|
|
1602
1626
|
* @param {string} src A URL do script externo a ser carregado.
|
|
1603
|
-
* @param {'
|
|
1627
|
+
* @param {import('../types/types').Category | null} [category=null] A categoria de consentimento exigida para o script. Se o consentimento para esta categoria não for dado, o script não será carregado.
|
|
1604
1628
|
* @param {Record<string, string>} [attrs={}] Atributos adicionais a serem aplicados ao elemento `<script>` (ex: `{ async: 'true' }`).
|
|
1605
1629
|
* @returns {Promise<void>} Uma Promise que resolve quando o script é carregado com sucesso, ou rejeita se o consentimento não for dado ou ocorrer um erro de carregamento.
|
|
1606
1630
|
* @example
|
|
@@ -1611,7 +1635,8 @@ declare function ConsentGate(props: Readonly<{
|
|
|
1611
1635
|
* .catch(error => console.error('Erro ao carregar script:', error))
|
|
1612
1636
|
* ```
|
|
1613
1637
|
*/
|
|
1614
|
-
|
|
1638
|
+
|
|
1639
|
+
declare function loadScript(id: string, src: string, category?: Category | null, attrs?: Record<string, string>): Promise<void>;
|
|
1615
1640
|
|
|
1616
1641
|
/**
|
|
1617
1642
|
* @constant
|
|
@@ -1637,13 +1662,19 @@ declare const defaultConsentTheme: () => Theme;
|
|
|
1637
1662
|
|
|
1638
1663
|
/**
|
|
1639
1664
|
* @interface ScriptIntegration
|
|
1640
|
-
*
|
|
1665
|
+
* Estrutura de uma integração de script de terceiros a ser carregada condicionalmente conforme o consentimento.
|
|
1666
|
+
*
|
|
1667
|
+
* @remarks
|
|
1668
|
+
* - `category` é um `Category` tipado (ex.: 'analytics', 'marketing').
|
|
1669
|
+
* - `init` roda após o script ser inserido no DOM e carregado.
|
|
1670
|
+
* - `attrs` é repassado como atributos HTML da tag `<script>`.
|
|
1641
1671
|
*/
|
|
1672
|
+
|
|
1642
1673
|
interface ScriptIntegration {
|
|
1643
1674
|
/** Um ID único para esta integração de script. */
|
|
1644
1675
|
id: string;
|
|
1645
|
-
/**
|
|
1646
|
-
category:
|
|
1676
|
+
/** Categoria de consentimento necessária para carregar o script. */
|
|
1677
|
+
category: Category;
|
|
1647
1678
|
/** A URL do script a ser carregado. */
|
|
1648
1679
|
src: string;
|
|
1649
1680
|
/** Uma função opcional a ser executada após o script ser carregado e inicializado no DOM. */
|
|
@@ -1658,8 +1689,8 @@ interface ScriptIntegration {
|
|
|
1658
1689
|
interface GoogleAnalyticsConfig {
|
|
1659
1690
|
/** O ID de medição do GA4 (ex: 'G-XXXXXXXXXX'). */
|
|
1660
1691
|
measurementId: string;
|
|
1661
|
-
/**
|
|
1662
|
-
config?:
|
|
1692
|
+
/** Objeto opcional repassado para `gtag('config')`. */
|
|
1693
|
+
config?: Record<string, unknown>;
|
|
1663
1694
|
}
|
|
1664
1695
|
/**
|
|
1665
1696
|
* @interface GoogleTagManagerConfig
|
|
@@ -1683,30 +1714,30 @@ interface UserWayConfig {
|
|
|
1683
1714
|
* @function
|
|
1684
1715
|
* @category Utils
|
|
1685
1716
|
* @since 0.2.0
|
|
1686
|
-
* Cria
|
|
1717
|
+
* Cria uma integração para Google Analytics 4 (GA4).
|
|
1687
1718
|
*
|
|
1688
|
-
* @param {GoogleAnalyticsConfig} config
|
|
1689
|
-
* @returns {ScriptIntegration}
|
|
1719
|
+
* @param {GoogleAnalyticsConfig} config Configuração com `measurementId` e `config` opcional.
|
|
1720
|
+
* @returns {ScriptIntegration} Integração tipada com `category: 'analytics'`.
|
|
1690
1721
|
*/
|
|
1691
1722
|
declare function createGoogleAnalyticsIntegration(config: GoogleAnalyticsConfig): ScriptIntegration;
|
|
1692
1723
|
/**
|
|
1693
1724
|
* @function
|
|
1694
1725
|
* @category Utils
|
|
1695
1726
|
* @since 0.2.0
|
|
1696
|
-
* Cria
|
|
1727
|
+
* Cria uma integração para Google Tag Manager (GTM).
|
|
1697
1728
|
*
|
|
1698
|
-
* @param {GoogleTagManagerConfig} config
|
|
1699
|
-
* @returns {ScriptIntegration}
|
|
1729
|
+
* @param {GoogleTagManagerConfig} config Configuração com `containerId` e `dataLayerName` opcional.
|
|
1730
|
+
* @returns {ScriptIntegration} Integração tipada com `category: 'analytics'`.
|
|
1700
1731
|
*/
|
|
1701
1732
|
declare function createGoogleTagManagerIntegration(config: GoogleTagManagerConfig): ScriptIntegration;
|
|
1702
1733
|
/**
|
|
1703
1734
|
* @function
|
|
1704
1735
|
* @category Utils
|
|
1705
1736
|
* @since 0.2.0
|
|
1706
|
-
* Cria
|
|
1737
|
+
* Cria uma integração para o widget de acessibilidade UserWay.
|
|
1707
1738
|
*
|
|
1708
|
-
* @param {UserWayConfig} config
|
|
1709
|
-
* @returns {ScriptIntegration}
|
|
1739
|
+
* @param {UserWayConfig} config Configuração com `accountId`.
|
|
1740
|
+
* @returns {ScriptIntegration} Integração tipada com `category: 'functional'`.
|
|
1710
1741
|
*/
|
|
1711
1742
|
declare function createUserWayIntegration(config: UserWayConfig): ScriptIntegration;
|
|
1712
1743
|
/**
|
|
@@ -2101,8 +2132,10 @@ declare function FloatingPreferencesButton({ position, offset, icon, tooltip, Fa
|
|
|
2101
2132
|
* @returns Um objeto `ConsentPreferences` com as categorias e seus valores iniciais.
|
|
2102
2133
|
* @remarks
|
|
2103
2134
|
* Esta função é crucial para inicializar o estado de consentimento. Ela garante que apenas as categorias
|
|
2104
|
-
* definidas no `ConsentProvider` sejam incluídas no objeto de preferências
|
|
2105
|
-
* de minimização de dados da LGPD.
|
|
2135
|
+
* definidas no `ConsentProvider` sejam incluídas no objeto de preferências (tanto categorias padrão
|
|
2136
|
+
* em `enabledCategories` quanto `customCategories`), alinhando-se ao princípio de minimização de dados da LGPD.
|
|
2137
|
+
*
|
|
2138
|
+
* Since v0.4.0: inclui categorias de `config.customCategories` na inicialização.
|
|
2106
2139
|
* @example
|
|
2107
2140
|
* ```ts
|
|
2108
2141
|
* // Gera preferências com 'analytics' e 'marketing' desabilitados por padrão
|
|
@@ -2111,6 +2144,15 @@ declare function FloatingPreferencesButton({ position, offset, icon, tooltip, Fa
|
|
|
2111
2144
|
* })
|
|
2112
2145
|
* // Result: { necessary: true, analytics: false, marketing: false }
|
|
2113
2146
|
*
|
|
2147
|
+
* // Inclui categorias customizadas
|
|
2148
|
+
* const initialWithCustom = createProjectPreferences({
|
|
2149
|
+
* enabledCategories: ['analytics'],
|
|
2150
|
+
* customCategories: [
|
|
2151
|
+
* { id: 'abTesting', name: 'AB Testing', description: 'Experimentos de interface' },
|
|
2152
|
+
* ],
|
|
2153
|
+
* })
|
|
2154
|
+
* // Result: { necessary: true, analytics: false, abTesting: false }
|
|
2155
|
+
*
|
|
2114
2156
|
* // Gera preferências com todas as categorias habilitadas
|
|
2115
2157
|
* const allAcceptedPrefs = createProjectPreferences(
|
|
2116
2158
|
* { enabledCategories: ['analytics', 'marketing'] },
|
|
@@ -2131,6 +2173,8 @@ declare function createProjectPreferences(config?: ProjectCategoriesConfig, defa
|
|
|
2131
2173
|
* Garante a integridade dos dados ao carregar o estado de um cookie. Se a configuração do projeto mudou
|
|
2132
2174
|
* (ex: uma categoria foi removida), esta função limpa as preferências obsoletas do estado,
|
|
2133
2175
|
* evitando inconsistências.
|
|
2176
|
+
*
|
|
2177
|
+
* Since v0.4.0: reconhece `config.customCategories` como válidas ao validar.
|
|
2134
2178
|
* @example
|
|
2135
2179
|
* ```ts
|
|
2136
2180
|
* const savedPrefs = { necessary: true, analytics: true, oldCategory: false }
|
|
@@ -2149,7 +2193,10 @@ declare function validateProjectPreferences(preferences: ConsentPreferences, con
|
|
|
2149
2193
|
* @returns Um array de objetos `CategoryDefinition`.
|
|
2150
2194
|
* @remarks
|
|
2151
2195
|
* Útil para construir UIs de preferência customizadas, pois fornece os nomes e descrições
|
|
2152
|
-
* de todas as categorias que devem ser exibidas ao usuário
|
|
2196
|
+
* de todas as categorias que devem ser exibidas ao usuário, incluindo quaisquer `customCategories`
|
|
2197
|
+
* definidas no `ConsentProvider`.
|
|
2198
|
+
*
|
|
2199
|
+
* Since v0.4.0: inclui categorias definidas em `config.customCategories`.
|
|
2153
2200
|
* @example
|
|
2154
2201
|
* ```ts
|
|
2155
2202
|
* const config = { enabledCategories: ['analytics'] }
|
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
useConsentTexts,
|
|
20
20
|
useOpenPreferencesModal,
|
|
21
21
|
validateProjectPreferences
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-B5FNONG3.js";
|
|
23
23
|
|
|
24
24
|
// src/utils/ConsentGate.tsx
|
|
25
25
|
import { Fragment, jsx } from "react/jsx-runtime";
|
|
@@ -152,13 +152,7 @@ function ConsentScriptLoader({
|
|
|
152
152
|
const alreadyLoaded = loadedScripts.current.has(integration.id);
|
|
153
153
|
if (shouldLoad && (!alreadyLoaded || reloadOnChange)) {
|
|
154
154
|
try {
|
|
155
|
-
await loadScript(
|
|
156
|
-
integration.id,
|
|
157
|
-
integration.src,
|
|
158
|
-
integration.category,
|
|
159
|
-
// Categoria dinâmica
|
|
160
|
-
integration.attrs
|
|
161
|
-
);
|
|
155
|
+
await loadScript(integration.id, integration.src, integration.category, integration.attrs);
|
|
162
156
|
if (integration.init) {
|
|
163
157
|
integration.init();
|
|
164
158
|
}
|
|
@@ -187,13 +181,7 @@ function useConsentScriptLoader() {
|
|
|
187
181
|
return false;
|
|
188
182
|
}
|
|
189
183
|
try {
|
|
190
|
-
await loadScript(
|
|
191
|
-
integration.id,
|
|
192
|
-
integration.src,
|
|
193
|
-
integration.category,
|
|
194
|
-
// Categoria dinâmica
|
|
195
|
-
integration.attrs
|
|
196
|
-
);
|
|
184
|
+
await loadScript(integration.id, integration.src, integration.category, integration.attrs);
|
|
197
185
|
if (integration.init) {
|
|
198
186
|
integration.init();
|
|
199
187
|
}
|
|
@@ -215,14 +203,14 @@ function createGoogleAnalyticsIntegration(config) {
|
|
|
215
203
|
src: `https://www.googletagmanager.com/gtag/js?id=${config.measurementId}`,
|
|
216
204
|
init: () => {
|
|
217
205
|
if (typeof window !== "undefined") {
|
|
218
|
-
|
|
219
|
-
|
|
206
|
+
const w = window;
|
|
207
|
+
w.dataLayer = w.dataLayer ?? [];
|
|
208
|
+
const gtag = (...args) => {
|
|
209
|
+
w.dataLayer.push(...args);
|
|
220
210
|
};
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
gtag2("js", /* @__PURE__ */ new Date());
|
|
225
|
-
gtag2("config", config.measurementId, config.config || {});
|
|
211
|
+
w.gtag = gtag;
|
|
212
|
+
gtag("js", /* @__PURE__ */ new Date());
|
|
213
|
+
gtag("config", config.measurementId, config.config ?? {});
|
|
226
214
|
}
|
|
227
215
|
},
|
|
228
216
|
attrs: { async: "true" }
|
|
@@ -236,8 +224,10 @@ function createGoogleTagManagerIntegration(config) {
|
|
|
236
224
|
init: () => {
|
|
237
225
|
if (typeof window !== "undefined") {
|
|
238
226
|
const dataLayerName = config.dataLayerName || "dataLayer";
|
|
239
|
-
|
|
240
|
-
|
|
227
|
+
const w = window;
|
|
228
|
+
const layer = w[dataLayerName] ?? [];
|
|
229
|
+
w[dataLayerName] = layer;
|
|
230
|
+
layer.push({
|
|
241
231
|
"gtm.start": (/* @__PURE__ */ new Date()).getTime(),
|
|
242
232
|
event: "gtm.js"
|
|
243
233
|
});
|
|
@@ -252,8 +242,9 @@ function createUserWayIntegration(config) {
|
|
|
252
242
|
src: "https://cdn.userway.org/widget.js",
|
|
253
243
|
init: () => {
|
|
254
244
|
if (typeof window !== "undefined") {
|
|
255
|
-
|
|
256
|
-
|
|
245
|
+
const w = window;
|
|
246
|
+
w.UserWayWidgetApp = w.UserWayWidgetApp || {};
|
|
247
|
+
w.UserWayWidgetApp.accountId = config.accountId;
|
|
257
248
|
}
|
|
258
249
|
},
|
|
259
250
|
attrs: { "data-account": config.accountId }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-lgpd-consent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Biblioteca de consentimento LGPD, integrações nativas e sistema extensível para React.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"lgpd",
|
|
@@ -54,14 +54,15 @@
|
|
|
54
54
|
"CHANGELOG.md"
|
|
55
55
|
],
|
|
56
56
|
"engines": {
|
|
57
|
-
"node": ">=
|
|
57
|
+
"node": ">=20.0.0"
|
|
58
58
|
},
|
|
59
|
-
"packageManager": "npm@
|
|
59
|
+
"packageManager": "npm@11.6.0",
|
|
60
60
|
"scripts": {
|
|
61
61
|
"clean": "rimraf node_modules package-lock.json dist docs storybook-static .cache .stryker-tmp",
|
|
62
62
|
"build": "cross-env NODE_ENV=production tsup src/index.ts --format esm,cjs --dts --clean",
|
|
63
63
|
"dev": "cross-env NODE_ENV=development tsup src/index.ts --format esm,cjs --dts --watch",
|
|
64
|
-
"lint": "eslint
|
|
64
|
+
"lint": "eslint \"**/*.{ts,tsx}\" --cache",
|
|
65
|
+
"lint:ci": "eslint \"**/*.{ts,tsx}\" --cache --max-warnings=0",
|
|
65
66
|
"format": "prettier --write \"src/**/*.{ts,tsx,json,md}\" \"eslint.config.js\"",
|
|
66
67
|
"type-check": "tsc --noEmit",
|
|
67
68
|
"test": "jest --config jest.config.ts",
|
|
@@ -95,47 +96,48 @@
|
|
|
95
96
|
"js-cookie": "^3.0.5"
|
|
96
97
|
},
|
|
97
98
|
"devDependencies": {
|
|
98
|
-
"@chromatic-com/storybook": "
|
|
99
|
-
"@emotion/react": "
|
|
100
|
-
"@emotion/styled": "
|
|
101
|
-
"@eslint/compat": "
|
|
102
|
-
"@mui/icons-material": "
|
|
103
|
-
"@mui/material": "
|
|
104
|
-
"@storybook/addon-a11y": "
|
|
105
|
-
"@storybook/addon-docs": "
|
|
106
|
-
"@storybook/addon-vitest": "
|
|
107
|
-
"@storybook/react-vite": "
|
|
108
|
-
"@stryker-mutator/core": "
|
|
109
|
-
"@stryker-mutator/jest-runner": "
|
|
110
|
-
"@testing-library/dom": "
|
|
111
|
-
"@testing-library/jest-dom": "
|
|
112
|
-
"@testing-library/react": "
|
|
113
|
-
"@testing-library/user-event": "
|
|
114
|
-
"@types/jest": "
|
|
115
|
-
"@types/js-cookie": "
|
|
116
|
-
"@types/node": "
|
|
117
|
-
"@types/react": "
|
|
118
|
-
"@types/react-dom": "
|
|
119
|
-
"@typescript-eslint/eslint-plugin": "
|
|
120
|
-
"@typescript-eslint/parser": "
|
|
121
|
-
"cross-env": "
|
|
122
|
-
"eslint": "
|
|
123
|
-
"eslint-config-prettier": "
|
|
124
|
-
"eslint-plugin-jest": "
|
|
125
|
-
"eslint-plugin-react-hooks": "
|
|
126
|
-
"eslint-plugin-storybook": "
|
|
127
|
-
"
|
|
128
|
-
"jest
|
|
129
|
-
"
|
|
130
|
-
"
|
|
131
|
-
"react
|
|
132
|
-
"
|
|
133
|
-
"
|
|
134
|
-
"
|
|
135
|
-
"ts-
|
|
136
|
-
"
|
|
137
|
-
"
|
|
138
|
-
"
|
|
139
|
-
"typescript
|
|
99
|
+
"@chromatic-com/storybook": "4.1.1",
|
|
100
|
+
"@emotion/react": "11.14.0",
|
|
101
|
+
"@emotion/styled": "11.14.1",
|
|
102
|
+
"@eslint/compat": "1.3.2",
|
|
103
|
+
"@mui/icons-material": "7.3.2",
|
|
104
|
+
"@mui/material": "7.3.2",
|
|
105
|
+
"@storybook/addon-a11y": "9.1.7",
|
|
106
|
+
"@storybook/addon-docs": "9.1.7",
|
|
107
|
+
"@storybook/addon-vitest": "9.1.7",
|
|
108
|
+
"@storybook/react-vite": "9.1.7",
|
|
109
|
+
"@stryker-mutator/core": "9.1.1",
|
|
110
|
+
"@stryker-mutator/jest-runner": "9.1.1",
|
|
111
|
+
"@testing-library/dom": "10.4.1",
|
|
112
|
+
"@testing-library/jest-dom": "6.8.0",
|
|
113
|
+
"@testing-library/react": "16.3.0",
|
|
114
|
+
"@testing-library/user-event": "14.6.1",
|
|
115
|
+
"@types/jest": "30.0.0",
|
|
116
|
+
"@types/js-cookie": "3.0.6",
|
|
117
|
+
"@types/node": "24.5.2",
|
|
118
|
+
"@types/react": "19.1.13",
|
|
119
|
+
"@types/react-dom": "19.1.9",
|
|
120
|
+
"@typescript-eslint/eslint-plugin": "8.44.0",
|
|
121
|
+
"@typescript-eslint/parser": "8.44.0",
|
|
122
|
+
"cross-env": "10.0.0",
|
|
123
|
+
"eslint": "9.36.0",
|
|
124
|
+
"eslint-config-prettier": "10.1.8",
|
|
125
|
+
"eslint-plugin-jest": "29.0.1",
|
|
126
|
+
"eslint-plugin-react-hooks": "5.2.0",
|
|
127
|
+
"eslint-plugin-storybook": "9.1.7",
|
|
128
|
+
"globals": "^16.4.0",
|
|
129
|
+
"jest": "30.1.3",
|
|
130
|
+
"jest-environment-jsdom": "30.1.2",
|
|
131
|
+
"prettier": "3.6.2",
|
|
132
|
+
"react": "19.1.1",
|
|
133
|
+
"react-dom": "19.1.1",
|
|
134
|
+
"rimraf": "6.0.1",
|
|
135
|
+
"storybook": "9.1.7",
|
|
136
|
+
"ts-jest": "29.4.4",
|
|
137
|
+
"ts-node": "10.9.2",
|
|
138
|
+
"tsup": "8.5.0",
|
|
139
|
+
"typedoc": "0.28.13",
|
|
140
|
+
"typescript": "5.9.2",
|
|
141
|
+
"typescript-eslint": "8.44.0"
|
|
140
142
|
}
|
|
141
143
|
}
|