@carlonicora/nextjs-jsonapi 1.4.0 → 1.6.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 (317) hide show
  1. package/README.md +208 -127
  2. package/dist/{ApiResponseInterface-DDI7QQPR.d.ts → ApiResponseInterface-CfcC7pPC.d.mts} +11 -2
  3. package/dist/{ApiResponseInterface-BHN5D9r5.d.mts → ApiResponseInterface-DTBJaV5R.d.ts} +11 -2
  4. package/dist/{BlockNoteEditor-QV6ESIQA.js → BlockNoteEditor-7FM7B737.js} +19 -24
  5. package/dist/BlockNoteEditor-7FM7B737.js.map +1 -0
  6. package/dist/{BlockNoteEditor-U2IHUVUF.mjs → BlockNoteEditor-RVL76ZAS.mjs} +11 -16
  7. package/dist/BlockNoteEditor-RVL76ZAS.mjs.map +1 -0
  8. package/dist/JsonApiRequest-KOKGVPBI.js +25 -0
  9. package/dist/{JsonApiRequest-UJ7FGIVI.js.map → JsonApiRequest-KOKGVPBI.js.map} +1 -1
  10. package/dist/{JsonApiRequest-6UR7DIAR.mjs → JsonApiRequest-VCCRO732.mjs} +2 -2
  11. package/dist/chunk-2Z56AS2S.js +2723 -0
  12. package/dist/chunk-2Z56AS2S.js.map +1 -0
  13. package/dist/{chunk-HTLEKZND.mjs → chunk-37NJZ2VD.mjs} +281 -1019
  14. package/dist/chunk-37NJZ2VD.mjs.map +1 -0
  15. package/dist/{chunk-2K3Q24UF.js → chunk-3ZPK4QOB.js} +24 -14
  16. package/dist/chunk-3ZPK4QOB.js.map +1 -0
  17. package/dist/chunk-AGWQ75PQ.js +142 -0
  18. package/dist/chunk-AGWQ75PQ.js.map +1 -0
  19. package/dist/{chunk-32HM6MDD.js → chunk-CSM6AIAP.js} +1 -1
  20. package/dist/{chunk-32HM6MDD.js.map → chunk-CSM6AIAP.js.map} +1 -1
  21. package/dist/{chunk-IKBA4AHN.mjs → chunk-F4Y3GZG4.mjs} +3 -3
  22. package/dist/{chunk-YF5XQZDR.mjs → chunk-F5UNXZ3J.mjs} +1 -1
  23. package/dist/chunk-F5UNXZ3J.mjs.map +1 -0
  24. package/dist/chunk-IGOWVLJH.mjs +142 -0
  25. package/dist/chunk-IGOWVLJH.mjs.map +1 -0
  26. package/dist/{chunk-HAG77QBV.mjs → chunk-K4W5QXL5.mjs} +1 -1
  27. package/dist/chunk-KFL5ZFM4.mjs +2723 -0
  28. package/dist/chunk-KFL5ZFM4.mjs.map +1 -0
  29. package/dist/{chunk-HR4H2FP7.mjs → chunk-KJ4ETLJB.mjs} +24 -14
  30. package/dist/chunk-KJ4ETLJB.mjs.map +1 -0
  31. package/dist/chunk-LOSPCUCF.js +637 -0
  32. package/dist/chunk-LOSPCUCF.js.map +1 -0
  33. package/dist/{chunk-E2HRC2OG.js → chunk-SVX7E6RR.js} +10360 -6256
  34. package/dist/chunk-SVX7E6RR.js.map +1 -0
  35. package/dist/{chunk-EFJEWLRL.js → chunk-YUO55Q5A.js} +1 -1
  36. package/dist/chunk-YUO55Q5A.js.map +1 -0
  37. package/dist/chunk-ZQTFZKLJ.mjs +12089 -0
  38. package/dist/chunk-ZQTFZKLJ.mjs.map +1 -0
  39. package/dist/{chunk-PMXG5WBC.js → chunk-ZUEEIQHW.js} +3 -3
  40. package/dist/{chunk-PMXG5WBC.js.map → chunk-ZUEEIQHW.js.map} +1 -1
  41. package/dist/client/index.d.mts +161 -11
  42. package/dist/client/index.d.ts +161 -11
  43. package/dist/client/index.js +74 -12
  44. package/dist/client/index.js.map +1 -1
  45. package/dist/client/index.mjs +73 -11
  46. package/dist/components/index.d.mts +762 -73
  47. package/dist/components/index.d.ts +762 -73
  48. package/dist/components/index.js +465 -12
  49. package/dist/components/index.js.map +1 -1
  50. package/dist/components/index.mjs +466 -13
  51. package/dist/config-B43zxEvn.d.mts +69 -0
  52. package/dist/config-D2OUrI_G.d.ts +69 -0
  53. package/dist/content.fields-Ck5lkQ5d.d.mts +47 -0
  54. package/dist/content.fields-Ck5lkQ5d.d.ts +47 -0
  55. package/dist/{content.interface-C_PGZMuy.d.ts → content.interface-Bs8a7uW6.d.mts} +2 -3
  56. package/dist/{content.interface-D_WS6CrB.d.mts → content.interface-UtsJ-mzs.d.ts} +2 -3
  57. package/dist/contexts/index.d.mts +13 -6
  58. package/dist/contexts/index.d.ts +13 -6
  59. package/dist/contexts/index.js +10 -12
  60. package/dist/contexts/index.js.map +1 -1
  61. package/dist/contexts/index.mjs +9 -11
  62. package/dist/core/index.d.mts +539 -8
  63. package/dist/core/index.d.ts +539 -8
  64. package/dist/core/index.js +104 -2
  65. package/dist/core/index.js.map +1 -1
  66. package/dist/core/index.mjs +105 -3
  67. package/dist/index.d.mts +131 -70
  68. package/dist/index.d.ts +131 -70
  69. package/dist/index.js +97 -7
  70. package/dist/index.js.map +1 -1
  71. package/dist/index.mjs +118 -28
  72. package/dist/notification.interface-BdcwkuQE.d.mts +228 -0
  73. package/dist/notification.interface-BdcwkuQE.d.ts +228 -0
  74. package/dist/request-GBLBPYFM.js +8 -0
  75. package/dist/request-GBLBPYFM.js.map +1 -0
  76. package/dist/request-XABCMU25.mjs +8 -0
  77. package/dist/{AbstractService-wLid8dB0.d.ts → s3.interface-D7ttGatc.d.ts} +36 -26
  78. package/dist/{AbstractService-BsY6W3Ej.d.mts → s3.interface-DlaMDRTn.d.mts} +36 -26
  79. package/dist/scripts/generate-web-module/generator.d.ts.map +1 -1
  80. package/dist/scripts/generate-web-module/generator.js +8 -5
  81. package/dist/scripts/generate-web-module/generator.js.map +1 -1
  82. package/dist/scripts/generate-web-module/index.js +1 -1
  83. package/dist/scripts/generate-web-module/index.js.map +1 -1
  84. package/dist/scripts/generate-web-module/templates/components/editor.template.js +8 -1
  85. package/dist/scripts/generate-web-module/templates/components/editor.template.js.map +1 -1
  86. package/dist/scripts/generate-web-module/transformers/parent-detector.d.ts +4 -3
  87. package/dist/scripts/generate-web-module/transformers/parent-detector.d.ts.map +1 -1
  88. package/dist/scripts/generate-web-module/transformers/parent-detector.js +9 -3
  89. package/dist/scripts/generate-web-module/transformers/parent-detector.js.map +1 -1
  90. package/dist/scripts/generate-web-module/transformers/relationship-resolver.d.ts +11 -0
  91. package/dist/scripts/generate-web-module/transformers/relationship-resolver.d.ts.map +1 -1
  92. package/dist/scripts/generate-web-module/transformers/relationship-resolver.js +36 -9
  93. package/dist/scripts/generate-web-module/transformers/relationship-resolver.js.map +1 -1
  94. package/dist/scripts/generate-web-module/types/json-schema.interface.d.ts +2 -0
  95. package/dist/scripts/generate-web-module/types/json-schema.interface.d.ts.map +1 -1
  96. package/dist/scripts/generate-web-module/types/template-data.interface.d.ts +1 -0
  97. package/dist/scripts/generate-web-module/types/template-data.interface.d.ts.map +1 -1
  98. package/dist/scripts/generate-web-module/utils/i18n-updater.d.ts +4 -3
  99. package/dist/scripts/generate-web-module/utils/i18n-updater.d.ts.map +1 -1
  100. package/dist/scripts/generate-web-module/utils/i18n-updater.js +9 -9
  101. package/dist/scripts/generate-web-module/utils/i18n-updater.js.map +1 -1
  102. package/dist/scripts/generate-web-module/validators/json-schema-validator.js +3 -3
  103. package/dist/scripts/generate-web-module/validators/json-schema-validator.js.map +1 -1
  104. package/dist/server/index.d.mts +299 -4
  105. package/dist/server/index.d.ts +299 -4
  106. package/dist/server/index.js +215 -5
  107. package/dist/server/index.js.map +1 -1
  108. package/dist/server/index.mjs +214 -4
  109. package/dist/server/index.mjs.map +1 -1
  110. package/dist/token-2UWQJY5T.js +8 -0
  111. package/dist/token-2UWQJY5T.js.map +1 -0
  112. package/dist/token-EOK3N45S.mjs +8 -0
  113. package/dist/{useSocket-DzMKRKCA.d.ts → useSocket-8vwK_R_c.d.ts} +1 -1
  114. package/dist/{useSocket-Cn7fB_B1.d.mts → useSocket-BWJUXuOl.d.mts} +1 -1
  115. package/package.json +12 -52
  116. package/scripts/generate-web-module/generator.ts +8 -5
  117. package/scripts/generate-web-module/index.ts +1 -1
  118. package/scripts/generate-web-module/templates/components/editor.template.ts +7 -2
  119. package/scripts/generate-web-module/transformers/parent-detector.ts +10 -3
  120. package/scripts/generate-web-module/transformers/relationship-resolver.ts +36 -9
  121. package/scripts/generate-web-module/types/json-schema.interface.ts +2 -0
  122. package/scripts/generate-web-module/types/template-data.interface.ts +1 -0
  123. package/scripts/generate-web-module/utils/i18n-updater.ts +9 -9
  124. package/scripts/generate-web-module/validators/json-schema-validator.ts +3 -3
  125. package/src/client/JsonApiClient.ts +248 -0
  126. package/src/client/config.ts +78 -0
  127. package/src/client/index.ts +6 -1
  128. package/src/components/containers/TabsContainer.tsx +1 -1
  129. package/src/components/editors/BlockNoteEditor.tsx +3 -1
  130. package/src/components/index.ts +4 -0
  131. package/src/components/navigations/Breadcrumb.tsx +1 -1
  132. package/src/components/navigations/Header.tsx +2 -2
  133. package/src/contexts/CommonContext.tsx +1 -1
  134. package/src/contexts/SocketContext.tsx +1 -1
  135. package/src/contexts/index.ts +3 -0
  136. package/src/core/abstracts/ClientAbstractService.ts +255 -0
  137. package/src/core/abstracts/ServerAbstractService.ts +180 -0
  138. package/src/core/abstracts/index.ts +2 -0
  139. package/src/core/index.ts +32 -3
  140. package/src/discord/config.ts +15 -0
  141. package/src/discord/index.ts +1 -0
  142. package/src/features/auth/components/details/LandingComponent.tsx +2 -2
  143. package/src/features/auth/components/forms/AcceptInvitation.tsx +1 -1
  144. package/src/features/auth/components/forms/ActivateAccount.tsx +1 -1
  145. package/src/features/auth/components/forms/Cookies.tsx +2 -1
  146. package/src/features/auth/components/forms/ForgotPassword.tsx +1 -1
  147. package/src/features/auth/components/forms/Login.tsx +1 -1
  148. package/src/features/auth/components/forms/Logout.tsx +1 -1
  149. package/src/features/auth/components/forms/RefreshUser.tsx +2 -1
  150. package/src/features/auth/components/forms/Register.tsx +1 -1
  151. package/src/features/auth/components/forms/ResetPassword.tsx +1 -1
  152. package/src/features/auth/data/auth.service.ts +1 -1
  153. package/src/features/auth/data/index.ts +0 -1
  154. package/src/features/auth/utils/AuthCookies.ts +1 -1
  155. package/src/features/company/components/forms/CompanyConfigurationEditor.tsx +4 -2
  156. package/src/features/company/components/forms/CompanyDeleter.tsx +2 -1
  157. package/src/features/company/components/forms/CompanyEditor.tsx +6 -3
  158. package/src/features/company/components/forms/CompanyLicense.tsx +4 -2
  159. package/src/features/company/components/lists/CompaniesList.tsx +2 -1
  160. package/src/features/company/data/index.ts +0 -1
  161. package/src/features/content/components/lists/ContentsListById.tsx +2 -1
  162. package/src/features/content/components/lists/RelevantContentsList.tsx +2 -1
  163. package/src/features/content/data/index.ts +0 -1
  164. package/src/features/feature/data/index.ts +0 -1
  165. package/src/features/notification/components/lists/NotificationsList.tsx +2 -1
  166. package/src/features/notification/contexts/NotificationContext.tsx +2 -1
  167. package/src/features/notification/data/index.ts +0 -1
  168. package/src/features/push/data/index.ts +0 -1
  169. package/src/features/role/components/forms/RemoveUserFromRole.tsx +4 -2
  170. package/src/features/role/components/forms/UserRoleAdd.tsx +2 -1
  171. package/src/features/role/components/lists/RolesList.tsx +2 -1
  172. package/src/features/role/components/lists/UserRolesList.tsx +2 -1
  173. package/src/features/role/data/index.ts +0 -1
  174. package/src/features/s3/data/index.ts +0 -1
  175. package/src/features/user/components/forms/RoleUserAdd.tsx +4 -2
  176. package/src/features/user/components/forms/UserDeleter.tsx +2 -1
  177. package/src/features/user/components/forms/UserEditor.tsx +6 -3
  178. package/src/features/user/components/forms/UserMultiSelect.tsx +2 -1
  179. package/src/features/user/components/forms/UserReactivator.tsx +2 -1
  180. package/src/features/user/components/forms/UserResentInvitationEmail.tsx +2 -1
  181. package/src/features/user/components/forms/UserSelector.tsx +2 -1
  182. package/src/features/user/components/lists/AdminUsersList.tsx +2 -1
  183. package/src/features/user/components/lists/CompanyUsersList.tsx +2 -1
  184. package/src/features/user/components/lists/RelevantUsersList.tsx +2 -1
  185. package/src/features/user/components/lists/RoleUsersList.tsx +2 -1
  186. package/src/features/user/components/lists/UsersListByContentIds.tsx +2 -1
  187. package/src/features/user/data/index.ts +0 -1
  188. package/src/features/user/hooks/useUserSearch.ts +2 -1
  189. package/src/features/user/index.ts +1 -0
  190. package/src/hooks/useDataListRetriever.ts +4 -4
  191. package/src/hooks/usePageTracker.ts +1 -1
  192. package/src/hooks/usePushNotifications.ts +3 -2
  193. package/src/hooks/useSocket.ts +1 -1
  194. package/src/index.ts +7 -2
  195. package/src/roles/config.ts +0 -15
  196. package/src/roles/index.ts +1 -9
  197. package/src/server/JsonApiServer.ts +249 -0
  198. package/src/server/cache.ts +1 -1
  199. package/src/server/index.ts +13 -0
  200. package/src/server/request.ts +32 -18
  201. package/src/server/token.ts +1 -1
  202. package/dist/ApiData-DPKNfY-9.d.mts +0 -10
  203. package/dist/ApiData-DPKNfY-9.d.ts +0 -10
  204. package/dist/ApiDataInterface-DPP8s46n.d.mts +0 -21
  205. package/dist/ApiDataInterface-DPP8s46n.d.ts +0 -21
  206. package/dist/BlockNoteEditor-QV6ESIQA.js.map +0 -1
  207. package/dist/BlockNoteEditor-U2IHUVUF.mjs.map +0 -1
  208. package/dist/JsonApiRequest-UJ7FGIVI.js +0 -25
  209. package/dist/atoms/index.d.mts +0 -12
  210. package/dist/atoms/index.d.ts +0 -12
  211. package/dist/atoms/index.js +0 -9
  212. package/dist/atoms/index.js.map +0 -1
  213. package/dist/atoms/index.mjs +0 -9
  214. package/dist/chunk-2K3Q24UF.js.map +0 -1
  215. package/dist/chunk-3FBCC4G3.js +0 -8
  216. package/dist/chunk-3FBCC4G3.js.map +0 -1
  217. package/dist/chunk-3UELCPIN.js +0 -46
  218. package/dist/chunk-3UELCPIN.js.map +0 -1
  219. package/dist/chunk-5IET37O4.js +0 -4210
  220. package/dist/chunk-5IET37O4.js.map +0 -1
  221. package/dist/chunk-AYHKQWHH.js +0 -68
  222. package/dist/chunk-AYHKQWHH.js.map +0 -1
  223. package/dist/chunk-DEYKTLA3.js +0 -1131
  224. package/dist/chunk-DEYKTLA3.js.map +0 -1
  225. package/dist/chunk-E2HRC2OG.js.map +0 -1
  226. package/dist/chunk-EFJEWLRL.js.map +0 -1
  227. package/dist/chunk-FMBQZAIP.mjs +0 -490
  228. package/dist/chunk-FMBQZAIP.mjs.map +0 -1
  229. package/dist/chunk-HR4H2FP7.mjs.map +0 -1
  230. package/dist/chunk-HTLEKZND.mjs.map +0 -1
  231. package/dist/chunk-JGFWIT2E.mjs +0 -1131
  232. package/dist/chunk-JGFWIT2E.mjs.map +0 -1
  233. package/dist/chunk-P2F54I7Q.mjs +0 -4210
  234. package/dist/chunk-P2F54I7Q.mjs.map +0 -1
  235. package/dist/chunk-PO5Q3H5I.js +0 -1375
  236. package/dist/chunk-PO5Q3H5I.js.map +0 -1
  237. package/dist/chunk-Q2N6SQYW.mjs +0 -8
  238. package/dist/chunk-Q2N6SQYW.mjs.map +0 -1
  239. package/dist/chunk-Q4FXESVT.js +0 -490
  240. package/dist/chunk-Q4FXESVT.js.map +0 -1
  241. package/dist/chunk-R2ONK22M.mjs +0 -7985
  242. package/dist/chunk-R2ONK22M.mjs.map +0 -1
  243. package/dist/chunk-SM63SZCP.mjs +0 -68
  244. package/dist/chunk-SM63SZCP.mjs.map +0 -1
  245. package/dist/chunk-SZZYEG3P.mjs +0 -46
  246. package/dist/chunk-SZZYEG3P.mjs.map +0 -1
  247. package/dist/chunk-YF5XQZDR.mjs.map +0 -1
  248. package/dist/config-BmnK65TD.d.mts +0 -35
  249. package/dist/config-BmnK65TD.d.ts +0 -35
  250. package/dist/config-DQeAo9Kf.d.mts +0 -49
  251. package/dist/config-DQeAo9Kf.d.ts +0 -49
  252. package/dist/content.fields-cHPdM8GJ.d.mts +0 -27
  253. package/dist/content.fields-cHPdM8GJ.d.ts +0 -27
  254. package/dist/d3.link.interface-ClC4Irqp.d.mts +0 -21
  255. package/dist/d3.link.interface-ClC4Irqp.d.ts +0 -21
  256. package/dist/features/index.d.mts +0 -476
  257. package/dist/features/index.d.ts +0 -476
  258. package/dist/features/index.js +0 -87
  259. package/dist/features/index.js.map +0 -1
  260. package/dist/features/index.mjs +0 -87
  261. package/dist/hooks/index.d.mts +0 -69
  262. package/dist/hooks/index.d.ts +0 -69
  263. package/dist/hooks/index.js +0 -56
  264. package/dist/hooks/index.js.map +0 -1
  265. package/dist/hooks/index.mjs +0 -56
  266. package/dist/hooks/index.mjs.map +0 -1
  267. package/dist/interfaces/index.d.mts +0 -4
  268. package/dist/interfaces/index.d.ts +0 -4
  269. package/dist/interfaces/index.js +0 -2
  270. package/dist/interfaces/index.js.map +0 -1
  271. package/dist/interfaces/index.mjs +0 -2
  272. package/dist/interfaces/index.mjs.map +0 -1
  273. package/dist/notification.interface-BBgMUdLR.d.mts +0 -14
  274. package/dist/notification.interface-gyvT-Z2F.d.ts +0 -14
  275. package/dist/permissions/index.d.mts +0 -41
  276. package/dist/permissions/index.d.ts +0 -41
  277. package/dist/permissions/index.js +0 -14
  278. package/dist/permissions/index.js.map +0 -1
  279. package/dist/permissions/index.mjs +0 -14
  280. package/dist/permissions/index.mjs.map +0 -1
  281. package/dist/request-7FE3LJLV.mjs +0 -9
  282. package/dist/request-7FE3LJLV.mjs.map +0 -1
  283. package/dist/request-QFS7NEIE.js +0 -9
  284. package/dist/request-QFS7NEIE.js.map +0 -1
  285. package/dist/roles/index.d.mts +0 -39
  286. package/dist/roles/index.d.ts +0 -39
  287. package/dist/roles/index.js +0 -18
  288. package/dist/roles/index.js.map +0 -1
  289. package/dist/roles/index.mjs +0 -18
  290. package/dist/roles/index.mjs.map +0 -1
  291. package/dist/shadcnui/index.d.mts +0 -698
  292. package/dist/shadcnui/index.d.ts +0 -698
  293. package/dist/shadcnui/index.js +0 -468
  294. package/dist/shadcnui/index.js.map +0 -1
  295. package/dist/shadcnui/index.mjs +0 -467
  296. package/dist/shadcnui/index.mjs.map +0 -1
  297. package/dist/token-IJSPOMW6.mjs +0 -9
  298. package/dist/token-IJSPOMW6.mjs.map +0 -1
  299. package/dist/token-UYE7CV6X.js +0 -9
  300. package/dist/token-UYE7CV6X.js.map +0 -1
  301. package/dist/types-B2QRyqyK.d.ts +0 -39
  302. package/dist/types-CgvNmxTd.d.mts +0 -39
  303. package/dist/types-t2PyXhDu.d.mts +0 -116
  304. package/dist/types-t2PyXhDu.d.ts +0 -116
  305. package/dist/user.interface-CAsTIbuQ.d.mts +0 -85
  306. package/dist/user.interface-CbWqMaaU.d.ts +0 -85
  307. package/dist/utils/index.d.mts +0 -224
  308. package/dist/utils/index.d.ts +0 -224
  309. package/dist/utils/index.js +0 -46
  310. package/dist/utils/index.js.map +0 -1
  311. package/dist/utils/index.mjs +0 -46
  312. package/dist/utils/index.mjs.map +0 -1
  313. /package/dist/{JsonApiRequest-6UR7DIAR.mjs.map → JsonApiRequest-VCCRO732.mjs.map} +0 -0
  314. /package/dist/{chunk-IKBA4AHN.mjs.map → chunk-F4Y3GZG4.mjs.map} +0 -0
  315. /package/dist/{chunk-HAG77QBV.mjs.map → chunk-K4W5QXL5.mjs.map} +0 -0
  316. /package/dist/{atoms/index.mjs.map → request-XABCMU25.mjs.map} +0 -0
  317. /package/dist/{features/index.mjs.map → token-EOK3N45S.mjs.map} +0 -0
