@carlonicora/nextjs-jsonapi 1.130.0 → 1.131.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.
@@ -3481,7 +3481,7 @@ function SheetContent({
3481
3481
  ...props
3482
3482
  }) {
3483
3483
  return /* @__PURE__ */ jsxs20(SheetPortal, { children: [
3484
- /* @__PURE__ */ jsx36(SheetOverlay, {}),
3484
+ /* @__PURE__ */ jsx36(SheetOverlay, { forceRender: true }),
3485
3485
  /* @__PURE__ */ jsxs20(
3486
3486
  SheetPrimitive.Popup,
3487
3487
  {
@@ -9335,6 +9335,7 @@ import { PencilIcon as PencilIcon3 } from "lucide-react";
9335
9335
 
9336
9336
  // src/components/forms/useEditorDialog.ts
9337
9337
  import { useCallback as useCallback15, useEffect as useEffect16, useRef as useRef13, useState as useState22 } from "react";
9338
+ var openEditorStack = [];
9338
9339
  function useEditorDialog(isFormDirty, options) {
9339
9340
  const [open, setOpen] = useState22(false);
9340
9341
  const [showDiscardConfirm, setShowDiscardConfirm] = useState22(false);
@@ -9372,9 +9373,20 @@ function useEditorDialog(isFormDirty, options) {
9372
9373
  },
9373
9374
  [isFormDirty]
9374
9375
  );
9376
+ const dialogId = useRef13({});
9377
+ useEffect16(() => {
9378
+ if (!open) return;
9379
+ const id = dialogId.current;
9380
+ openEditorStack.push(id);
9381
+ return () => {
9382
+ const index = openEditorStack.lastIndexOf(id);
9383
+ if (index !== -1) openEditorStack.splice(index, 1);
9384
+ };
9385
+ }, [open]);
9375
9386
  useEffect16(() => {
9376
9387
  const handleKeyDown = /* @__PURE__ */ __name((event) => {
9377
9388
  if (event.key === "Escape" && open) {
9389
+ if (openEditorStack[openEditorStack.length - 1] !== dialogId.current) return;
9378
9390
  event.preventDefault();
9379
9391
  event.stopPropagation();
9380
9392
  handleOpenChange(false);
@@ -10038,7 +10050,7 @@ import { useRef as useRef17 } from "react";
10038
10050
  import dynamic from "next/dynamic";
10039
10051
  import React17 from "react";
10040
10052
  import { jsx as jsx85 } from "react/jsx-runtime";
10041
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-KARBUMFE.mjs"), {
10053
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-PVBZYPMF.mjs"), {
10042
10054
  ssr: false
10043
10055
  });
10044
10056
  var BlockNoteEditorContainer = React17.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -14631,36 +14643,39 @@ function RoundPageContainerTitle({
14631
14643
  }) {
14632
14644
  const { title } = useSharedContext();
14633
14645
  const isMobile = useIsMobile();
14634
- return /* @__PURE__ */ jsxs92("div", { className: cn(`flex w-full flex-row items-center gap-x-2 border-b p-4 justify-between`), children: [
14635
- !isMobile ? /* @__PURE__ */ jsxs92("div", { className: "flex w-full gap-x-4", children: [
14636
- /* @__PURE__ */ jsxs92("div", { className: "text-muted-foreground flex items-center gap-x-2 text-lg font-light whitespace-nowrap", children: [
14646
+ return /* @__PURE__ */ jsxs92("div", { className: "flex w-full flex-col border-b", children: [
14647
+ /* @__PURE__ */ jsxs92("div", { className: cn(`flex w-full flex-row items-center gap-x-2 p-4 justify-between`), children: [
14648
+ !isMobile ? /* @__PURE__ */ jsxs92("div", { className: "flex w-full gap-x-4", children: [
14649
+ /* @__PURE__ */ jsxs92("div", { className: "text-muted-foreground flex items-center gap-x-2 text-lg font-light whitespace-nowrap", children: [
14650
+ title.titleActions,
14651
+ module && module.icon ? /* @__PURE__ */ jsx156(module.icon, { className: "text-primary h-6 w-6" }) : title.icon,
14652
+ title.type
14653
+ ] }),
14654
+ /* @__PURE__ */ jsx156("div", { className: cn("text-primary w-full text-xl font-semibold"), children: title.element })
14655
+ ] }) : /* @__PURE__ */ jsxs92("div", { className: "text-muted-foreground flex min-w-0 items-center gap-x-2 text-base font-light", children: [
14637
14656
  title.titleActions,
14638
- module && module.icon ? /* @__PURE__ */ jsx156(module.icon, { className: "text-primary h-6 w-6" }) : title.icon,
14639
- title.type
14657
+ module && module.icon ? /* @__PURE__ */ jsx156(module.icon, { className: "text-primary h-5 w-5 shrink-0" }) : title.icon,
14658
+ /* @__PURE__ */ jsx156("span", { className: "truncate", children: title.type })
14640
14659
  ] }),
14641
- /* @__PURE__ */ jsx156("div", { className: cn("text-primary w-full text-xl font-semibold"), children: title.element })
14642
- ] }) : /* @__PURE__ */ jsxs92("div", { className: "text-muted-foreground flex min-w-0 items-center gap-x-2 text-base font-light", children: [
14643
- title.titleActions,
14644
- module && module.icon ? /* @__PURE__ */ jsx156(module.icon, { className: "text-primary h-5 w-5 shrink-0" }) : title.icon,
14645
- /* @__PURE__ */ jsx156("span", { className: "truncate", children: title.type })
14646
- ] }),
14647
- (title.functions || details) && /* @__PURE__ */ jsxs92("div", { className: "flex shrink-0 items-center gap-x-2", children: [
14648
- title.functions,
14649
- details && /* @__PURE__ */ jsxs92(Tooltip2, { children: [
14650
- /* @__PURE__ */ jsx156(TooltipTrigger, { children: /* @__PURE__ */ jsx156(
14651
- Button,
14652
- {
14653
- render: /* @__PURE__ */ jsx156("div", {}),
14654
- nativeButton: false,
14655
- variant: showDetails ? `ghost` : `default`,
14656
- onClick: () => setShowDetails(!showDetails),
14657
- className: cn(`cursor-pointer`),
14658
- children: /* @__PURE__ */ jsx156(InfoIcon2, {})
14659
- }
14660
- ) }),
14661
- /* @__PURE__ */ jsx156(TooltipContent, { children: showDetails ? "Hide details" : "Show details" })
14660
+ (title.functions || details) && /* @__PURE__ */ jsxs92("div", { className: "flex shrink-0 items-center gap-x-2", children: [
14661
+ title.functions,
14662
+ details && /* @__PURE__ */ jsxs92(Tooltip2, { children: [
14663
+ /* @__PURE__ */ jsx156(TooltipTrigger, { children: /* @__PURE__ */ jsx156(
14664
+ Button,
14665
+ {
14666
+ render: /* @__PURE__ */ jsx156("div", {}),
14667
+ nativeButton: false,
14668
+ variant: showDetails ? `ghost` : `default`,
14669
+ onClick: () => setShowDetails(!showDetails),
14670
+ className: cn(`cursor-pointer`),
14671
+ children: /* @__PURE__ */ jsx156(InfoIcon2, {})
14672
+ }
14673
+ ) }),
14674
+ /* @__PURE__ */ jsx156(TooltipContent, { children: showDetails ? "Hide details" : "Show details" })
14675
+ ] })
14662
14676
  ] })
14663
- ] })
14677
+ ] }),
14678
+ title.actionBar && /* @__PURE__ */ jsx156("div", { "data-testid": "round-page-action-bar", className: "flex w-full items-center border-t px-4 py-2", children: title.actionBar })
14664
14679
  ] });
14665
14680
  }
14666
14681
  __name(RoundPageContainerTitle, "RoundPageContainerTitle");
@@ -23611,4 +23626,4 @@ export {
23611
23626
  useOAuthClients,
23612
23627
  useOAuthClient
23613
23628
  };
23614
- //# sourceMappingURL=chunk-NXHNJCY2.mjs.map
23629
+ //# sourceMappingURL=chunk-MDXT47V4.mjs.map