@pasosdejesus/m 0.15.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 (324) hide show
  1. package/dist/blockchain/deployments.d.ts +40 -0
  2. package/dist/blockchain/deployments.d.ts.map +1 -0
  3. package/dist/blockchain/deployments.js +64 -0
  4. package/dist/debug/DebugConsole.d.ts +22 -0
  5. package/dist/debug/DebugConsole.d.ts.map +1 -0
  6. package/dist/debug/DebugConsole.js +79 -0
  7. package/dist/debug/Logger.d.ts +38 -0
  8. package/dist/debug/Logger.d.ts.map +1 -0
  9. package/dist/debug/Logger.js +94 -0
  10. package/dist/debug/index.d.ts +6 -0
  11. package/dist/debug/index.d.ts.map +1 -0
  12. package/dist/debug/index.js +4 -0
  13. package/dist/debug/useLogger.d.ts +14 -0
  14. package/dist/debug/useLogger.d.ts.map +1 -0
  15. package/dist/debug/useLogger.js +23 -0
  16. package/dist/debug/utils.d.ts +10 -0
  17. package/dist/debug/utils.d.ts.map +1 -0
  18. package/dist/debug/utils.js +53 -0
  19. package/dist/e2e/assertions.d.ts +5 -0
  20. package/dist/e2e/assertions.d.ts.map +1 -0
  21. package/dist/e2e/assertions.js +18 -0
  22. package/dist/e2e/browser.d.ts +37 -0
  23. package/dist/e2e/browser.d.ts.map +1 -0
  24. package/dist/e2e/browser.js +97 -0
  25. package/dist/e2e/env.d.ts +18 -0
  26. package/dist/e2e/env.d.ts.map +1 -0
  27. package/dist/e2e/env.js +57 -0
  28. package/dist/e2e/index.d.ts +11 -0
  29. package/dist/e2e/index.d.ts.map +1 -0
  30. package/dist/e2e/index.js +8 -0
  31. package/dist/e2e/navigation.d.ts +4 -0
  32. package/dist/e2e/navigation.d.ts.map +1 -0
  33. package/dist/e2e/navigation.js +32 -0
  34. package/dist/e2e/siwe-mock.d.ts +11 -0
  35. package/dist/e2e/siwe-mock.d.ts.map +1 -0
  36. package/dist/e2e/siwe-mock.js +112 -0
  37. package/dist/e2e/siwe.d.ts +15 -0
  38. package/dist/e2e/siwe.d.ts.map +1 -0
  39. package/dist/e2e/siwe.js +85 -0
  40. package/dist/e2e/wallet-mock.d.ts +13 -0
  41. package/dist/e2e/wallet-mock.d.ts.map +1 -0
  42. package/dist/e2e/wallet-mock.js +91 -0
  43. package/dist/i18n/common-cli.d.ts +11 -0
  44. package/dist/i18n/common-cli.d.ts.map +1 -0
  45. package/dist/i18n/common-cli.js +22 -0
  46. package/dist/i18n/createTranslator.d.ts +28 -0
  47. package/dist/i18n/createTranslator.d.ts.map +1 -0
  48. package/dist/i18n/createTranslator.js +48 -0
  49. package/dist/i18n/index.d.ts +4 -0
  50. package/dist/i18n/index.d.ts.map +1 -0
  51. package/dist/i18n/index.js +2 -0
  52. package/dist/i18n/locales/cli.d.ts +3 -0
  53. package/dist/i18n/locales/cli.d.ts.map +1 -0
  54. package/dist/i18n/locales/cli.js +180 -0
  55. package/dist/i18n/types.d.ts +3 -0
  56. package/dist/i18n/types.d.ts.map +1 -0
  57. package/dist/i18n/types.js +1 -0
  58. package/dist/index.d.ts +2 -0
  59. package/dist/index.d.ts.map +1 -0
  60. package/dist/index.js +15 -0
  61. package/dist/index.test.d.ts +2 -0
  62. package/dist/index.test.d.ts.map +1 -0
  63. package/dist/index.test.js +10 -0
  64. package/dist/m.d.ts +2 -0
  65. package/dist/m.d.ts.map +1 -0
  66. package/dist/m.js +334 -0
  67. package/dist/plugin.d.ts +10 -0
  68. package/dist/plugin.d.ts.map +1 -0
  69. package/dist/plugin.js +7 -0
  70. package/dist/shadcn_components/cn.d.ts +13 -0
  71. package/dist/shadcn_components/cn.d.ts.map +1 -0
  72. package/dist/shadcn_components/cn.js +15 -0
  73. package/dist/shadcn_components/ui/accordion.d.ts +8 -0
  74. package/dist/shadcn_components/ui/accordion.d.ts.map +1 -0
  75. package/dist/shadcn_components/ui/accordion.js +14 -0
  76. package/dist/shadcn_components/ui/alert-dialog.d.ts +21 -0
  77. package/dist/shadcn_components/ui/alert-dialog.d.ts.map +1 -0
  78. package/dist/shadcn_components/ui/alert-dialog.js +27 -0
  79. package/dist/shadcn_components/ui/alert.d.ts +9 -0
  80. package/dist/shadcn_components/ui/alert.d.ts.map +1 -0
  81. package/dist/shadcn_components/ui/alert.js +22 -0
  82. package/dist/shadcn_components/ui/avatar.d.ts +7 -0
  83. package/dist/shadcn_components/ui/avatar.d.ts.map +1 -0
  84. package/dist/shadcn_components/ui/avatar.js +12 -0
  85. package/dist/shadcn_components/ui/badge.d.ts +10 -0
  86. package/dist/shadcn_components/ui/badge.d.ts.map +1 -0
  87. package/dist/shadcn_components/ui/badge.js +22 -0
  88. package/dist/shadcn_components/ui/button.d.ts +11 -0
  89. package/dist/shadcn_components/ui/button.d.ts.map +1 -0
  90. package/dist/shadcn_components/ui/button.js +31 -0
  91. package/dist/shadcn_components/ui/card.d.ts +10 -0
  92. package/dist/shadcn_components/ui/card.d.ts.map +1 -0
  93. package/dist/shadcn_components/ui/card.js +24 -0
  94. package/dist/shadcn_components/ui/checkbox.d.ts +5 -0
  95. package/dist/shadcn_components/ui/checkbox.d.ts.map +1 -0
  96. package/dist/shadcn_components/ui/checkbox.js +9 -0
  97. package/dist/shadcn_components/ui/dialog.d.ts +20 -0
  98. package/dist/shadcn_components/ui/dialog.d.ts.map +1 -0
  99. package/dist/shadcn_components/ui/dialog.js +23 -0
  100. package/dist/shadcn_components/ui/dropdown-menu.d.ts +28 -0
  101. package/dist/shadcn_components/ui/dropdown-menu.d.ts.map +1 -0
  102. package/dist/shadcn_components/ui/dropdown-menu.js +36 -0
  103. package/dist/shadcn_components/ui/form.d.ts +24 -0
  104. package/dist/shadcn_components/ui/form.d.ts.map +1 -0
  105. package/dist/shadcn_components/ui/form.js +63 -0
  106. package/dist/shadcn_components/ui/input.d.ts +4 -0
  107. package/dist/shadcn_components/ui/input.d.ts.map +1 -0
  108. package/dist/shadcn_components/ui/input.js +6 -0
  109. package/dist/shadcn_components/ui/label.d.ts +6 -0
  110. package/dist/shadcn_components/ui/label.d.ts.map +1 -0
  111. package/dist/shadcn_components/ui/label.js +10 -0
  112. package/dist/shadcn_components/ui/menubar.d.ts +29 -0
  113. package/dist/shadcn_components/ui/menubar.d.ts.map +1 -0
  114. package/dist/shadcn_components/ui/menubar.js +46 -0
  115. package/dist/shadcn_components/ui/popover.d.ts +7 -0
  116. package/dist/shadcn_components/ui/popover.d.ts.map +1 -0
  117. package/dist/shadcn_components/ui/popover.js +10 -0
  118. package/dist/shadcn_components/ui/progress.d.ts +5 -0
  119. package/dist/shadcn_components/ui/progress.d.ts.map +1 -0
  120. package/dist/shadcn_components/ui/progress.js +8 -0
  121. package/dist/shadcn_components/ui/radio-group.d.ts +6 -0
  122. package/dist/shadcn_components/ui/radio-group.d.ts.map +1 -0
  123. package/dist/shadcn_components/ui/radio-group.js +15 -0
  124. package/dist/shadcn_components/ui/scroll-area.d.ts +6 -0
  125. package/dist/shadcn_components/ui/scroll-area.d.ts.map +1 -0
  126. package/dist/shadcn_components/ui/scroll-area.js +12 -0
  127. package/dist/shadcn_components/ui/select.d.ts +14 -0
  128. package/dist/shadcn_components/ui/select.d.ts.map +1 -0
  129. package/dist/shadcn_components/ui/select.js +27 -0
  130. package/dist/shadcn_components/ui/separator.d.ts +5 -0
  131. package/dist/shadcn_components/ui/separator.d.ts.map +1 -0
  132. package/dist/shadcn_components/ui/separator.js +8 -0
  133. package/dist/shadcn_components/ui/sheet.d.ts +26 -0
  134. package/dist/shadcn_components/ui/sheet.d.ts.map +1 -0
  135. package/dist/shadcn_components/ui/sheet.js +37 -0
  136. package/dist/shadcn_components/ui/skeleton.d.ts +3 -0
  137. package/dist/shadcn_components/ui/skeleton.d.ts.map +1 -0
  138. package/dist/shadcn_components/ui/skeleton.js +6 -0
  139. package/dist/shadcn_components/ui/slider.d.ts +5 -0
  140. package/dist/shadcn_components/ui/slider.d.ts.map +1 -0
  141. package/dist/shadcn_components/ui/slider.js +8 -0
  142. package/dist/shadcn_components/ui/switch.d.ts +5 -0
  143. package/dist/shadcn_components/ui/switch.d.ts.map +1 -0
  144. package/dist/shadcn_components/ui/switch.js +8 -0
  145. package/dist/shadcn_components/ui/table.d.ts +11 -0
  146. package/dist/shadcn_components/ui/table.d.ts.map +1 -0
  147. package/dist/shadcn_components/ui/table.js +20 -0
  148. package/dist/shadcn_components/ui/tabs.d.ts +8 -0
  149. package/dist/shadcn_components/ui/tabs.d.ts.map +1 -0
  150. package/dist/shadcn_components/ui/tabs.js +13 -0
  151. package/dist/shadcn_components/ui/textarea.d.ts +4 -0
  152. package/dist/shadcn_components/ui/textarea.d.ts.map +1 -0
  153. package/dist/shadcn_components/ui/textarea.js +8 -0
  154. package/dist/shadcn_components/ui/toast.d.ts +16 -0
  155. package/dist/shadcn_components/ui/toast.d.ts.map +1 -0
  156. package/dist/shadcn_components/ui/toast.js +34 -0
  157. package/dist/shadcn_components/ui/toaster.d.ts +2 -0
  158. package/dist/shadcn_components/ui/toaster.d.ts.map +1 -0
  159. package/dist/shadcn_components/ui/toaster.js +10 -0
  160. package/dist/shadcn_components/ui/tooltip.d.ts +8 -0
  161. package/dist/shadcn_components/ui/tooltip.d.ts.map +1 -0
  162. package/dist/shadcn_components/ui/tooltip.js +11 -0
  163. package/dist/shadcn_components/ui/use-toast.d.ts +45 -0
  164. package/dist/shadcn_components/ui/use-toast.d.ts.map +1 -0
  165. package/dist/shadcn_components/ui/use-toast.js +126 -0
  166. package/dist/tasks/context.d.ts +13 -0
  167. package/dist/tasks/context.d.ts.map +1 -0
  168. package/dist/tasks/context.js +310 -0
  169. package/dist/tasks/create.d.ts +2 -0
  170. package/dist/tasks/create.d.ts.map +1 -0
  171. package/dist/tasks/create.js +91 -0
  172. package/dist/tasks/db.d.ts +19 -0
  173. package/dist/tasks/db.d.ts.map +1 -0
  174. package/dist/tasks/db.js +791 -0
  175. package/dist/tasks/e2e.d.ts +2 -0
  176. package/dist/tasks/e2e.d.ts.map +1 -0
  177. package/dist/tasks/e2e.js +124 -0
  178. package/dist/tasks/edit.d.ts +7 -0
  179. package/dist/tasks/edit.d.ts.map +1 -0
  180. package/dist/tasks/edit.js +471 -0
  181. package/dist/tasks/engine.d.ts +2 -0
  182. package/dist/tasks/engine.d.ts.map +1 -0
  183. package/dist/tasks/engine.js +149 -0
  184. package/dist/tasks/env-diff.d.ts +2 -0
  185. package/dist/tasks/env-diff.d.ts.map +1 -0
  186. package/dist/tasks/env-diff.js +140 -0
  187. package/dist/tasks/fuzzy.d.ts +9 -0
  188. package/dist/tasks/fuzzy.d.ts.map +1 -0
  189. package/dist/tasks/fuzzy.js +153 -0
  190. package/dist/tasks/glob.d.ts +5 -0
  191. package/dist/tasks/glob.d.ts.map +1 -0
  192. package/dist/tasks/glob.js +57 -0
  193. package/dist/tasks/grep.d.ts +9 -0
  194. package/dist/tasks/grep.d.ts.map +1 -0
  195. package/dist/tasks/grep.js +93 -0
  196. package/dist/tasks/readfile.d.ts +2 -0
  197. package/dist/tasks/readfile.d.ts.map +1 -0
  198. package/dist/tasks/readfile.js +177 -0
  199. package/dist/tasks/update.d.ts +5 -0
  200. package/dist/tasks/update.d.ts.map +1 -0
  201. package/dist/tasks/update.js +200 -0
  202. package/dist/tasks/util.d.ts +12 -0
  203. package/dist/tasks/util.d.ts.map +1 -0
  204. package/dist/tasks/util.js +42 -0
  205. package/dist/tasks/wallet.d.ts +2 -0
  206. package/dist/tasks/wallet.d.ts.map +1 -0
  207. package/dist/tasks/wallet.js +697 -0
  208. package/dist/tasks/writefile.d.ts +2 -0
  209. package/dist/tasks/writefile.d.ts.map +1 -0
  210. package/dist/tasks/writefile.js +66 -0
  211. package/dist/templates/AGENTS.md.hbs +81 -0
  212. package/dist/templates/ARCHITECTURE.md.hbs +146 -0
  213. package/dist/templates/CONTRIBUTING.md.hbs +83 -0
  214. package/dist/templates/LICENCIA.md +21 -0
  215. package/dist/templates/LICENSE.md +15 -0
  216. package/dist/templates/Makefile +16 -0
  217. package/dist/templates/README.md.hbs +111 -0
  218. package/dist/templates/apps/.env.example.hbs +75 -0
  219. package/dist/templates/apps/hardhat/.prettierrc +16 -0
  220. package/dist/templates/apps/hardhat/MOCK_USDT_README.md +20 -0
  221. package/dist/templates/apps/hardhat/Makefile +13 -0
  222. package/dist/templates/apps/hardhat/README.md +129 -0
  223. package/dist/templates/apps/hardhat/bin/MusdtVerification +4 -0
  224. package/dist/templates/apps/hardhat/bin/approveDepositOwner +7 -0
  225. package/dist/templates/apps/hardhat/bin/contractVerification +9 -0
  226. package/dist/templates/apps/hardhat/bin/deployMockUSDT +7 -0
  227. package/dist/templates/apps/hardhat/bin/prepadJ.sh +14 -0
  228. package/dist/templates/apps/hardhat/bin/verifyMockUSDT +7 -0
  229. package/dist/templates/apps/hardhat/contracts/MockUSDT.sol +47 -0
  230. package/dist/templates/apps/hardhat/hardhat.config.ts +102 -0
  231. package/dist/templates/apps/hardhat/package.json +55 -0
  232. package/dist/templates/apps/hardhat/scripts/approveDepositOwner.ts +22 -0
  233. package/dist/templates/apps/hardhat/scripts/deployMockUSDT.ts +49 -0
  234. package/dist/templates/apps/hardhat/scripts/verifyDeployment.ts +93 -0
  235. package/dist/templates/apps/hardhat/scripts/verifyMockUSDT.ts +52 -0
  236. package/dist/templates/apps/hardhat/sync-abis.mjs +58 -0
  237. package/dist/templates/apps/hardhat/test/MockUSDT.test.ts +40 -0
  238. package/dist/templates/apps/hardhat/tsconfig.json +27 -0
  239. package/dist/templates/apps/nextjs/.config/kysely.config.ts +36 -0
  240. package/dist/templates/apps/nextjs/Makefile +24 -0
  241. package/dist/templates/apps/nextjs/README.md.hbs +76 -0
  242. package/dist/templates/apps/nextjs/abis/IERC20.json +74 -0
  243. package/dist/templates/apps/nextjs/abis/MockUSDT.json +242 -0
  244. package/dist/templates/apps/nextjs/abis/ReentrancyGuard.json +1 -0
  245. package/dist/templates/apps/nextjs/app/globals.css +3 -0
  246. package/dist/templates/apps/nextjs/app/layout.tsx.hbs +26 -0
  247. package/dist/templates/apps/nextjs/app/page.tsx.hbs +225 -0
  248. package/dist/templates/apps/nextjs/app/testui/page.tsx +371 -0
  249. package/dist/templates/apps/nextjs/bin/m +8 -0
  250. package/dist/templates/apps/nextjs/components.json +21 -0
  251. package/dist/templates/apps/nextjs/next-env.d.ts +5 -0
  252. package/dist/templates/apps/nextjs/next.config.ts +10 -0
  253. package/dist/templates/apps/nextjs/package.json.hbs +48 -0
  254. package/dist/templates/apps/nextjs/pnpm-workspace.yaml +13 -0
  255. package/dist/templates/apps/nextjs/postcss.config.mjs +6 -0
  256. package/dist/templates/apps/nextjs/tailwind.config.js +11 -0
  257. package/dist/templates/apps/nextjs/tests/helpers.ts +31 -0
  258. package/dist/templates/apps/nextjs/tests/index.test.ts +7 -0
  259. package/dist/templates/apps/nextjs/tests/setup-env.ts.hbs +8 -0
  260. package/dist/templates/apps/nextjs/tests/test-utils.example.test.ts +168 -0
  261. package/dist/templates/apps/nextjs/tsconfig.json +44 -0
  262. package/dist/templates/apps/nextjs/tsconfig.test.json +38 -0
  263. package/dist/templates/apps/nextjs/vitest.config.ts +13 -0
  264. package/dist/test-utils/fs-mocks.d.ts +32 -0
  265. package/dist/test-utils/fs-mocks.d.ts.map +1 -0
  266. package/dist/test-utils/fs-mocks.js +63 -0
  267. package/dist/test-utils/i18n-mock.d.ts +21 -0
  268. package/dist/test-utils/i18n-mock.d.ts.map +1 -0
  269. package/dist/test-utils/i18n-mock.js +29 -0
  270. package/dist/test-utils/index.d.ts +12 -0
  271. package/dist/test-utils/index.d.ts.map +1 -0
  272. package/dist/test-utils/index.js +11 -0
  273. package/dist/test-utils/kysely-mocks.d.ts +298 -0
  274. package/dist/test-utils/kysely-mocks.d.ts.map +1 -0
  275. package/dist/test-utils/kysely-mocks.js +173 -0
  276. package/dist/test-utils/radix-mocks.d.ts +134 -0
  277. package/dist/test-utils/radix-mocks.d.ts.map +1 -0
  278. package/dist/test-utils/radix-mocks.js +175 -0
  279. package/dist/test-utils/rainbowkit-mocks.d.ts +80 -0
  280. package/dist/test-utils/rainbowkit-mocks.d.ts.map +1 -0
  281. package/dist/test-utils/rainbowkit-mocks.js +247 -0
  282. package/dist/test-utils/viem-mocks.d.ts +86 -0
  283. package/dist/test-utils/viem-mocks.d.ts.map +1 -0
  284. package/dist/test-utils/viem-mocks.js +54 -0
  285. package/dist/util/cli-parser.d.ts +20 -0
  286. package/dist/util/cli-parser.d.ts.map +1 -0
  287. package/dist/util/cli-parser.js +38 -0
  288. package/dist/util/colors.d.ts +5 -0
  289. package/dist/util/colors.d.ts.map +1 -0
  290. package/dist/util/colors.js +5 -0
  291. package/dist/util/locale.d.ts +3 -0
  292. package/dist/util/locale.d.ts.map +1 -0
  293. package/dist/util/locale.js +10 -0
  294. package/dist/wba/client.d.ts +19 -0
  295. package/dist/wba/client.d.ts.map +1 -0
  296. package/dist/wba/client.js +31 -0
  297. package/dist/wba/index.d.ts +4 -0
  298. package/dist/wba/index.d.ts.map +1 -0
  299. package/dist/wba/index.js +2 -0
  300. package/dist/wba/routes/event.d.ts +32 -0
  301. package/dist/wba/routes/event.d.ts.map +1 -0
  302. package/dist/wba/routes/event.js +42 -0
  303. package/dist/wba/routes/index.d.ts +3 -0
  304. package/dist/wba/routes/index.d.ts.map +1 -0
  305. package/dist/wba/routes/index.js +2 -0
  306. package/dist/wba/routes/summary.d.ts +44 -0
  307. package/dist/wba/routes/summary.d.ts.map +1 -0
  308. package/dist/wba/routes/summary.js +146 -0
  309. package/dist/wba/server.d.ts +18 -0
  310. package/dist/wba/server.d.ts.map +1 -0
  311. package/dist/wba/server.js +29 -0
  312. package/dist/wba/types.d.ts +68 -0
  313. package/dist/wba/types.d.ts.map +1 -0
  314. package/dist/wba/types.js +6 -0
  315. package/package.json +223 -0
  316. package/src/blockchain/README.md +80 -0
  317. package/src/debug/README.md +94 -0
  318. package/src/e2e/README.md +105 -0
  319. package/src/i18n/README.md +143 -0
  320. package/src/shadcn_components/README.md +125 -0
  321. package/src/tasks/README.md +69 -0
  322. package/src/test-utils/README.md +638 -0
  323. package/src/util/README.md +18 -0
  324. package/src/wba/README.md +175 -0
