@tulip-systems/core 0.7.0 → 0.8.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 (367) hide show
  1. package/dist/auth/server.d.mts +3 -3
  2. package/dist/auth/server.mjs +3 -3
  3. package/dist/components/editor/components/editor.client.d.mts +4 -3
  4. package/dist/components/editor/components/editor.client.d.mts.map +1 -1
  5. package/dist/components/editor/components/editor.client.mjs +5 -2
  6. package/dist/components/editor/components/editor.client.mjs.map +1 -1
  7. package/dist/components/editor/extensions/file-handler/extension.d.mts +4 -4
  8. package/dist/components/editor/extensions/file-handler/extension.d.mts.map +1 -1
  9. package/dist/components/editor/extensions/file-handler/extension.mjs.map +1 -1
  10. package/dist/components/editor/extensions/file-handler/strategy.d.mts +4 -6
  11. package/dist/components/editor/extensions/file-handler/strategy.d.mts.map +1 -1
  12. package/dist/components/editor/extensions/file-handler/strategy.mjs +11 -11
  13. package/dist/components/editor/extensions/file-handler/strategy.mjs.map +1 -1
  14. package/dist/components/editor/extensions/file-handler/utils.mjs +1 -1
  15. package/dist/components/editor/extensions/file-handler/utils.mjs.map +1 -1
  16. package/dist/components/editor/extensions/image/extension.mjs +9 -9
  17. package/dist/components/editor/extensions/image/extension.mjs.map +1 -1
  18. package/dist/components/editor/lib/constants.d.mts +1 -1
  19. package/dist/components/editor/lib/constants.mjs +1 -1
  20. package/dist/components/editor/lib/extensions.d.mts +1 -1
  21. package/dist/components/editor/lib/helpers.d.mts +11 -3
  22. package/dist/components/editor/lib/helpers.d.mts.map +1 -1
  23. package/dist/components/editor/lib/helpers.mjs +27 -13
  24. package/dist/components/editor/lib/helpers.mjs.map +1 -1
  25. package/dist/components/ui/badge.d.mts +1 -1
  26. package/dist/components/ui/button-group.d.mts +1 -1
  27. package/dist/components/ui/button.d.mts +2 -2
  28. package/dist/components/ui/combobox-dropdown.client.mjs +1 -0
  29. package/dist/components/ui/combobox-dropdown.client.mjs.map +1 -1
  30. package/dist/components/ui/combobox.client.mjs +1 -1
  31. package/dist/components/ui/combobox.client.mjs.map +1 -1
  32. package/dist/components/ui/field.client.d.mts +1 -1
  33. package/dist/components/ui/item.d.mts +1 -1
  34. package/dist/components.d.mts +2 -2
  35. package/dist/components.mjs +2 -2
  36. package/dist/config/server.d.mts +1 -3
  37. package/dist/config/server.mjs +1 -4
  38. package/dist/config.d.mts +2 -2
  39. package/dist/config.mjs +1 -1
  40. package/dist/data-tables/client.d.mts +2 -1
  41. package/dist/data-tables/client.mjs +2 -1
  42. package/dist/data-tables.d.mts +1 -1
  43. package/dist/database/client.d.mts +1 -0
  44. package/dist/database/client.mjs +1 -0
  45. package/dist/database/server.d.mts +2 -0
  46. package/dist/database/server.mjs +3 -0
  47. package/dist/database.d.mts +3 -0
  48. package/dist/database.mjs +3 -0
  49. package/dist/emails/client.d.mts +1 -0
  50. package/dist/emails/client.mjs +1 -0
  51. package/dist/emails/server.d.mts +2 -0
  52. package/dist/emails/server.mjs +3 -0
  53. package/dist/emails.d.mts +1 -0
  54. package/dist/emails.mjs +1 -0
  55. package/dist/lib/utils/markdown.d.mts +10 -0
  56. package/dist/lib/utils/markdown.d.mts.map +1 -0
  57. package/dist/lib/utils/markdown.mjs +15 -0
  58. package/dist/lib/utils/markdown.mjs.map +1 -0
  59. package/dist/lib/utils/url.mjs +2 -1
  60. package/dist/lib/utils/url.mjs.map +1 -1
  61. package/dist/lib/utils/user-agent.mjs +15 -0
  62. package/dist/lib/utils/user-agent.mjs.map +1 -1
  63. package/dist/lib.d.mts +2 -2
  64. package/dist/lib.mjs +2 -2
  65. package/dist/modules/auth/components/create-first-user-guard.server.d.mts +16 -0
  66. package/dist/modules/auth/components/create-first-user-guard.server.d.mts.map +1 -0
  67. package/dist/modules/auth/components/create-first-user-guard.server.mjs +16 -0
  68. package/dist/modules/auth/components/create-first-user-guard.server.mjs.map +1 -0
  69. package/dist/modules/auth/components/guard.server.d.mts +2 -2
  70. package/dist/modules/auth/components/guard.server.mjs +1 -1
  71. package/dist/modules/auth/components/guard.server.mjs.map +1 -1
  72. package/dist/modules/auth/db/schema.d.mts +1 -1
  73. package/dist/modules/auth/db/schema.mjs +2 -2
  74. package/dist/modules/auth/handler/create-client.client.d.mts +4838 -229
  75. package/dist/modules/auth/handler/create-client.client.d.mts.map +1 -1
  76. package/dist/modules/auth/handler/create-client.client.mjs.map +1 -1
  77. package/dist/modules/auth/handler/proxy.server.mjs +2 -2
  78. package/dist/modules/auth/handler/proxy.server.mjs.map +1 -1
  79. package/dist/modules/auth/handler/route.server.d.mts +2 -2
  80. package/dist/modules/auth/handler/route.server.d.mts.map +1 -1
  81. package/dist/modules/auth/handler/route.server.mjs.map +1 -1
  82. package/dist/modules/auth/handler/{init.d.mts → service.server.d.mts} +322 -90
  83. package/dist/modules/auth/handler/service.server.d.mts.map +1 -0
  84. package/dist/modules/auth/handler/{init.mjs → service.server.mjs} +19 -8
  85. package/dist/modules/auth/handler/service.server.mjs.map +1 -0
  86. package/dist/modules/auth/hooks/use-session.d.mts +9 -4
  87. package/dist/modules/auth/hooks/use-session.d.mts.map +1 -1
  88. package/dist/modules/auth/lib/helpers.server.d.mts +1 -1
  89. package/dist/modules/auth/lib/permissions.d.mts +1 -1
  90. package/dist/modules/auth/lib/validators.mjs +1 -1
  91. package/dist/modules/config/lib/context.d.mts +9 -10
  92. package/dist/modules/config/lib/context.d.mts.map +1 -1
  93. package/dist/modules/config/lib/context.mjs.map +1 -1
  94. package/dist/modules/data-tables/lib/converters/search.d.mts +1 -1
  95. package/dist/modules/data-tables/lib/converters/sorting.d.mts +1 -1
  96. package/dist/modules/data-tables/server/get-data.server.d.mts +3 -3
  97. package/dist/modules/data-tables/server/get-data.server.mjs +1 -1
  98. package/dist/modules/data-tables/server/get-data.server.mjs.map +1 -1
  99. package/dist/modules/data-tables/strategies/infinite/strategy.d.mts +1 -1
  100. package/dist/modules/data-tables/strategies/infinite/strategy.mjs +3 -0
  101. package/dist/modules/data-tables/strategies/infinite/strategy.mjs.map +1 -1
  102. package/dist/modules/data-tables/tables/data-table/components/row.mjs +5 -15
  103. package/dist/modules/data-tables/tables/data-table/components/row.mjs.map +1 -1
  104. package/dist/modules/data-tables/tables/inline-table/components/body.mjs +1 -1
  105. package/dist/modules/data-tables/tables/inline-table/components/body.mjs.map +1 -1
  106. package/dist/modules/data-tables/tables/inline-table/components/row.client.mjs +13 -23
  107. package/dist/modules/data-tables/tables/inline-table/components/row.client.mjs.map +1 -1
  108. package/dist/modules/data-tables/tables/inline-table/components/table.d.mts +1 -0
  109. package/dist/modules/data-tables/tables/inline-table/components/table.d.mts.map +1 -1
  110. package/dist/modules/data-tables/tables/inline-table/components/table.mjs +2 -1
  111. package/dist/modules/data-tables/tables/inline-table/components/table.mjs.map +1 -1
  112. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts +5 -1
  113. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.d.mts.map +1 -1
  114. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.mjs +2 -1
  115. package/dist/modules/data-tables/tables/inline-table/hooks/context.client.mjs.map +1 -1
  116. package/dist/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.d.mts +30 -0
  117. package/dist/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.d.mts.map +1 -0
  118. package/dist/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.mjs +77 -9
  119. package/dist/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.mjs.map +1 -1
  120. package/dist/modules/{config/db → database/lib}/helpers.d.mts +2 -2
  121. package/dist/modules/database/lib/helpers.d.mts.map +1 -0
  122. package/dist/modules/{config/db → database/lib}/helpers.mjs +1 -1
  123. package/dist/modules/database/lib/helpers.mjs.map +1 -0
  124. package/dist/modules/database/lib/service.server.d.mts +34 -0
  125. package/dist/modules/database/lib/service.server.d.mts.map +1 -0
  126. package/dist/modules/database/lib/service.server.mjs +24 -0
  127. package/dist/modules/database/lib/service.server.mjs.map +1 -0
  128. package/dist/modules/{config/db → database/lib}/types.d.mts +1 -1
  129. package/dist/modules/database/lib/types.d.mts.map +1 -0
  130. package/dist/modules/emails/lib/service.server.d.mts +29 -0
  131. package/dist/modules/emails/lib/service.server.d.mts.map +1 -0
  132. package/dist/modules/emails/lib/service.server.mjs +21 -0
  133. package/dist/modules/emails/lib/service.server.mjs.map +1 -0
  134. package/dist/modules/inline-edit/components/date-input.client.mjs +1 -1
  135. package/dist/modules/inline-edit/components/date-input.client.mjs.map +1 -1
  136. package/dist/modules/inline-edit/components/date-picker.client.mjs +1 -0
  137. package/dist/modules/inline-edit/components/date-picker.client.mjs.map +1 -1
  138. package/dist/modules/inline-edit/components/date-time.client.mjs +1 -0
  139. package/dist/modules/inline-edit/components/date-time.client.mjs.map +1 -1
  140. package/dist/modules/inline-edit/components/editor.client.mjs +1 -0
  141. package/dist/modules/inline-edit/components/editor.client.mjs.map +1 -1
  142. package/dist/modules/inline-edit/components/input-recipient.client.mjs +1 -0
  143. package/dist/modules/inline-edit/components/input-recipient.client.mjs.map +1 -1
  144. package/dist/modules/inline-edit/components/input-toggle.client.mjs +1 -0
  145. package/dist/modules/inline-edit/components/input-toggle.client.mjs.map +1 -1
  146. package/dist/modules/inline-edit/components/input.client.d.mts.map +1 -1
  147. package/dist/modules/inline-edit/components/input.client.mjs +3 -0
  148. package/dist/modules/inline-edit/components/input.client.mjs.map +1 -1
  149. package/dist/modules/inline-edit/components/select.client.d.mts.map +1 -1
  150. package/dist/modules/inline-edit/components/select.client.mjs +1 -0
  151. package/dist/modules/inline-edit/components/select.client.mjs.map +1 -1
  152. package/dist/modules/inline-edit/components/switch.client.mjs +1 -0
  153. package/dist/modules/inline-edit/components/switch.client.mjs.map +1 -1
  154. package/dist/modules/inline-edit/components/toggle.client.mjs +1 -0
  155. package/dist/modules/inline-edit/components/toggle.client.mjs.map +1 -1
  156. package/dist/modules/inline-edit/lib/variants.d.mts +1 -1
  157. package/dist/modules/router/handler/context.server.d.mts +12 -10
  158. package/dist/modules/router/handler/context.server.d.mts.map +1 -1
  159. package/dist/modules/router/handler/init.server.d.mts +13 -11
  160. package/dist/modules/router/handler/init.server.d.mts.map +1 -1
  161. package/dist/modules/router/handler/init.server.mjs +2 -2
  162. package/dist/modules/router/handler/init.server.mjs.map +1 -1
  163. package/dist/modules/router/handler/route.server.d.mts +1 -1
  164. package/dist/modules/storage/components/dropzone.client.d.mts +2 -2
  165. package/dist/modules/storage/components/dropzone.client.d.mts.map +1 -1
  166. package/dist/modules/storage/components/dropzone.client.mjs.map +1 -1
  167. package/dist/modules/storage/components/image-grid.client.d.mts +3 -3
  168. package/dist/modules/storage/components/image-grid.client.d.mts.map +1 -1
  169. package/dist/modules/storage/components/image-grid.client.mjs +20 -22
  170. package/dist/modules/storage/components/image-grid.client.mjs.map +1 -1
  171. package/dist/modules/storage/components/image.client.d.mts +8 -0
  172. package/dist/modules/storage/components/image.client.d.mts.map +1 -0
  173. package/dist/modules/storage/components/image.client.mjs +17 -0
  174. package/dist/modules/storage/components/image.client.mjs.map +1 -0
  175. package/dist/modules/storage/components/upload-button.client.d.mts +12 -0
  176. package/dist/modules/storage/components/upload-button.client.d.mts.map +1 -0
  177. package/dist/modules/storage/components/upload-button.client.mjs +34 -0
  178. package/dist/modules/storage/components/upload-button.client.mjs.map +1 -0
  179. package/dist/modules/storage/components/upload-zone-context.client.d.mts +5 -5
  180. package/dist/modules/storage/components/upload-zone-context.client.d.mts.map +1 -1
  181. package/dist/modules/storage/components/upload-zone-context.client.mjs +2 -2
  182. package/dist/modules/storage/components/upload-zone-context.client.mjs.map +1 -1
  183. package/dist/modules/storage/components/upload-zone.client.d.mts +4 -4
  184. package/dist/modules/storage/components/upload-zone.client.d.mts.map +1 -1
  185. package/dist/modules/storage/components/upload-zone.client.mjs +16 -9
  186. package/dist/modules/storage/components/upload-zone.client.mjs.map +1 -1
  187. package/dist/modules/storage/lib/constants.d.mts +1 -5
  188. package/dist/modules/storage/lib/constants.d.mts.map +1 -1
  189. package/dist/modules/storage/lib/constants.mjs +1 -13
  190. package/dist/modules/storage/lib/constants.mjs.map +1 -1
  191. package/dist/modules/storage/lib/helpers.d.mts +14 -28
  192. package/dist/modules/storage/lib/helpers.d.mts.map +1 -1
  193. package/dist/modules/storage/lib/helpers.mjs +17 -75
  194. package/dist/modules/storage/lib/helpers.mjs.map +1 -1
  195. package/dist/modules/storage/lib/procedures.server.d.mts +1991 -0
  196. package/dist/modules/{auth/handler/init.d.mts.map → storage/lib/procedures.server.d.mts.map} +1 -1
  197. package/dist/modules/storage/lib/procedures.server.mjs +22 -0
  198. package/dist/modules/storage/lib/procedures.server.mjs.map +1 -0
  199. package/dist/modules/storage/lib/router-handlers.server.d.mts +41 -0
  200. package/dist/modules/storage/lib/router-handlers.server.d.mts.map +1 -0
  201. package/dist/modules/storage/lib/router-handlers.server.mjs +124 -0
  202. package/dist/modules/storage/lib/router-handlers.server.mjs.map +1 -0
  203. package/dist/modules/storage/lib/schema.d.mts +68 -958
  204. package/dist/modules/storage/lib/schema.d.mts.map +1 -1
  205. package/dist/modules/storage/lib/schema.mjs +28 -65
  206. package/dist/modules/storage/lib/schema.mjs.map +1 -1
  207. package/dist/modules/storage/lib/service.server.d.mts +2155 -141
  208. package/dist/modules/storage/lib/service.server.d.mts.map +1 -1
  209. package/dist/modules/storage/lib/service.server.mjs +453 -242
  210. package/dist/modules/storage/lib/service.server.mjs.map +1 -1
  211. package/dist/modules/storage/lib/upload.client.d.mts +58 -0
  212. package/dist/modules/storage/lib/upload.client.d.mts.map +1 -0
  213. package/dist/modules/storage/lib/upload.client.mjs +87 -0
  214. package/dist/modules/storage/lib/upload.client.mjs.map +1 -0
  215. package/dist/modules/storage/lib/validators.d.mts +297 -835
  216. package/dist/modules/storage/lib/validators.d.mts.map +1 -1
  217. package/dist/modules/storage/lib/validators.mjs +32 -76
  218. package/dist/modules/storage/lib/validators.mjs.map +1 -1
  219. package/dist/modules/storage/providers/adapters/s3.server.d.mts +19 -0
  220. package/dist/modules/storage/providers/adapters/s3.server.d.mts.map +1 -0
  221. package/dist/modules/storage/providers/adapters/s3.server.mjs +173 -0
  222. package/dist/modules/storage/providers/adapters/s3.server.mjs.map +1 -0
  223. package/dist/modules/storage/providers/lib/constants.d.mts +6 -0
  224. package/dist/modules/storage/providers/lib/constants.d.mts.map +1 -0
  225. package/dist/modules/storage/providers/lib/constants.mjs +6 -0
  226. package/dist/modules/storage/providers/lib/constants.mjs.map +1 -0
  227. package/dist/modules/storage/providers/lib/errors.d.mts +12 -0
  228. package/dist/modules/storage/providers/lib/errors.d.mts.map +1 -0
  229. package/dist/modules/storage/providers/lib/errors.mjs +13 -0
  230. package/dist/modules/storage/providers/lib/errors.mjs.map +1 -0
  231. package/dist/modules/storage/providers/lib/types.d.mts +21 -0
  232. package/dist/modules/storage/providers/lib/types.d.mts.map +1 -0
  233. package/dist/modules/storage/providers/lib/validators.d.mts +112 -0
  234. package/dist/modules/storage/providers/lib/validators.d.mts.map +1 -0
  235. package/dist/modules/storage/providers/lib/validators.mjs +75 -0
  236. package/dist/modules/storage/providers/lib/validators.mjs.map +1 -0
  237. package/dist/router/server.d.mts +1 -1
  238. package/dist/storage/client.d.mts +4 -2
  239. package/dist/storage/client.mjs +4 -2
  240. package/dist/storage/server.d.mts +5 -4
  241. package/dist/storage/server.mjs +5 -4
  242. package/dist/storage.d.mts +9 -6
  243. package/dist/storage.mjs +8 -6
  244. package/package.json +18 -5
  245. package/src/components/editor/components/editor.client.tsx +9 -1
  246. package/src/components/editor/extensions/file-handler/extension.ts +4 -4
  247. package/src/components/editor/extensions/file-handler/strategy.ts +15 -40
  248. package/src/components/editor/extensions/file-handler/utils.ts +1 -1
  249. package/src/components/editor/extensions/image/extension.ts +10 -10
  250. package/src/components/editor/lib/helpers.ts +28 -11
  251. package/src/components/ui/combobox-dropdown.client.tsx +1 -0
  252. package/src/components/ui/combobox.client.tsx +1 -1
  253. package/src/entry.ts +12 -51
  254. package/src/lib/entry.ts +1 -5
  255. package/src/lib/utils/markdown.ts +10 -0
  256. package/src/lib/utils/url.ts +2 -1
  257. package/src/lib/utils/user-agent.ts +15 -0
  258. package/src/modules/auth/components/{guard-first-user.server.tsx → create-first-user-guard.server.tsx} +8 -8
  259. package/src/modules/auth/components/guard.server.tsx +1 -1
  260. package/src/modules/auth/entry.server.ts +4 -5
  261. package/src/modules/auth/handler/create-client.client.ts +2 -2
  262. package/src/modules/auth/handler/proxy.server.ts +1 -1
  263. package/src/modules/auth/handler/route.server.ts +2 -2
  264. package/src/modules/auth/handler/{init.ts → service.server.ts} +30 -9
  265. package/src/modules/config/entry.server.ts +0 -9
  266. package/src/modules/config/entry.ts +2 -2
  267. package/src/modules/config/lib/context.ts +9 -9
  268. package/src/modules/data-tables/entry.client.ts +1 -0
  269. package/src/modules/data-tables/server/get-data.server.ts +1 -1
  270. package/src/modules/data-tables/strategies/infinite/strategy.ts +4 -1
  271. package/src/modules/data-tables/tables/data-table/components/row.tsx +12 -21
  272. package/src/modules/data-tables/tables/inline-table/components/body.tsx +1 -1
  273. package/src/modules/data-tables/tables/inline-table/components/row.client.tsx +24 -30
  274. package/src/modules/data-tables/tables/inline-table/components/table.tsx +6 -1
  275. package/src/modules/data-tables/tables/inline-table/hooks/context.client.tsx +5 -0
  276. package/src/modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.ts +119 -91
  277. package/src/modules/database/entry.client.ts +0 -0
  278. package/src/modules/database/entry.server.ts +4 -0
  279. package/src/modules/database/entry.ts +5 -0
  280. package/src/modules/database/lib/service.server.ts +33 -0
  281. package/src/modules/emails/entry.client.ts +0 -0
  282. package/src/modules/emails/entry.server.ts +4 -0
  283. package/src/modules/emails/entry.ts +0 -0
  284. package/src/modules/emails/lib/service.server.ts +29 -0
  285. package/src/modules/inline-edit/components/date-input.client.tsx +1 -1
  286. package/src/modules/inline-edit/components/date-picker.client.tsx +1 -0
  287. package/src/modules/inline-edit/components/date-time.client.tsx +1 -0
  288. package/src/modules/inline-edit/components/editor.client.tsx +3 -0
  289. package/src/modules/inline-edit/components/input-recipient.client.tsx +1 -0
  290. package/src/modules/inline-edit/components/input-toggle.client.tsx +1 -0
  291. package/src/modules/inline-edit/components/input.client.tsx +3 -0
  292. package/src/modules/inline-edit/components/select.client.tsx +5 -1
  293. package/src/modules/inline-edit/components/switch.client.tsx +1 -0
  294. package/src/modules/inline-edit/components/toggle.client.tsx +1 -0
  295. package/src/modules/router/handler/init.server.ts +2 -2
  296. package/src/modules/storage/components/dropzone.client.tsx +1 -1
  297. package/src/modules/storage/components/image-grid.client.tsx +23 -20
  298. package/src/modules/storage/components/image.client.tsx +8 -0
  299. package/src/modules/storage/components/upload-zone-context.client.tsx +11 -8
  300. package/src/modules/storage/components/upload-zone.client.tsx +22 -16
  301. package/src/modules/storage/entry.client.ts +3 -1
  302. package/src/modules/storage/entry.server.ts +9 -3
  303. package/src/modules/storage/entry.ts +13 -1
  304. package/src/modules/storage/lib/constants.ts +0 -11
  305. package/src/modules/storage/lib/helpers.ts +18 -65
  306. package/src/modules/storage/lib/procedures.server.ts +60 -0
  307. package/src/modules/storage/lib/router-handlers.server.ts +178 -0
  308. package/src/modules/storage/lib/schema.ts +26 -97
  309. package/src/modules/storage/lib/service.server.ts +636 -374
  310. package/src/modules/storage/lib/upload.client.ts +156 -0
  311. package/src/modules/storage/lib/validators.ts +50 -111
  312. package/src/modules/storage/providers/adapters/s3.server.ts +281 -0
  313. package/src/modules/storage/providers/lib/constants.ts +3 -0
  314. package/src/modules/storage/providers/lib/errors.ts +21 -0
  315. package/src/modules/storage/providers/lib/types.ts +28 -0
  316. package/src/modules/storage/providers/lib/validators.ts +122 -0
  317. package/dist/lib/config/constants.d.mts +0 -5
  318. package/dist/lib/config/constants.d.mts.map +0 -1
  319. package/dist/lib/config/constants.mjs +0 -6
  320. package/dist/lib/config/constants.mjs.map +0 -1
  321. package/dist/modules/auth/components/guard-first-user.server.d.mts +0 -18
  322. package/dist/modules/auth/components/guard-first-user.server.d.mts.map +0 -1
  323. package/dist/modules/auth/components/guard-first-user.server.mjs +0 -16
  324. package/dist/modules/auth/components/guard-first-user.server.mjs.map +0 -1
  325. package/dist/modules/auth/handler/init.mjs.map +0 -1
  326. package/dist/modules/config/db/helpers.d.mts.map +0 -1
  327. package/dist/modules/config/db/helpers.mjs.map +0 -1
  328. package/dist/modules/config/db/init.d.mts +0 -20
  329. package/dist/modules/config/db/init.d.mts.map +0 -1
  330. package/dist/modules/config/db/init.mjs +0 -15
  331. package/dist/modules/config/db/init.mjs.map +0 -1
  332. package/dist/modules/config/db/types.d.mts.map +0 -1
  333. package/dist/modules/config/providers/email.d.mts +0 -12
  334. package/dist/modules/config/providers/email.d.mts.map +0 -1
  335. package/dist/modules/config/providers/email.mjs +0 -11
  336. package/dist/modules/config/providers/email.mjs.map +0 -1
  337. package/dist/modules/storage/config/filters.d.mts +0 -17
  338. package/dist/modules/storage/config/filters.d.mts.map +0 -1
  339. package/dist/modules/storage/config/filters.mjs +0 -17
  340. package/dist/modules/storage/config/filters.mjs.map +0 -1
  341. package/dist/modules/storage/lib/create-client.server.d.mts +0 -11
  342. package/dist/modules/storage/lib/create-client.server.d.mts.map +0 -1
  343. package/dist/modules/storage/lib/create-client.server.mjs +0 -11
  344. package/dist/modules/storage/lib/create-client.server.mjs.map +0 -1
  345. package/dist/modules/storage/lib/create-upload.client.d.mts +0 -56
  346. package/dist/modules/storage/lib/create-upload.client.d.mts.map +0 -1
  347. package/dist/modules/storage/lib/create-upload.client.mjs +0 -98
  348. package/dist/modules/storage/lib/create-upload.client.mjs.map +0 -1
  349. package/dist/modules/storage/lib/proxy.server.d.mts +0 -21
  350. package/dist/modules/storage/lib/proxy.server.d.mts.map +0 -1
  351. package/dist/modules/storage/lib/proxy.server.mjs +0 -46
  352. package/dist/modules/storage/lib/proxy.server.mjs.map +0 -1
  353. package/dist/modules/storage/lib/router.server.d.mts +0 -31002
  354. package/dist/modules/storage/lib/router.server.d.mts.map +0 -1
  355. package/dist/modules/storage/lib/router.server.mjs +0 -86
  356. package/dist/modules/storage/lib/router.server.mjs.map +0 -1
  357. package/src/lib/config/constants.ts +0 -1
  358. package/src/lib/utils/time-picker.ts +0 -139
  359. package/src/modules/config/db/init.ts +0 -21
  360. package/src/modules/config/providers/email.ts +0 -13
  361. package/src/modules/storage/config/filters.ts +0 -12
  362. package/src/modules/storage/lib/create-client.server.ts +0 -14
  363. package/src/modules/storage/lib/create-upload.client.ts +0 -134
  364. package/src/modules/storage/lib/proxy.server.ts +0 -63
  365. package/src/modules/storage/lib/router.server.ts +0 -182
  366. /package/src/modules/{config/db → database/lib}/helpers.ts +0 -0
  367. /package/src/modules/{config/db → database/lib}/types.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"combobox-dropdown.client.mjs","names":["React","Command"],"sources":["../../../src/components/ui/combobox-dropdown.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { CommandList } from \"cmdk\";\nimport { ChevronsUpDown } from \"lucide-react\";\nimport * as React from \"react\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { Button } from \"./button\";\nimport { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem } from \"./command.client\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"./popover.client\";\n\nexport type ComboboxDropdownItem = {\n id: string;\n value: string;\n label?: React.ReactNode;\n disabled?: boolean;\n};\n\nexport type ComboboxDropdownProps<T> = {\n placeholder?: React.ReactNode;\n searchPlaceholder?: string;\n items: T[];\n onSelect: (item: T) => void;\n selectedItem?: T;\n renderSelectedItem?: (selectedItem: T) => React.ReactNode;\n renderOnCreate?: (value: string) => React.ReactNode;\n renderListItem?: (listItem: { isChecked: boolean; item: T }) => React.ReactNode;\n emptyResults?: React.ReactNode;\n popoverProps?: React.ComponentProps<typeof PopoverContent>;\n disabled?: boolean;\n onCreate?: (value: string) => void;\n className?: string;\n};\n\nexport function ComboboxDropdown<T extends ComboboxDropdownItem>({\n placeholder,\n searchPlaceholder,\n items,\n onSelect,\n selectedItem: incomingSelectedItem,\n renderSelectedItem,\n renderOnCreate,\n emptyResults,\n popoverProps,\n disabled,\n onCreate,\n className,\n}: ComboboxDropdownProps<T>) {\n const [open, setOpen] = React.useState(false);\n const [internalSelectedItem, setInternalSelectedItem] = React.useState<T | undefined>();\n const [inputValue, setInputValue] = React.useState(\"\");\n\n const selectedItem = incomingSelectedItem ?? internalSelectedItem;\n\n const filteredItems = items.filter((item) =>\n item.value.toLowerCase().includes(inputValue.toLowerCase()),\n );\n\n const showCreate =\n onCreate &&\n inputValue &&\n !items?.find((o) => o.value.toLowerCase() === inputValue.toLowerCase());\n\n return (\n <Popover open={open} onOpenChange={setOpen} modal={true}>\n <PopoverTrigger asChild disabled={disabled}>\n <Button\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n className={cn(\"w-full justify-between\", className)}\n >\n {selectedItem ? (\n <div className=\"flex items-center\">\n {renderSelectedItem?.(selectedItem) ?? selectedItem.label ?? selectedItem.value}\n </div>\n ) : (\n (placeholder ?? \"Select item...\")\n )}\n <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </Button>\n </PopoverTrigger>\n\n <PopoverContent\n className=\"p-0\"\n {...popoverProps}\n style={{\n width: \"var(--radix-popover-trigger-width)\",\n ...popoverProps?.style,\n }}\n >\n <Command loop shouldFilter={false}>\n <CommandInput\n value={inputValue}\n onValueChange={setInputValue}\n placeholder={searchPlaceholder ?? \"Search item...\"}\n className=\"px-3\"\n />\n\n <CommandEmpty>{emptyResults ?? \"Geen resultaat gevonden\"}</CommandEmpty>\n <CommandGroup>\n <CommandList className=\"max-h-56.25 overflow-auto\">\n {filteredItems.map((item) => {\n const isChecked = selectedItem?.id === item.id;\n\n return (\n <CommandItem\n disabled={item.disabled}\n className={cn(\n \"cursor-pointer\",\n isChecked && \"bg-primary text-primary-foreground\",\n )}\n key={item.id}\n value={item.id}\n onSelect={(id) => {\n const foundItem = items.find((item) => item.id === id);\n\n if (!foundItem) {\n return;\n }\n\n onSelect(foundItem);\n setInternalSelectedItem(foundItem);\n setOpen(false);\n }}\n >\n {item.label ?? item.value}\n </CommandItem>\n );\n })}\n\n {showCreate && (\n <CommandItem\n key={inputValue}\n value={inputValue}\n onSelect={() => {\n onCreate(inputValue);\n setOpen(false);\n setInputValue(\"\");\n }}\n onMouseDown={(event) => {\n event.preventDefault();\n event.stopPropagation();\n }}\n >\n {renderOnCreate ? renderOnCreate(inputValue) : null}\n </CommandItem>\n )}\n </CommandList>\n </CommandGroup>\n </Command>\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAiCA,SAAgB,iBAAiD,EAC/D,aACA,mBACA,OACA,UACA,cAAc,sBACd,oBACA,gBACA,cACA,cACA,UACA,UACA,aAC2B;CAC3B,MAAM,CAAC,MAAM,WAAWA,QAAM,SAAS,MAAM;CAC7C,MAAM,CAAC,sBAAsB,2BAA2BA,QAAM,UAAyB;CACvF,MAAM,CAAC,YAAY,iBAAiBA,QAAM,SAAS,GAAG;CAEtD,MAAM,eAAe,wBAAwB;CAE7C,MAAM,gBAAgB,MAAM,QAAQ,SAClC,KAAK,MAAM,aAAa,CAAC,SAAS,WAAW,aAAa,CAAC,CAC5D;CAED,MAAM,aACJ,YACA,cACA,CAAC,OAAO,MAAM,MAAM,EAAE,MAAM,aAAa,KAAK,WAAW,aAAa,CAAC;AAEzE,QACE,qBAAC;EAAc;EAAM,cAAc;EAAS,OAAO;aACjD,oBAAC;GAAe;GAAkB;aAChC,qBAAC;IACC,SAAQ;IACR,MAAK;IACL,iBAAe;IACf,WAAW,GAAG,0BAA0B,UAAU;eAEjD,eACC,oBAAC;KAAI,WAAU;eACZ,qBAAqB,aAAa,IAAI,aAAa,SAAS,aAAa;MACtE,GAEL,eAAe,kBAElB,oBAAC,kBAAe,WAAU,qCAAqC;KACxD;IACM,EAEjB,oBAAC;GACC,WAAU;GACV,GAAI;GACJ,OAAO;IACL,OAAO;IACP,GAAG,cAAc;IAClB;aAED,qBAACC;IAAQ;IAAK,cAAc;;KAC1B,oBAAC;MACC,OAAO;MACP,eAAe;MACf,aAAa,qBAAqB;MAClC,WAAU;OACV;KAEF,oBAAC,0BAAc,gBAAgB,4BAAyC;KACxE,oBAAC,0BACC,qBAAC;MAAY,WAAU;iBACpB,cAAc,KAAK,SAAS;OAC3B,MAAM,YAAY,cAAc,OAAO,KAAK;AAE5C,cACE,oBAAC;QACC,UAAU,KAAK;QACf,WAAW,GACT,kBACA,aAAa,qCACd;QAED,OAAO,KAAK;QACZ,WAAW,OAAO;SAChB,MAAM,YAAY,MAAM,MAAM,SAAS,KAAK,OAAO,GAAG;AAEtD,aAAI,CAAC,UACH;AAGF,kBAAS,UAAU;AACnB,iCAAwB,UAAU;AAClC,iBAAQ,MAAM;;kBAGf,KAAK,SAAS,KAAK;UAdf,KAAK,GAeE;QAEhB,EAED,cACC,oBAAC;OAEC,OAAO;OACP,gBAAgB;AACd,iBAAS,WAAW;AACpB,gBAAQ,MAAM;AACd,sBAAc,GAAG;;OAEnB,cAAc,UAAU;AACtB,cAAM,gBAAgB;AACtB,cAAM,iBAAiB;;iBAGxB,iBAAiB,eAAe,WAAW,GAAG;SAZ1C,WAaO;OAEJ,GACD;;KACP;IACK;GACT"}
