@rolder/kit 3.0.0-alpha.11 → 3.0.0-alpha.111

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 (299) hide show
  1. package/dist/ai/index.d.ts +2 -0
  2. package/dist/ai/index.js +2 -0
  3. package/dist/ai/ui/chat/Root.d.ts +55 -0
  4. package/dist/ai/ui/chat/Root.js +18 -0
  5. package/dist/ai/ui/chat/chatInput/File.js +71 -0
  6. package/dist/ai/ui/chat/chatInput/FileIcon.js +43 -0
  7. package/dist/ai/ui/chat/chatInput/Root.d.ts +9 -0
  8. package/dist/ai/ui/chat/chatInput/Root.js +24 -0
  9. package/dist/ai/ui/chat/chatInput/Submit.js +23 -0
  10. package/dist/ai/ui/{promptInput → chat/chatInput}/Textarea.js +8 -7
  11. package/dist/ai/ui/{promptInput → chat/chatInput}/index.d.ts +2 -3
  12. package/dist/ai/ui/{promptInput → chat/chatInput}/index.js +2 -2
  13. package/dist/ai/ui/chat/chatInput/store/file.d.ts +8 -0
  14. package/dist/ai/ui/chat/chatInput/store/file.js +32 -0
  15. package/dist/ai/ui/chat/chatInput/store/fileErrorNotificaton.d.ts +2 -0
  16. package/dist/ai/ui/chat/chatInput/store/fileErrorNotificaton.js +21 -0
  17. package/dist/ai/ui/chat/chatInput/store/index.d.ts +2 -0
  18. package/dist/ai/ui/chat/chatInput/store/index.js +2 -0
  19. package/dist/ai/ui/chat/chatInput/store/input.d.ts +13 -0
  20. package/dist/ai/ui/chat/chatInput/store/input.js +81 -0
  21. package/dist/ai/ui/chat/chatInput/store/parseFile.d.ts +2 -0
  22. package/dist/ai/ui/chat/chatInput/store/parseFile.js +23 -0
  23. package/dist/ai/ui/chat/index.d.ts +12 -0
  24. package/dist/ai/ui/chat/index.js +15 -0
  25. package/dist/ai/ui/chat/messages/Empty.d.ts +4 -0
  26. package/dist/ai/ui/chat/messages/Empty.js +11 -0
  27. package/dist/ai/ui/chat/messages/Loader.d.ts +5 -0
  28. package/dist/ai/ui/chat/messages/Loader.js +12 -0
  29. package/dist/ai/ui/chat/messages/Message.d.ts +8 -0
  30. package/dist/ai/ui/chat/messages/Message.js +22 -0
  31. package/dist/ai/ui/chat/messages/Messages.d.ts +3 -0
  32. package/dist/ai/ui/chat/messages/Messages.js +40 -0
  33. package/dist/ai/ui/chat/messages/index.d.ts +2 -0
  34. package/dist/ai/ui/chat/messages/index.js +2 -0
  35. package/dist/ai/ui/chat/parts/File.d.ts +6 -0
  36. package/dist/ai/ui/{conversation → chat/parts}/File.js +10 -10
  37. package/dist/ai/ui/chat/parts/FileIcon.js +43 -0
  38. package/dist/ai/ui/chat/parts/PartPaper.d.ts +8 -0
  39. package/dist/ai/ui/chat/parts/PartPaper.js +14 -0
  40. package/dist/ai/ui/chat/parts/TextPart.d.ts +6 -0
  41. package/dist/ai/ui/chat/parts/TextPart.js +15 -0
  42. package/dist/ai/ui/chat/parts/ToolExecution.d.ts +7 -0
  43. package/dist/ai/ui/chat/parts/ToolExecution.js +56 -0
  44. package/dist/ai/ui/chat/parts/ToolPart.d.ts +10 -0
  45. package/dist/ai/ui/chat/parts/ToolPart.js +24 -0
  46. package/dist/ai/ui/chat/parts/index.d.ts +3 -0
  47. package/dist/ai/ui/chat/parts/index.js +3 -0
  48. package/dist/ai/ui/chat/store/index.d.ts +4 -0
  49. package/dist/ai/ui/chat/store/index.js +4 -0
  50. package/dist/ai/ui/chat/store/messages.d.ts +12 -0
  51. package/dist/ai/ui/chat/store/messages.js +40 -0
  52. package/dist/ai/ui/chat/store/send.d.ts +14 -0
  53. package/dist/ai/ui/chat/store/send.js +16 -0
  54. package/dist/ai/ui/chat/store/states.d.ts +11 -0
  55. package/dist/ai/ui/chat/store/states.js +20 -0
  56. package/dist/ai/ui/chat/store/useInitChat.d.ts +3 -0
  57. package/dist/ai/ui/chat/store/useInitChat.js +40 -0
  58. package/dist/ai/ui/index.d.ts +1 -0
  59. package/dist/ai/ui/index.js +1 -0
  60. package/dist/ai/utils/index.d.ts +2 -0
  61. package/dist/ai/utils/index.js +2 -0
  62. package/dist/app/AppDefaults.js +1 -1
  63. package/dist/app/DefaultApp.js +1 -1
  64. package/dist/app/cookieColorSchemeManager.js +1 -1
  65. package/dist/app/defaultTheme.d.ts +7 -7
  66. package/dist/app/index.d.ts +3 -0
  67. package/dist/app/index.js +3 -0
  68. package/dist/betterAuth/client/getAuthClient.d.ts +3050 -0
  69. package/dist/betterAuth/client/getAuthClient.js +18 -0
  70. package/dist/betterAuth/client/index.d.ts +1 -0
  71. package/dist/betterAuth/client/index.js +1 -0
  72. package/dist/betterAuth/index.d.ts +3 -0
  73. package/dist/betterAuth/index.js +3 -0
  74. package/dist/betterAuth/server/defaultAuthServerConfig.d.ts +1243 -0
  75. package/dist/betterAuth/server/defaultAuthServerConfig.js +50 -0
  76. package/dist/betterAuth/server/env.d.ts +1 -0
  77. package/dist/betterAuth/server/env.js +8 -0
  78. package/dist/betterAuth/server/getDBSession.d.ts +2 -0
  79. package/dist/betterAuth/server/getDBSession.js +85 -0
  80. package/dist/betterAuth/server/getSessionToken.d.ts +1 -0
  81. package/dist/betterAuth/server/getSessionToken.js +15 -0
  82. package/dist/betterAuth/server/getSessionUser.d.ts +1 -0
  83. package/dist/betterAuth/server/getSessionUser.js +22 -0
  84. package/dist/betterAuth/server/index.d.ts +10 -0
  85. package/dist/betterAuth/server/index.js +11 -0
  86. package/dist/betterAuth/server/surrealDbAdapter/adapter.d.ts +8 -0
  87. package/dist/betterAuth/server/surrealDbAdapter/adapter.js +64 -0
  88. package/dist/betterAuth/server/surrealDbAdapter/adapter.test.d.ts +1 -0
  89. package/dist/betterAuth/server/surrealDbAdapter/adapter.test.js +84 -0
  90. package/dist/betterAuth/server/surrealDbAdapter/db/getDB.d.ts +2 -0
  91. package/dist/betterAuth/server/surrealDbAdapter/db/getDB.js +26 -0
  92. package/dist/betterAuth/server/surrealDbAdapter/db/index.d.ts +1 -0
  93. package/dist/betterAuth/server/surrealDbAdapter/db/index.js +1 -0
  94. package/dist/betterAuth/server/surrealDbAdapter/db/schema.d.ts +1 -0
  95. package/dist/betterAuth/server/surrealDbAdapter/db/schema.js +97 -0
  96. package/dist/betterAuth/server/surrealDbAdapter/index.d.ts +1 -0
  97. package/dist/betterAuth/server/surrealDbAdapter/index.js +1 -0
  98. package/dist/betterAuth/server/surrealDbAdapter/methods/count.d.ts +2 -0
  99. package/dist/betterAuth/server/surrealDbAdapter/methods/count.js +17 -0
  100. package/dist/betterAuth/server/surrealDbAdapter/methods/create.d.ts +2 -0
  101. package/dist/betterAuth/server/surrealDbAdapter/methods/create.js +21 -0
  102. package/dist/betterAuth/server/surrealDbAdapter/methods/delete.d.ts +2 -0
  103. package/dist/betterAuth/server/surrealDbAdapter/methods/delete.js +18 -0
  104. package/dist/betterAuth/server/surrealDbAdapter/methods/deleteMany.d.ts +2 -0
  105. package/dist/betterAuth/server/surrealDbAdapter/methods/deleteMany.js +19 -0
  106. package/dist/betterAuth/server/surrealDbAdapter/methods/findMany.d.ts +2 -0
  107. package/dist/betterAuth/server/surrealDbAdapter/methods/findMany.js +51 -0
  108. package/dist/betterAuth/server/surrealDbAdapter/methods/findOne.d.ts +2 -0
  109. package/dist/betterAuth/server/surrealDbAdapter/methods/findOne.js +42 -0
  110. package/dist/betterAuth/server/surrealDbAdapter/methods/index.d.ts +8 -0
  111. package/dist/betterAuth/server/surrealDbAdapter/methods/index.js +8 -0
  112. package/dist/betterAuth/server/surrealDbAdapter/methods/types.d.ts +56 -0
  113. package/dist/betterAuth/server/surrealDbAdapter/methods/update.d.ts +2 -0
  114. package/dist/betterAuth/server/surrealDbAdapter/methods/update.js +25 -0
  115. package/dist/betterAuth/server/surrealDbAdapter/methods/updateMany.d.ts +2 -0
  116. package/dist/betterAuth/server/surrealDbAdapter/methods/updateMany.js +21 -0
  117. package/dist/betterAuth/server/surrealDbAdapter/types.d.ts +2 -0
  118. package/dist/betterAuth/server/surrealDbAdapter/utils/applyJoinMappings.d.ts +2 -0
  119. package/dist/betterAuth/server/surrealDbAdapter/utils/applyJoinMappings.js +31 -0
  120. package/dist/betterAuth/server/surrealDbAdapter/utils/buildExpression.d.ts +3 -0
  121. package/dist/betterAuth/server/surrealDbAdapter/utils/buildExpression.js +58 -0
  122. package/dist/betterAuth/server/surrealDbAdapter/utils/buildJoinPlan.d.ts +9 -0
  123. package/dist/betterAuth/server/surrealDbAdapter/utils/buildJoinPlan.js +46 -0
  124. package/dist/betterAuth/server/surrealDbAdapter/utils/buildSelectFields.d.ts +1 -0
  125. package/dist/betterAuth/server/surrealDbAdapter/utils/buildSelectFields.js +5 -0
  126. package/dist/betterAuth/server/surrealDbAdapter/utils/index.d.ts +6 -0
  127. package/dist/betterAuth/server/surrealDbAdapter/utils/index.js +6 -0
  128. package/dist/betterAuth/server/surrealDbAdapter/utils/normalizeOutputRecordIds.d.ts +2 -0
  129. package/dist/betterAuth/server/surrealDbAdapter/utils/normalizeOutputRecordIds.js +43 -0
  130. package/dist/betterAuth/server/surrealDbAdapter/utils/normalizeRecordIds.d.ts +2 -0
  131. package/dist/betterAuth/server/surrealDbAdapter/utils/normalizeRecordIds.js +38 -0
  132. package/dist/betterAuth/server/surrealDbAdapter/utils/normalizeWhereValue.d.ts +2 -0
  133. package/dist/betterAuth/server/surrealDbAdapter/utils/normalizeWhereValue.js +33 -0
  134. package/dist/betterAuth/server/surrealDbAdapter/utils/types.d.ts +34 -0
  135. package/dist/betterAuth/server/types.d.ts +8 -0
  136. package/dist/betterAuth/useSessionUser.d.ts +1 -0
  137. package/dist/betterAuth/useSessionUser.js +8 -0
  138. package/dist/hooks/index.d.ts +2 -0
  139. package/dist/hooks/index.js +2 -0
  140. package/dist/styles.css +3 -8
  141. package/dist/surrealDB/deafaultCrud.d.ts +2 -0
  142. package/dist/{surreal → surrealDB}/deafaultCrud.js +6 -5
  143. package/dist/surrealDB/getDBInstance.d.ts +3 -0
  144. package/dist/surrealDB/getDBInstance.js +34 -0
  145. package/dist/surrealDB/getDBInstanceTanstack.d.ts +3 -0
  146. package/dist/{surreal/connection.js → surrealDB/getDBInstanceTanstack.js} +2 -2
  147. package/dist/surrealDB/index.d.ts +6 -0
  148. package/dist/surrealDB/index.js +6 -0
  149. package/dist/{surreal/connection.d.ts → surrealDB/types.d.ts} +3 -3
  150. package/dist/surrealDB/types.js +0 -0
  151. package/dist/tanstack/cookie/index.d.ts +3 -0
  152. package/dist/tanstack/cookie/index.js +4 -0
  153. package/dist/{functions → tanstack/cookie}/setCookie.d.ts +1 -1
  154. package/dist/tanstack/index.d.ts +3 -0
  155. package/dist/tanstack/index.js +3 -0
  156. package/dist/tanstack/middlewares/index.d.ts +6 -0
  157. package/dist/tanstack/middlewares/index.js +5 -0
  158. package/dist/tanstack/middlewares/locale.d.ts +4 -0
  159. package/dist/{app/defaultRequestMiddlewares.js → tanstack/middlewares/locale.js} +2 -5
  160. package/dist/tanstack/s3/getS3Client.d.ts +2 -0
  161. package/dist/tanstack/s3/getS3Client.js +18 -0
  162. package/dist/tanstack/s3/getSignedFileUrlFn.d.ts +4 -0
  163. package/dist/tanstack/s3/getSignedFileUrlFn.js +21 -0
  164. package/dist/tanstack/s3/index.d.ts +2 -0
  165. package/dist/tanstack/s3/index.js +2 -0
  166. package/dist/tanstack/s3/uploadRequest.d.ts +3 -0
  167. package/dist/tanstack/s3/uploadRequest.js +21 -0
  168. package/dist/ui/AnimatedChevron.d.ts +3 -4
  169. package/dist/ui/AnimatedChevron.js +6 -25
  170. package/dist/ui/JsonInput.d.ts +1 -1
  171. package/dist/ui/JsonInput.js +1 -1
  172. package/dist/ui/editor/Content.d.ts +2 -2
  173. package/dist/ui/editor/Content.js +2 -2
  174. package/dist/ui/editor/Root.d.ts +7 -1
  175. package/dist/ui/editor/Root.js +42 -5
  176. package/dist/ui/editor/Toolbar.d.ts +3 -2
  177. package/dist/ui/editor/Toolbar.js +7 -25
  178. package/dist/ui/editor/index.d.ts +5 -9
  179. package/dist/ui/editor/index.js +3 -4
  180. package/dist/ui/editor/store.d.ts +6 -0
  181. package/dist/ui/editor/store.js +10 -0
  182. package/dist/ui/error/DefaultError.d.ts +1 -1
  183. package/dist/ui/error/DefaultNotFound.d.ts +1 -1
  184. package/dist/ui/error/Forbidden.d.ts +1 -1
  185. package/dist/ui/form/buttons/CancelButton.d.ts +2 -2
  186. package/dist/ui/form/buttons/CancelButton.js +4 -26
  187. package/dist/ui/form/buttons/SubmitButton.d.ts +2 -2
  188. package/dist/ui/form/buttons/SubmitButton.js +4 -29
  189. package/dist/ui/form/buttons/SubscribeActionIcon.d.ts +2 -2
  190. package/dist/ui/form/buttons/SubscribeButton.d.ts +2 -2
  191. package/dist/ui/form/context.d.ts +55 -55
  192. package/dist/ui/form/context.js +3 -3
  193. package/dist/ui/form/fields/JsonField.d.ts +1 -1
  194. package/dist/ui/form/fields/MultiSelectField.d.ts +1 -1
  195. package/dist/ui/form/fields/NumberField.d.ts +1 -1
  196. package/dist/ui/form/fields/PasswordField.d.ts +2 -0
  197. package/dist/ui/form/fields/{PassowrdField.js → PasswordField.js} +2 -2
  198. package/dist/ui/form/fields/SelectField.d.ts +1 -1
  199. package/dist/ui/form/fields/SwitchField.d.ts +1 -1
  200. package/dist/ui/form/fields/TextField.d.ts +1 -1
  201. package/dist/ui/form/fields/TextPasswordField.d.ts +2 -0
  202. package/dist/ui/form/fields/TextPasswordField.js +29 -0
  203. package/dist/ui/form/fields/TextareaField.d.ts +1 -1
  204. package/dist/ui/form/fields/index.d.ts +2 -2
  205. package/dist/ui/form/fields/index.js +2 -2
  206. package/dist/ui/form/index.d.ts +0 -1
  207. package/dist/ui/form/index.js +1 -2
  208. package/dist/ui/index.d.ts +9 -0
  209. package/dist/ui/index.js +9 -0
  210. package/dist/ui/saveInput/JsonInput.d.ts +2 -2
  211. package/dist/ui/saveInput/NumberInput.d.ts +2 -2
  212. package/dist/ui/saveInput/SaveInput.d.ts +14 -14
  213. package/dist/ui/saveInput/Select.d.ts +2 -2
  214. package/dist/ui/saveInput/Switch.d.ts +2 -2
  215. package/dist/ui/saveInput/TextInput.d.ts +2 -2
  216. package/dist/ui/saveInput/Textarea.d.ts +2 -2
  217. package/dist/ui/scrollArea/Root.d.ts +7 -0
  218. package/dist/ui/scrollArea/Root.js +42 -0
  219. package/dist/ui/scrollArea/ScrollButton.d.ts +7 -0
  220. package/dist/ui/scrollArea/ScrollButton.js +30 -0
  221. package/dist/ui/scrollArea/index.d.ts +6 -3
  222. package/dist/ui/scrollArea/index.js +7 -3
  223. package/dist/ui/scrollArea/methods.d.ts +4 -0
  224. package/dist/ui/scrollArea/methods.js +32 -0
  225. package/dist/ui/scrollArea/store.d.ts +12 -0
  226. package/dist/ui/scrollArea/store.js +25 -0
  227. package/dist/{ui/form/fieldsSchema.d.ts → zodSchemas.d.ts} +1 -1
  228. package/dist/{ui/form/fieldsSchema.js → zodSchemas.js} +2 -2
  229. package/package.json +103 -71
  230. package/dist/ai/ui/conversation/ConversationContext.d.ts +0 -7
  231. package/dist/ai/ui/conversation/ConversationContext.js +0 -8
  232. package/dist/ai/ui/conversation/ConversationProvider.d.ts +0 -2
  233. package/dist/ai/ui/conversation/ConversationProvider.js +0 -14
  234. package/dist/ai/ui/conversation/Empty.d.ts +0 -1
  235. package/dist/ai/ui/conversation/Empty.js +0 -21
  236. package/dist/ai/ui/conversation/File.d.ts +0 -4
  237. package/dist/ai/ui/conversation/FileIcon.js +0 -225
  238. package/dist/ai/ui/conversation/Loader.d.ts +0 -2
  239. package/dist/ai/ui/conversation/Loader.js +0 -12
  240. package/dist/ai/ui/conversation/Message.d.ts +0 -4
  241. package/dist/ai/ui/conversation/Message.js +0 -25
  242. package/dist/ai/ui/conversation/Root.d.ts +0 -2
  243. package/dist/ai/ui/conversation/Root.js +0 -26
  244. package/dist/ai/ui/conversation/index.d.ts +0 -13
  245. package/dist/ai/ui/conversation/index.js +0 -14
  246. package/dist/ai/ui/conversation/types.d.ts +0 -7
  247. package/dist/ai/ui/conversation/useChatMessage.d.ts +0 -2
  248. package/dist/ai/ui/conversation/useChatMessage.js +0 -12
  249. package/dist/ai/ui/promptInput/File.js +0 -117
  250. package/dist/ai/ui/promptInput/FileIcon.js +0 -225
  251. package/dist/ai/ui/promptInput/PromptInputContext.d.ts +0 -12
  252. package/dist/ai/ui/promptInput/PromptInputContext.js +0 -8
  253. package/dist/ai/ui/promptInput/PromptInputProvider.d.ts +0 -2
  254. package/dist/ai/ui/promptInput/PromptInputProvider.js +0 -50
  255. package/dist/ai/ui/promptInput/Root.d.ts +0 -3
  256. package/dist/ai/ui/promptInput/Root.js +0 -17
  257. package/dist/ai/ui/promptInput/Submit.js +0 -40
  258. package/dist/ai/ui/promptInput/types.d.ts +0 -11
  259. package/dist/app/defaultRequestMiddlewares.d.ts +0 -4
  260. package/dist/index.d.ts +0 -26
  261. package/dist/index.js +0 -26
  262. package/dist/surreal/deafaultCrud.d.ts +0 -2
  263. package/dist/ui/editor/Provider.d.ts +0 -17
  264. package/dist/ui/editor/Provider.js +0 -80
  265. package/dist/ui/editor/types.d.ts +0 -7
  266. package/dist/ui/form/fields/PassowrdField.d.ts +0 -2
  267. package/dist/ui/form/fields/TextPassowrdField.d.ts +0 -2
  268. package/dist/ui/form/fields/TextPassowrdField.js +0 -51
  269. package/dist/ui/scrollArea/ScrollArea.d.ts +0 -62
  270. package/dist/ui/scrollArea/ScrollArea.js +0 -30
  271. package/dist/ui/scrollArea/ScrollAreaButton.d.ts +0 -5
  272. package/dist/ui/scrollArea/ScrollAreaButton.js +0 -51
  273. package/dist/ui/scrollArea/ScrollAreaContent.d.ts +0 -6
  274. package/dist/ui/scrollArea/ScrollAreaContent.js +0 -29
  275. package/dist/ui/scrollArea/context.d.ts +0 -28
  276. package/dist/ui/scrollArea/context.js +0 -10
  277. package/dist/ui/scrollArea/types.d.ts +0 -65
  278. package/dist/ui/scrollArea/useScrollArea.d.ts +0 -9
  279. package/dist/ui/scrollArea/useScrollArea.js +0 -146
  280. /package/dist/ai/ui/{promptInput → chat/chatInput}/File.d.ts +0 -0
  281. /package/dist/ai/ui/{conversation → chat/chatInput}/FileIcon.d.ts +0 -0
  282. /package/dist/ai/ui/{promptInput → chat/chatInput}/Footer.d.ts +0 -0
  283. /package/dist/ai/ui/{promptInput → chat/chatInput}/Footer.js +0 -0
  284. /package/dist/ai/ui/{promptInput → chat/chatInput}/Submit.d.ts +0 -0
  285. /package/dist/ai/ui/{promptInput → chat/chatInput}/Textarea.d.ts +0 -0
  286. /package/dist/ai/ui/{promptInput → chat/parts}/FileIcon.d.ts +0 -0
  287. /package/dist/{ai/ui/conversation → betterAuth/server/surrealDbAdapter/methods}/types.js +0 -0
  288. /package/dist/{ai/ui/promptInput → betterAuth/server/surrealDbAdapter}/types.js +0 -0
  289. /package/dist/{ui/editor → betterAuth/server/surrealDbAdapter/utils}/types.js +0 -0
  290. /package/dist/{ui/scrollArea → betterAuth/server}/types.js +0 -0
  291. /package/dist/{surreal → surrealDB}/deserialize.d.ts +0 -0
  292. /package/dist/{surreal → surrealDB}/deserialize.js +0 -0
  293. /package/dist/{surreal → surrealDB}/encryption.d.ts +0 -0
  294. /package/dist/{surreal → surrealDB}/encryption.js +0 -0
  295. /package/dist/{functions → tanstack/cookie}/getCookie.d.ts +0 -0
  296. /package/dist/{functions → tanstack/cookie}/getCookie.js +0 -0
  297. /package/dist/{functions → tanstack/cookie}/setCookie.js +0 -0
  298. /package/dist/{functions → tanstack/cookie}/setCookies.d.ts +0 -0
  299. /package/dist/{functions → tanstack/cookie}/setCookies.js +0 -0
