@ya-accelerators/nextjs-framework 0.0.0

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 (318) hide show
  1. package/@types/general.d.ts +1 -0
  2. package/@types/image.d.ts +8 -0
  3. package/@types/next-auth.d.ts +18 -0
  4. package/dist/env.client.d.ts +3 -0
  5. package/dist/env.client.js +9 -0
  6. package/dist/env.client.js.map +1 -0
  7. package/dist/env.d.ts +6 -0
  8. package/dist/env.js +18 -0
  9. package/dist/env.js.map +1 -0
  10. package/dist/hooks/date/index.d.ts +11 -0
  11. package/dist/hooks/date/index.js +14 -0
  12. package/dist/hooks/date/index.js.map +1 -0
  13. package/dist/hooks/dispatch/index.d.ts +9 -0
  14. package/dist/hooks/dispatch/index.jsx +25 -0
  15. package/dist/hooks/dispatch/index.jsx.map +1 -0
  16. package/dist/hooks/index.d.ts +6 -0
  17. package/dist/hooks/index.js +7 -0
  18. package/dist/hooks/index.js.map +1 -0
  19. package/dist/hooks/loading/index.d.ts +10 -0
  20. package/dist/hooks/loading/index.jsx +22 -0
  21. package/dist/hooks/loading/index.jsx.map +1 -0
  22. package/dist/hooks/localStorage/index.d.ts +1 -0
  23. package/dist/hooks/localStorage/index.js +53 -0
  24. package/dist/hooks/localStorage/index.js.map +1 -0
  25. package/dist/hooks/modal/index.d.ts +26 -0
  26. package/dist/hooks/modal/index.jsx +63 -0
  27. package/dist/hooks/modal/index.jsx.map +1 -0
  28. package/dist/hooks/toast/index.d.ts +15 -0
  29. package/dist/hooks/toast/index.jsx +39 -0
  30. package/dist/hooks/toast/index.jsx.map +1 -0
  31. package/dist/i18n/index.d.ts +3 -0
  32. package/dist/i18n/index.js +40 -0
  33. package/dist/i18n/index.js.map +1 -0
  34. package/dist/i18n/strings/en-US.json +18 -0
  35. package/dist/i18n/strings/ja-JP.json +37 -0
  36. package/dist/index.d.ts +7 -0
  37. package/dist/index.js +8 -0
  38. package/dist/index.js.map +1 -0
  39. package/dist/lib/cookie/index.d.ts +9 -0
  40. package/dist/lib/cookie/index.js +66 -0
  41. package/dist/lib/cookie/index.js.map +1 -0
  42. package/dist/lib/index.d.ts +10 -0
  43. package/dist/lib/index.js +11 -0
  44. package/dist/lib/index.js.map +1 -0
  45. package/dist/lib/next-auth/index.d.ts +2 -0
  46. package/dist/lib/next-auth/index.js +62 -0
  47. package/dist/lib/next-auth/index.js.map +1 -0
  48. package/dist/lib/s3/index.d.ts +2 -0
  49. package/dist/lib/s3/index.js +17 -0
  50. package/dist/lib/s3/index.js.map +1 -0
  51. package/dist/lib/trpc/index.d.ts +8 -0
  52. package/dist/lib/trpc/index.js +32 -0
  53. package/dist/lib/trpc/index.js.map +1 -0
  54. package/dist/styles/globals.css +26 -0
  55. package/dist/styles/tailwind.config.d.ts +577 -0
  56. package/dist/styles/tailwind.config.js +671 -0
  57. package/dist/styles/tailwind.config.js.map +1 -0
  58. package/dist/styles/tailwind.config.ts +672 -0
  59. package/dist/tsconfig.tsbuildinfo +1 -0
  60. package/dist/ui/component/button/base.d.ts +27 -0
  61. package/dist/ui/component/button/base.jsx +54 -0
  62. package/dist/ui/component/button/base.jsx.map +1 -0
  63. package/dist/ui/component/button/colored/index.d.ts +11 -0
  64. package/dist/ui/component/button/colored/index.jsx +7 -0
  65. package/dist/ui/component/button/colored/index.jsx.map +1 -0
  66. package/dist/ui/component/button/image/index.d.ts +4 -0
  67. package/dist/ui/component/button/image/index.jsx +5 -0
  68. package/dist/ui/component/button/image/index.jsx.map +1 -0
  69. package/dist/ui/component/button/index.d.ts +18 -0
  70. package/dist/ui/component/button/index.jsx +25 -0
  71. package/dist/ui/component/button/index.jsx.map +1 -0
  72. package/dist/ui/component/button/text/index.d.ts +11 -0
  73. package/dist/ui/component/button/text/index.jsx +8 -0
  74. package/dist/ui/component/button/text/index.jsx.map +1 -0
  75. package/dist/ui/component/card/index.d.ts +12 -0
  76. package/dist/ui/component/card/index.jsx +20 -0
  77. package/dist/ui/component/card/index.jsx.map +1 -0
  78. package/dist/ui/component/icon/index.d.ts +7 -0
  79. package/dist/ui/component/icon/index.jsx +3 -0
  80. package/dist/ui/component/icon/index.jsx.map +1 -0
  81. package/dist/ui/component/index.d.ts +95 -0
  82. package/dist/ui/component/index.js +15 -0
  83. package/dist/ui/component/index.js.map +1 -0
  84. package/dist/ui/component/loading/index.d.ts +5 -0
  85. package/dist/ui/component/loading/index.jsx +27 -0
  86. package/dist/ui/component/loading/index.jsx.map +1 -0
  87. package/dist/ui/component/ssr/index.d.ts +5 -0
  88. package/dist/ui/component/ssr/index.jsx +11 -0
  89. package/dist/ui/component/ssr/index.jsx.map +1 -0
  90. package/dist/ui/component/typography/H1/index.d.ts +7 -0
  91. package/dist/ui/component/typography/H1/index.jsx +13 -0
  92. package/dist/ui/component/typography/H1/index.jsx.map +1 -0
  93. package/dist/ui/component/typography/H2/index.d.ts +7 -0
  94. package/dist/ui/component/typography/H2/index.jsx +13 -0
  95. package/dist/ui/component/typography/H2/index.jsx.map +1 -0
  96. package/dist/ui/component/typography/H3/index.d.ts +7 -0
  97. package/dist/ui/component/typography/H3/index.jsx +13 -0
  98. package/dist/ui/component/typography/H3/index.jsx.map +1 -0
  99. package/dist/ui/component/typography/H4/index.d.ts +7 -0
  100. package/dist/ui/component/typography/H4/index.jsx +13 -0
  101. package/dist/ui/component/typography/H4/index.jsx.map +1 -0
  102. package/dist/ui/component/typography/H5/index.d.ts +7 -0
  103. package/dist/ui/component/typography/H5/index.jsx +13 -0
  104. package/dist/ui/component/typography/H5/index.jsx.map +1 -0
  105. package/dist/ui/component/typography/H6/index.d.ts +7 -0
  106. package/dist/ui/component/typography/H6/index.jsx +13 -0
  107. package/dist/ui/component/typography/H6/index.jsx.map +1 -0
  108. package/dist/ui/component/typography/Label/index.d.ts +7 -0
  109. package/dist/ui/component/typography/Label/index.jsx +13 -0
  110. package/dist/ui/component/typography/Label/index.jsx.map +1 -0
  111. package/dist/ui/component/typography/LinkText/index.d.ts +8 -0
  112. package/dist/ui/component/typography/LinkText/index.jsx +14 -0
  113. package/dist/ui/component/typography/LinkText/index.jsx.map +1 -0
  114. package/dist/ui/component/typography/P/index.d.ts +7 -0
  115. package/dist/ui/component/typography/P/index.jsx +13 -0
  116. package/dist/ui/component/typography/P/index.jsx.map +1 -0
  117. package/dist/ui/component/typography/Pre/index.d.ts +7 -0
  118. package/dist/ui/component/typography/Pre/index.jsx +13 -0
  119. package/dist/ui/component/typography/Pre/index.jsx.map +1 -0
  120. package/dist/ui/component/typography/index.d.ts +54 -0
  121. package/dist/ui/component/typography/index.jsx +23 -0
  122. package/dist/ui/component/typography/index.jsx.map +1 -0
  123. package/dist/ui/composite/button/index.d.ts +8 -0
  124. package/dist/ui/composite/button/index.jsx +45 -0
  125. package/dist/ui/composite/button/index.jsx.map +1 -0
  126. package/dist/ui/composite/dropdown/index.d.ts +12 -0
  127. package/dist/ui/composite/dropdown/index.jsx +102 -0
  128. package/dist/ui/composite/dropdown/index.jsx.map +1 -0
  129. package/dist/ui/composite/index.d.ts +342 -0
  130. package/dist/ui/composite/index.js +13 -0
  131. package/dist/ui/composite/index.js.map +1 -0
  132. package/dist/ui/composite/input/address/index.d.ts +33 -0
  133. package/dist/ui/composite/input/address/index.jsx +132 -0
  134. package/dist/ui/composite/input/address/index.jsx.map +1 -0
  135. package/dist/ui/composite/input/address/map.d.ts +64 -0
  136. package/dist/ui/composite/input/address/map.jsx +111 -0
  137. package/dist/ui/composite/input/address/map.jsx.map +1 -0
  138. package/dist/ui/composite/input/address/utils.d.ts +23 -0
  139. package/dist/ui/composite/input/address/utils.js +63 -0
  140. package/dist/ui/composite/input/address/utils.js.map +1 -0
  141. package/dist/ui/composite/input/checkbox/index.d.ts +22 -0
  142. package/dist/ui/composite/input/checkbox/index.jsx +38 -0
  143. package/dist/ui/composite/input/checkbox/index.jsx.map +1 -0
  144. package/dist/ui/composite/input/datePicker/index.d.ts +19 -0
  145. package/dist/ui/composite/input/datePicker/index.jsx +100 -0
  146. package/dist/ui/composite/input/datePicker/index.jsx.map +1 -0
  147. package/dist/ui/composite/input/dateRange/index.d.ts +14 -0
  148. package/dist/ui/composite/input/dateRange/index.jsx +46 -0
  149. package/dist/ui/composite/input/dateRange/index.jsx.map +1 -0
  150. package/dist/ui/composite/input/dateTimePicker/index.d.ts +15 -0
  151. package/dist/ui/composite/input/dateTimePicker/index.jsx +74 -0
  152. package/dist/ui/composite/input/dateTimePicker/index.jsx.map +1 -0
  153. package/dist/ui/composite/input/dateTimeRange/index.d.ts +14 -0
  154. package/dist/ui/composite/input/dateTimeRange/index.jsx +88 -0
  155. package/dist/ui/composite/input/dateTimeRange/index.jsx.map +1 -0
  156. package/dist/ui/composite/input/index.d.ts +216 -0
  157. package/dist/ui/composite/input/index.js +35 -0
  158. package/dist/ui/composite/input/index.js.map +1 -0
  159. package/dist/ui/composite/input/list/index.d.ts +20 -0
  160. package/dist/ui/composite/input/list/index.jsx +30 -0
  161. package/dist/ui/composite/input/list/index.jsx.map +1 -0
  162. package/dist/ui/composite/input/radio/index.d.ts +14 -0
  163. package/dist/ui/composite/input/radio/index.jsx +34 -0
  164. package/dist/ui/composite/input/radio/index.jsx.map +1 -0
  165. package/dist/ui/composite/input/search/index.d.ts +5 -0
  166. package/dist/ui/composite/input/search/index.jsx +38 -0
  167. package/dist/ui/composite/input/search/index.jsx.map +1 -0
  168. package/dist/ui/composite/input/select/ClearIndicator/index.d.ts +4 -0
  169. package/dist/ui/composite/input/select/ClearIndicator/index.jsx +8 -0
  170. package/dist/ui/composite/input/select/ClearIndicator/index.jsx.map +1 -0
  171. package/dist/ui/composite/input/select/Control/index.d.ts +4 -0
  172. package/dist/ui/composite/input/select/Control/index.jsx +23 -0
  173. package/dist/ui/composite/input/select/Control/index.jsx.map +1 -0
  174. package/dist/ui/composite/input/select/DropdownIndicator/index.d.ts +4 -0
  175. package/dist/ui/composite/input/select/DropdownIndicator/index.jsx +8 -0
  176. package/dist/ui/composite/input/select/DropdownIndicator/index.jsx.map +1 -0
  177. package/dist/ui/composite/input/select/GroupHeading/index.d.ts +4 -0
  178. package/dist/ui/composite/input/select/GroupHeading/index.jsx +9 -0
  179. package/dist/ui/composite/input/select/GroupHeading/index.jsx.map +1 -0
  180. package/dist/ui/composite/input/select/Input/index.d.ts +4 -0
  181. package/dist/ui/composite/input/select/Input/index.jsx +7 -0
  182. package/dist/ui/composite/input/select/Input/index.jsx.map +1 -0
  183. package/dist/ui/composite/input/select/Menu/index.d.ts +4 -0
  184. package/dist/ui/composite/input/select/Menu/index.jsx +19 -0
  185. package/dist/ui/composite/input/select/Menu/index.jsx.map +1 -0
  186. package/dist/ui/composite/input/select/MultiValue/index.d.ts +4 -0
  187. package/dist/ui/composite/input/select/MultiValue/index.jsx +15 -0
  188. package/dist/ui/composite/input/select/MultiValue/index.jsx.map +1 -0
  189. package/dist/ui/composite/input/select/Option/index.d.ts +4 -0
  190. package/dist/ui/composite/input/select/Option/index.jsx +79 -0
  191. package/dist/ui/composite/input/select/Option/index.jsx.map +1 -0
  192. package/dist/ui/composite/input/select/Placeholder/index.d.ts +4 -0
  193. package/dist/ui/composite/input/select/Placeholder/index.jsx +7 -0
  194. package/dist/ui/composite/input/select/Placeholder/index.jsx.map +1 -0
  195. package/dist/ui/composite/input/select/SelectContainer/index.d.ts +4 -0
  196. package/dist/ui/composite/input/select/SelectContainer/index.jsx +40 -0
  197. package/dist/ui/composite/input/select/SelectContainer/index.jsx.map +1 -0
  198. package/dist/ui/composite/input/select/SingleValue/index.d.ts +4 -0
  199. package/dist/ui/composite/input/select/SingleValue/index.jsx +17 -0
  200. package/dist/ui/composite/input/select/SingleValue/index.jsx.map +1 -0
  201. package/dist/ui/composite/input/select/index.d.ts +37 -0
  202. package/dist/ui/composite/input/select/index.jsx +242 -0
  203. package/dist/ui/composite/input/select/index.jsx.map +1 -0
  204. package/dist/ui/composite/input/select/types.d.ts +16 -0
  205. package/dist/ui/composite/input/select/types.js +6 -0
  206. package/dist/ui/composite/input/select/types.js.map +1 -0
  207. package/dist/ui/composite/input/text/index.d.ts +15 -0
  208. package/dist/ui/composite/input/text/index.jsx +40 -0
  209. package/dist/ui/composite/input/text/index.jsx.map +1 -0
  210. package/dist/ui/composite/input/textarea/index.d.ts +11 -0
  211. package/dist/ui/composite/input/textarea/index.jsx +62 -0
  212. package/dist/ui/composite/input/textarea/index.jsx.map +1 -0
  213. package/dist/ui/composite/input/timePicker/index.d.ts +13 -0
  214. package/dist/ui/composite/input/timePicker/index.jsx +36 -0
  215. package/dist/ui/composite/input/timePicker/index.jsx.map +1 -0
  216. package/dist/ui/composite/input/timeRange/index.d.ts +16 -0
  217. package/dist/ui/composite/input/timeRange/index.jsx +54 -0
  218. package/dist/ui/composite/input/timeRange/index.jsx.map +1 -0
  219. package/dist/ui/composite/input/weekDaysSelector/index.d.ts +11 -0
  220. package/dist/ui/composite/input/weekDaysSelector/index.jsx +39 -0
  221. package/dist/ui/composite/input/weekDaysSelector/index.jsx.map +1 -0
  222. package/dist/ui/composite/input/weekdayPicker/index.d.ts +13 -0
  223. package/dist/ui/composite/input/weekdayPicker/index.jsx +49 -0
  224. package/dist/ui/composite/input/weekdayPicker/index.jsx.map +1 -0
  225. package/dist/ui/composite/label/index.d.ts +11 -0
  226. package/dist/ui/composite/label/index.jsx +18 -0
  227. package/dist/ui/composite/label/index.jsx.map +1 -0
  228. package/dist/ui/composite/pageTitle/index.d.ts +18 -0
  229. package/dist/ui/composite/pageTitle/index.jsx +62 -0
  230. package/dist/ui/composite/pageTitle/index.jsx.map +1 -0
  231. package/dist/ui/functional/index.d.ts +10 -0
  232. package/dist/ui/functional/index.js +9 -0
  233. package/dist/ui/functional/index.js.map +1 -0
  234. package/dist/ui/functional/notFound/index.d.ts +1 -0
  235. package/dist/ui/functional/notFound/index.jsx +13 -0
  236. package/dist/ui/functional/notFound/index.jsx.map +1 -0
  237. package/dist/ui/functional/signInForm/index.d.ts +4 -0
  238. package/dist/ui/functional/signInForm/index.jsx +45 -0
  239. package/dist/ui/functional/signInForm/index.jsx.map +1 -0
  240. package/dist/ui/functional/signOutForm/index.d.ts +3 -0
  241. package/dist/ui/functional/signOutForm/index.jsx +29 -0
  242. package/dist/ui/functional/signOutForm/index.jsx.map +1 -0
  243. package/dist/ui/index.d.ts +6 -0
  244. package/dist/ui/index.js +7 -0
  245. package/dist/ui/index.js.map +1 -0
  246. package/dist/ui/layout/app/component.d.ts +59 -0
  247. package/dist/ui/layout/app/component.jsx +224 -0
  248. package/dist/ui/layout/app/component.jsx.map +1 -0
  249. package/dist/ui/layout/app/content/index.d.ts +9 -0
  250. package/dist/ui/layout/app/content/index.jsx +18 -0
  251. package/dist/ui/layout/app/content/index.jsx.map +1 -0
  252. package/dist/ui/layout/app/index.d.ts +18 -0
  253. package/dist/ui/layout/app/index.jsx +40 -0
  254. package/dist/ui/layout/app/index.jsx.map +1 -0
  255. package/dist/ui/layout/form/index.d.ts +68 -0
  256. package/dist/ui/layout/form/index.jsx +558 -0
  257. package/dist/ui/layout/form/index.jsx.map +1 -0
  258. package/dist/ui/layout/index.d.ts +356 -0
  259. package/dist/ui/layout/index.js +19 -0
  260. package/dist/ui/layout/index.js.map +1 -0
  261. package/dist/ui/layout/modal/index.d.ts +7 -0
  262. package/dist/ui/layout/modal/index.jsx +11 -0
  263. package/dist/ui/layout/modal/index.jsx.map +1 -0
  264. package/dist/ui/layout/object/index.d.ts +30 -0
  265. package/dist/ui/layout/object/index.jsx +145 -0
  266. package/dist/ui/layout/object/index.jsx.map +1 -0
  267. package/dist/ui/layout/root/index.d.ts +10 -0
  268. package/dist/ui/layout/root/index.jsx +31 -0
  269. package/dist/ui/layout/root/index.jsx.map +1 -0
  270. package/dist/ui/layout/root/provider/index.d.ts +7 -0
  271. package/dist/ui/layout/root/provider/index.jsx +26 -0
  272. package/dist/ui/layout/root/provider/index.jsx.map +1 -0
  273. package/dist/ui/layout/tab/component.d.ts +4 -0
  274. package/dist/ui/layout/tab/component.jsx +16 -0
  275. package/dist/ui/layout/tab/component.jsx.map +1 -0
  276. package/dist/ui/layout/tab/content/index.d.ts +8 -0
  277. package/dist/ui/layout/tab/content/index.jsx +8 -0
  278. package/dist/ui/layout/tab/content/index.jsx.map +1 -0
  279. package/dist/ui/layout/tab/index.d.ts +11 -0
  280. package/dist/ui/layout/tab/index.jsx +25 -0
  281. package/dist/ui/layout/tab/index.jsx.map +1 -0
  282. package/dist/ui/layout/table/index.d.ts +33 -0
  283. package/dist/ui/layout/table/index.jsx +283 -0
  284. package/dist/ui/layout/table/index.jsx.map +1 -0
  285. package/dist/ui/layout/toast/index.d.ts +7 -0
  286. package/dist/ui/layout/toast/index.jsx +18 -0
  287. package/dist/ui/layout/toast/index.jsx.map +1 -0
  288. package/dist/ui/theme/border/index.d.ts +28 -0
  289. package/dist/ui/theme/border/index.js +67 -0
  290. package/dist/ui/theme/border/index.js.map +1 -0
  291. package/dist/ui/theme/color/index.d.ts +32 -0
  292. package/dist/ui/theme/color/index.js +106 -0
  293. package/dist/ui/theme/color/index.js.map +1 -0
  294. package/dist/ui/theme/index.d.ts +4 -0
  295. package/dist/ui/theme/index.js +5 -0
  296. package/dist/ui/theme/index.js.map +1 -0
  297. package/dist/ui/theme/rounded/index.d.ts +9 -0
  298. package/dist/ui/theme/rounded/index.js +14 -0
  299. package/dist/ui/theme/rounded/index.js.map +1 -0
  300. package/dist/ui/theme/size/index.d.ts +15 -0
  301. package/dist/ui/theme/size/index.js +55 -0
  302. package/dist/ui/theme/size/index.js.map +1 -0
  303. package/dist/ui/types/index.d.ts +113 -0
  304. package/dist/ui/types/index.js +33 -0
  305. package/dist/ui/types/index.js.map +1 -0
  306. package/dist/util/client.d.ts +2 -0
  307. package/dist/util/client.js +4 -0
  308. package/dist/util/client.js.map +1 -0
  309. package/dist/util/date/impl.d.ts +7 -0
  310. package/dist/util/date/impl.js +22 -0
  311. package/dist/util/date/impl.js.map +1 -0
  312. package/dist/util/date/index.d.ts +17 -0
  313. package/dist/util/date/index.js +16 -0
  314. package/dist/util/date/index.js.map +1 -0
  315. package/dist/util/index.d.ts +17 -0
  316. package/dist/util/index.js +143 -0
  317. package/dist/util/index.js.map +1 -0
  318. package/package.json +62 -0