package/README.md CHANGED
@@ -58,24 +58,28 @@ pnpm add @carlonicora/nextjs-jsonapi
58
58
  If you want to use the package as a git submodule (for development or before npm release):
59
59
 
60
60
  **1. Add the submodule**
61
+
61
62
  ```bash
62
63
  cd /path/to/your-project
63
64
  git submodule add https://github.com/carlonicora/nextjs-jsonapi packages/nextjs-jsonapi
64
65
  ```
65
66
 
66
67
  **2. Verify it worked**
68
+
67
69
  ```bash
68
70
  git submodule status
69
71
  # Should show: <commit-sha> packages/nextjs-jsonapi (heads/master)
70
72
  ```
71
73
 
72
74
  **3. Commit the submodule**
75
+
73
76
  ```bash
74
77
  git add .gitmodules packages/nextjs-jsonapi
75
78
  git commit -m "Add nextjs-jsonapi as submodule"
76
79
  ```
77
80
 
78
81
  **4. Update your `package.json`** (e.g., `apps/web/package.json`)
82
+
79
83
  ```json
80
84
  {
81
85
  "dependencies": {
@@ -85,6 +89,7 @@ git commit -m "Add nextjs-jsonapi as submodule"
85
89
  ```
86
90
 
87
91
  **5. Ensure `pnpm-workspace.yaml` includes packages**
