@nemme/js-sdk 0.9.0 → 0.9.4

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.
Files changed (50) hide show
  1. package/dist/chunks/chunk-CZZ4p3Yf.js +1 -0
  2. package/dist/chunks/client-Bcd4ux9A.js +2 -0
  3. package/dist/chunks/client-Bcd4ux9A.js.map +1 -0
  4. package/dist/chunks/client-DSNW6X_M.js +364 -0
  5. package/dist/chunks/client-DSNW6X_M.js.map +1 -0
  6. package/dist/chunks/form-manager-BsBsY3Hj.js +12 -0
  7. package/dist/chunks/form-manager-BsBsY3Hj.js.map +1 -0
  8. package/dist/chunks/form-manager-UhU4AnMM.js +7066 -0
  9. package/dist/chunks/form-manager-UhU4AnMM.js.map +1 -0
  10. package/dist/chunks/httpClient-0OJWJWzk.js +162 -0
  11. package/dist/chunks/httpClient-0OJWJWzk.js.map +1 -0
  12. package/dist/chunks/httpClient-B2q7jRzA.js +2 -0
  13. package/dist/chunks/httpClient-B2q7jRzA.js.map +1 -0
  14. package/dist/forms.cjs +1 -2
  15. package/dist/forms.esm.js +2 -6
  16. package/dist/index.cjs +2 -2
  17. package/dist/index.cjs.map +1 -1
  18. package/dist/index.esm.js +7 -9
  19. package/dist/index.esm.js.map +1 -1
  20. package/dist/js-sdk.css +2 -1
  21. package/dist/nemme-sdk.umd.js +14 -14
  22. package/dist/nemme-sdk.umd.js.map +1 -1
  23. package/dist/react.cjs +2 -2
  24. package/dist/react.cjs.map +1 -1
  25. package/dist/react.esm.js +94 -81
  26. package/dist/react.esm.js.map +1 -1
  27. package/dist/shims/use-sync-external-store-shim.d.ts +1 -0
  28. package/dist/style.cjs +1 -2
  29. package/dist/style.esm.js +0 -2
  30. package/package.json +26 -22
  31. package/dist/chunks/client-DNykEThs.js +0 -420
  32. package/dist/chunks/client-DNykEThs.js.map +0 -1
  33. package/dist/chunks/client-DTI3C-RQ.js +0 -2
  34. package/dist/chunks/client-DTI3C-RQ.js.map +0 -1
  35. package/dist/chunks/form-manager-CdG9IzjD.js +0 -12
  36. package/dist/chunks/form-manager-CdG9IzjD.js.map +0 -1
  37. package/dist/chunks/form-manager-Cf8vMLbu.js +0 -6143
  38. package/dist/chunks/form-manager-Cf8vMLbu.js.map +0 -1
  39. package/dist/chunks/httpClient-D2IO92uv.js +0 -149
  40. package/dist/chunks/httpClient-D2IO92uv.js.map +0 -1
  41. package/dist/chunks/httpClient-hrn9Ffa2.js +0 -2
  42. package/dist/chunks/httpClient-hrn9Ffa2.js.map +0 -1
  43. package/dist/chunks/jsx-runtime-BubrbI3X.js +0 -2
  44. package/dist/chunks/jsx-runtime-BubrbI3X.js.map +0 -1
  45. package/dist/chunks/jsx-runtime-jIxVPx5o.js +0 -32
  46. package/dist/chunks/jsx-runtime-jIxVPx5o.js.map +0 -1
  47. package/dist/forms.cjs.map +0 -1
  48. package/dist/forms.esm.js.map +0 -1
  49. package/dist/style.cjs.map +0 -1
  50. package/dist/style.esm.js.map +0 -1