1
+ {"version":3,"file":"combobox-dropdown.client.mjs","names":["React","Command"],"sources":["../../../src/components/ui/combobox-dropdown.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { CommandList } from \"cmdk\";\nimport { ChevronsUpDown } from \"lucide-react\";\nimport * as React from \"react\";\nimport { cn } from \"@/lib/utils/cn\";\nimport { Button } from \"./button\";\nimport { Command, CommandEmpty, CommandGroup, CommandInput, CommandItem } from \"./command.client\";\nimport { Popover, PopoverContent, PopoverTrigger } from \"./popover.client\";\n\nexport type ComboboxDropdownItem = {\n id: string;\n value: string;\n label?: React.ReactNode;\n disabled?: boolean;\n};\n\nexport type ComboboxDropdownProps<T> = {\n placeholder?: React.ReactNode;\n searchPlaceholder?: string;\n items: T[];\n onSelect: (item: T) => void;\n selectedItem?: T;\n renderSelectedItem?: (selectedItem: T) => React.ReactNode;\n renderOnCreate?: (value: string) => React.ReactNode;\n renderListItem?: (listItem: { isChecked: boolean; item: T }) => React.ReactNode;\n emptyResults?: React.ReactNode;\n popoverProps?: React.ComponentProps<typeof PopoverContent>;\n disabled?: boolean;\n onCreate?: (value: string) => void;\n className?: string;\n};\n\nexport function ComboboxDropdown<T extends ComboboxDropdownItem>({\n placeholder,\n searchPlaceholder,\n items,\n onSelect,\n selectedItem: incomingSelectedItem,\n renderSelectedItem,\n renderOnCreate,\n emptyResults,\n popoverProps,\n disabled,\n onCreate,\n className,\n}: ComboboxDropdownProps<T>) {\n const [open, setOpen] = React.useState(false);\n const [internalSelectedItem, setInternalSelectedItem] = React.useState<T | undefined>();\n const [inputValue, setInputValue] = React.useState(\"\");\n\n const selectedItem = incomingSelectedItem ?? internalSelectedItem;\n\n const filteredItems = items.filter((item) =>\n item.value.toLowerCase().includes(inputValue.toLowerCase()),\n );\n\n const showCreate =\n onCreate &&\n inputValue &&\n !items?.find((o) => o.value.toLowerCase() === inputValue.toLowerCase());\n\n return (\n <Popover open={open} onOpenChange={setOpen} modal={true}>\n <PopoverTrigger asChild disabled={disabled}>\n <Button\n data-inline-input=\"combobox-dropdown\"\n variant=\"outline\"\n role=\"combobox\"\n aria-expanded={open}\n className={cn(\"w-full justify-between\", className)}\n >\n {selectedItem ? (\n <div className=\"flex items-center\">\n {renderSelectedItem?.(selectedItem) ?? selectedItem.label ?? selectedItem.value}\n </div>\n ) : (\n (placeholder ?? \"Select item...\")\n )}\n <ChevronsUpDown className=\"ml-2 h-4 w-4 shrink-0 opacity-50\" />\n </Button>\n </PopoverTrigger>\n\n <PopoverContent\n className=\"p-0\"\n {...popoverProps}\n style={{\n width: \"var(--radix-popover-trigger-width)\",\n ...popoverProps?.style,\n }}\n >\n <Command loop shouldFilter={false}>\n <CommandInput\n value={inputValue}\n onValueChange={setInputValue}\n placeholder={searchPlaceholder ?? \"Search item...\"}\n className=\"px-3\"\n />\n\n <CommandEmpty>{emptyResults ?? \"Geen resultaat gevonden\"}</CommandEmpty>\n <CommandGroup>\n <CommandList className=\"max-h-56.25 overflow-auto\">\n {filteredItems.map((item) => {\n const isChecked = selectedItem?.id === item.id;\n\n return (\n <CommandItem\n disabled={item.disabled}\n className={cn(\n \"cursor-pointer\",\n isChecked && \"bg-primary text-primary-foreground\",\n )}\n key={item.id}\n value={item.id}\n onSelect={(id) => {\n const foundItem = items.find((item) => item.id === id);\n\n if (!foundItem) {\n return;\n }\n\n onSelect(foundItem);\n setInternalSelectedItem(foundItem);\n setOpen(false);\n }}\n >\n {item.label ?? item.value}\n </CommandItem>\n );\n })}\n\n {showCreate && (\n <CommandItem\n key={inputValue}\n value={inputValue}\n onSelect={() => {\n onCreate(inputValue);\n setOpen(false);\n setInputValue(\"\");\n }}\n onMouseDown={(event) => {\n event.preventDefault();\n event.stopPropagation();\n }}\n >\n {renderOnCreate ? renderOnCreate(inputValue) : null}\n </CommandItem>\n )}\n </CommandList>\n </CommandGroup>\n </Command>\n </PopoverContent>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;;;;;;AAiCA,SAAgB,iBAAiD,EAC/D,aACA,mBACA,OACA,UACA,cAAc,sBACd,oBACA,gBACA,cACA,cACA,UACA,UACA,aAC2B;CAC3B,MAAM,CAAC,MAAM,WAAWA,QAAM,SAAS,MAAM;CAC7C,MAAM,CAAC,sBAAsB,2BAA2BA,QAAM,UAAyB;CACvF,MAAM,CAAC,YAAY,iBAAiBA,QAAM,SAAS,GAAG;CAEtD,MAAM,eAAe,wBAAwB;CAE7C,MAAM,gBAAgB,MAAM,QAAQ,SAClC,KAAK,MAAM,aAAa,CAAC,SAAS,WAAW,aAAa,CAAC,CAC5D;CAED,MAAM,aACJ,YACA,cACA,CAAC,OAAO,MAAM,MAAM,EAAE,MAAM,aAAa,KAAK,WAAW,aAAa,CAAC;AAEzE,QACE,qBAAC;EAAc;EAAM,cAAc;EAAS,OAAO;aACjD,oBAAC;GAAe;GAAkB;aAChC,qBAAC;IACC,qBAAkB;IAClB,SAAQ;IACR,MAAK;IACL,iBAAe;IACf,WAAW,GAAG,0BAA0B,UAAU;eAEjD,eACC,oBAAC;KAAI,WAAU;eACZ,qBAAqB,aAAa,IAAI,aAAa,SAAS,aAAa;MACtE,GAEL,eAAe,kBAElB,oBAAC,kBAAe,WAAU,qCAAqC;KACxD;IACM,EAEjB,oBAAC;GACC,WAAU;GACV,GAAI;GACJ,OAAO;IACL,OAAO;IACP,GAAG,cAAc;IAClB;aAED,qBAACC;IAAQ;IAAK,cAAc;;KAC1B,oBAAC;MACC,OAAO;MACP,eAAe;MACf,aAAa,qBAAqB;MAClC,WAAU;OACV;KAEF,oBAAC,0BAAc,gBAAgB,4BAAyC;KACxE,oBAAC,0BACC,qBAAC;MAAY,WAAU;iBACpB,cAAc,KAAK,SAAS;OAC3B,MAAM,YAAY,cAAc,OAAO,KAAK;AAE5C,cACE,oBAAC;QACC,UAAU,KAAK;QACf,WAAW,GACT,kBACA,aAAa,qCACd;QAED,OAAO,KAAK;QACZ,WAAW,OAAO;SAChB,MAAM,YAAY,MAAM,MAAM,SAAS,KAAK,OAAO,GAAG;AAEtD,aAAI,CAAC,UACH;AAGF,kBAAS,UAAU;AACnB,iCAAwB,UAAU;AAClC,iBAAQ,MAAM;;kBAGf,KAAK,SAAS,KAAK;UAdf,KAAK,GAeE;QAEhB,EAED,cACC,oBAAC;OAEC,OAAO;OACP,gBAAgB;AACd,iBAAS,WAAW;AACpB,gBAAQ,MAAM;AACd,sBAAc,GAAG;;OAEnB,cAAc,UAAU;AACtB,cAAM,gBAAgB;AACtB,cAAM,iBAAiB;;iBAGxB,iBAAiB,eAAe,WAAW,GAAG;SAZ1C,WAaO;OAEJ,GACD;;KACP;IACK;GACT"}
@@ -20,7 +20,7 @@ function Combobox({ value, onSelect, onBlur, options, placeholder, disabled, emp
20
20
  /* @__PURE__ */ jsx(PopoverAnchor, {
21
21
  asChild: true,
22
22
  children: /* @__PURE__ */ jsx(Command.Input, {
23
- "data-input": true,
23
+ "data-inline-input": "combobox",
24
24
  value: value?.toString() ?? "",
25
25
  placeholder,
26
26
  disabled,
@@ -1 +1 @@
1
- {"version":3,"file":"combobox.client.mjs","names":["Command","CommandPrimitive","CommandList"],"sources":["../../../src/components/ui/combobox.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { useState } from \"react\";\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandList,\n} from \"@/components/ui/command.client\";\nimport { Popover, PopoverAnchor, PopoverContent } from \"@/components/ui/popover.client\";\nimport { cn } from \"@/lib/entry\";\n\nexport type ComboboxItem = {\n id: string;\n label: string;\n disabled?: boolean;\n};\n\nexport type ComboboxProps<TValue> = {\n value: TValue;\n onSelect?: (id: TValue) => void;\n onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;\n options: ComboboxItem[];\n emptyMessage?: string;\n placeholder?: string;\n disabled?: boolean;\n className?: string;\n};\n\nexport function Combobox<TValue>({\n value,\n onSelect,\n onBlur,\n options,\n placeholder,\n disabled,\n emptyMessage = \"Geen items gevonden\",\n className,\n}: ComboboxProps<TValue>) {\n const [open, setOpen] = useState(false);\n\n const selected = options.find((option) => option.id === value);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <Command className=\"overflow-auto bg-transparent text-foreground\">\n <PopoverAnchor asChild>\n <CommandPrimitive.Input\n data-input\n value={value?.toString() ?? \"\"}\n placeholder={placeholder}\n disabled={disabled}\n onValueChange={(value) => onSelect?.(value as TValue)}\n onKeyDown={(e) => setOpen(e.key !== \"Escape\")}\n onMouseDown={() => setOpen((open) => !!value || !open)}\n onBlur={(e) => {\n setOpen(false);\n onBlur?.(e);\n }}\n onFocus={() => setOpen(true)}\n className={cn(\n \"flex h-8 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50\",\n \"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\",\n className,\n )}\n />\n </PopoverAnchor>\n\n {!open && <CommandList aria-hidden=\"true\" className=\"hidden\" />}\n\n <PopoverContent\n asChild\n onOpenAutoFocus={(e) => e.preventDefault()}\n onInteractOutside={(e) => {\n if (e.target instanceof Element && e.target.hasAttribute(\"cmdk-input\")) {\n e.preventDefault();\n }\n }}\n className=\"w-[var(--radix-popover-trigger-width)] p-0\"\n >\n <CommandList>\n {options.length > 0 && (\n <CommandGroup>\n {options.map((option) => (\n <CommandItem\n key={option.id}\n value={option.id}\n onMouseDown={(e) => e.preventDefault()}\n className={cn(selected?.id === option.id && \"font-bold\")}\n onSelect={(id) => {\n onSelect?.(id as TValue);\n setOpen(false);\n }}\n >\n {option.label}\n </CommandItem>\n ))}\n </CommandGroup>\n )}\n\n <CommandEmpty>{emptyMessage}</CommandEmpty>\n </CommandList>\n </PopoverContent>\n </Command>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;;;;AA+BA,SAAgB,SAAiB,EAC/B,OACA,UACA,QACA,SACA,aACA,UACA,eAAe,uBACf,aACwB;CACxB,MAAM,CAAC,MAAM,WAAW,SAAS,MAAM;CAEvC,MAAM,WAAW,QAAQ,MAAM,WAAW,OAAO,OAAO,MAAM;AAE9D,QACE,oBAAC;EAAc;EAAM,cAAc;YACjC,qBAACA;GAAQ,WAAU;;IACjB,oBAAC;KAAc;eACb,oBAACC,QAAiB;MAChB;MACA,OAAO,OAAO,UAAU,IAAI;MACf;MACH;MACV,gBAAgB,UAAU,WAAW,MAAgB;MACrD,YAAY,MAAM,QAAQ,EAAE,QAAQ,SAAS;MAC7C,mBAAmB,SAAS,SAAS,CAAC,CAAC,SAAS,CAAC,KAAK;MACtD,SAAS,MAAM;AACb,eAAQ,MAAM;AACd,gBAAS,EAAE;;MAEb,eAAe,QAAQ,KAAK;MAC5B,WAAW,GACT,kbACA,iFACA,0GACA,UACD;OACD;MACY;IAEf,CAAC,QAAQ,oBAACC;KAAY,eAAY;KAAO,WAAU;MAAW;IAE/D,oBAAC;KACC;KACA,kBAAkB,MAAM,EAAE,gBAAgB;KAC1C,oBAAoB,MAAM;AACxB,UAAI,EAAE,kBAAkB,WAAW,EAAE,OAAO,aAAa,aAAa,CACpE,GAAE,gBAAgB;;KAGtB,WAAU;eAEV,qBAACA,4BACE,QAAQ,SAAS,KAChB,oBAAC,0BACE,QAAQ,KAAK,WACZ,oBAAC;MAEC,OAAO,OAAO;MACd,cAAc,MAAM,EAAE,gBAAgB;MACtC,WAAW,GAAG,UAAU,OAAO,OAAO,MAAM,YAAY;MACxD,WAAW,OAAO;AAChB,kBAAW,GAAa;AACxB,eAAQ,MAAM;;gBAGf,OAAO;QATH,OAAO,GAUA,CACd,GACW,EAGjB,oBAAC,0BAAc,eAA4B,IAC/B;MACC;;IACT;GACF"}
1
+ {"version":3,"file":"combobox.client.mjs","names":["Command","CommandPrimitive","CommandList"],"sources":["../../../src/components/ui/combobox.client.tsx"],"sourcesContent":["\"use client\";\n\nimport { Command as CommandPrimitive } from \"cmdk\";\nimport { useState } from \"react\";\nimport {\n Command,\n CommandEmpty,\n CommandGroup,\n CommandItem,\n CommandList,\n} from \"@/components/ui/command.client\";\nimport { Popover, PopoverAnchor, PopoverContent } from \"@/components/ui/popover.client\";\nimport { cn } from \"@/lib/entry\";\n\nexport type ComboboxItem = {\n id: string;\n label: string;\n disabled?: boolean;\n};\n\nexport type ComboboxProps<TValue> = {\n value: TValue;\n onSelect?: (id: TValue) => void;\n onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void;\n options: ComboboxItem[];\n emptyMessage?: string;\n placeholder?: string;\n disabled?: boolean;\n className?: string;\n};\n\nexport function Combobox<TValue>({\n value,\n onSelect,\n onBlur,\n options,\n placeholder,\n disabled,\n emptyMessage = \"Geen items gevonden\",\n className,\n}: ComboboxProps<TValue>) {\n const [open, setOpen] = useState(false);\n\n const selected = options.find((option) => option.id === value);\n\n return (\n <Popover open={open} onOpenChange={setOpen}>\n <Command className=\"overflow-auto bg-transparent text-foreground\">\n <PopoverAnchor asChild>\n <CommandPrimitive.Input\n data-inline-input=\"combobox\"\n value={value?.toString() ?? \"\"}\n placeholder={placeholder}\n disabled={disabled}\n onValueChange={(value) => onSelect?.(value as TValue)}\n onKeyDown={(e) => setOpen(e.key !== \"Escape\")}\n onMouseDown={() => setOpen((open) => !!value || !open)}\n onBlur={(e) => {\n setOpen(false);\n onBlur?.(e);\n }}\n onFocus={() => setOpen(true)}\n className={cn(\n \"flex h-8 w-full min-w-0 rounded-md border border-input bg-transparent px-3 py-1 text-base shadow-xs outline-none transition-[color,box-shadow] selection:bg-primary selection:text-primary-foreground file:inline-flex file:h-7 file:border-0 file:bg-transparent file:font-medium file:text-foreground file:text-sm placeholder:text-muted-foreground disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50\",\n \"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40\",\n className,\n )}\n />\n </PopoverAnchor>\n\n {!open && <CommandList aria-hidden=\"true\" className=\"hidden\" />}\n\n <PopoverContent\n asChild\n onOpenAutoFocus={(e) => e.preventDefault()}\n onInteractOutside={(e) => {\n if (e.target instanceof Element && e.target.hasAttribute(\"cmdk-input\")) {\n e.preventDefault();\n }\n }}\n className=\"w-[var(--radix-popover-trigger-width)] p-0\"\n >\n <CommandList>\n {options.length > 0 && (\n <CommandGroup>\n {options.map((option) => (\n <CommandItem\n key={option.id}\n value={option.id}\n onMouseDown={(e) => e.preventDefault()}\n className={cn(selected?.id === option.id && \"font-bold\")}\n onSelect={(id) => {\n onSelect?.(id as TValue);\n setOpen(false);\n }}\n >\n {option.label}\n </CommandItem>\n ))}\n </CommandGroup>\n )}\n\n <CommandEmpty>{emptyMessage}</CommandEmpty>\n </CommandList>\n </PopoverContent>\n </Command>\n </Popover>\n );\n}\n"],"mappings":";;;;;;;;;;AA+BA,SAAgB,SAAiB,EAC/B,OACA,UACA,QACA,SACA,aACA,UACA,eAAe,uBACf,aACwB;CACxB,MAAM,CAAC,MAAM,WAAW,SAAS,MAAM;CAEvC,MAAM,WAAW,QAAQ,MAAM,WAAW,OAAO,OAAO,MAAM;AAE9D,QACE,oBAAC;EAAc;EAAM,cAAc;YACjC,qBAACA;GAAQ,WAAU;;IACjB,oBAAC;KAAc;eACb,oBAACC,QAAiB;MAChB,qBAAkB;MAClB,OAAO,OAAO,UAAU,IAAI;MACf;MACH;MACV,gBAAgB,UAAU,WAAW,MAAgB;MACrD,YAAY,MAAM,QAAQ,EAAE,QAAQ,SAAS;MAC7C,mBAAmB,SAAS,SAAS,CAAC,CAAC,SAAS,CAAC,KAAK;MACtD,SAAS,MAAM;AACb,eAAQ,MAAM;AACd,gBAAS,EAAE;;MAEb,eAAe,QAAQ,KAAK;MAC5B,WAAW,GACT,kbACA,iFACA,0GACA,UACD;OACD;MACY;IAEf,CAAC,QAAQ,oBAACC;KAAY,eAAY;KAAO,WAAU;MAAW;IAE/D,oBAAC;KACC;KACA,kBAAkB,MAAM,EAAE,gBAAgB;KAC1C,oBAAoB,MAAM;AACxB,UAAI,EAAE,kBAAkB,WAAW,EAAE,OAAO,aAAa,aAAa,CACpE,GAAE,gBAAgB;;KAGtB,WAAU;eAEV,qBAACA,4BACE,QAAQ,SAAS,KAChB,oBAAC,0BACE,QAAQ,KAAK,WACZ,oBAAC;MAEC,OAAO,OAAO;MACd,cAAc,MAAM,EAAE,gBAAgB;MACtC,WAAW,GAAG,UAAU,OAAO,OAAO,MAAM,YAAY;MACxD,WAAW,OAAO;AAChB,kBAAW,GAAa;AACxB,eAAQ,MAAM;;gBAGf,OAAO;QATH,OAAO,GAUA,CACd,GACW,EAGjB,oBAAC,0BAAc,eAA4B,IAC/B;MACC;;IACT;GACF"}
@@ -20,7 +20,7 @@ declare function FieldGroup({
20
20
  ...props
21
21
  }: React.ComponentProps<"div">): react_jsx_runtime0.JSX.Element;
22
22
  declare const fieldVariants: (props?: ({
23
- orientation?: "vertical" | "horizontal" | "responsive" | null | undefined;
23
+ orientation?: "horizontal" | "vertical" | "responsive" | null | undefined;
24
24
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
25
25
  declare function Field({
26
26
  className,
@@ -27,7 +27,7 @@ declare function Item({
27
27
  asChild?: boolean;
28
28
  }): react_jsx_runtime0.JSX.Element;
29
29
  declare const itemMediaVariants: (props?: ({
30
- variant?: "default" | "image" | "icon" | null | undefined;
30
+ variant?: "image" | "default" | "icon" | null | undefined;
31
31
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
32
32
  declare function ItemMedia({
33
33
  className,
@@ -10,7 +10,7 @@ import { TimeInput, TimeInputProps } from "./components/ui/input-time.mjs";
10
10
  import { Icon, Icons } from "./components/common/icons.mjs";
11
11
  import { CreateStatusComponentProps, StatusBadge, StatusField, createStatusConfig, createStatusVariants, findStatus } from "./components/common/status.mjs";
12
12
  import { createFileHandlerUploadStrategy } from "./components/editor/extensions/file-handler/strategy.mjs";
13
- import { convertEditorContentToHTML, convertHTMLToEditorContent } from "./components/editor/lib/helpers.mjs";
13
+ import { convertEditorContentToHTML, convertEditorContentToMarkdown, convertHTMLToEditorContent, convertMarkdownToEditorContent } from "./components/editor/lib/helpers.mjs";
14
14
  import { AdminErrorPage, AdminNotAllowedPage, AdminNotFoundPage } from "./components/layouts/admin-error-pages.mjs";
15
15
  import { AdminLoadingLayout } from "./components/layouts/admin-loading.mjs";
16
16
  import { EmptyPage, EmptyPageDescription, EmptyPageProps, EmptyPageTitle } from "./components/layouts/empty-page.mjs";
@@ -37,4 +37,4 @@ import { Skeleton } from "./components/ui/skeleton.mjs";
37
37
  import { Slider } from "./components/ui/slider.mjs";
38
38
  import { Spinner } from "./components/ui/spinner.mjs";
39
39
  import { Textarea } from "./components/ui/textarea.mjs";
40
- export { AdminErrorPage, AdminLoadingLayout, AdminNotAllowedPage, AdminNotFoundPage, Alert, AlertAction, AlertDescription, AlertTitle, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CreateStatusComponentProps, DataList, DataListItem, DataListItemProps, DataListProps, DataListTitle, DataListTitleProps, DataListValue, DataListValueProps, DataStack, DataStackColumn, DataStackColumnProps, DataStackGrid, DataStackGridProps, DataStackLayout, DataStackLayoutProps, DataStackProps, DataStackRow, DataStackRowProps, DataStackTitle, DataStackTitleProps, DataStackValue, DataStackValueProps, DateInput, DateInputProps, DefaultErrorSection, EditorJSONContent, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyPage, EmptyPageDescription, EmptyPageProps, EmptyPageTitle, EmptyTitle, ErrorPage, ErrorPageCode, ErrorPageDescription, ErrorPageIcon, Icon, Icons, Input, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, ListLayout, Loader, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotAllowedSection, NotFoundSection, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, RadioGroup, RadioGroupItem, RootLoading, RootNotFoundPage, ScrollArea, ScrollBar, Separator, ServerErrorSection, Skeleton, Slider, Spinner, StatusBadge, StatusField, Tab, TabLayout, TabLayoutProps, Textarea, TimeInput, TimeInputProps, badgeVariants, buttonGroupVariants, buttonVariants, convertEditorContentToHTML, convertHTMLToEditorContent, createFileHandlerUploadStrategy, createStatusConfig, createStatusVariants, findStatus, navigationMenuTriggerStyle };
40
+ export { AdminErrorPage, AdminLoadingLayout, AdminNotAllowedPage, AdminNotFoundPage, Alert, AlertAction, AlertDescription, AlertTitle, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CreateStatusComponentProps, DataList, DataListItem, DataListItemProps, DataListProps, DataListTitle, DataListTitleProps, DataListValue, DataListValueProps, DataStack, DataStackColumn, DataStackColumnProps, DataStackGrid, DataStackGridProps, DataStackLayout, DataStackLayoutProps, DataStackProps, DataStackRow, DataStackRowProps, DataStackTitle, DataStackTitleProps, DataStackValue, DataStackValueProps, DateInput, DateInputProps, DefaultErrorSection, EditorJSONContent, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyPage, EmptyPageDescription, EmptyPageProps, EmptyPageTitle, EmptyTitle, ErrorPage, ErrorPageCode, ErrorPageDescription, ErrorPageIcon, Icon, Icons, Input, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, ListLayout, Loader, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotAllowedSection, NotFoundSection, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, RadioGroup, RadioGroupItem, RootLoading, RootNotFoundPage, ScrollArea, ScrollBar, Separator, ServerErrorSection, Skeleton, Slider, Spinner, StatusBadge, StatusField, Tab, TabLayout, TabLayoutProps, Textarea, TimeInput, TimeInputProps, badgeVariants, buttonGroupVariants, buttonVariants, convertEditorContentToHTML, convertEditorContentToMarkdown, convertHTMLToEditorContent, convertMarkdownToEditorContent, createFileHandlerUploadStrategy, createStatusConfig, createStatusVariants, findStatus, navigationMenuTriggerStyle };
@@ -2,7 +2,7 @@ import { Icons } from "./components/common/icons.mjs";
2
2
  import { Badge, badgeVariants } from "./components/ui/badge.mjs";
3
3
  import { StatusBadge, StatusField, createStatusConfig, createStatusVariants, findStatus } from "./components/common/status.mjs";
4
4
  import { createFileHandlerUploadStrategy } from "./components/editor/extensions/file-handler/strategy.mjs";
5
- import { convertEditorContentToHTML, convertHTMLToEditorContent } from "./components/editor/lib/helpers.mjs";
5
+ import { convertEditorContentToHTML, convertEditorContentToMarkdown, convertHTMLToEditorContent, convertMarkdownToEditorContent } from "./components/editor/lib/helpers.mjs";
6
6
  import { Button, buttonVariants } from "./components/ui/button.mjs";
7
7
  import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./components/ui/breadcrumb.mjs";
8
8
  import { ScrollArea, ScrollBar } from "./components/ui/scroll-area.mjs";
@@ -37,4 +37,4 @@ import { RadioGroup, RadioGroupItem } from "./components/ui/radio-group.mjs";
37
37
  import { Slider } from "./components/ui/slider.mjs";
38
38
  import { Spinner } from "./components/ui/spinner.mjs";
39
39
 
40
- export { AdminErrorPage, AdminLoadingLayout, AdminNotAllowedPage, AdminNotFoundPage, Alert, AlertAction, AlertDescription, AlertTitle, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, DataList, DataListItem, DataListTitle, DataListValue, DataStack, DataStackColumn, DataStackGrid, DataStackLayout, DataStackRow, DataStackTitle, DataStackValue, DateInput, DefaultErrorSection, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyPage, EmptyPageDescription, EmptyPageTitle, EmptyTitle, ErrorPage, ErrorPageCode, ErrorPageDescription, ErrorPageIcon, Icons, Input, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, ListLayout, Loader, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotAllowedSection, NotFoundSection, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, RadioGroup, RadioGroupItem, RootLoading, RootNotFoundPage, ScrollArea, ScrollBar, Separator, ServerErrorSection, Skeleton, Slider, Spinner, StatusBadge, StatusField, TabLayout, Textarea, TimeInput, badgeVariants, buttonGroupVariants, buttonVariants, convertEditorContentToHTML, convertHTMLToEditorContent, createFileHandlerUploadStrategy, createStatusConfig, createStatusVariants, findStatus, navigationMenuTriggerStyle };
40
+ export { AdminErrorPage, AdminLoadingLayout, AdminNotAllowedPage, AdminNotFoundPage, Alert, AlertAction, AlertDescription, AlertTitle, Badge, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, DataList, DataListItem, DataListTitle, DataListValue, DataStack, DataStackColumn, DataStackGrid, DataStackLayout, DataStackRow, DataStackTitle, DataStackValue, DateInput, DefaultErrorSection, Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyPage, EmptyPageDescription, EmptyPageTitle, EmptyTitle, ErrorPage, ErrorPageCode, ErrorPageDescription, ErrorPageIcon, Icons, Input, Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, Kbd, KbdGroup, Label, ListLayout, Loader, NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuTrigger, NavigationMenuViewport, NotAllowedSection, NotFoundSection, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, RadioGroup, RadioGroupItem, RootLoading, RootNotFoundPage, ScrollArea, ScrollBar, Separator, ServerErrorSection, Skeleton, Slider, Spinner, StatusBadge, StatusField, TabLayout, Textarea, TimeInput, badgeVariants, buttonGroupVariants, buttonVariants, convertEditorContentToHTML, convertEditorContentToMarkdown, convertHTMLToEditorContent, convertMarkdownToEditorContent, createFileHandlerUploadStrategy, createStatusConfig, createStatusVariants, findStatus, navigationMenuTriggerStyle };
@@ -1,3 +1 @@
1
- import { DatabaseClient, initDatabase } from "../modules/config/db/init.mjs";
2
- import { EmailClient, initEmailProvider } from "../modules/config/providers/email.mjs";
3
- export { DatabaseClient, EmailClient, initDatabase, initEmailProvider };
1
+ export { };
@@ -1,4 +1 @@
1
- import { initDatabase } from "../modules/config/db/init.mjs";
2
- import { initEmailProvider } from "../modules/config/providers/email.mjs";
3
-
4
- export { initDatabase, initEmailProvider };
1
+ export { };
package/dist/config.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Path, PathGroup, PathSubItem, Paths } from "./modules/config/paths/types.mjs";
2
+ import { TDatabaseSchema } from "./modules/database/lib/types.mjs";
3
+ import { baseColumns, generateDefaultUUID } from "./modules/database/lib/helpers.mjs";
2
4
  import { TulipConfig, defineTulipConfig } from "./modules/config/lib/config.mjs";
3
- import { baseColumns, generateDefaultUUID } from "./modules/config/db/helpers.mjs";
4
- import { TDatabaseSchema } from "./modules/config/db/types.mjs";
5
5
  import { TulipContext, createContext } from "./modules/config/lib/context.mjs";
6
6
  import { createPaths } from "./modules/config/paths/helpers.mjs";
7
7
  export { Path, PathGroup, PathSubItem, Paths, TDatabaseSchema, TulipConfig, TulipContext, baseColumns, createContext, createPaths, defineTulipConfig, generateDefaultUUID };
package/dist/config.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { baseColumns, generateDefaultUUID } from "./modules/config/db/helpers.mjs";
1
+ import { baseColumns, generateDefaultUUID } from "./modules/database/lib/helpers.mjs";
2
2
  import { defineTulipConfig } from "./modules/config/lib/config.mjs";
3
3
  import { createContext } from "./modules/config/lib/context.mjs";
4
4
  import { createPaths } from "./modules/config/paths/helpers.mjs";
@@ -12,6 +12,7 @@ import { DataTable } from "../modules/data-tables/tables/data-table/components/t
12
12
  import { TableInlineCell } from "../modules/data-tables/tables/inline-table/components/cells/common.mjs";
13
13
  import { TableDragHandle, TableDragHandleProps, createTableDragHandleCell } from "../modules/data-tables/tables/inline-table/components/cells/drag-handle.client.mjs";
14
14
  import { InlineDataTableReadOnly } from "../modules/data-tables/tables/inline-table/components/cells/read-only.mjs";
15
+ import { INLINE_INPUT_ATTR, InlineDataTableHotkeysConfig, useInlineDataTableHotkeys } from "../modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.mjs";
15
16
  import { InlineTableContextValue, InlineTableProvider, useInlineTableContext } from "../modules/data-tables/tables/inline-table/hooks/context.client.mjs";
16
17
  import { InlineTable } from "../modules/data-tables/tables/inline-table/components/table.mjs";
17
- export { DataTable, InfiniteStrategyMeta, InlineDataTableReadOnly, InlineTable, InlineTableContextValue, InlineTableProvider, PaginationStrategy, TableConfigContextValue, TableConfigProvider, TableDateCell, TableDragHandle, TableDragHandleProps, TableFilterCombobox, TableFilterComboboxOption, TableFilterComboboxProps, TableFilterSlider, TableFilterSliderProps, TableInlineCell, TableNumberCell, TableSearchInput, TableStatusCell, TableTextCell, UseInfiniteStrategyInput, UsePaginationStrategyInput, createTableConfig, createTableDragHandleCell, createTableIndexCell, createTableSelectCell, useInfiniteStrategy, useInlineTableContext, usePaginationStrategy, useTable, useTableConfigContext };
18
+ export { DataTable, INLINE_INPUT_ATTR, InfiniteStrategyMeta, InlineDataTableHotkeysConfig, InlineDataTableReadOnly, InlineTable, InlineTableContextValue, InlineTableProvider, PaginationStrategy, TableConfigContextValue, TableConfigProvider, TableDateCell, TableDragHandle, TableDragHandleProps, TableFilterCombobox, TableFilterComboboxOption, TableFilterComboboxProps, TableFilterSlider, TableFilterSliderProps, TableInlineCell, TableNumberCell, TableSearchInput, TableStatusCell, TableTextCell, UseInfiniteStrategyInput, UsePaginationStrategyInput, createTableConfig, createTableDragHandleCell, createTableIndexCell, createTableSelectCell, useInfiniteStrategy, useInlineDataTableHotkeys, useInlineTableContext, usePaginationStrategy, useTable, useTableConfigContext };
@@ -13,6 +13,7 @@ import { TableInlineCell } from "../modules/data-tables/tables/inline-table/comp
13
13
  import { TableDragHandle, createTableDragHandleCell } from "../modules/data-tables/tables/inline-table/components/cells/drag-handle.client.mjs";
14
14
  import { InlineDataTableReadOnly } from "../modules/data-tables/tables/inline-table/components/cells/read-only.mjs";
15
15
  import { InlineTableProvider, useInlineTableContext } from "../modules/data-tables/tables/inline-table/hooks/context.client.mjs";
16
+ import { INLINE_INPUT_ATTR, useInlineDataTableHotkeys } from "../modules/data-tables/tables/inline-table/hooks/use-hotkeys.client.mjs";
16
17
  import { InlineTable } from "../modules/data-tables/tables/inline-table/components/table.mjs";
17
18
 
18
- export { DataTable, InlineDataTableReadOnly, InlineTable, InlineTableProvider, TableConfigProvider, TableDateCell, TableDragHandle, TableFilterCombobox, TableFilterSlider, TableInlineCell, TableNumberCell, TableSearchInput, TableStatusCell, TableTextCell, createTableConfig, createTableDragHandleCell, createTableIndexCell, createTableSelectCell, useInfiniteStrategy, useInlineTableContext, usePaginationStrategy, useTable, useTableConfigContext };
19
+ export { DataTable, INLINE_INPUT_ATTR, InlineDataTableReadOnly, InlineTable, InlineTableProvider, TableConfigProvider, TableDateCell, TableDragHandle, TableFilterCombobox, TableFilterSlider, TableInlineCell, TableNumberCell, TableSearchInput, TableStatusCell, TableTextCell, createTableConfig, createTableDragHandleCell, createTableIndexCell, createTableSelectCell, useInfiniteStrategy, useInlineDataTableHotkeys, useInlineTableContext, usePaginationStrategy, useTable, useTableConfigContext };
@@ -1,10 +1,10 @@
1
- import { ParseFilter, ParseFilterArraySchema, ParseFilterBooleanSchema, ParseFilterDatetimeSchema, ParseFilterEnumSchema, ParseFilterStringSchema, ParseFilterTupleSchema, parseFilterArray, parseFilterBoolean, parseFilterDatetime, parseFilterEnum, parseFilterString, parseFilterTuple } from "./modules/data-tables/lib/filters/parsers.mjs";
2
1
  import { Table, TableBody, TableCaption, TableCell, TableFooter, TableRow } from "./modules/data-tables/components/table.mjs";
3
2
  import { TableColumnHeader } from "./modules/data-tables/components/column-header.mjs";
4
3
  import { TableHead, TableHeader, TableHeaderCell, TableHeaderProps, TableHeaderRow } from "./modules/data-tables/components/header.mjs";
5
4
  import { TableLayout } from "./modules/data-tables/components/layout.mjs";
6
5
  import { TableSkeleton } from "./modules/data-tables/components/skeleton.mjs";
7
6
  import { TableToolbar, TableToolbarList } from "./modules/data-tables/components/toolbar.mjs";
7
+ import { ParseFilter, ParseFilterArraySchema, ParseFilterBooleanSchema, ParseFilterDatetimeSchema, ParseFilterEnumSchema, ParseFilterStringSchema, ParseFilterTupleSchema, parseFilterArray, parseFilterBoolean, parseFilterDatetime, parseFilterEnum, parseFilterString, parseFilterTuple } from "./modules/data-tables/lib/filters/parsers.mjs";
8
8
  import { TableFiltersDef, TableFiltersResult, createTableFilters } from "./modules/data-tables/lib/filters/config.mjs";
9
9
  import { mergeFilters, parseFiltersVisibility } from "./modules/data-tables/lib/filters/helpers.mjs";
10
10
  import { resolveFilterDescriptors, resolveFiltersSchema, resolveFiltersSearchParams, resolveVisibilityState } from "./modules/data-tables/lib/filters/resolvers.mjs";
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,2 @@
1
+ import { Database } from "../modules/database/lib/service.server.mjs";
2
+ export { Database };
@@ -0,0 +1,3 @@
1
+ import { Database } from "../modules/database/lib/service.server.mjs";
2
+
3
+ export { Database };
@@ -0,0 +1,3 @@
1
+ import { TDatabaseSchema } from "./modules/database/lib/types.mjs";
2
+ import { baseColumns, generateDefaultUUID } from "./modules/database/lib/helpers.mjs";
3
+ export { TDatabaseSchema, baseColumns, generateDefaultUUID };
@@ -0,0 +1,3 @@
1
+ import { baseColumns, generateDefaultUUID } from "./modules/database/lib/helpers.mjs";
2
+
3
+ export { baseColumns, generateDefaultUUID };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,2 @@
1
+ import { Email } from "../modules/emails/lib/service.server.mjs";
2
+ export { Email };
@@ -0,0 +1,3 @@
1
+ import { Email } from "../modules/emails/lib/service.server.mjs";
2
+
3
+ export { Email };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1 @@
1
+ export { };
@@ -0,0 +1,10 @@
1
+ import MarkdownIt from "markdown-it";
2
+
3
+ //#region src/lib/utils/markdown.d.ts
4
+ /**
5
+ * Convert markdown to HTML
6
+ */
7
+ declare const markdownParser: MarkdownIt;
8
+ //#endregion
9
+ export { markdownParser };
10
+ //# sourceMappingURL=markdown.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown.d.mts","names":[],"sources":["../../../src/lib/utils/markdown.ts"],"mappings":";;;;;AAKA;cAAa,cAAA,EAAc,UAAA"}
@@ -0,0 +1,15 @@
1
+ import MarkdownIt from "markdown-it";
2
+
3
+ //#region src/lib/utils/markdown.ts
4
+ /**
5
+ * Convert markdown to HTML
6
+ */
7
+ const markdownParser = new MarkdownIt({
8
+ html: false,
9
+ linkify: true,
10
+ breaks: true
11
+ });
12
+
13
+ //#endregion
14
+ export { markdownParser };
15
+ //# sourceMappingURL=markdown.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"markdown.mjs","names":[],"sources":["../../../src/lib/utils/markdown.ts"],"sourcesContent":["import MarkdownIt from \"markdown-it\";\n\n/**\n * Convert markdown to HTML\n */\nexport const markdownParser = new MarkdownIt({\n html: false, // safer default\n linkify: true,\n breaks: true,\n});\n"],"mappings":";;;;;;AAKA,MAAa,iBAAiB,IAAI,WAAW;CAC3C,MAAM;CACN,SAAS;CACT,QAAQ;CACT,CAAC"}
@@ -6,7 +6,8 @@
6
6
  */
7
7
  function url(path = "") {
8
8
  const base = process.env.NEXT_PUBLIC_DEPLOYMENT_URL ?? process.env.NEXT_PUBLIC_VERCEL_URL;
9
- if (base) return `https://${base}${path}`;
9
+ const protocol = process.env.NODE_ENV === "production" ? "https" : "http";
10
+ if (base) return `${protocol}://${base}${path}`;
10
11
  return `http://localhost:${process.env.NEXT_PUBLIC_PORT ?? 3e3}${path}`;
11
12
  }
12
13
 
@@ -1 +1 @@
1
- {"version":3,"file":"url.mjs","names":[],"sources":["../../../src/lib/utils/url.ts"],"sourcesContent":["/**\n * Get the production url for a path\n * @param {string} path\n * @returns {string}\n */\nexport function url(path: string = \"\"): string {\n const base = process.env.NEXT_PUBLIC_DEPLOYMENT_URL ?? process.env.NEXT_PUBLIC_VERCEL_URL;\n\n if (base) return `https://${base}${path}`;\n\n return `http://localhost:${process.env.NEXT_PUBLIC_PORT ?? 3000}${path}`;\n}\n"],"mappings":";;;;;;AAKA,SAAgB,IAAI,OAAe,IAAY;CAC7C,MAAM,OAAO,QAAQ,IAAI,8BAA8B,QAAQ,IAAI;AAEnE,KAAI,KAAM,QAAO,WAAW,OAAO;AAEnC,QAAO,oBAAoB,QAAQ,IAAI,oBAAoB,MAAO"}
1
+ {"version":3,"file":"url.mjs","names":[],"sources":["../../../src/lib/utils/url.ts"],"sourcesContent":["/**\n * Get the production url for a path\n * @param {string} path\n * @returns {string}\n */\nexport function url(path: string = \"\"): string {\n const base = process.env.NEXT_PUBLIC_DEPLOYMENT_URL ?? process.env.NEXT_PUBLIC_VERCEL_URL;\n const protocol = process.env.NODE_ENV === \"production\" ? \"https\" : \"http\";\n\n if (base) return `${protocol}://${base}${path}`;\n\n return `http://localhost:${process.env.NEXT_PUBLIC_PORT ?? 3000}${path}`;\n}\n"],"mappings":";;;;;;AAKA,SAAgB,IAAI,OAAe,IAAY;CAC7C,MAAM,OAAO,QAAQ,IAAI,8BAA8B,QAAQ,IAAI;CACnE,MAAM,WAAW,QAAQ,IAAI,aAAa,eAAe,UAAU;AAEnE,KAAI,KAAM,QAAO,GAAG,SAAS,KAAK,OAAO;AAEzC,QAAO,oBAAoB,QAAQ,IAAI,oBAAoB,MAAO"}
@@ -1,4 +1,9 @@
1
1
  //#region src/lib/utils/user-agent.ts
2
+ /**
3
+ * Detects the browser name and version from a user agent string.
4
+ * @param ua - The user agent string.
5
+ * @returns An object with the browser name and optional version.
6
+ */
2
7
  function detectBrowser(ua) {
3
8
  let m = ua.match(/Edg\/(\d+)/);
4
9
  if (m) return {
@@ -24,6 +29,11 @@ function detectBrowser(ua) {
24
29
  }
25
30
  return { name: "Unknown browser" };
26
31
  }
32
+ /**
33
+ * Detects the operating system name and version from a user agent string.
34
+ * @param ua - The user agent string.
35
+ * @returns An object with the OS name and optional version.
36
+ */
27
37
  function detectOS(ua) {
28
38
  let m = ua.match(/Mac OS X ([\d_]+)/);
29
39
  if (m) return {
@@ -48,6 +58,11 @@ function detectOS(ua) {
48
58
  if (/Linux/.test(ua)) return { name: "Linux" };
49
59
  return { name: "Unknown OS" };
50
60
  }
61
+ /**
62
+ * Detects the device type (Desktop, Mobile, or Tablet) from a user agent string.
63
+ * @param ua - The user agent string.
64
+ * @returns The device type as "Desktop", "Mobile", or "Tablet".
65
+ */
51
66
  function detectDevice(ua) {
52
67
  const s = ua.toLowerCase();
53
68
  if (s.includes("ipad") || s.includes("tablet")) return "Tablet";
@@ -1 +1 @@
1
- {"version":3,"file":"user-agent.mjs","names":[],"sources":["../../../src/lib/utils/user-agent.ts"],"sourcesContent":["export function detectBrowser(ua: string): { name: string; version?: string } {\n // Edge\n let m = ua.match(/Edg\\/(\\d+)/);\n if (m) return { name: \"Edge\", version: m[1] };\n\n // Chrome (not Edge/Opera)\n m = ua.match(/Chrome\\/(\\d+)/);\n if (m && !/Edg\\//.test(ua) && !/OPR\\//.test(ua)) {\n return { name: \"Chrome\", version: m[1] };\n }\n\n // Firefox\n m = ua.match(/Firefox\\/(\\d+)/);\n if (m) return { name: \"Firefox\", version: m[1] };\n\n // Safari\n if (/Safari\\/\\d+/.test(ua) && /Version\\/(\\d+)/.test(ua)) {\n m = ua.match(/Version\\/(\\d+)/);\n if (m) return { name: \"Safari\", version: m[1] };\n }\n\n return { name: \"Unknown browser\" };\n}\n\nexport function detectOS(ua: string): { name: string; version?: string } {\n // macOS\n let m = ua.match(/Mac OS X ([\\d_]+)/);\n if (m) {\n return { name: \"macOS\", version: m[1]?.replace(/_/g, \".\") };\n }\n\n // Windows\n m = ua.match(/Windows NT ([\\d.]+)/);\n if (m) return { name: \"Windows\", version: m[1] };\n\n // iOS\n m = ua.match(/iPhone OS ([\\d_]+)/) || ua.match(/CPU (?:iPhone )?OS ([\\d_]+)/);\n if (m) {\n return { name: \"iOS\", version: m[1]?.replace(/_/g, \".\") };\n }\n\n // Android\n m = ua.match(/Android ([\\d.]+)/);\n if (m) return { name: \"Android\", version: m[1] };\n\n if (/Linux/.test(ua)) return { name: \"Linux\" };\n\n return { name: \"Unknown OS\" };\n}\n\nexport function detectDevice(ua: string): \"Desktop\" | \"Mobile\" | \"Tablet\" {\n const s = ua.toLowerCase();\n\n if (s.includes(\"ipad\") || s.includes(\"tablet\")) return \"Tablet\";\n if (\n s.includes(\"mobi\") ||\n s.includes(\"iphone\") ||\n (s.includes(\"android\") && !s.includes(\"tablet\"))\n ) {\n return \"Mobile\";\n }\n return \"Desktop\";\n}\n"],"mappings":";AAAA,SAAgB,cAAc,IAAgD;CAE5E,IAAI,IAAI,GAAG,MAAM,aAAa;AAC9B,KAAI,EAAG,QAAO;EAAE,MAAM;EAAQ,SAAS,EAAE;EAAI;AAG7C,KAAI,GAAG,MAAM,gBAAgB;AAC7B,KAAI,KAAK,CAAC,QAAQ,KAAK,GAAG,IAAI,CAAC,QAAQ,KAAK,GAAG,CAC7C,QAAO;EAAE,MAAM;EAAU,SAAS,EAAE;EAAI;AAI1C,KAAI,GAAG,MAAM,iBAAiB;AAC9B,KAAI,EAAG,QAAO;EAAE,MAAM;EAAW,SAAS,EAAE;EAAI;AAGhD,KAAI,cAAc,KAAK,GAAG,IAAI,iBAAiB,KAAK,GAAG,EAAE;AACvD,MAAI,GAAG,MAAM,iBAAiB;AAC9B,MAAI,EAAG,QAAO;GAAE,MAAM;GAAU,SAAS,EAAE;GAAI;;AAGjD,QAAO,EAAE,MAAM,mBAAmB;;AAGpC,SAAgB,SAAS,IAAgD;CAEvE,IAAI,IAAI,GAAG,MAAM,oBAAoB;AACrC,KAAI,EACF,QAAO;EAAE,MAAM;EAAS,SAAS,EAAE,IAAI,QAAQ,MAAM,IAAI;EAAE;AAI7D,KAAI,GAAG,MAAM,sBAAsB;AACnC,KAAI,EAAG,QAAO;EAAE,MAAM;EAAW,SAAS,EAAE;EAAI;AAGhD,KAAI,GAAG,MAAM,qBAAqB,IAAI,GAAG,MAAM,8BAA8B;AAC7E,KAAI,EACF,QAAO;EAAE,MAAM;EAAO,SAAS,EAAE,IAAI,QAAQ,MAAM,IAAI;EAAE;AAI3D,KAAI,GAAG,MAAM,mBAAmB;AAChC,KAAI,EAAG,QAAO;EAAE,MAAM;EAAW,SAAS,EAAE;EAAI;AAEhD,KAAI,QAAQ,KAAK,GAAG,CAAE,QAAO,EAAE,MAAM,SAAS;AAE9C,QAAO,EAAE,MAAM,cAAc;;AAG/B,SAAgB,aAAa,IAA6C;CACxE,MAAM,IAAI,GAAG,aAAa;AAE1B,KAAI,EAAE,SAAS,OAAO,IAAI,EAAE,SAAS,SAAS,CAAE,QAAO;AACvD,KACE,EAAE,SAAS,OAAO,IAClB,EAAE,SAAS,SAAS,IACnB,EAAE,SAAS,UAAU,IAAI,CAAC,EAAE,SAAS,SAAS,CAE/C,QAAO;AAET,QAAO"}
1
+ {"version":3,"file":"user-agent.mjs","names":[],"sources":["../../../src/lib/utils/user-agent.ts"],"sourcesContent":["/**\n * Detects the browser name and version from a user agent string.\n * @param ua - The user agent string.\n * @returns An object with the browser name and optional version.\n */\nexport function detectBrowser(ua: string): { name: string; version?: string } {\n // Edge\n let m = ua.match(/Edg\\/(\\d+)/);\n if (m) return { name: \"Edge\", version: m[1] };\n\n // Chrome (not Edge/Opera)\n m = ua.match(/Chrome\\/(\\d+)/);\n if (m && !/Edg\\//.test(ua) && !/OPR\\//.test(ua)) {\n return { name: \"Chrome\", version: m[1] };\n }\n\n // Firefox\n m = ua.match(/Firefox\\/(\\d+)/);\n if (m) return { name: \"Firefox\", version: m[1] };\n\n // Safari\n if (/Safari\\/\\d+/.test(ua) && /Version\\/(\\d+)/.test(ua)) {\n m = ua.match(/Version\\/(\\d+)/);\n if (m) return { name: \"Safari\", version: m[1] };\n }\n\n return { name: \"Unknown browser\" };\n}\n\n/**\n * Detects the operating system name and version from a user agent string.\n * @param ua - The user agent string.\n * @returns An object with the OS name and optional version.\n */\nexport function detectOS(ua: string): { name: string; version?: string } {\n // macOS\n let m = ua.match(/Mac OS X ([\\d_]+)/);\n if (m) {\n return { name: \"macOS\", version: m[1]?.replace(/_/g, \".\") };\n }\n\n // Windows\n m = ua.match(/Windows NT ([\\d.]+)/);\n if (m) return { name: \"Windows\", version: m[1] };\n\n // iOS\n m = ua.match(/iPhone OS ([\\d_]+)/) || ua.match(/CPU (?:iPhone )?OS ([\\d_]+)/);\n if (m) {\n return { name: \"iOS\", version: m[1]?.replace(/_/g, \".\") };\n }\n\n // Android\n m = ua.match(/Android ([\\d.]+)/);\n if (m) return { name: \"Android\", version: m[1] };\n\n if (/Linux/.test(ua)) return { name: \"Linux\" };\n\n return { name: \"Unknown OS\" };\n}\n\n/**\n * Detects the device type (Desktop, Mobile, or Tablet) from a user agent string.\n * @param ua - The user agent string.\n * @returns The device type as \"Desktop\", \"Mobile\", or \"Tablet\".\n */\nexport function detectDevice(ua: string): \"Desktop\" | \"Mobile\" | \"Tablet\" {\n const s = ua.toLowerCase();\n\n if (s.includes(\"ipad\") || s.includes(\"tablet\")) return \"Tablet\";\n if (\n s.includes(\"mobi\") ||\n s.includes(\"iphone\") ||\n (s.includes(\"android\") && !s.includes(\"tablet\"))\n ) {\n return \"Mobile\";\n }\n return \"Desktop\";\n}\n"],"mappings":";;;;;;AAKA,SAAgB,cAAc,IAAgD;CAE5E,IAAI,IAAI,GAAG,MAAM,aAAa;AAC9B,KAAI,EAAG,QAAO;EAAE,MAAM;EAAQ,SAAS,EAAE;EAAI;AAG7C,KAAI,GAAG,MAAM,gBAAgB;AAC7B,KAAI,KAAK,CAAC,QAAQ,KAAK,GAAG,IAAI,CAAC,QAAQ,KAAK,GAAG,CAC7C,QAAO;EAAE,MAAM;EAAU,SAAS,EAAE;EAAI;AAI1C,KAAI,GAAG,MAAM,iBAAiB;AAC9B,KAAI,EAAG,QAAO;EAAE,MAAM;EAAW,SAAS,EAAE;EAAI;AAGhD,KAAI,cAAc,KAAK,GAAG,IAAI,iBAAiB,KAAK,GAAG,EAAE;AACvD,MAAI,GAAG,MAAM,iBAAiB;AAC9B,MAAI,EAAG,QAAO;GAAE,MAAM;GAAU,SAAS,EAAE;GAAI;;AAGjD,QAAO,EAAE,MAAM,mBAAmB;;;;;;;AAQpC,SAAgB,SAAS,IAAgD;CAEvE,IAAI,IAAI,GAAG,MAAM,oBAAoB;AACrC,KAAI,EACF,QAAO;EAAE,MAAM;EAAS,SAAS,EAAE,IAAI,QAAQ,MAAM,IAAI;EAAE;AAI7D,KAAI,GAAG,MAAM,sBAAsB;AACnC,KAAI,EAAG,QAAO;EAAE,MAAM;EAAW,SAAS,EAAE;EAAI;AAGhD,KAAI,GAAG,MAAM,qBAAqB,IAAI,GAAG,MAAM,8BAA8B;AAC7E,KAAI,EACF,QAAO;EAAE,MAAM;EAAO,SAAS,EAAE,IAAI,QAAQ,MAAM,IAAI;EAAE;AAI3D,KAAI,GAAG,MAAM,mBAAmB;AAChC,KAAI,EAAG,QAAO;EAAE,MAAM;EAAW,SAAS,EAAE;EAAI;AAEhD,KAAI,QAAQ,KAAK,GAAG,CAAE,QAAO,EAAE,MAAM,SAAS;AAE9C,QAAO,EAAE,MAAM,cAAc;;;;;;;AAQ/B,SAAgB,aAAa,IAA6C;CACxE,MAAM,IAAI,GAAG,aAAa;AAE1B,KAAI,EAAE,SAAS,OAAO,IAAI,EAAE,SAAS,SAAS,CAAE,QAAO;AACvD,KACE,EAAE,SAAS,OAAO,IAClB,EAAE,SAAS,SAAS,IACnB,EAAE,SAAS,UAAU,IAAI,CAAC,EAAE,SAAS,SAAS,CAE/C,QAAO;AAET,QAAO"}
package/dist/lib.d.mts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { ConfigWithIcon } from "./lib/types/config.mjs";
2
- import { BUCKET_NAME } from "./lib/config/constants.mjs";
3
2
  import { arrayMove } from "./lib/utils/array-move.mjs";
4
3
  import { cn } from "./lib/utils/cn.mjs";
5
4
  import { formatAssetSize, formatCurrency, formatDate, formatDateTime, formatDuration, formatPhone, formatTime, formatUserAgent } from "./lib/utils/format.mjs";
6
5
  import { generateManifest } from "./lib/utils/manifest.mjs";
6
+ import { markdownParser } from "./lib/utils/markdown.mjs";
7
7
  import { url } from "./lib/utils/url.mjs";
8
- export { BUCKET_NAME, ConfigWithIcon, arrayMove, cn, formatAssetSize, formatCurrency, formatDate, formatDateTime, formatDuration, formatPhone, formatTime, formatUserAgent, generateManifest, url };
8
+ export { ConfigWithIcon, arrayMove, cn, formatAssetSize, formatCurrency, formatDate, formatDateTime, formatDuration, formatPhone, formatTime, formatUserAgent, generateManifest, markdownParser, url };
package/dist/lib.mjs CHANGED
@@ -1,8 +1,8 @@
1
1
  import { cn } from "./lib/utils/cn.mjs";
2
- import { BUCKET_NAME } from "./lib/config/constants.mjs";
2
+ import { markdownParser } from "./lib/utils/markdown.mjs";
3
3
  import { arrayMove } from "./lib/utils/array-move.mjs";
4
4
  import { formatAssetSize, formatCurrency, formatDate, formatDateTime, formatDuration, formatPhone, formatTime, formatUserAgent } from "./lib/utils/format.mjs";
5
5
  import { generateManifest } from "./lib/utils/manifest.mjs";
6
6
  import { url } from "./lib/utils/url.mjs";
7
7
 
8
- export { BUCKET_NAME, arrayMove, cn, formatAssetSize, formatCurrency, formatDate, formatDateTime, formatDuration, formatPhone, formatTime, formatUserAgent, generateManifest, url };
8
+ export { arrayMove, cn, formatAssetSize, formatCurrency, formatDate, formatDateTime, formatDuration, formatPhone, formatTime, formatUserAgent, generateManifest, markdownParser, url };
@@ -0,0 +1,16 @@
1
+ import { TDatabaseSchema } from "../../database/lib/types.mjs";
2
+ import { TulipContext } from "../../config/lib/context.mjs";
3
+ import "../../../config.mjs";
4
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
5
+ import { PropsWithChildren } from "react";
6
+ import "server-cli-only";
7
+
8
+ //#region src/modules/auth/components/create-first-user-guard.server.d.ts
9
+ type AuthGuardFirstUserProps<TSchema extends TDatabaseSchema> = PropsWithChildren<Pick<TulipContext<TSchema>, "db">>;
10
+ declare function CreateFirstUserPageGuard<TSchema extends TDatabaseSchema>({
11
+ children,
12
+ db
13
+ }: AuthGuardFirstUserProps<TSchema>): Promise<react_jsx_runtime0.JSX.Element>;
14
+ //#endregion
15
+ export { CreateFirstUserPageGuard };
16
+ //# sourceMappingURL=create-first-user-guard.server.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-first-user-guard.server.d.mts","names":[],"sources":["../../../../src/modules/auth/components/create-first-user-guard.server.tsx"],"mappings":";;;;;;;;KAQK,uBAAA,iBAAwC,eAAA,IAAmB,iBAAA,CAC9D,IAAA,CAAK,YAAA,CAAa,OAAA;AAAA,iBAGE,wBAAA,iBAAyC,eAAA,CAAA,CAAA;EAC7D,QAAA;EACA;AAAA,GACC,uBAAA,CAAwB,OAAA,IAAQ,OAAA,CAAA,kBAAA,CAAA,GAAA,CAAA,OAAA"}
@@ -0,0 +1,16 @@
1
+ import { users } from "../db/schema.mjs";
2
+ import { Fragment, jsx } from "react/jsx-runtime";
3
+ import { redirect } from "next/navigation";
4
+ import "server-cli-only";
5
+ import { connection } from "next/server";
6
+
7
+ //#region src/modules/auth/components/create-first-user-guard.server.tsx
8
+ async function CreateFirstUserPageGuard({ children, db }) {
9
+ await connection();
10
+ if ((await db.select().from(users).limit(1)).length > 0) redirect("/auth/login");
11
+ return /* @__PURE__ */ jsx(Fragment, { children });
12
+ }
13
+
14
+ //#endregion
15
+ export { CreateFirstUserPageGuard };
16
+ //# sourceMappingURL=create-first-user-guard.server.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"create-first-user-guard.server.mjs","names":[],"sources":["../../../../src/modules/auth/components/create-first-user-guard.server.tsx"],"sourcesContent":["import \"server-cli-only\";\n\nimport { redirect } from \"next/navigation\";\nimport { connection } from \"next/server\";\nimport type { PropsWithChildren } from \"react\";\nimport type { TDatabaseSchema, TulipContext } from \"@/modules/config/entry\";\nimport { users } from \"../db/schema\";\n\ntype AuthGuardFirstUserProps<TSchema extends TDatabaseSchema> = PropsWithChildren<\n Pick<TulipContext<TSchema>, \"db\">\n>;\n\nexport async function CreateFirstUserPageGuard<TSchema extends TDatabaseSchema>({\n children,\n db,\n}: AuthGuardFirstUserProps<TSchema>) {\n await connection();\n\n const allUsers = await db.select().from(users).limit(1);\n const usersExist = allUsers.length > 0;\n\n if (usersExist) redirect(\"/auth/login\");\n\n return <>{children}</>;\n}\n"],"mappings":";;;;;;;AAYA,eAAsB,yBAA0D,EAC9E,UACA,MACmC;AACnC,OAAM,YAAY;AAKlB,MAHiB,MAAM,GAAG,QAAQ,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,EAC3B,SAAS,EAErB,UAAS,cAAc;AAEvC,QAAO,gCAAG,WAAY"}
@@ -1,9 +1,9 @@
1
- import { TDatabaseSchema } from "../../config/db/types.mjs";
1
+ import { TDatabaseSchema } from "../../database/lib/types.mjs";
2
2
  import { TulipContext } from "../../config/lib/context.mjs";
3
3
  import "../../../config.mjs";
4
4
  import * as react_jsx_runtime0 from "react/jsx-runtime";
5
5
  import { PropsWithChildren } from "react";
6
- import "server-only";
6
+ import "server-cli-only";
7
7
 
8
8
  //#region src/modules/auth/components/guard.server.d.ts
9
9
  declare function AuthGuard<TSchema extends TDatabaseSchema>({
@@ -3,7 +3,7 @@ import { HydrateClient } from "../../router/lib/query-client.server.mjs";
3
3
  import { getSession } from "../lib/helpers.server.mjs";
4
4
  import { jsx } from "react/jsx-runtime";
5
5
  import { redirect } from "next/navigation";
6
- import "server-only";
6
+ import "server-cli-only";
7
7
 
8
8
  //#region src/modules/auth/components/guard.server.tsx
9
9
  async function AuthGuard({ children, auth }) {
@@ -1 +1 @@
1
- {"version":3,"file":"guard.server.mjs","names":[],"sources":["../../../../src/modules/auth/components/guard.server.tsx"],"sourcesContent":["import \"server-only\";\n\nimport { redirect } from \"next/navigation\";\nimport type { PropsWithChildren } from \"react\";\nimport type { TDatabaseSchema, TulipContext } from \"@/modules/config/entry\";\nimport { getQueryClient } from \"@/modules/router/lib/query-client\";\nimport { HydrateClient } from \"@/modules/router/lib/query-client.server\";\nimport { getSession } from \"../lib/helpers.server\";\n\nexport async function AuthGuard<TSchema extends TDatabaseSchema>({\n children,\n auth,\n}: PropsWithChildren<Pick<TulipContext<TSchema>, \"auth\">>) {\n const session = await getSession({ auth });\n if (!session) redirect(\"/auth/login\");\n\n const queryClient = getQueryClient();\n queryClient.prefetchQuery({\n queryKey: [\"session\"],\n queryFn: async () => session,\n });\n\n return <HydrateClient>{children}</HydrateClient>;\n}\n"],"mappings":";;;;;;;;AASA,eAAsB,UAA2C,EAC/D,UACA,QACyD;CACzD,MAAM,UAAU,MAAM,WAAW,EAAE,MAAM,CAAC;AAC1C,KAAI,CAAC,QAAS,UAAS,cAAc;AAGrC,CADoB,gBAAgB,CACxB,cAAc;EACxB,UAAU,CAAC,UAAU;EACrB,SAAS,YAAY;EACtB,CAAC;AAEF,QAAO,oBAAC,iBAAe,WAAyB"}
1
+ {"version":3,"file":"guard.server.mjs","names":[],"sources":["../../../../src/modules/auth/components/guard.server.tsx"],"sourcesContent":["import \"server-cli-only\";\n\nimport { redirect } from \"next/navigation\";\nimport type { PropsWithChildren } from \"react\";\nimport type { TDatabaseSchema, TulipContext } from \"@/modules/config/entry\";\nimport { getQueryClient } from \"@/modules/router/lib/query-client\";\nimport { HydrateClient } from \"@/modules/router/lib/query-client.server\";\nimport { getSession } from \"../lib/helpers.server\";\n\nexport async function AuthGuard<TSchema extends TDatabaseSchema>({\n children,\n auth,\n}: PropsWithChildren<Pick<TulipContext<TSchema>, \"auth\">>) {\n const session = await getSession({ auth });\n if (!session) redirect(\"/auth/login\");\n\n const queryClient = getQueryClient();\n queryClient.prefetchQuery({\n queryKey: [\"session\"],\n queryFn: async () => session,\n });\n\n return <HydrateClient>{children}</HydrateClient>;\n}\n"],"mappings":";;;;;;;;AASA,eAAsB,UAA2C,EAC/D,UACA,QACyD;CACzD,MAAM,UAAU,MAAM,WAAW,EAAE,MAAM,CAAC;AAC1C,KAAI,CAAC,QAAS,UAAS,cAAc;AAGrC,CADoB,gBAAgB,CACxB,cAAc;EACxB,UAAU,CAAC,UAAU;EACrB,SAAS,YAAY;EACtB,CAAC;AAEF,QAAO,oBAAC,iBAAe,WAAyB"}
@@ -1,5 +1,5 @@
1
- import * as drizzle_orm0 from "drizzle-orm";
2
1
  import * as drizzle_orm_pg_core0 from "drizzle-orm/pg-core";
2
+ import * as drizzle_orm0 from "drizzle-orm";
3
3
 
4
4
  //#region src/modules/auth/db/schema.d.ts
5
5
  /**
@@ -1,6 +1,6 @@
1
- import { baseColumns } from "../../config/db/helpers.mjs";
2
- import { relations, sql } from "drizzle-orm";
1
+ import { baseColumns } from "../../database/lib/helpers.mjs";
3
2
  import { pgTable } from "drizzle-orm/pg-core";
3
+ import { relations, sql } from "drizzle-orm";
4
4
 
5
5
  //#region src/modules/auth/db/schema.ts
6
6
  /**