@carlonicora/nextjs-jsonapi 1.141.0 → 1.141.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.
@@ -48,7 +48,7 @@ import {
48
48
  TabsList,
49
49
  TabsTrigger,
50
50
  useCurrentUserContext
51
- } from "../chunk-7TKD4SMQ.mjs";
51
+ } from "../chunk-R6FRTQXV.mjs";
52
52
  import {
53
53
  getRoleId,
54
54
  getStripePublishableKey
@@ -9397,7 +9397,7 @@ __name(DateRangeSelector, "DateRangeSelector");
9397
9397
 
9398
9398
  // src/components/forms/EditorSheet.tsx
9399
9399
  import { useTranslations as useTranslations15 } from "next-intl";
9400
- import { useCallback as useCallback16, useEffect as useEffect17, useRef as useRef14 } from "react";
9400
+ import { isValidElement as isValidElement2, useCallback as useCallback16, useEffect as useEffect17, useRef as useRef14 } from "react";
9401
9401
  import { PencilIcon as PencilIcon3 } from "lucide-react";
9402
9402
 
9403
9403
  // src/components/forms/useEditorDialog.ts
@@ -9480,6 +9480,15 @@ __name(useEditorDialog, "useEditorDialog");
9480
9480
 
9481
9481
  // src/components/forms/EditorSheet.tsx
9482
9482
  import { Fragment as Fragment10, jsx as jsx83, jsxs as jsxs48 } from "react/jsx-runtime";
9483
+ function resolveTriggerIsNativeButton(trigger) {
9484
+ if (!isValidElement2(trigger)) return true;
9485
+ const props = trigger.props ?? {};
9486
+ if (typeof props.nativeButton === "boolean") return props.nativeButton;
9487
+ if (isValidElement2(props.render)) return props.render.type === "button";
9488
+ if (typeof trigger.type === "string") return trigger.type === "button";
9489
+ return true;
9490
+ }
9491
+ __name(resolveTriggerIsNativeButton, "resolveTriggerIsNativeButton");
9483
9492
  var sizeClasses = {
9484
9493
  sm: "data-[side=right]:sm:max-w-2xl",
9485
9494
  md: "data-[side=right]:sm:max-w-3xl",
@@ -9580,12 +9589,13 @@ function EditorSheet({
9580
9589
  // <button> inside SheetTrigger's <button> (invalid HTML / hydration
9581
9590
  // error). `render` also preserves the element's native `disabled`.
9582
9591
  //
9583
- // `nativeButton={false}` because this package's trigger convention is
9584
- // `<Button render={<div />} nativeButton={false}>` (see the package
9585
- // CLAUDE.md "pointer cursor" note). Without it the Trigger defaults to
9586
- // `nativeButton: true`, promising a native <button> it never renders,
9587
- // and Base UI logs a semantics/accessibility error at runtime.
9588
- /* @__PURE__ */ jsx83(SheetTrigger, { nativeButton: false, render: trigger })
9592
+ // `nativeButton` must match the element the trigger actually renders,
9593
+ // or Base UI logs a semantics/accessibility error at runtime. Call
9594
+ // sites pass BOTH kinds a native `<Button>` and the div-rendering
9595
+ // `<Button render={<div />} nativeButton={false}>` convention so it
9596
+ // is resolved per trigger rather than hardcoded (a constant `false`
9597
+ // warned on every native-button trigger).
9598
+ /* @__PURE__ */ jsx83(SheetTrigger, { nativeButton: resolveTriggerIsNativeButton(trigger), render: trigger })
9589
9599
  ) : /* @__PURE__ */ jsx83(SheetTrigger, { children: isEdit ? /* @__PURE__ */ jsx83(
9590
9600
  Button,
9591
9601
  {
@@ -10153,7 +10163,7 @@ import { useRef as useRef17 } from "react";
10153
10163
  import dynamic from "next/dynamic";
10154
10164
  import React17 from "react";
10155
10165
  import { jsx as jsx86 } from "react/jsx-runtime";
10156
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-UNYOBY7K.mjs"), {
10166
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-WUDLPAKY.mjs"), {
10157
10167
  ssr: false
10158
10168
  });
10159
10169
  var BlockNoteEditorContainer = React17.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -23939,4 +23949,4 @@ export {
23939
23949
  useOAuthClients,
23940
23950
  useOAuthClient
23941
23951
  };
23942
- //# sourceMappingURL=chunk-7TKD4SMQ.mjs.map
23952
+ //# sourceMappingURL=chunk-R6FRTQXV.mjs.map