package/dist/react.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("./chunks/jsx-runtime-BubrbI3X.js"),i=require("react"),z=require("./chunks/client-DTI3C-RQ.js"),a=i.createContext(void 0);function C(e,t){switch(t.type){case"reset":return{client:null,isInitialized:!1,error:null};case"success":return{client:t.client,isInitialized:t.initialized,error:t.error};case"error":return{client:null,isInitialized:!1,error:t.error}}}const N=({clientKey:e,config:t,children:o})=>{const[n,s]=i.useReducer(C,{client:null,isInitialized:!1,error:null}),l=i.useMemo(()=>t,[JSON.stringify(t)]);i.useEffect(()=>{let c=!1,u=null;return s({type:"reset"}),(async()=>{try{const r=new z.NemmeClient(e);if(await r.init(l),c){r.destroy();return}u=r,s({type:"success",client:r,initialized:r.initialized,error:r.lastInitError?r.lastInitError.message:null})}catch(r){c||s({type:"error",error:r instanceof Error?r.message:"Failed to initialize Nemme client"})}})(),()=>{c=!0,u&&u.destroy()}},[e,l]);const d={client:n.client,isInitialized:n.isInitialized,error:n.error};return f.jsxRuntimeExports.jsx(a.Provider,{value:d,children:o})},m=()=>{const e=i.useContext(a);if(e===void 0)throw new Error("useNemmeContext must be used within a NemmeProvider");return e},y=()=>{const{client:e,isInitialized:t,error:o}=m(),n=i.useCallback(async l=>{if(!e||!t){console.warn("Nemme client not initialized");return}return e.track(l)},[e,t]),s=i.useCallback(async()=>{if(!e||!t){console.warn("Nemme client not initialized");return}return e.flush()},[e,t]);return{track:n,flush:s,isInitialized:t,error:o,client:e}};exports.NemmeProvider=N;exports.useNemme=y;exports.useNemmeContext=m;
2
- //# sourceMappingURL=react.cjs.map
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./chunks/chunk-CZZ4p3Yf.js`),t=require(`./chunks/client-Bcd4ux9A.js`);let n=require(`react`);n=e.n(n,1);let r=require(`react/jsx-runtime`);var i=(0,n.createContext)(void 0);function a(e,t){switch(t.type){case`reset`:return{client:null,isInitialized:!1,error:null};case`success`:return{client:t.client,isInitialized:t.initialized,error:t.error};case`error`:return{client:null,isInitialized:!1,error:t.error}}}var o=({clientKey:e,config:o,children:s})=>{let[c,l]=(0,n.useReducer)(a,{client:null,isInitialized:!1,error:null}),u=(0,n.useMemo)(()=>o,[JSON.stringify(o)]);(0,n.useEffect)(()=>{let n=!1,r=null;return l({type:`reset`}),(async()=>{try{let i=new t.t(e);if(await i.init(u),n){i.destroy();return}r=i,l({type:`success`,client:i,initialized:i.initialized,error:i.lastInitError?i.lastInitError.message:null})}catch(e){n||l({type:`error`,error:e instanceof Error?e.message:`Failed to initialize Nemme client`})}})(),()=>{n=!0,r&&r.destroy()}},[e,u]);let d={client:c.client,isInitialized:c.isInitialized,error:c.error};return(0,r.jsx)(i.Provider,{value:d,children:s})},s=()=>{let e=(0,n.useContext)(i);if(e===void 0)throw Error(`useNemmeContext must be used within a NemmeProvider`);return e},c=()=>{let{client:e,isInitialized:t,error:r}=s();return{track:(0,n.useCallback)(async n=>{if(!e||!t){console.warn(`Nemme client not initialized`);return}return e.track(n)},[e,t]),flush:(0,n.useCallback)(async()=>{if(!e||!t){console.warn(`Nemme client not initialized`);return}return e.flush()},[e,t]),isInitialized:t,error:r,client:e}};exports.NemmeProvider=o,exports.useNemme=c,exports.useNemmeContext=s;
2
+ //# sourceMappingURL=react.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"react.cjs","sources":["../src/react/context.ts","../src/react/NemmeProvider.tsx","../src/react/useNemmeContext.ts","../src/react/useNemme.ts"],"sourcesContent":["import { createContext } from 'react';\nimport { NemmeClient } from '../client';\n\nexport interface NemmeContextType {\n client: NemmeClient | null;\n isInitialized: boolean;\n error: string | null;\n}\n\nexport const NemmeContext = createContext<NemmeContextType | undefined>(undefined);\n","import * as React from 'react';\nimport { useEffect, useMemo, useReducer } from 'react';\nimport { ClientConfigType, NemmeClient } from '../client';\nimport { NemmeContext, NemmeContextType } from './context';\n\ninterface NemmeProviderProps {\n clientKey: string;\n config: ClientConfigType;\n children: React.ReactNode;\n}\n\ntype State = {\n client: NemmeClient | null;\n isInitialized: boolean;\n error: string | null;\n};\n\ntype Action =\n | { type: 'reset' }\n | { type: 'success'; client: NemmeClient; initialized: boolean; error: string | null }\n | { type: 'error'; error: string };\n\nfunction reducer(_state: State, action: Action): State {\n switch (action.type) {\n case 'reset':\n return { client: null, isInitialized: false, error: null };\n case 'success':\n return { client: action.client, isInitialized: action.initialized, error: action.error };\n case 'error':\n return { client: null, isInitialized: false, error: action.error };\n }\n}\n\nexport const NemmeProvider: React.FC<NemmeProviderProps> = ({ clientKey, config, children }) => {\n const [state, dispatch] = useReducer(reducer, { client: null, isInitialized: false, error: null });\n\n // Stabilize config: only changes when the serialized value differs\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const stableConfig = useMemo<ClientConfigType>(() => config, [JSON.stringify(config)]);\n\n useEffect(() => {\n let isCancelled = false;\n let currentClient: NemmeClient | null = null;\n\n dispatch({ type: 'reset' });\n\n const initializeClient = async () => {\n try {\n const nemmeClient = new NemmeClient(clientKey);\n await nemmeClient.init(stableConfig);\n\n if (isCancelled) {\n nemmeClient.destroy();\n return;\n }\n\n currentClient = nemmeClient;\n dispatch({\n type: 'success',\n client: nemmeClient,\n initialized: nemmeClient.initialized,\n error: nemmeClient.lastInitError ? nemmeClient.lastInitError.message : null\n });\n } catch (err) {\n if (!isCancelled) {\n dispatch({\n type: 'error',\n error: err instanceof Error ? err.message : 'Failed to initialize Nemme client'\n });\n }\n }\n };\n\n initializeClient();\n\n return () => {\n isCancelled = true;\n if (currentClient) {\n currentClient.destroy();\n }\n };\n }, [clientKey, stableConfig]);\n\n const value: NemmeContextType = {\n client: state.client,\n isInitialized: state.isInitialized,\n error: state.error\n };\n\n return <NemmeContext.Provider value={value}>{children}</NemmeContext.Provider>;\n};\n","import { useContext } from 'react';\nimport { NemmeContext } from './context';\n\nexport const useNemmeContext = () => {\n const context = useContext(NemmeContext);\n if (context === undefined) {\n throw new Error('useNemmeContext must be used within a NemmeProvider');\n }\n return context;\n};\n","import { useCallback } from 'react';\nimport { useNemmeContext } from './useNemmeContext';\nimport { TrackEventOptions } from '../client';\n\nexport const useNemme = () => {\n const { client, isInitialized, error } = useNemmeContext();\n\n const track = useCallback(\n async <T extends TrackEventOptions>(options: T) => {\n if (!client || !isInitialized) {\n console.warn('Nemme client not initialized');\n return;\n }\n return client.track(options);\n },\n [client, isInitialized]\n );\n\n const flush = useCallback(async () => {\n if (!client || !isInitialized) {\n console.warn('Nemme client not initialized');\n return;\n }\n return client.flush();\n }, [client, isInitialized]);\n\n return {\n track,\n flush,\n isInitialized,\n error,\n client\n };\n};\n"],"names":["NemmeContext","createContext","reducer","_state","action","NemmeProvider","clientKey","config","children","state","dispatch","useReducer","stableConfig","useMemo","useEffect","isCancelled","currentClient","nemmeClient","NemmeClient","err","value","jsx","useNemmeContext","context","useContext","useNemme","client","isInitialized","error","track","useCallback","options","flush"],"mappings":"gMASaA,EAAeC,EAAAA,cAA4C,MAAS,ECajF,SAASC,EAAQC,EAAeC,EAAuB,CACrD,OAAQA,EAAO,KAAA,CACb,IAAK,QACH,MAAO,CAAE,OAAQ,KAAM,cAAe,GAAO,MAAO,IAAA,EACtD,IAAK,UACH,MAAO,CAAE,OAAQA,EAAO,OAAQ,cAAeA,EAAO,YAAa,MAAOA,EAAO,KAAA,EACnF,IAAK,QACH,MAAO,CAAE,OAAQ,KAAM,cAAe,GAAO,MAAOA,EAAO,KAAA,CAAM,CAEvE,CAEO,MAAMC,EAA8C,CAAC,CAAE,UAAAC,EAAW,OAAAC,EAAQ,SAAAC,KAAe,CAC9F,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAAAA,WAAWT,EAAS,CAAE,OAAQ,KAAM,cAAe,GAAO,MAAO,KAAM,EAI3FU,EAAeC,EAAAA,QAA0B,IAAMN,EAAQ,CAAC,KAAK,UAAUA,CAAM,CAAC,CAAC,EAErFO,EAAAA,UAAU,IAAM,CACd,IAAIC,EAAc,GACdC,EAAoC,KAExC,OAAAN,EAAS,CAAE,KAAM,QAAS,GAED,SAAY,CACnC,GAAI,CACF,MAAMO,EAAc,IAAIC,EAAAA,YAAYZ,CAAS,EAG7C,GAFA,MAAMW,EAAY,KAAKL,CAAY,EAE/BG,EAAa,CACfE,EAAY,QAAA,EACZ,MACF,CAEAD,EAAgBC,EAChBP,EAAS,CACP,KAAM,UACN,OAAQO,EACR,YAAaA,EAAY,YACzB,MAAOA,EAAY,cAAgBA,EAAY,cAAc,QAAU,IAAA,CACxE,CACH,OAASE,EAAK,CACPJ,GACHL,EAAS,CACP,KAAM,QACN,MAAOS,aAAe,MAAQA,EAAI,QAAU,mCAAA,CAC7C,CAEL,CACF,GAEA,EAEO,IAAM,CACXJ,EAAc,GACVC,GACFA,EAAc,QAAA,CAElB,CACF,EAAG,CAACV,EAAWM,CAAY,CAAC,EAE5B,MAAMQ,EAA0B,CAC9B,OAAQX,EAAM,OACd,cAAeA,EAAM,cACrB,MAAOA,EAAM,KAAA,EAGf,OAAOY,EAAAA,kBAAAA,IAACrB,EAAa,SAAb,CAAsB,MAAAoB,EAAe,SAAAZ,CAAA,CAAS,CACxD,ECvFac,EAAkB,IAAM,CACnC,MAAMC,EAAUC,EAAAA,WAAWxB,CAAY,EACvC,GAAIuB,IAAY,OACd,MAAM,IAAI,MAAM,qDAAqD,EAEvE,OAAOA,CACT,ECLaE,EAAW,IAAM,CAC5B,KAAM,CAAE,OAAAC,EAAQ,cAAAC,EAAe,MAAAC,CAAA,EAAUN,EAAA,EAEnCO,EAAQC,EAAAA,YACZ,MAAoCC,GAAe,CACjD,GAAI,CAACL,GAAU,CAACC,EAAe,CAC7B,QAAQ,KAAK,8BAA8B,EAC3C,MACF,CACA,OAAOD,EAAO,MAAMK,CAAO,CAC7B,EACA,CAACL,EAAQC,CAAa,CAAA,EAGlBK,EAAQF,EAAAA,YAAY,SAAY,CACpC,GAAI,CAACJ,GAAU,CAACC,EAAe,CAC7B,QAAQ,KAAK,8BAA8B,EAC3C,MACF,CACA,OAAOD,EAAO,MAAA,CAChB,EAAG,CAACA,EAAQC,CAAa,CAAC,EAE1B,MAAO,CACL,MAAAE,EACA,MAAAG,EACA,cAAAL,EACA,MAAAC,EACA,OAAAF,CAAA,CAEJ"}
1
+ {"version":3,"file":"react.cjs","names":[],"sources":["../src/react/context.ts","../src/react/NemmeProvider.tsx","../src/react/useNemmeContext.ts","../src/react/useNemme.ts"],"sourcesContent":["import { createContext } from 'react';\nimport { NemmeClient } from '../client';\n\nexport interface NemmeContextType {\n client: NemmeClient | null;\n isInitialized: boolean;\n error: string | null;\n}\n\nexport const NemmeContext = createContext<NemmeContextType | undefined>(undefined);\n","import * as React from 'react';\nimport { useEffect, useMemo, useReducer } from 'react';\nimport { ClientConfigType, NemmeClient } from '../client';\nimport { NemmeContext, NemmeContextType } from './context';\n\ninterface NemmeProviderProps {\n clientKey: string;\n config: ClientConfigType;\n children: React.ReactNode;\n}\n\ntype State = {\n client: NemmeClient | null;\n isInitialized: boolean;\n error: string | null;\n};\n\ntype Action =\n | { type: 'reset' }\n | { type: 'success'; client: NemmeClient; initialized: boolean; error: string | null }\n | { type: 'error'; error: string };\n\nfunction reducer(_state: State, action: Action): State {\n switch (action.type) {\n case 'reset':\n return { client: null, isInitialized: false, error: null };\n case 'success':\n return { client: action.client, isInitialized: action.initialized, error: action.error };\n case 'error':\n return { client: null, isInitialized: false, error: action.error };\n }\n}\n\nexport const NemmeProvider: React.FC<NemmeProviderProps> = ({ clientKey, config, children }) => {\n const [state, dispatch] = useReducer(reducer, { client: null, isInitialized: false, error: null });\n\n // Stabilize config: only changes when the serialized value differs\n const serializedConfig = JSON.stringify(config);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const stableConfig = useMemo<ClientConfigType>(() => config, [serializedConfig]);\n\n useEffect(() => {\n let isCancelled = false;\n let currentClient: NemmeClient | null = null;\n\n dispatch({ type: 'reset' });\n\n const initializeClient = async () => {\n try {\n const nemmeClient = new NemmeClient(clientKey);\n await nemmeClient.init(stableConfig);\n\n if (isCancelled) {\n nemmeClient.destroy();\n return;\n }\n\n currentClient = nemmeClient;\n dispatch({\n type: 'success',\n client: nemmeClient,\n initialized: nemmeClient.initialized,\n error: nemmeClient.lastInitError ? nemmeClient.lastInitError.message : null\n });\n } catch (err) {\n if (!isCancelled) {\n dispatch({\n type: 'error',\n error: err instanceof Error ? err.message : 'Failed to initialize Nemme client'\n });\n }\n }\n };\n\n initializeClient();\n\n return () => {\n isCancelled = true;\n if (currentClient) {\n currentClient.destroy();\n }\n };\n }, [clientKey, stableConfig]);\n\n const value: NemmeContextType = {\n client: state.client,\n isInitialized: state.isInitialized,\n error: state.error\n };\n\n return <NemmeContext.Provider value={value}>{children}</NemmeContext.Provider>;\n};\n","import { useContext } from 'react';\nimport { NemmeContext } from './context';\n\nexport const useNemmeContext = () => {\n const context = useContext(NemmeContext);\n if (context === undefined) {\n throw new Error('useNemmeContext must be used within a NemmeProvider');\n }\n return context;\n};\n","import { useCallback } from 'react';\nimport { useNemmeContext } from './useNemmeContext';\nimport { TrackEventOptions } from '../client';\n\nexport const useNemme = () => {\n const { client, isInitialized, error } = useNemmeContext();\n\n const track = useCallback(\n async <T extends TrackEventOptions>(options: T) => {\n if (!client || !isInitialized) {\n console.warn('Nemme client not initialized');\n return;\n }\n return client.track(options);\n },\n [client, isInitialized]\n );\n\n const flush = useCallback(async () => {\n if (!client || !isInitialized) {\n console.warn('Nemme client not initialized');\n return;\n }\n return client.flush();\n }, [client, isInitialized]);\n\n return {\n track,\n flush,\n isInitialized,\n error,\n client\n };\n};\n"],"mappings":"+NASA,IAAa,GAAA,EAAA,EAAA,eAA2D,IAAA,GAAU,CCalF,SAAS,EAAQ,EAAe,EAAuB,CACrD,OAAQ,EAAO,KAAf,CACE,IAAK,QACH,MAAO,CAAE,OAAQ,KAAM,cAAe,GAAO,MAAO,KAAM,CAC5D,IAAK,UACH,MAAO,CAAE,OAAQ,EAAO,OAAQ,cAAe,EAAO,YAAa,MAAO,EAAO,MAAO,CAC1F,IAAK,QACH,MAAO,CAAE,OAAQ,KAAM,cAAe,GAAO,MAAO,EAAO,MAAO,EAIxE,IAAa,GAA+C,CAAE,YAAW,SAAQ,cAAe,CAC9F,GAAM,CAAC,EAAO,IAAA,EAAA,EAAA,YAAuB,EAAS,CAAE,OAAQ,KAAM,cAAe,GAAO,MAAO,KAAM,CAAC,CAK5F,GAAA,EAAA,EAAA,aAA+C,EAAQ,CAFpC,KAAK,UAAU,EAEsB,CAAiB,CAAC,EAEhF,EAAA,EAAA,eAAgB,CACd,IAAI,EAAc,GACd,EAAoC,KAiCxC,OA/BA,EAAS,CAAE,KAAM,QAAS,CAAC,EA6B3B,SA3BqC,CACnC,GAAI,CACF,IAAM,EAAc,IAAI,EAAA,EAAY,EAAU,CAG9C,GAFA,MAAM,EAAY,KAAK,EAAa,CAEhC,EAAa,CACf,EAAY,SAAS,CACrB,OAGF,EAAgB,EAChB,EAAS,CACP,KAAM,UACN,OAAQ,EACR,YAAa,EAAY,YACzB,MAAO,EAAY,cAAgB,EAAY,cAAc,QAAU,KACxE,CAAC,OACK,EAAK,CACP,GACH,EAAS,CACP,KAAM,QACN,MAAO,aAAe,MAAQ,EAAI,QAAU,oCAC7C,CAAC,KAKU,KAEL,CACX,EAAc,GACV,GACF,EAAc,SAAS,GAG1B,CAAC,EAAW,EAAa,CAAC,CAE7B,IAAM,EAA0B,CAC9B,OAAQ,EAAM,OACd,cAAe,EAAM,cACrB,MAAO,EAAM,MACd,CAED,OAAO,EAAA,EAAA,KAAC,EAAa,SAAd,CAA8B,QAAQ,WAAiC,CAAA,ECvFnE,MAAwB,CACnC,IAAM,GAAA,EAAA,EAAA,YAAqB,EAAa,CACxC,GAAI,IAAY,IAAA,GACd,MAAU,MAAM,sDAAsD,CAExE,OAAO,GCJI,MAAiB,CAC5B,GAAM,CAAE,SAAQ,gBAAe,SAAU,GAAiB,CAqB1D,MAAO,CACL,OAAA,EAAA,EAAA,aAnBA,KAAoC,IAAe,CACjD,GAAI,CAAC,GAAU,CAAC,EAAe,CAC7B,QAAQ,KAAK,+BAA+B,CAC5C,OAEF,OAAO,EAAO,MAAM,EAAQ,EAE9B,CAAC,EAAQ,EAAc,CAYvB,CACA,OAAA,EAAA,EAAA,aAVwB,SAAY,CACpC,GAAI,CAAC,GAAU,CAAC,EAAe,CAC7B,QAAQ,KAAK,+BAA+B,CAC5C,OAEF,OAAO,EAAO,OAAO,EACpB,CAAC,EAAQ,EAAc,CAIxB,CACA,gBACA,QACA,SACD"}
package/dist/react.esm.js CHANGED
@@ -1,83 +1,96 @@
1
- import { j as d } from "./chunks/jsx-runtime-jIxVPx5o.js";
2
- import { createContext as f, useReducer as z, useMemo as C, useEffect as N, useContext as p, useCallback as a } from "react";
3
- import { N as x } from "./chunks/client-DNykEThs.js";
4
- const u = f(void 0);
5
- function y(e, t) {
6
- switch (t.type) {
7
- case "reset":
8
- return { client: null, isInitialized: !1, error: null };
9
- case "success":
10
- return { client: t.client, isInitialized: t.initialized, error: t.error };
11
- case "error":
12
- return { client: null, isInitialized: !1, error: t.error };
13
- }
1
+ import { t as e } from "./chunks/client-DSNW6X_M.js";
2
+ import { createContext as t, useCallback as n, useContext as r, useEffect as i, useMemo as a, useReducer as o } from "react";
3
+ import { jsx as s } from "react/jsx-runtime";
4
+ //#region src/react/context.ts
5
+ var c = t(void 0);
6
+ //#endregion
7
+ //#region src/react/NemmeProvider.tsx
8
+ function l(e, t) {
9
+ switch (t.type) {
10
+ case "reset": return {
11
+ client: null,
12
+ isInitialized: !1,
13
+ error: null
14
+ };
15
+ case "success": return {
16
+ client: t.client,
17
+ isInitialized: t.initialized,
18
+ error: t.error
19
+ };
20
+ case "error": return {
21
+ client: null,
22
+ isInitialized: !1,
23
+ error: t.error
24
+ };
25
+ }
14
26
  }
15
- const b = ({ clientKey: e, config: t, children: l }) => {
16
- const [i, n] = z(y, { client: null, isInitialized: !1, error: null }), s = C(() => t, [JSON.stringify(t)]);
17
- N(() => {
18
- let o = !1, c = null;
19
- return n({ type: "reset" }), (async () => {
20
- try {
21
- const r = new x(e);
22
- if (await r.init(s), o) {
23
- r.destroy();
24
- return;
25
- }
26
- c = r, n({
27
- type: "success",
28
- client: r,
29
- initialized: r.initialized,
30
- error: r.lastInitError ? r.lastInitError.message : null
31
- });
32
- } catch (r) {
33
- o || n({
34
- type: "error",
35
- error: r instanceof Error ? r.message : "Failed to initialize Nemme client"
36
- });
37
- }
38
- })(), () => {
39
- o = !0, c && c.destroy();
40
- };
41
- }, [e, s]);
42
- const m = {
43
- client: i.client,
44
- isInitialized: i.isInitialized,
45
- error: i.error
46
- };
47
- return /* @__PURE__ */ d.jsx(u.Provider, { value: m, children: l });
48
- }, I = () => {
49
- const e = p(u);
50
- if (e === void 0)
51
- throw new Error("useNemmeContext must be used within a NemmeProvider");
52
- return e;
53
- }, g = () => {
54
- const { client: e, isInitialized: t, error: l } = I(), i = a(
55
- async (s) => {
56
- if (!e || !t) {
57
- console.warn("Nemme client not initialized");
58
- return;
59
- }
60
- return e.track(s);
61
- },
62
- [e, t]
63
- ), n = a(async () => {
64
- if (!e || !t) {
65
- console.warn("Nemme client not initialized");
66
- return;
67
- }
68
- return e.flush();
69
- }, [e, t]);
70
- return {
71
- track: i,
72
- flush: n,
73
- isInitialized: t,
74
- error: l,
75
- client: e
76
- };
27
+ var u = ({ clientKey: t, config: n, children: r }) => {
28
+ let [u, d] = o(l, {
29
+ client: null,
30
+ isInitialized: !1,
31
+ error: null
32
+ }), f = a(() => n, [JSON.stringify(n)]);
33
+ i(() => {
34
+ let n = !1, r = null;
35
+ return d({ type: "reset" }), (async () => {
36
+ try {
37
+ let i = new e(t);
38
+ if (await i.init(f), n) {
39
+ i.destroy();
40
+ return;
41
+ }
42
+ r = i, d({
43
+ type: "success",
44
+ client: i,
45
+ initialized: i.initialized,
46
+ error: i.lastInitError ? i.lastInitError.message : null
47
+ });
48
+ } catch (e) {
49
+ n || d({
50
+ type: "error",
51
+ error: e instanceof Error ? e.message : "Failed to initialize Nemme client"
52
+ });
53
+ }
54
+ })(), () => {
55
+ n = !0, r && r.destroy();
56
+ };
57
+ }, [t, f]);
58
+ let p = {
59
+ client: u.client,
60
+ isInitialized: u.isInitialized,
61
+ error: u.error
62
+ };
63
+ return /* @__PURE__ */ s(c.Provider, {
64
+ value: p,
65
+ children: r
66
+ });
67
+ }, d = () => {
68
+ let e = r(c);
69
+ if (e === void 0) throw Error("useNemmeContext must be used within a NemmeProvider");
70
+ return e;
71
+ }, f = () => {
72
+ let { client: e, isInitialized: t, error: r } = d();
73
+ return {
74
+ track: n(async (n) => {
75
+ if (!e || !t) {
76
+ console.warn("Nemme client not initialized");
77
+ return;
78
+ }
79
+ return e.track(n);
80
+ }, [e, t]),
81
+ flush: n(async () => {
82
+ if (!e || !t) {
83
+ console.warn("Nemme client not initialized");
84
+ return;
85
+ }
86
+ return e.flush();
87
+ }, [e, t]),
88
+ isInitialized: t,
89
+ error: r,
90
+ client: e
91
+ };
77
92
  };
78
- export {
79
- b as NemmeProvider,
80
- g as useNemme,
81
- I as useNemmeContext
82
- };
83
- //# sourceMappingURL=react.esm.js.map
93
+ //#endregion
94
+ export { u as NemmeProvider, f as useNemme, d as useNemmeContext };
95
+
96
+ //# sourceMappingURL=react.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"react.esm.js","sources":["../src/react/context.ts","../src/react/NemmeProvider.tsx","../src/react/useNemmeContext.ts","../src/react/useNemme.ts"],"sourcesContent":["import { createContext } from 'react';\nimport { NemmeClient } from '../client';\n\nexport interface NemmeContextType {\n client: NemmeClient | null;\n isInitialized: boolean;\n error: string | null;\n}\n\nexport const NemmeContext = createContext<NemmeContextType | undefined>(undefined);\n","import * as React from 'react';\nimport { useEffect, useMemo, useReducer } from 'react';\nimport { ClientConfigType, NemmeClient } from '../client';\nimport { NemmeContext, NemmeContextType } from './context';\n\ninterface NemmeProviderProps {\n clientKey: string;\n config: ClientConfigType;\n children: React.ReactNode;\n}\n\ntype State = {\n client: NemmeClient | null;\n isInitialized: boolean;\n error: string | null;\n};\n\ntype Action =\n | { type: 'reset' }\n | { type: 'success'; client: NemmeClient; initialized: boolean; error: string | null }\n | { type: 'error'; error: string };\n\nfunction reducer(_state: State, action: Action): State {\n switch (action.type) {\n case 'reset':\n return { client: null, isInitialized: false, error: null };\n case 'success':\n return { client: action.client, isInitialized: action.initialized, error: action.error };\n case 'error':\n return { client: null, isInitialized: false, error: action.error };\n }\n}\n\nexport const NemmeProvider: React.FC<NemmeProviderProps> = ({ clientKey, config, children }) => {\n const [state, dispatch] = useReducer(reducer, { client: null, isInitialized: false, error: null });\n\n // Stabilize config: only changes when the serialized value differs\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const stableConfig = useMemo<ClientConfigType>(() => config, [JSON.stringify(config)]);\n\n useEffect(() => {\n let isCancelled = false;\n let currentClient: NemmeClient | null = null;\n\n dispatch({ type: 'reset' });\n\n const initializeClient = async () => {\n try {\n const nemmeClient = new NemmeClient(clientKey);\n await nemmeClient.init(stableConfig);\n\n if (isCancelled) {\n nemmeClient.destroy();\n return;\n }\n\n currentClient = nemmeClient;\n dispatch({\n type: 'success',\n client: nemmeClient,\n initialized: nemmeClient.initialized,\n error: nemmeClient.lastInitError ? nemmeClient.lastInitError.message : null\n });\n } catch (err) {\n if (!isCancelled) {\n dispatch({\n type: 'error',\n error: err instanceof Error ? err.message : 'Failed to initialize Nemme client'\n });\n }\n }\n };\n\n initializeClient();\n\n return () => {\n isCancelled = true;\n if (currentClient) {\n currentClient.destroy();\n }\n };\n }, [clientKey, stableConfig]);\n\n const value: NemmeContextType = {\n client: state.client,\n isInitialized: state.isInitialized,\n error: state.error\n };\n\n return <NemmeContext.Provider value={value}>{children}</NemmeContext.Provider>;\n};\n","import { useContext } from 'react';\nimport { NemmeContext } from './context';\n\nexport const useNemmeContext = () => {\n const context = useContext(NemmeContext);\n if (context === undefined) {\n throw new Error('useNemmeContext must be used within a NemmeProvider');\n }\n return context;\n};\n","import { useCallback } from 'react';\nimport { useNemmeContext } from './useNemmeContext';\nimport { TrackEventOptions } from '../client';\n\nexport const useNemme = () => {\n const { client, isInitialized, error } = useNemmeContext();\n\n const track = useCallback(\n async <T extends TrackEventOptions>(options: T) => {\n if (!client || !isInitialized) {\n console.warn('Nemme client not initialized');\n return;\n }\n return client.track(options);\n },\n [client, isInitialized]\n );\n\n const flush = useCallback(async () => {\n if (!client || !isInitialized) {\n console.warn('Nemme client not initialized');\n return;\n }\n return client.flush();\n }, [client, isInitialized]);\n\n return {\n track,\n flush,\n isInitialized,\n error,\n client\n };\n};\n"],"names":["NemmeContext","createContext","reducer","_state","action","NemmeProvider","clientKey","config","children","state","dispatch","useReducer","stableConfig","useMemo","useEffect","isCancelled","currentClient","nemmeClient","NemmeClient","err","value","jsx","useNemmeContext","context","useContext","useNemme","client","isInitialized","error","track","useCallback","options","flush"],"mappings":";;;AASO,MAAMA,IAAeC,EAA4C,MAAS;ACajF,SAASC,EAAQC,GAAeC,GAAuB;AACrD,UAAQA,EAAO,MAAA;AAAA,IACb,KAAK;AACH,aAAO,EAAE,QAAQ,MAAM,eAAe,IAAO,OAAO,KAAA;AAAA,IACtD,KAAK;AACH,aAAO,EAAE,QAAQA,EAAO,QAAQ,eAAeA,EAAO,aAAa,OAAOA,EAAO,MAAA;AAAA,IACnF,KAAK;AACH,aAAO,EAAE,QAAQ,MAAM,eAAe,IAAO,OAAOA,EAAO,MAAA;AAAA,EAAM;AAEvE;AAEO,MAAMC,IAA8C,CAAC,EAAE,WAAAC,GAAW,QAAAC,GAAQ,UAAAC,QAAe;AAC9F,QAAM,CAACC,GAAOC,CAAQ,IAAIC,EAAWT,GAAS,EAAE,QAAQ,MAAM,eAAe,IAAO,OAAO,MAAM,GAI3FU,IAAeC,EAA0B,MAAMN,GAAQ,CAAC,KAAK,UAAUA,CAAM,CAAC,CAAC;AAErF,EAAAO,EAAU,MAAM;AACd,QAAIC,IAAc,IACdC,IAAoC;AAExC,WAAAN,EAAS,EAAE,MAAM,SAAS,IAED,YAAY;AACnC,UAAI;AACF,cAAMO,IAAc,IAAIC,EAAYZ,CAAS;AAG7C,YAFA,MAAMW,EAAY,KAAKL,CAAY,GAE/BG,GAAa;AACf,UAAAE,EAAY,QAAA;AACZ;AAAA,QACF;AAEA,QAAAD,IAAgBC,GAChBP,EAAS;AAAA,UACP,MAAM;AAAA,UACN,QAAQO;AAAA,UACR,aAAaA,EAAY;AAAA,UACzB,OAAOA,EAAY,gBAAgBA,EAAY,cAAc,UAAU;AAAA,QAAA,CACxE;AAAA,MACH,SAASE,GAAK;AACZ,QAAKJ,KACHL,EAAS;AAAA,UACP,MAAM;AAAA,UACN,OAAOS,aAAe,QAAQA,EAAI,UAAU;AAAA,QAAA,CAC7C;AAAA,MAEL;AAAA,IACF,GAEA,GAEO,MAAM;AACX,MAAAJ,IAAc,IACVC,KACFA,EAAc,QAAA;AAAA,IAElB;AAAA,EACF,GAAG,CAACV,GAAWM,CAAY,CAAC;AAE5B,QAAMQ,IAA0B;AAAA,IAC9B,QAAQX,EAAM;AAAA,IACd,eAAeA,EAAM;AAAA,IACrB,OAAOA,EAAM;AAAA,EAAA;AAGf,SAAOY,gBAAAA,EAAAA,IAACrB,EAAa,UAAb,EAAsB,OAAAoB,GAAe,UAAAZ,EAAA,CAAS;AACxD,GCvFac,IAAkB,MAAM;AACnC,QAAMC,IAAUC,EAAWxB,CAAY;AACvC,MAAIuB,MAAY;AACd,UAAM,IAAI,MAAM,qDAAqD;AAEvE,SAAOA;AACT,GCLaE,IAAW,MAAM;AAC5B,QAAM,EAAE,QAAAC,GAAQ,eAAAC,GAAe,OAAAC,EAAA,IAAUN,EAAA,GAEnCO,IAAQC;AAAA,IACZ,OAAoCC,MAAe;AACjD,UAAI,CAACL,KAAU,CAACC,GAAe;AAC7B,gBAAQ,KAAK,8BAA8B;AAC3C;AAAA,MACF;AACA,aAAOD,EAAO,MAAMK,CAAO;AAAA,IAC7B;AAAA,IACA,CAACL,GAAQC,CAAa;AAAA,EAAA,GAGlBK,IAAQF,EAAY,YAAY;AACpC,QAAI,CAACJ,KAAU,CAACC,GAAe;AAC7B,cAAQ,KAAK,8BAA8B;AAC3C;AAAA,IACF;AACA,WAAOD,EAAO,MAAA;AAAA,EAChB,GAAG,CAACA,GAAQC,CAAa,CAAC;AAE1B,SAAO;AAAA,IACL,OAAAE;AAAA,IACA,OAAAG;AAAA,IACA,eAAAL;AAAA,IACA,OAAAC;AAAA,IACA,QAAAF;AAAA,EAAA;AAEJ;"}
1
+ {"version":3,"file":"react.esm.js","names":[],"sources":["../src/react/context.ts","../src/react/NemmeProvider.tsx","../src/react/useNemmeContext.ts","../src/react/useNemme.ts"],"sourcesContent":["import { createContext } from 'react';\nimport { NemmeClient } from '../client';\n\nexport interface NemmeContextType {\n client: NemmeClient | null;\n isInitialized: boolean;\n error: string | null;\n}\n\nexport const NemmeContext = createContext<NemmeContextType | undefined>(undefined);\n","import * as React from 'react';\nimport { useEffect, useMemo, useReducer } from 'react';\nimport { ClientConfigType, NemmeClient } from '../client';\nimport { NemmeContext, NemmeContextType } from './context';\n\ninterface NemmeProviderProps {\n clientKey: string;\n config: ClientConfigType;\n children: React.ReactNode;\n}\n\ntype State = {\n client: NemmeClient | null;\n isInitialized: boolean;\n error: string | null;\n};\n\ntype Action =\n | { type: 'reset' }\n | { type: 'success'; client: NemmeClient; initialized: boolean; error: string | null }\n | { type: 'error'; error: string };\n\nfunction reducer(_state: State, action: Action): State {\n switch (action.type) {\n case 'reset':\n return { client: null, isInitialized: false, error: null };\n case 'success':\n return { client: action.client, isInitialized: action.initialized, error: action.error };\n case 'error':\n return { client: null, isInitialized: false, error: action.error };\n }\n}\n\nexport const NemmeProvider: React.FC<NemmeProviderProps> = ({ clientKey, config, children }) => {\n const [state, dispatch] = useReducer(reducer, { client: null, isInitialized: false, error: null });\n\n // Stabilize config: only changes when the serialized value differs\n const serializedConfig = JSON.stringify(config);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const stableConfig = useMemo<ClientConfigType>(() => config, [serializedConfig]);\n\n useEffect(() => {\n let isCancelled = false;\n let currentClient: NemmeClient | null = null;\n\n dispatch({ type: 'reset' });\n\n const initializeClient = async () => {\n try {\n const nemmeClient = new NemmeClient(clientKey);\n await nemmeClient.init(stableConfig);\n\n if (isCancelled) {\n nemmeClient.destroy();\n return;\n }\n\n currentClient = nemmeClient;\n dispatch({\n type: 'success',\n client: nemmeClient,\n initialized: nemmeClient.initialized,\n error: nemmeClient.lastInitError ? nemmeClient.lastInitError.message : null\n });\n } catch (err) {\n if (!isCancelled) {\n dispatch({\n type: 'error',\n error: err instanceof Error ? err.message : 'Failed to initialize Nemme client'\n });\n }\n }\n };\n\n initializeClient();\n\n return () => {\n isCancelled = true;\n if (currentClient) {\n currentClient.destroy();\n }\n };\n }, [clientKey, stableConfig]);\n\n const value: NemmeContextType = {\n client: state.client,\n isInitialized: state.isInitialized,\n error: state.error\n };\n\n return <NemmeContext.Provider value={value}>{children}</NemmeContext.Provider>;\n};\n","import { useContext } from 'react';\nimport { NemmeContext } from './context';\n\nexport const useNemmeContext = () => {\n const context = useContext(NemmeContext);\n if (context === undefined) {\n throw new Error('useNemmeContext must be used within a NemmeProvider');\n }\n return context;\n};\n","import { useCallback } from 'react';\nimport { useNemmeContext } from './useNemmeContext';\nimport { TrackEventOptions } from '../client';\n\nexport const useNemme = () => {\n const { client, isInitialized, error } = useNemmeContext();\n\n const track = useCallback(\n async <T extends TrackEventOptions>(options: T) => {\n if (!client || !isInitialized) {\n console.warn('Nemme client not initialized');\n return;\n }\n return client.track(options);\n },\n [client, isInitialized]\n );\n\n const flush = useCallback(async () => {\n if (!client || !isInitialized) {\n console.warn('Nemme client not initialized');\n return;\n }\n return client.flush();\n }, [client, isInitialized]);\n\n return {\n track,\n flush,\n isInitialized,\n error,\n client\n };\n};\n"],"mappings":";;;;AASA,IAAa,IAAe,EAA4C,KAAA,EAAU;;;ACalF,SAAS,EAAQ,GAAe,GAAuB;CACrD,QAAQ,EAAO,MAAf;EACE,KAAK,SACH,OAAO;GAAE,QAAQ;GAAM,eAAe;GAAO,OAAO;GAAM;EAC5D,KAAK,WACH,OAAO;GAAE,QAAQ,EAAO;GAAQ,eAAe,EAAO;GAAa,OAAO,EAAO;GAAO;EAC1F,KAAK,SACH,OAAO;GAAE,QAAQ;GAAM,eAAe;GAAO,OAAO,EAAO;GAAO;;;AAIxE,IAAa,KAA+C,EAAE,cAAW,WAAQ,kBAAe;CAC9F,IAAM,CAAC,GAAO,KAAY,EAAW,GAAS;EAAE,QAAQ;EAAM,eAAe;EAAO,OAAO;EAAM,CAAC,EAK5F,IAAe,QAAgC,GAAQ,CAFpC,KAAK,UAAU,EAEsB,CAAiB,CAAC;CAEhF,QAAgB;EACd,IAAI,IAAc,IACd,IAAoC;EAiCxC,OA/BA,EAAS,EAAE,MAAM,SAAS,CAAC,GA6B3B,YA3BqC;GACnC,IAAI;IACF,IAAM,IAAc,IAAI,EAAY,EAAU;IAG9C,IAFA,MAAM,EAAY,KAAK,EAAa,EAEhC,GAAa;KACf,EAAY,SAAS;KACrB;;IAIF,AADA,IAAgB,GAChB,EAAS;KACP,MAAM;KACN,QAAQ;KACR,aAAa,EAAY;KACzB,OAAO,EAAY,gBAAgB,EAAY,cAAc,UAAU;KACxE,CAAC;YACK,GAAK;IACZ,AAAK,KACH,EAAS;KACP,MAAM;KACN,OAAO,aAAe,QAAQ,EAAI,UAAU;KAC7C,CAAC;;MAKU,QAEL;GAEX,AADA,IAAc,IACV,KACF,EAAc,SAAS;;IAG1B,CAAC,GAAW,EAAa,CAAC;CAE7B,IAAM,IAA0B;EAC9B,QAAQ,EAAM;EACd,eAAe,EAAM;EACrB,OAAO,EAAM;EACd;CAED,OAAO,kBAAC,EAAa,UAAd;EAA8B;EAAQ;EAAiC,CAAA;GCvFnE,UAAwB;CACnC,IAAM,IAAU,EAAW,EAAa;CACxC,IAAI,MAAY,KAAA,GACd,MAAU,MAAM,sDAAsD;CAExE,OAAO;GCJI,UAAiB;CAC5B,IAAM,EAAE,WAAQ,kBAAe,aAAU,GAAiB;CAqB1D,OAAO;EACL,OApBY,EACZ,OAAoC,MAAe;GACjD,IAAI,CAAC,KAAU,CAAC,GAAe;IAC7B,QAAQ,KAAK,+BAA+B;IAC5C;;GAEF,OAAO,EAAO,MAAM,EAAQ;KAE9B,CAAC,GAAQ,EAAc,CAYvB;EACA,OAVY,EAAY,YAAY;GACpC,IAAI,CAAC,KAAU,CAAC,GAAe;IAC7B,QAAQ,KAAK,+BAA+B;IAC5C;;GAEF,OAAO,EAAO,OAAO;KACpB,CAAC,GAAQ,EAAc,CAIxB;EACA;EACA;EACA;EACD"}
@@ -0,0 +1 @@
1
+ export { useSyncExternalStore } from 'react';
package/dist/style.cjs CHANGED
@@ -1,2 +1 @@
1
- "use strict";
2
- //# sourceMappingURL=style.cjs.map
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});
package/dist/style.esm.js CHANGED
@@ -1,2 +0,0 @@
1
-
2
- //# sourceMappingURL=style.esm.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nemme/js-sdk",
3
- "version": "0.9.0",
3
+ "version": "0.9.4",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.esm.js",
@@ -57,6 +57,10 @@
57
57
  "author": "Nemme AS",
58
58
  "license": "MIT",
59
59
  "description": "Nemme JS SDK",
60
+ "publishConfig": {
61
+ "registry": "https://registry.npmjs.org/",
62
+ "access": "public"
63
+ },
60
64
  "peerDependencies": {
61
65
  "react": "^19.0.0",
62
66
  "react-dom": "^19.0.0"
@@ -73,53 +77,53 @@
73
77
  "@phosphor-icons/react": "^2.1.10",
74
78
  "date-fns": "^4.1.0",
75
79
  "i18next-browser-languagedetector": "^8.2.1",
76
- "react-i18next": "^16.5.4"
80
+ "react-i18next": "^17.0.7"
77
81
  },
78
82
  "devDependencies": {
79
83
  "@bcoe/v8-coverage": "^1.0.2",
80
- "@chromatic-com/storybook": "^5.0.1",
84
+ "@chromatic-com/storybook": "^5.1.2",
81
85
  "@eslint/compat": "^2.0.2",
82
86
  "@eslint/eslintrc": "^3.2.0",
83
- "@eslint/js": "^9.39.0",
87
+ "@eslint/js": "^10.0.1",
84
88
  "@nemme/ui-kit": "^0.2.1",
85
- "@storybook/addon-a11y": "^10.2.8",
86
- "@storybook/addon-docs": "^10.2.8",
87
- "@storybook/addon-vitest": "^10.2.8",
88
- "@storybook/react-vite": "^10.2.8",
89
+ "@storybook/addon-a11y": "^10.3.6",
90
+ "@storybook/addon-docs": "^10.3.6",
91
+ "@storybook/addon-vitest": "^10.3.6",
92
+ "@storybook/react-vite": "^10.3.6",
89
93
  "@tailwindcss/postcss": "^4.1.13",
90
94
  "@tailwindcss/vite": "^4.1.13",
91
95
  "@testing-library/jest-dom": "^6.6.3",
92
96
  "@testing-library/react": "^16.3.2",
93
97
  "@types/react": "^19.2.14",
94
98
  "@types/react-dom": "^19.2.3",
95
- "@typescript-eslint/eslint-plugin": "^8.56.0",
96
- "@typescript-eslint/parser": "^8.56.0",
97
- "@vitejs/plugin-react": "^5.1.4",
99
+ "@typescript-eslint/eslint-plugin": "^8.59.2",
100
+ "@typescript-eslint/parser": "^8.59.2",
101
+ "@vitejs/plugin-react": "^6.0.1",
98
102
  "@vitest/browser": "^4.0.18",
99
103
  "@vitest/coverage-v8": "^4.0.18",
100
- "ast-v8-to-istanbul": "^0.3.12",
101
- "eslint": "^9.39.0",
104
+ "ast-v8-to-istanbul": "^1.0.0",
105
+ "eslint": "^10.3.0",
102
106
  "eslint-config-prettier": "^10.1.5",
103
107
  "eslint-plugin-prettier": "^5.4.1",
104
108
  "eslint-plugin-react": "^7.37.5",
105
109
  "eslint-plugin-react-hooks": "^7.0.1",
106
- "eslint-plugin-storybook": "^10.2.8",
110
+ "eslint-plugin-storybook": "^10.3.6",
107
111
  "globals": "^17.3.0",
108
112
  "happy-dom": "^20.6.1",
109
113
  "husky": "^9.1.7",
110
- "lint-staged": "^16.1.0",
114
+ "lint-staged": "^17.0.4",
111
115
  "playwright": "^1.58.2",
112
116
  "postcss": "^8.5.6",
113
117
  "postcss-import": "^16.1.1",
114
- "postcss-prefixwrap": "^1.57.2",
118
+ "postcss-prefixwrap": "^1.58.0",
115
119
  "prettier": "^3.5.1",
116
- "react": "^19.2.4",
117
- "react-dom": "^19.2.4",
118
- "storybook": "^10.2.10",
120
+ "react": "^19.2.6",
121
+ "react-dom": "^19.2.6",
122
+ "storybook": "^10.3.6",
119
123
  "tailwindcss": "^4.1.13",
120
- "typescript": "^5.8.3",
121
- "vite": "^7.1.7",
122
- "vite-plugin-dts": "^4.5.4",
124
+ "typescript": "^6.0.3",
125
+ "vite": "^8.0.11",
126
+ "vite-plugin-dts": "^5.0.0",
123
127
  "vitest": "^4.0.18"
124
128
  }
125
129
  }