@carlonicora/nextjs-jsonapi 1.137.4 → 1.138.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.
@@ -10117,7 +10117,7 @@ import { useRef as useRef17 } from "react";
10117
10117
  import dynamic from "next/dynamic";
10118
10118
  import React17 from "react";
10119
10119
  import { jsx as jsx86 } from "react/jsx-runtime";
10120
- var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-QZX4UWZE.mjs"), {
10120
+ var BlockNoteEditor = dynamic(() => import("./BlockNoteEditor-JEHEQJAW.mjs"), {
10121
10121
  ssr: false
10122
10122
  });
10123
10123
  var BlockNoteEditorContainer = React17.memo(/* @__PURE__ */ __name(function EditorContainer(props) {
@@ -10918,7 +10918,7 @@ function FormPlaceAutocomplete({
10918
10918
  }, "fetchPlaceDetails");
10919
10919
  const handleInputChange = /* @__PURE__ */ __name((value) => {
10920
10920
  setInputValue(value);
10921
- form.setValue(id, value);
10921
+ form.setValue(id, value, { shouldValidate: true });
10922
10922
  if (debounceRef.current) {
10923
10923
  clearTimeout(debounceRef.current);
10924
10924
  }
@@ -10934,7 +10934,7 @@ function FormPlaceAutocomplete({
10934
10934
  }, "handleInputChange");
10935
10935
  const handleSuggestionSelect = /* @__PURE__ */ __name(async (suggestion) => {
10936
10936
  setInputValue(suggestion.description);
10937
- form.setValue(id, suggestion.description);
10937
+ form.setValue(id, suggestion.description, { shouldValidate: true });
10938
10938
  setShowSuggestions(false);
10939
10939
  setSuggestions([]);
10940
10940
  const addressComponents = await fetchPlaceDetails(suggestion.place_id);
@@ -14988,14 +14988,15 @@ function RoundPageContainer({
14988
14988
  "data-testid": testId,
14989
14989
  className: cn(
14990
14990
  "flex h-[calc(100svh-var(--app-header-h,3rem))] w-full flex-col",
14991
- // The bottom safe-area inset is reserved HERE, not inside
14992
- // MobileNavigationBar: padding within the bar's bordered card leaves
14993
- // dead space inside the rounded box with the icons crammed against
14994
- // its top edge (measured 78px tall for a 42px icon row). Held by the
14995
- // shell instead, the bar keeps its natural height and the whole card
14996
- // floats above the home indicator, which is what the detached-card
14997
- // design intends. Resolves to plain p-1 wherever the inset is 0.
14998
- isMobile ? "gap-1 p-1 pt-0 pb-[calc(0.25rem+env(safe-area-inset-bottom))]" : "p-2 pt-0 pl-0"
14991
+ // Deliberately NO bottom safe-area inset, here or in
14992
+ // MobileNavigationBar. iOS still reports 34px of bottom inset
14993
+ // (measured in an installed PWA), but nothing is drawn in that strip
14994
+ // on current devices, so reserving it only opens a band of empty
14995
+ // background under the bar. Inside the bar it made a 42px icon row
14996
+ // render 78px tall; below the bar it became a visible gap. The
14997
+ // swipe-up gesture region is unaffected either way it is a gesture
14998
+ // area, not painted chrome.
14999
+ isMobile ? "gap-1 p-1 pt-0" : "p-2 pt-0 pl-0"
14999
15000
  ),
15000
15001
  children: [
15001
15002
  /* @__PURE__ */ jsx161("div", { className: cn("bg-background flex min-h-0 w-full flex-1", isMobile ? "" : "rounded-lg border p-0"), children: /* @__PURE__ */ jsx161("div", { className: "flex w-full flex-col" }) }),
@@ -15022,14 +15023,15 @@ function RoundPageContainer({
15022
15023
  "data-testid": testId,
15023
15024
  className: cn(
15024
15025
  `flex h-[calc(100svh-var(--app-header-h,3rem))] w-full flex-col`,
15025
- // The bottom safe-area inset is reserved HERE, not inside
15026
- // MobileNavigationBar: padding within the bar's bordered card leaves
15027
- // dead space inside the rounded box with the icons crammed against
15028
- // its top edge (measured 78px tall for a 42px icon row). Held by the
15029
- // shell instead, the bar keeps its natural height and the whole card
15030
- // floats above the home indicator, which is what the detached-card
15031
- // design intends. Resolves to plain p-1 wherever the inset is 0.
15032
- isMobile ? "gap-1 p-1 pt-0 pb-[calc(0.25rem+env(safe-area-inset-bottom))]" : "p-2 pt-0 pl-0"
15026
+ // Deliberately NO bottom safe-area inset, here or in
15027
+ // MobileNavigationBar. iOS still reports 34px of bottom inset
15028
+ // (measured in an installed PWA), but nothing is drawn in that strip
15029
+ // on current devices, so reserving it only opens a band of empty
15030
+ // background under the bar. Inside the bar it made a 42px icon row
15031
+ // render 78px tall; below the bar it became a visible gap. The
15032
+ // swipe-up gesture region is unaffected either way it is a gesture
15033
+ // area, not painted chrome.
15034
+ isMobile ? "gap-1 p-1 pt-0" : "p-2 pt-0 pl-0"
15033
15035
  ),
15034
15036
  children: [
15035
15037
  /* @__PURE__ */ jsxs94("div", { className: "bg-background flex min-h-0 w-full flex-1 rounded-lg border p-0", children: [
@@ -16579,7 +16581,7 @@ registerTableGenerator("companies", useCompanyTableStructure);
16579
16581
 
16580
16582
  // src/components/tables/ContentListTable.tsx
16581
16583
  import { flexRender, getCoreRowModel, getExpandedRowModel, useReactTable } from "@tanstack/react-table";
16582
- import { ChevronLeft, ChevronRight } from "lucide-react";
16584
+ import { ChevronLeft, ChevronRight, Loader2 as Loader23 } from "lucide-react";
16583
16585
  import { useTranslations as useTranslations58 } from "next-intl";
16584
16586
  import React30, { memo, useMemo as useMemo30, useState as useState60 } from "react";
16585
16587
 
@@ -16695,6 +16697,10 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
16695
16697
  const [expanded, setExpanded] = useState60(
16696
16698
  props.defaultExpanded === true ? true : typeof props.defaultExpanded === "object" ? props.defaultExpanded : {}
16697
16699
  );
16700
+ const [pendingDirection, setPendingDirection] = useState60(null);
16701
+ React30.useEffect(() => {
16702
+ if (data.isLoaded) setPendingDirection(null);
16703
+ }, [data.isLoaded]);
16698
16704
  const { data: tableData, columns: tableColumns } = useTableGenerator(props.tableGeneratorType, {
16699
16705
  data: data?.data ?? EMPTY_ARRAY,
16700
16706
  fields,
@@ -16834,10 +16840,11 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
16834
16840
  size: "sm",
16835
16841
  onClick: (e) => {
16836
16842
  e.preventDefault();
16843
+ setPendingDirection("prev");
16837
16844
  data.previous?.(true);
16838
16845
  },
16839
- disabled: !data.previous,
16840
- children: /* @__PURE__ */ jsx180(ChevronLeft, { className: "h-4 w-4" })
16846
+ disabled: !data.previous || pendingDirection !== null,
16847
+ children: pendingDirection === "prev" ? /* @__PURE__ */ jsx180(Loader23, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx180(ChevronLeft, { className: "h-4 w-4" })
16841
16848
  }
16842
16849
  ),
16843
16850
  data.pageInfo && /* @__PURE__ */ jsx180("span", { className: "text-muted-foreground text-xs", children: `${data.pageInfo.startItem}-${data.pageInfo.endItem}${data.total ? ` of ${data.total}` : ""}` }),
@@ -16848,10 +16855,11 @@ var ContentListTable = memo(/* @__PURE__ */ __name(function ContentListTable2(pr
16848
16855
  size: "sm",
16849
16856
  onClick: (e) => {
16850
16857
  e.preventDefault();
16858
+ setPendingDirection("next");
16851
16859
  data.next?.(true);
16852
16860
  },
16853
- disabled: !data.next,
16854
- children: /* @__PURE__ */ jsx180(ChevronRight, { className: "h-4 w-4" })
16861
+ disabled: !data.next || pendingDirection !== null,
16862
+ children: pendingDirection === "next" ? /* @__PURE__ */ jsx180(Loader23, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx180(ChevronRight, { className: "h-4 w-4" })
16855
16863
  }
16856
16864
  )
16857
16865
  ] }) }) }) })
@@ -17113,7 +17121,7 @@ import { createContext as createContext23, useContext as useContext24, useMemo a
17113
17121
 
17114
17122
  // src/features/auth/components/forms/Register.tsx
17115
17123
  import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
17116
- import { Loader2 as Loader23 } from "lucide-react";
17124
+ import { Loader2 as Loader24 } from "lucide-react";
17117
17125
  import { useTranslations as useTranslations61 } from "next-intl";
17118
17126
  import Image7 from "next/image";
17119
17127
  import { useSearchParams as useSearchParams2 } from "next/navigation";
@@ -17280,7 +17288,7 @@ function Register() {
17280
17288
  t("waitlist.invite.validating_title")
17281
17289
  ] }) }),
17282
17290
  /* @__PURE__ */ jsxs109(CardContent, { className: "flex flex-col items-center justify-center space-y-4 py-8", children: [
17283
- /* @__PURE__ */ jsx189(Loader23, { className: "h-8 w-8 animate-spin text-primary" }),
17291
+ /* @__PURE__ */ jsx189(Loader24, { className: "h-8 w-8 animate-spin text-primary" }),
17284
17292
  /* @__PURE__ */ jsx189("p", { className: "text-muted-foreground", children: t("waitlist.invite.validating_description") })
17285
17293
  ] })
17286
17294
  ] });
@@ -20443,13 +20451,13 @@ __name(MessageList, "MessageList");
20443
20451
 
20444
20452
  // src/features/assistant/components/parts/AssistantStatusLine.tsx
20445
20453
  import { useTranslations as useTranslations96 } from "next-intl";
20446
- import { Loader2 as Loader24 } from "lucide-react";
20454
+ import { Loader2 as Loader25 } from "lucide-react";
20447
20455
  import { jsx as jsx237, jsxs as jsxs142 } from "react/jsx-runtime";
20448
20456
  function AssistantStatusLine({ status }) {
20449
20457
  const t = useTranslations96();
20450
20458
  const text = status ?? t("features.assistant.thinking");
20451
20459
  return /* @__PURE__ */ jsxs142("div", { className: "text-muted-foreground flex items-center gap-2 px-4 py-2 text-sm", children: [
20452
- /* @__PURE__ */ jsx237(Loader24, { className: "h-4 w-4 animate-spin" }),
20460
+ /* @__PURE__ */ jsx237(Loader25, { className: "h-4 w-4 animate-spin" }),
20453
20461
  /* @__PURE__ */ jsx237("span", { children: text })
20454
20462
  ] });
20455
20463
  }
@@ -20876,7 +20884,7 @@ function ReferralCodeCapture() {
20876
20884
  __name(ReferralCodeCapture, "ReferralCodeCapture");
20877
20885
 
20878
20886
  // src/features/referral/components/ReferralWidget.tsx
20879
- import { Copy as Copy2, Loader2 as Loader25, Mail, Users } from "lucide-react";
20887
+ import { Copy as Copy2, Loader2 as Loader26, Mail, Users } from "lucide-react";
20880
20888
  import { useCallback as useCallback41, useRef as useRef38, useState as useState91 } from "react";
20881
20889
 
20882
20890
  // src/features/referral/hooks/useReferralInvite.ts
@@ -21029,9 +21037,9 @@ function ReferralWidget({
21029
21037
  );
21030
21038
  if (loading) {
21031
21039
  if (isDialog) {
21032
- return /* @__PURE__ */ jsx245("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx245(Loader25, { className: "text-muted-foreground h-6 w-6 animate-spin" }) });
21040
+ return /* @__PURE__ */ jsx245("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx245(Loader26, { className: "text-muted-foreground h-6 w-6 animate-spin" }) });
21033
21041
  }
21034
- return /* @__PURE__ */ jsx245(Card, { className: `p-6 ${className ?? ""}`, children: /* @__PURE__ */ jsx245("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx245(Loader25, { className: "text-muted-foreground h-6 w-6 animate-spin" }) }) });
21042
+ return /* @__PURE__ */ jsx245(Card, { className: `p-6 ${className ?? ""}`, children: /* @__PURE__ */ jsx245("div", { className: "flex items-center justify-center py-4", children: /* @__PURE__ */ jsx245(Loader26, { className: "text-muted-foreground h-6 w-6 animate-spin" }) }) });
21035
21043
  }
21036
21044
  if (error) {
21037
21045
  const errorMessage = error instanceof Error ? error.message : "Failed to load referral data";
@@ -21090,7 +21098,7 @@ function ReferralWidget({
21090
21098
  onClick: handleSendInvite,
21091
21099
  disabled: sending || !email,
21092
21100
  "aria-label": sending ? t.sendingButton : t.sendButton,
21093
- children: sending ? /* @__PURE__ */ jsx245(Loader25, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx245(Mail, { className: "h-4 w-4" })
21101
+ children: sending ? /* @__PURE__ */ jsx245(Loader26, { className: "h-4 w-4 animate-spin" }) : /* @__PURE__ */ jsx245(Mail, { className: "h-4 w-4" })
21094
21102
  }
21095
21103
  )
21096
21104
  ] })
@@ -22142,7 +22150,7 @@ function OAuthConsentActions({ onApprove, onDeny, isLoading = false }) {
22142
22150
  __name(OAuthConsentActions, "OAuthConsentActions");
22143
22151
 
22144
22152
  // src/features/oauth/components/consent/OAuthConsentScreen.tsx
22145
- import { ExternalLink as ExternalLink2, AlertTriangle as AlertTriangle2, Loader2 as Loader26 } from "lucide-react";
22153
+ import { ExternalLink as ExternalLink2, AlertTriangle as AlertTriangle2, Loader2 as Loader27 } from "lucide-react";
22146
22154
  import { jsx as jsx264, jsxs as jsxs165 } from "react/jsx-runtime";
22147
22155
  function OAuthConsentScreen({
22148
22156
  params,
@@ -22154,7 +22162,7 @@ function OAuthConsentScreen({
22154
22162
  const { clientInfo, isLoading, error, approve, deny, isSubmitting } = useOAuthConsent(params);
22155
22163
  if (isLoading) {
22156
22164
  return /* @__PURE__ */ jsx264("div", { className: "min-h-dvh flex items-center justify-center p-4", children: /* @__PURE__ */ jsx264(Card, { className: "w-full max-w-md", children: /* @__PURE__ */ jsxs165(CardContent, { className: "flex flex-col items-center justify-center py-12", children: [
22157
- /* @__PURE__ */ jsx264(Loader26, { className: "h-8 w-8 animate-spin text-muted-foreground" }),
22165
+ /* @__PURE__ */ jsx264(Loader27, { className: "h-8 w-8 animate-spin text-muted-foreground" }),
22158
22166
  /* @__PURE__ */ jsx264("p", { className: "mt-4 text-muted-foreground", children: "Loading authorization request..." })
22159
22167
  ] }) }) });
22160
22168
  }
@@ -22477,7 +22485,7 @@ function WaitlistSuccessState() {
22477
22485
  __name(WaitlistSuccessState, "WaitlistSuccessState");
22478
22486
 
22479
22487
  // src/features/waitlist/components/sections/WaitlistConfirmation.tsx
22480
- import { CheckCircle as CheckCircle4, Loader2 as Loader27, XCircle as XCircle2 } from "lucide-react";
22488
+ import { CheckCircle as CheckCircle4, Loader2 as Loader28, XCircle as XCircle2 } from "lucide-react";
22481
22489
  import { useTranslations as useTranslations108 } from "next-intl";
22482
22490
  import { useEffect as useEffect71, useState as useState98 } from "react";
22483
22491
  import { jsx as jsx269, jsxs as jsxs170 } from "react/jsx-runtime";
@@ -22500,7 +22508,7 @@ function WaitlistConfirmation({ code }) {
22500
22508
  }, [code, t]);
22501
22509
  if (state === "loading") {
22502
22510
  return /* @__PURE__ */ jsxs170("div", { className: "flex flex-col items-center justify-center space-y-4 py-16 text-center", children: [
22503
- /* @__PURE__ */ jsx269(Loader27, { className: "text-primary h-12 w-12 animate-spin" }),
22511
+ /* @__PURE__ */ jsx269(Loader28, { className: "text-primary h-12 w-12 animate-spin" }),
22504
22512
  /* @__PURE__ */ jsx269("p", { className: "text-muted-foreground", children: t("waitlist.confirmation.loading") })
22505
22513
  ] });
22506
22514
  }
@@ -23883,4 +23891,4 @@ export {
23883
23891
  useOAuthClients,
23884
23892
  useOAuthClient
23885
23893
  };
23886
- //# sourceMappingURL=chunk-I23BJ7LO.mjs.map
23894
+ //# sourceMappingURL=chunk-JLC2YP35.mjs.map