@@ -0,0 +1,66 @@
1
+ export const setCookieValue = async (cookieName, value, options) => {
2
+ if (typeof window === 'undefined') {
3
+ const { cookies } = await import('next/headers');
4
+ const cookieStore = await cookies();
5
+ cookieStore.set(cookieName, value, {
6
+ httpOnly: options?.httpOnly ?? true,
7
+ secure: options?.secure ?? true,
8
+ sameSite: options?.sameSite ?? 'lax',
9
+ maxAge: options?.maxAge,
10
+ });
11
+ }
12
+ else {
13
+ const cookieOptions = [];
14
+ if (options?.secure) {
15
+ cookieOptions.push('Secure');
16
+ }
17
+ if (options?.sameSite) {
18
+ cookieOptions.push(`SameSite=${options.sameSite}`);
19
+ }
20
+ if (options?.maxAge) {
21
+ cookieOptions.push(`Max-Age=${options.maxAge}`);
22
+ }
23
+ // httpOnlyはクライアント側からは設定できない
24
+ const cookieString = `${cookieName}=${encodeURIComponent(value)}; ${cookieOptions.join('; ')}; Path=/`;
25
+ document.cookie = cookieString;
26
+ }
27
+ };
28
+ export const getCookieValue = async (cookieName) => {
29
+ if (typeof window === 'undefined') {
30
+ const { getCookies } = await import('next-client-cookies/server');
31
+ const cookies = await getCookies();
32
+ return cookies.get(cookieName);
33
+ }
34
+ else {
35
+ const cookies = document.cookie.split(';');
36
+ for (const cookie of cookies) {
37
+ const [name, ...valueParts] = cookie.trim().split('=');
38
+ if (name === cookieName && valueParts.length > 0) {
39
+ return decodeURIComponent(valueParts.join('='));
40
+ }
41
+ }
42
+ return undefined;
43
+ }
44
+ };
45
+ export const deleteCookieValue = async (cookieName) => {
46
+ if (typeof window === 'undefined') {
47
+ const { cookies } = await import('next/headers');
48
+ const cookieStore = await cookies();
49
+ cookieStore.delete(cookieName);
50
+ }
51
+ else {
52
+ document.cookie = `${cookieName}=; Max-Age=0; Path=/`;
53
+ }
54
+ };
55
+ export const getAllCookieNames = async () => {
56
+ if (typeof window === 'undefined') {
57
+ const { cookies } = await import('next/headers');
58
+ const cookieStore = await cookies();
59
+ return cookieStore.getAll().map((cookie) => cookie.name);
60
+ }
61
+ else {
62
+ const cookies = document.cookie.split(';');
63
+ return cookies.map((cookie) => cookie.trim().split('=')[0]).filter((name) => name.length > 0);
64
+ }
65
+ };
66
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/cookie/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EACjC,UAAkB,EAClB,KAAa,EACb,OAKC,EACD,EAAE;IACF,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAA;QAChD,MAAM,WAAW,GAAG,MAAM,OAAO,EAAE,CAAA;QACnC,WAAW,CAAC,GAAG,CAAC,UAAU,EAAE,KAAK,EAAE;YACjC,QAAQ,EAAE,OAAO,EAAE,QAAQ,IAAI,IAAI;YACnC,MAAM,EAAE,OAAO,EAAE,MAAM,IAAI,IAAI;YAC/B,QAAQ,EAAE,OAAO,EAAE,QAAQ,IAAI,KAAK;YACpC,MAAM,EAAE,OAAO,EAAE,MAAM;SACxB,CAAC,CAAA;IACJ,CAAC;SAAM,CAAC;QACN,MAAM,aAAa,GAAa,EAAE,CAAA;QAClC,IAAI,OAAO,EAAE,MAAM,EAAE,CAAC;YACpB,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAA;QAC9B,CAAC;QACD,IAAI,OAAO,EAAE,QAAQ,EAAE,CAAC;YACtB,aAAa,CAAC,IAAI,CAAC,YAAY,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAA;QACpD,CAAC;QACD,IAAI,OAAO,EAAE,MAAM,EAAE,CAAC;YACpB,aAAa,CAAC,IAAI,CAAC,WAAW,OAAO,CAAC,MAAM,EAAE,CAAC,CAAA;QACjD,CAAC;QAC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QACnC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,CAAA;IAChC,CAAC;SAAM,CAAC;QACN,QAAQ,CAAC,MAAM,GAAG,GAAG,UAAU,sBAAsB,CAAA;IACvD,CAAC;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,IAAI,EAAE;IAC1C,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAA;QAChD,MAAM,WAAW,GAAG,MAAM,OAAO,EAAE,CAAA;QACnC,OAAO,WAAW,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA;IAC1D,CAAC;SAAM,CAAC;QACN,MAAM,OAAO,GAAG,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;QAC1C,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IAC/F,CAAC;AACH,CAAC,CAAA"}
@@ -0,0 +1,10 @@
1
+ import * as cookie from './cookie';
2
+ import * as nextAuth from './next-auth';
3
+ import * as s3 from './s3';
4
+ import * as trpc from './trpc';
5
+ export declare const Lib: {
6
+ cookie: typeof cookie;
7
+ nextAuth: typeof nextAuth;
8
+ s3: typeof s3;
9
+ trpc: typeof trpc;
10
+ };
@@ -0,0 +1,11 @@
1
+ import * as cookie from './cookie';
2
+ import * as nextAuth from './next-auth';
3
+ import * as s3 from './s3';
4
+ import * as trpc from './trpc';
5
+ export const Lib = {
6
+ cookie,
7
+ nextAuth,
8
+ s3,
9
+ trpc,
10
+ };
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAClC,OAAO,KAAK,QAAQ,MAAM,aAAa,CAAA;AACvC,OAAO,KAAK,EAAE,MAAM,MAAM,CAAA;AAC1B,OAAO,KAAK,IAAI,MAAM,QAAQ,CAAA;AAE9B,MAAM,CAAC,MAAM,GAAG,GAAG;IACjB,MAAM;IACN,QAAQ;IACR,EAAE;IACF,IAAI;CACL,CAAA"}
@@ -0,0 +1,2 @@
1
+ import type { NextAuthOptions } from 'next-auth';
2
+ export declare const options: (authorize?: (email: string, password: string, params?: string) => Promise<string | undefined>) => NextAuthOptions;
@@ -0,0 +1,62 @@
1
+ import CredentialsProvider from 'next-auth/providers/credentials';
2
+ import { defaultServerEnv } from '../../env';
3
+ export const options = (authorize) => ({
4
+ secret: (() => {
5
+ if (!defaultServerEnv.NEXTAUTH_SECRET)
6
+ throw new Error('NEXTAUTH_SECRET is not set');
7
+ return defaultServerEnv.NEXTAUTH_SECRET;
8
+ })(),
9
+ pages: {
10
+ signIn: '/signin',
11
+ },
12
+ session: {
13
+ maxAge: 60 * 60 * 24 * 30,
14
+ strategy: 'jwt',
15
+ },
16
+ providers: [
17
+ CredentialsProvider({
18
+ credentials: {
19
+ email: { type: 'email' },
20
+ password: { type: 'password' },
21
+ params: { type: 'object' },
22
+ },
23
+ async authorize(credentials) {
24
+ if (!credentials) {
25
+ return null;
26
+ }
27
+ if (!authorize) {
28
+ return null;
29
+ }
30
+ const ret = await authorize(credentials.email, credentials.password, credentials.params);
31
+ if (!ret) {
32
+ return null;
33
+ }
34
+ return {
35
+ token: ret,
36
+ };
37
+ },
38
+ }),
39
+ ],
40
+ callbacks: {
41
+ session: ({ session, token }) => {
42
+ if (token) {
43
+ session.token = token.token;
44
+ }
45
+ return session;
46
+ },
47
+ jwt: async ({ token, user }) => {
48
+ if (user) {
49
+ token.token = user.token;
50
+ }
51
+ return token;
52
+ },
53
+ redirect: ({ url, baseUrl }) => {
54
+ if (url.startsWith('/')) {
55
+ return `${baseUrl}${url}`;
56
+ }
57
+ const searchParams = new URLSearchParams(new URL(url).search);
58
+ return new URL(searchParams.get('callbackUrl') ?? '', baseUrl).toString();
59
+ },
60
+ },
61
+ });
62
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/next-auth/index.ts"],"names":[],"mappings":"AACA,OAAO,mBAAmB,MAAM,iCAAiC,CAAA;AAEjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAE5C,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,SAA6F,EAC5E,EAAE,CAAC,CAAC;IACrB,MAAM,EAAE,CAAC,GAAG,EAAE;QACZ,IAAI,CAAC,gBAAgB,CAAC,eAAe;YAAE,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAA;QACpF,OAAO,gBAAgB,CAAC,eAAe,CAAA;IACzC,CAAC,CAAC,EAAE;IACJ,KAAK,EAAE;QACL,MAAM,EAAE,SAAS;KAClB;IACD,OAAO,EAAE;QACP,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE;QACzB,QAAQ,EAAE,KAAK;KAChB;IACD,SAAS,EAAE;QACT,mBAAmB,CAAC;YAClB,WAAW,EAAE;gBACX,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;gBACxB,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;gBAC9B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;aAC3B;YACD,KAAK,CAAC,SAAS,CAAC,WAAW;gBACzB,IAAI,CAAC,WAAW,EAAE,CAAC;oBACjB,OAAO,IAAI,CAAA;gBACb,CAAC;gBACD,IAAI,CAAC,SAAS,EAAE,CAAC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client: () => S3Client;
@@ -0,0 +1,17 @@
1
+ import { S3Client } from '@aws-sdk/client-s3';
2
+ let _client;
3
+ export const client = () => {
4
+ if (!_client) {
5
+ const endpoint = process.env.S3_ENDPOINT;
6
+ _client = endpoint
7
+ ? new S3Client({
8
+ region: 'ap-northeast-1',
9
+ endpoint,
10
+ credentials: { accessKeyId: 'minioadmin', secretAccessKey: 'minioadmin123' },
11
+ forcePathStyle: true,
12
+ })
13
+ : new S3Client();
14
+ }
15
+ return _client;
16
+ };
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/s3/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAA;AAE7C,IAAI,OAA6B,CAAA;AAEjC,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,EAAE;IACzB,IAAI,CAAC,OAAO,EAAE,CAAC;QACb,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,WAAW,CAAA;QACxC,OAAO,GAAG,QAAQ;YAChB,CAAC,CAAC,IAAI,QAAQ,CAAC;gBACX,MAAM,EAAE,gBAAgB;gBACxB,QAAQ;gBACR,WAAW,EAAE,EAAE,WAAW,EAAE,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE;gBAC5E,cAAc,EAAE,IAAI;aACrB,CAAC;YACJ,CAAC,CAAC,IAAI,QAAQ,EAAE,CAAA;IACpB,CAAC;IACD,OAAO,OAAO,CAAA;AAChB,CAAC,CAAA"}
@@ -0,0 +1,8 @@
1
+ import type { HTTPHeaders } from '@trpc/client';
2
+ export declare const setHeaderValues: (headers: HTTPHeaders, options?: {
3
+ httpOnly?: boolean;
4
+ secure?: boolean;
5
+ sameSite?: "strict" | "lax" | "none";
6
+ maxAge?: number;
7
+ }) => Promise<void>;
8
+ export declare const mergeDefaultHeaders: (extra?: HTTPHeaders) => Promise<HTTPHeaders>;
@@ -0,0 +1,32 @@
1
+ import { getServerSession } from 'next-auth';
2
+ import { getCookieValue, setCookieValue } from '../cookie';
3
+ import { options as nextAuthOptions } from '../next-auth';
4
+ export const setHeaderValues = async (headers, options) => setCookieValue('headers', JSON.stringify(headers), options);
5
+ const createDefaultHeaders = async (defaultHeaders = {}) => {
6
+ let baseHeaders = {};
7
+ if (typeof window === 'undefined') {
8
+ const { headers: nextHeaders } = await import('next/headers');
9
+ const headersList = await nextHeaders();
10
+ baseHeaders = { 'user-agent': headersList.get('user-agent') || 'unknown' };
11
+ }
12
+ const savedHeaders = {};
13
+ const headersCookie = await getCookieValue('headers');
14
+ if (headersCookie) {
15
+ try {
16
+ const parsedHeaders = JSON.parse(headersCookie);
17
+ Object.assign(savedHeaders, parsedHeaders);
18
+ }
19
+ catch {
20
+ // JSONパースに失敗した場合は無視
21
+ }
22
+ }
23
+ const session = await getServerSession(nextAuthOptions());
24
+ return {
25
+ ...baseHeaders,
26
+ ...savedHeaders,
27
+ ...(session?.token ? { authorization: `Bearer ${session.token}` } : {}),
28
+ ...defaultHeaders,
29
+ };
30
+ };
31
+ export const mergeDefaultHeaders = async (extra) => createDefaultHeaders(extra);
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/lib/trpc/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAE5C,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,cAAc,CAAA;AAEzD,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,EAClC,OAAoB,EACpB,OAKC,EACD,EAAE,CAAC,cAAc,CAAC,SAAS,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,CAAA;AAEhE,MAAM,oBAAoB,GAAG,KAAK,EAAE,iBAA8B,EAAE,EAAwB,EAAE;IAC5F,IAAI,WAAW,GAAgB,EAAE,CAAA;IAEjC,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,CAAA;QAC7D,MAAM,WAAW,GAAG,MAAM,WAAW,EAAE,CAAA;QACvC,WAAW,GAAG,EAAE,YAAY,EAAE,WAAW,CAAC,GAAG,CAAC,YAAY,CAAC,IAAI,SAAS,EAAE,CAAA;IAC5E,CAAC;IAED,MAAM,YAAY,GAAgB,EAAE,CAAA;IACpC,MAAM,aAAa,GAAG,MAAM,cAAc,CAAC,SAAS,CAAC,CAAA;IACrD,IAAI,aAAa,EAAE,CAAC;QAClB,IAAI,CAAC;YACH,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,CAA2B,CAAA;YACzE,MAAM,CAAC,MAAM,CAAC,YAAY,EAAE,aAAa,CAAC,CAAA;QAC5C,CAAC;QAAC,MAAM,CAAC;YACP,oBAAoB;QACtB,CAAC;IACH,CAAC;IAED,MAAM,OAAO,GAAG,MAAM,gBAAgB,CAAC,eAAe,EAAE,CAAC,CAAA;IACzD,OAAO;QACL,GAAG,WAAW;QACd,GAAG,YAAY;QACf,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,aAAa,EAAE,UAAU,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACvE,GAAG,cAAc;KAClB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,EAAE,KAAmB,EAAwB,EAAE,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAA"}
@@ -0,0 +1,26 @@
1
+ @import 'tailwindcss';
2
+ @config "./tailwind.config.ts";
3
+
4
+ :root {
5
+ color-scheme: light dark;
6
+
7
+ &:has(input[name='color-scheme'][value='light']) {
8
+ color-scheme: light;
9
+ }
10
+
11
+ &:has(input[name='color-scheme'][value='dark']) {
12
+ color-scheme: dark;
13
+ }
14
+ }
15
+
16
+ @layer utilities {
17
+ .clickable-enabled {
18
+ @apply cursor-pointer hover:opacity-80;
19
+ }
20
+ .clickable-disabled {
21
+ @apply cursor-default opacity-50;
22
+ }
23
+ .clickable {
24
+ @apply cursor-pointer hover:opacity-80 disabled:cursor-default disabled:opacity-50;
25
+ }
26
+ }