diff --git a/docs/core/contributing.md b/docs/core/contributing.md index 9b387b74..ca1b4616 100644 --- a/docs/core/contributing.md +++ b/docs/core/contributing.md @@ -2,6 +2,21 @@ `react-simplikit` is designed to encourage contributions from anyone. If you'd like to contribute, please follow the guide below. +## Package Scope + +`react-simplikit` focuses on **platform-independent hooks, components, and utilities** that work across all JavaScript environments (browser, server, React Native, etc.). + +Before contributing, check which package your implementation belongs to: + +| Package | Scope | Examples | +| ------------------------- | -------------------------------------- | ------------------------------------------------------------ | +| `react-simplikit` | Platform-independent pure state/logic | `useToggle`, `useAsyncEffect`, `useLoading` | +| `@react-simplikit/mobile` | Solving mobile web-specific challenges | `useAvoidKeyboard`, `useBodyScrollLock`, `useVisualViewport` | + +::: tip +The mobile package is **not** for all browser API-dependent hooks. It specifically targets **problems encountered in mobile web environments** (viewport management, keyboard handling, layout issues on iOS Safari and Android Chrome). For example, a keyboard shortcut hook uses browser APIs but doesn't belong in the mobile package. +::: + ## Implementation Contribution When contributing implementations, add them to the appropriate directory based on their type (`components`, `hooks`, or `utils`). Each implementation must include the following elements: diff --git a/docs/ko/core/contributing.md b/docs/ko/core/contributing.md index a8834594..0aab5047 100644 --- a/docs/ko/core/contributing.md +++ b/docs/ko/core/contributing.md @@ -2,6 +2,21 @@ `react-simplikit`에는 누구나 쉽게 기여할 수 있어요. 기여하고 싶다면 아래 가이드를 참고해 주세요. +## 패키지 범위 + +`react-simplikit`은 모든 JavaScript 환경(브라우저, 서버, React Native 등)에서 동작하는 **플랫폼 독립적인 훅, 컴포넌트, 유틸리티**에 집중해요. + +기여하기 전에, 구현체가 어떤 패키지에 속하는지 확인해 주세요: + +| 패키지 | 범위 | 예시 | +| ------------------------- | ------------------------------ | ------------------------------------------------------------ | +| `react-simplikit` | 플랫폼 독립적인 순수 상태/로직 | `useToggle`, `useAsyncEffect`, `useLoading` | +| `@react-simplikit/mobile` | 모바일 웹 환경의 문제 해결 | `useAvoidKeyboard`, `useBodyScrollLock`, `useVisualViewport` | + +::: tip +mobile 패키지는 모든 브라우저 API 의존 훅을 위한 것이 **아니에요**. **모바일 웹 환경에서 겪는 문제**를 해결하는 훅/유틸리티만 해당돼요(뷰포트 관리, 키보드 처리, iOS Safari/Android Chrome의 레이아웃 이슈 등). 예를 들어, 키보드 단축키 훅은 브라우저 API를 사용하지만 mobile 패키지에 속하지 않아요. +::: + ## 구현체 기여 구현체에 기여할 때는 구현체의 유형에 따라 `components`, `hooks`, `utils` 디렉터리에 추가해 주세요. 모든 구현체는 아래 요소를 반드시 포함해야 해요. diff --git a/docs/ko/mobile/contributing.md b/docs/ko/mobile/contributing.md index ff932e7a..ad62b724 100644 --- a/docs/ko/mobile/contributing.md +++ b/docs/ko/mobile/contributing.md @@ -2,6 +2,19 @@ 이 가이드는 [core 기여 가이드](/ko/core/contributing)를 확장한 것이에요. +## 패키지 범위 + +`@react-simplikit/mobile`은 **모바일 웹 환경에서 겪는 문제를 해결**하기 위한 전용 패키지예요. + +다음과 같은 영역을 다뤄요: + +- 뷰포트 관리 (visual viewport, safe area) +- 키보드 처리 (키보드에 가려지는 콘텐츠 방지) +- iOS Safari와 Android Chrome에서 발생하는 레이아웃 이슈 +- 모바일 브라우저의 스크롤 동작 + +이 패키지는 모든 브라우저 API 의존 유틸리티를 위한 것이 **아니에요**. 브라우저 API를 사용하더라도 데스크톱이나 범용적인 문제를 해결하는 훅(예: 키보드 단축키, 마우스 좌표)은 여기에 속하지 않아요. + ## 개발 워크플로우 ``` diff --git a/docs/mobile/contributing.md b/docs/mobile/contributing.md index 3a23db50..6f68f882 100644 --- a/docs/mobile/contributing.md +++ b/docs/mobile/contributing.md @@ -2,6 +2,19 @@ This guide extends the [core contributing guide](/core/contributing). +## Package Scope + +`@react-simplikit/mobile` is a dedicated package for **solving problems encountered in mobile web environments**. + +This includes: + +- Viewport management (visual viewport, safe area) +- Keyboard handling (avoiding keyboard-hidden content) +- Layout issues specific to iOS Safari and Android Chrome +- Scroll behavior in mobile browsers + +This package is **not** for all browser API-dependent utilities. A hook that uses browser APIs but solves a desktop or general-purpose concern (e.g., keyboard shortcuts, mouse coordinates) does not belong here. + ## Development Workflow ```