@musecat/functionkit 1.0.0 → 1.0.1

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 (43) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +25 -0
  3. package/index.ts +38 -38
  4. package/package.json +1 -1
  5. /package/{components → packages/components}/ScrolltoTop.tsx +0 -0
  6. /package/{components → packages/components}/SwitchCase.tsx +0 -0
  7. /package/{components → packages/components}/ViewportPortal.tsx +0 -0
  8. /package/{cookie → packages/cookie}/cookie.shared.ts +0 -0
  9. /package/{datetime → packages/datetime}/dateTime.client.ts +0 -0
  10. /package/{datetime → packages/datetime}/dateTime.server.ts +0 -0
  11. /package/{datetime → packages/datetime}/dateTime.shared.ts +0 -0
  12. /package/{hooks → packages/hooks}/useAvoidKeyboard.ts +0 -0
  13. /package/{hooks → packages/hooks}/useCheckInvisible.ts +0 -0
  14. /package/{hooks → packages/hooks}/useCheckScroll.ts +0 -0
  15. /package/{hooks → packages/hooks}/useClientDateTime.ts +0 -0
  16. /package/{hooks → packages/hooks}/useDebounce.ts +0 -0
  17. /package/{hooks → packages/hooks}/useDebouncedCallback.ts +0 -0
  18. /package/{hooks → packages/hooks}/useDoubleClick.ts +0 -0
  19. /package/{hooks → packages/hooks}/useGeolocation.ts +0 -0
  20. /package/{hooks → packages/hooks}/useHasMounted.ts +0 -0
  21. /package/{hooks → packages/hooks}/useIntersectionObserver.ts +0 -0
  22. /package/{hooks → packages/hooks}/useInterval.ts +0 -0
  23. /package/{hooks → packages/hooks}/useKeyboardHeight.ts +0 -0
  24. /package/{hooks → packages/hooks}/useKeyboardListNavigation.ts +0 -0
  25. /package/{hooks → packages/hooks}/useLongPress.ts +0 -0
  26. /package/{hooks → packages/hooks}/usePreservedCallback.ts +0 -0
  27. /package/{hooks → packages/hooks}/usePreservedReference.ts +0 -0
  28. /package/{hooks → packages/hooks}/useRefEffect.ts +0 -0
  29. /package/{hooks → packages/hooks}/useRelativeDateTime.ts +0 -0
  30. /package/{hooks → packages/hooks}/useTimeout.ts +0 -0
  31. /package/{hooks → packages/hooks}/useToggleState.ts +0 -0
  32. /package/{hooks → packages/hooks}/useViewportHeight.ts +0 -0
  33. /package/{hooks → packages/hooks}/useViewportMatch.ts +0 -0
  34. /package/{utils → packages/utils}/browserStorage.ts +0 -0
  35. /package/{utils → packages/utils}/buildContext.tsx +0 -0
  36. /package/{utils → packages/utils}/checkDevice.ts +0 -0
  37. /package/{utils → packages/utils}/clipboardShare.tsx +0 -0
  38. /package/{utils → packages/utils}/clipboardShare.types.ts +0 -0
  39. /package/{utils → packages/utils}/floatingMotion.ts +0 -0
  40. /package/{utils → packages/utils}/keyboardTarget.ts +0 -0
  41. /package/{utils → packages/utils}/mergeRefs.ts +0 -0
  42. /package/{utils → packages/utils}/seen.ts +0 -0
  43. /package/{utils → packages/utils}/subscribeKeyboardHeight.ts +0 -0