92
+
88
93
  ```yaml
89
94
  packages:
90
95
  - "apps/*"
@@ -92,12 +97,14 @@ packages:
92
97
  ```
93
98
 
94
99
  **6. Install and build**
100
+
95
101
  ```bash
96
102
  pnpm install
97
103
  cd packages/nextjs-jsonapi && pnpm build && cd ../..
98
104
  ```
99
105
 
100
106
  **For CI/CD (GitHub Actions)**, add `submodules: recursive` to your checkout step:
107
+
101
108
  ```yaml
102
109
  - uses: actions/checkout@v4
103
110
  with:
@@ -105,6 +112,7 @@ cd packages/nextjs-jsonapi && pnpm build && cd ../..
105
112
  ```
106
113
 
107
114
  **Cloning a project with submodules:**
115
+
108
116
  ```bash
109
117
  # When cloning fresh
110
118
  git clone --recurse-submodules https://github.com/your/repo.git
@@ -115,12 +123,12 @@ git submodule update --init --recursive
115
123
 
116
124
  ### Peer Dependencies
117
125
 
118
- | Package | Version | Required | Purpose |
119
- | ----------------- | --------- | -------- | -------------------------------- |
120
- | `next` | >=14.0.0 | Yes | Next.js framework |
121
- | `react` | >=18.0.0 | Yes | React library |
122
- | `react-dom` | >=18.0.0 | Yes | React DOM |
123
- | `react-hook-form` | >=7.0.0 | Optional | Form handling (for form components) |
126
+ | Package | Version | Required | Purpose |
127
+ | ----------------- | -------- | -------- | ----------------------------------- |
128
+ | `next` | >=14.0.0 | Yes | Next.js framework |
129
+ | `react` | >=18.0.0 | Yes | React library |
130
+ | `react-dom` | >=18.0.0 | Yes | React DOM |
131
+ | `react-hook-form` | >=7.0.0 | Optional | Form handling (for form components) |
124
132
 
125
133
  ## Quick Start
126
134
 
@@ -319,9 +327,9 @@ import {
319
327
  JsonApiDataFactory,
320
328
 
321
329
  // Registries
322
- ModuleRegistry, // Register modules during bootstrap
323
- DataClassRegistry, // Register model classes for JSON:API translation
324
- Modules, // Access registered modules (e.g., Modules.Article)
330
+ ModuleRegistry, // Register modules during bootstrap
331
+ DataClassRegistry, // Register model classes for JSON:API translation
332
+ Modules, // Access registered modules (e.g., Modules.Article)
325
333
 
326
334
  // Endpoint builder
327
335
  EndpointBuilder,
@@ -360,11 +368,7 @@ import {
360
368
  Server-side request utilities:
361
369
 
362
370
  ```typescript