@@ -0,0 +1,298 @@
1
+ /**
2
+ * Database mocking utilities for tests
3
+ *
4
+ * "Y todo lo que hagáis, hacedlo de corazón, como para el Señor y no para los hombres" (Colosenses 3:23)
5
+ */
6
+ /**
7
+ * Creates a mock Kysely instance with configurable behavior
8
+ *
9
+ * @param options Configuration for mock behavior
10
+ * @returns Object containing mocked Kysely instance and helper functions
11
+ */
12
+ export declare function createMockKysely(options?: {
13
+ executeTakeFirst?: any;
14
+ execute?: any;
15
+ sqlExecute?: any;
16
+ /**
17
+ * @deprecated No funciona por hoisting de vi.mock().
18
+ * Usa skipConfigMock: true y agrega tu propio vi.mock() manual.
19
+ */
20
+ configPath?: string;
21
+ /** Whether to skip mocking the config module (default: false) */
22
+ skipConfigMock?: boolean;
23
+ }): {
24
+ MockKysely: {
25
+ new (): {
26
+ selectFrom(): /*elided*/ any;
27
+ where(): /*elided*/ any;
28
+ selectAll(): /*elided*/ any;
29
+ select(...args: any[]): /*elided*/ any;
30
+ orderBy(): /*elided*/ any;
31
+ limit(): /*elided*/ any;
32
+ groupBy(): /*elided*/ any;
33
+ having(): /*elided*/ any;
34
+ leftJoin(): /*elided*/ any;
35
+ innerJoin(): /*elided*/ any;
36
+ insertInto(): /*elided*/ any;
37
+ values(): /*elided*/ any;
38
+ returningAll(): /*elided*/ any;
39
+ updateTable(): /*elided*/ any;
40
+ set(): /*elided*/ any;
41
+ deleteFrom(): /*elided*/ any;
42
+ with(): /*elided*/ any;
43
+ transaction(): {
44
+ execute: (callback: any) => Promise<any>;
45
+ };
46
+ executeTakeFirst(): any;
47
+ executeTakeFirstOrThrow(): any;
48
+ execute(): any;
49
+ getExecutor(): {
50
+ executeQuery: (query: any) => any;
51
+ provideConnection: (callback: any) => Promise<any>;
52
+ releaseConnection: () => void;
53
+ transformQuery: (query: any, transformer: any) => any;
54
+ compileQuery: (query: any, ctx: any) => {
55
+ sql: string;
56
+ parameters: never[];
57
+ };
58
+ };
59
+ fn: {
60
+ countAll: import("vitest").Mock<() => {
61
+ as: import("vitest").Mock<() => {}>;
62
+ }>;
63
+ sum: import("vitest").Mock<() => {
64
+ as: import("vitest").Mock<() => {}>;
65
+ }>;
66
+ avg: import("vitest").Mock<() => {
67
+ as: import("vitest").Mock<() => {}>;
68
+ }>;
69
+ max: import("vitest").Mock<() => {
70
+ as: import("vitest").Mock<() => {}>;
71
+ }>;
72
+ min: import("vitest").Mock<() => {
73
+ as: import("vitest").Mock<() => {}>;
74
+ }>;
75
+ };
76
+ };
77
+ };
78
+ mockExecuteTakeFirst: import("vitest").Mock<(...args: any[]) => any>;
79
+ mockExecute: import("vitest").Mock<(...args: any[]) => any>;
80
+ mockSqlExecute: import("vitest").Mock<(...args: any[]) => any>;
81
+ mockSql: import("vitest").Mock<() => {
82
+ as: import("vitest").Mock<(...args: any[]) => any>;
83
+ execute: import("vitest").Mock<(...args: any[]) => any>;
84
+ val: import("vitest").Mock<(val: any) => any>;
85
+ }>;
86
+ mockPgPool: import("vitest").Mock<(...args: any[]) => any>;
87
+ /**
88
+ * Setup vi.mock calls for Kysely and related modules
89
+ * Call this in your test file's setup
90
+ */
91
+ setupMocks(): void;
92
+ /**
93
+ * Reset all mock implementations
94
+ */
95
+ resetMocks(): void;
96
+ /**
97
+ * Set up common mock responses for database queries
98
+ */
99
+ setupCommonResponses(): void;
100
+ };
101
+ /**
102
+ * Pre-configured mock for database operations in API routes
103
+ */
104
+ export declare const apiDbMocks: {
105
+ MockKysely: {
106
+ new (): {
107
+ selectFrom(): /*elided*/ any;
108
+ where(): /*elided*/ any;
109
+ selectAll(): /*elided*/ any;
110
+ select(...args: any[]): /*elided*/ any;
111
+ orderBy(): /*elided*/ any;
112
+ limit(): /*elided*/ any;
113
+ groupBy(): /*elided*/ any;
114
+ having(): /*elided*/ any;
115
+ leftJoin(): /*elided*/ any;
116
+ innerJoin(): /*elided*/ any;
117
+ insertInto(): /*elided*/ any;
118
+ values(): /*elided*/ any;
119
+ returningAll(): /*elided*/ any;
120
+ updateTable(): /*elided*/ any;
121
+ set(): /*elided*/ any;
122
+ deleteFrom(): /*elided*/ any;
123
+ with(): /*elided*/ any;
124
+ transaction(): {
125
+ execute: (callback: any) => Promise<any>;
126
+ };
127
+ executeTakeFirst(): any;
128
+ executeTakeFirstOrThrow(): any;
129
+ execute(): any;
130
+ getExecutor(): {
131
+ executeQuery: (query: any) => any;
132
+ provideConnection: (callback: any) => Promise<any>;
133
+ releaseConnection: () => void;
134
+ transformQuery: (query: any, transformer: any) => any;
135
+ compileQuery: (query: any, ctx: any) => {
136
+ sql: string;
137
+ parameters: never[];
138
+ };
139
+ };
140
+ fn: {
141
+ countAll: import("vitest").Mock<() => {
142
+ as: import("vitest").Mock<() => {}>;
143
+ }>;
144
+ sum: import("vitest").Mock<() => {
145
+ as: import("vitest").Mock<() => {}>;
146
+ }>;
147
+ avg: import("vitest").Mock<() => {
148
+ as: import("vitest").Mock<() => {}>;
149
+ }>;
150
+ max: import("vitest").Mock<() => {
151
+ as: import("vitest").Mock<() => {}>;
152
+ }>;
153
+ min: import("vitest").Mock<() => {
154
+ as: import("vitest").Mock<() => {}>;
155
+ }>;
156
+ };
157
+ };
158
+ };
159
+ mockExecuteTakeFirst: import("vitest").Mock<(...args: any[]) => any>;
160
+ mockExecute: import("vitest").Mock<(...args: any[]) => any>;
161
+ mockSqlExecute: import("vitest").Mock<(...args: any[]) => any>;
162
+ mockSql: import("vitest").Mock<() => {
163
+ as: import("vitest").Mock<(...args: any[]) => any>;
164
+ execute: import("vitest").Mock<(...args: any[]) => any>;
165
+ val: import("vitest").Mock<(val: any) => any>;
166
+ }>;
167
+ mockPgPool: import("vitest").Mock<(...args: any[]) => any>;
168
+ /**
169
+ * Setup vi.mock calls for Kysely and related modules
170
+ * Call this in your test file's setup
171
+ */
172
+ setupMocks(): void;
173
+ /**
174
+ * Reset all mock implementations
175
+ */
176
+ resetMocks(): void;
177
+ /**
178
+ * Set up common mock responses for database queries
179
+ */
180
+ setupCommonResponses(): void;
181
+ };
182
+ /**
183
+ * Pre-configured mock for database operations in lib functions
184
+ */
185
+ export declare const libDbMocks: {
186
+ MockKysely: {
187
+ new (): {
188
+ selectFrom(): /*elided*/ any;
189
+ where(): /*elided*/ any;
190
+ selectAll(): /*elided*/ any;
191
+ select(...args: any[]): /*elided*/ any;
192
+ orderBy(): /*elided*/ any;
193
+ limit(): /*elided*/ any;
194
+ groupBy(): /*elided*/ any;
195
+ having(): /*elided*/ any;
196
+ leftJoin(): /*elided*/ any;
197
+ innerJoin(): /*elided*/ any;
198
+ insertInto(): /*elided*/ any;
199
+ values(): /*elided*/ any;
200
+ returningAll(): /*elided*/ any;
201
+ updateTable(): /*elided*/ any;
202
+ set(): /*elided*/ any;
203
+ deleteFrom(): /*elided*/ any;
204
+ with(): /*elided*/ any;
205
+ transaction(): {
206
+ execute: (callback: any) => Promise<any>;
207
+ };
208
+ executeTakeFirst(): any;
209
+ executeTakeFirstOrThrow(): any;
210
+ execute(): any;
211
+ getExecutor(): {
212
+ executeQuery: (query: any) => any;
213
+ provideConnection: (callback: any) => Promise<any>;
214
+ releaseConnection: () => void;
215
+ transformQuery: (query: any, transformer: any) => any;
216
+ compileQuery: (query: any, ctx: any) => {
217
+ sql: string;
218
+ parameters: never[];
219
+ };
220
+ };
221
+ fn: {
222
+ countAll: import("vitest").Mock<() => {
223
+ as: import("vitest").Mock<() => {}>;
224
+ }>;
225
+ sum: import("vitest").Mock<() => {
226
+ as: import("vitest").Mock<() => {}>;
227
+ }>;
228
+ avg: import("vitest").Mock<() => {
229
+ as: import("vitest").Mock<() => {}>;
230
+ }>;
231
+ max: import("vitest").Mock<() => {
232
+ as: import("vitest").Mock<() => {}>;
233
+ }>;
234
+ min: import("vitest").Mock<() => {
235
+ as: import("vitest").Mock<() => {}>;
236
+ }>;
237
+ };
238
+ };
239
+ };
240
+ mockExecuteTakeFirst: import("vitest").Mock<(...args: any[]) => any>;
241
+ mockExecute: import("vitest").Mock<(...args: any[]) => any>;
242
+ mockSqlExecute: import("vitest").Mock<(...args: any[]) => any>;
243
+ mockSql: import("vitest").Mock<() => {
244
+ as: import("vitest").Mock<(...args: any[]) => any>;
245
+ execute: import("vitest").Mock<(...args: any[]) => any>;
246
+ val: import("vitest").Mock<(val: any) => any>;
247
+ }>;
248
+ mockPgPool: import("vitest").Mock<(...args: any[]) => any>;
249
+ /**
250
+ * Setup vi.mock calls for Kysely and related modules
251
+ * Call this in your test file's setup
252
+ */
253
+ setupMocks(): void;
254
+ /**
255
+ * Reset all mock implementations
256
+ */
257
+ resetMocks(): void;
258
+ /**
259
+ * Set up common mock responses for database queries
260
+ */
261
+ setupCommonResponses(): void;
262
+ };
263
+ /**
264
+ * Creates a simple flat mock DB object for use in `vi.mock` factories.
265
+ * Use when you just need a mock object with chainable methods,
266
+ * not the full Kysely builder.
267
+ *
268
+ * ```typescript
269
+ * const mockDb = vi.hoisted(() => undefined as any)
270
+ * beforeEach(() => { if (!mockDb) Object.assign(mockDb, createMockDb()) })
271
+ * vi.mock('@/.config/kysely.config', () => ({ newKyselyPostgresql: () => mockDb }))
272
+ * ```
273
+ */
274
+ export declare function createMockDb(): {
275
+ selectFrom: import("vitest").Mock<(...args: any[]) => any>;
276
+ select: import("vitest").Mock<(...args: any[]) => any>;
277
+ selectAll: import("vitest").Mock<(...args: any[]) => any>;
278
+ where: import("vitest").Mock<(...args: any[]) => any>;
279
+ orderBy: import("vitest").Mock<(...args: any[]) => any>;
280
+ limit: import("vitest").Mock<(...args: any[]) => any>;
281
+ groupBy: import("vitest").Mock<(...args: any[]) => any>;
282
+ having: import("vitest").Mock<(...args: any[]) => any>;
283
+ leftJoin: import("vitest").Mock<(...args: any[]) => any>;
284
+ innerJoin: import("vitest").Mock<(...args: any[]) => any>;
285
+ executeTakeFirst: import("vitest").Mock<(...args: any[]) => any>;
286
+ executeTakeFirstOrThrow: import("vitest").Mock<(...args: any[]) => any>;
287
+ insertInto: import("vitest").Mock<(...args: any[]) => any>;
288
+ values: import("vitest").Mock<(...args: any[]) => any>;
289
+ returningAll: import("vitest").Mock<(...args: any[]) => any>;
290
+ updateTable: import("vitest").Mock<(...args: any[]) => any>;
291
+ set: import("vitest").Mock<(...args: any[]) => any>;
292
+ deleteFrom: import("vitest").Mock<(...args: any[]) => any>;
293
+ with: import("vitest").Mock<(...args: any[]) => any>;
294
+ onConflict: import("vitest").Mock<(...args: any[]) => any>;
295
+ execute: import("vitest").Mock<(...args: any[]) => any>;
296
+ transaction: import("vitest").Mock<(...args: any[]) => any>;
297
+ };
298
+ //# sourceMappingURL=kysely-mocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"kysely-mocks.d.ts","sourceRoot":"","sources":["../../src/test-utils/kysely-mocks.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,GAAE;IACxC,gBAAgB,CAAC,EAAE,GAAG,CAAA;IACtB,OAAO,CAAC,EAAE,GAAG,CAAA;IACb,UAAU,CAAC,EAAE,GAAG,CAAA;IAChB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,iEAAiE;IACjE,cAAc,CAAC,EAAE,OAAO,CAAA;CACpB;;;;;;4BAqBc,GAAG,EAAE;;;;;;;;;;;;;;;oCAiBS,GAAG;;;;;;sCAWP,GAAG;8CACW,GAAG;;wCAEf,GAAG,eAAe,GAAG;sCACvB,GAAG,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCAgBtB,GAAG;;;IAapB;;;OAGG;;IAqBH;;OAEG;;IASH;;OAEG;;EAQN;AAED;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;4BA/GH,GAAG,EAAE;;;;;;;;;;;;;;;oCAiBS,GAAG;;;;;;sCAWP,GAAG;8CACW,GAAG;;wCAEf,GAAG,eAAe,GAAG;sCACvB,GAAG,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCAgBtB,GAAG;;;IAapB;;;OAGG;;IAqBH;;OAEG;;IASH;;OAEG;;CAaqC,CAAA;AAE5C;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;4BApHH,GAAG,EAAE;;;;;;;;;;;;;;;oCAiBS,GAAG;;;;;;sCAWP,GAAG;8CACW,GAAG;;wCAEf,GAAG,eAAe,GAAG;sCACvB,GAAG,OAAO,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yCAgBtB,GAAG;;;IAapB;;;OAGG;;IAqBH;;OAEG;;IASH;;OAEG;;CAkBqC,CAAA;AAE5C;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY;;;;;;;;;;;;;;;;;;;;;;;EAyB3B"}
@@ -0,0 +1,173 @@
1
+ /**
2
+ * Database mocking utilities for tests
3
+ *
4
+ * "Y todo lo que hagáis, hacedlo de corazón, como para el Señor y no para los hombres" (Colosenses 3:23)
5
+ */
6
+ import { vi } from 'vitest';
7
+ /**
8
+ * Creates a mock Kysely instance with configurable behavior
9
+ *
10
+ * @param options Configuration for mock behavior
11
+ * @returns Object containing mocked Kysely instance and helper functions
12
+ */
13
+ export function createMockKysely(options = {}) {
14
+ const opts = options;
15
+ const mockExecuteTakeFirst = vi.fn();
16
+ const mockExecute = vi.fn();
17
+ const mockSqlExecute = vi.fn();
18
+ // Apply custom implementations if provided
19
+ if (opts.executeTakeFirst !== undefined) {
20
+ mockExecuteTakeFirst.mockImplementation(options.executeTakeFirst);
21
+ }
22
+ if (opts.execute !== undefined) {
23
+ mockExecute.mockImplementation(options.execute);
24
+ }
25
+ if (opts.sqlExecute !== undefined) {
26
+ mockSqlExecute.mockImplementation(options.sqlExecute);
27
+ }
28
+ class MockKysely {
29
+ selectFrom() { return this; }
30
+ where() { return this; }
31
+ selectAll() { return this; }
32
+ select(...args) { return this; }
33
+ orderBy() { return this; }
34
+ limit() { return this; }
35
+ groupBy() { return this; }
36
+ having() { return this; }
37
+ leftJoin() { return this; }
38
+ innerJoin() { return this; }
39
+ insertInto() { return this; }
40
+ values() { return this; }
41
+ returningAll() { return this; }
42
+ updateTable() { return this; }
43
+ set() { return this; }
44
+ deleteFrom() { return this; }
45
+ with() { return this; }
46
+ transaction() {
47
+ return {
48
+ execute: async (callback) => {
49
+ const mockTrx = new MockKysely();
50
+ return callback(mockTrx);
51
+ }
52
+ };
53
+ }
54
+ executeTakeFirst() { return mockExecuteTakeFirst(); }
55
+ executeTakeFirstOrThrow() { return mockExecuteTakeFirst(); }
56
+ execute() { return mockExecute(); }
57
+ getExecutor() {
58
+ return {
59
+ executeQuery: (query) => mockSqlExecute(query),
60
+ provideConnection: async (callback) => callback({}),
61
+ releaseConnection: () => { },
62
+ transformQuery: (query, transformer) => query,
63
+ compileQuery: (query, ctx) => ({ sql: '', parameters: [] }),
64
+ };
65
+ }
66
+ fn = {
67
+ countAll: vi.fn(() => ({ as: vi.fn(() => ({})) })),
68
+ sum: vi.fn(() => ({ as: vi.fn(() => ({})) })),
69
+ avg: vi.fn(() => ({ as: vi.fn(() => ({})) })),
70
+ max: vi.fn(() => ({ as: vi.fn(() => ({})) })),
71
+ min: vi.fn(() => ({ as: vi.fn(() => ({})) })),
72
+ };
73
+ }
74
+ const mockSql = vi.fn(() => ({
75
+ as: vi.fn().mockReturnValue({}),
76
+ execute: mockSqlExecute,
77
+ val: vi.fn((val) => val),
78
+ }));
79
+ const mockPgPool = vi.fn();
80
+ return {
81
+ MockKysely,
82
+ mockExecuteTakeFirst,
83
+ mockExecute,
84
+ mockSqlExecute,
85
+ mockSql,
86
+ mockPgPool,
87
+ /**
88
+ * Setup vi.mock calls for Kysely and related modules
89
+ * Call this in your test file's setup
90
+ */
91
+ setupMocks() {
92
+ vi.mock('kysely', () => ({
93
+ Kysely: MockKysely,
94
+ PostgresDialect: vi.fn(),
95
+ sql: mockSql,
96
+ }));
97
+ vi.mock('pg', () => ({
98
+ Pool: mockPgPool,
99
+ }));
100
+ // Mock config module only if not skipped
101
+ const skipConfigMock = opts.skipConfigMock || false;
102
+ if (!skipConfigMock) {
103
+ vi.mock('@/.config/kysely.config', () => ({
104
+ newKyselyPostgresql: vi.fn(() => new MockKysely()),
105
+ }));
106
+ }
107
+ },
108
+ /**
109
+ * Reset all mock implementations
110
+ */
111
+ resetMocks() {
112
+ mockExecuteTakeFirst.mockReset();
113
+ mockExecute.mockReset();
114
+ mockSqlExecute.mockReset();
115
+ mockSql.mockReset();
116
+ mockPgPool.mockReset();
117
+ },
118
+ /**
119
+ * Set up common mock responses for database queries
120
+ */
121
+ setupCommonResponses() {
122
+ // Default empty responses
123
+ mockExecuteTakeFirst.mockResolvedValue(null);
124
+ mockExecute.mockResolvedValue([]);
125
+ mockSqlExecute.mockResolvedValue({ rows: [] });
126
+ },
127
+ };
128
+ }
129
+ /**
130
+ * Pre-configured mock for database operations in API routes
131
+ */
132
+ export const apiDbMocks = createMockKysely();
133
+ /**
134
+ * Pre-configured mock for database operations in lib functions
135
+ */
136
+ export const libDbMocks = createMockKysely();
137
+ /**
138
+ * Creates a simple flat mock DB object for use in `vi.mock` factories.
139
+ * Use when you just need a mock object with chainable methods,
140
+ * not the full Kysely builder.
141
+ *
142
+ * ```typescript
143
+ * const mockDb = vi.hoisted(() => undefined as any)
144
+ * beforeEach(() => { if (!mockDb) Object.assign(mockDb, createMockDb()) })
145
+ * vi.mock('@/.config/kysely.config', () => ({ newKyselyPostgresql: () => mockDb }))
146
+ * ```
147
+ */
148
+ export function createMockDb() {
149
+ return {
150
+ selectFrom: vi.fn().mockReturnThis(),
151
+ select: vi.fn().mockReturnThis(),
152
+ selectAll: vi.fn().mockReturnThis(),
153
+ where: vi.fn().mockReturnThis(),
154
+ orderBy: vi.fn().mockReturnThis(),
155
+ limit: vi.fn().mockReturnThis(),
156
+ groupBy: vi.fn().mockReturnThis(),
157
+ having: vi.fn().mockReturnThis(),
158
+ leftJoin: vi.fn().mockReturnThis(),
159
+ innerJoin: vi.fn().mockReturnThis(),
160
+ executeTakeFirst: vi.fn().mockResolvedValue(null),
161
+ executeTakeFirstOrThrow: vi.fn().mockResolvedValue(null),
162
+ insertInto: vi.fn().mockReturnThis(),
163
+ values: vi.fn().mockReturnThis(),
164
+ returningAll: vi.fn().mockReturnThis(),
165
+ updateTable: vi.fn().mockReturnThis(),
166
+ set: vi.fn().mockReturnThis(),
167
+ deleteFrom: vi.fn().mockReturnThis(),
168
+ with: vi.fn().mockReturnThis(),
169
+ onConflict: vi.fn().mockReturnThis(),
170
+ execute: vi.fn().mockResolvedValue(undefined),
171
+ transaction: vi.fn().mockImplementation(async (cb) => cb(createMockDb())),
172
+ };
173
+ }
@@ -0,0 +1,134 @@
1
+ /**
2
+ * Radix UI mocks for testing
3
+ *
4
+ * "Y todo lo que hagáis, hacedlo de corazón, como para el Señor y no para los hombres" (Colosenses 3:23)
5
+ */
6
+ import React from 'react';
7
+ /**
8
+ * Mock for @radix-ui/react-portal
9
+ * Renders children directly instead of in a portal
10
+ */
11
+ export declare const portalMock: {
12
+ Portal: ({ children }: {
13
+ children: React.ReactNode;
14
+ }) => React.ReactNode;
15
+ Root: ({ children }: {
16
+ children: React.ReactNode;
17
+ }) => React.ReactNode;
18
+ };
19
+ /**
20
+ * Mock for @radix-ui/react-menubar
21
+ * Provides simplified components that render without complex context
22
+ */
23
+ export declare const menubarMock: {
24
+ Root: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
25
+ Menu: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
26
+ Trigger: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
27
+ Content: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
28
+ Item: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
29
+ Separator: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
30
+ Label: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
31
+ CheckboxItem: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
32
+ RadioGroup: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
33
+ RadioItem: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
34
+ Group: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
35
+ ItemIndicator: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
36
+ Sub: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
37
+ SubTrigger: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
38
+ SubContent: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
39
+ Shortcut: ({ className, ...props }: any) => React.JSX.Element;
40
+ Portal: ({ children }: {
41
+ children: React.ReactNode;
42
+ }) => React.ReactNode;
43
+ };
44
+ /**
45
+ * Mock for @radix-ui/react-popover
46
+ */
47
+ export declare const popoverMock: {
48
+ Root: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
49
+ Trigger: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
50
+ Content: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
51
+ Portal: ({ children }: {
52
+ children: React.ReactNode;
53
+ }) => React.ReactNode;
54
+ };
55
+ /**
56
+ * Mock for @radix-ui/react-dropdown-menu
57
+ */
58
+ export declare const dropdownMenuMock: {
59
+ Root: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
60
+ Trigger: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
61
+ Content: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
62
+ Item: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
63
+ Separator: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
64
+ Label: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
65
+ CheckboxItem: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
66
+ RadioGroup: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
67
+ RadioItem: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
68
+ Sub: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
69
+ SubTrigger: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
70
+ SubContent: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
71
+ Shortcut: ({ className, ...props }: any) => React.JSX.Element;
72
+ };
73
+ /**
74
+ * Mock for @radix-ui/react-dialog (used by sheet, alert-dialog)
75
+ */
76
+ export declare const dialogMock: {
77
+ Root: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
78
+ Trigger: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
79
+ Content: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
80
+ Overlay: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
81
+ Title: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
82
+ Description: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
83
+ Close: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
84
+ };
85
+ /**
86
+ * Mock for @radix-ui/react-toast
87
+ */
88
+ export declare const toastMock: {
89
+ Provider: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
90
+ Root: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
91
+ Title: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
92
+ Description: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
93
+ Action: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
94
+ Close: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
95
+ Viewport: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
96
+ };
97
+ /**
98
+ * Mock for @radix-ui/react-tooltip
99
+ */
100
+ export declare const tooltipMock: {
101
+ Provider: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
102
+ Root: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
103
+ Trigger: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
104
+ Content: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
105
+ Arrow: ({ className, ...props }: any) => React.JSX.Element;
106
+ };
107
+ /**
108
+ * Common Radix UI component mocks
109
+ */
110
+ export declare const commonRadixMocks: {
111
+ Slot: ({ children, ...props }: any) => React.DetailedReactHTMLElement<any, HTMLElement>;
112
+ Label: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
113
+ Separator: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
114
+ };
115
+ export declare const scrollAreaMock: {
116
+ Root: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
117
+ Viewport: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
118
+ Scrollbar: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
119
+ Thumb: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
120
+ ScrollAreaScrollbar: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
121
+ Corner: ({ className, ...props }: any) => React.JSX.Element;
122
+ ScrollAreaThumb: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
123
+ ScrollAreaViewport: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
124
+ ScrollAreaCorner: ({ className, ...props }: any) => React.JSX.Element;
125
+ ScrollAreaRoot: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
126
+ };
127
+ export declare const tabsMock: {
128
+ Root: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
129
+ List: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
130
+ Trigger: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
131
+ Content: React.ForwardRefExoticComponent<Omit<any, "ref"> & React.RefAttributes<unknown>>;
132
+ };
133
+ export declare function setupRadixMocks(): void;
134
+ //# sourceMappingURL=radix-mocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radix-mocks.d.ts","sourceRoot":"","sources":["../../src/test-utils/radix-mocks.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAA;AAazB;;;GAGG;AACH,eAAO,MAAM,UAAU;2BACE;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;yBAC/B;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;CACnD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;wCAgEc,GAAG;2BAxEhB;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;CA4ErD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,WAAW;;;;2BAjFC;QAAE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE;CAoGrD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;wCAuDS,GAAG;CAGxC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;;;;CA8BtB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;CA8BrB,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;qCAeW,GAAG;CAGrC,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB;mCACI,GAAG;;;CAOnC,CAAA;AAED,eAAO,MAAM,cAAc;;;;;;sCA4BS,GAAG;;;gDASO,GAAG;;CAMhD,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;;CAepB,CAAC;AAGF,wBAAgB,eAAe,SA4F9B"}