@hua-labs/hua-ux 0.1.0-alpha.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 (210) hide show
  1. package/README.md +839 -0
  2. package/dist/framework/a11y/components/LiveRegion.d.ts +64 -0
  3. package/dist/framework/a11y/components/LiveRegion.d.ts.map +1 -0
  4. package/dist/framework/a11y/components/LiveRegion.js +43 -0
  5. package/dist/framework/a11y/components/SkipToContent.d.ts +62 -0
  6. package/dist/framework/a11y/components/SkipToContent.d.ts.map +1 -0
  7. package/dist/framework/a11y/components/SkipToContent.js +60 -0
  8. package/dist/framework/a11y/hooks/useFocusManagement.d.ts +60 -0
  9. package/dist/framework/a11y/hooks/useFocusManagement.d.ts.map +1 -0
  10. package/dist/framework/a11y/hooks/useFocusManagement.js +71 -0
  11. package/dist/framework/a11y/hooks/useFocusTrap.d.ts +64 -0
  12. package/dist/framework/a11y/hooks/useFocusTrap.d.ts.map +1 -0
  13. package/dist/framework/a11y/hooks/useFocusTrap.js +185 -0
  14. package/dist/framework/a11y/hooks/useLiveRegion.d.ts +56 -0
  15. package/dist/framework/a11y/hooks/useLiveRegion.d.ts.map +1 -0
  16. package/dist/framework/a11y/hooks/useLiveRegion.js +60 -0
  17. package/dist/framework/a11y/index.d.ts +16 -0
  18. package/dist/framework/a11y/index.d.ts.map +1 -0
  19. package/dist/framework/a11y/index.js +11 -0
  20. package/dist/framework/branding/context.d.ts +52 -0
  21. package/dist/framework/branding/context.d.ts.map +1 -0
  22. package/dist/framework/branding/context.js +96 -0
  23. package/dist/framework/branding/css-vars.d.ts +34 -0
  24. package/dist/framework/branding/css-vars.d.ts.map +1 -0
  25. package/dist/framework/branding/css-vars.js +95 -0
  26. package/dist/framework/branding/tailwind-config.d.ts +38 -0
  27. package/dist/framework/branding/tailwind-config.d.ts.map +1 -0
  28. package/dist/framework/branding/tailwind-config.js +66 -0
  29. package/dist/framework/components/BrandedButton.d.ts +53 -0
  30. package/dist/framework/components/BrandedButton.d.ts.map +1 -0
  31. package/dist/framework/components/BrandedButton.js +40 -0
  32. package/dist/framework/components/BrandedCard.d.ts +52 -0
  33. package/dist/framework/components/BrandedCard.d.ts.map +1 -0
  34. package/dist/framework/components/BrandedCard.js +73 -0
  35. package/dist/framework/components/ErrorBoundary.d.ts +92 -0
  36. package/dist/framework/components/ErrorBoundary.d.ts.map +1 -0
  37. package/dist/framework/components/ErrorBoundary.js +121 -0
  38. package/dist/framework/components/HuaUxLayout.d.ts +29 -0
  39. package/dist/framework/components/HuaUxLayout.d.ts.map +1 -0
  40. package/dist/framework/components/HuaUxLayout.js +32 -0
  41. package/dist/framework/components/HuaUxPage.d.ts +48 -0
  42. package/dist/framework/components/HuaUxPage.d.ts.map +1 -0
  43. package/dist/framework/components/HuaUxPage.js +105 -0
  44. package/dist/framework/components/Providers.d.ts +17 -0
  45. package/dist/framework/components/Providers.d.ts.map +1 -0
  46. package/dist/framework/components/Providers.js +72 -0
  47. package/dist/framework/components/WelcomePage.d.ts +44 -0
  48. package/dist/framework/components/WelcomePage.d.ts.map +1 -0
  49. package/dist/framework/components/WelcomePage.js +80 -0
  50. package/dist/framework/config/index.d.ts +182 -0
  51. package/dist/framework/config/index.d.ts.map +1 -0
  52. package/dist/framework/config/index.js +329 -0
  53. package/dist/framework/config/merge.d.ts +26 -0
  54. package/dist/framework/config/merge.d.ts.map +1 -0
  55. package/dist/framework/config/merge.js +160 -0
  56. package/dist/framework/config/schema.d.ts +25 -0
  57. package/dist/framework/config/schema.d.ts.map +1 -0
  58. package/dist/framework/config/schema.js +122 -0
  59. package/dist/framework/hooks/useMotion.d.ts +45 -0
  60. package/dist/framework/hooks/useMotion.d.ts.map +1 -0
  61. package/dist/framework/hooks/useMotion.js +40 -0
  62. package/dist/framework/index.d.ts +37 -0
  63. package/dist/framework/index.d.ts.map +1 -0
  64. package/dist/framework/index.js +42 -0
  65. package/dist/framework/license/errors.d.ts +15 -0
  66. package/dist/framework/license/errors.d.ts.map +1 -0
  67. package/dist/framework/license/errors.js +52 -0
  68. package/dist/framework/license/index.d.ts +70 -0
  69. package/dist/framework/license/index.d.ts.map +1 -0
  70. package/dist/framework/license/index.js +124 -0
  71. package/dist/framework/license/loader.d.ts +26 -0
  72. package/dist/framework/license/loader.d.ts.map +1 -0
  73. package/dist/framework/license/loader.js +137 -0
  74. package/dist/framework/license/types.d.ts +67 -0
  75. package/dist/framework/license/types.d.ts.map +1 -0
  76. package/dist/framework/license/types.js +18 -0
  77. package/dist/framework/loading/components/SkeletonGroup.d.ts +44 -0
  78. package/dist/framework/loading/components/SkeletonGroup.d.ts.map +1 -0
  79. package/dist/framework/loading/components/SkeletonGroup.js +34 -0
  80. package/dist/framework/loading/components/SuspenseWrapper.d.ts +58 -0
  81. package/dist/framework/loading/components/SuspenseWrapper.d.ts.map +1 -0
  82. package/dist/framework/loading/components/SuspenseWrapper.js +40 -0
  83. package/dist/framework/loading/hoc/withSuspense.d.ts +46 -0
  84. package/dist/framework/loading/hoc/withSuspense.d.ts.map +1 -0
  85. package/dist/framework/loading/hoc/withSuspense.js +54 -0
  86. package/dist/framework/loading/hooks/useDelayedLoading.d.ts +56 -0
  87. package/dist/framework/loading/hooks/useDelayedLoading.d.ts.map +1 -0
  88. package/dist/framework/loading/hooks/useDelayedLoading.js +97 -0
  89. package/dist/framework/loading/hooks/useLoadingState.d.ts +69 -0
  90. package/dist/framework/loading/hooks/useLoadingState.d.ts.map +1 -0
  91. package/dist/framework/loading/hooks/useLoadingState.js +59 -0
  92. package/dist/framework/loading/index.d.ts +16 -0
  93. package/dist/framework/loading/index.d.ts.map +1 -0
  94. package/dist/framework/loading/index.js +13 -0
  95. package/dist/framework/middleware/i18n.d.ts +90 -0
  96. package/dist/framework/middleware/i18n.d.ts.map +1 -0
  97. package/dist/framework/middleware/i18n.js +99 -0
  98. package/dist/framework/plugins/index.d.ts +8 -0
  99. package/dist/framework/plugins/index.d.ts.map +1 -0
  100. package/dist/framework/plugins/index.js +6 -0
  101. package/dist/framework/plugins/registry.d.ts +95 -0
  102. package/dist/framework/plugins/registry.d.ts.map +1 -0
  103. package/dist/framework/plugins/registry.js +160 -0
  104. package/dist/framework/plugins/types.d.ts +97 -0
  105. package/dist/framework/plugins/types.d.ts.map +1 -0
  106. package/dist/framework/plugins/types.js +6 -0
  107. package/dist/framework/seo/geo/examples.d.ts +87 -0
  108. package/dist/framework/seo/geo/examples.d.ts.map +1 -0
  109. package/dist/framework/seo/geo/examples.js +295 -0
  110. package/dist/framework/seo/geo/generateGEOMetadata.d.ts +107 -0
  111. package/dist/framework/seo/geo/generateGEOMetadata.d.ts.map +1 -0
  112. package/dist/framework/seo/geo/generateGEOMetadata.js +404 -0
  113. package/dist/framework/seo/geo/index.d.ts +19 -0
  114. package/dist/framework/seo/geo/index.d.ts.map +1 -0
  115. package/dist/framework/seo/geo/index.js +21 -0
  116. package/dist/framework/seo/geo/presets.d.ts +52 -0
  117. package/dist/framework/seo/geo/presets.d.ts.map +1 -0
  118. package/dist/framework/seo/geo/presets.js +47 -0
  119. package/dist/framework/seo/geo/structuredData.d.ts +187 -0
  120. package/dist/framework/seo/geo/structuredData.d.ts.map +1 -0
  121. package/dist/framework/seo/geo/structuredData.js +354 -0
  122. package/dist/framework/seo/geo/test-utils.d.ts +78 -0
  123. package/dist/framework/seo/geo/test-utils.d.ts.map +1 -0
  124. package/dist/framework/seo/geo/test-utils.js +139 -0
  125. package/dist/framework/seo/geo/types.d.ts +225 -0
  126. package/dist/framework/seo/geo/types.d.ts.map +1 -0
  127. package/dist/framework/seo/geo/types.js +51 -0
  128. package/dist/framework/types/index.d.ts +577 -0
  129. package/dist/framework/types/index.d.ts.map +1 -0
  130. package/dist/framework/types/index.js +6 -0
  131. package/dist/framework/utils/data-fetching.d.ts +45 -0
  132. package/dist/framework/utils/data-fetching.d.ts.map +1 -0
  133. package/dist/framework/utils/data-fetching.js +74 -0
  134. package/dist/framework/utils/file-structure.d.ts +29 -0
  135. package/dist/framework/utils/file-structure.d.ts.map +1 -0
  136. package/dist/framework/utils/file-structure.js +72 -0
  137. package/dist/framework/utils/metadata.d.ts +109 -0
  138. package/dist/framework/utils/metadata.d.ts.map +1 -0
  139. package/dist/framework/utils/metadata.js +105 -0
  140. package/dist/index.d.ts +15 -0
  141. package/dist/index.d.ts.map +1 -0
  142. package/dist/index.js +21 -0
  143. package/dist/presets/index.d.ts +8 -0
  144. package/dist/presets/index.d.ts.map +1 -0
  145. package/dist/presets/index.js +7 -0
  146. package/dist/presets/marketing.d.ts +41 -0
  147. package/dist/presets/marketing.d.ts.map +1 -0
  148. package/dist/presets/marketing.js +81 -0
  149. package/dist/presets/product.d.ts +41 -0
  150. package/dist/presets/product.d.ts.map +1 -0
  151. package/dist/presets/product.js +74 -0
  152. package/package.json +91 -0
  153. package/src/framework/README.md +329 -0
  154. package/src/framework/__tests__/branding/css-vars.test.ts +147 -0
  155. package/src/framework/__tests__/components/ErrorBoundary.test.tsx +146 -0
  156. package/src/framework/__tests__/config/defineConfig.test.ts +138 -0
  157. package/src/framework/__tests__/hooks/useMotion.test.ts +105 -0
  158. package/src/framework/__tests__/seo/geo/generateGEOMetadata.test.ts +207 -0
  159. package/src/framework/__tests__/seo/geo/structuredData.test.ts +262 -0
  160. package/src/framework/a11y/components/LiveRegion.tsx +89 -0
  161. package/src/framework/a11y/components/SkipToContent.tsx +103 -0
  162. package/src/framework/a11y/hooks/useFocusManagement.ts +125 -0
  163. package/src/framework/a11y/hooks/useFocusTrap.ts +239 -0
  164. package/src/framework/a11y/hooks/useLiveRegion.ts +95 -0
  165. package/src/framework/a11y/index.ts +17 -0
  166. package/src/framework/branding/context.tsx +135 -0
  167. package/src/framework/branding/css-vars.ts +110 -0
  168. package/src/framework/branding/tailwind-config.ts +90 -0
  169. package/src/framework/components/BrandedButton.tsx +94 -0
  170. package/src/framework/components/BrandedCard.tsx +87 -0
  171. package/src/framework/components/ErrorBoundary.tsx +215 -0
  172. package/src/framework/components/HuaUxLayout.tsx +36 -0
  173. package/src/framework/components/HuaUxPage.tsx +138 -0
  174. package/src/framework/components/Providers.tsx +98 -0
  175. package/src/framework/components/WelcomePage.tsx +207 -0
  176. package/src/framework/config/index.ts +349 -0
  177. package/src/framework/config/merge.ts +190 -0
  178. package/src/framework/config/schema.ts +140 -0
  179. package/src/framework/hooks/useMotion.ts +57 -0
  180. package/src/framework/index.ts +122 -0
  181. package/src/framework/license/errors.ts +63 -0
  182. package/src/framework/license/index.ts +137 -0
  183. package/src/framework/license/loader.ts +158 -0
  184. package/src/framework/license/types.ts +95 -0
  185. package/src/framework/loading/components/SkeletonGroup.tsx +70 -0
  186. package/src/framework/loading/components/SuspenseWrapper.tsx +88 -0
  187. package/src/framework/loading/hoc/withSuspense.tsx +96 -0
  188. package/src/framework/loading/hooks/useDelayedLoading.ts +127 -0
  189. package/src/framework/loading/hooks/useLoadingState.ts +103 -0
  190. package/src/framework/loading/index.ts +19 -0
  191. package/src/framework/middleware/i18n.ts +161 -0
  192. package/src/framework/middleware/index.ts +7 -0
  193. package/src/framework/plugins/index.ts +13 -0
  194. package/src/framework/plugins/registry.ts +186 -0
  195. package/src/framework/plugins/types.ts +106 -0
  196. package/src/framework/seo/geo/examples.tsx +415 -0
  197. package/src/framework/seo/geo/generateGEOMetadata.ts +441 -0
  198. package/src/framework/seo/geo/index.ts +61 -0
  199. package/src/framework/seo/geo/presets.ts +58 -0
  200. package/src/framework/seo/geo/structuredData.ts +422 -0
  201. package/src/framework/seo/geo/test-utils.ts +179 -0
  202. package/src/framework/seo/geo/types.ts +315 -0
  203. package/src/framework/types/index.ts +623 -0
  204. package/src/framework/utils/data-fetching.ts +95 -0
  205. package/src/framework/utils/file-structure.ts +88 -0
  206. package/src/framework/utils/metadata.ts +152 -0
  207. package/src/index.ts +31 -0
  208. package/src/presets/index.ts +8 -0
  209. package/src/presets/marketing.ts +88 -0
  210. package/src/presets/product.ts +81 -0