363
- import {
364
- serverRequest,
365
- getServerToken,
366
- getCacheProfile,
367
- } from "@carlonicora/nextjs-jsonapi/server";
371
+ import { serverRequest, getServerToken, getCacheProfile } from "@carlonicora/nextjs-jsonapi/server";
368
372
  ```
369
373
 
370
374
  ### Permissions (`/permissions`)
@@ -387,11 +391,11 @@ Built-in feature modules that can be used directly in your application:
387
391
  ```typescript
388
392
  import {
389
393
  // S3 Module (for file uploads via pre-signed URLs)
390
- S3Module, // Module definition factory
391
- S3Service, // Service with getPreSignedUrl, getSignedUrl, deleteFile
392
- S3, // Data class
393
- type S3Interface, // Response interface
394
- type S3Input, // Input parameters
394
+ S3Module, // Module definition factory
395
+ S3Service, // Service with getPreSignedUrl, getSignedUrl, deleteFile
396
+ S3, // Data class
397
+ type S3Interface, // Response interface
398
+ type S3Input, // Input parameters
395
399
  } from "@carlonicora/nextjs-jsonapi/features";
396
400
 
397
401
  // Usage example:
@@ -414,11 +418,11 @@ Utility functions:
414
418
 
415
419
  ```typescript
416
420
  import {
417
- cn, // Class name merger (clsx + tailwind-merge)
418
- composeRefs, // Compose multiple refs
419
- useComposedRefs, // Hook for composing refs
420
- useIsMobile, // Mobile detection hook
421
- type ClassValue, // Type for cn function
421
+ cn, // Class name merger (clsx + tailwind-merge)
422
+ composeRefs, // Compose multiple refs
423
+ useComposedRefs, // Hook for composing refs
424
+ useIsMobile, // Mobile detection hook
425
+ type ClassValue, // Type for cn function
422
426
  } from "@carlonicora/nextjs-jsonapi/utils";
423
427
  ```
