@carlonicora/nextjs-jsonapi 1.142.0 → 1.143.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 (102) hide show
  1. package/dist/AbstractService-B0T7h8fX.d.mts +124 -0
  2. package/dist/AbstractService-Cew0PD0L.d.ts +124 -0
  3. package/dist/{AuthComponent-DdxCFgUZ.d.mts → AuthComponent-Cik96ElA.d.mts} +1 -1
  4. package/dist/{AuthComponent-Cd7lcYif.d.ts → AuthComponent-DTTKu3VK.d.ts} +1 -1
  5. package/dist/{BlockNoteEditor-35DDJH3M.mjs → BlockNoteEditor-34QM4UR5.mjs} +4 -4
  6. package/dist/{BlockNoteEditor-XXTBZ7DD.js → BlockNoteEditor-LMKWUOJG.js} +19 -19
  7. package/dist/{BlockNoteEditor-XXTBZ7DD.js.map → BlockNoteEditor-LMKWUOJG.js.map} +1 -1
  8. package/dist/billing/index.js +357 -357
  9. package/dist/billing/index.mjs +3 -3
  10. package/dist/{chunk-KZHHKPQZ.mjs → chunk-BIL2WQEV.mjs} +247 -1
  11. package/dist/chunk-BIL2WQEV.mjs.map +1 -0
  12. package/dist/{chunk-5SFFHIEE.js → chunk-DS4IBFWA.js} +252 -6
  13. package/dist/chunk-DS4IBFWA.js.map +1 -0
  14. package/dist/{chunk-7CR4YB7Y.js → chunk-F6PZZ4KI.js} +730 -730
  15. package/dist/{chunk-7CR4YB7Y.js.map → chunk-F6PZZ4KI.js.map} +1 -1
  16. package/dist/{chunk-ZV2GZKFR.mjs → chunk-HN5ED7OF.mjs} +2 -2
  17. package/dist/{chunk-FZ5SPJEU.mjs → chunk-UGSOBBZH.mjs} +4 -4
  18. package/dist/{chunk-C6UXEPNY.js → chunk-UXJAS6C5.js} +7 -7
  19. package/dist/{chunk-C6UXEPNY.js.map → chunk-UXJAS6C5.js.map} +1 -1
  20. package/dist/client/index.d.mts +3 -3
  21. package/dist/client/index.d.ts +3 -3
  22. package/dist/client/index.js +4 -4
  23. package/dist/client/index.mjs +3 -3
  24. package/dist/components/index.d.mts +3 -3
  25. package/dist/components/index.d.ts +3 -3
  26. package/dist/components/index.js +4 -4
  27. package/dist/components/index.mjs +3 -3
  28. package/dist/{config-BrkU_Ynz.d.ts → config-Cd5xTEfZ.d.ts} +1 -1
  29. package/dist/{config-snd2ToEB.d.mts → config-YyhFHxkU.d.mts} +1 -1
  30. package/dist/contexts/index.d.mts +1 -1
  31. package/dist/contexts/index.d.ts +1 -1
  32. package/dist/contexts/index.js +4 -4
  33. package/dist/contexts/index.mjs +3 -3
  34. package/dist/core/index.d.mts +13 -49
  35. package/dist/core/index.d.ts +13 -49
  36. package/dist/core/index.js +8 -2
  37. package/dist/core/index.js.map +1 -1
  38. package/dist/core/index.mjs +7 -1
  39. package/dist/features/help/index.d.mts +2 -2
  40. package/dist/features/help/index.d.ts +2 -2
  41. package/dist/features/help/index.js +37 -37
  42. package/dist/features/help/index.mjs +3 -3
  43. package/dist/features/tokenusage/index.css +29 -0
  44. package/dist/features/tokenusage/index.css.map +1 -0
  45. package/dist/features/tokenusage/index.d.mts +388 -0
  46. package/dist/features/tokenusage/index.d.ts +388 -0
  47. package/dist/features/tokenusage/index.js +1012 -0
  48. package/dist/features/tokenusage/index.js.map +1 -0
  49. package/dist/features/tokenusage/index.mjs +1012 -0
  50. package/dist/features/tokenusage/index.mjs.map +1 -0
  51. package/dist/index.d.mts +8 -6
  52. package/dist/index.d.ts +8 -6
  53. package/dist/index.js +9 -3
  54. package/dist/index.js.map +1 -1
  55. package/dist/index.mjs +8 -2
  56. package/dist/{s3.service-Dmfxpn-k.d.ts → s3.service-CpwA3sl_.d.ts} +2 -123
  57. package/dist/{s3.service-DYflLXCt.d.mts → s3.service-Dt6MfuHr.d.mts} +2 -123
  58. package/dist/server/index.d.mts +3 -2
  59. package/dist/server/index.d.ts +3 -2
  60. package/dist/server/index.js +3 -3
  61. package/dist/server/index.mjs +1 -1
  62. package/dist/tokenusage-admin.module-5wJ_tZTj.d.ts +61 -0
  63. package/dist/tokenusage-admin.module-DQVT4O4j.d.mts +61 -0
  64. package/dist/{types-CQSjy7et.d.mts → types-Bq_UA8Lg.d.mts} +1 -1
  65. package/dist/{types-DHOxe8rc.d.ts → types-bsm8Fp55.d.ts} +1 -1
  66. package/dist/{usePageUrlGenerator-tjq2mlDV.d.ts → usePageUrlGenerator-J_ECv-oQ.d.ts} +1 -1
  67. package/dist/{usePageUrlGenerator-uOnyJ6j2.d.mts → usePageUrlGenerator-uKBjAKqC.d.mts} +1 -1
  68. package/package.json +6 -1
  69. package/src/core/index.ts +5 -0
  70. package/src/core/registry/ModuleRegistry.ts +4 -0
  71. package/src/features/tokenusage/components/TokenUsageAdminContainer.tsx +189 -0
  72. package/src/features/tokenusage/components/TokenUsageAdminFilterBar.tsx +138 -0
  73. package/src/features/tokenusage/components/TokenUsageAdminTiles.tsx +177 -0
  74. package/src/features/tokenusage/components/TokenUsageBreakdownTable.tsx +160 -0
  75. package/src/features/tokenusage/components/TokenUsageRankedBar.tsx +99 -0
  76. package/src/features/tokenusage/components/TokenUsageTimelineChart.tsx +225 -0
  77. package/src/features/tokenusage/components/__tests__/TokenUsageAdminTiles.spec.tsx +42 -0
  78. package/src/features/tokenusage/components/__tests__/TokenUsageRankedBar.spec.tsx +41 -0
  79. package/src/features/tokenusage/components/__tests__/TokenUsageTimelineChart.spec.tsx +47 -0
  80. package/src/features/tokenusage/contexts/TokenUsageAdminContext.tsx +252 -0
  81. package/src/features/tokenusage/contexts/__tests__/TokenUsageAdminContext.spec.tsx +80 -0
  82. package/src/features/tokenusage/data/TokenUsageAdminService.ts +54 -0
  83. package/src/features/tokenusage/data/__tests__/tokenusage-admin-models.spec.ts +147 -0
  84. package/src/features/tokenusage/data/index.ts +8 -0
  85. package/src/features/tokenusage/data/tokenusage-admin-breakdown.interface.ts +18 -0
  86. package/src/features/tokenusage/data/tokenusage-admin-breakdown.ts +115 -0
  87. package/src/features/tokenusage/data/tokenusage-admin-summary.interface.ts +14 -0
  88. package/src/features/tokenusage/data/tokenusage-admin-summary.ts +90 -0
  89. package/src/features/tokenusage/data/tokenusage-admin-timeline.interface.ts +13 -0
  90. package/src/features/tokenusage/data/tokenusage-admin-timeline.ts +94 -0
  91. package/src/features/tokenusage/data/tokenusage-admin.types.ts +56 -0
  92. package/src/features/tokenusage/i18n-keys.ts +65 -0
  93. package/src/features/tokenusage/index.ts +30 -0
  94. package/src/features/tokenusage/lib/metrics.ts +69 -0
  95. package/src/features/tokenusage/lib/operation-label.ts +41 -0
  96. package/src/features/tokenusage/lib/palette.ts +197 -0
  97. package/src/features/tokenusage/tokenusage-admin.module.ts +22 -0
  98. package/dist/chunk-5SFFHIEE.js.map +0 -1
  99. package/dist/chunk-KZHHKPQZ.mjs.map +0 -1
  100. /package/dist/{BlockNoteEditor-35DDJH3M.mjs.map → BlockNoteEditor-34QM4UR5.mjs.map} +0 -0
  101. /package/dist/{chunk-ZV2GZKFR.mjs.map → chunk-HN5ED7OF.mjs.map} +0 -0
  102. /package/dist/{chunk-FZ5SPJEU.mjs.map → chunk-UGSOBBZH.mjs.map} +0 -0