@@ -0,0 +1,51 @@
1
+ import { Table, raw, surql } from "surrealdb";
2
+ import { getDb } from "../db/index.js";
3
+ import { applyJoinMappings, buildExpression, buildJoinPlan, buildSelectFields, normalizeOutputRecordIds } from "../utils/index.js";
4
+ const findMany = async ({ model, where, limit, offset, sortBy, join, surrealDbProps, ...args })=>{
5
+ const db = await getDb(surrealDbProps);
6
+ const table = new Table(model);
7
+ const expression = buildExpression({
8
+ model,
9
+ where,
10
+ ...args
11
+ });
12
+ const joinPlan = buildJoinPlan({
13
+ model,
14
+ join,
15
+ ...args
16
+ });
17
+ const fields = buildSelectFields(void 0, (field)=>args.getFieldName({
18
+ model,
19
+ field
20
+ }));
21
+ const baseFields = fields.split(', ');
22
+ const joinFields = joinPlan.selectFields.filter((field)=>!baseFields.includes(field));
23
+ const finalFields = [
24
+ ...baseFields,
25
+ ...joinFields
26
+ ].join(', ');
27
+ const query = surql`SELECT ${raw(finalFields)} FROM ${table}`;
28
+ if (expression) query.append(surql` WHERE ${expression}`);
29
+ if (sortBy) {
30
+ const orderField = args.getFieldName({
31
+ model,
32
+ field: sortBy.field
33
+ });
34
+ const direction = sortBy.direction.toUpperCase();
35
+ query.append(surql` ORDER BY ${raw(orderField)} ${raw(direction)}`);
36
+ }
37
+ if ('number' == typeof offset) query.append(surql` START ${offset}`);
38
+ query.append(surql` LIMIT ${limit}`);
39
+ if (joinPlan.fetchFields.size > 0) query.append(surql` FETCH ${raw(Array.from(joinPlan.fetchFields).join(', '))}`);
40
+ const [rows] = await db.query(query).json().collect();
41
+ return (rows ?? []).map((row)=>normalizeOutputRecordIds({
42
+ model,
43
+ data: applyJoinMappings({
44
+ row,
45
+ mappings: joinPlan.mappings,
46
+ ...args
47
+ }),
48
+ ...args
49
+ }));
50
+ };
51
+ export { findMany };
@@ -0,0 +1,2 @@
1
+ import type { FindOne } from './types';
2
+ export declare const findOne: <T>({ model, where, select, join, surrealDbProps, ...args }: FindOne) => Promise<T | null>;
@@ -0,0 +1,42 @@
1
+ import { Table, raw, surql } from "surrealdb";
2
+ import { getDb } from "../db/index.js";
3
+ import { applyJoinMappings, buildExpression, buildJoinPlan, buildSelectFields, normalizeOutputRecordIds } from "../utils/index.js";
4
+ const findOne = async ({ model, where, select, join, surrealDbProps, ...args })=>{
5
+ const db = await getDb(surrealDbProps);
6
+ const table = new Table(model);
7
+ const expression = buildExpression({
8
+ model,
9
+ where,
10
+ ...args
11
+ });
12
+ const joinPlan = buildJoinPlan({
13
+ model,
14
+ join,
15
+ ...args
16
+ });
17
+ const fields = buildSelectFields(select, (field)=>args.getFieldName({
18
+ model,
19
+ field
20
+ }));
21
+ const baseFields = fields.split(', ');
22
+ const joinFields = joinPlan.selectFields.filter((field)=>!baseFields.includes(field));
23
+ const finalFields = [
24
+ ...baseFields,
25
+ ...joinFields
26
+ ].join(', ');
27
+ const query = surql`SELECT ${raw(finalFields)} FROM ${table}`;
28
+ if (expression) query.append(surql` WHERE ${expression}`);
29
+ query.append(surql` LIMIT ${1}`);
30
+ if (joinPlan.fetchFields.size > 0) query.append(surql` FETCH ${raw(Array.from(joinPlan.fetchFields).join(', '))}`);
31
+ const [rows] = await db.query(query).json().collect();
32
+ return normalizeOutputRecordIds({
33
+ model,
34
+ data: applyJoinMappings({
35
+ row: rows?.[0] ?? null,
36
+ mappings: joinPlan.mappings,
37
+ ...args
38
+ }),
39
+ ...args
40
+ });
41
+ };
42
+ export { findOne };
@@ -0,0 +1,8 @@
1
+ export * from './count';
2
+ export * from './create';
3
+ export * from './delete';
4
+ export * from './deleteMany';
5
+ export * from './findMany';
6
+ export * from './findOne';
7
+ export * from './update';
8
+ export * from './updateMany';
@@ -0,0 +1,8 @@
1
+ export * from "./count.js";
2
+ export * from "./create.js";
3
+ export * from "./delete.js";
4
+ export * from "./deleteMany.js";
5
+ export * from "./findMany.js";
6
+ export * from "./findOne.js";
7
+ export * from "./update.js";
8
+ export * from "./updateMany.js";
@@ -0,0 +1,56 @@
1
+ import type { AdapterFactoryCustomizeAdapterCreator, JoinConfig, Where } from 'better-auth/adapters';
2
+ import type { SurrealDBProps } from '../../../../surrealDB/types';
3
+ type Args = Parameters<AdapterFactoryCustomizeAdapterCreator>[0];
4
+ export type Create<T> = Args & {
5
+ model: string;
6
+ data: T;
7
+ surrealDbProps?: SurrealDBProps;
8
+ };
9
+ export type FindOne = Args & {
10
+ model: string;
11
+ where: Required<Where>[];
12
+ select?: string[];
13
+ join?: JoinConfig;
14
+ surrealDbProps?: SurrealDBProps;
15
+ };
16
+ export type SortBy = {
17
+ field: string;
18
+ direction: 'asc' | 'desc';
19
+ };
20
+ export type FindMany = Args & {
21
+ model: string;
22
+ where?: Required<Where>[];
23
+ limit: number;
24
+ offset?: number;
25
+ sortBy?: SortBy;
26
+ join?: JoinConfig;
27
+ surrealDbProps?: SurrealDBProps;
28
+ };
29
+ export type Update<T> = Args & {
30
+ model: string;
31
+ where: Required<Where>[];
32
+ update: T;
33
+ surrealDbProps?: SurrealDBProps;
34
+ };
35
+ export type UpdateMany = Args & {
36
+ model: string;
37
+ where: Required<Where>[];
38
+ update: Record<string, unknown>;
39
+ surrealDbProps?: SurrealDBProps;
40
+ };
41
+ export type Delete = Args & {
42
+ model: string;
43
+ where: Required<Where>[];
44
+ surrealDbProps?: SurrealDBProps;
45
+ };
46
+ export type DeleteMany = Args & {
47
+ model: string;
48
+ where: Required<Where>[];
49
+ surrealDbProps?: SurrealDBProps;
50
+ };
51
+ export type Count = Args & {
52
+ model: string;
53
+ where?: Required<Where>[];
54
+ surrealDbProps?: SurrealDBProps;
55
+ };
56
+ export {};
@@ -0,0 +1,2 @@
1
+ import type { Update } from './types';
2
+ export declare const update: <T>({ model, where, update, surrealDbProps, ...args }: Update<T>) => Promise<T | null>;
@@ -0,0 +1,25 @@
1
+ import { Table } from "surrealdb";
2
+ import { getDb } from "../db/index.js";
3
+ import { buildExpression, normalizeOutputRecordIds, normalizeRecordIds } from "../utils/index.js";
4
+ const update_update = async ({ model, where, update, surrealDbProps, ...args })=>{
5
+ if (!where || 0 === where.length) throw new Error('Update requires a where clause');
6
+ const db = await getDb(surrealDbProps);
7
+ const normalized = normalizeRecordIds({
8
+ model,
9
+ data: update,
10
+ ...args
11
+ });
12
+ const table = new Table(model);
13
+ const expression = buildExpression({
14
+ model,
15
+ where,
16
+ ...args
17
+ });
18
+ const [updated] = await db.update(table).merge(normalized).where(expression).json();
19
+ return normalizeOutputRecordIds({
20
+ model,
21
+ data: updated ?? null,
22
+ ...args
23
+ });
24
+ };
25
+ export { update_update as update };
@@ -0,0 +1,2 @@
1
+ import type { UpdateMany } from './types';
2
+ export declare const updateMany: ({ model, where, update, surrealDbProps, ...args }: UpdateMany) => Promise<number>;
@@ -0,0 +1,21 @@
1
+ import { Table } from "surrealdb";
2
+ import { getDb } from "../db/index.js";
3
+ import { buildExpression, normalizeRecordIds } from "../utils/index.js";
4
+ const updateMany = async ({ model, where, update, surrealDbProps, ...args })=>{
5
+ if (!where || 0 === where.length) throw new Error('UpdateMany requires a where clause');
6
+ const db = await getDb(surrealDbProps);
7
+ const normalized = normalizeRecordIds({
8
+ model,
9
+ data: update,
10
+ ...args
11
+ });
12
+ const table = new Table(model);
13
+ const expression = buildExpression({
14
+ model,
15
+ where,
16
+ ...args
17
+ });
18
+ const updated = await db.update(table).merge(normalized).where(expression).json();
19
+ return updated?.length ?? 0;
20
+ };
21
+ export { updateMany };
@@ -0,0 +1,2 @@
1
+ import type { AdapterFactoryCustomizeAdapterCreator } from 'better-auth/adapters';
2
+ export type Args = Parameters<AdapterFactoryCustomizeAdapterCreator>[0];
@@ -0,0 +1,2 @@
1
+ import type { ApplyJoinMappings } from './types';
2
+ export declare const applyJoinMappings: ({ row, mappings, ...args }: ApplyJoinMappings) => object | null;
@@ -0,0 +1,31 @@
1
+ import { normalizeOutputRecordIds } from "./normalizeOutputRecordIds.js";
2
+ const applyJoinMappings = ({ row, mappings, ...args })=>{
3
+ if (!row || 0 === mappings.length) return row;
4
+ const normalized = {
5
+ ...row
6
+ };
7
+ for (const mapping of mappings){
8
+ if (void 0 !== normalized[mapping.modelName]) continue;
9
+ if (void 0 === normalized[mapping.sourceField]) continue;
10
+ const sourceValue = normalized[mapping.sourceField];
11
+ if (Array.isArray(sourceValue)) {
12
+ normalized[mapping.modelName] = sourceValue.map((item)=>normalizeOutputRecordIds({
13
+ model: mapping.modelName,
14
+ data: item,
15
+ ...args
16
+ }));
17
+ continue;
18
+ }
19
+ if (sourceValue && 'object' == typeof sourceValue) {
20
+ normalized[mapping.modelName] = normalizeOutputRecordIds({
21
+ model: mapping.modelName,
22
+ data: sourceValue,
23
+ ...args
24
+ });
25
+ continue;
26
+ }
27
+ normalized[mapping.modelName] = sourceValue;
28
+ }
29
+ return normalized;
30
+ };
31
+ export { applyJoinMappings };
@@ -0,0 +1,3 @@
1
+ import { type Expr } from 'surrealdb';
2
+ import type { BuildExpression } from './types';
3
+ export declare const buildExpression: ({ model, where, ...args }: BuildExpression) => Expr | undefined;
@@ -0,0 +1,58 @@
1
+ import { and, contains, eq, gt, gte, inside, lt, lte, or } from "surrealdb";
2
+ import { normalizeWhereValue } from "./normalizeWhereValue.js";
3
+ const buildExpression = ({ model, where, ...args })=>{
4
+ if (!where || 0 === where.length) return;
5
+ const opExpression = (clause)=>{
6
+ const field = clause.field;
7
+ const value = normalizeWhereValue({
8
+ model,
9
+ field,
10
+ value: clause.value,
11
+ ...args
12
+ });
13
+ const operator = clause.operator ?? 'eq';
14
+ switch(operator){
15
+ case 'ne':
16
+ return {
17
+ toSQL: (ctx)=>`${field} != ${ctx.def(value)}`
18
+ };
19
+ case 'gt':
20
+ return gt(field, value);
21
+ case 'gte':
22
+ return gte(field, value);
23
+ case 'lt':
24
+ return lt(field, value);
25
+ case 'lte':
26
+ return lte(field, value);
27
+ case 'contains':
28
+ return contains(field, value);
29
+ case 'starts_with':
30
+ return {
31
+ toSQL: (ctx)=>`string::starts_with(${field}, ${ctx.def(value)})`
32
+ };
33
+ case 'ends_with':
34
+ return {
35
+ toSQL: (ctx)=>`string::ends_with(${field}, ${ctx.def(value)})`
36
+ };
37
+ case 'in':
38
+ return inside(field, value);
39
+ case 'not_in':
40
+ return {
41
+ toSQL: (ctx)=>`${field} NOT IN ${ctx.def(value)}`
42
+ };
43
+ default:
44
+ return eq(field, value);
45
+ }
46
+ };
47
+ let expression;
48
+ for (const clause of where){
49
+ const next = opExpression(clause);
50
+ if (!expression) {
51
+ expression = next;
52
+ continue;
53
+ }
54
+ expression = 'OR' === clause.connector ? or(expression, next) : and(expression, next);
55
+ }
56
+ return expression;
57
+ };
58
+ export { buildExpression };
@@ -0,0 +1,9 @@
1
+ import type { BuildJoinPlan } from './types';
2
+ export declare const buildJoinPlan: ({ model, join, getDefaultModelName, }: BuildJoinPlan) => {
3
+ selectFields: string[];
4
+ fetchFields: Set<string>;
5
+ mappings: {
6
+ modelName: string;
7
+ sourceField: string;
8
+ }[];
9
+ };
@@ -0,0 +1,46 @@
1
+ const buildJoinPlan = ({ model, join, getDefaultModelName })=>{
2
+ const joinFieldsByModel = {
3
+ user: {
4
+ account: 'accounts',
5
+ session: 'sessions'
6
+ }
7
+ };
8
+ const selectFields = [];
9
+ const fetchFields = new Set();
10
+ const mappings = [];
11
+ if (!join || 0 === Object.keys(join).length) return {
12
+ selectFields,
13
+ fetchFields,
14
+ mappings
15
+ };
16
+ for (const [joinModel, joinConfig] of Object.entries(join)){
17
+ const baseModelName = getDefaultModelName(model);
18
+ const joinModelName = getDefaultModelName(joinModel);
19
+ const relation = joinConfig.relation ?? 'one-to-many';
20
+ if ('one-to-one' === relation) {
21
+ const fromField = joinConfig.on.from;
22
+ selectFields.push(fromField);
23
+ fetchFields.add(fromField);
24
+ mappings.push({
25
+ modelName: joinModel,
26
+ sourceField: fromField
27
+ });
28
+ continue;
29
+ }
30
+ const computedField = joinFieldsByModel[baseModelName]?.[joinModelName];
31
+ if (computedField) {
32
+ selectFields.push(computedField);
33
+ fetchFields.add(computedField);
34
+ mappings.push({
35
+ modelName: joinModel,
36
+ sourceField: computedField
37
+ });
38
+ }
39
+ }
40
+ return {
41
+ selectFields,
42
+ fetchFields,
43
+ mappings
44
+ };
45
+ };
46
+ export { buildJoinPlan };
@@ -0,0 +1 @@
1
+ export declare const buildSelectFields: (select: string[] | undefined, mapField: (field: string) => string) => string;
@@ -0,0 +1,5 @@
1
+ const buildSelectFields = (select, mapField)=>{
2
+ if (!select || 0 === select.length) return '*';
3
+ return select.map(mapField).join(', ');
4
+ };
5
+ export { buildSelectFields };
@@ -0,0 +1,6 @@
1
+ export * from './applyJoinMappings';
2
+ export * from './buildExpression';
3
+ export * from './buildJoinPlan';
4
+ export * from './buildSelectFields';
5
+ export * from './normalizeOutputRecordIds';
6
+ export * from './normalizeRecordIds';
@@ -0,0 +1,6 @@
1
+ export * from "./applyJoinMappings.js";
2
+ export * from "./buildExpression.js";
3
+ export * from "./buildJoinPlan.js";
4
+ export * from "./buildSelectFields.js";
5
+ export * from "./normalizeOutputRecordIds.js";
6
+ export * from "./normalizeRecordIds.js";
@@ -0,0 +1,2 @@
1
+ import type { NormalizeOutputRecordIds } from './types';
2
+ export declare const normalizeOutputRecordIds: ({ model, data, getDefaultModelName, getDefaultFieldName, getFieldAttributes, }: NormalizeOutputRecordIds) => Record<string, unknown> | null;
@@ -0,0 +1,43 @@
1
+ import { RecordId } from "surrealdb";
2
+ const normalizeOutputRecordIds = ({ model, data, getDefaultModelName, getDefaultFieldName, getFieldAttributes })=>{
3
+ if (!data) return data;
4
+ const normalized = {
5
+ ...data
6
+ };
7
+ const defaultModelName = getDefaultModelName(model);
8
+ const stripRecordId = (raw)=>{
9
+ if (raw instanceof RecordId) return stripRecordId(String(raw));
10
+ if ('string' != typeof raw) return raw;
11
+ const separatorIndex = raw.indexOf(':');
12
+ if (-1 === separatorIndex) return raw;
13
+ let id = raw.slice(separatorIndex + 1);
14
+ if (id.startsWith('⟨') && id.endsWith('⟩')) id = id.slice(1, -1);
15
+ return id;
16
+ };
17
+ for (const [field, value] of Object.entries(normalized)){
18
+ let defaultField;
19
+ try {
20
+ defaultField = getDefaultFieldName({
21
+ model: defaultModelName,
22
+ field
23
+ });
24
+ } catch {
25
+ continue;
26
+ }
27
+ const applyStrip = (targetValue)=>{
28
+ if (Array.isArray(targetValue)) return targetValue.map((entry)=>stripRecordId(entry));
29
+ return stripRecordId(targetValue);
30
+ };
31
+ if ('id' === defaultField) {
32
+ normalized[field] = applyStrip(value);
33
+ continue;
34
+ }
35
+ const fieldAttr = getFieldAttributes({
36
+ model: defaultModelName,
37
+ field: defaultField
38
+ });
39
+ if (fieldAttr?.references?.field === 'id') normalized[field] = applyStrip(value);
40
+ }
41
+ return normalized;
42
+ };
43
+ export { normalizeOutputRecordIds };
@@ -0,0 +1,2 @@
1
+ import type { NormalizeRecordIds } from './types';
2
+ export declare const normalizeRecordIds: ({ model, data, getDefaultModelName, getDefaultFieldName, getFieldAttributes, getModelName, }: NormalizeRecordIds) => Record<string, unknown>;
@@ -0,0 +1,38 @@
1
+ import { RecordId } from "surrealdb";
2
+ import { deserialize } from "../../../../surrealDB/index.js";
3
+ const normalizeRecordIds = ({ model, data, getDefaultModelName, getDefaultFieldName, getFieldAttributes, getModelName })=>{
4
+ const normalized = {
5
+ ...data
6
+ };
7
+ const defaultModelName = getDefaultModelName(model);
8
+ const toRecordId = (target, raw)=>{
9
+ if (raw instanceof RecordId) return raw;
10
+ if ('string' == typeof raw) return raw.includes(':') ? deserialize(raw) : new RecordId(target, raw);
11
+ return raw;
12
+ };
13
+ for (const [field, value] of Object.entries(normalized)){
14
+ let defaultField;
15
+ try {
16
+ defaultField = getDefaultFieldName({
17
+ model: defaultModelName,
18
+ field
19
+ });
20
+ } catch {
21
+ continue;
22
+ }
23
+ if ('id' === defaultField) continue;
24
+ const fieldAttr = getFieldAttributes({
25
+ model: defaultModelName,
26
+ field: defaultField
27
+ });
28
+ if (fieldAttr?.references?.field !== 'id') continue;
29
+ const targetModel = getModelName(fieldAttr.references.model);
30
+ if (Array.isArray(value)) {
31
+ normalized[field] = value.map((entry)=>toRecordId(targetModel, entry));
32
+ continue;
33
+ }
34
+ normalized[field] = toRecordId(targetModel, value);
35
+ }
36
+ return normalized;
37
+ };
38
+ export { normalizeRecordIds };
@@ -0,0 +1,2 @@
1
+ import type { NormalizeWhereValue } from './types';
2
+ export declare const normalizeWhereValue: ({ model, field, value, getDefaultModelName, getDefaultFieldName, getModelName, getFieldAttributes, }: NormalizeWhereValue) => unknown;
@@ -0,0 +1,33 @@
1
+ import { RecordId } from "surrealdb";
2
+ import { deserialize } from "../../../../surrealDB/index.js";
3
+ const normalizeWhereValue = ({ model, field, value, getDefaultModelName, getDefaultFieldName, getModelName, getFieldAttributes })=>{
4
+ const defaultModelName = getDefaultModelName(model);
5
+ const toRecordId = (target, raw)=>{
6
+ if (raw instanceof RecordId) return raw;
7
+ if ('string' == typeof raw) return raw.includes(':') ? deserialize(raw) : new RecordId(target, raw);
8
+ return raw;
9
+ };
10
+ let defaultField;
11
+ try {
12
+ defaultField = getDefaultFieldName({
13
+ model: defaultModelName,
14
+ field
15
+ });
16
+ } catch {
17
+ return value;
18
+ }
19
+ if ('id' === defaultField) {
20
+ const targetModel = getModelName(defaultModelName);
21
+ if (Array.isArray(value)) return value.map((entry)=>toRecordId(targetModel, entry));
22
+ return toRecordId(targetModel, value);
23
+ }
24
+ const fieldAttr = getFieldAttributes({
25
+ model: defaultModelName,
26
+ field: defaultField
27
+ });
28
+ if (fieldAttr?.references?.field !== 'id') return value;
29
+ const targetModel = getModelName(fieldAttr.references.model);
30
+ if (Array.isArray(value)) return value.map((entry)=>toRecordId(targetModel, entry));
31
+ return toRecordId(targetModel, value);
32
+ };
33
+ export { normalizeWhereValue };
@@ -0,0 +1,34 @@
1
+ import type { JoinConfig, Where } from 'better-auth/adapters';
2
+ import type { Args } from '../types';
3
+ export type NormalizeRecordIds = Args & {
4
+ model: string;
5
+ data: object;
6
+ };
7
+ export type NormalizeOutputRecordIds = Args & {
8
+ model: string;
9
+ data: object | null;
10
+ };
11
+ export type NormalizeWhereValue = Args & {
12
+ model: string;
13
+ field: string;
14
+ value: unknown;
15
+ };
16
+ export type BuildExpression = Args & {
17
+ model: string;
18
+ where: Required<Where>[] | undefined;
19
+ };
20
+ export type BuildJoinPlan = Args & {
21
+ model: string;
22
+ join?: JoinConfig;
23
+ };
24
+ export type ApplyJoinMappings = Args & {
25
+ row: object | null;
26
+ mappings: Array<{
27
+ modelName: string;
28
+ sourceField: string;
29
+ }>;
30
+ };
31
+ export type SortBy = {
32
+ field: string;
33
+ direction: 'asc' | 'desc';
34
+ };
@@ -0,0 +1,8 @@
1
+ export type * from 'better-auth/client/plugins';
2
+ export type * from 'better-auth/minimal';
3
+ export type * from 'better-auth/plugins';
4
+ export type InferUserWithRoles<TInferredUser extends {
5
+ role?: string | null;
6
+ }, TRoles extends Record<string, unknown>> = Omit<TInferredUser, 'role'> & {
7
+ role: keyof TRoles;
8
+ };
@@ -0,0 +1 @@
1
+ export declare const useSessionUser: <TUser = unknown>() => TUser | undefined;
@@ -0,0 +1,8 @@
1
+ import { useRouteContext } from "@tanstack/react-router";
2
+ const useSessionUser = ()=>{
3
+ const { user } = useRouteContext({
4
+ from: '__root__'
5
+ });
6
+ return user;
7
+ };
8
+ export { useSessionUser };
@@ -0,0 +1,2 @@
1
+ export * from './useMutation';
2
+ export * from './useMutationWithInvalidate';
@@ -0,0 +1,2 @@
1
+ export * from "./useMutation.js";
2
+ export * from "./useMutationWithInvalidate.js";
package/dist/styles.css CHANGED
@@ -1,4 +1,4 @@
1
- .rolder-prompt-input-root {
1
+ .rolder-chat-input-root {
2
2
  background-color: light-dark(var(--mantine-color-white), var(--mantine-color-dark-6));
3
3
 
4
4
  &:focus-within {
@@ -8,13 +8,13 @@
8
8
  }
9
9
  }
10
10
 
11
- .rolder-prompt-input-textarea {
11
+ .rolder-chat-input-textarea {
12
12
  border: 0;
13
13
  border-radius: 8px;
14
14
  overflow: hidden;
15
15
  }
16
16
 
17
- .rolder-prompt-input-file-action-action {
17
+ .rolder-chat-input-file-action-action {
18
18
  color: light-dark(var(--mantine-color-gray-7), var(--mantine-color-dark-1));
19
19
 
20
20
  &[data-disabled] {
@@ -62,11 +62,6 @@
62
62
  border-radius: var(--radius);
63
63
  }
64
64
 
65
- .rolder-scroll-area-content {
66
- width: 100%;
67
- height: 100%;
68
- }
69
-
70
65
  .rolder-scroll-area-scrollbar {
71
66
  border-top-right-radius: var(--radius);
72
67
  border-bottom-right-radius: var(--radius);
@@ -0,0 +1,2 @@
1
+ export declare const surrealDeleteFn: import("@tanstack/react-start").RequiredFetcher<undefined, import("zod").ZodString, Promise<void>>;
2
+ export declare const surrealUnsubscribeFn: import("@tanstack/react-start").RequiredFetcher<undefined, import("zod").ZodString, Promise<void>>;