424
428
 
@@ -429,51 +433,128 @@ All shadcn/ui components (requires `"use client"`):
429
433
  ```typescript
430
434
  import {
431
435
  // UI Components (41)
432
- Accordion, AccordionItem, AccordionTrigger, AccordionContent,
433
- Alert, AlertTitle, AlertDescription,
434
- AlertDialog, AlertDialogTrigger, AlertDialogContent, /* ... */
435
- Avatar, AvatarImage, AvatarFallback,
436
- Badge, badgeVariants,
437
- Breadcrumb, BreadcrumbList, BreadcrumbItem, /* ... */
438
- Button, buttonVariants,
436
+ Accordion,
437
+ AccordionItem,
438
+ AccordionTrigger,
439
+ AccordionContent,
440
+ Alert,
441
+ AlertTitle,
442
+ AlertDescription,
443
+ AlertDialog,
444
+ AlertDialogTrigger,
445
+ AlertDialogContent /* ... */,
446
+ Avatar,
447
+ AvatarImage,
448
+ AvatarFallback,
449
+ Badge,
450
+ badgeVariants,
451
+ Breadcrumb,
452
+ BreadcrumbList,
453
+ BreadcrumbItem /* ... */,
454
+ Button,
455
+ buttonVariants,
439
456
  Calendar,
440
- Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter,
441
- Carousel, CarouselContent, CarouselItem, CarouselPrevious, CarouselNext,
442
- ChartContainer, ChartTooltip, ChartTooltipContent, ChartLegend, /* ... */
457
+ Card,
458
+ CardHeader,
459
+ CardTitle,
460
+ CardDescription,
461
+ CardContent,
462
+ CardFooter,
463
+ Carousel,
464
+ CarouselContent,
465
+ CarouselItem,
466
+ CarouselPrevious,
467
+ CarouselNext,
468
+ ChartContainer,
469
+ ChartTooltip,
470
+ ChartTooltipContent,
471
+ ChartLegend /* ... */,
443
472
  Checkbox,
444
- Collapsible, CollapsibleTrigger, CollapsibleContent,
445
- Command, CommandInput, CommandList, CommandItem, /* ... */
446
- ContextMenu, ContextMenuTrigger, ContextMenuContent, /* ... */
447
- Dialog, DialogTrigger, DialogContent, DialogHeader, /* ... */
448
- Drawer, DrawerTrigger, DrawerContent, /* ... */
449
- DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, /* ... */
450
- Form, FormField, FormItem, FormLabel, FormControl, /* ... */
451
- HoverCard, HoverCardTrigger, HoverCardContent,
473
+ Collapsible,
474
+ CollapsibleTrigger,
475
+ CollapsibleContent,
476
+ Command,
477
+ CommandInput,
478
+ CommandList,
479
+ CommandItem /* ... */,
480
+ ContextMenu,
481
+ ContextMenuTrigger,
482
+ ContextMenuContent /* ... */,
483
+ Dialog,
484
+ DialogTrigger,
485
+ DialogContent,
486
+ DialogHeader /* ... */,
487
+ Drawer,
488
+ DrawerTrigger,
489
+ DrawerContent /* ... */,
490
+ DropdownMenu,
491
+ DropdownMenuTrigger,
492
+ DropdownMenuContent /* ... */,
493
+ Form,
494
+ FormField,
495
+ FormItem,
496
+ FormLabel,
497
+ FormControl /* ... */,
498
+ HoverCard,
499
+ HoverCardTrigger,
500
+ HoverCardContent,
452
501
  Input,
453
502
  Label,
454
- NavigationMenu, NavigationMenuList, NavigationMenuItem, /* ... */
455
- Popover, PopoverTrigger, PopoverContent,
503
+ NavigationMenu,
504
+ NavigationMenuList,
505
+ NavigationMenuItem /* ... */,
506
+ Popover,
507
+ PopoverTrigger,
508
+ PopoverContent,
456
509
  Progress,
457
- RadioGroup, RadioGroupItem,
458
- ScrollArea, ScrollBar,
459
- Select, SelectTrigger, SelectValue, SelectContent, SelectItem, /* ... */
510
+ RadioGroup,
511
+ RadioGroupItem,
512
+ ScrollArea,
513
+ ScrollBar,
514
+ Select,
515
+ SelectTrigger,
516
+ SelectValue,
517
+ SelectContent,
518
+ SelectItem /* ... */,
460
519
  Separator,
461
- Sheet, SheetTrigger, SheetContent, SheetHeader, /* ... */
462
- Sidebar, SidebarProvider, SidebarContent, SidebarMenu, /* ... */
520
+ Sheet,
521
+ SheetTrigger,
522
+ SheetContent,
523
+ SheetHeader /* ... */,
524
+ Sidebar,
525
+ SidebarProvider,
526
+ SidebarContent,
527
+ SidebarMenu /* ... */,
463
528
  Skeleton,
464
529
  Slider,
465
- Sonner, Toaster, toast,
530
+ Sonner,
531
+ Toaster,
532
+ toast,
466
533
  Switch,
467
- Table, TableHeader, TableBody, TableRow, TableHead, TableCell, /* ... */
468
- Tabs, TabsList, TabsTrigger, TabsContent,
534
+ Table,
535
+ TableHeader,
536
+ TableBody,
537
+ TableRow,
538
+ TableHead,
539
+ TableCell /* ... */,
540
+ Tabs,
541
+ TabsList,
542
+ TabsTrigger,
543
+ TabsContent,
469
544
  Textarea,
470
- Toggle, toggleVariants,
471
- Tooltip, TooltipTrigger, TooltipContent, TooltipProvider,
545
+ Toggle,
546
+ toggleVariants,
547
+ Tooltip,
548
+ TooltipTrigger,
549
+ TooltipContent,
550
+ TooltipProvider,
472
551
 
473
552
  // Custom Components (3)
474
- Kanban, KanbanColumn, KanbanItem, // Drag-and-drop Kanban board
475
- Link, // next-intl compatible Link
476
- MultiSelect, // Multi-select dropdown
553
+ Kanban,
554
+ KanbanColumn,
555
+ KanbanItem, // Drag-and-drop Kanban board
556
+ Link, // next-intl compatible Link
557
+ MultiSelect, // Multi-select dropdown
477
558
  } from "@carlonicora/nextjs-jsonapi/shadcnui";
478
559
  ```
