@carlonicora/nextjs-jsonapi 2.2.0 → 2.2.1

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 (51) hide show
  1. package/dist/{BlockNoteEditor-HAUE4EPR.mjs → BlockNoteEditor-2LGNETXD.mjs} +4 -4
  2. package/dist/{BlockNoteEditor-5TMQ5YCD.js → BlockNoteEditor-EAEGUVFI.js} +19 -19
  3. package/dist/{BlockNoteEditor-5TMQ5YCD.js.map → BlockNoteEditor-EAEGUVFI.js.map} +1 -1
  4. package/dist/billing/index.js +357 -357
  5. package/dist/billing/index.mjs +3 -3
  6. package/dist/{chunk-HPKCZMQX.js → chunk-4I2W336O.js} +741 -737
  7. package/dist/chunk-4I2W336O.js.map +1 -0
  8. package/dist/{chunk-MAWTFEY3.mjs → chunk-B34NBMKV.mjs} +2 -2
  9. package/dist/{chunk-JG7MCYCW.js → chunk-BLKR2Q7F.js} +7 -7
  10. package/dist/{chunk-JG7MCYCW.js.map → chunk-BLKR2Q7F.js.map} +1 -1
  11. package/dist/{chunk-6YIZX26T.js → chunk-DQJ5C5TV.js} +10 -2
  12. package/dist/chunk-DQJ5C5TV.js.map +1 -0
  13. package/dist/{chunk-PGW2OP3L.mjs → chunk-OC7F4L7K.mjs} +11 -7
  14. package/dist/chunk-OC7F4L7K.mjs.map +1 -0
  15. package/dist/{chunk-P5TMD7GK.mjs → chunk-R57FRJ6H.mjs} +9 -1
  16. package/dist/chunk-R57FRJ6H.mjs.map +1 -0
  17. package/dist/client/index.js +4 -4
  18. package/dist/client/index.mjs +3 -3
  19. package/dist/components/index.js +4 -4
  20. package/dist/components/index.mjs +3 -3
  21. package/dist/contexts/index.js +4 -4
  22. package/dist/contexts/index.mjs +3 -3
  23. package/dist/core/index.d.mts +15 -1
  24. package/dist/core/index.d.ts +15 -1
  25. package/dist/core/index.js +4 -2
  26. package/dist/core/index.js.map +1 -1
  27. package/dist/core/index.mjs +3 -1
  28. package/dist/features/help/index.js +37 -37
  29. package/dist/features/help/index.mjs +3 -3
  30. package/dist/features/tokenusage/index.js +71 -71
  31. package/dist/features/tokenusage/index.mjs +3 -3
  32. package/dist/index.d.mts +1 -1
  33. package/dist/index.d.ts +1 -1
  34. package/dist/index.js +5 -3
  35. package/dist/index.js.map +1 -1
  36. package/dist/index.mjs +4 -2
  37. package/dist/server/index.js +3 -3
  38. package/dist/server/index.mjs +1 -1
  39. package/package.json +1 -1
  40. package/src/components/containers/RoundPageContainer.tsx +10 -1
  41. package/src/features/user/components/details/UserStandaloneDetails.tsx +2 -0
  42. package/src/features/user/components/forms/UserAvatarEditor.tsx +5 -1
  43. package/src/utils/index.ts +1 -0
  44. package/src/utils/isRemoteImageSrc.test.ts +29 -0
  45. package/src/utils/isRemoteImageSrc.ts +16 -0
  46. package/dist/chunk-6YIZX26T.js.map +0 -1
  47. package/dist/chunk-HPKCZMQX.js.map +0 -1
  48. package/dist/chunk-P5TMD7GK.mjs.map +0 -1
  49. package/dist/chunk-PGW2OP3L.mjs.map +0 -1
  50. /package/dist/{BlockNoteEditor-HAUE4EPR.mjs.map → BlockNoteEditor-2LGNETXD.mjs.map} +0 -0
  51. /package/dist/{chunk-MAWTFEY3.mjs.map → chunk-B34NBMKV.mjs.map} +0 -0