package/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 Musecat Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,25 @@
1
+ # @musecat/functionkit
2
+
3
+ React 19 기반 프론트엔드 유틸리티 라이브러리입니다.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @musecat/functionkit
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ 모든 훅, 컴포넌트, 유틸리티는 배럴 파일을 통해 직접 임포트하여 사용할 수 있습니다.
14
+
15
+ ```tsx
16
+ import { useDebounce, formatClientDateTime } from "@musecat/functionkit";
17
+ ```
18
+
19
+ ## Acknowledgements
20
+
21
+ 이 프로젝트의 많은 유틸리티 및 훅 코드는 [toss/react-simplikit](https://github.com/toss/react-simplikit/) 프로젝트를 참조 및 영감을 받아 작성되었습니다.
22
+
23
+ ## License
24
+
25
+ MIT License © Musecat Team. 여기에서 [라이센스](./LICENSE) 정보 확인하기
package/index.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  export {
3
3
  getViewportPortalRoot,
4
4
  ViewportPortal
5
- } from "./components/ViewportPortal";
5
+ } from "./packages/components/ViewportPortal";
6
6
  // 쿠키
7
7
  export {
8
8
  clearAllClientCookies,
@@ -10,20 +10,20 @@ export {
10
10
  getClientCookie,
11
11
  parseClientCookieNames,
12
12
  setClientCookie
13
- } from "./cookie/cookie.shared";
13
+ } from "./packages/cookie/cookie.shared";
14
14
  // 날짜/시간
15
15
  export {
16
16
  formatClientDate,
17
17
  formatClientDateTime,
18
18
  formatClientRelative,
19
19
  formatClientTime
20
- } from "./datetime/dateTime.client";
20
+ } from "./packages/datetime/dateTime.client";
21
21
  export {
22
22
  formatServerDate,
23
23
  formatServerDateTime,
24
24
  formatServerRelative,
25
25
  formatServerTime
26
- } from "./datetime/dateTime.server";
26
+ } from "./packages/datetime/dateTime.server";
27
27
  export {
28
28
  addUtcDays,
29
29
  format24HourTime,
@@ -40,34 +40,34 @@ export {
40
40
  toDate,
41
41
  toIntlLocale,
42
42
  toUtcMidnight
43
- } from "./datetime/dateTime.shared";
43
+ } from "./packages/datetime/dateTime.shared";
44
44
  export type {
45
45
  AppLocale,
46
46
  DateInput,
47
47
  DatePreset,
48
48
  TimePreset
49
- } from "./datetime/dateTime.shared";
49
+ } from "./packages/datetime/dateTime.shared";
50
50
  // hooks
51
- export { useAvoidKeyboard } from "./hooks/useAvoidKeyboard";
52
- export { useClientDateTime } from "./hooks/useClientDateTime";
53
- export { useDebounce } from "./hooks/useDebounce";
54
- export { useDebouncedCallback } from "./hooks/useDebouncedCallback";
55
- export { useDoubleClick } from "./hooks/useDoubleClick";
56
- export { useGeolocation } from "./hooks/useGeolocation";
57
- export { useHasMounted } from "./hooks/useHasMounted";
58
- export { useIntersectionObserver } from "./hooks/useIntersectionObserver";
59
- export { useInterval } from "./hooks/useInterval";
60
- export { useKeyboardHeight } from "./hooks/useKeyboardHeight";
61
- export { useKeyboardListNavigation } from "./hooks/useKeyboardListNavigation";
62
- export { useLongPress } from "./hooks/useLongPress";
63
- export { usePreservedCallback } from "./hooks/usePreservedCallback";
64
- export { usePreservedReference } from "./hooks/usePreservedReference";
65
- export { useRefEffect } from "./hooks/useRefEffect";
66
- export { useRelativeDateTime } from "./hooks/useRelativeDateTime";
67
- export { useTimeout } from "./hooks/useTimeout";
68
- export { useToggleState } from "./hooks/useToggleState";
69
- export { useViewportHeight } from "./hooks/useViewportHeight";
70
- export { useViewportMatch } from "./hooks/useViewportMatch";
51
+ export { useAvoidKeyboard } from "./packages/hooks/useAvoidKeyboard";
52
+ export { useClientDateTime } from "./packages/hooks/useClientDateTime";
53
+ export { useDebounce } from "./packages/hooks/useDebounce";
54
+ export { useDebouncedCallback } from "./packages/hooks/useDebouncedCallback";
55
+ export { useDoubleClick } from "./packages/hooks/useDoubleClick";
56
+ export { useGeolocation } from "./packages/hooks/useGeolocation";
57
+ export { useHasMounted } from "./packages/hooks/useHasMounted";
58
+ export { useIntersectionObserver } from "./packages/hooks/useIntersectionObserver";
59
+ export { useInterval } from "./packages/hooks/useInterval";
60
+ export { useKeyboardHeight } from "./packages/hooks/useKeyboardHeight";
61
+ export { useKeyboardListNavigation } from "./packages/hooks/useKeyboardListNavigation";
62
+ export { useLongPress } from "./packages/hooks/useLongPress";
63
+ export { usePreservedCallback } from "./packages/hooks/usePreservedCallback";
64
+ export { usePreservedReference } from "./packages/hooks/usePreservedReference";
65
+ export { useRefEffect } from "./packages/hooks/useRefEffect";
66
+ export { useRelativeDateTime } from "./packages/hooks/useRelativeDateTime";
67
+ export { useTimeout } from "./packages/hooks/useTimeout";
68
+ export { useToggleState } from "./packages/hooks/useToggleState";
69
+ export { useViewportHeight } from "./packages/hooks/useViewportHeight";
70
+ export { useViewportMatch } from "./packages/hooks/useViewportMatch";
71
71
  // 유틸리티
