@fvc/hooks 1.0.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.
@@ -0,0 +1,2 @@
1
+ export { useId } from './use-id/use-id';
2
+ export { useForceUpdate } from './use-force-update/use-force-update';
@@ -0,0 +1 @@
1
+ export declare const useForceUpdate: () => import("react").ActionDispatch<[]>;
@@ -0,0 +1,2 @@
1
+ export declare function randomId(): string;
2
+ export declare const useId: (id?: string, generateId?: () => string) => string;
@@ -0,0 +1 @@
1
+ import{useRef as r,useReducer as t}from"react";function n(){return"fvc-".concat(Math.random().toString(36).substr(2,9))}var o=function(t,o){void 0===o&&(o=n);var e=r(o());return t||e.current};"function"==typeof SuppressedError&&SuppressedError;var e=function(){return function(r,t){var n="function"==typeof Symbol&&r[Symbol.iterator];if(!n)return r;var o,e,u=n.call(r),a=[];try{for(;(void 0===t||t-- >0)&&!(o=u.next()).done;)a.push(o.value)}catch(r){e={error:r}}finally{try{o&&!o.done&&(n=u.return)&&n.call(u)}finally{if(e)throw e.error}}return a}(t((function(r){return r+1}),0),2)[1]};export{e as useForceUpdate,o as useId};
package/package.json ADDED
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "@fvc/hooks",
3
+ "version": "1.0.0",
4
+ "main": "./dist/lib/index.js",
5
+ "types": "./dist/lib/hooks/src/index.d.ts",
6
+ "files": [
7
+ "dist/lib/index.js",
8
+ "dist/lib/hooks",
9
+ "package.json"
10
+ ],
11
+ "scripts": {
12
+ "build": "rm -rf dist && eslint --config ../../eslint.config.js . && bunx tsc --noEmit && rollup -c ./rollup.config.mjs"
13
+ },
14
+ "dependencies": {
15
+ "react": "^18.0.0",
16
+ "antd": "^5.0.0"
17
+ }
18
+ }