@carlonicora/nextjs-jsonapi 4.0.5 → 4.0.6
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.
- package/dist/{BlockNoteEditor-L3STMBP2.mjs → BlockNoteEditor-6CTF5DEV.mjs} +2 -2
- package/dist/{BlockNoteEditor-H6EXQD46.js → BlockNoteEditor-JJ3S5COJ.js} +9 -9
- package/dist/{BlockNoteEditor-H6EXQD46.js.map → BlockNoteEditor-JJ3S5COJ.js.map} +1 -1
- package/dist/billing/index.js +335 -335
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-3JET3LL7.js → chunk-XUUHPYMM.js} +14 -12
- package/dist/chunk-XUUHPYMM.js.map +1 -0
- package/dist/{chunk-KX2776OK.mjs → chunk-Y2AWOWWH.mjs} +14 -12
- package/dist/chunk-Y2AWOWWH.mjs.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/features/analytics/index.js +88 -88
- package/dist/features/analytics/index.mjs +1 -1
- package/dist/features/help/index.js +31 -31
- package/dist/features/help/index.mjs +1 -1
- package/dist/features/tokenusage/index.js +75 -75
- package/dist/features/tokenusage/index.mjs +1 -1
- package/package.json +1 -1
- package/src/shadcnui/ui/__tests__/sidebar.session.test.tsx +136 -0
- package/src/shadcnui/ui/sidebar.tsx +21 -13
- package/dist/chunk-3JET3LL7.js.map +0 -1
- package/dist/chunk-KX2776OK.mjs.map +0 -1
- /package/dist/{BlockNoteEditor-L3STMBP2.mjs.map → BlockNoteEditor-6CTF5DEV.mjs.map} +0 -0
|
@@ -3773,26 +3773,28 @@ function SidebarProviderCore({
|
|
|
3773
3773
|
children,
|
|
3774
3774
|
...props
|
|
3775
3775
|
}) {
|
|
3776
|
+
const viewport = React8.useContext(getViewportContext());
|
|
3777
|
+
const hasViewport = viewport !== void 0;
|
|
3776
3778
|
const sessionIsMobile = React8.useMemo(
|
|
3777
|
-
() => session ? mapThenable(session, (s) => s.isMobile) : void 0,
|
|
3778
|
-
[session]
|
|
3779
|
+
() => session && !hasViewport ? mapThenable(session, (s) => s.isMobile) : void 0,
|
|
3780
|
+
[session, hasViewport]
|
|
3779
3781
|
);
|
|
3780
|
-
const isMobile =
|
|
3781
|
-
const isMobileRef = React8.useRef(
|
|
3782
|
+
const isMobile = session ? viewport ?? sessionIsMobile : viewportIsMobile;
|
|
3783
|
+
const isMobileRef = React8.useRef(typeof isMobile === "boolean" ? isMobile : false);
|
|
3782
3784
|
React8.useEffect(() => {
|
|
3783
|
-
if (!
|
|
3784
|
-
isMobileRef.current =
|
|
3785
|
+
if (!(isMobile instanceof Promise)) {
|
|
3786
|
+
isMobileRef.current = isMobile;
|
|
3785
3787
|
return;
|
|
3786
3788
|
}
|
|
3787
3789
|
let cancelled = false;
|
|
3788
|
-
|
|
3790
|
+
isMobile.then((value) => {
|
|
3789
3791
|
if (!cancelled) isMobileRef.current = value;
|
|
3790
3792
|
}).catch(() => {
|
|
3791
3793
|
});
|
|
3792
3794
|
return () => {
|
|
3793
3795
|
cancelled = true;
|
|
3794
3796
|
};
|
|
3795
|
-
}, [
|
|
3797
|
+
}, [isMobile]);
|
|
3796
3798
|
const [openMobile, setOpenMobile] = React8.useState(false);
|
|
3797
3799
|
const [_open, _setOpen] = React8.useState(defaultOpen);
|
|
3798
3800
|
const open = openProp ?? _open;
|
|
@@ -3826,9 +3828,9 @@ function SidebarProviderCore({
|
|
|
3826
3828
|
[setOpenProp, open]
|
|
3827
3829
|
);
|
|
3828
3830
|
const toggleSidebar = React8.useCallback(() => {
|
|
3829
|
-
const mobile =
|
|
3831
|
+
const mobile = typeof isMobile === "boolean" ? isMobile : isMobileRef.current;
|
|
3830
3832
|
return mobile ? setOpenMobile((open2) => !open2) : setOpen((open2) => !open2);
|
|
3831
|
-
}, [
|
|
3833
|
+
}, [isMobile, setOpen, setOpenMobile]);
|
|
3832
3834
|
React8.useEffect(() => {
|
|
3833
3835
|
const handleKeyDown = /* @__PURE__ */ __name((event) => {
|
|
3834
3836
|
if (event.key === SIDEBAR_KEYBOARD_SHORTCUT && (event.metaKey || event.ctrlKey)) {
|
|
@@ -10559,7 +10561,7 @@ import { useRef as useRef18 } from "react";
|
|
|
10559
10561
|
import dynamic from "next/dynamic";
|
|
10560
10562
|
import React18 from "react";
|
|
10561
10563
|
import { jsx as jsx90 } from "react/jsx-runtime";
|
|
10562
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
10564
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-6CTF5DEV.mjs"), {
|
|
10563
10565
|
ssr: false
|
|
10564
10566
|
});
|
|
10565
10567
|
var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -27915,4 +27917,4 @@ export {
|
|
|
27915
27917
|
useOAuthClients,
|
|
27916
27918
|
useOAuthClient
|
|
27917
27919
|
};
|
|
27918
|
-
//# sourceMappingURL=chunk-
|
|
27920
|
+
//# sourceMappingURL=chunk-Y2AWOWWH.mjs.map
|