72
72
  export {
73
73
  getLocalStorage,
@@ -76,36 +76,36 @@ export {
76
76
  removeSessionStorage,
77
77
  updateLocalStorage,
78
78
  updateSessionStorage
79
- } from "./utils/browserStorage";
79
+ } from "./packages/utils/browserStorage";
80
80
  // 유틸리티
81
- export { buildContext } from "./utils/buildContext";
82
- export { getDeviceInfo } from "./utils/checkDevice";
83
- export type { DeviceInfo } from "./utils/checkDevice";
84
- export { NavigatorClipboard, NavigatorShare } from "./utils/clipboardShare";
81
+ export { buildContext } from "./packages/utils/buildContext";
82
+ export { getDeviceInfo } from "./packages/utils/checkDevice";
83
+ export type { DeviceInfo } from "./packages/utils/checkDevice";
84
+ export { NavigatorClipboard, NavigatorShare } from "./packages/utils/clipboardShare";
85
85
  export type {
86
86
  NavigatorClipboardProps,
87
87
  NavigatorClipboardResult,
88
88
  NavigatorShareProps,
89
89
  NavigatorShareResult
90
- } from "./utils/clipboardShare.types";
90
+ } from "./packages/utils/clipboardShare.types";
91
91
  export {
92
92
  getFloatingHiddenTransform,
93
93
  getFloatingMotionPreset,
94
94
  getFloatingTransformOrigin
95
- } from "./utils/floatingMotion";
95
+ } from "./packages/utils/floatingMotion";
96
96
  export type {
97
97
  FloatingMotionMode,
98
98
  FloatingMotionPreset,
99
99
  FloatingPlacement
100
- } from "./utils/floatingMotion";
100
+ } from "./packages/utils/floatingMotion";
101
101
  // 유틸리티
102
- export { isEditableKeyboardTarget } from "./utils/keyboardTarget";
103
- export { mergeRefs } from "./utils/mergeRefs";
102
+ export { isEditableKeyboardTarget } from "./packages/utils/keyboardTarget";
103
+ export { mergeRefs } from "./packages/utils/mergeRefs";
104
104
  export {
105
105
  buildSeenValue,
106
106
  hasSeenKey,
107
107
  parseSeen,
108
108
  SEEN_STORAGE_KEY
109
- } from "./utils/seen";
110
- export { subscribeKeyboardHeight } from "./utils/subscribeKeyboardHeight";
109
+ } from "./packages/utils/seen";
110
+ export { subscribeKeyboardHeight } from "./packages/utils/subscribeKeyboardHeight";
111
111
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@musecat/functionkit",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "type": "module",
5
5
  "main": "./index.ts",
6
6
  "types": "./index.ts",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes