@carlonicora/nextjs-jsonapi 1.5.0 → 1.7.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 (278) hide show
  1. package/dist/{ApiResponseInterface-DDI7QQPR.d.ts → ApiResponseInterface-DMwITHYP.d.mts} +11 -2
  2. package/dist/{ApiResponseInterface-BHN5D9r5.d.mts → ApiResponseInterface-DWgIAXI-.d.ts} +11 -2
  3. package/dist/AuthComponent-hxOPs9o8.d.mts +11 -0
  4. package/dist/AuthComponent-hxOPs9o8.d.ts +11 -0
  5. package/dist/{BlockNoteEditor-G6AK2NWA.js → BlockNoteEditor-IJASTIUZ.js} +16 -23
  6. package/dist/BlockNoteEditor-IJASTIUZ.js.map +1 -0
  7. package/dist/{BlockNoteEditor-AIEEQM6A.mjs → BlockNoteEditor-M6TUP3NT.mjs} +8 -15
  8. package/dist/BlockNoteEditor-M6TUP3NT.mjs.map +1 -0
  9. package/dist/JsonApiRequest-2OM5NDAW.js +24 -0
  10. package/dist/JsonApiRequest-2OM5NDAW.js.map +1 -0
  11. package/dist/{JsonApiRequest-6UR7DIAR.mjs → JsonApiRequest-SYZ6FGCA.mjs} +2 -3
  12. package/dist/{chunk-2K3Q24UF.js → chunk-3ZPK4QOB.js} +24 -14
  13. package/dist/chunk-3ZPK4QOB.js.map +1 -0
  14. package/dist/{chunk-VET55IZO.js → chunk-4L7OWJ2P.js} +10290 -7537
  15. package/dist/chunk-4L7OWJ2P.js.map +1 -0
  16. package/dist/chunk-4U5CJA44.mjs +3435 -0
  17. package/dist/chunk-4U5CJA44.mjs.map +1 -0
  18. package/dist/chunk-AGWQ75PQ.js +142 -0
  19. package/dist/chunk-AGWQ75PQ.js.map +1 -0
  20. package/dist/{chunk-PMXG5WBC.js → chunk-CKS6SVUK.js} +160 -24
  21. package/dist/chunk-CKS6SVUK.js.map +1 -0
  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-HR4H2FP7.mjs → chunk-KJ4ETLJB.mjs} +24 -14
  27. package/dist/chunk-KJ4ETLJB.mjs.map +1 -0
  28. package/dist/{chunk-IKBA4AHN.mjs → chunk-SAL7XW2G.mjs} +143 -7
  29. package/dist/chunk-SAL7XW2G.mjs.map +1 -0
  30. package/dist/chunk-TW4QRJ7D.mjs +12085 -0
  31. package/dist/chunk-TW4QRJ7D.mjs.map +1 -0
  32. package/dist/chunk-U4NADAHN.js +3435 -0
  33. package/dist/chunk-U4NADAHN.js.map +1 -0
  34. package/dist/{chunk-EFJEWLRL.js → chunk-YUO55Q5A.js} +1 -1
  35. package/dist/chunk-YUO55Q5A.js.map +1 -0
  36. package/dist/client/index.d.mts +161 -11
  37. package/dist/client/index.d.ts +161 -11
  38. package/dist/client/index.js +71 -11
  39. package/dist/client/index.js.map +1 -1
  40. package/dist/client/index.mjs +70 -10
  41. package/dist/components/index.d.mts +763 -11
  42. package/dist/components/index.d.ts +763 -11
  43. package/dist/components/index.js +462 -11
  44. package/dist/components/index.js.map +1 -1
  45. package/dist/components/index.mjs +463 -12
  46. package/dist/config-BdCV25CE.d.mts +69 -0
  47. package/dist/config-C9dt1QiR.d.ts +69 -0
  48. package/dist/content.fields-Ck5lkQ5d.d.mts +47 -0
  49. package/dist/content.fields-Ck5lkQ5d.d.ts +47 -0
  50. package/dist/{content.interface-CR2aBeAW.d.ts → content.interface-B6qP_ABq.d.mts} +2 -3
  51. package/dist/{content.interface-FpLfsaRm.d.mts → content.interface-DHAFLasV.d.ts} +2 -3
  52. package/dist/contexts/index.d.mts +13 -6
  53. package/dist/contexts/index.d.ts +13 -6
  54. package/dist/contexts/index.js +7 -11
  55. package/dist/contexts/index.js.map +1 -1
  56. package/dist/contexts/index.mjs +6 -10
  57. package/dist/core/index.d.mts +575 -8
  58. package/dist/core/index.d.ts +575 -8
  59. package/dist/core/index.js +131 -3
  60. package/dist/core/index.js.map +1 -1
  61. package/dist/core/index.mjs +132 -4
  62. package/dist/index.d.mts +95 -71
  63. package/dist/index.d.ts +95 -71
  64. package/dist/index.js +113 -7
  65. package/dist/index.js.map +1 -1
  66. package/dist/index.mjs +135 -29
  67. package/dist/notification.interface-agcMYCkg.d.mts +228 -0
  68. package/dist/notification.interface-agcMYCkg.d.ts +228 -0
  69. package/dist/request-GBLBPYFM.js +8 -0
  70. package/dist/request-GBLBPYFM.js.map +1 -0
  71. package/dist/request-XABCMU25.mjs +8 -0
  72. package/dist/s3.service-DYnmymEd.d.mts +350 -0
  73. package/dist/s3.service-DyXjKTqr.d.ts +350 -0
  74. package/dist/server/index.d.mts +69 -4
  75. package/dist/server/index.d.ts +69 -4
  76. package/dist/server/index.js +211 -5
  77. package/dist/server/index.js.map +1 -1
  78. package/dist/server/index.mjs +211 -5
  79. package/dist/server/index.mjs.map +1 -1
  80. package/dist/token-2UWQJY5T.js +8 -0
  81. package/dist/token-2UWQJY5T.js.map +1 -0
  82. package/dist/token-EOK3N45S.mjs +8 -0
  83. package/dist/{useSocket-L-An7_Mr.d.mts → useSocket-91s8M4Xd.d.mts} +1 -1
  84. package/dist/{useSocket-BV6yMdWS.d.ts → useSocket-DSR7vaXj.d.ts} +1 -1
  85. package/package.json +12 -52
  86. package/src/client/JsonApiClient.ts +248 -0
  87. package/src/client/config.ts +78 -0
  88. package/src/client/index.ts +6 -1
  89. package/src/components/containers/TabsContainer.tsx +1 -1
  90. package/src/components/editors/BlockNoteEditor.tsx +3 -1
  91. package/src/components/index.ts +4 -0
  92. package/src/components/navigations/Breadcrumb.tsx +1 -1
  93. package/src/components/navigations/Header.tsx +2 -2
  94. package/src/contexts/CommonContext.tsx +1 -1
  95. package/src/contexts/SocketContext.tsx +1 -1
  96. package/src/contexts/index.ts +3 -0
  97. package/src/core/abstracts/ClientAbstractService.ts +255 -0
  98. package/src/core/abstracts/ServerAbstractService.ts +180 -0
  99. package/src/core/abstracts/index.ts +2 -0
  100. package/src/core/index.ts +35 -3
  101. package/src/discord/config.ts +15 -0
  102. package/src/discord/index.ts +1 -0
  103. package/src/features/auth/components/details/LandingComponent.tsx +2 -2
  104. package/src/features/auth/components/forms/AcceptInvitation.tsx +1 -1
  105. package/src/features/auth/components/forms/ActivateAccount.tsx +1 -1
  106. package/src/features/auth/components/forms/Cookies.tsx +2 -1
  107. package/src/features/auth/components/forms/ForgotPassword.tsx +1 -1
  108. package/src/features/auth/components/forms/Login.tsx +1 -1
  109. package/src/features/auth/components/forms/Logout.tsx +1 -1
  110. package/src/features/auth/components/forms/RefreshUser.tsx +2 -1
  111. package/src/features/auth/components/forms/Register.tsx +1 -1
  112. package/src/features/auth/components/forms/ResetPassword.tsx +1 -1
  113. package/src/features/auth/data/auth.service.ts +1 -1
  114. package/src/features/auth/utils/AuthCookies.ts +1 -1
  115. package/src/features/company/components/forms/CompanyConfigurationEditor.tsx +4 -2
  116. package/src/features/company/components/forms/CompanyDeleter.tsx +2 -1
  117. package/src/features/company/components/forms/CompanyEditor.tsx +6 -3
  118. package/src/features/company/components/forms/CompanyLicense.tsx +4 -2
  119. package/src/features/company/components/lists/CompaniesList.tsx +2 -1
  120. package/src/features/content/components/lists/ContentsListById.tsx +2 -1
  121. package/src/features/content/components/lists/RelevantContentsList.tsx +2 -1
  122. package/src/features/notification/components/lists/NotificationsList.tsx +2 -1
  123. package/src/features/notification/contexts/NotificationContext.tsx +2 -1
  124. package/src/features/role/components/forms/RemoveUserFromRole.tsx +4 -2
  125. package/src/features/role/components/forms/UserRoleAdd.tsx +2 -1
  126. package/src/features/role/components/lists/RolesList.tsx +2 -1
  127. package/src/features/role/components/lists/UserRolesList.tsx +2 -1
  128. package/src/features/user/components/forms/RoleUserAdd.tsx +4 -2
  129. package/src/features/user/components/forms/UserDeleter.tsx +2 -1
  130. package/src/features/user/components/forms/UserEditor.tsx +6 -3
  131. package/src/features/user/components/forms/UserMultiSelect.tsx +2 -1
  132. package/src/features/user/components/forms/UserReactivator.tsx +2 -1
  133. package/src/features/user/components/forms/UserResentInvitationEmail.tsx +2 -1
  134. package/src/features/user/components/forms/UserSelector.tsx +2 -1
  135. package/src/features/user/components/lists/AdminUsersList.tsx +2 -1
  136. package/src/features/user/components/lists/CompanyUsersList.tsx +2 -1
  137. package/src/features/user/components/lists/RelevantUsersList.tsx +2 -1
  138. package/src/features/user/components/lists/RoleUsersList.tsx +2 -1
  139. package/src/features/user/components/lists/UsersListByContentIds.tsx +2 -1
  140. package/src/features/user/hooks/useUserSearch.ts +2 -1
  141. package/src/hooks/useDataListRetriever.ts +4 -4
  142. package/src/hooks/usePageTracker.ts +1 -1
  143. package/src/hooks/usePushNotifications.ts +3 -2
  144. package/src/hooks/useSocket.ts +1 -1
  145. package/src/index.ts +7 -2
  146. package/src/roles/config.ts +0 -15
  147. package/src/roles/index.ts +1 -9
  148. package/src/server/JsonApiServer.ts +249 -0
  149. package/src/server/cache.ts +1 -1
  150. package/src/server/index.ts +13 -0
  151. package/src/server/request.ts +32 -18
  152. package/src/server/token.ts +1 -1
  153. package/dist/AbstractService-BsY6W3Ej.d.mts +0 -109
  154. package/dist/AbstractService-wLid8dB0.d.ts +0 -109
  155. package/dist/ApiData-DPKNfY-9.d.mts +0 -10
  156. package/dist/ApiData-DPKNfY-9.d.ts +0 -10
  157. package/dist/ApiDataInterface-DPP8s46n.d.mts +0 -21
  158. package/dist/ApiDataInterface-DPP8s46n.d.ts +0 -21
  159. package/dist/AuthComponent-B_Ps2Vb9.d.ts +0 -78
  160. package/dist/AuthComponent-CxnGgvoh.d.mts +0 -78
  161. package/dist/BlockNoteEditor-AIEEQM6A.mjs.map +0 -1
  162. package/dist/BlockNoteEditor-G6AK2NWA.js.map +0 -1
  163. package/dist/JsonApiRequest-UJ7FGIVI.js +0 -25
  164. package/dist/JsonApiRequest-UJ7FGIVI.js.map +0 -1
  165. package/dist/atoms/index.d.mts +0 -12
  166. package/dist/atoms/index.d.ts +0 -12
  167. package/dist/atoms/index.js +0 -9
  168. package/dist/atoms/index.js.map +0 -1
  169. package/dist/atoms/index.mjs +0 -9
  170. package/dist/chunk-2K3Q24UF.js.map +0 -1
  171. package/dist/chunk-32HM6MDD.js +0 -98
  172. package/dist/chunk-32HM6MDD.js.map +0 -1
  173. package/dist/chunk-3FBCC4G3.js +0 -8
  174. package/dist/chunk-3FBCC4G3.js.map +0 -1
  175. package/dist/chunk-3UELCPIN.js +0 -46
  176. package/dist/chunk-3UELCPIN.js.map +0 -1
  177. package/dist/chunk-5IET37O4.js +0 -4210
  178. package/dist/chunk-5IET37O4.js.map +0 -1
  179. package/dist/chunk-AGAJMJ4T.js +0 -147
  180. package/dist/chunk-AGAJMJ4T.js.map +0 -1
  181. package/dist/chunk-AYHKQWHH.js +0 -68
  182. package/dist/chunk-AYHKQWHH.js.map +0 -1
  183. package/dist/chunk-DEYKTLA3.js +0 -1131
  184. package/dist/chunk-DEYKTLA3.js.map +0 -1
  185. package/dist/chunk-EFJEWLRL.js.map +0 -1
  186. package/dist/chunk-FMBQZAIP.mjs +0 -490
  187. package/dist/chunk-FMBQZAIP.mjs.map +0 -1
  188. package/dist/chunk-HAG77QBV.mjs +0 -98
  189. package/dist/chunk-HAG77QBV.mjs.map +0 -1
  190. package/dist/chunk-HR4H2FP7.mjs.map +0 -1
  191. package/dist/chunk-IKBA4AHN.mjs.map +0 -1
  192. package/dist/chunk-J7YDGYSW.mjs +0 -9332
  193. package/dist/chunk-J7YDGYSW.mjs.map +0 -1
  194. package/dist/chunk-JGFWIT2E.mjs +0 -1131
  195. package/dist/chunk-JGFWIT2E.mjs.map +0 -1
  196. package/dist/chunk-P2F54I7Q.mjs +0 -4210
  197. package/dist/chunk-P2F54I7Q.mjs.map +0 -1
  198. package/dist/chunk-PMXG5WBC.js.map +0 -1
  199. package/dist/chunk-Q2N6SQYW.mjs +0 -8
  200. package/dist/chunk-Q2N6SQYW.mjs.map +0 -1
  201. package/dist/chunk-Q4FXESVT.js +0 -490
  202. package/dist/chunk-Q4FXESVT.js.map +0 -1
  203. package/dist/chunk-RBIVEH2K.mjs +0 -147
  204. package/dist/chunk-RBIVEH2K.mjs.map +0 -1
  205. package/dist/chunk-SM63SZCP.mjs +0 -68
  206. package/dist/chunk-SM63SZCP.mjs.map +0 -1
  207. package/dist/chunk-SZZYEG3P.mjs +0 -46
  208. package/dist/chunk-SZZYEG3P.mjs.map +0 -1
  209. package/dist/chunk-VET55IZO.js.map +0 -1
  210. package/dist/chunk-YF5XQZDR.mjs.map +0 -1
  211. package/dist/config-BmnK65TD.d.mts +0 -35
  212. package/dist/config-BmnK65TD.d.ts +0 -35
  213. package/dist/config-DQeAo9Kf.d.mts +0 -49
  214. package/dist/config-DQeAo9Kf.d.ts +0 -49
  215. package/dist/content.fields-cHPdM8GJ.d.mts +0 -27
  216. package/dist/content.fields-cHPdM8GJ.d.ts +0 -27
  217. package/dist/d3.link.interface-ClC4Irqp.d.mts +0 -21
  218. package/dist/d3.link.interface-ClC4Irqp.d.ts +0 -21
  219. package/dist/features/index.d.mts +0 -477
  220. package/dist/features/index.d.ts +0 -477
  221. package/dist/features/index.js +0 -108
  222. package/dist/features/index.js.map +0 -1
  223. package/dist/features/index.mjs +0 -108
  224. package/dist/hooks/index.d.mts +0 -69
  225. package/dist/hooks/index.d.ts +0 -69
  226. package/dist/hooks/index.js +0 -55
  227. package/dist/hooks/index.js.map +0 -1
  228. package/dist/hooks/index.mjs +0 -55
  229. package/dist/hooks/index.mjs.map +0 -1
  230. package/dist/interfaces/index.d.mts +0 -4
  231. package/dist/interfaces/index.d.ts +0 -4
  232. package/dist/interfaces/index.js +0 -2
  233. package/dist/interfaces/index.js.map +0 -1
  234. package/dist/interfaces/index.mjs +0 -2
  235. package/dist/interfaces/index.mjs.map +0 -1
  236. package/dist/notification.interface-B2BrLoDA.d.mts +0 -14
  237. package/dist/notification.interface-DlZLnAfg.d.ts +0 -14
  238. package/dist/permissions/index.d.mts +0 -41
  239. package/dist/permissions/index.d.ts +0 -41
  240. package/dist/permissions/index.js +0 -14
  241. package/dist/permissions/index.js.map +0 -1
  242. package/dist/permissions/index.mjs +0 -14
  243. package/dist/permissions/index.mjs.map +0 -1
  244. package/dist/request-7FE3LJLV.mjs +0 -9
  245. package/dist/request-7FE3LJLV.mjs.map +0 -1
  246. package/dist/request-QFS7NEIE.js +0 -9
  247. package/dist/request-QFS7NEIE.js.map +0 -1
  248. package/dist/roles/index.d.mts +0 -39
  249. package/dist/roles/index.d.ts +0 -39
  250. package/dist/roles/index.js +0 -18
  251. package/dist/roles/index.js.map +0 -1
  252. package/dist/roles/index.mjs +0 -18
  253. package/dist/roles/index.mjs.map +0 -1
  254. package/dist/shadcnui/index.d.mts +0 -698
  255. package/dist/shadcnui/index.d.ts +0 -698
  256. package/dist/shadcnui/index.js +0 -468
  257. package/dist/shadcnui/index.js.map +0 -1
  258. package/dist/shadcnui/index.mjs +0 -467
  259. package/dist/shadcnui/index.mjs.map +0 -1
  260. package/dist/token-IJSPOMW6.mjs +0 -9
  261. package/dist/token-IJSPOMW6.mjs.map +0 -1
  262. package/dist/token-UYE7CV6X.js +0 -9
  263. package/dist/token-UYE7CV6X.js.map +0 -1
  264. package/dist/types-B2QRyqyK.d.ts +0 -39
  265. package/dist/types-CgvNmxTd.d.mts +0 -39
  266. package/dist/types-t2PyXhDu.d.mts +0 -116
  267. package/dist/types-t2PyXhDu.d.ts +0 -116
  268. package/dist/user.interface-CooB1R79.d.mts +0 -85
  269. package/dist/user.interface-KnIT9pVY.d.ts +0 -85
  270. package/dist/utils/index.d.mts +0 -224
  271. package/dist/utils/index.d.ts +0 -224
  272. package/dist/utils/index.js +0 -46
  273. package/dist/utils/index.js.map +0 -1
  274. package/dist/utils/index.mjs +0 -46
  275. package/dist/utils/index.mjs.map +0 -1
  276. /package/dist/{JsonApiRequest-6UR7DIAR.mjs.map → JsonApiRequest-SYZ6FGCA.mjs.map} +0 -0
  277. /package/dist/{atoms/index.mjs.map → request-XABCMU25.mjs.map} +0 -0
  278. /package/dist/{features/index.mjs.map → token-EOK3N45S.mjs.map} +0 -0
@@ -1,224 +0,0 @@
1
- import { ClassValue } from 'clsx';
2
- export { ClassValue } from 'clsx';
3
- import * as React from 'react';
4
- import { ReactElement, ReactNode } from 'react';
5
- import { M as ModuleWithPermissions, a as Action } from '../types-t2PyXhDu.js';
6
- import { z } from 'zod';
7
- import { PartialBlock } from '@blocknote/core';
8
- import { LucideIcon } from 'lucide-react';
9
- import { A as ApiDataInterface } from '../ApiDataInterface-DPP8s46n.js';
10
-
11
- declare function cn(...inputs: ClassValue[]): string;
12
-
13
- type PossibleRef<T> = React.Ref<T> | undefined;
14
- /**
15
- * A utility to compose multiple refs together
16
- * Accepts callback refs and RefObject(s)
17
- */
18
- declare function composeRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T>;
19
- /**
20
- * A custom hook that composes multiple refs
21
- * Accepts callback refs and RefObject(s)
22
- */
23
- declare function useComposedRefs<T>(...refs: PossibleRef<T>[]): React.RefCallback<T>;
24
-
25
- declare function useIsMobile(): boolean;
26
-
27
- type FormatOption = "date" | "time" | "dateTime" | "timeSince" | "default";
28
- declare const formatDate: (eventDate: Date, formatOption: FormatOption) => string;
29
-
30
- declare const exists: <T>(itemOrArray: T | T[] | null | undefined) => boolean;
31
-
32
- declare class TableOptions {
33
- private _components;
34
- private _hasPermissionToModule;
35
- constructor(hasPermissionToModule: <M extends ModuleWithPermissions>(params: {
36
- module: M;
37
- action: Action;
38
- data?: any;
39
- }) => boolean);
40
- addOption<M extends ModuleWithPermissions>(component: ReactElement<any> | null, module?: M, action?: Action): void;
41
- getComponents(): ReactElement<any>[];
42
- getOptions(): ReactElement<any> | null;
43
- }
44
- declare function getTableOptions(params: {
45
- hasPermissionToModule: <M extends ModuleWithPermissions>(params: {
46
- module: M;
47
- action: Action;
48
- data?: any;
49
- }) => boolean;
50
- options: {
51
- component: ReactElement<any> | null;
52
- module?: ModuleWithPermissions;
53
- action?: Action;
54
- }[];
55
- }): ReactElement<any> | null;
56
- declare function getTableComponents(params: {
57
- hasPermissionToModule: <M extends ModuleWithPermissions>(params: {
58
- module: M;
59
- action: Action;
60
- data?: any;
61
- }) => boolean;
62
- options: {
63
- component: ReactElement<any> | null;
64
- module?: ModuleWithPermissions;
65
- action?: Action;
66
- }[];
67
- }): ReactElement<any>[];
68
-
69
- declare const userObjectSchema: z.ZodObject<{
70
- id: z.ZodString;
71
- name: z.ZodString;
72
- avatar: z.ZodOptional<z.ZodString>;
73
- }, z.core.$strip>;
74
- type UserObject = z.infer<typeof userObjectSchema>;
75
-
76
- declare const entityObjectSchema: z.ZodObject<{
77
- id: z.ZodUUID;
78
- name: z.ZodString;
79
- }, z.core.$strip>;
80
- type EntityObject = z.infer<typeof entityObjectSchema>;
81
-
82
- interface WordDiff {
83
- type: "added" | "removed" | "unchanged";
84
- text: string;
85
- diffId: string;
86
- accepted?: boolean;
87
- rejected?: boolean;
88
- }
89
- interface DiffBlock {
90
- id?: string;
91
- type?: string;
92
- props?: any;
93
- content?: any;
94
- children?: DiffBlock[];
95
- diffType?: "added" | "removed" | "modified" | "unchanged";
96
- originalContent?: any;
97
- diffId?: string;
98
- wordDiffs?: WordDiff[];
99
- accepted?: boolean;
100
- rejected?: boolean;
101
- }
102
- interface DiffResult {
103
- blocks: DiffBlock[];
104
- hasChanges: boolean;
105
- }
106
- interface BlockDiffOptions {
107
- ignoreIds?: boolean;
108
- compareContent?: boolean;
109
- similarityThreshold?: number;
110
- }
111
- /**
112
- * BlockNote Diff Utility
113
- * Implements a sophisticated diff algorithm for BlockNote document structures
114
- */
115
- declare class BlockNoteDiffUtil {
116
- private static readonly DEFAULT_OPTIONS;
117
- /**
118
- * Compare two BlockNote documents and return diff result
119
- */
120
- static diff(originalBlocks?: PartialBlock[], newBlocks?: PartialBlock[], options?: BlockDiffOptions): DiffResult;
121
- /**
122
- * Compare two blocks for equality
123
- */
124
- private static areBlocksEqual;
125
- /**
126
- * Deep equality comparison for objects
127
- */
128
- private static deepEqual;
129
- /**
130
- * Sort diff blocks to maintain logical order
131
- */
132
- private static sortDiffBlocks;
133
- /**
134
- * Calculate similarity between two text contents
135
- */
136
- private static calculateSimilarity;
137
- /**
138
- * Extract plain text from BlockNote content array
139
- */
140
- private static extractTextFromContent;
141
- /**
142
- * Calculate Levenshtein distance between two strings
143
- */
144
- private static levenshteinDistance;
145
- /**
146
- * Generate word-level diffs between two content arrays
147
- */
148
- static generateWordDiffs(originalContent: any, newContent: any, blockId: string): WordDiff[];
149
- /**
150
- * Perform word-level diff using word-only approach (no space tokenization)
151
- */
152
- private static diffWords; /**
153
- * Improved diff algorithm that better handles word insertions
154
- * Uses a combination of LCS and heuristics to minimize false changes
155
- */
156
- private static myersDiff;
157
- /**
158
- * Compute edit script using dynamic programming
159
- */
160
- private static computeEditScript;
161
- /**
162
- * Reconstruct the actual diff from the DP table
163
- */
164
- private static reconstructDiff;
165
- /**
166
- * Consolidate adjacent changes to reduce fragmentation
167
- * e.g., if we have: delete "Key", insert "Key!", delete "Challenges"
168
- * We can consolidate this into: replace ["Key", "Challenges"] with ["Key!"]
169
- */
170
- private static consolidateAdjacentChanges;
171
- /**
172
- * Determine if a sequence of changes should be consolidated
173
- */
174
- private static shouldConsolidateChanges;
175
- /**
176
- * Check if two words are similar enough to be considered a replacement
177
- */
178
- private static areWordsSimilar;
179
- }
180
-
181
- declare class BlockNoteWordDiffRendererUtil {
182
- static renderWordDiffs(diffBlocks: DiffBlock[], onAcceptChange?: (diffId: string) => void, onRejectChange?: (diffId: string) => void, acceptedChanges?: Set<string>, rejectedChanges?: Set<string>): PartialBlock[];
183
- private static updateWordDiffStates;
184
- private static renderDiffBlock;
185
- private static renderBlockLevelDiff;
186
- private static renderWordLevelDiff;
187
- private static groupAndRenderWordDiffs;
188
- private static cleanupSpaces;
189
- private static isLastDiffInGroup;
190
- private static createTextContent;
191
- private static getBlockProps;
192
- static generateChangeSummary(diffBlocks: DiffBlock[]): {
193
- totalWords: number;
194
- addedWords: number;
195
- removedWords: number;
196
- acceptedChanges: number;
197
- rejectedChanges: number;
198
- pendingChanges: number;
199
- };
200
- }
201
-
202
- declare const getIconByModule: (params: {
203
- module: ModuleWithPermissions;
204
- className?: string;
205
- }) => ReactNode;
206
- declare const getIcon: (params: {
207
- element: ApiDataInterface;
208
- className?: string;
209
- }) => ReactNode;
210
- declare const getIconByModuleName: (params: {
211
- name: string;
212
- className?: string;
213
- }) => ReactNode;
214
- declare const getLucideIcon: (params: {
215
- element: ApiDataInterface;
216
- }) => LucideIcon | null;
217
- declare const getLucideIconByModule: (params: {
218
- module: ModuleWithPermissions;
219
- }) => LucideIcon | null;
220
- declare const getLucideIconByModuleName: (params: {
221
- name: string;
222
- }) => LucideIcon | null;
223
-
224
- export { type BlockDiffOptions, BlockNoteDiffUtil, BlockNoteWordDiffRendererUtil, type DiffBlock, type DiffResult, type EntityObject, type FormatOption, TableOptions, type UserObject, type WordDiff, cn, composeRefs, entityObjectSchema, exists, formatDate, getIcon, getIconByModule, getIconByModuleName, getLucideIcon, getLucideIconByModule, getLucideIconByModuleName, getTableComponents, getTableOptions, useComposedRefs, useIsMobile, userObjectSchema };
@@ -1,46 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
-
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
- var _chunkDEYKTLA3js = require('../chunk-DEYKTLA3.js');
22
- require('../chunk-Q4FXESVT.js');
23
- require('../chunk-AGAJMJ4T.js');
24
- require('../chunk-7QVYU63E.js');
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
- exports.BlockNoteDiffUtil = _chunkDEYKTLA3js.BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = _chunkDEYKTLA3js.BlockNoteWordDiffRendererUtil; exports.TableOptions = _chunkDEYKTLA3js.TableOptions; exports.cn = _chunkDEYKTLA3js.cn; exports.composeRefs = _chunkDEYKTLA3js.composeRefs; exports.entityObjectSchema = _chunkDEYKTLA3js.entityObjectSchema; exports.exists = _chunkDEYKTLA3js.exists; exports.formatDate = _chunkDEYKTLA3js.formatDate; exports.getIcon = _chunkDEYKTLA3js.getIcon; exports.getIconByModule = _chunkDEYKTLA3js.getIconByModule; exports.getIconByModuleName = _chunkDEYKTLA3js.getIconByModuleName; exports.getLucideIcon = _chunkDEYKTLA3js.getLucideIcon; exports.getLucideIconByModule = _chunkDEYKTLA3js.getLucideIconByModule; exports.getLucideIconByModuleName = _chunkDEYKTLA3js.getLucideIconByModuleName; exports.getTableComponents = _chunkDEYKTLA3js.getTableComponents; exports.getTableOptions = _chunkDEYKTLA3js.getTableOptions; exports.useComposedRefs = _chunkDEYKTLA3js.useComposedRefs; exports.useIsMobile = _chunkDEYKTLA3js.useIsMobile; exports.userObjectSchema = _chunkDEYKTLA3js.userObjectSchema;
46
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/utils/index.js"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,uDAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B,gCAA6B;AAC7B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,ymCAAC","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/utils/index.js"}
@@ -1,46 +0,0 @@
1
- import {
2
- BlockNoteDiffUtil,
3
- BlockNoteWordDiffRendererUtil,
4
- TableOptions,
5
- cn,
6
- composeRefs,
7
- entityObjectSchema,
8
- exists,
9
- formatDate,
10
- getIcon,
11
- getIconByModule,
12
- getIconByModuleName,
13
- getLucideIcon,
14
- getLucideIconByModule,
15
- getLucideIconByModuleName,
16
- getTableComponents,
17
- getTableOptions,
18
- useComposedRefs,
19
- useIsMobile,
20
- userObjectSchema
21
- } from "../chunk-JGFWIT2E.mjs";
22
- import "../chunk-FMBQZAIP.mjs";
23
- import "../chunk-RBIVEH2K.mjs";
24
- import "../chunk-PAWJFY3S.mjs";
25
- export {
26
- BlockNoteDiffUtil,
27
- BlockNoteWordDiffRendererUtil,
28
- TableOptions,
29
- cn,
30
- composeRefs,
31
- entityObjectSchema,
32
- exists,
33
- formatDate,
34
- getIcon,
35
- getIconByModule,
36
- getIconByModuleName,
37
- getLucideIcon,
38
- getLucideIconByModule,
39
- getLucideIconByModuleName,
40
- getTableComponents,
41
- getTableOptions,
42
- useComposedRefs,
43
- useIsMobile,
44
- userObjectSchema
45
- };
46
- //# sourceMappingURL=index.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}