@@ -20,7 +20,7 @@ import {
20
20
  useI18nLocale,
21
21
  useI18nRouter,
22
22
  useI18nTranslations
23
- } from "./chunk-MAWTFEY3.mjs";
23
+ } from "./chunk-B34NBMKV.mjs";
24
24
  import {
25
25
  AVAILABLE_OAUTH_SCOPES,
26
26
  AssistantActionService,
@@ -57,6 +57,7 @@ import {
57
57
  getLastApiTotal,
58
58
  getTokenHandler,
59
59
  getViewportContext,
60
+ isRemoteImageSrc,
60
61
  measureViewport,
61
62
  persistViewport,
62
63
  rehydrate,
@@ -68,7 +69,7 @@ import {
68
69
  useIsMobile,
69
70
  validateItalianTaxCode,
70
71
  validatePartitaIva
71
- } from "./chunk-P5TMD7GK.mjs";
72
+ } from "./chunk-R57FRJ6H.mjs";
72
73
  import {
73
74
  JsonApiContext
74
75
  } from "./chunk-VOXD3ZLY.mjs";
@@ -7830,6 +7831,7 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
7830
7831
  setFile(files[0]);
7831
7832
  }
7832
7833
  }, [files]);
7834
+ const avatarSrc = file ? URL.createObjectURL(file) : user?.avatar || "";
7833
7835
  const dropzone2 = {
7834
7836
  multiple: false,
7835
7837
  maxSize: 100 * 1024 * 1024,
@@ -7849,10 +7851,11 @@ function UserAvatarEditor({ user, file, setFile, resetImage, setResetImage }) {
7849
7851
  children: /* @__PURE__ */ jsx61(FileInput, { className: "bg-muted text-muted-foreground flex h-full w-full flex-col items-center justify-center", children: !resetImage && (file || user?.avatar) ? /* @__PURE__ */ jsx61(
7850
7852
  Image,
7851
7853
  {
7852
- src: file ? URL.createObjectURL(file) : user?.avatar || "",
7854
+ src: avatarSrc,
7853
7855
  alt: t(`common.avatar`),
7854
7856
  width: 200,
7855
- height: 200
7857
+ height: 200,
7858
+ unoptimized: isRemoteImageSrc(avatarSrc)
7856
7859
  }
7857
7860
  ) : /* @__PURE__ */ jsx61(UploadIcon, { className: "my-4 h-8 w-8" }) })
7858
7861
  }
@@ -10165,7 +10168,7 @@ import { useRef as useRef17 } from "react";
10165
10168
  import dynamic from "next/dynamic";
10166
10169
  import React17 from "react";
10167
10170
  import { jsx as jsx86 } from "react/jsx-runtime";
10168
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-HAUE4EPR.mjs"), {
10171
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-2LGNETXD.mjs"), {
10169
10172
  ssr: false
10170
10173
  });
10171
10174
  var BlockNoteEditorContainer = React17.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -11800,6 +11803,7 @@ function UserStanadaloneDetails({ user }) {
11800
11803
  alt: user.name,
11801
11804
  width: 800,
11802
11805
  height: 600,
11806
+ unoptimized: isRemoteImageSrc(user.avatar),
11803
11807
  className: "h-auto w-full rounded-lg object-contain"
11804
11808
  }
11805
11809
  ) }) }),
@@ -15196,7 +15200,7 @@ function RoundPageContainer({
15196
15200
  {
15197
15201
  "data-testid": "round-page-rail",
15198
15202
  className: "hidden shrink-0 border-r p-4 md:flex md:w-56 md:flex-col md:overflow-y-auto",
15199
- children: /* @__PURE__ */ jsxs94(TabsList, { className: "flex h-auto flex-col items-stretch gap-0.5 bg-transparent p-0", children: [
15203
+ children: /* @__PURE__ */ jsxs94(TabsList, { className: "flex h-auto w-full flex-col items-stretch gap-0.5 bg-transparent p-0", children: [
15200
15204
  ungrouped.map((tab) => /* @__PURE__ */ jsx161(TabsTrigger, { value: tabValue(tab), className: railTriggerClass, children: tab.contentLabel ?? tab.label }, tab.label)),
15201
15205
  groups.map((group) => /* @__PURE__ */ jsxs94(Fragment23, { children: [
15202
15206
  /* @__PURE__ */ jsx161(
@@ -24392,4 +24396,4 @@ export {
24392
24396
  useOAuthClients,
24393
24397
  useOAuthClient
24394
24398
  };
24395
- //# sourceMappingURL=chunk-PGW2OP3L.mjs.map
24399
+ //# sourceMappingURL=chunk-OC7F4L7K.mjs.map