dogu-utils 0.0.5 → 0.0.6
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/index.js +1 -2
- package/dist/src/index.d.ts +2 -0
- package/dist/src/react/hooks/useOpenCloseState.d.ts +1 -0
- package/dist/src/react/index.d.ts +2 -0
- package/dist/src/react/utils/createSafeContext.d.ts +7 -0
- package/dist/src/types/EmptyObject.d.ts +1 -0
- package/dist/src/types/index.d.ts +1 -0
- package/dist/src/utils/EarlyReturn.d.ts +8 -0
- package/dist/src/utils/EarlyReturn.spec.d.ts +1 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/vitest.config.d.ts +2 -0
- package/package.json +8 -7
package/dist/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { useState, useCallback,
|
1
|
+
import { useState, useCallback, useContext, createContext } from 'react';
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
3
3
|
|
4
4
|
var useOpenCloseState = function useOpenCloseState(initialState) {
|
@@ -38,4 +38,3 @@ var createSafeContext = function createSafeContext(defaultValue) {
|
|
38
38
|
};
|
39
39
|
|
40
40
|
export { createSafeContext, useOpenCloseState };
|
41
|
-
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
export declare const useOpenCloseState: (initialState?: boolean) => readonly [boolean, () => void, () => void];
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { ReactNode } from "react";
|
2
|
+
type ProviderProps<Value> = {
|
3
|
+
children: ReactNode;
|
4
|
+
value: Value;
|
5
|
+
};
|
6
|
+
export declare const createSafeContext: <Value>(defaultValue?: Value) => readonly [({ children, value }: ProviderProps<Value>) => import("react/jsx-runtime").JSX.Element, () => Value & ({} | undefined)];
|
7
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export type EmptyObject = Record<PropertyKey, never>;
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./EmptyObject";
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from "./EarlyReturn";
|
package/package.json
CHANGED
@@ -1,12 +1,18 @@
|
|
1
1
|
{
|
2
2
|
"name": "dogu-utils",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.6",
|
4
4
|
"main": "./dist/index.js",
|
5
5
|
"files": [
|
6
6
|
"dist"
|
7
7
|
],
|
8
8
|
"types": "./dist/index.d.ts",
|
9
9
|
"type": "module",
|
10
|
+
"scripts": {
|
11
|
+
"publish": "pnpm run build && npm publish --access=public",
|
12
|
+
"build": "rollup -c",
|
13
|
+
"watch": "rollup -cw",
|
14
|
+
"test": "vitest"
|
15
|
+
},
|
10
16
|
"devDependencies": {
|
11
17
|
"@babel/core": "^7.24.4",
|
12
18
|
"@babel/preset-env": "^7.24.4",
|
@@ -20,10 +26,5 @@
|
|
20
26
|
},
|
21
27
|
"peerDependencies": {
|
22
28
|
"react": "^18.2.0"
|
23
|
-
},
|
24
|
-
"scripts": {
|
25
|
-
"build": "rollup -c",
|
26
|
-
"watch": "rollup -cw",
|
27
|
-
"test": "vitest"
|
28
29
|
}
|
29
|
-
}
|
30
|
+
}
|