@@ -0,0 +1,124 @@
1
+ import { A as ApiRequestDataTypeInterface } from './ApiRequestDataTypeInterface-CYEcRUrh.mjs';
2
+
3
+ declare enum HttpMethod {
4
+ GET = "GET",
5
+ POST = "POST",
6
+ PUT = "PUT",
7
+ PATCH = "PATCH",
8
+ DELETE = "DELETE"
9
+ }
10
+ interface NextRef {
11
+ next?: string;
12
+ }
13
+ interface PreviousRef {
14
+ previous?: string;
15
+ }
16
+ interface SelfRef {
17
+ self?: string;
18
+ }
19
+ interface TotalRef {
20
+ total?: number;
21
+ }
22
+ declare function getLastApiTotal(): number | undefined;
23
+ declare function clearLastApiTotal(): void;
24
+ declare function getLastApiMeta(): Record<string, any> | undefined;
25
+ declare function clearLastApiMeta(): void;
26
+ /**
27
+ * Set a global error handler for API errors (client-side only).
28
+ * This handler will be called instead of throwing errors.
29
+ */
30
+ declare function setGlobalErrorHandler(handler: (status: number, message: string) => void): void;
31
+ /**
32
+ * Get the current global error handler.
33
+ */
34
+ declare function getGlobalErrorHandler(): ((status: number, message: string) => void) | null;
35
+ /**
36
+ * Abstract base class for services that interact with the JSON:API.
37
+ * Extend this class to create feature-specific services.
38
+ */
39
+ declare abstract class AbstractService {
40
+ /**
41
+ * Extract locale from client-side URL pathname
42
+ * URL structure: /{locale}/route-path (e.g., /it/accounts)
43
+ * Fallback chain: URL locale → navigator.language → "en"
44
+ */
45
+ private static getClientLocale;
46
+ static next<T>(params: {
47
+ type: ApiRequestDataTypeInterface;
48
+ endpoint: string;
49
+ next?: NextRef;
50
+ previous?: PreviousRef;
51
+ self?: SelfRef;
52
+ total?: TotalRef;
53
+ }): Promise<T>;
54
+ /**
55
+ * Fetch the previous page of results.
56
+ */
57
+ static previous<T>(params: {
58
+ type: ApiRequestDataTypeInterface;
59
+ endpoint: string;
60
+ next?: NextRef;
61
+ previous?: PreviousRef;
62
+ self?: SelfRef;
63
+ total?: TotalRef;
64
+ }): Promise<T>;
65
+ /**
66
+ * Make an API call with automatic environment detection and error handling.
67
+ */
68
+ protected static callApi<T>(params: {
69
+ type: ApiRequestDataTypeInterface;
70
+ method: HttpMethod;
71
+ endpoint: string;
72
+ companyId?: string;
73
+ input?: any;
74
+ overridesJsonApiCreation?: boolean;
75
+ next?: NextRef;
76
+ previous?: PreviousRef;
77
+ self?: SelfRef;
78
+ total?: TotalRef;
79
+ responseType?: ApiRequestDataTypeInterface;
80
+ files?: {
81
+ [key: string]: File | Blob;
82
+ } | File | Blob;
83
+ token?: string;
84
+ suppressGlobalError?: boolean;
85
+ /**
86
+ * Per-call override of the API base URL. When omitted, the existing global
87
+ * `NEXT_PUBLIC_API_URL` (or `configureJsonApi({ apiUrl })`) resolution is used —
88
+ * fully backward compatible. Ignored when `endpoint` starts with "http" (passthrough).
89
+ */
90
+ baseUrl?: string;
91
+ }): Promise<T>;
92
+ /**
93
+ * Make an API call and return both data and meta from the response.
94
+ */
95
+ protected static callApiWithMeta<T>(params: {
96
+ type: ApiRequestDataTypeInterface;
97
+ method: HttpMethod;
98
+ endpoint: string;
99
+ companyId?: string;
100
+ input?: any;
101
+ overridesJsonApiCreation?: boolean;
102
+ responseType?: ApiRequestDataTypeInterface;
103
+ files?: {
104
+ [key: string]: File | Blob;
105
+ } | File | Blob;
106
+ suppressGlobalError?: boolean;
107
+ }): Promise<{
108
+ data: T;
109
+ meta?: Record<string, any>;
110
+ }>;
111
+ /**
112
+ * Get raw JSON:API response data without deserialization.
113
+ */
114
+ protected static getRawData(params: {
115
+ type: ApiRequestDataTypeInterface;
116
+ method: HttpMethod;
117
+ endpoint: string;
118
+ companyId?: string;
119
+ baseUrl?: string;
120
+ suppressGlobalError?: boolean;
121
+ }): Promise<any>;
122
+ }
123
+
124
+ export { AbstractService as A, HttpMethod as H, type NextRef as N, type PreviousRef as P, type SelfRef as S, type TotalRef as T, getLastApiMeta as a, clearLastApiMeta as b, clearLastApiTotal as c, getGlobalErrorHandler as d, getLastApiTotal as g, setGlobalErrorHandler as s };
@@ -0,0 +1,124 @@
1
+ import { A as ApiRequestDataTypeInterface } from './ApiRequestDataTypeInterface-CYEcRUrh.js';
2
+
3
+ declare enum HttpMethod {
4
+ GET = "GET",
5
+ POST = "POST",
6
+ PUT = "PUT",
7
+ PATCH = "PATCH",
8
+ DELETE = "DELETE"
9
+ }
10
+ interface NextRef {
11
+ next?: string;
12
+ }
13
+ interface PreviousRef {
14
+ previous?: string;
15
+ }
16
+ interface SelfRef {
17
+ self?: string;
18
+ }
19
+ interface TotalRef {
20
+ total?: number;
21
+ }
22
+ declare function getLastApiTotal(): number | undefined;
23
+ declare function clearLastApiTotal(): void;
24
+ declare function getLastApiMeta(): Record<string, any> | undefined;
25
+ declare function clearLastApiMeta(): void;
26
+ /**
27
+ * Set a global error handler for API errors (client-side only).
28
+ * This handler will be called instead of throwing errors.
29
+ */
30
+ declare function setGlobalErrorHandler(handler: (status: number, message: string) => void): void;
31
+ /**
32
+ * Get the current global error handler.
33
+ */
34
+ declare function getGlobalErrorHandler(): ((status: number, message: string) => void) | null;
35
+ /**
36
+ * Abstract base class for services that interact with the JSON:API.
37
+ * Extend this class to create feature-specific services.
38
+ */
39
+ declare abstract class AbstractService {
40
+ /**
41
+ * Extract locale from client-side URL pathname
42
+ * URL structure: /{locale}/route-path (e.g., /it/accounts)
43
+ * Fallback chain: URL locale → navigator.language → "en"
44
+ */
45
+ private static getClientLocale;
46
+ static next<T>(params: {
47
+ type: ApiRequestDataTypeInterface;
48
+ endpoint: string;
49
+ next?: NextRef;
50
+ previous?: PreviousRef;
51
+ self?: SelfRef;
52
+ total?: TotalRef;
53
+ }): Promise<T>;
54
+ /**
55
+ * Fetch the previous page of results.
56
+ */
57
+ static previous<T>(params: {
58
+ type: ApiRequestDataTypeInterface;
59
+ endpoint: string;
60
+ next?: NextRef;
61
+ previous?: PreviousRef;
62
+ self?: SelfRef;
63
+ total?: TotalRef;
64
+ }): Promise<T>;
65
+ /**
66
+ * Make an API call with automatic environment detection and error handling.
67
+ */
68
+ protected static callApi<T>(params: {
69
+ type: ApiRequestDataTypeInterface;
70
+ method: HttpMethod;
71
+ endpoint: string;
72
+ companyId?: string;
73
+ input?: any;
74
+ overridesJsonApiCreation?: boolean;
75
+ next?: NextRef;
76
+ previous?: PreviousRef;
77
+ self?: SelfRef;
78
+ total?: TotalRef;
79
+ responseType?: ApiRequestDataTypeInterface;
80
+ files?: {
81
+ [key: string]: File | Blob;
82
+ } | File | Blob;
83
+ token?: string;
84
+ suppressGlobalError?: boolean;
85
+ /**
86
+ * Per-call override of the API base URL. When omitted, the existing global
87
+ * `NEXT_PUBLIC_API_URL` (or `configureJsonApi({ apiUrl })`) resolution is used —
88
+ * fully backward compatible. Ignored when `endpoint` starts with "http" (passthrough).
89
+ */
90
+ baseUrl?: string;
91
+ }): Promise<T>;
92
+ /**
93
+ * Make an API call and return both data and meta from the response.
94
+ */
95
+ protected static callApiWithMeta<T>(params: {
96
+ type: ApiRequestDataTypeInterface;
97
+ method: HttpMethod;
98
+ endpoint: string;
99
+ companyId?: string;
100
+ input?: any;
101
+ overridesJsonApiCreation?: boolean;
102
+ responseType?: ApiRequestDataTypeInterface;
103
+ files?: {
104
+ [key: string]: File | Blob;
105
+ } | File | Blob;
106
+ suppressGlobalError?: boolean;
107
+ }): Promise<{
108
+ data: T;
109
+ meta?: Record<string, any>;
110
+ }>;
111
+ /**
112
+ * Get raw JSON:API response data without deserialization.
113
+ */
114
+ protected static getRawData(params: {
115
+ type: ApiRequestDataTypeInterface;
116
+ method: HttpMethod;
117
+ endpoint: string;
118
+ companyId?: string;
119
+ baseUrl?: string;
120
+ suppressGlobalError?: boolean;
121
+ }): Promise<any>;
122
+ }
123
+
124
+ export { AbstractService as A, HttpMethod as H, type NextRef as N, type PreviousRef as P, type SelfRef as S, type TotalRef as T, getLastApiMeta as a, clearLastApiMeta as b, clearLastApiTotal as c, getGlobalErrorHandler as d, getLastApiTotal as g, setGlobalErrorHandler as s };
@@ -1,7 +1,7 @@
1
1
  import { LucideIcon } from 'lucide-react';
2
2
  import { ReactNode } from 'react';
3
3
  import { A as ApiDataInterface } from './ApiDataInterface-BcZeXy5X.mjs';
4
- import { M as ModuleWithPermissions } from './types-CQSjy7et.mjs';
4
+ import { M as ModuleWithPermissions } from './types-Bq_UA8Lg.mjs';
5
5
 
6
6
  declare function getInitials(name: string): string;
7
7
  declare function getInitials(firstName: string, lastName: string): string;
@@ -1,7 +1,7 @@
1
1
  import { LucideIcon } from 'lucide-react';
2
2
  import { ReactNode } from 'react';
3
3
  import { A as ApiDataInterface } from './ApiDataInterface-BcZeXy5X.js';
4
- import { M as ModuleWithPermissions } from './types-DHOxe8rc.js';
4
+ import { M as ModuleWithPermissions } from './types-bsm8Fp55.js';
5
5
 
6
6
  declare function getInitials(name: string): string;
7
7
  declare function getInitials(firstName: string, lastName: string): string;
@@ -6,17 +6,17 @@ import {
6
6
  createMentionInlineContentSpec,
7
7
  errorToast,
8
8
  useCurrentUserContext
9
- } from "./chunk-FZ5SPJEU.mjs";
9
+ } from "./chunk-UGSOBBZH.mjs";
10
10
  import {
11
11
  getPublicApiUrl,
12
12
  useI18nLocale
13
- } from "./chunk-ZV2GZKFR.mjs";
13
+ } from "./chunk-HN5ED7OF.mjs";
14
14
  import {
15
15
  BlockNoteDiffUtil,
16
16
  BlockNoteWordDiffRendererUtil,
17
17
  S3Service,
18
18
  cn
19
- } from "./chunk-KZHHKPQZ.mjs";
19
+ } from "./chunk-BIL2WQEV.mjs";
20
20
  import {
21
21
  getClientToken
22
22
  } from "./chunk-AUXK7QSA.mjs";
@@ -739,4 +739,4 @@ __name(BlockNoteEditor, "BlockNoteEditor");
739
739
  export {
740
740
  BlockNoteEditor as default
741
741
  };
742
- //# sourceMappingURL=BlockNoteEditor-35DDJH3M.mjs.map
742
+ //# sourceMappingURL=BlockNoteEditor-34QM4UR5.mjs.map
@@ -6,17 +6,17 @@
6
6
 
7
7
 
8
8
 
9
- var _chunk7CR4YB7Yjs = require('./chunk-7CR4YB7Y.js');
9
+ var _chunkF6PZZ4KIjs = require('./chunk-F6PZZ4KI.js');
10
10
 
11
11
 
12
12
 
13
- var _chunkC6UXEPNYjs = require('./chunk-C6UXEPNY.js');
13
+ var _chunkUXJAS6C5js = require('./chunk-UXJAS6C5.js');
14
14
 
15
15
 
16
16
 
17
17
 
18
18
 
19
- var _chunk5SFFHIEEjs = require('./chunk-5SFFHIEE.js');
19
+ var _chunkDS4IBFWAjs = require('./chunk-DS4IBFWA.js');
20
20
 
21
21
 
22
22
  var _chunkLXKSUWAVjs = require('./chunk-LXKSUWAV.js');
