@carlonicora/nextjs-jsonapi 2.0.0 → 2.0.2

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 (29) hide show
  1. package/dist/{BlockNoteEditor-LMKWUOJG.js → BlockNoteEditor-4224DOTR.js} +9 -9
  2. package/dist/{BlockNoteEditor-LMKWUOJG.js.map → BlockNoteEditor-4224DOTR.js.map} +1 -1
  3. package/dist/{BlockNoteEditor-34QM4UR5.mjs → BlockNoteEditor-7NVXRTVR.mjs} +2 -2
  4. package/dist/billing/index.js +310 -310
  5. package/dist/billing/index.mjs +1 -1
  6. package/dist/{chunk-F6PZZ4KI.js → chunk-QS5Y6ZBF.js} +28 -14
  7. package/dist/chunk-QS5Y6ZBF.js.map +1 -0
  8. package/dist/{chunk-UGSOBBZH.mjs → chunk-TESVH5PV.mjs} +28 -14
  9. package/dist/chunk-TESVH5PV.mjs.map +1 -0
  10. package/dist/client/index.js +2 -2
  11. package/dist/client/index.mjs +1 -1
  12. package/dist/components/index.d.mts +13 -0
  13. package/dist/components/index.d.ts +13 -0
  14. package/dist/components/index.js +2 -2
  15. package/dist/components/index.mjs +1 -1
  16. package/dist/contexts/index.js +2 -2
  17. package/dist/contexts/index.mjs +1 -1
  18. package/dist/features/help/index.js +31 -31
  19. package/dist/features/help/index.mjs +1 -1
  20. package/dist/features/tokenusage/index.js +56 -56
  21. package/dist/features/tokenusage/index.mjs +1 -1
  22. package/package.json +1 -1
  23. package/src/components/containers/RoundPageContainer.tsx +14 -1
  24. package/src/features/company/hooks/useSubscriptionStatus.test.ts +130 -0
  25. package/src/features/company/hooks/useSubscriptionStatus.ts +17 -5
  26. package/src/shadcnui/ui/command.tsx +21 -6
  27. package/dist/chunk-F6PZZ4KI.js.map +0 -1
  28. package/dist/chunk-UGSOBBZH.mjs.map +0 -1
  29. /package/dist/{BlockNoteEditor-34QM4UR5.mjs.map → BlockNoteEditor-7NVXRTVR.mjs.map} +0 -0
@@ -1836,20 +1836,20 @@ function Command({ className, ...props }) {
1836
1836
  }
1837
1837
  __name(Command, "Command");
