@flamingo-stack/openframe-frontend-core 0.0.680 → 0.0.681

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.
Files changed (33) hide show
  1. package/dist/{chunk-FCGZIXI5.cjs → chunk-AHXAD26W.cjs} +17 -17
  2. package/dist/{chunk-FCGZIXI5.cjs.map → chunk-AHXAD26W.cjs.map} +1 -1
  3. package/dist/{chunk-UL2TY6GY.cjs → chunk-BOM6MMWB.cjs} +3 -3
  4. package/dist/{chunk-UL2TY6GY.cjs.map → chunk-BOM6MMWB.cjs.map} +1 -1
  5. package/dist/{chunk-F5N2P2GD.js → chunk-KLLH632Q.js} +3 -3
  6. package/dist/{chunk-XRQKJ22I.cjs → chunk-NMXL34Z2.cjs} +4 -4
  7. package/dist/{chunk-XRQKJ22I.cjs.map → chunk-NMXL34Z2.cjs.map} +1 -1
  8. package/dist/{chunk-FN7DMNA4.js → chunk-Q76YVNCQ.js} +4 -4
  9. package/dist/chunk-Q76YVNCQ.js.map +1 -0
  10. package/dist/{chunk-M7ILWHDA.js → chunk-RF2EYX3B.js} +2 -2
  11. package/dist/{chunk-VWYK6TSE.cjs → chunk-RNRAPL6V.cjs} +4 -4
  12. package/dist/{chunk-VWYK6TSE.cjs.map → chunk-RNRAPL6V.cjs.map} +1 -1
  13. package/dist/{chunk-SPI7DCD3.js → chunk-S3OS6FIM.js} +2 -2
  14. package/dist/{chunk-RLUXVMSD.cjs → chunk-UOZXREDM.cjs} +9 -9
  15. package/dist/{chunk-RLUXVMSD.cjs.map → chunk-UOZXREDM.cjs.map} +1 -1
  16. package/dist/{chunk-75S3RKYX.js → chunk-VKTQQ7TS.js} +4 -4
  17. package/dist/components/empty-state.d.ts.map +1 -1
  18. package/dist/components/help-center-pages/index.cjs +14 -14
  19. package/dist/components/help-center-pages/index.js +5 -5
  20. package/dist/components/index.cjs +5 -5
  21. package/dist/components/index.js +4 -4
  22. package/dist/components/meeting-scheduler/index.cjs +5 -5
  23. package/dist/components/meeting-scheduler/index.js +2 -2
  24. package/dist/components/tickets/index.cjs +4 -4
  25. package/dist/components/tickets/index.js +3 -3
  26. package/package.json +1 -1
  27. package/src/components/__tests__/empty-state-cta.test.tsx +31 -0
  28. package/src/components/empty-state.tsx +5 -6
  29. package/dist/chunk-FN7DMNA4.js.map +0 -1
  30. /package/dist/{chunk-F5N2P2GD.js.map → chunk-KLLH632Q.js.map} +0 -0
  31. /package/dist/{chunk-M7ILWHDA.js.map → chunk-RF2EYX3B.js.map} +0 -0
  32. /package/dist/{chunk-SPI7DCD3.js.map → chunk-S3OS6FIM.js.map} +0 -0
  33. /package/dist/{chunk-75S3RKYX.js.map → chunk-VKTQQ7TS.js.map} +0 -0
@@ -2,10 +2,10 @@
2
2
  "use client";
3
3
 
4
4
 
5
- var _chunkUL2TY6GYcjs = require('../../chunk-UL2TY6GY.cjs');
5
+ var _chunkBOM6MMWBcjs = require('../../chunk-BOM6MMWB.cjs');
6
6
 
7
7
 
8
- var _chunkXRQKJ22Icjs = require('../../chunk-XRQKJ22I.cjs');
8
+ var _chunkNMXL34Z2cjs = require('../../chunk-NMXL34Z2.cjs');
9
9
 
10
10
 
11
11
 