@@ -144,7 +144,7 @@ var createDiffActionsInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name
144
144
  const diffIds = props.inlineContent.props.diffIds;
145
145
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "diff-actions-container mx-2 inline-flex items-center gap-1 align-middle", children: [
146
146
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
147
- _chunk7CR4YB7Yjs.Button,
147
+ _chunkF6PZZ4KIjs.Button,
148
148
  {
149
149
  title: "Accept change",
150
150
  onClick: (e) => {
@@ -156,7 +156,7 @@ var createDiffActionsInlineContentSpec = /* @__PURE__ */ _chunk7QVYU63Ejs.__name
156
156
  }
157
157
  ),
158
158
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
159
- _chunk7CR4YB7Yjs.Button,
159
+ _chunkF6PZZ4KIjs.Button,
160
160
  {
161
161
  title: "Reject change",
162
162
  className: "mx-2 p-0",
@@ -347,8 +347,8 @@ function BlockNoteEditor({
347
347
  stretch
348
348
  }) {
349
349
  const t = _nextintl.useTranslations.call(void 0, );
350
- const locale = _chunkC6UXEPNYjs.useI18nLocale.call(void 0, );
351
- const { company } = _chunk7CR4YB7Yjs.useCurrentUserContext.call(void 0, );
350
+ const locale = _chunkUXJAS6C5js.useI18nLocale.call(void 0, );
351
+ const { company } = _chunkF6PZZ4KIjs.useCurrentUserContext.call(void 0, );
352
352
  const [acceptedChanges, setAcceptedChanges] = _react3.useState.call(void 0, /* @__PURE__ */ new Set());
353
353
  const [rejectedChanges, setRejectedChanges] = _react3.useState.call(void 0, /* @__PURE__ */ new Set());
354
354
  const editorRef = _react3.useRef.call(void 0, null);
@@ -386,7 +386,7 @@ function BlockNoteEditor({
386
386
  [handleAcceptChange, handleRejectChange]
387
387
  );
388
388
  const mentionSpec = _react3.useMemo.call(void 0,
389
- () => _chunk7CR4YB7Yjs.createMentionInlineContentSpec.call(void 0, mentionResolveFn, disableMentions, mentionNameResolver),
389
+ () => _chunkF6PZZ4KIjs.createMentionInlineContentSpec.call(void 0, mentionResolveFn, disableMentions, mentionNameResolver),
390
390
  [disableMentions, mentionResolveFn, mentionNameResolver]
391
391
  );
392
392
  const schema = _react3.useMemo.call(void 0,
@@ -405,7 +405,7 @@ function BlockNoteEditor({
405
405
  const companyId = _optionalChain([company, 'optionalAccess', _11 => _11.id]);
406
406
  const aiExtension = _react3.useMemo.call(void 0, () => {
407
407
  if (!aiConfig) return void 0;
408
- const base = _chunkC6UXEPNYjs.getPublicApiUrl.call(void 0, );
408
+ const base = _chunkUXJAS6C5js.getPublicApiUrl.call(void 0, );
409
409
  const url = new URL(aiConfig.endpoint, base.endsWith("/") ? base : base + "/").toString();
410
410
  return _xlai.AIExtension.call(void 0, {
411
411
  transport: new (0, _ai.DefaultChatTransport)({
@@ -447,7 +447,7 @@ function BlockNoteEditor({
447
447
  const uploadImage = _react3.useCallback.call(void 0,
448
448
  async (file) => {
449
449
  if (!company) {
450
- _chunk7CR4YB7Yjs.errorToast.call(void 0, {
450
+ _chunkF6PZZ4KIjs.errorToast.call(void 0, {
451
451
  title: t(`common.errors.upload`),
452
452
  error: t(`common.errors.upload_description`)
453
453
  });
@@ -455,7 +455,7 @@ function BlockNoteEditor({
455
455
  }
456
456
  const fileType = file.type;
457
457
  const key = `companies/${company.id}/${type}/${id}/${file.name}`;
458
- const s3 = await _chunk5SFFHIEEjs.S3Service.getPreSignedUrl({
458
+ const s3 = await _chunkDS4IBFWAjs.S3Service.getPreSignedUrl({
459
459
  key,
460
460
  contentType: fileType,
461
461
  isPublic: true
@@ -465,7 +465,7 @@ function BlockNoteEditor({
465
465
  headers: s3.headers,
466
466
  body: file
467
467
  });
468
- const signedImage = await _chunk5SFFHIEEjs.S3Service.getSignedUrl({
468
+ const signedImage = await _chunkDS4IBFWAjs.S3Service.getSignedUrl({
469
469
  key,
470
470
  isPublic: true
471
471
  });
@@ -494,8 +494,8 @@ function BlockNoteEditor({
494
494
  const processedContent = _react3.useMemo.call(void 0, () => {
495
495
  if (diffContent && initialContent) {
496
496
  try {
497
- const diffResult = _chunk5SFFHIEEjs.BlockNoteDiffUtil.diff(initialContent, diffContent);
498
- const renderedDiff = _chunk5SFFHIEEjs.BlockNoteWordDiffRendererUtil.renderWordDiffs(
497
+ const diffResult = _chunkDS4IBFWAjs.BlockNoteDiffUtil.diff(initialContent, diffContent);
498
+ const renderedDiff = _chunkDS4IBFWAjs.BlockNoteWordDiffRendererUtil.renderWordDiffs(
499
499
  diffResult.blocks,
500
500
  handleAcceptChange,
501
501
  handleRejectChange,
@@ -677,7 +677,7 @@ function BlockNoteEditor({
677
677
  "div",
678
678
  {
679
679
  ref: editorRef,
680
- className: _chunk5SFFHIEEjs.cn.call(void 0,
680
+ className: _chunkDS4IBFWAjs.cn.call(void 0,
681
681
  bordered ? "rounded-md border border-input bg-input/20 dark:bg-input/30" : "",
682
682
  "flex flex-col w-full",
683
683
  // Pin BlockNote's font-size so it doesn't jump from 14→16px when the
@@ -697,7 +697,7 @@ function BlockNoteEditor({
697
697
  formattingToolbar: false,
698
698
  slashMenu: !aiConfig,
699
699
  theme: "light",
700
- className: _chunk5SFFHIEEjs.cn.call(void 0,
700
+ className: _chunkDS4IBFWAjs.cn.call(void 0,
701
701
  "BlockNoteView flex-1",
702
702
  onChange && "[&.bn-container]:p-4",
703
703
  // In stretch mode the parent chain caps our height via flex; without
@@ -711,7 +711,7 @@ function BlockNoteEditor({
711
711
  children: [
712
712
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BlockNoteEditorFormattingToolbar, { showAI: !!aiConfig }),
713
713
  enableMentions && mentionSearchFn && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
714
- _chunk7CR4YB7Yjs.BlockNoteEditorMentionSuggestionMenu,
714
+ _chunkF6PZZ4KIjs.BlockNoteEditorMentionSuggestionMenu,
715
715
  {
716
716
  editor,
717
717
  mentionSearchFn,
@@ -720,7 +720,7 @@ function BlockNoteEditor({
720
720
  }
721
721
  ),
722
722
  _optionalChain([renderOverlays, 'optionalCall', _21 => _21(editor)]),
723
- enableMentions && mentionResolveFn && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk7CR4YB7Yjs.BlockNoteEditorMentionHoverCard, { containerRef: editorRef, mentionResolveFn }),
723
+ enableMentions && mentionResolveFn && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkF6PZZ4KIjs.BlockNoteEditorMentionHoverCard, { containerRef: editorRef, mentionResolveFn }),
724
724
  aiConfig && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
725
725
  _react.SuggestionMenuController,
726
726
  {
@@ -739,4 +739,4 @@ _chunk7QVYU63Ejs.__name.call(void 0, BlockNoteEditor, "BlockNoteEditor");
739
739
 
740
740
 
741
741
  exports.default = BlockNoteEditor;
742
- //# sourceMappingURL=BlockNoteEditor-XXTBZ7DD.js.map
742
+ //# sourceMappingURL=BlockNoteEditor-LMKWUOJG.js.map