1838
1838
  function CommandDialog({
1839
- title = "Command Palette",
1840
- description = "Search for a command to run...",
1839
+ title,
1840
+ description,
1841
1841
  children,
1842
1842
  className,
1843
1843
  showCloseButton = false,
1844
1844
  ...props
1845
1845
  }) {
1846
- return /* @__PURE__ */ jsxs8(Dialog, { ...props, children: [
1847
- /* @__PURE__ */ jsxs8(DialogHeader, { className: "sr-only", children: [
1848
- /* @__PURE__ */ jsx18(DialogTitle, { children: title }),
1849
- /* @__PURE__ */ jsx18(DialogDescription, { children: description })
1846
+ return /* @__PURE__ */ jsx18(Dialog, { ...props, children: /* @__PURE__ */ jsxs8(DialogContent, { className: cn("rounded-xl! p-0 overflow-hidden p-0", className), showCloseButton, children: [
1847
+ (title || description) && /* @__PURE__ */ jsxs8(DialogHeader, { className: "sr-only", children: [
1848
+ title && /* @__PURE__ */ jsx18(DialogTitle, { children: title }),
1849
+ description && /* @__PURE__ */ jsx18(DialogDescription, { children: description })
1850
1850
  ] }),
1851
- /* @__PURE__ */ jsx18(DialogContent, { className: cn("rounded-xl! p-0 overflow-hidden p-0", className), showCloseButton, children })
1852
- ] });
1851
+ children
1852
+ ] }) });
1853
1853
  }
1854
1854
  __name(CommandDialog, "CommandDialog");
1855
1855
  function CommandInput({ className, ...props }) {
@@ -10164,7 +10164,7 @@ import { useRef as useRef17 } from "react";
10164
10164
  import dynamic from "next/dynamic";
10165
10165
  import React17 from "react";
10166
10166
  import { jsx as jsx86 } from "react/jsx-runtime";
10167
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-34QM4UR5.mjs"), {
10167
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-7NVXRTVR.mjs"), {
10168
10168
  ssr: false
10169
10169
  });
10170
10170
  var BlockNoteEditorContainer = React17.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -15264,7 +15264,20 @@ function RoundPageContainer({
15264
15264
  // `flex-col` + a separate scroll body below: the header must stay
15265
15265
  // put while the panel content scrolls. Scrolling on this element
15266
15266
  // (as it did before) would carry the header away with the content.
15267
- "flex h-full shrink-0 flex-col overflow-hidden transition-all duration-300 ease-in-out",
15267
+ //
15268
+ // `relative` is load-bearing: the panel content mounts Base UI
15269
+ // dialog headers marked `sr-only`, which are `position: absolute`
15270
+ // with no offsets. Without a positioned ancestor their containing
15271
+ // block is the initial containing block, so when the panel is
15272
+ // collapsed (`w-0`) their static position lands a few px past the
15273
+ // viewport's right edge and adds to the DOCUMENT's scroll area —
15274
+ // `overflow-hidden` here cannot clip them, because it only clips
15275
+ // descendants whose containing block is inside this element. That
15276
+ // produced a page-wide horizontal scrollbar, which in turn stole
15277
+ // 15px of height and made every `100vh`/`100svh` box overflow
15278
+ // vertically too. Making this the containing block lets
15279
+ // `overflow-hidden` clip them again.
15280
+ "relative flex h-full shrink-0 flex-col overflow-hidden transition-all duration-300 ease-in-out",
15268
15281
  showDetails ? "w-96 border-l opacity-100" : "ml-0 w-0 border-l-0 opacity-0"
15269
15282
  ),
15270
15283
  children: [
@@ -16145,7 +16158,7 @@ function useSubscriptionStatus() {
16145
16158
  trialEndsAt: null,
16146
16159
  daysRemaining: 0,
16147
16160
  isGracePeriod: false,
16148
- isBlocked: true
16161
+ isBlocked: false
16149
16162
  };
16150
16163
  }
16151
16164
  if (company.isActiveSubscription) {
@@ -16163,12 +16176,13 @@ function useSubscriptionStatus() {
16163
16176
  const now = /* @__PURE__ */ new Date();
16164
16177
  const msRemaining = trialEndsAt.getTime() - now.getTime();
16165
16178
  const daysRemaining = Math.ceil(msRemaining / (1e3 * 60 * 60 * 24));
16179
+ const trialElapsed = daysRemaining <= 0;
16166
16180
  return {
16167
- status: daysRemaining > 0 ? "trial" : "expired",
16181
+ status: trialElapsed ? "expired" : "trial",
16168
16182
  trialEndsAt,
16169
16183
  daysRemaining: Math.max(0, daysRemaining),
16170
16184
  isGracePeriod: daysRemaining > 0 && daysRemaining <= GRACE_DAYS,
16171
- isBlocked: daysRemaining <= 0
16185
+ isBlocked: trialElapsed
16172
16186
  };
16173
16187
  }, [company, currentUser]);
16174
16188
  }
@@ -23950,4 +23964,4 @@ export {
23950
23964
  useOAuthClients,
23951
23965
  useOAuthClient
23952
23966
  };
23953
- //# sourceMappingURL=chunk-UGSOBBZH.mjs.map
23967
+ //# sourceMappingURL=chunk-TESVH5PV.mjs.map