@@ -0,0 +1,315 @@
1
+ /**
2
+ * @hua-labs/hua-ux/framework - GEO Types
3
+ *
4
+ * GEO (Generative Engine Optimization) types for AI search engine discoverability
5
+ * ChatGPT, Claude, Gemini, Perplexity 같은 AI가 hua-ux를 잘 찾고 추천하도록 하는 타입 정의
6
+ */
7
+
8
+ /**
9
+ * Meta tag name constants
10
+ * HTML meta 태그 이름 상수
11
+ */
12
+ export const META_NAMES = {
13
+ DESCRIPTION: 'description',
14
+ KEYWORDS: 'keywords',
15
+ SOFTWARE_VERSION: 'software:version',
16
+ SOFTWARE_CATEGORY: 'software:category',
17
+ SOFTWARE_LANGUAGE: 'software:language',
18
+ AI_CONTEXT: 'ai:context',
19
+ } as const;
20
+
21
+ /**
22
+ * Open Graph property constants
23
+ * Open Graph 속성 상수
24
+ */
25
+ export const OG_PROPERTIES = {
26
+ TITLE: 'og:title',
27
+ DESCRIPTION: 'og:description',
28
+ TYPE: 'og:type',
29
+ URL: 'og:url',
30
+ SITE_NAME: 'og:site_name',
31
+ } as const;
32
+
33
+ /**
34
+ * Software Application Type
35
+ * Schema.org SoftwareApplication types
36
+ */
37
+ export type SoftwareApplicationType =
38
+ | 'WebApplication'
39
+ | 'MobileApplication'
40
+ | 'DesktopApplication'
41
+ | 'DeveloperApplication';
42
+
43
+ /**
44
+ * Programming Language
45
+ * 프로그래밍 언어 (프레임워크가 아닌 실제 언어만)
46
+ */
47
+ export type ProgrammingLanguage =
48
+ | 'TypeScript'
49
+ | 'JavaScript'
50
+ | 'Python'
51
+ | 'Java'
52
+ | 'Go'
53
+ | 'Rust'
54
+ | 'C#'
55
+ | 'C++'
56
+ | 'Ruby'
57
+ | 'PHP'
58
+ | 'Swift'
59
+ | 'Kotlin'
60
+ | 'Dart'
61
+ | (string & {}); // Allow custom strings for flexibility
62
+
63
+ /**
64
+ * Technology Stack
65
+ * 기술 스택 (프레임워크, 라이브러리 등)
66
+ */
67
+ export type TechnologyStack =
68
+ | 'React'
69
+ | 'Next.js'
70
+ | 'Vue'
71
+ | 'Angular'
72
+ | 'Svelte'
73
+ | 'Node.js'
74
+ | 'Express'
75
+ | 'Tailwind CSS'
76
+ | 'Zustand'
77
+ | 'Prisma'
78
+ | (string & {}); // Allow custom strings for flexibility
79
+
80
+ /**
81
+ * Software Category
82
+ * Categories that help AI understand the software domain
83
+ */
84
+ export type SoftwareCategory =
85
+ | 'UI Framework'
86
+ | 'Component Library'
87
+ | 'Developer Tool'
88
+ | 'UX Framework'
89
+ | 'Accessibility Tool'
90
+ | 'Internationalization Tool'
91
+ | 'Animation Library';
92
+
93
+ /**
94
+ * GEO Configuration
95
+ * AI 검색 엔진이 이해하기 쉬운 구조화된 메타데이터 설정
96
+ */
97
+ export interface GEOConfig {
98
+ /**
99
+ * Software name
100
+ * AI가 참조할 소프트웨어 이름
101
+ */
102
+ name: string;
103
+
104
+ /**
105
+ * Alternative names or aliases
106
+ * 대체 이름 또는 별칭 (예: "hua-ux", "@hua-labs/hua-ux")
107
+ */
108
+ alternateName?: string[];
109
+
110
+ /**
111
+ * Clear, concise description
112
+ * AI가 이해하기 쉬운 명확하고 간결한 설명 (1-2 문장)
113
+ */
114
+ description: string;
115
+
116
+ /**
117
+ * Software version
118
+ */
119
+ version?: string;
120
+
121
+ /**
122
+ * Application category
123
+ * Schema.org applicationCategory
124
+ */
125
+ applicationCategory?: SoftwareCategory | SoftwareCategory[];
126
+
127
+ /**
128
+ * Programming language(s)
129
+ * 프로그래밍 언어 (TypeScript, JavaScript, Python 등)
130
+ */
131
+ programmingLanguage?: ProgrammingLanguage | ProgrammingLanguage[];
132
+
133
+ /**
134
+ * Technology stack
135
+ * 기술 스택 (React, Next.js, Vue 등)
136
+ */
137
+ technologyStack?: TechnologyStack | TechnologyStack[];
138
+
139
+ /**
140
+ * Software type
141
+ */
142
+ applicationType?: SoftwareApplicationType;
143
+
144
+ /**
145
+ * Homepage URL
146
+ */
147
+ url?: string;
148
+
149
+ /**
150
+ * Documentation URL
151
+ */
152
+ documentationUrl?: string;
153
+
154
+ /**
155
+ * Repository URL (GitHub, GitLab, etc.)
156
+ */
157
+ codeRepository?: string;
158
+
159
+ /**
160
+ * License type (MIT, Apache-2.0, etc.)
161
+ */
162
+ license?: string;
163
+
164
+ /**
165
+ * Author or organization
166
+ */
167
+ author?: {
168
+ name: string;
169
+ url?: string;
170
+ };
171
+
172
+ /**
173
+ * Key features
174
+ * AI가 쉽게 참조할 수 있는 주요 기능 목록
175
+ */
176
+ features?: string[];
177
+
178
+ /**
179
+ * Use cases
180
+ * AI가 추천할 때 사용할 유스케이스 예시
181
+ */
182
+ useCases?: string[];
183
+
184
+ /**
185
+ * Keywords for AI discovery
186
+ * AI 검색을 위한 키워드
187
+ */
188
+ keywords?: string[];
189
+
190
+ /**
191
+ * Operating system compatibility
192
+ */
193
+ operatingSystem?: string[];
194
+
195
+ /**
196
+ * Software requirements or dependencies
197
+ */
198
+ softwareRequirements?: string[];
199
+
200
+ /**
201
+ * Related software or alternatives
202
+ * AI가 비교/추천할 때 사용할 관련 소프트웨어
203
+ */
204
+ relatedTo?: string[];
205
+ }
206
+
207
+ /**
208
+ * Utility types for better developer experience
209
+ * 더 나은 개발자 경험을 위한 유틸리티 타입
210
+ */
211
+
212
+ /**
213
+ * Required GEO config fields
214
+ * 필수 GEO 설정 필드
215
+ */
216
+ export type RequiredGEOConfig = Required<Pick<GEOConfig, 'name' | 'description'>>;
217
+
218
+ /**
219
+ * Optional GEO config fields
220
+ * 선택적 GEO 설정 필드
221
+ */
222
+ export type OptionalGEOConfig = Partial<Omit<GEOConfig, 'name' | 'description'>>;
223
+
224
+ /**
225
+ * GEO config input type
226
+ * GEO 설정 입력 타입 (필수 + 선택)
227
+ */
228
+ export type GEOConfigInput = RequiredGEOConfig & OptionalGEOConfig;
229
+
230
+ /**
231
+ * Type guard for GEO config validation
232
+ * GEO 설정 유효성 검사를 위한 타입 가드
233
+ *
234
+ * @param config - Unknown value to check
235
+ * @returns True if config is a valid GEOConfig
236
+ *
237
+ * @example
238
+ * ```tsx
239
+ * if (isValidGEOConfig(userInput)) {
240
+ * const geoMeta = generateGEOMetadata(userInput);
241
+ * }
242
+ * ```
243
+ */
244
+ export function isValidGEOConfig(config: unknown): config is GEOConfig {
245
+ return (
246
+ typeof config === 'object' &&
247
+ config !== null &&
248
+ 'name' in config &&
249
+ 'description' in config &&
250
+ typeof (config as { name: unknown }).name === 'string' &&
251
+ typeof (config as { description: unknown }).description === 'string'
252
+ );
253
+ }
254
+
255
+ /**
256
+ * Structured Data (Schema.org JSON-LD)
257
+ * AI가 파싱하기 쉬운 구조화된 데이터
258
+ */
259
+ export interface StructuredData {
260
+ '@context': 'https://schema.org';
261
+ '@type':
262
+ | 'SoftwareApplication'
263
+ | 'FAQPage'
264
+ | 'TechArticle'
265
+ | 'HowTo'
266
+ | 'Question'
267
+ | 'Answer'
268
+ | 'Organization'
269
+ | 'CreativeWork'
270
+ | 'Code'
271
+ | 'VideoObject';
272
+ [key: string]: string | number | boolean | object | unknown[] | undefined;
273
+ }
274
+
275
+ /**
276
+ * GEO Metadata Result
277
+ * generateGEOMetadata() 함수의 반환 타입
278
+ */
279
+ export interface GEOMetadata {
280
+ /**
281
+ * HTML meta tags
282
+ */
283
+ meta: {
284
+ name: string;
285
+ content: string;
286
+ }[];
287
+
288
+ /**
289
+ * JSON-LD structured data
290
+ * Schema.org 구조화된 데이터
291
+ */
292
+ jsonLd: StructuredData[];
293
+
294
+ /**
295
+ * Open Graph tags for social/AI sharing
296
+ */
297
+ openGraph?: {
298
+ property: string;
299
+ content: string;
300
+ }[];
301
+
302
+ /**
303
+ * Twitter Card tags
304
+ */
305
+ twitter?: {
306
+ name: string;
307
+ content: string;
308
+ }[];
309
+
310
+ /**
311
+ * Schema version
312
+ * GEO 메타데이터 스키마 버전 (향후 마이그레이션 및 디버깅용)
313
+ */
314
+ version?: string;
315
+ }