@carlonicora/nextjs-jsonapi 6.26.0 → 6.28.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.
- package/dist/{BlockNoteEditor-RVDSB6TF.mjs → BlockNoteEditor-2LO34HXR.mjs} +2 -2
- package/dist/{BlockNoteEditor-JHXDOCS5.js → BlockNoteEditor-SWDRMNLT.js} +9 -9
- package/dist/{BlockNoteEditor-JHXDOCS5.js.map → BlockNoteEditor-SWDRMNLT.js.map} +1 -1
- package/dist/billing/index.js +378 -378
- package/dist/billing/index.mjs +1 -1
- package/dist/{chunk-JE6QWCNE.js → chunk-6RWEYSYE.js} +51 -7
- package/dist/chunk-6RWEYSYE.js.map +1 -0
- package/dist/{chunk-64REWDSK.mjs → chunk-NV3NNNS6.mjs} +51 -7
- package/dist/chunk-NV3NNNS6.mjs.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/containers/RoundPageContainer.d.ts +3 -1
- package/dist/components/containers/RoundPageContainer.d.ts.map +1 -1
- package/dist/components/containers/detailsFitsByDefault.d.ts +19 -0
- package/dist/components/containers/detailsFitsByDefault.d.ts.map +1 -0
- package/dist/components/index.js +2 -2
- package/dist/components/index.mjs +1 -1
- package/dist/components/typography/DetailField.d.ts +3 -1
- package/dist/components/typography/DetailField.d.ts.map +1 -1
- package/dist/contexts/index.js +2 -2
- package/dist/contexts/index.mjs +1 -1
- package/dist/email-automations/index.js +78 -78
- package/dist/email-automations/index.mjs +1 -1
- package/dist/features/analytics/index.js +107 -107
- package/dist/features/analytics/index.mjs +1 -1
- package/dist/features/blog/index.js +93 -93
- package/dist/features/blog/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 +102 -102
- package/dist/features/tokenusage/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/containers/RoundPageContainer.tsx +44 -4
- package/src/components/containers/__tests__/RoundPageContainer.detailsSurface.spec.tsx +82 -0
- package/src/components/containers/__tests__/detailsFitsByDefault.spec.ts +25 -0
- package/src/components/containers/detailsFitsByDefault.ts +30 -0
- package/src/components/typography/DetailField.tsx +4 -1
- package/src/components/typography/__tests__/DetailField.spec.tsx +13 -0
- package/dist/chunk-64REWDSK.mjs.map +0 -1
- package/dist/chunk-JE6QWCNE.js.map +0 -1
- /package/dist/{BlockNoteEditor-RVDSB6TF.mjs.map → BlockNoteEditor-2LO34HXR.mjs.map} +0 -0
|
@@ -9253,6 +9253,7 @@ function DetailField({
|
|
|
9253
9253
|
value,
|
|
9254
9254
|
horizontal = false,
|
|
9255
9255
|
labelWidth,
|
|
9256
|
+
valueClassName,
|
|
9256
9257
|
className,
|
|
9257
9258
|
children,
|
|
9258
9259
|
...props
|
|
@@ -9265,7 +9266,7 @@ function DetailField({
|
|
|
9265
9266
|
...props,
|
|
9266
9267
|
children: [
|
|
9267
9268
|
/* @__PURE__ */ jsx75("span", { className: cn("text-muted-foreground text-xs", horizontal && labelWidth && cn("shrink-0", labelWidth)), children: label }),
|
|
9268
|
-
/* @__PURE__ */ jsx75("div", { className: "text-sm", children: value ?? children })
|
|
9269
|
+
/* @__PURE__ */ jsx75("div", { className: cn("text-sm", valueClassName), children: value ?? children })
|
|
9269
9270
|
]
|
|
9270
9271
|
}
|
|
9271
9272
|
);
|
|
@@ -10875,7 +10876,7 @@ import { useRef as useRef18 } from "react";
|
|
|
10875
10876
|
import dynamic from "next/dynamic";
|
|
10876
10877
|
import React18 from "react";
|
|
10877
10878
|
import { jsx as jsx91 } from "react/jsx-runtime";
|
|
10878
|
-
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-
|
|
10879
|
+
var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-2LO34HXR.mjs"), {
|
|
10879
10880
|
ssr: false
|
|
10880
10881
|
});
|
|
10881
10882
|
var BlockNoteEditorContainer = React18.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
|
|
@@ -16356,6 +16357,19 @@ function ReactMarkdownContainer({
|
|
|
16356
16357
|
}
|
|
16357
16358
|
__name(ReactMarkdownContainer, "ReactMarkdownContainer");
|
|
16358
16359
|
|
|
16360
|
+
// src/components/containers/detailsFitsByDefault.ts
|
|
16361
|
+
var RAIL_REM = 14;
|
|
16362
|
+
var CONTENT_PADDING_REM = 2;
|
|
16363
|
+
var CONTENT_COLUMN_REM = 72;
|
|
16364
|
+
var DETAILS_REM = 24;
|
|
16365
|
+
var DETAILS_BORDER_PX = 1;
|
|
16366
|
+
function detailsFitsByDefault(params) {
|
|
16367
|
+
if (!params.hasCentredColumn) return false;
|
|
16368
|
+
const rem = (params.hasRail ? RAIL_REM : 0) + CONTENT_PADDING_REM + CONTENT_COLUMN_REM + DETAILS_REM;
|
|
16369
|
+
return params.cardInnerPx >= rem * params.remPx + DETAILS_BORDER_PX;
|
|
16370
|
+
}
|
|
16371
|
+
__name(detailsFitsByDefault, "detailsFitsByDefault");
|
|
16372
|
+
|
|
16359
16373
|
// src/components/containers/RoundPageContainerTitle.tsx
|
|
16360
16374
|
import { InfoIcon as InfoIcon2 } from "lucide-react";
|
|
16361
16375
|
import { useTranslations as useTranslations62 } from "next-intl";
|
|
@@ -16493,6 +16507,7 @@ function RoundPageContainer({
|
|
|
16493
16507
|
defaultDetailsOpen = false,
|
|
16494
16508
|
detailsTitle,
|
|
16495
16509
|
detailsIcon,
|
|
16510
|
+
detailsSurface = "default",
|
|
16496
16511
|
scroll = "fixed"
|
|
16497
16512
|
}) {
|
|
16498
16513
|
const t = useTranslations63();
|
|
@@ -16506,12 +16521,21 @@ function RoundPageContainer({
|
|
|
16506
16521
|
const hasMobileNavigation = useMobileNavigationItems().length > 0;
|
|
16507
16522
|
const hasSidebar = useOptionalSidebar() !== null;
|
|
16508
16523
|
const [mounted, setMounted] = useState55(false);
|
|
16524
|
+
const cardRef = useRef29(null);
|
|
16509
16525
|
useEffect45(() => {
|
|
16526
|
+
if (!mounted) return;
|
|
16510
16527
|
const match = document.cookie.split("; ").find((row) => row.startsWith(`${detailsCookieName}=`));
|
|
16511
16528
|
const stored = match?.split("=")[1];
|
|
16512
16529
|
if (stored === "true") setShowDetailsState(true);
|
|
16513
16530
|
else if (stored === "false") setShowDetailsState(false);
|
|
16514
|
-
|
|
16531
|
+
else if (!defaultDetailsOpen && cardRef.current && detailsFitsByDefault({
|
|
16532
|
+
cardInnerPx: cardRef.current.clientWidth,
|
|
16533
|
+
remPx: parseFloat(getComputedStyle(document.documentElement).fontSize) || 16,
|
|
16534
|
+
hasRail: layout2 === "rail" && !!tabs,
|
|
16535
|
+
hasCentredColumn: !fullWidth && (!activeFillHeight || activeConstrainWidth)
|
|
16536
|
+
}))
|
|
16537
|
+
setShowDetailsState(true);
|
|
16538
|
+
}, [mounted]);
|
|
16515
16539
|
useEffect45(() => {
|
|
16516
16540
|
setMounted(true);
|
|
16517
16541
|
}, []);
|
|
@@ -16645,7 +16669,7 @@ function RoundPageContainer({
|
|
|
16645
16669
|
isMobile ? "gap-1 p-1 pt-0" : cn("p-2 pt-0", hasSidebar && "ps-0")
|
|
16646
16670
|
),
|
|
16647
16671
|
children: [
|
|
16648
|
-
/* @__PURE__ */ jsxs96("div", { className: "bg-background flex min-h-0 w-full flex-1 rounded-lg border p-0", children: [
|
|
16672
|
+
/* @__PURE__ */ jsxs96("div", { ref: cardRef, className: "bg-background flex min-h-0 w-full flex-1 rounded-lg border p-0", children: [
|
|
16649
16673
|
/* @__PURE__ */ jsxs96("div", { className: cn("flex w-full flex-col", mobileFlow && "min-h-0 overflow-y-auto pb-16"), children: [
|
|
16650
16674
|
(!fullWidth || forceHeader) && /* @__PURE__ */ jsx172(
|
|
16651
16675
|
RoundPageContainerTitle,
|
|
@@ -16838,7 +16862,17 @@ function RoundPageContainer({
|
|
|
16838
16862
|
className: "data-[side=left]:w-full data-[side=right]:w-full data-[side=left]:sm:max-w-none data-[side=right]:sm:max-w-none",
|
|
16839
16863
|
children: [
|
|
16840
16864
|
/* @__PURE__ */ jsx172(SheetHeader, { children: /* @__PURE__ */ jsx172(SheetTitle, { children: detailsTitle ?? t("ui.labels.details") }) }),
|
|
16841
|
-
/* @__PURE__ */ jsx172(
|
|
16865
|
+
/* @__PURE__ */ jsx172(
|
|
16866
|
+
"div",
|
|
16867
|
+
{
|
|
16868
|
+
"data-slot": "details-body",
|
|
16869
|
+
className: cn(
|
|
16870
|
+
"overflow-y-auto",
|
|
16871
|
+
detailsSurface === "muted" ? "bg-muted dark:bg-background p-3" : "p-6 pt-0"
|
|
16872
|
+
),
|
|
16873
|
+
children: details
|
|
16874
|
+
}
|
|
16875
|
+
)
|
|
16842
16876
|
]
|
|
16843
16877
|
}
|
|
16844
16878
|
) }) : /* @__PURE__ */ jsxs96(
|
|
@@ -16870,7 +16904,17 @@ function RoundPageContainer({
|
|
|
16870
16904
|
// inside the measured row instead leaves this header 1px short of
|
|
16871
16905
|
// the page title bar, since `box-sizing: border-box` absorbs it.
|
|
16872
16906
|
/* @__PURE__ */ jsx172("div", { className: "shrink-0 border-b", children: /* @__PURE__ */ jsx172("div", { className: cn("flex items-center p-4", HEADER_ROW_MIN_H), children: /* @__PURE__ */ jsx172("span", { className: "text-primary truncate text-sm font-semibold", children: detailsTitle }) }) }),
|
|
16873
|
-
/* @__PURE__ */ jsx172(
|
|
16907
|
+
/* @__PURE__ */ jsx172(
|
|
16908
|
+
"div",
|
|
16909
|
+
{
|
|
16910
|
+
"data-slot": "details-body",
|
|
16911
|
+
className: cn(
|
|
16912
|
+
"min-h-0 flex-1 overflow-y-auto",
|
|
16913
|
+
detailsSurface === "muted" ? "bg-muted dark:bg-background p-3" : "p-4"
|
|
16914
|
+
),
|
|
16915
|
+
children: details
|
|
16916
|
+
}
|
|
16917
|
+
)
|
|
16874
16918
|
]
|
|
16875
16919
|
}
|
|
16876
16920
|
))
|
|
@@ -30957,4 +31001,4 @@ export {
|
|
|
30957
31001
|
useOAuthClients,
|
|
30958
31002
|
useOAuthClient
|
|
30959
31003
|
};
|
|
30960
|
-
//# sourceMappingURL=chunk-
|
|
31004
|
+
//# sourceMappingURL=chunk-NV3NNNS6.mjs.map
|