@ihab_giihan/core 0.1.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.
package/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # @ihab_giihan/core
2
+
3
+ Shared package extracted from the speechear project. It can contain UI components, shared styles, and common app-level utilities.
4
+
5
+ ## Build
6
+
7
+ 1. From repository root:
8
+
9
+ ```bash
10
+ cd packages/core
11
+ npm install
12
+ npm run build
13
+ ```
14
+
15
+ 빌드 결과는 `packages/core/dist`에 생성됩니다.
16
+
17
+ ## Usage
18
+
19
+ ```js
20
+ import { CoreScope, MenuButton, NoticeBox } from '@ihab_giihan/core'
21
+ import '@ihab_giihan/core/styles.css'
22
+
23
+ function App() {
24
+ return (
25
+ <CoreScope>
26
+ <MenuButton item={{ key: 'home', label: 'Home' }} />
27
+ <NoticeBox title="Notice" lines={['Scoped styles only apply inside CoreScope.']} />
28
+ </CoreScope>
29
+ )
30
+ }
31
+ ```
32
+
33
+ ## Subpath Imports
34
+
35
+ ```js
36
+ import { CoreScope, Button, Faq } from '@ihab_giihan/core/components'
37
+ import { useMediaQuery, useFontScale } from '@ihab_giihan/core/hooks'
38
+ import { speak, stopSpeaking, editLine } from '@ihab_giihan/core/utils'
39
+ import '@ihab_giihan/core/styles.css'
40
+ ```
41
+
42
+ `CoreScope` is required when you render styled package components in another project. The package CSS is namespaced under `.ihab-core-scope` so it does not leak into the host app.
43
+
44
+ ## Notes
45
+ - 이 패키지는 `react`와 `react-dom`을 peer dependency로 사용합니다.
46
+ - CSS 및 빌드 설정은 프로젝트 스타일에 맞춰 추가 조정이 필요합니다.
47
+
48
+ ## CSS
49
+
50
+ 공용 스타일은 번들된 CSS 파일로 추출됩니다. 프로젝트에서 사용하려면 패키지의 CSS를 수동으로 임포트하세요:
51
+
52
+ ```js
53
+ import '@ihab_giihan/core/styles.css'
54
+ import React from 'react'
55
+ import { CoreScope, MenuButton } from '@ihab_giihan/core'
56
+
57
+ function App(){
58
+ return (
59
+ <CoreScope>
60
+ <MenuButton item={{ key: 'home', label: 'Home' }} />
61
+ </CoreScope>
62
+ )
63
+ }
64
+ ```
65
+
66
+ 또는 번들러(예: Vite/CRA)에 CSS 자동 포함 설정을 추가할 수 있습니다.