@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,143 @@
1
+ import * as client from './client';
2
+ export * from './date';
3
+ export const Util = {
4
+ isArray: (maybeArray) => Array.isArray(maybeArray),
5
+ isObject: (arg) => typeof arg === typeof Object,
6
+ isString: (arg) => typeof arg === 'string',
7
+ normalize: (value) => value.trim().toLowerCase(),
8
+ sanitize: (input, options) => {
9
+ const DEFAULT_SANITIZE_KEYWORDS = [
10
+ 'authorization',
11
+ 'proxy-authorization',
12
+ 'cookie',
13
+ 'set-cookie',
14
+ 'x-api-key',
15
+ 'apikey',
16
+ 'api_key',
17
+ 'token',
18
+ 'secret',
19
+ 'password',
20
+ 'passwd',
21
+ 'signature',
22
+ 'private',
23
+ 'session',
24
+ 'jwt',
25
+ 'bearer',
26
+ ];
27
+ const normalizeKey = (k) => k.trim().toLowerCase();
28
+ const shouldRedactKey = (key, keywords) => keywords.some((kw) => normalizeKey(key) === kw || normalizeKey(key).includes(kw));
29
+ const maybeTruncate = (s, max) => !max || max <= 0 ? s : s.length <= max ? s : `${s.slice(0, max)}...<truncated>`;
30
+ const toJsonLike = (v) => {
31
+ if (v === null)
32
+ return null;
33
+ if (v === undefined)
34
+ return undefined;
35
+ if (v instanceof Date)
36
+ return v.toISOString();
37
+ if (typeof v === 'bigint')
38
+ return v.toString();
39
+ if (v instanceof Uint8Array)
40
+ return `Uint8Array(${v.byteLength})`;
41
+ if (typeof v === 'string')
42
+ return v;
43
+ if (typeof v === 'number')
44
+ return Number.isFinite(v) ? v : String(v);
45
+ if (typeof v === 'boolean')
46
+ return v;
47
+ if (Array.isArray(v))
48
+ return v.map((x) => toJsonLike(x));
49
+ if (typeof v === 'object') {
50
+ const out = {};
51
+ for (const [k, vv] of Object.entries(v)) {
52
+ out[k] = toJsonLike(vv);
53
+ }
54
+ return out;
55
+ }
56
+ return String(v);
57
+ };
58
+ const maskInText = (text) => text
59
+ // password: "xxx"
60
+ .replace(/(\bpassword\b\s*:\s*)"(?:[^"\\]|\\.)*"/gi, '$1"***"')
61
+ .replace(/(\bpasswd\b\s*:\s*)"(?:[^"\\]|\\.)*"/gi, '$1"***"')
62
+ // authorization: "Bearer xxx"
63
+ .replace(/(\bauthorization\b\s*:\s*)"(?:[^"\\]|\\.)*"/gi, '$1"***"')
64
+ .replace(/(\bproxy-authorization\b\s*:\s*)"(?:[^"\\]|\\.)*"/gi, '$1"***"')
65
+ // cookie / set-cookie
66
+ .replace(/(\bcookie\b\s*:\s*)"(?:[^"\\]|\\.)*"/gi, '$1"***"')
67
+ .replace(/(\bset-cookie\b\s*:\s*)"(?:[^"\\]|\\.)*"/gi, '$1"***"')
68
+ // token / secret
69
+ .replace(/(\btoken\b\s*:\s*)"(?:[^"\\]|\\.)*"/gi, '$1"***"')
70
+ .replace(/(\bsecret\b\s*:\s*)"(?:[^"\\]|\\.)*"/gi, '$1"***"');
71
+ const keywords = options?.keywords ?? DEFAULT_SANITIZE_KEYWORDS;
72
+ const maxStringLength = options?.maxStringLength;
73
+ const seen = new WeakSet();
74
+ const walk = (value, keyHint) => {
75
+ if (value === null)
76
+ return null;
77
+ if (value === undefined)
78
+ return undefined;
79
+ if (typeof value === 'object') {
80
+ if (seen.has(value)) {
81
+ return '[Circular]';
82
+ }
83
+ seen.add(value);
84
+ }
85
+ if (typeof value === 'string') {
86
+ const maskedText = maskInText(value);
87
+ if (keyHint && shouldRedactKey(keyHint, keywords)) {
88
+ return '***';
89
+ }
90
+ return maybeTruncate(maskedText, maxStringLength);
91
+ }
92
+ if (typeof value === 'number')
93
+ return Number.isFinite(value) ? value : String(value);
94
+ if (typeof value === 'boolean')
95
+ return value;
96
+ if (Array.isArray(value)) {
97
+ return value.map((v) => walk(v));
98
+ }
99
+ if (typeof value === 'object') {
100
+ const out = {};
101
+ for (const [k, v] of Object.entries(value)) {
102
+ const nk = normalizeKey(k);
103
+ if (shouldRedactKey(k, keywords)) {
104
+ out[nk] = '***';
105
+ continue;
106
+ }
107
+ out[nk] = walk(v, k);
108
+ }
109
+ return out;
110
+ }
111
+ return String(value);
112
+ };
113
+ return walk(toJsonLike(input));
114
+ },
115
+ createEnvProxy: ((isServer, schema, parseEnv, _omitKeys, extend) => {
116
+ let cachedEnv = null;
117
+ let cachedExtend = null;
118
+ return new Proxy({}, {
119
+ get: (_target, prop) => {
120
+ if (isServer) {
121
+ if (typeof window !== 'undefined') {
122
+ throw new Error('serverEnv is only available on the server');
123
+ }
124
+ }
125
+ else {
126
+ if (typeof window === 'undefined') {
127
+ throw new Error('clientEnv is only available on the client');
128
+ }
129
+ }
130
+ const env = (cachedEnv ??= schema.parse(parseEnv()));
131
+ if (extend) {
132
+ cachedExtend ??= extend(env);
133
+ const extended = cachedExtend;
134
+ if (prop in extended)
135
+ return extended[prop];
136
+ }
137
+ return env[prop];
138
+ },
139
+ });
140
+ }),
141
+ ...client,
142
+ };
143
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/util/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,UAAU,CAAA;AAElC,cAAc,QAAQ,CAAA;AAEtB,MAAM,CAAC,MAAM,IAAI,GAAG;IAClB,OAAO,EAAE,CAAI,UAA4B,EAAqB,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,CAAC;IAC1F,QAAQ,EAAE,CAAC,GAAY,EAAE,EAAE,CAAC,OAAO,GAAG,KAAK,OAAO,MAAM;IACxD,QAAQ,EAAE,CAAC,GAAY,EAAE,EAAE,CAAC,OAAO,GAAG,KAAK,QAAQ;IACnD,SAAS,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE;IACxD,QAAQ,EAAE,CACR,KAAQ,EACR,OAGC,EACD,EAAE;QACF,MAAM,yBAAyB,GAAG;YAChC,eAAe;YACf,qBAAqB;YACrB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GAAG,CAAC,SAAS,KAAK,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAqB,CAAC,CAAA;gBACxE,IAAI,MAAM,EAAE,CAAC;oBACX,YAAY,KAAK,MAAM,CAAC,GAAG,CAAwB,CAAA;oBACnD,MAAM,QAAQ,GAAG,YAAgD,CAAA;oBACjE,IAAI,IAAI,IAAI,QAAQ;wBAAE,OAAO,QAAQ,CAAC,IAAI,CAAC,CAAA;gBAC7C,CAAC;gBACD,OAAO,GAAG,CAAC,IAA8B,CAAC,CAAA;YAC5C,CAAC;SACF,CACF,CAAA;IACH,CAAC,CAkBA;IACD,GAAG,MAAM;CACV,CAAA"}
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "@ya-accelerators/nextjs-framework",
3
+ "version": "0.0.0",
4
+ "type": "module",
5
+ "description": "",
6
+ "author": "YA Holdings OÜ",
7
+ "license": "Apache-2.0",
8
+ "keywords": [],
9
+ "main": "./dist/index.js",
10
+ "module": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "repository": {
13
+ "type": "git",
14
+ "url": "git+https://github.com/ya-holdings/web-development-base.git",
15
+ "directory": "frontend/packages/nextjs-framework"
16
+ },
17
+ "publishConfig": {
18
+ "access": "public",
19
+ "registry": "https://registry.npmjs.org"
20
+ },
21
+ "files": [
22
+ "@types",
23
+ "dist"
24
+ ],
25
+ "scripts": {
26
+ "setup": "pnpm run build",
27
+ "build": "tsc --declaration && pnpm run move-dist && pnpm run copy-files",
28
+ "move-dist": "cp -r dist/src/* dist/ 2>/dev/null || true && rm -rf dist/src 2>/dev/null || true",
29
+ "copy-files": "copyfiles -u 1 styles/**/* dist/styles && copyfiles -u 3 src/i18n/strings/**/* dist/i18n/strings",
30
+ "dev": "nodemon",
31
+ "lint": "run-p -l -c lint:*",
32
+ "lint:tsc": "tsc --pretty --noEmit --incremental false",
33
+ "lint:eslint": "eslint .",
34
+ "lint:prettier": "prettier --check --config ../../.prettierrc.mjs --ignore-path ../../../.gitignore .",
35
+ "fix": "run-p -l -c fix:*",
36
+ "fix:eslint": "eslint . --fix",
37
+ "fix:prettier": "prettier --write --config ../../.prettierrc.mjs --ignore-path ../../../.gitignore .",
38
+ "test": "jest"
39
+ },
40
+ "dependencies": {
41
+ "@aws-sdk/client-s3": "^3.1028.0",
42
+ "@dnd-kit/core": "^6.3.1",
43
+ "@dnd-kit/modifiers": "^9.0.0",
44
+ "@dnd-kit/sortable": "^10.0.0",
45
+ "@dnd-kit/utilities": "^3.2.2",
46
+ "@emotion/react": "^11.14.0",
47
+ "@emotion/styled": "^11.14.1",
48
+ "@svgr/webpack": "^8.1.0",
49
+ "@tanstack/react-table": "^8.21.3",
50
+ "date-fns": "^4.1.0",
51
+ "framer-motion": "^12.38.0",
52
+ "next-client-cookies": "^2.1.1",
53
+ "nextjs-toploader": "^3.9.17",
54
+ "parse-nested-form-data": "^1.0.0",
55
+ "react-datepicker": "^9.1.0",
56
+ "react-select": "^5.10.2"
57
+ },
58
+ "devDependencies": {
59
+ "copyfiles": "^2.4.1",
60
+ "nodemon": "^3.1.14"
61
+ }
62
+ }