479
560
 
@@ -487,14 +568,14 @@ Fetch data from a JSON:API endpoint:
487
568
 
488
569
  ```typescript
489
570
  const response = await JsonApiGet({
490
- classKey: Modules.Article, // Module definition
491
- endpoint: "/articles/123", // API endpoint
492
- companyId: "company-uuid", // Optional: for multi-tenant apps
493
- language: "en", // Required: for i18n
571
+ classKey: Modules.Article, // Module definition
572
+ endpoint: "/articles/123", // API endpoint
573
+ companyId: "company-uuid", // Optional: for multi-tenant apps
574
+ language: "en", // Required: for i18n
494
575
  });
495
576
 
496
577
  if (response.ok) {
497
- console.log(response.data); // Deserialized data
578
+ console.log(response.data); // Deserialized data
498
579
  console.log(response.pagination); // Pagination info
499
580
 
500
581
  // Navigate pages
@@ -516,9 +597,9 @@ const response = await JsonApiPost({
516
597
  language: "en",
517
598
 
518
599
  // Optional
519
- files: { attachment: file }, // File uploads
520
- overridesJsonApiCreation: false, // Use raw body instead of JSON:API format
521
- responseType: Modules.OtherType, // If response type differs
600
+ files: { attachment: file }, // File uploads
601
+ overridesJsonApiCreation: false, // Use raw body instead of JSON:API format
602
+ responseType: Modules.OtherType, // If response type differs
522
603
  });
523
604
  ```
524
605
 
@@ -555,21 +636,21 @@ Hook for fetching data with automatic refetching:
555
636
 
556
637
  ```typescript
557
638
  const {
558
- data, // Fetched data or null
559
- loading, // Loading state
560
- error, // Error message or null
561
- response, // Full API response
562
- refetch, // Manual refetch function
563
- hasNextPage, // Pagination: has next page
564
- hasPreviousPage, // Pagination: has previous page
565
- fetchNextPage, // Fetch next page
639
+ data, // Fetched data or null
640
+ loading, // Loading state
641
+ error, // Error message or null
642
+ response, // Full API response
643
+ refetch, // Manual refetch function
644
+ hasNextPage, // Pagination: has next page
645
+ hasPreviousPage, // Pagination: has previous page
646
+ fetchNextPage, // Fetch next page
566
647
  fetchPreviousPage, // Fetch previous page
567
648
  } = useJsonApiGet<Article>({
568
649
  classKey: Modules.Article,
569
650
  endpoint: `/articles/${id}`,
570
651
  companyId: companyId,
571
652
  options: {
572
- enabled: !!id, // Conditionally enable
653
+ enabled: !!id, // Conditionally enable
573
654
  deps: [someDependency], // Refetch when these change
574
655
  },
575
656
  });
@@ -581,12 +662,12 @@ Hook for mutations (POST, PUT, PATCH, DELETE):
581
662
 
582
663
  ```typescript
