@greatapps/common 1.1.87 → 1.1.88

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.
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/hooks/useDebounceState.ts"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport { useDebounce } from './useDebounce';\n\nexport function useDebounceState<T>(initialValue: T, delay: number = 400): [T, (newValue: T) => void] {\n const [rawValue, setRawValue] = useState<T>(initialValue);\n const debouncedValue = useDebounce(rawValue, delay);\n return [debouncedValue, setRawValue];\n}\n"],"mappings":";AAEA,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAErB,SAAS,iBAAoB,cAAiB,QAAgB,KAAiC;AACpG,QAAM,CAAC,UAAU,WAAW,IAAI,SAAY,YAAY;AACxD,QAAM,iBAAiB,YAAY,UAAU,KAAK;AAClD,SAAO,CAAC,gBAAgB,WAAW;AACrC;","names":[]}
1
+ {"version":3,"sources":["../../src/hooks/useDebounceState.ts"],"sourcesContent":["'use client';\n\nimport { useState } from 'react';\nimport type React from 'react';\nimport { useDebounce } from './useDebounce';\n\nexport function useDebounceState<T>(initialValue: T, delay: number = 400): [T, React.Dispatch<React.SetStateAction<T>>] {\n const [rawValue, setRawValue] = useState<T>(initialValue);\n const debouncedValue = useDebounce(rawValue, delay);\n return [debouncedValue, setRawValue];\n}\n"],"mappings":";AAEA,SAAS,gBAAgB;AAEzB,SAAS,mBAAmB;AAErB,SAAS,iBAAoB,cAAiB,QAAgB,KAAmD;AACtH,QAAM,CAAC,UAAU,WAAW,IAAI,SAAY,YAAY;AACxD,QAAM,iBAAiB,YAAY,UAAU,KAAK;AAClD,SAAO,CAAC,gBAAgB,WAAW;AACrC;","names":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@greatapps/common",
3
- "version": "1.1.87",
3
+ "version": "1.1.88",
4
4
  "description": "Shared library for GreatApps frontend applications",
5
5
  "main": "./dist/index.mjs",
6
6
  "types": "./src/index.ts",
@@ -1,9 +1,10 @@
1
1
  'use client';
2
2
 
3
3
  import { useState } from 'react';
4
+ import type React from 'react';
4
5
  import { useDebounce } from './useDebounce';
5
6
 
6
- export function useDebounceState<T>(initialValue: T, delay: number = 400): [T, (newValue: T) => void] {
7
+ export function useDebounceState<T>(initialValue: T, delay: number = 400): [T, React.Dispatch<React.SetStateAction<T>>] {
7
8
  const [rawValue, setRawValue] = useState<T>(initialValue);
8
9
  const debouncedValue = useDebounce(rawValue, delay);
9
10
  return [debouncedValue, setRawValue];