dn-react-router-toolkit 0.1.1 → 0.1.2

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 (284) hide show
  1. package/dist/auth-kit/apple_auth.d.mts +24 -0
  2. package/dist/{esm/auth-kit → auth-kit}/apple_auth.d.ts +11 -2
  3. package/dist/auth-kit/apple_auth.js +75 -0
  4. package/dist/auth-kit/apple_auth.mjs +50 -0
  5. package/dist/auth-kit/auth_service.d.mts +73 -0
  6. package/dist/{esm/auth-kit → auth-kit}/auth_service.d.ts +17 -11
  7. package/dist/auth-kit/auth_service.js +257 -0
  8. package/dist/auth-kit/auth_service.mjs +218 -0
  9. package/dist/auth-kit/client/google_login_button.d.mts +9 -0
  10. package/dist/auth-kit/client/google_login_button.d.ts +9 -0
  11. package/dist/auth-kit/client/google_login_button.js +67 -0
  12. package/dist/auth-kit/client/google_login_button.mjs +32 -0
  13. package/dist/auth-kit/client/redirect_page.d.mts +5 -0
  14. package/dist/auth-kit/client/redirect_page.d.ts +5 -0
  15. package/dist/auth-kit/client/redirect_page.js +53 -0
  16. package/dist/auth-kit/client/redirect_page.mjs +18 -0
  17. package/dist/auth-kit/google_auth.d.mts +27 -0
  18. package/dist/{esm/auth-kit → auth-kit}/google_auth.d.ts +11 -2
  19. package/dist/auth-kit/google_auth.js +144 -0
  20. package/dist/auth-kit/google_auth.mjs +117 -0
  21. package/dist/auth-kit/jwt.d.mts +18 -0
  22. package/dist/{esm/auth-kit → auth-kit}/jwt.d.ts +5 -2
  23. package/dist/auth-kit/jwt.js +76 -0
  24. package/dist/auth-kit/jwt.mjs +51 -0
  25. package/dist/auth-kit/kakao_auth.d.mts +24 -0
  26. package/dist/{esm/auth-kit → auth-kit}/kakao_auth.d.ts +11 -2
  27. package/dist/auth-kit/kakao_auth.js +115 -0
  28. package/dist/auth-kit/kakao_auth.mjs +88 -0
  29. package/dist/auth-kit/repository.d.mts +42 -0
  30. package/dist/{esm/auth-kit → auth-kit}/repository.d.ts +3 -1
  31. package/dist/auth-kit/repository.js +18 -0
  32. package/dist/auth-kit/repository.mjs +0 -0
  33. package/dist/auth-kit/with_auth.d.mts +17 -0
  34. package/dist/auth-kit/with_auth.d.ts +17 -0
  35. package/dist/auth-kit/with_auth.js +108 -0
  36. package/dist/auth-kit/with_auth.mjs +71 -0
  37. package/dist/cn.d.mts +3 -0
  38. package/dist/cn.d.ts +3 -0
  39. package/dist/cn.js +32 -0
  40. package/dist/cn.mjs +7 -0
  41. package/dist/components/index.d.mts +5 -0
  42. package/dist/components/index.d.ts +5 -0
  43. package/dist/components/index.js +261 -0
  44. package/dist/components/index.mjs +219 -0
  45. package/dist/components/modal/fullscreen_container.d.mts +7 -0
  46. package/dist/components/modal/fullscreen_container.d.ts +7 -0
  47. package/dist/components/modal/fullscreen_container.js +102 -0
  48. package/dist/components/modal/fullscreen_container.mjs +68 -0
  49. package/dist/components/modal/hooks.d.mts +18 -0
  50. package/dist/components/modal/hooks.d.ts +18 -0
  51. package/dist/components/modal/hooks.js +236 -0
  52. package/dist/components/modal/hooks.mjs +204 -0
  53. package/dist/components/modal/index.d.mts +4 -0
  54. package/dist/components/modal/index.d.ts +4 -0
  55. package/dist/components/modal/index.js +238 -0
  56. package/dist/components/modal/index.mjs +203 -0
  57. package/dist/components/modal/modal.d.mts +13 -0
  58. package/dist/components/modal/modal.d.ts +13 -0
  59. package/dist/components/modal/modal.js +155 -0
  60. package/dist/components/modal/modal.mjs +130 -0
  61. package/dist/components/styles.d.mts +9 -0
  62. package/dist/components/styles.d.ts +9 -0
  63. package/dist/components/styles.js +48 -0
  64. package/dist/components/styles.mjs +17 -0
  65. package/dist/date.d.mts +3 -0
  66. package/dist/date.d.ts +3 -0
  67. package/dist/date.js +63 -0
  68. package/dist/date.mjs +28 -0
  69. package/dist/file-kit/cdn.d.mts +5 -0
  70. package/dist/file-kit/cdn.d.ts +5 -0
  71. package/dist/file-kit/cdn.js +34 -0
  72. package/dist/file-kit/cdn.mjs +9 -0
  73. package/dist/file-kit/client/drop_file_input.d.mts +33 -0
  74. package/dist/{esm/file-kit → file-kit}/client/drop_file_input.d.ts +10 -8
  75. package/dist/file-kit/client/drop_file_input.js +235 -0
  76. package/dist/file-kit/client/drop_file_input.mjs +205 -0
  77. package/dist/file-kit/client/file_uploader.d.mts +13 -0
  78. package/dist/{esm/file-kit → file-kit}/client/file_uploader.d.ts +4 -2
  79. package/dist/file-kit/client/file_uploader.js +115 -0
  80. package/dist/file-kit/client/file_uploader.mjs +90 -0
  81. package/dist/file-kit/file_service.d.mts +26 -0
  82. package/dist/{esm/file-kit → file-kit}/file_service.d.ts +7 -4
  83. package/dist/file-kit/file_service.js +60 -0
  84. package/dist/file-kit/file_service.mjs +35 -0
  85. package/dist/file-kit/object_storage.d.mts +17 -0
  86. package/dist/{esm/file-kit → file-kit}/object_storage.d.ts +6 -2
  87. package/dist/file-kit/object_storage.js +78 -0
  88. package/dist/file-kit/object_storage.mjs +57 -0
  89. package/dist/file-kit/repository.d.mts +16 -0
  90. package/dist/{esm/file-kit → file-kit}/repository.d.ts +3 -1
  91. package/dist/file-kit/repository.js +18 -0
  92. package/dist/file-kit/repository.mjs +0 -0
  93. package/dist/file-kit/responsive_image.d.mts +20 -0
  94. package/dist/file-kit/responsive_image.d.ts +20 -0
  95. package/dist/file-kit/responsive_image.js +123 -0
  96. package/dist/file-kit/responsive_image.mjs +87 -0
  97. package/dist/http-kit/index.d.mts +1 -0
  98. package/dist/http-kit/index.d.ts +1 -0
  99. package/dist/http-kit/index.js +111 -0
  100. package/dist/http-kit/index.mjs +68 -0
  101. package/dist/http-kit/response.d.mts +19 -0
  102. package/dist/http-kit/response.d.ts +19 -0
  103. package/dist/http-kit/response.js +109 -0
  104. package/dist/http-kit/response.mjs +68 -0
  105. package/dist/index.d.mts +4 -0
  106. package/dist/index.d.ts +4 -0
  107. package/dist/index.js +91 -0
  108. package/dist/index.mjs +51 -0
  109. package/dist/route/api/auth/login/[provider]/route.js +113 -0
  110. package/dist/route/api/auth/login/[provider]/route.mjs +86 -0
  111. package/dist/route/api/auth/login/_provider_/route.d.mts +20 -0
  112. package/dist/route/api/auth/login/_provider_/route.d.ts +20 -0
  113. package/dist/route/api/auth/login/route.d.mts +14 -0
  114. package/dist/route/api/auth/login/route.d.ts +14 -0
  115. package/dist/route/api/auth/login/route.js +107 -0
  116. package/dist/route/api/auth/login/route.mjs +80 -0
  117. package/dist/route/api/auth/logout/route.d.mts +14 -0
  118. package/dist/route/api/auth/logout/route.d.ts +14 -0
  119. package/dist/route/api/auth/logout/route.js +98 -0
  120. package/dist/route/api/auth/logout/route.mjs +71 -0
  121. package/dist/route/api/auth/refresh/route.d.mts +13 -0
  122. package/dist/route/api/auth/refresh/route.d.ts +13 -0
  123. package/dist/route/api/auth/refresh/route.js +92 -0
  124. package/dist/route/api/auth/refresh/route.mjs +65 -0
  125. package/dist/route/api/auth/route.d.mts +13 -0
  126. package/dist/route/api/auth/route.d.ts +13 -0
  127. package/dist/route/api/auth/route.js +82 -0
  128. package/dist/route/api/auth/route.mjs +55 -0
  129. package/dist/route/api/files/[fileId]/route.js +99 -0
  130. package/dist/route/api/files/[fileId]/route.mjs +72 -0
  131. package/dist/route/api/files/_fileId_/route.d.mts +17 -0
  132. package/dist/route/api/files/_fileId_/route.d.ts +17 -0
  133. package/dist/route/api/files/route.d.mts +16 -0
  134. package/dist/route/api/files/route.d.ts +16 -0
  135. package/dist/route/api/files/route.js +106 -0
  136. package/dist/route/api/files/route.mjs +79 -0
  137. package/dist/route/api.d.mts +29 -0
  138. package/dist/route/api.d.ts +29 -0
  139. package/dist/route/api.js +395 -0
  140. package/dist/route/api.mjs +368 -0
  141. package/dist/route/auth/callback/[provider]/route.js +120 -0
  142. package/dist/route/auth/callback/[provider]/route.mjs +93 -0
  143. package/dist/route/auth/callback/_provider_/route.d.mts +20 -0
  144. package/dist/route/auth/callback/_provider_/route.d.ts +20 -0
  145. package/dist/seo-kit/index.d.mts +6 -0
  146. package/dist/seo-kit/index.d.ts +6 -0
  147. package/dist/seo-kit/index.js +321 -0
  148. package/dist/seo-kit/index.mjs +282 -0
  149. package/dist/seo-kit/loader.d.mts +7 -0
  150. package/dist/seo-kit/loader.d.ts +7 -0
  151. package/dist/seo-kit/loader.js +43 -0
  152. package/dist/seo-kit/loader.mjs +18 -0
  153. package/dist/seo-kit/seo.d.mts +103 -0
  154. package/dist/{esm/seo-kit → seo-kit}/seo.d.ts +10 -6
  155. package/dist/seo-kit/seo.js +286 -0
  156. package/dist/seo-kit/seo.mjs +251 -0
  157. package/dist/seo-kit/seo_loader.d.mts +16 -0
  158. package/dist/seo-kit/seo_loader.d.ts +16 -0
  159. package/dist/seo-kit/seo_loader.js +68 -0
  160. package/dist/seo-kit/seo_loader.mjs +31 -0
  161. package/dist/singleton.d.mts +3 -0
  162. package/dist/singleton.d.ts +3 -0
  163. package/dist/singleton.js +37 -0
  164. package/dist/singleton.mjs +12 -0
  165. package/dist/slug.d.mts +3 -0
  166. package/dist/slug.d.ts +3 -0
  167. package/dist/slug.js +32 -0
  168. package/dist/slug.mjs +7 -0
  169. package/package.json +36 -34
  170. package/tsup.config.ts +9 -0
  171. package/dist/cjs/auth-kit/apple_auth.js +0 -61
  172. package/dist/cjs/auth-kit/auth_service.js +0 -204
  173. package/dist/cjs/auth-kit/client/google_login_button.js +0 -19
  174. package/dist/cjs/auth-kit/client/redirect_page.js +0 -18
  175. package/dist/cjs/auth-kit/google_auth.js +0 -69
  176. package/dist/cjs/auth-kit/jwt.js +0 -54
  177. package/dist/cjs/auth-kit/kakao_auth.js +0 -43
  178. package/dist/cjs/auth-kit/repository.js +0 -2
  179. package/dist/cjs/auth-kit/with_auth.js +0 -46
  180. package/dist/cjs/cn.js +0 -6
  181. package/dist/cjs/components/index.js +0 -18
  182. package/dist/cjs/components/modal/fullscreen_container.js +0 -49
  183. package/dist/cjs/components/modal/hooks.js +0 -76
  184. package/dist/cjs/components/modal/index.js +0 -19
  185. package/dist/cjs/components/modal/modal.js +0 -79
  186. package/dist/cjs/components/styles.js +0 -10
  187. package/dist/cjs/date.js +0 -31
  188. package/dist/cjs/file-kit/cdn.js +0 -9
  189. package/dist/cjs/file-kit/client/drop_file_input.js +0 -148
  190. package/dist/cjs/file-kit/client/file_uploader.js +0 -88
  191. package/dist/cjs/file-kit/file_service.js +0 -32
  192. package/dist/cjs/file-kit/object_storage.js +0 -51
  193. package/dist/cjs/file-kit/repository.js +0 -2
  194. package/dist/cjs/file-kit/responsive_image.js +0 -63
  195. package/dist/cjs/http-kit/index.js +0 -17
  196. package/dist/cjs/http-kit/response.js +0 -37
  197. package/dist/cjs/index.js +0 -20
  198. package/dist/cjs/route/api/auth/login/[provider]/route.js +0 -36
  199. package/dist/cjs/route/api/auth/login/route.js +0 -35
  200. package/dist/cjs/route/api/auth/logout/route.js +0 -22
  201. package/dist/cjs/route/api/auth/refresh/route.js +0 -22
  202. package/dist/cjs/route/api/auth/route.js +0 -12
  203. package/dist/cjs/route/api/files/[fileId]/route.js +0 -20
  204. package/dist/cjs/route/api/files/route.js +0 -34
  205. package/dist/cjs/route/auth/callback/[provider]/route.js +0 -38
  206. package/dist/cjs/route/index.js +0 -80
  207. package/dist/cjs/seo-kit/index.js +0 -19
  208. package/dist/cjs/seo-kit/loader.js +0 -17
  209. package/dist/cjs/seo-kit/seo.js +0 -278
  210. package/dist/cjs/seo-kit/seo_loader.js +0 -15
  211. package/dist/cjs/singleton.js +0 -12
  212. package/dist/cjs/slug.js +0 -10
  213. package/dist/esm/auth-kit/apple_auth.js +0 -57
  214. package/dist/esm/auth-kit/auth_service.js +0 -197
  215. package/dist/esm/auth-kit/client/google_login_button.d.ts +0 -5
  216. package/dist/esm/auth-kit/client/google_login_button.js +0 -16
  217. package/dist/esm/auth-kit/client/redirect_page.d.ts +0 -1
  218. package/dist/esm/auth-kit/client/redirect_page.js +0 -15
  219. package/dist/esm/auth-kit/google_auth.js +0 -65
  220. package/dist/esm/auth-kit/jwt.js +0 -50
  221. package/dist/esm/auth-kit/kakao_auth.js +0 -39
  222. package/dist/esm/auth-kit/repository.js +0 -1
  223. package/dist/esm/auth-kit/with_auth.d.ts +0 -12
  224. package/dist/esm/auth-kit/with_auth.js +0 -43
  225. package/dist/esm/cn.d.ts +0 -1
  226. package/dist/esm/cn.js +0 -3
  227. package/dist/esm/components/index.d.ts +0 -2
  228. package/dist/esm/components/index.js +0 -2
  229. package/dist/esm/components/modal/fullscreen_container.d.ts +0 -5
  230. package/dist/esm/components/modal/fullscreen_container.js +0 -45
  231. package/dist/esm/components/modal/hooks.d.ts +0 -15
  232. package/dist/esm/components/modal/hooks.js +0 -67
  233. package/dist/esm/components/modal/index.d.ts +0 -3
  234. package/dist/esm/components/modal/index.js +0 -3
  235. package/dist/esm/components/modal/modal.d.ts +0 -10
  236. package/dist/esm/components/modal/modal.js +0 -43
  237. package/dist/esm/components/styles.d.ts +0 -7
  238. package/dist/esm/components/styles.js +0 -7
  239. package/dist/esm/date.d.ts +0 -1
  240. package/dist/esm/date.js +0 -24
  241. package/dist/esm/file-kit/cdn.d.ts +0 -3
  242. package/dist/esm/file-kit/cdn.js +0 -5
  243. package/dist/esm/file-kit/client/drop_file_input.js +0 -144
  244. package/dist/esm/file-kit/client/file_uploader.js +0 -84
  245. package/dist/esm/file-kit/file_service.js +0 -28
  246. package/dist/esm/file-kit/object_storage.js +0 -47
  247. package/dist/esm/file-kit/repository.js +0 -1
  248. package/dist/esm/file-kit/responsive_image.d.ts +0 -17
  249. package/dist/esm/file-kit/responsive_image.js +0 -58
  250. package/dist/esm/http-kit/index.d.ts +0 -1
  251. package/dist/esm/http-kit/index.js +0 -1
  252. package/dist/esm/http-kit/response.d.ts +0 -17
  253. package/dist/esm/http-kit/response.js +0 -31
  254. package/dist/esm/index.d.ts +0 -4
  255. package/dist/esm/index.js +0 -4
  256. package/dist/esm/route/api/auth/login/[provider]/route.d.ts +0 -10
  257. package/dist/esm/route/api/auth/login/[provider]/route.js +0 -32
  258. package/dist/esm/route/api/auth/login/route.d.ts +0 -6
  259. package/dist/esm/route/api/auth/login/route.js +0 -31
  260. package/dist/esm/route/api/auth/logout/route.d.ts +0 -6
  261. package/dist/esm/route/api/auth/logout/route.js +0 -18
  262. package/dist/esm/route/api/auth/refresh/route.d.ts +0 -4
  263. package/dist/esm/route/api/auth/refresh/route.js +0 -18
  264. package/dist/esm/route/api/auth/route.d.ts +0 -4
  265. package/dist/esm/route/api/auth/route.js +0 -8
  266. package/dist/esm/route/api/files/[fileId]/route.d.ts +0 -8
  267. package/dist/esm/route/api/files/[fileId]/route.js +0 -16
  268. package/dist/esm/route/api/files/route.d.ts +0 -6
  269. package/dist/esm/route/api/files/route.js +0 -30
  270. package/dist/esm/route/auth/callback/[provider]/route.d.ts +0 -11
  271. package/dist/esm/route/auth/callback/[provider]/route.js +0 -34
  272. package/dist/esm/route/index.d.ts +0 -22
  273. package/dist/esm/route/index.js +0 -76
  274. package/dist/esm/seo-kit/index.d.ts +0 -3
  275. package/dist/esm/seo-kit/index.js +0 -3
  276. package/dist/esm/seo-kit/loader.d.ts +0 -5
  277. package/dist/esm/seo-kit/loader.js +0 -14
  278. package/dist/esm/seo-kit/seo.js +0 -275
  279. package/dist/esm/seo-kit/seo_loader.d.ts +0 -12
  280. package/dist/esm/seo-kit/seo_loader.js +0 -12
  281. package/dist/esm/singleton.d.ts +0 -1
  282. package/dist/esm/singleton.js +0 -9
  283. package/dist/esm/slug.d.ts +0 -1
  284. package/dist/esm/slug.js +0 -6