583
664
  const {
584
- data, // Result data or null
585
- loading, // Loading state
586
- error, // Error message or null
587
- response, // Full API response
588
- mutate, // Execute the mutation
589
- reset, // Reset state
665
+ data, // Result data or null
666
+ loading, // Loading state
667
+ error, // Error message or null
668
+ response, // Full API response
669
+ mutate, // Execute the mutation
670
+ reset, // Reset state
590
671
  } = useJsonApiMutation<Article>({
591
672
  method: "POST",
592
673
  classKey: Modules.Article,
@@ -669,56 +750,56 @@ The package includes 44 pre-built shadcn/ui components:
669
750
 
670
751
  ### Standard UI Components (41)
671
752
 
672
- | Component | Description |
673
- |-----------|-------------|
674
- | `Accordion` | Collapsible content sections |
675
- | `Alert` | Callout for important messages |
676
- | `AlertDialog` | Modal dialog for confirmations |
677
- | `Avatar` | User profile images |
678
- | `Badge` | Status indicators and labels |
679
- | `Breadcrumb` | Navigation breadcrumbs |
680
- | `Button` | Click actions with variants |
681
- | `Calendar` | Date picker calendar |
682
- | `Card` | Content container |
683
- | `Carousel` | Sliding content panels |
684
- | `Chart` | Data visualization (Recharts) |
685
- | `Checkbox` | Toggle options |
686
- | `Collapsible` | Expandable sections |
687
- | `Command` | Command palette (cmdk) |
688
- | `ContextMenu` | Right-click menus |
689
- | `Dialog` | Modal windows |
690
- | `Drawer` | Sliding side panels (Vaul) |
691
- | `DropdownMenu` | Dropdown menus |
692
- | `Form` | Form handling (react-hook-form) |
693
- | `HoverCard` | Hover-triggered cards |
694
- | `Input` | Text input fields |
695
- | `Label` | Form labels |
696
- | `NavigationMenu` | Navigation menus |
697
- | `Popover` | Floating content |
698
- | `Progress` | Progress indicators |
699
- | `RadioGroup` | Radio button groups |
700
- | `ScrollArea` | Custom scrollbars |
701
- | `Select` | Dropdown selects |
702
- | `Separator` | Visual dividers |
703
- | `Sheet` | Side panels |
704
- | `Sidebar` | Application sidebars |
705
- | `Skeleton` | Loading placeholders |
706
- | `Slider` | Range sliders |
707
- | `Sonner` | Toast notifications |
708
- | `Switch` | Toggle switches |
709
- | `Table` | Data tables |
710
- | `Tabs` | Tabbed interfaces |
711
- | `Textarea` | Multi-line text input |
712
- | `Toggle` | Toggle buttons |
713
- | `Tooltip` | Hover tooltips |
753
+ | Component | Description |
754
+ | ---------------- | ------------------------------- |
755
+ | `Accordion` | Collapsible content sections |
756
+ | `Alert` | Callout for important messages |
757
+ | `AlertDialog` | Modal dialog for confirmations |
758
+ | `Avatar` | User profile images |
759
+ | `Badge` | Status indicators and labels |
760
+ | `Breadcrumb` | Navigation breadcrumbs |
761
+ | `Button` | Click actions with variants |
762
+ | `Calendar` | Date picker calendar |
763
+ | `Card` | Content container |
764
+ | `Carousel` | Sliding content panels |
765
+ | `Chart` | Data visualization (Recharts) |
766
+ | `Checkbox` | Toggle options |
767
+ | `Collapsible` | Expandable sections |
768
+ | `Command` | Command palette (cmdk) |
769
+ | `ContextMenu` | Right-click menus |
770
+ | `Dialog` | Modal windows |
771
+ | `Drawer` | Sliding side panels (Vaul) |
772
+ | `DropdownMenu` | Dropdown menus |
773
+ | `Form` | Form handling (react-hook-form) |
774
+ | `HoverCard` | Hover-triggered cards |
775
+ | `Input` | Text input fields |
776
+ | `Label` | Form labels |
777
+ | `NavigationMenu` | Navigation menus |
778
+ | `Popover` | Floating content |
779
+ | `Progress` | Progress indicators |
780
+ | `RadioGroup` | Radio button groups |
781
+ | `ScrollArea` | Custom scrollbars |
782
+ | `Select` | Dropdown selects |
783
+ | `Separator` | Visual dividers |
784
+ | `Sheet` | Side panels |
785
+ | `Sidebar` | Application sidebars |
786
+ | `Skeleton` | Loading placeholders |
787
+ | `Slider` | Range sliders |
788
+ | `Sonner` | Toast notifications |
789
+ | `Switch` | Toggle switches |
790
+ | `Table` | Data tables |
791
+ | `Tabs` | Tabbed interfaces |
792
+ | `Textarea` | Multi-line text input |
793
+ | `Toggle` | Toggle buttons |
794
+ | `Tooltip` | Hover tooltips |
714
795
 
715
796
  ### Custom Components (3)
716
797
 
717
- | Component | Description |
718
- |-----------|-------------|
719
- | `Kanban` | Drag-and-drop Kanban board (dnd-kit) |
720
- | `Link` | next-intl compatible link wrapper |
721
- | `MultiSelect` | Multi-select dropdown with badges |
798
+ | Component | Description |
799
+ | ------------- | ------------------------------------ |
800
+ | `Kanban` | Drag-and-drop Kanban board (dnd-kit) |
801
+ | `Link` | next-intl compatible link wrapper |
802
+ | `MultiSelect` | Multi-select dropdown with badges |
722
803
 
723
804
  ### Usage Example
724
805
 
@@ -1,4 +1,13 @@
1
- import { A as ApiDataInterface } from './ApiDataInterface-DPP8s46n.js';
1
+ import { A as ApiDataInterface } from './notification.interface-BdcwkuQE.mjs';
2
+
3
+ type ApiData = {
4
+ data: any;
5
+ ok: boolean;
6
+ status: number;
7
+ statusText: string;
8
+ token?: string;
9
+ refreshToken?: string;
10
+ };
2
11
 
3
12
  interface ApiResponseInterface {
4
13
  ok: boolean;
@@ -13,4 +22,4 @@ interface ApiResponseInterface {
13
22
  error: string;
14
23
  }
15
24
 
16
- export type { ApiResponseInterface as A };
25
+ export type { ApiData as A, ApiResponseInterface as a };
@@ -1,4 +1,13 @@
1
- import { A as ApiDataInterface } from './ApiDataInterface-DPP8s46n.mjs';
1
+ import { A as ApiDataInterface } from './notification.interface-BdcwkuQE.js';
2
+
3
+ type ApiData = {
4
+ data: any;
5
+ ok: boolean;
6
+ status: number;
7
+ statusText: string;
8
+ token?: string;
9
+ refreshToken?: string;
10
+ };
2
11
 
3
12
  interface ApiResponseInterface {
4
13
  ok: boolean;
@@ -13,4 +22,4 @@ interface ApiResponseInterface {
13
22
  error: string;
14
23
  }
15
24
 
16
- export type { ApiResponseInterface as A };
25
+ export type { ApiData as A, ApiResponseInterface as a };
@@ -2,27 +2,22 @@
2
2
 
3
3
 
4
4
 
5
- var _chunkE2HRC2OGjs = require('./chunk-E2HRC2OG.js');
6
- require('./chunk-IBS6NI7D.js');
7
-
8
5
 
9
- var _chunk5IET37O4js = require('./chunk-5IET37O4.js');
6
+ var _chunkSVX7E6RRjs = require('./chunk-SVX7E6RR.js');
7
+ require('./chunk-AGWQ75PQ.js');
10
8
 
11
9
 
10
+ var _chunkLOSPCUCFjs = require('./chunk-LOSPCUCF.js');
11
+ require('./chunk-ZUEEIQHW.js');
12
+ require('./chunk-CSM6AIAP.js');
12
13
 
13
14
 
14
- var _chunkDEYKTLA3js = require('./chunk-DEYKTLA3.js');
15
15
 
16
16
 
17
- var _chunkPO5Q3H5Ijs = require('./chunk-PO5Q3H5I.js');
18
- require('./chunk-LXKSUWAV.js');
19
- require('./chunk-AYHKQWHH.js');
20
- require('./chunk-PMXG5WBC.js');
21
- require('./chunk-3UELCPIN.js');
22
- require('./chunk-3FBCC4G3.js');
23
- require('./chunk-Q4FXESVT.js');
17
+ var _chunk2Z56AS2Sjs = require('./chunk-2Z56AS2S.js');
18
+ require('./chunk-IBS6NI7D.js');
24
19
  require('./chunk-AGAJMJ4T.js');
25
- require('./chunk-32HM6MDD.js');
20
+ require('./chunk-LXKSUWAV.js');
26
21
 
27
22
 
28
23
  var _chunk7QVYU63Ejs = require('./chunk-7QVYU63E.js');
@@ -88,7 +83,7 @@ var createDiffActionsInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name
88
83
  const diffIds = props.inlineContent.props.diffIds;
89
84
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "diff-actions-container mx-2 inline-flex items-center gap-1 align-middle", children: [
90
85
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
91
- _chunk5IET37O4js.Button,
86
+ _chunkSVX7E6RRjs.Button,
92
87
  {
93
88
  title: "Accept change",
94
89
  onClick: (e) => {
@@ -100,7 +95,7 @@ var createDiffActionsInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name
100
95
  }
101
96
  ),
102
97
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
103
- _chunk5IET37O4js.Button,
98
+ _chunkSVX7E6RRjs.Button,
104
99
  {
105
100
  title: "Reject change",
106
101
  className: "mx-2 p-0",
@@ -130,7 +125,7 @@ function BlockNoteEditor({
130
125
  bordered
131
126
  }) {
132
127
  const t = _nextintl.useTranslations.call(void 0, );
133
- const { company } = _chunkE2HRC2OGjs.useCurrentUserContext.call(void 0, );
128
+ const { company } = _chunkSVX7E6RRjs.useCurrentUserContext.call(void 0, );
134
129
  const [acceptedChanges, setAcceptedChanges] = _react3.useState.call(void 0, /* @__PURE__ */ new Set());
135
130
  const [rejectedChanges, setRejectedChanges] = _react3.useState.call(void 0, /* @__PURE__ */ new Set());
136
131
  const editorRef = _react3.useRef.call(void 0, null);
@@ -166,7 +161,7 @@ function BlockNoteEditor({
166
161
  const uploadImage = _react3.useCallback.call(void 0,
167
162
  async (file) => {
168
163
  if (!company) {
169
- _chunkE2HRC2OGjs.errorToast.call(void 0, {
164
+ _chunkSVX7E6RRjs.errorToast.call(void 0, {
170
165
  title: t(`generic.errors.upload`),
171
166
  error: t(`generic.errors.upload_description`)
172
167
  });
@@ -174,7 +169,7 @@ function BlockNoteEditor({
174
169
  }
175
170
  const fileType = file.type;
176
171
  const key = `companies/${company.id}/${type}/${id}/${file.name}`;
177
- const s3 = await _chunkPO5Q3H5Ijs.S3Service.getPreSignedUrl({
172
+ const s3 = await _chunkLOSPCUCFjs.S3Service.getPreSignedUrl({
178
173
  key,
179
174
  contentType: fileType,
180
175
  isPublic: true
@@ -184,7 +179,7 @@ function BlockNoteEditor({
184
179
  headers: s3.headers,
185
180
  body: file
186
181
  });
187
- const signedImage = await _chunkPO5Q3H5Ijs.S3Service.getSignedUrl({
182
+ const signedImage = await _chunkLOSPCUCFjs.S3Service.getSignedUrl({
188
183
  key,
189
184
  isPublic: true
190
185
  });
@@ -213,8 +208,8 @@ function BlockNoteEditor({
213
208
  const processedContent = _react3.useMemo.call(void 0, () => {
214
209
  if (diffContent && initialContent) {
215
210
  try {
216
- const diffResult = _chunkDEYKTLA3js.BlockNoteDiffUtil.diff(initialContent, diffContent);
217
- const renderedDiff = _chunkDEYKTLA3js.BlockNoteWordDiffRendererUtil.renderWordDiffs(
211
+ const diffResult = _chunk2Z56AS2Sjs.BlockNoteDiffUtil.diff(initialContent, diffContent);
212
+ const renderedDiff = _chunk2Z56AS2Sjs.BlockNoteWordDiffRendererUtil.renderWordDiffs(
218
213
  diffResult.blocks,
219
214
  handleAcceptChange,
220
215
  handleRejectChange,
@@ -372,7 +367,7 @@ function BlockNoteEditor({
372
367
  },
373
368
  [editor]
374
369
  );
375
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: editorRef, className: _chunkDEYKTLA3js.cn.call(void 0, bordered ? "rounded-md border" : "", "w-full"), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
370
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { ref: editorRef, className: _chunk2Z56AS2Sjs.cn.call(void 0, bordered ? "rounded-md border" : "", "w-full"), children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
376
371
  _shadcn.BlockNoteView,
377
372
  {
378
373
  editor,
@@ -380,7 +375,7 @@ function BlockNoteEditor({
380
375
  editable: onChange !== void 0,
381
376
  formattingToolbar: false,
382
377
  theme: "light",
383
- className: _chunkDEYKTLA3js.cn.call(void 0, `BlockNoteView ${onChange ? "min-h-96 p-4" : ""}`, className, size === "sm" && "small"),
378
+ className: _chunk2Z56AS2Sjs.cn.call(void 0, `BlockNoteView ${onChange ? "min-h-96 p-4" : ""}`, className, size === "sm" && "small"),
384
379
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlockNoteEditorFormattingToolbar, {})
385
380
  }
386
381
  ) });
@@ -389,4 +384,4 @@ _chunk7QVYU63Ejs.__name.call(void 0, BlockNoteEditor, "BlockNoteEditor");
389
384
 
390
385
 
391
386
  exports.default = BlockNoteEditor;
392
- //# sourceMappingURL=BlockNoteEditor-QV6ESIQA.js.map
387
+ //# sourceMappingURL=BlockNoteEditor-7FM7B737.js.map