@@ -1422,7 +1422,7 @@ function MeetingSchedulerDirectory({
1422
1422
  }
1423
1423
  if (error) {
1424
1424
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkX7CEWD6Vcjs.cn.call(void 0, "flex flex-col justify-center", className), style: { minHeight: rowsMinHeight + 104 }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1425
- _chunkXRQKJ22Icjs.EmptyState,
1425
+ _chunkNMXL34Z2cjs.EmptyState,
1426
1426
  {
1427
1427
  type: "generic",
1428
1428
  title: "We couldn't load available call times",
@@ -1433,7 +1433,7 @@ function MeetingSchedulerDirectory({
1433
1433
  }
1434
1434
  if (rows.length === 0) {
1435
1435
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkX7CEWD6Vcjs.cn.call(void 0, "flex flex-col justify-center", className), style: { minHeight: rowsMinHeight + 104 }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1436
- _chunkXRQKJ22Icjs.EmptyState,
1436
+ _chunkNMXL34Z2cjs.EmptyState,
1437
1437
  {
1438
1438
  type: "generic",
1439
1439
  title: "No call times are published right now",
@@ -1445,7 +1445,7 @@ function MeetingSchedulerDirectory({
1445
1445
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: _chunkX7CEWD6Vcjs.cn.call(void 0, "flex flex-col", className), children: [
1446
1446
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex w-full flex-col gap-4", style: { minHeight: rowsMinHeight }, children: pageRows.map(({ link, audienceLabel }) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, DirectoryRow, { link, audienceLabel, bookingBasePath }, link.id)) }),
1447
1447
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: _chunkX7CEWD6Vcjs.cn.call(void 0, "mt-8 flex w-full items-center justify-center", PAGINATION_SLOT_H), children: totalPages > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1448
- _chunkUL2TY6GYcjs.PersistentPaginationWrapper,
1448
+ _chunkBOM6MMWBcjs.PersistentPaginationWrapper,
1449
1449
  {
1450
1450
  isLoading,
1451
1451
  currentPage: page,
@@ -2,10 +2,10 @@
2
2
  "use client";
3
3
  import {
4
4
  PersistentPaginationWrapper
5
- } from "../../chunk-M7ILWHDA.js";
5
+ } from "../../chunk-RF2EYX3B.js";
6
6
  import {
7
7
  EmptyState
8
- } from "../../chunk-FN7DMNA4.js";
8
+ } from "../../chunk-Q76YVNCQ.js";
9
9
  import {
10
10
  Alert,
11
11
  AlertDescription,
@@ -14,10 +14,10 @@
14
14
 
15
15
 
16
16
 
17
- var _chunkFCGZIXI5cjs = require('../../chunk-FCGZIXI5.cjs');
17
+ var _chunkAHXAD26Wcjs = require('../../chunk-AHXAD26W.cjs');
18
18
  require('../../chunk-SJC2XUTE.cjs');
19
- require('../../chunk-VWYK6TSE.cjs');
20
- require('../../chunk-XRQKJ22I.cjs');
19
+ require('../../chunk-RNRAPL6V.cjs');
20
+ require('../../chunk-NMXL34Z2.cjs');
21
21
 
22
22
 
23
23
 
@@ -76,5 +76,5 @@ require('../../chunk-K4RM5MEW.cjs');
76
76
 
77
77
 
78
78
 
79
- exports.HelpCenterCard = _chunkFCGZIXI5cjs.HelpCenterCard; exports.HelpCenterCreateForm = _chunkFCGZIXI5cjs.HelpCenterCreateForm; exports.HelpCenterCreateFormSkeleton = _chunkFCGZIXI5cjs.HelpCenterCreateFormSkeleton; exports.HelpCenterList = _chunkFCGZIXI5cjs.HelpCenterList; exports.TICKET_OPEN_PARAM = _chunkKSDOCJ7Bcjs.TICKET_OPEN_PARAM; exports.TICKET_TOAST_COPY = _chunkF7EZBJTLcjs.TOAST_COPY; exports.TicketCenter = _chunkFCGZIXI5cjs.TicketCenter; exports.TicketDetailDrawer = _chunkFCGZIXI5cjs.TicketDetailDrawer; exports.TicketLinkedDeliveryCard = _chunkFCGZIXI5cjs.TicketLinkedDeliveryCard; exports.TicketLiveProvider = _chunkF7EZBJTLcjs.TicketLiveProvider; exports.TicketOpenForm = _chunkFCGZIXI5cjs.TicketOpenForm; exports.TicketReplyComposer = _chunkFCGZIXI5cjs.TicketReplyComposer; exports.TicketRow = _chunkFCGZIXI5cjs.TicketRow; exports.buildTicketOpenHref = _chunkKSDOCJ7Bcjs.buildTicketOpenHref; exports.isOptimistic = _chunkF7EZBJTLcjs.isOptimistic; exports.mapTicketActionError = _chunkFCGZIXI5cjs.mapTicketActionError; exports.useOptionalTicketLive = _chunkF7EZBJTLcjs.useOptionalTicketLive; exports.useTicketActions = _chunkFCGZIXI5cjs.useTicketActions; exports.useTicketEngagements = _chunkFCGZIXI5cjs.useTicketEngagements; exports.useTicketLive = _chunkF7EZBJTLcjs.useTicketLive; exports.useTicketsList = _chunkFCGZIXI5cjs.useTicketsList;
79
+ exports.HelpCenterCard = _chunkAHXAD26Wcjs.HelpCenterCard; exports.HelpCenterCreateForm = _chunkAHXAD26Wcjs.HelpCenterCreateForm; exports.HelpCenterCreateFormSkeleton = _chunkAHXAD26Wcjs.HelpCenterCreateFormSkeleton; exports.HelpCenterList = _chunkAHXAD26Wcjs.HelpCenterList; exports.TICKET_OPEN_PARAM = _chunkKSDOCJ7Bcjs.TICKET_OPEN_PARAM; exports.TICKET_TOAST_COPY = _chunkF7EZBJTLcjs.TOAST_COPY; exports.TicketCenter = _chunkAHXAD26Wcjs.TicketCenter; exports.TicketDetailDrawer = _chunkAHXAD26Wcjs.TicketDetailDrawer; exports.TicketLinkedDeliveryCard = _chunkAHXAD26Wcjs.TicketLinkedDeliveryCard; exports.TicketLiveProvider = _chunkF7EZBJTLcjs.TicketLiveProvider; exports.TicketOpenForm = _chunkAHXAD26Wcjs.TicketOpenForm; exports.TicketReplyComposer = _chunkAHXAD26Wcjs.TicketReplyComposer; exports.TicketRow = _chunkAHXAD26Wcjs.TicketRow; exports.buildTicketOpenHref = _chunkKSDOCJ7Bcjs.buildTicketOpenHref; exports.isOptimistic = _chunkF7EZBJTLcjs.isOptimistic; exports.mapTicketActionError = _chunkAHXAD26Wcjs.mapTicketActionError; exports.useOptionalTicketLive = _chunkF7EZBJTLcjs.useOptionalTicketLive; exports.useTicketActions = _chunkAHXAD26Wcjs.useTicketActions; exports.useTicketEngagements = _chunkAHXAD26Wcjs.useTicketEngagements; exports.useTicketLive = _chunkF7EZBJTLcjs.useTicketLive; exports.useTicketsList = _chunkAHXAD26Wcjs.useTicketsList;
80
80
  //# sourceMappingURL=index.cjs.map
@@ -14,10 +14,10 @@ import {
14
14
  useTicketActions,
15
15
  useTicketEngagements,
16
16
  useTicketsList
17
- } from "../../chunk-F5N2P2GD.js";
17
+ } from "../../chunk-KLLH632Q.js";
18
18
  import "../../chunk-ULOUTQBX.js";
19
- import "../../chunk-SPI7DCD3.js";
20
- import "../../chunk-FN7DMNA4.js";
19
+ import "../../chunk-S3OS6FIM.js";
20
+ import "../../chunk-Q76YVNCQ.js";
21
21
  import {
22
22
  TOAST_COPY,
23
23
  TicketLiveProvider,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flamingo-stack/openframe-frontend-core",
3
- "version": "0.0.680",
3
+ "version": "0.0.681",
4
4
  "description": "Shared design system and components for all Flamingo platforms",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -0,0 +1,31 @@
1
+ /**
2
+ * `EmptyState`'s call to action is the house `Button` in its own variant, never a
3
+ * default accent Button repainted with classes: the repaint lost to the accent hover
4
+ * (green text on a green button). Each case is compared with the Button it must be.
5
+ */
6
+
7
+ import { render, screen } from '@testing-library/react';
8
+ import { describe, expect, it } from 'vitest';
9
+ import { EmptyState } from '../empty-state';
10
+ import { Button } from '../ui/button';
11
+
12
+ function classOf(name: string): string {
13
+ return (screen.getByText(name).closest('a, button') as HTMLElement).className;
14
+ }
15
+
16
+ describe('EmptyState call to action', () => {
17
+ it.each([
18
+ ['secondary', 'outline'],
19
+ ['primary', 'accent'],
20
+ ] as const)('a %s CTA renders exactly the %s Button', (ctaVariant, buttonVariant) => {
21
+ render(
22
+ <>
23
+ <EmptyState type="generic" ctaText="Record it" ctaHref="/record" ctaVariant={ctaVariant} />
24
+ <Button href="/reference" variant={buttonVariant} className="w-full">
25
+ Reference
26
+ </Button>
27
+ </>,
28
+ );
29
+ expect(classOf('Record it')).toBe(classOf('Reference'));
30
+ });
31
+ });
@@ -159,10 +159,9 @@ export function EmptyState({
159
159
  // page with a link CTA must never enter that branch. Existing callers
160
160
  // without ctaHref keep today's smart-default behavior unchanged.
161
161
  const smartCTA = ctaHref ? null : getSmartCTA();
162
- const ctaClassName =
163
- ctaVariant === 'primary'
164
- ? 'w-full bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover transition-all duration-150 font-body font-medium'
165
- : 'w-full bg-transparent border border-ods-border text-ods-text-primary hover:border-ods-accent hover:text-ods-accent transition-all duration-150 font-body font-medium';
162
+ // The CTA is the house Button in its own variant: painting colours over the
163
+ // default accent Button with classes lost to its hover (green text on green).
164
+ const ctaButtonVariant = ctaVariant === 'primary' ? 'accent' : 'outline';
166
165
 
167
166
  return (
168
167
  <div className="flex flex-col items-center justify-center px-6 py-6 text-center md:py-16">
@@ -184,7 +183,7 @@ export function EmptyState({
184
183
  {/* Link CTA (ctaHref) — SSR-safe, no path sniffing */}
185
184
  {showCTA && ctaHref && (
186
185
  <div className="mb-3 w-full max-w-xs">
187
- <Button href={ctaHref} className={ctaClassName}>
186
+ <Button href={ctaHref} variant={ctaButtonVariant} className="w-full">
188
187
  {ctaText || 'Contact us'}
189
188
  </Button>
190
189
  </div>
@@ -193,7 +192,7 @@ export function EmptyState({
193
192
  {/* Smart CTA Button */}
194
193
  {showCTA && !ctaHref && smartCTA && (
195
194
  <div className="mb-3 w-full max-w-xs">
196
- <Button onClick={smartCTA.action} className={ctaClassName}>
195
+ <Button onClick={smartCTA.action} variant={ctaButtonVariant} className="w-full">
197
196
  {smartCTA.text}
198
197
  </Button>
199
198
  </div>
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/components/empty-state.tsx","../src/components/unified-pagination.tsx"],"sourcesContent":["'use client';\n\nimport { Search, FileText, Package } from 'lucide-react';\nimport { useRouter } from '../embed-shims/next-navigation';\nimport { Button } from './ui/button';\n\nexport interface EmptyStateProps {\n type: 'vendors' | 'posts' | 'search' | 'generic';\n title?: string;\n description?: string;\n showBackButton?: boolean;\n onGoBack?: () => void;\n backButtonText?: string;\n // New CTA properties\n showCTA?: boolean;\n ctaText?: string;\n onCtaClick?: () => void;\n /**\n * Link-CTA mode: render the CTA as a navigation link (`href` — plain or\n * `mailto:`). Wins over `onCtaClick`, and SHORT-CIRCUITS the smart-CTA\n * path-sniffing below (which reads `window.location.pathname` — an\n * SSR/client divergence server-rendered pages must never enter).\n */\n ctaHref?: string;\n ctaVariant?: 'primary' | 'secondary';\n}\n\nexport function EmptyState({\n type,\n title,\n description,\n showBackButton = false,\n onGoBack,\n backButtonText = 'Go Back',\n showCTA = true,\n ctaText,\n onCtaClick,\n ctaHref,\n ctaVariant = 'primary',\n}: EmptyStateProps) {\n const router = useRouter();\n\n // Default content based on type\n const getDefaultContent = () => {\n switch (type) {\n case 'vendors':\n return {\n icon: <Package className=\"h-full w-full\" />,\n title: 'No vendors found',\n description:\n \"We couldn't find any vendors matching your criteria. Try adjusting your filters or search terms.\",\n };\n case 'posts':\n return {\n icon: <FileText className=\"h-full w-full\" />,\n title: 'No articles found',\n description:\n \"We couldn't find any articles matching your criteria. Try different categories, tags, or search terms.\",\n };\n case 'search':\n return {\n icon: <Search className=\"h-full w-full\" />,\n title: 'No results found',\n description: \"Your search didn't return any results. Try different keywords or browse our categories.\",\n };\n default:\n return {\n icon: <Search className=\"h-full w-full\" />,\n title: 'Nothing found',\n description: \"We couldn't find what you're looking for. Try adjusting your search or filters.\",\n };\n }\n };\n\n // Smart CTA logic based on context\n const getSmartCTA = () => {\n // If custom CTA is provided, use it\n if (ctaText && onCtaClick) {\n return {\n text: ctaText,\n action: onCtaClick,\n };\n }\n\n // Check if we're on the client side\n const isClient = typeof window !== 'undefined';\n const currentPath = isClient ? window.location.pathname : '';\n\n // Surgical filter reset (promoted from the hub's diverged clone during\n // the EmptyState convergence): delete ONLY the filter params the surface\n // owns — nuking the whole query string threw away unrelated state — and\n // use `replace` with `scroll: false` so resetting filters neither adds a\n // history entry nor jumps the page.\n const resetParams = (paramsToDelete: string[]) => {\n if (!isClient) return;\n const params = new URLSearchParams(window.location.search);\n for (const p of paramsToDelete) params.delete(p);\n const queryString = params.toString();\n // Keep the hash — a filter reset must not clear an unrelated\n // deep-link anchor (e.g. #delivery-123).\n const hash = window.location.hash;\n router.replace(`${window.location.pathname}${queryString ? `?${queryString}` : ''}${hash}`, { scroll: false });\n };\n\n // Smart defaults based on type and context\n switch (type) {\n case 'search':\n return {\n text: 'Reset Filters',\n action: () => resetParams(['search', 'page']),\n };\n case 'posts':\n // Blog-style listing pages (blog, case studies) reset their filters\n if (currentPath.includes('/blog') || currentPath.includes('/case-studies')) {\n return {\n text: 'Reset Filters',\n action: () => resetParams(['search', 'page', 'category', 'tags']),\n };\n } else if (currentPath.includes('/profile')) {\n return {\n text: 'Browse Vendors',\n action: () => router.push('/vendors'),\n };\n }\n return {\n text: 'View All Posts',\n action: () => router.push('/blog'),\n };\n case 'vendors':\n // If we're in profile or other pages, direct to main content\n if (currentPath.includes('/profile')) {\n return {\n text: 'Browse Vendors',\n action: () => router.push('/vendors'),\n };\n } else if (currentPath.includes('/vendors') || currentPath.includes('/margin-increase/compare')) {\n return {\n text: 'Reset Filters',\n action: () => resetParams(['search', 'page', 'category', 'subcategory']),\n };\n }\n return {\n text: 'Browse Vendors',\n action: () => router.push('/vendors'),\n };\n default:\n return {\n text: 'Browse Vendors',\n action: () => router.push('/vendors'),\n };\n }\n };\n\n const defaultContent = getDefaultContent();\n const displayTitle = title || defaultContent.title;\n const displayDescription = description || defaultContent.description;\n // ctaHref short-circuits BEFORE getSmartCTA(): the smart defaults read\n // window.location.pathname (SSR-empty, client-real), so a server-rendered\n // page with a link CTA must never enter that branch. Existing callers\n // without ctaHref keep today's smart-default behavior unchanged.\n const smartCTA = ctaHref ? null : getSmartCTA();\n const ctaClassName =\n ctaVariant === 'primary'\n ? 'w-full bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover transition-all duration-150 font-body font-medium'\n : 'w-full bg-transparent border border-ods-border text-ods-text-primary hover:border-ods-accent hover:text-ods-accent transition-all duration-150 font-body font-medium';\n\n return (\n <div className=\"flex flex-col items-center justify-center px-6 py-6 text-center md:py-16\">\n {/* Icon */}\n <div className=\"mb-3 flex items-center justify-center md:mb-6\">\n <div className=\"rounded-full border border-ods-border bg-ods-card p-3 md:p-6\">\n <div className=\"flex h-8 w-8 items-center justify-center text-ods-text-secondary md:h-16 md:w-16\">\n {defaultContent.icon}\n </div>\n </div>\n </div>\n\n {/* Title */}\n <h2 className=\"mb-2 text-ods-text-primary text-h3 md:mb-3\">{displayTitle}</h2>\n\n {/* Description */}\n <p className=\"mb-4 max-w-md text-ods-text-secondary text-h6 md:mb-8\">{displayDescription}</p>\n\n {/* Link CTA (ctaHref) — SSR-safe, no path sniffing */}\n {showCTA && ctaHref && (\n <div className=\"mb-3 w-full max-w-xs\">\n <Button href={ctaHref} className={ctaClassName}>\n {ctaText || 'Contact us'}\n </Button>\n </div>\n )}\n\n {/* Smart CTA Button */}\n {showCTA && !ctaHref && smartCTA && (\n <div className=\"mb-3 w-full max-w-xs\">\n <Button onClick={smartCTA.action} className={ctaClassName}>\n {smartCTA.text}\n </Button>\n </div>\n )}\n\n {/* Optional Back Button */}\n {showBackButton && onGoBack && (\n <div className=\"w-full max-w-xs\">\n <Button\n onClick={onGoBack}\n variant=\"outline\"\n className=\"w-full font-body font-medium transition-all duration-150\"\n >\n {backButtonText}\n </Button>\n </div>\n )}\n </div>\n );\n}\n","'use client';\n\nimport { useSearchParams, usePathname } from '../embed-shims/next-navigation';\nimport { withQuery } from '../utils/search-params';\nimport { Pagination } from './pagination';\n\ninterface UnifiedPaginationProps {\n currentPage: number;\n totalPages: number;\n onPageChange?: (page: number) => void;\n className?: string;\n /**\n * Write `?page=` into the URL on every change (default true, the historical\n * behaviour). Set false when the CALLER owns the URL — a surface whose whole\n * filter state is one schema would otherwise get two writers racing on it.\n */\n syncUrl?: boolean;\n /**\n * Keep the row's height when there is only one page, instead of rendering\n * nothing. Stops a one-page result from shifting the content above it.\n */\n reserveSpace?: boolean;\n}\n\nexport function UnifiedPagination({\n currentPage,\n totalPages,\n onPageChange,\n className = 'mt-8 flex justify-center w-full',\n syncUrl = true,\n reserveSpace = false,\n}: UnifiedPaginationProps) {\n const searchParams = useSearchParams();\n const pathname = usePathname();\n\n const handlePageChange = (page: number) => {\n // Preserve current scroll position\n const currentScrollY = window.scrollY;\n\n // Call the callback to update local state (prevents reload)\n if (onPageChange) {\n onPageChange(page);\n }\n\n // Update URL for bookmarking without navigation — unless the caller owns\n // the URL (`syncUrl={false}`), in which case a second writer here would\n // race the caller's own param write.\n if (syncUrl) {\n const params = new URLSearchParams(searchParams.toString());\n params.set('page', page.toString());\n window.history.replaceState(null, '', withQuery(pathname, params.toString()));\n }\n\n // Restore scroll position after a brief delay to allow content to render\n setTimeout(() => {\n window.scrollTo({\n top: currentScrollY,\n behavior: 'instant', // Instant to prevent any scroll animation\n });\n }, 0);\n };\n\n // Don't render pagination if there's only one page (optionally holding the\n // row's height so the content above it does not shift).\n //\n // The reserved row renders the REAL control, hidden — an empty div reserves\n // nothing, and a hardcoded spacer height silently drifts the day the control\n // changes. `invisible` keeps the box, `aria-hidden` + `pointer-events-none`\n // keep it out of the accessibility tree and out of the way.\n if (totalPages <= 1) {\n return reserveSpace ? (\n <div className={className} aria-hidden=\"true\">\n <div className=\"pointer-events-none invisible\">\n <Pagination currentPage={1} totalPages={1} onPageChange={() => {}} />\n </div>\n </div>\n ) : null;\n }\n\n return (\n <div className={className}>\n <Pagination currentPage={currentPage} totalPages={totalPages} onPageChange={handlePageChange} />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AAEA,SAAS,QAAQ,UAAU,eAAe;AA6C1B,cAwHZ,YAxHY;AApBT,SAAS,WAAW;AAAA,EACzB;AAAA,EACA;AAAA,EACA;AAAA,EACA,iBAAiB;AAAA,EACjB;AAAA,EACA,iBAAiB;AAAA,EACjB,UAAU;AAAA,EACV;AAAA,EACA;AAAA,EACA;AAAA,EACA,aAAa;AACf,GAAoB;AAClB,QAAM,SAAS,UAAU;AAGzB,QAAM,oBAAoB,MAAM;AAC9B,YAAQ,MAAM;AAAA,MACZ,KAAK;AACH,eAAO;AAAA,UACL,MAAM,oBAAC,WAAQ,WAAU,iBAAgB;AAAA,UACzC,OAAO;AAAA,UACP,aACE;AAAA,QACJ;AAAA,MACF,KAAK;AACH,eAAO;AAAA,UACL,MAAM,oBAAC,YAAS,WAAU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