@@ -0,0 +1,103 @@
1
+ import * as Schema from 'schema-dts';
2
+ import React from 'react';
3
+ import { MetaFunction } from 'react-router';
4
+
5
+ type SEOImage = {
6
+ id?: string;
7
+ url: string;
8
+ alt?: string;
9
+ width?: number;
10
+ height?: number;
11
+ };
12
+ type SEO = Awaited<ReturnType<ReturnType<typeof configSEO>["init"]>>;
13
+ declare function configSEO(config: {
14
+ origin: string;
15
+ siteName: string;
16
+ description: string;
17
+ keywords?: string[];
18
+ thumbnail?: SEOImage | (() => SEOImage | null | Promise<SEOImage | null>);
19
+ structedData?: Schema.Thing[] | (() => Schema.Thing[] | Promise<Schema.Thing[]>);
20
+ copyright?: string;
21
+ }): {
22
+ config: {
23
+ origin: string;
24
+ siteName: string;
25
+ description: string;
26
+ keywords?: string[];
27
+ thumbnail?: SEOImage | (() => SEOImage | null | Promise<SEOImage | null>);
28
+ structedData?: Schema.Thing[] | (() => Schema.Thing[] | Promise<Schema.Thing[]>);
29
+ copyright?: string;
30
+ };
31
+ init(props?: {
32
+ title?: string;
33
+ description?: string;
34
+ keywords?: string[];
35
+ path?: string;
36
+ type?: string;
37
+ canonicalPath?: string;
38
+ breadcrumbs?: {
39
+ label: string;
40
+ href: string;
41
+ }[];
42
+ thumbnail?: SEOImage;
43
+ images?: SEOImage[];
44
+ updatedAt?: Date;
45
+ createdAt?: Date;
46
+ structedData?: Schema.Thing[] | (() => Schema.Thing[] | Promise<Schema.Thing[]>);
47
+ article?: boolean;
48
+ blogPosting?: boolean;
49
+ creativeWork?: boolean;
50
+ visualArtwork?: boolean;
51
+ collection?: {
52
+ title: string;
53
+ url: string;
54
+ description?: string;
55
+ thumbnail?: SEOImage;
56
+ updatedAt?: Date;
57
+ createdAt?: Date;
58
+ }[];
59
+ }): Promise<{
60
+ config: {
61
+ origin: string;
62
+ siteName: string;
63
+ description: string;
64
+ keywords?: string[];
65
+ thumbnail?: SEOImage | (() => SEOImage | null | Promise<SEOImage | null>);
66
+ structedData?: Schema.Thing[] | (() => Schema.Thing[] | Promise<Schema.Thing[]>);
67
+ copyright?: string;
68
+ };
69
+ props: {
70
+ title?: string;
71
+ description?: string;
72
+ keywords?: string[];
73
+ path?: string;
74
+ type?: string;
75
+ canonicalPath?: string;
76
+ breadcrumbs?: {
77
+ label: string;
78
+ href: string;
79
+ }[];
80
+ thumbnail?: SEOImage;
81
+ images?: SEOImage[];
82
+ updatedAt?: Date;
83
+ createdAt?: Date;
84
+ structedData?: Schema.Thing[] | (() => Schema.Thing[] | Promise<Schema.Thing[]>);
85
+ article?: boolean;
86
+ blogPosting?: boolean;
87
+ creativeWork?: boolean;
88
+ visualArtwork?: boolean;
89
+ collection?: {
90
+ title: string;
91
+ url: string;
92
+ description?: string;
93
+ thumbnail?: SEOImage;
94
+ updatedAt?: Date;
95
+ createdAt?: Date;
96
+ }[];
97
+ };
98
+ meta: MetaFunction<unknown, Record<string, unknown>>;
99
+ generateJSONLD: () => React.JSX.Element;
100
+ }>;
101
+ };
102
+
103
+ export { type SEO, type SEOImage, configSEO };
@@ -1,14 +1,16 @@
1
- import * as Schema from "schema-dts";
2
- import type { MetaFunction } from "react-router";
3
- export type SEOImage = {
1
+ import * as Schema from 'schema-dts';
2
+ import React from 'react';
3
+ import { MetaFunction } from 'react-router';
4
+
5
+ type SEOImage = {
4
6
  id?: string;
5
7
  url: string;
6
8
  alt?: string;
7
9
  width?: number;
8
10
  height?: number;
9
11
  };
10
- export type SEO = Awaited<ReturnType<ReturnType<typeof configSEO>["init"]>>;
11
- export declare function configSEO(config: {
12
+ type SEO = Awaited<ReturnType<ReturnType<typeof configSEO>["init"]>>;
13
+ declare function configSEO(config: {
12
14
  origin: string;
13
15
  siteName: string;
14
16
  description: string;
@@ -94,6 +96,8 @@ export declare function configSEO(config: {
94
96
  }[];
95
97
  };
96
98
  meta: MetaFunction<unknown, Record<string, unknown>>;
97
- generateJSONLD: () => import("react/jsx-runtime").JSX.Element;
99
+ generateJSONLD: () => React.JSX.Element;
98
100
  }>;
99
101
  };
102
+
103
+ export { type SEO, type SEOImage, configSEO };
@@ -0,0 +1,286 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+
30
+ // src/seo-kit/seo.tsx
31
+ var seo_exports = {};
32
+ __export(seo_exports, {
33
+ configSEO: () => configSEO
34
+ });
35
+ module.exports = __toCommonJS(seo_exports);
36
+ var import_react = __toESM(require("react"));
37
+ function configSEO(config) {
38
+ return {
39
+ config,
40
+ async init(props = {}) {
41
+ const canonicalPath = props.canonicalPath;
42
+ const url = canonicalPath ? `${config.origin}${canonicalPath}` : `${config.origin}${props.path || ""}`;
43
+ const pageTitle = props.title ? `${props.title} | ${config.siteName}` : config.siteName;
44
+ const description = props.description || config.description;
45
+ const keywords = props.keywords || config.keywords;
46
+ const websiteSchemaId = `${config.origin}/#website`;
47
+ const websiteSchema = {
48
+ "@type": "WebSite",
49
+ "@id": websiteSchemaId,
50
+ url: config.origin,
51
+ name: config.siteName,
52
+ alternateName: config.siteName,
53
+ description: config.description,
54
+ inLanguage: "ko"
55
+ };
56
+ const thumbnailSchemaId = `${url}/#thumbnail`;
57
+ const thumbnail = props.thumbnail || (typeof config.thumbnail === "function" ? await config.thumbnail() : config.thumbnail);
58
+ const thumbnailUrl = thumbnail?.url;
59
+ const socialImage = thumbnail ? [
60
+ typeof thumbnail === "string" ? {
61
+ url: thumbnail,
62
+ alt: `${props.title} \uB300\uD45C \uC774\uBBF8\uC9C0`
63
+ } : thumbnail
64
+ ] : [];
65
+ const images = [
66
+ ...thumbnailUrl ? [
67
+ {
68
+ id: thumbnailSchemaId,
69
+ url: thumbnailUrl,
70
+ alt: `${props.title} \uB300\uD45C \uC774\uBBF8\uC9C0`
71
+ }
72
+ ] : [],
73
+ ...props.images || [],
74
+ ...props.collection?.map((portfolio) => portfolio.thumbnail) || []
75
+ ].filter(Boolean);
76
+ const image = images.filter((file) => file.id).map((file) => ({
77
+ "@type": "ImageObject",
78
+ "@id": `${url}/#${file.id}`
79
+ }));
80
+ const breadcrumbSchemaId = `${url}#breadcrumb`;
81
+ const updatedAt = props.updatedAt;
82
+ const createdAt = props.createdAt;
83
+ const meta = () => {
84
+ return [
85
+ { title: pageTitle },
86
+ { name: "description", content: description },
87
+ { name: "keywords", content: keywords?.join(", ") || "" },
88
+ {
89
+ tagName: "link",
90
+ rel: "canonical",
91
+ href: url
92
+ },
93
+ { property: "og:type", content: props.type || "website" },
94
+ { property: "og:title", content: pageTitle },
95
+ { property: "og:description", content: description },
96
+ { property: "og:url", content: url },
97
+ { property: "og:site_name", content: config.siteName },
98
+ ...socialImage.map((file) => ({
99
+ property: "og:image",
100
+ content: file.url
101
+ })),
102
+ {
103
+ property: "twitter:card",
104
+ content: socialImage.length > 0 ? "summary_large_image" : "summary"
105
+ },
106
+ { property: "twitter:title", content: pageTitle },
107
+ { property: "twitter:description", content: description },
108
+ ...socialImage.map((file) => ({
109
+ property: "twitter:image",
110
+ content: file.url
111
+ }))
112
+ ];
113
+ };
114
+ const additionalStructedData = [
115
+ ...typeof props.structedData === "function" ? await props.structedData() : props.structedData || [],
116
+ ...typeof config.structedData === "function" ? await config.structedData() : config.structedData || []
117
+ ];
118
+ function getStructedData() {
119
+ const collectionMainEntity = props.collection ? {
120
+ "@type": "ItemList",
121
+ numberOfItems: props.collection.length,
122
+ itemListElement: props.collection.map((item, index) => ({
123
+ "@type": "ListItem",
124
+ position: index + 1,
125
+ url: item.url,
126
+ item: {
127
+ "@type": "WebPage",
128
+ "@id": `${item.url}#webpage`,
129
+ url: item.url,
130
+ name: item.title,
131
+ thumbnailUrl: item.thumbnail?.url,
132
+ dateModified: item.updatedAt?.toISOString(),
133
+ dateCreated: item.createdAt?.toISOString(),
134
+ datePublished: item.createdAt?.toISOString()
135
+ }
136
+ }))
137
+ } : void 0;
138
+ return {
139
+ "@context": "https://schema.org",
140
+ "@graph": [
141
+ {
142
+ "@type": "WebPage",
143
+ "@id": `${url}#webpage`,
144
+ url,
145
+ name: pageTitle,
146
+ description,
147
+ keywords,
148
+ dateModified: updatedAt?.toISOString(),
149
+ datePublished: createdAt?.toISOString(),
150
+ dateCreated: createdAt?.toISOString(),
151
+ primaryImageOfPage: thumbnail ? {
152
+ "@id": thumbnailSchemaId
153
+ } : void 0,
154
+ isPartOf: {
155
+ "@id": websiteSchemaId
156
+ },
157
+ inLanguage: "ko",
158
+ breadcrumb: props.breadcrumbs && props.breadcrumbs.length > 0 ? {
159
+ "@id": breadcrumbSchemaId
160
+ } : void 0,
161
+ image,
162
+ mainEntity: collectionMainEntity
163
+ },
164
+ props.article && {
165
+ "@type": "Article",
166
+ "@id": `${url}#article`,
167
+ url,
168
+ name: pageTitle,
169
+ description,
170
+ keywords,
171
+ headline: pageTitle,
172
+ dateModified: updatedAt?.toISOString(),
173
+ datePublished: createdAt?.toISOString(),
174
+ dateCreated: createdAt?.toISOString(),
175
+ isPartOf: {
176
+ "@id": websiteSchemaId
177
+ },
178
+ inLanguage: "ko",
179
+ image
180
+ },
181
+ props.blogPosting && {
182
+ "@type": "BlogPosting",
183
+ "@id": `${url}/#blogposting`,
184
+ url,
185
+ headline: pageTitle,
186
+ description,
187
+ thumbnailUrl,
188
+ datePublished: createdAt?.toISOString(),
189
+ dateModified: updatedAt?.toISOString(),
190
+ isPartOf: { "@id": websiteSchemaId },
191
+ image
192
+ },
193
+ props.creativeWork && {
194
+ "@type": "CreativeWork",
195
+ "@id": `${url}/#creativework`,
196
+ url,
197
+ name: pageTitle,
198
+ description,
199
+ datePublished: createdAt?.toISOString(),
200
+ dateModified: updatedAt?.toISOString(),
201
+ isPartOf: { "@id": websiteSchemaId },
202
+ thumbnailUrl,
203
+ image
204
+ },
205
+ props.visualArtwork && {
206
+ "@type": "VisualArtwork",
207
+ "@id": `${url}/#visualartwork`,
208
+ url,
209
+ name: pageTitle,
210
+ description,
211
+ datePublished: createdAt?.toISOString(),
212
+ dateModified: updatedAt?.toISOString(),
213
+ isPartOf: { "@id": websiteSchemaId },
214
+ thumbnailUrl,
215
+ image
216
+ },
217
+ props.collection && {
218
+ "@type": "CollectionPage",
219
+ "@id": `${url}/#collectionpage`,
220
+ url,
221
+ name: pageTitle,
222
+ description,
223
+ isPartOf: { "@id": websiteSchemaId },
224
+ image,
225
+ inLanguage: "ko-KR",
226
+ breadcrumb: props.breadcrumbs && props.breadcrumbs.length > 0 ? {
227
+ "@id": `${url}/#breadcrumb`
228
+ } : void 0,
229
+ mainEntity: collectionMainEntity
230
+ },
231
+ websiteSchema,
232
+ props.breadcrumbs && props.breadcrumbs.length > 0 && {
233
+ "@id": breadcrumbSchemaId,
234
+ "@type": "BreadcrumbList",
235
+ itemListElement: props.breadcrumbs.map((breadcrumb, index) => ({
236
+ "@type": "ListItem",
237
+ position: index + 1,
238
+ name: breadcrumb.label,
239
+ item: `${config.origin}${breadcrumb.href}`
240
+ }))
241
+ },
242
+ ...additionalStructedData,
243
+ ...images.map((file) => {
244
+ return {
245
+ "@type": "ImageObject",
246
+ "@id": `${url}/#${file.id}`,
247
+ url: file.url,
248
+ contentUrl: file.url,
249
+ name: file.alt,
250
+ description: file.alt,
251
+ width: file?.width?.toString(),
252
+ height: file?.height?.toString(),
253
+ creditText: config.copyright,
254
+ license: `${config.origin}/terms`,
255
+ copyrightNotice: config.copyright,
256
+ acquireLicensePage: `${config.origin}/terms`
257
+ };
258
+ })
259
+ ].filter(Boolean)
260
+ };
261
+ }
262
+ function generateJSONLD() {
263
+ const structedData = getStructedData();
264
+ return /* @__PURE__ */ import_react.default.createElement(
265
+ "script",
266
+ {
267
+ type: "application/ld+json",
268
+ dangerouslySetInnerHTML: {
269
+ __html: JSON.stringify(structedData).replace(/</g, "\\u003c")
270
+ }
271
+ }
272
+ );
273
+ }
274
+ return {
275
+ config,
276
+ props,
277
+ meta,
278
+ generateJSONLD
279
+ };
280
+ }
281
+ };
282
+ }
283
+ // Annotate the CommonJS export names for ESM import in node:
284
+ 0 && (module.exports = {
285
+ configSEO
286
+ });
@@ -0,0 +1,251 @@
1
+ // src/seo-kit/seo.tsx
2
+ import React from "react";
3
+ function configSEO(config) {
4
+ return {
5
+ config,
6
+ async init(props = {}) {
7
+ const canonicalPath = props.canonicalPath;
8
+ const url = canonicalPath ? `${config.origin}${canonicalPath}` : `${config.origin}${props.path || ""}`;
9
+ const pageTitle = props.title ? `${props.title} | ${config.siteName}` : config.siteName;
10
+ const description = props.description || config.description;
11
+ const keywords = props.keywords || config.keywords;
12
+ const websiteSchemaId = `${config.origin}/#website`;
13
+ const websiteSchema = {
14
+ "@type": "WebSite",
15
+ "@id": websiteSchemaId,
16
+ url: config.origin,
17
+ name: config.siteName,
18
+ alternateName: config.siteName,
19
+ description: config.description,
20
+ inLanguage: "ko"
21
+ };
22
+ const thumbnailSchemaId = `${url}/#thumbnail`;
23
+ const thumbnail = props.thumbnail || (typeof config.thumbnail === "function" ? await config.thumbnail() : config.thumbnail);
24
+ const thumbnailUrl = thumbnail?.url;
25
+ const socialImage = thumbnail ? [
26
+ typeof thumbnail === "string" ? {
27
+ url: thumbnail,
28
+ alt: `${props.title} \uB300\uD45C \uC774\uBBF8\uC9C0`
29
+ } : thumbnail
30
+ ] : [];
31
+ const images = [
32
+ ...thumbnailUrl ? [
33
+ {
34
+ id: thumbnailSchemaId,
35
+ url: thumbnailUrl,
36
+ alt: `${props.title} \uB300\uD45C \uC774\uBBF8\uC9C0`
37
+ }
38
+ ] : [],
39
+ ...props.images || [],
40
+ ...props.collection?.map((portfolio) => portfolio.thumbnail) || []
41
+ ].filter(Boolean);
42
+ const image = images.filter((file) => file.id).map((file) => ({
43
+ "@type": "ImageObject",
44
+ "@id": `${url}/#${file.id}`
45
+ }));
46
+ const breadcrumbSchemaId = `${url}#breadcrumb`;
47
+ const updatedAt = props.updatedAt;
48
+ const createdAt = props.createdAt;
49
+ const meta = () => {
50
+ return [
51
+ { title: pageTitle },
52
+ { name: "description", content: description },
53
+ { name: "keywords", content: keywords?.join(", ") || "" },
54
+ {
55
+ tagName: "link",
56
+ rel: "canonical",
57
+ href: url
58
+ },
59
+ { property: "og:type", content: props.type || "website" },
60
+ { property: "og:title", content: pageTitle },
61
+ { property: "og:description", content: description },
62
+ { property: "og:url", content: url },
63
+ { property: "og:site_name", content: config.siteName },
64
+ ...socialImage.map((file) => ({
65
+ property: "og:image",
66
+ content: file.url
67
+ })),
68
+ {
69
+ property: "twitter:card",
70
+ content: socialImage.length > 0 ? "summary_large_image" : "summary"
71
+ },
72
+ { property: "twitter:title", content: pageTitle },
73
+ { property: "twitter:description", content: description },
74
+ ...socialImage.map((file) => ({
75
+ property: "twitter:image",
76
+ content: file.url
77
+ }))
78
+ ];
79
+ };
80
+ const additionalStructedData = [
81
+ ...typeof props.structedData === "function" ? await props.structedData() : props.structedData || [],
82
+ ...typeof config.structedData === "function" ? await config.structedData() : config.structedData || []
83
+ ];
84
+ function getStructedData() {
85
+ const collectionMainEntity = props.collection ? {
86
+ "@type": "ItemList",
87
+ numberOfItems: props.collection.length,
88
+ itemListElement: props.collection.map((item, index) => ({
89
+ "@type": "ListItem",
90
+ position: index + 1,
91
+ url: item.url,
92
+ item: {
93
+ "@type": "WebPage",
94
+ "@id": `${item.url}#webpage`,
95
+ url: item.url,
96
+ name: item.title,
97
+ thumbnailUrl: item.thumbnail?.url,
98
+ dateModified: item.updatedAt?.toISOString(),
99
+ dateCreated: item.createdAt?.toISOString(),
100
+ datePublished: item.createdAt?.toISOString()
101
+ }
102
+ }))
103
+ } : void 0;
104
+ return {
105
+ "@context": "https://schema.org",
106
+ "@graph": [
107
+ {
108
+ "@type": "WebPage",
109
+ "@id": `${url}#webpage`,
110
+ url,
111
+ name: pageTitle,
112
+ description,
113
+ keywords,
114
+ dateModified: updatedAt?.toISOString(),
115
+ datePublished: createdAt?.toISOString(),
116
+ dateCreated: createdAt?.toISOString(),
117
+ primaryImageOfPage: thumbnail ? {
118
+ "@id": thumbnailSchemaId
119
+ } : void 0,
120
+ isPartOf: {
121
+ "@id": websiteSchemaId
122
+ },
123
+ inLanguage: "ko",
124
+ breadcrumb: props.breadcrumbs && props.breadcrumbs.length > 0 ? {
125
+ "@id": breadcrumbSchemaId
126
+ } : void 0,
127
+ image,
128
+ mainEntity: collectionMainEntity
129
+ },
130
+ props.article && {
131
+ "@type": "Article",
132
+ "@id": `${url}#article`,
133
+ url,
134
+ name: pageTitle,
135
+ description,
136
+ keywords,
137
+ headline: pageTitle,
138
+ dateModified: updatedAt?.toISOString(),
139
+ datePublished: createdAt?.toISOString(),
140
+ dateCreated: createdAt?.toISOString(),
141
+ isPartOf: {
142
+ "@id": websiteSchemaId
143
+ },
144
+ inLanguage: "ko",
145
+ image
146
+ },
147
+ props.blogPosting && {
148
+ "@type": "BlogPosting",
149
+ "@id": `${url}/#blogposting`,
150
+ url,
151
+ headline: pageTitle,
152
+ description,
153
+ thumbnailUrl,
154
+ datePublished: createdAt?.toISOString(),
155
+ dateModified: updatedAt?.toISOString(),
156
+ isPartOf: { "@id": websiteSchemaId },
157
+ image
158
+ },
159
+ props.creativeWork && {
160
+ "@type": "CreativeWork",
161
+ "@id": `${url}/#creativework`,
162
+ url,
163
+ name: pageTitle,
164
+ description,
165
+ datePublished: createdAt?.toISOString(),
166
+ dateModified: updatedAt?.toISOString(),
167
+ isPartOf: { "@id": websiteSchemaId },
168
+ thumbnailUrl,
169
+ image
170
+ },
171
+ props.visualArtwork && {
172
+ "@type": "VisualArtwork",
173
+ "@id": `${url}/#visualartwork`,
174
+ url,
175
+ name: pageTitle,
176
+ description,
177
+ datePublished: createdAt?.toISOString(),
178
+ dateModified: updatedAt?.toISOString(),
179
+ isPartOf: { "@id": websiteSchemaId },
180
+ thumbnailUrl,
181
+ image
182
+ },
183
+ props.collection && {
184
+ "@type": "CollectionPage",
185
+ "@id": `${url}/#collectionpage`,
186
+ url,
187
+ name: pageTitle,
188
+ description,
189
+ isPartOf: { "@id": websiteSchemaId },
190
+ image,
191
+ inLanguage: "ko-KR",
192
+ breadcrumb: props.breadcrumbs && props.breadcrumbs.length > 0 ? {
193
+ "@id": `${url}/#breadcrumb`
194
+ } : void 0,
195
+ mainEntity: collectionMainEntity
196
+ },
197
+ websiteSchema,
198
+ props.breadcrumbs && props.breadcrumbs.length > 0 && {
199
+ "@id": breadcrumbSchemaId,
200
+ "@type": "BreadcrumbList",
201
+ itemListElement: props.breadcrumbs.map((breadcrumb, index) => ({
202
+ "@type": "ListItem",
203
+ position: index + 1,
204
+ name: breadcrumb.label,
205
+ item: `${config.origin}${breadcrumb.href}`
206
+ }))
207
+ },
208
+ ...additionalStructedData,
209
+ ...images.map((file) => {
210
+ return {
211
+ "@type": "ImageObject",
212
+ "@id": `${url}/#${file.id}`,
213
+ url: file.url,
214
+ contentUrl: file.url,
215
+ name: file.alt,
216
+ description: file.alt,
217
+ width: file?.width?.toString(),
218
+ height: file?.height?.toString(),
219
+ creditText: config.copyright,
220
+ license: `${config.origin}/terms`,
221
+ copyrightNotice: config.copyright,
222
+ acquireLicensePage: `${config.origin}/terms`
223
+ };
224
+ })
225
+ ].filter(Boolean)
226
+ };
227
+ }
228
+ function generateJSONLD() {
229
+ const structedData = getStructedData();
230
+ return /* @__PURE__ */ React.createElement(
231
+ "script",
232
+ {
233
+ type: "application/ld+json",
234
+ dangerouslySetInnerHTML: {
235
+ __html: JSON.stringify(structedData).replace(/</g, "\\u003c")
236
+ }
237
+ }
238
+ );
239
+ }
240
+ return {
241
+ config,
242
+ props,
243
+ meta,
244
+ generateJSONLD
245
+ };
246
+ }
247
+ };
248
+ }
249
+ export {
250
+ configSEO
251
+ };
@@ -0,0 +1,16 @@
1
+ import { LoaderFn } from './loader.mjs';
2
+ import * as react_router from 'react-router';
3
+ import React, { JSX } from 'react';
4
+ import { SEO } from './seo.mjs';
5
+ import 'schema-dts';
6
+
7
+ declare function createSEOLoader<T, U extends JSX.IntrinsicAttributes & {
8
+ seo: SEO;
9
+ }>(fn?: LoaderFn<T, U>): {
10
+ meta: (props: T) => Promise<react_router.MetaFunction<unknown, Record<string, unknown>>>;
11
+ Page(Fc: React.FC<U>): (props: T) => Promise<JSX.Element>;
12
+ getData(): U;
13
+ wrap<V>(mapper: (props: U) => V | Promise<V>): (props: T) => Promise<V>;
14
+ };
15
+
16
+ export { createSEOLoader };