@flamingo-stack/openframe-frontend-core 0.0.623 → 0.0.624-2166.6166.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.
- package/dist/{chunk-DV7IBKJI.cjs → chunk-2MMEPNSX.cjs} +8 -8
- package/dist/{chunk-DV7IBKJI.cjs.map → chunk-2MMEPNSX.cjs.map} +1 -1
- package/dist/{chunk-SNWPBMPV.js → chunk-56CBPVCF.js} +5 -5
- package/dist/{chunk-CKLQVCDP.cjs → chunk-5JOKGJSG.cjs} +11 -11
- package/dist/{chunk-CKLQVCDP.cjs.map → chunk-5JOKGJSG.cjs.map} +1 -1
- package/dist/{chunk-XB7Z5ASO.cjs → chunk-AO6CJFQU.cjs} +18 -18
- package/dist/{chunk-XB7Z5ASO.cjs.map → chunk-AO6CJFQU.cjs.map} +1 -1
- package/dist/{chunk-NMCR5YGW.cjs → chunk-BC4GLCNE.cjs} +42 -42
- package/dist/{chunk-NMCR5YGW.cjs.map → chunk-BC4GLCNE.cjs.map} +1 -1
- package/dist/{chunk-XAUPFCIJ.js → chunk-BXKM4GFD.js} +9 -2
- package/dist/chunk-BXKM4GFD.js.map +1 -0
- package/dist/{chunk-IP4OYYDY.cjs → chunk-C4Y3TEKO.cjs} +174 -174
- package/dist/{chunk-IP4OYYDY.cjs.map → chunk-C4Y3TEKO.cjs.map} +1 -1
- package/dist/{chunk-V6QYKYY2.js → chunk-CP4YNYQA.js} +4 -4
- package/dist/{chunk-SEC6NRAV.cjs → chunk-D3IW3CSH.cjs} +5 -5
- package/dist/{chunk-SEC6NRAV.cjs.map → chunk-D3IW3CSH.cjs.map} +1 -1
- package/dist/{chunk-LWBLLL32.cjs → chunk-DPFMA6JD.cjs} +63 -63
- package/dist/{chunk-LWBLLL32.cjs.map → chunk-DPFMA6JD.cjs.map} +1 -1
- package/dist/{chunk-VQCEWQFV.cjs → chunk-DY4XQFGC.cjs} +12 -12
- package/dist/{chunk-VQCEWQFV.cjs.map → chunk-DY4XQFGC.cjs.map} +1 -1
- package/dist/{chunk-43JQ3SJS.js → chunk-EW6PYGB3.js} +2 -2
- package/dist/{chunk-MJJIQJGQ.js → chunk-F2G5BTBR.js} +9 -9
- package/dist/{chunk-CIPIND3J.js → chunk-GRZHXAX6.js} +2 -2
- package/dist/{chunk-DUI764J2.js → chunk-HAYYFOUU.js} +4 -4
- package/dist/{chunk-HC6FZJMM.cjs → chunk-ISXADEGT.cjs} +39 -39
- package/dist/{chunk-HC6FZJMM.cjs.map → chunk-ISXADEGT.cjs.map} +1 -1
- package/dist/{chunk-EVUDHIDB.cjs → chunk-IUMRVY4I.cjs} +28 -28
- package/dist/{chunk-EVUDHIDB.cjs.map → chunk-IUMRVY4I.cjs.map} +1 -1
- package/dist/{chunk-7CHG2DP2.cjs → chunk-JEMBYNOG.cjs} +6 -6
- package/dist/{chunk-7CHG2DP2.cjs.map → chunk-JEMBYNOG.cjs.map} +1 -1
- package/dist/{chunk-YU5PQOEU.js → chunk-JT4FL2DK.js} +8 -8
- package/dist/{chunk-KZ7AKNDM.js → chunk-KEHI5NAD.js} +181 -143
- package/dist/{chunk-KZ7AKNDM.js.map → chunk-KEHI5NAD.js.map} +1 -1
- package/dist/{chunk-V4OA6SVZ.js → chunk-KKD35GSD.js} +4 -4
- package/dist/{chunk-DTCNLA67.js → chunk-LDR3QNOT.js} +3 -3
- package/dist/{chunk-CS7MVDUF.cjs → chunk-MP2K44EK.cjs} +8 -8
- package/dist/{chunk-CS7MVDUF.cjs.map → chunk-MP2K44EK.cjs.map} +1 -1
- package/dist/{chunk-ORUOBIJT.cjs → chunk-N3CTSPDZ.cjs} +3 -3
- package/dist/{chunk-ORUOBIJT.cjs.map → chunk-N3CTSPDZ.cjs.map} +1 -1
- package/dist/{chunk-YXBY2MDO.cjs → chunk-NOQDSRSK.cjs} +11 -11
- package/dist/{chunk-YXBY2MDO.cjs.map → chunk-NOQDSRSK.cjs.map} +1 -1
- package/dist/{chunk-AOGRJ4FT.js → chunk-NULR47FR.js} +4 -4
- package/dist/{chunk-XFYPKN2D.cjs → chunk-OKMMP5PU.cjs} +726 -688
- package/dist/chunk-OKMMP5PU.cjs.map +1 -0
- package/dist/{chunk-EP2XHZ4Z.cjs → chunk-OYP7ZNHW.cjs} +24 -24
- package/dist/{chunk-EP2XHZ4Z.cjs.map → chunk-OYP7ZNHW.cjs.map} +1 -1
- package/dist/{chunk-6EHXQH7C.js → chunk-Q6QF35QE.js} +6 -6
- package/dist/{chunk-VW57GX5O.js → chunk-QHH2GXHS.js} +3 -3
- package/dist/{chunk-VRUJPZ2C.js → chunk-RFUYCKBZ.js} +3 -3
- package/dist/{chunk-D4Q7BB3N.cjs → chunk-TTSGX6AB.cjs} +33 -33
- package/dist/{chunk-D4Q7BB3N.cjs.map → chunk-TTSGX6AB.cjs.map} +1 -1
- package/dist/{chunk-5G3L6327.cjs → chunk-U7TTQV4N.cjs} +3 -3
- package/dist/{chunk-5G3L6327.cjs.map → chunk-U7TTQV4N.cjs.map} +1 -1
- package/dist/{chunk-YW7GPBB2.cjs → chunk-WKDNZXJK.cjs} +94 -94
- package/dist/{chunk-YW7GPBB2.cjs.map → chunk-WKDNZXJK.cjs.map} +1 -1
- package/dist/{chunk-CJBSU3XB.cjs → chunk-WRJVEB2J.cjs} +9 -2
- package/dist/chunk-WRJVEB2J.cjs.map +1 -0
- package/dist/{chunk-PQZGMNJQ.js → chunk-WSEDVYDY.js} +6 -6
- package/dist/{chunk-VBIFSOPQ.js → chunk-X3LC6R37.js} +3 -3
- package/dist/{chunk-5WGOAJ4B.js → chunk-X7LJRNMJ.js} +2 -2
- package/dist/{chunk-EG4IKWY4.cjs → chunk-YB6RCW77.cjs} +7 -7
- package/dist/{chunk-EG4IKWY4.cjs.map → chunk-YB6RCW77.cjs.map} +1 -1
- package/dist/{chunk-C7AWXFDL.js → chunk-YBEAX6QC.js} +5 -5
- package/dist/{chunk-FHR2JU2J.js → chunk-YQCA4ZEJ.js} +2 -2
- package/dist/{chunk-TMGTVVE2.js → chunk-YWFMYZ4G.js} +3 -3
- package/dist/{chunk-NIX7EG4G.js → chunk-ZYPB57IM.js} +4 -4
- package/dist/{chunk-RZPGGSSW.cjs → chunk-ZZECM2I2.cjs} +27 -27
- package/dist/{chunk-RZPGGSSW.cjs.map → chunk-ZZECM2I2.cjs.map} +1 -1
- package/dist/components/calendar.cjs +4 -4
- package/dist/components/calendar.js +1 -1
- package/dist/components/case-studies/index.cjs +12 -12
- package/dist/components/case-studies/index.js +6 -6
- package/dist/components/chat/index.cjs +4 -4
- package/dist/components/chat/index.js +3 -3
- package/dist/components/contact/index.cjs +7 -7
- package/dist/components/contact/index.js +6 -6
- package/dist/components/docs/index.cjs +10 -10
- package/dist/components/docs/index.js +9 -9
- package/dist/components/embeds/index.cjs +7 -7
- package/dist/components/embeds/index.js +6 -6
- package/dist/components/faq/index.cjs +7 -7
- package/dist/components/faq/index.js +6 -6
- package/dist/components/features/command-box.d.ts +7 -5
- package/dist/components/features/command-box.d.ts.map +1 -1
- package/dist/components/features/index.cjs +6 -6
- package/dist/components/features/index.js +5 -5
- package/dist/components/help-center-pages/index.cjs +28 -28
- package/dist/components/help-center-pages/index.js +19 -19
- package/dist/components/index.cjs +70 -70
- package/dist/components/index.js +19 -19
- package/dist/components/meeting-scheduler/index.cjs +46 -46
- package/dist/components/meeting-scheduler/index.js +7 -7
- package/dist/components/navigation/index.cjs +9 -9
- package/dist/components/navigation/index.js +8 -8
- package/dist/components/onboarding-guides/index.cjs +9 -9
- package/dist/components/onboarding-guides/index.js +8 -8
- package/dist/components/related-content/index.cjs +5 -5
- package/dist/components/related-content/index.js +4 -4
- package/dist/components/tickets/index.cjs +11 -11
- package/dist/components/tickets/index.js +10 -10
- package/dist/components/ui/button/button-styles.d.ts +1 -0
- package/dist/components/ui/button/button-styles.d.ts.map +1 -1
- package/dist/components/ui/button/button.d.ts +1 -1
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/fade-preview.d.ts +25 -7
- package/dist/components/ui/fade-preview.d.ts.map +1 -1
- package/dist/components/ui/file-manager/index.cjs +11 -11
- package/dist/components/ui/file-manager/index.js +1 -1
- package/dist/components/ui/index.cjs +6 -6
- package/dist/components/ui/index.js +5 -5
- package/dist/components/ui/page-actions.d.ts +2 -2
- package/dist/components/ui/page-actions.d.ts.map +1 -1
- package/dist/index.cjs +10 -10
- package/dist/index.js +9 -9
- package/package.json +1 -1
- package/src/components/features/.command-box.md +1 -1
- package/src/components/features/command-box.tsx +21 -13
- package/src/components/ui/.fade-preview.md +5 -1
- package/src/components/ui/button/button-styles.ts +6 -0
- package/src/components/ui/button/button.tsx +1 -0
- package/src/components/ui/fade-preview.tsx +92 -20
- package/src/components/ui/page-actions.tsx +2 -2
- package/src/stories/Button.stories.tsx +6 -1
- package/dist/chunk-CJBSU3XB.cjs.map +0 -1
- package/dist/chunk-XAUPFCIJ.js.map +0 -1
- package/dist/chunk-XFYPKN2D.cjs.map +0 -1
- /package/dist/{chunk-SNWPBMPV.js.map → chunk-56CBPVCF.js.map} +0 -0
- /package/dist/{chunk-V6QYKYY2.js.map → chunk-CP4YNYQA.js.map} +0 -0
- /package/dist/{chunk-43JQ3SJS.js.map → chunk-EW6PYGB3.js.map} +0 -0
- /package/dist/{chunk-MJJIQJGQ.js.map → chunk-F2G5BTBR.js.map} +0 -0
- /package/dist/{chunk-CIPIND3J.js.map → chunk-GRZHXAX6.js.map} +0 -0
- /package/dist/{chunk-DUI764J2.js.map → chunk-HAYYFOUU.js.map} +0 -0
- /package/dist/{chunk-YU5PQOEU.js.map → chunk-JT4FL2DK.js.map} +0 -0
- /package/dist/{chunk-V4OA6SVZ.js.map → chunk-KKD35GSD.js.map} +0 -0
- /package/dist/{chunk-DTCNLA67.js.map → chunk-LDR3QNOT.js.map} +0 -0
- /package/dist/{chunk-AOGRJ4FT.js.map → chunk-NULR47FR.js.map} +0 -0
- /package/dist/{chunk-6EHXQH7C.js.map → chunk-Q6QF35QE.js.map} +0 -0
- /package/dist/{chunk-VW57GX5O.js.map → chunk-QHH2GXHS.js.map} +0 -0
- /package/dist/{chunk-VRUJPZ2C.js.map → chunk-RFUYCKBZ.js.map} +0 -0
- /package/dist/{chunk-PQZGMNJQ.js.map → chunk-WSEDVYDY.js.map} +0 -0
- /package/dist/{chunk-VBIFSOPQ.js.map → chunk-X3LC6R37.js.map} +0 -0
- /package/dist/{chunk-5WGOAJ4B.js.map → chunk-X7LJRNMJ.js.map} +0 -0
- /package/dist/{chunk-C7AWXFDL.js.map → chunk-YBEAX6QC.js.map} +0 -0
- /package/dist/{chunk-FHR2JU2J.js.map → chunk-YQCA4ZEJ.js.map} +0 -0
- /package/dist/{chunk-TMGTVVE2.js.map → chunk-YWFMYZ4G.js.map} +0 -0
- /package/dist/{chunk-NIX7EG4G.js.map → chunk-ZYPB57IM.js.map} +0 -0
|
@@ -24,6 +24,12 @@ var buttonSurfaceClasses = {
|
|
|
24
24
|
// glyph — which is why call sites were undoing them with
|
|
25
25
|
// `hover:bg-transparent active:bg-transparent`.
|
|
26
26
|
glyph: "bg-transparent text-ods-text-primary hover:bg-transparent active:bg-transparent disabled:bg-transparent disabled:text-ods-text-disabled aria-disabled:bg-transparent aria-disabled:text-ods-text-disabled",
|
|
27
|
+
// A quiet inline text action (a "Show all" / "Show less" disclosure, a
|
|
28
|
+
// secondary "Clear" beside a field): secondary text that takes the accent on
|
|
29
|
+
// hover, and no surface in any state. Promoted to a variant because the
|
|
30
|
+
// disclosure toggle was a primitive <button> restating these classes. Pair
|
|
31
|
+
// with size="compact" and noPaddingX so the label aligns with the text above.
|
|
32
|
+
link: "bg-transparent text-ods-text-secondary hover:bg-transparent hover:text-ods-accent active:bg-transparent active:text-ods-accent-active disabled:bg-transparent disabled:text-ods-text-disabled aria-disabled:bg-transparent aria-disabled:text-ods-text-disabled",
|
|
27
33
|
// Chrome that sits ON media (video cards, image lightboxes): a scrim disc so
|
|
28
34
|
// the glyph stays legible over an arbitrary frame. Promoted to a variant
|
|
29
35
|
// because the walkthrough card, its theater and the bite cards were each
|
|
@@ -64,7 +70,8 @@ var buttonVariants = _classvarianceauthority.cva.call(void 0,
|
|
|
64
70
|
destructive: buttonSurfaceClasses.destructive,
|
|
65
71
|
warning: buttonSurfaceClasses.warning,
|
|
66
72
|
glyph: buttonSurfaceClasses.glyph,
|
|
67
|
-
overlay: buttonSurfaceClasses.overlay
|
|
73
|
+
overlay: buttonSurfaceClasses.overlay,
|
|
74
|
+
link: buttonSurfaceClasses.link
|
|
68
75
|
},
|
|
69
76
|
size: {
|
|
70
77
|
default: "h-11 px-[var(--spacing-system-m)] py-[var(--spacing-system-sf)] text-h3 md:h-12",
|
|
@@ -569,4 +576,4 @@ SplitButton.displayName = "SplitButton";
|
|
|
569
576
|
|
|
570
577
|
|
|
571
578
|
exports.buttonVariants = buttonVariants; exports.Button = Button; exports.SplitButton = SplitButton;
|
|
572
|
-
//# sourceMappingURL=chunk-
|
|
579
|
+
//# sourceMappingURL=chunk-WRJVEB2J.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-WRJVEB2J.cjs","../src/components/ui/button/button.tsx","../src/components/ui/button/button-styles.ts","../src/components/ui/button/split-button.tsx"],"names":["cva","jsx","jsxs"],"mappings":"AAAA,yRAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACNA,iDAAqB;AACrB,kEAAuC;AACvC,4EAAkB;ADQlB;AACA;AERO,IAAM,qBAAA,EAAuB;AAAA,EAClC,MAAA,EACE,oJAAA;AAAA,EACF,OAAA,EACE,qMAAA;AAAA,EACF,WAAA,EACE,8MAAA;AAAA,EACF,WAAA,EACE,iJAAA;AAAA,EACF,OAAA,EACE,uJAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAMF,KAAA,EACE,2MAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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YAAA;AACL,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACA,YAAA;AACsB,YAAA;AAChB,YAAA;AACN,YAAA;AACA,YAAA;AAEC,YAAA;AAAiE,cAAA;AAClD,8BAAA;AACoD,cAAA;AAAA,YAAA;AAAA,UAAA;AACtE,QAAA;AACAD,wBAAAA;AAAC,UAAA;AAAA,UAAA;AACC,YAAA;AACA,YAAA;AACK,YAAA;AACL,YAAA;AACiB,YAAA;AACQ,YAAA;AACJ,YAAA;AACD,YAAA;AACa,YAAA;AACC,YAAA;AAE0B,YAAA;AAAA,UAAA;AAC9D,QAAA;AAAA,MAAA;AAAA,IAAA;AACF,EAAA;AAEH;AACyB;AHgU8F;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-WRJVEB2J.cjs","sourcesContent":[null,"'use client';\n\nimport { Slot } from '@radix-ui/react-slot';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport React from 'react';\nimport Link from '../../../embed-shims/next-link';\nimport { cn } from '../../../utils/cn';\nimport {\n buttonSurfaceClasses,\n outlineBorderClasses,\n splitDividerColorClasses,\n splitGlyphSizeBySize,\n} from './button-styles';\n\n// Default layout: centered single content area, padding/gap on the button itself.\nconst buttonVariants = cva(\n [\n 'relative inline-flex items-center justify-center gap-[var(--spacing-system-xsf)]',\n 'whitespace-nowrap rounded-md',\n 'transition-colors duration-200',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-focus',\n 'disabled:pointer-events-none',\n '[&_svg]:pointer-events-none [&_svg]:h-5 [&_svg]:w-5 [&_svg]:shrink-0',\n ],\n {\n variants: {\n variant: {\n accent: buttonSurfaceClasses.accent,\n outline: cn(buttonSurfaceClasses.outline, outlineBorderClasses),\n transparent: buttonSurfaceClasses.transparent,\n destructive: buttonSurfaceClasses.destructive,\n warning: buttonSurfaceClasses.warning,\n glyph: buttonSurfaceClasses.glyph,\n overlay: buttonSurfaceClasses.overlay,\n link: buttonSurfaceClasses.link,\n },\n size: {\n default: 'h-11 px-[var(--spacing-system-m)] py-[var(--spacing-system-sf)] text-h3 md:h-12',\n small: 'h-6 p-[var(--spacing-system-xs)] text-h5 md:h-8',\n // The CHILD is the affordance (a badge, a chip, a thumbnail): the button\n // contributes the hit target, the focus ring and the keyboard/ARIA\n // semantics, and NO box of its own. Without this, call sites reached for\n // a `className=\"h-auto p-0\"` override to cancel the default box.\n wrap: 'h-auto p-0',\n 'small-legacy': 'h-10 px-[var(--spacing-system-m)] py-[var(--spacing-system-xs)] text-[14px] font-bold', // Temporary alias for \"small\" — deprecated; grep size=\"small-legacy\" (lib + hub) and migrate the remaining consumers before removal\n // 24px pill for slim strips (announcement/promo bars, inline banner\n // actions — Primer banner / Polaris banner / Vercel-bar convention).\n // The label matches the strip's MESSAGE type ramp exactly (DM Sans\n // regular, 13px -> md:14px, snug leading — the announcement bar's\n // subtitle styling): in-strip CTAs must never read louder than the\n // message beside them, so this deliberately uses neither the\n // mono-uppercase control style of \"small\" nor a heavier weight.\n // Pinned h-6 across breakpoints (24px = the WCAG 2.5.8 target-size\n // floor) with horizontal-dominant padding and a 14px glyph.\n compact: 'h-6 px-[var(--spacing-system-sf)] py-0 font-normal text-h6 [&_svg]:h-3.5 [&_svg]:w-3.5',\n icon: 'h-11 w-11 p-[var(--spacing-system-sf)] md:h-12 md:w-12 [&_svg]:h-4 [&_svg]:w-4 md:[&_svg]:h-6 md:[&_svg]:w-6',\n // Quiet 32px icon target with a 16px glyph, fixed across breakpoints\n // (Carbon ghost sm / Primer medium / shadcn icon-sm all pin 32px;\n // ≥ the 24px WCAG 2.5.8 target floor). For icon actions that read as\n // metadata rather than CTAs — author-page social rows, share rows.\n // Pair with variant=\"transparent\" for the ghost treatment.\n 'icon-sm': 'h-8 w-8 p-[var(--spacing-system-xxs)] [&_svg]:h-4 [&_svg]:w-4',\n // 20px inline glyph for affordances that sit INSIDE a line of text —\n // an info hint beside a badge, a copy glyph after an id. `icon-sm`'s\n // 32px target is correct for a metadata row but visually swamps a\n // 10px badge or a 14px label, so hosts were reaching for className\n // overrides to shrink it. Below the WCAG 2.5.8 target floor on purpose:\n // this is only for glyphs whose information is ALSO available another\n // way (tooltip content mirrored into an aria-describedby node), never\n // for a sole means of performing an action.\n 'icon-inline': 'h-5 min-h-0 w-5 min-w-0 shrink-0 p-0 [&_svg]:h-3.5 [&_svg]:w-3.5',\n // Bare 56px media glyph (play / unmute over video). A size variant so\n // hosts stop re-implementing a <button> to escape the 20px svg cap.\n 'icon-glyph': 'h-14 w-14 p-0 [&_svg]:h-14 [&_svg]:w-14',\n },\n // Label typography axis (Figma 133-740). `bold` is the classic h3-bold\n // label; `regular` swaps the DEFAULT size's label to the h4 step\n // (DM Sans 500, neutral tracking) — added for navigation buttons.\n // `small` keeps its mono-uppercase h5 label on both fonts per the spec.\n font: {\n bold: '',\n regular: '',\n },\n fullWidth: {\n true: 'w-full',\n false: '',\n },\n noPaddingX: {\n true: 'px-0',\n false: '',\n },\n },\n compoundVariants: [\n { size: 'small', class: '[&_svg]:h-4 [&_svg]:w-4' },\n // Comes after the size classes, so cn()'s tailwind-merge resolves the\n // ods-typography group in favour of text-h4.\n { size: 'default', font: 'regular', class: 'text-h4' },\n ],\n defaultVariants: {\n variant: 'accent',\n size: 'default',\n font: 'bold',\n fullWidth: false,\n noPaddingX: false,\n },\n },\n);\n\n// Split layout (used when `splitIcon` is provided): outer button has no padding;\n// inner slots own padding/gap so the divider can span full button height.\nconst splitShellVariants = cva(\n [\n 'group relative inline-flex items-stretch overflow-hidden whitespace-nowrap rounded-md',\n 'transition-colors duration-200',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-focus',\n 'disabled:pointer-events-none',\n ],\n {\n variants: {\n variant: {\n accent: buttonSurfaceClasses.accent,\n outline: cn(buttonSurfaceClasses.outline, outlineBorderClasses),\n transparent: buttonSurfaceClasses.transparent,\n destructive: buttonSurfaceClasses.destructive,\n warning: buttonSurfaceClasses.warning,\n },\n size: {\n default: 'h-12',\n small: 'h-6 text-h5 md:h-8',\n },\n // Same label-typography axis as the normal layout — `regular` swaps the\n // default size's h3-bold label for the h4 (DM Sans 500) step.\n font: { bold: '', regular: '' },\n fullWidth: { true: 'w-full', false: '' },\n },\n compoundVariants: [\n { size: 'default', font: 'bold', class: 'text-h3' },\n { size: 'default', font: 'regular', class: 'text-h4' },\n ],\n defaultVariants: { variant: 'accent', size: 'default', font: 'bold', fullWidth: false },\n },\n);\n\nconst splitSlotVariants = cva(\n // Glyph size lives per-size, not in the base: cva concatenates base + variant\n // without tailwind-merge, so a base `[&_svg]:h-5` and a variant `[&_svg]:h-4`\n // would both ship and the winner would come down to stylesheet order.\n ['inline-flex items-center justify-center', '[&_svg]:shrink-0'],\n {\n variants: {\n slot: {\n main: 'gap-[var(--spacing-system-xsf)]',\n icon: 'border-l',\n },\n size: splitGlyphSizeBySize,\n variant: { accent: '', outline: '', transparent: '', destructive: '', warning: '' },\n fullWidth: { true: '', false: '' },\n },\n compoundVariants: [\n { slot: 'main', size: 'default', class: 'px-[var(--spacing-system-m)] py-[var(--spacing-system-sf)]' },\n { slot: 'main', size: 'small', class: 'px-[var(--spacing-system-xs)]' },\n // `fullWidth` stretches the SHELL, not its children, so without this the main\n // half stays content-sized and the icon half floats mid-button with dead space\n // after it instead of sitting flush against the trailing edge. Keyed on\n // `fullWidth` to match `SplitButton`, which grows its main half on exactly the\n // same condition (`grow={fullWidth}`) — the two split layouts render side by\n // side in the same rows and must not disagree. Callers that stretch the shell\n // some other way (a `flex-1` className, a grid cell) keep the old behaviour.\n { slot: 'main', fullWidth: true, class: 'flex-1' },\n { slot: 'icon', size: 'default', class: 'w-10' },\n { slot: 'icon', size: 'small', class: 'w-6 md:w-8' },\n {\n slot: 'icon',\n variant: 'accent',\n class: cn(\n splitDividerColorClasses.accent,\n 'group-disabled:border-ods-disabled group-aria-disabled:border-ods-disabled',\n ),\n },\n { slot: 'icon', variant: 'outline', class: splitDividerColorClasses.outline },\n { slot: 'icon', variant: 'transparent', class: splitDividerColorClasses.transparent },\n {\n slot: 'icon',\n variant: 'destructive',\n class: cn(\n splitDividerColorClasses.destructive,\n 'group-disabled:border-ods-disabled group-aria-disabled:border-ods-disabled',\n ),\n },\n {\n slot: 'icon',\n variant: 'warning',\n class: cn(\n splitDividerColorClasses.warning,\n 'group-disabled:border-ods-disabled group-aria-disabled:border-ods-disabled',\n ),\n },\n ],\n defaultVariants: { slot: 'main', size: 'default', variant: 'accent', fullWidth: false },\n },\n);\n\n/** @deprecated Use `size=\"small\"` instead. Temporary alias kept for backward compatibility; will be removed in the future. */\ntype DeprecatedButtonSize = 'small-legacy';\n\ntype ButtonSize =\n Exclude<VariantProps<typeof buttonVariants>['size'], 'small-legacy' | null | undefined> | DeprecatedButtonSize;\n\ninterface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>, Omit<VariantProps<typeof buttonVariants>, 'size'> {\n asChild?: boolean;\n href?: string;\n openInNewTab?: boolean;\n prefetch?: boolean;\n /**\n * Pre-resolved anchor bundle (from `useNavLink({ href, targetPlatform })`).\n * When set, renders the Button as `<Link>` with `href` / `target` / `rel`\n * / `onClick` spread from this object. Lets callers thread the unified\n * nav decision directly without `<Button asChild><a {...linkProps}/>`\n * gymnastics. Wins over the separate `href` / `openInNewTab` props.\n */\n /**\n * Render a plain `<a href download>` instead of a Next `<Link>`.\n * A download is a RESOURCE fetch, not a route change: `<Link>` would try to\n * prefetch/route it. Only meaningful together with `href`.\n */\n download?: boolean | string;\n linkProps?: {\n href: string;\n target?: '_blank';\n rel?: 'noopener noreferrer';\n onClick?: React.MouseEventHandler<HTMLAnchorElement>;\n } | null;\n leftIcon?: React.ReactNode;\n rightIcon?: React.ReactNode;\n /**\n * Renders a vertical divider and trailing icon area inside the button.\n * The whole button stays a single click target — the icon is decorative\n * (`aria-hidden`). For two independent click targets, use `<SplitButton>`.\n * Only honored when `size` is `\"default\"` or `\"small\"`.\n */\n splitIcon?: React.ReactNode;\n loading?: boolean;\n size?: ButtonSize;\n}\n\nconst Spinner = () => (\n <svg className=\"animate-spin\" xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n <circle className=\"opacity-25\" cx=\"12\" cy=\"12\" r=\"10\" stroke=\"currentColor\" strokeWidth=\"4\" />\n <path\n className=\"opacity-75\"\n fill=\"currentColor\"\n d=\"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z\"\n />\n </svg>\n);\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(function ButtonImpl(\n {\n className,\n variant,\n size,\n font,\n fullWidth,\n noPaddingX,\n asChild,\n href,\n openInNewTab,\n prefetch,\n linkProps,\n download,\n leftIcon,\n rightIcon,\n splitIcon,\n loading,\n children,\n disabled,\n onClick,\n ...props\n },\n ref,\n) {\n const isDisabled = disabled || loading;\n\n // splitIcon is only supported for default/small sizes. With other sizes\n // (icon, small-legacy) we silently fall back to the normal layout.\n const useSplitLayout = !!splitIcon && (size === 'default' || size === 'small' || size === undefined);\n\n if (useSplitLayout) {\n const safeSize = size ?? 'default';\n const safeVariant = (variant ?? 'accent') as 'accent' | 'outline' | 'transparent' | 'destructive' | 'warning';\n const shellClasses = cn(splitShellVariants({ variant: safeVariant, size: safeSize, font, fullWidth }), className);\n const mainSlotClass = splitSlotVariants({ slot: 'main', size: safeSize, variant: safeVariant, fullWidth });\n const iconSlotClass = splitSlotVariants({ slot: 'icon', size: safeSize, variant: safeVariant });\n\n const splitContent = (\n <>\n <span className={cn('contents', loading && 'invisible')}>\n <span className={mainSlotClass}>\n {leftIcon && <span className=\"inline-flex items-center\">{leftIcon}</span>}\n {children}\n {rightIcon && <span className=\"inline-flex items-center\">{rightIcon}</span>}\n </span>\n <span aria-hidden=\"true\" className={iconSlotClass}>\n {splitIcon}\n </span>\n </span>\n {loading && (\n // Carries the glyph scale itself: this overlay is a SIBLING of the slots, so\n // it inherits neither their `[&_svg]` sizing nor a shell base rule (the shell\n // deliberately has none — see `splitSlotVariants`). Without it the spinner\n // renders unconstrained and fills the button. Reads the same per-size ramp the\n // slots do, so it matches the glyphs it covers at both breakpoints.\n <span\n className={cn(\n 'absolute inset-0 inline-flex items-center justify-center text-ods-text-primary',\n splitGlyphSizeBySize[safeSize],\n )}\n >\n <Spinner />\n </span>\n )}\n </>\n );\n\n // A download is a resource fetch, not a route change: same `Link` as every\n // other anchor branch (so a host that registered `next/link` keeps ONE\n // anchor implementation), with prefetch off — there is no route to warm,\n // and prefetching would fetch the file itself. Checked BEFORE the\n // linkProps/href resolution.\n if (download && href) {\n return (\n <Link\n href={href}\n download={download}\n prefetch={false}\n className={cn(shellClasses, isDisabled && 'pointer-events-none')}\n aria-label={props['aria-label']}\n >\n {splitContent}\n </Link>\n );\n }\n\n // `linkProps` (the pre-resolved bundle from `useNavLink({ href, targetPlatform })`)\n // wins over the legacy `href` + `openInNewTab` props so callers can thread\n // the unified nav decision directly. Either path produces the same `<Link>`.\n const splitAnchor =\n linkProps ??\n (href\n ? {\n href,\n target: openInNewTab ? ('_blank' as const) : undefined,\n rel: openInNewTab ? ('noopener noreferrer' as const) : undefined,\n onClick: onClick as unknown as React.MouseEventHandler<HTMLAnchorElement> | undefined,\n }\n : null);\n if (splitAnchor) {\n return (\n <Link\n href={splitAnchor.href}\n prefetch={prefetch}\n target={splitAnchor.target}\n rel={splitAnchor.rel}\n // The Link branches don't spread {...props} (button attrs don't\n // belong on an anchor), but the accessible name MUST survive —\n // icon-only link buttons have no text content.\n aria-label={props['aria-label']}\n aria-disabled={isDisabled || undefined}\n tabIndex={isDisabled ? -1 : undefined}\n className={cn(shellClasses, isDisabled && 'pointer-events-none')}\n onClick={splitAnchor.onClick}\n >\n {splitContent}\n </Link>\n );\n }\n\n return (\n <button ref={ref} className={shellClasses} disabled={isDisabled} onClick={onClick} {...props}>\n {splitContent}\n </button>\n );\n }\n\n const classes = cn(buttonVariants({ variant, size, font, fullWidth, noPaddingX }), className);\n\n // asChild: consumer fully controls the rendered element; we just stamp our classes.\n if (asChild) {\n return (\n <Slot ref={ref} className={classes} {...props}>\n {children}\n </Slot>\n );\n }\n\n // Real content stays in layout (preserving width) but goes invisible while loading.\n // The spinner is absolutely positioned so it never shifts the button's size.\n const content = (\n <>\n <span className={cn('contents', loading && 'invisible')}>\n {leftIcon && <span className=\"inline-flex items-center\">{leftIcon}</span>}\n {children}\n {rightIcon && <span className=\"inline-flex items-center\">{rightIcon}</span>}\n </span>\n {loading && (\n <span className=\"absolute inset-0 inline-flex items-center justify-center text-ods-text-primary\">\n <Spinner />\n </span>\n )}\n </>\n );\n\n // Same download short-circuit as the splitIcon branch.\n if (download && href) {\n return (\n <Link\n href={href}\n download={download}\n prefetch={false}\n className={cn(classes, isDisabled && 'pointer-events-none')}\n aria-label={props['aria-label']}\n >\n {content}\n </Link>\n );\n }\n\n // Same `linkProps`-wins-over-href resolution as the splitIcon branch.\n const anchor =\n linkProps ??\n (href\n ? {\n href,\n target: openInNewTab ? ('_blank' as const) : undefined,\n rel: openInNewTab ? ('noopener noreferrer' as const) : undefined,\n onClick: onClick as unknown as React.MouseEventHandler<HTMLAnchorElement> | undefined,\n }\n : null);\n if (anchor) {\n return (\n <Link\n href={anchor.href}\n prefetch={prefetch}\n target={anchor.target}\n rel={anchor.rel}\n // See the splitAnchor branch — keep the accessible name on the\n // anchor render (icon-only link buttons have no text content).\n aria-label={props['aria-label']}\n aria-disabled={isDisabled || undefined}\n tabIndex={isDisabled ? -1 : undefined}\n className={cn(classes, isDisabled && 'pointer-events-none')}\n onClick={anchor.onClick}\n >\n {content}\n </Link>\n );\n }\n\n return (\n <button ref={ref} className={classes} disabled={isDisabled} onClick={onClick} {...props}>\n {content}\n </button>\n );\n});\nButton.displayName = 'Button';\n\nexport { Button, buttonVariants, type ButtonProps };\n","// Shared style atoms for `Button` and `SplitButton`. Extracted to keep a single\n// source of truth for surface colors, outline borders, and split-divider colors.\n\n// Each variant pairs `disabled:` (real `<button disabled>`) with `aria-disabled:`\n// (used for `<Link aria-disabled>` since anchors don't support `:disabled`).\nexport const buttonSurfaceClasses = {\n accent:\n 'bg-ods-accent text-ods-text-on-accent hover:bg-ods-accent-hover active:bg-ods-accent-active disabled:bg-ods-disabled aria-disabled:bg-ods-disabled',\n outline:\n 'bg-ods-card text-ods-text-primary hover:bg-ods-bg-hover active:bg-ods-bg-active disabled:bg-ods-card disabled:text-ods-text-disabled aria-disabled:bg-ods-card aria-disabled:text-ods-text-disabled',\n transparent:\n 'bg-transparent text-ods-text-primary hover:bg-ods-bg-hover active:bg-ods-bg-active disabled:bg-transparent disabled:text-ods-text-disabled aria-disabled:bg-transparent aria-disabled:text-ods-text-disabled',\n destructive:\n 'bg-ods-error text-ods-text-on-accent hover:bg-ods-error-hover active:bg-ods-error-active disabled:bg-ods-disabled aria-disabled:bg-ods-disabled',\n warning:\n 'bg-ods-warning text-ods-text-on-accent hover:bg-ods-warning-hover active:bg-ods-warning-active disabled:bg-ods-disabled aria-disabled:bg-ods-disabled',\n // A self-contained glyph (play badge, unmute glyph) that already carries its\n // own scrim: no button surface at all, in any state. Distinct from\n // `transparent`, whose hover/active fills would paint a rectangle behind the\n // glyph — which is why call sites were undoing them with\n // `hover:bg-transparent active:bg-transparent`.\n glyph:\n 'bg-transparent text-ods-text-primary hover:bg-transparent active:bg-transparent disabled:bg-transparent disabled:text-ods-text-disabled aria-disabled:bg-transparent aria-disabled:text-ods-text-disabled',\n // A quiet inline text action (a \"Show all\" / \"Show less\" disclosure, a\n // secondary \"Clear\" beside a field): secondary text that takes the accent on\n // hover, and no surface in any state. Promoted to a variant because the\n // disclosure toggle was a primitive <button> restating these classes. Pair\n // with size=\"compact\" and noPaddingX so the label aligns with the text above.\n link: 'bg-transparent text-ods-text-secondary hover:bg-transparent hover:text-ods-accent active:bg-transparent active:text-ods-accent-active disabled:bg-transparent disabled:text-ods-text-disabled aria-disabled:bg-transparent aria-disabled:text-ods-text-disabled',\n // Chrome that sits ON media (video cards, image lightboxes): a scrim disc so\n // the glyph stays legible over an arbitrary frame. Promoted to a variant\n // because the walkthrough card, its theater and the bite cards were each\n // stacking the same classes at the call site.\n overlay:\n 'rounded-full bg-ods-overlay text-ods-text-primary backdrop-blur-sm hover:text-ods-accent active:text-ods-accent-active disabled:text-ods-text-disabled aria-disabled:text-ods-text-disabled',\n} as const;\n\nexport const outlineBorderClasses =\n 'border border-ods-border hover:border-ods-border-hover active:border-ods-border-active disabled:border-ods-border aria-disabled:border-ods-border';\n\n// Glyph scale for the split-layout button family: 16px below md, 24px from md.\n//\n// Shared because the same page-header action renders through EITHER of the two\n// split layouts depending on its shape — `SplitButton` for two click targets, and\n// `Button` + `splitIcon` for one with a decorative trailing glyph — and the two sit\n// side by side in the same row. They used to disagree: `SplitButton` carried this\n// responsive scale while the `Button` split slots re-declared a flat 20px, so a\n// \"submenu\" action's icons rendered 4px smaller than its neighbour's on desktop.\n// `Button`'s own flat `[&_svg]:h-5` stays as it is for ordinary (non-split) buttons.\nexport const splitGlyphSizeClasses = '[&_svg]:h-4 [&_svg]:w-4 md:[&_svg]:h-6 md:[&_svg]:w-6';\n\n// Per-size glyph scale for `Button`'s split slots AND the loading overlay that\n// covers them, so those two read from ONE place — the overlay sits outside both\n// slots and inherits neither their sizing nor a shell base rule, so without this it\n// would have to restate a number, which is the divergence described above.\n//\n// Scoped to `Button` on purpose: `SplitButton` keeps its own `small` ramp\n// (12px → 16px, vs the flat 16px here) and only shares the `default` step through\n// `splitGlyphSizeClasses`. Aligning `small` too is a visible design change, so it is\n// not folded in here silently.\nexport const splitGlyphSizeBySize = {\n default: splitGlyphSizeClasses,\n small: '[&_svg]:h-4 [&_svg]:w-4',\n} as const;\n\n// Color of the vertical seam between the main and icon halves (split layouts).\nexport const splitDividerColorClasses = {\n accent: 'border-ods-accent-active',\n outline: 'border-ods-border',\n transparent: 'border-ods-border',\n destructive: 'border-ods-error-active',\n warning: 'border-ods-warning-active',\n} as const;\n\nexport type ButtonSurfaceVariant = keyof typeof buttonSurfaceClasses;\n","'use client';\n\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport React from 'react';\nimport Link from '../../../embed-shims/next-link';\nimport { cn } from '../../../utils/cn';\nimport { buttonSurfaceClasses, splitDividerColorClasses, splitGlyphSizeClasses } from './button-styles';\n\n// Two independent interactive halves: each a `<button>` or `<a>`. The seam is\n// a 1px border on the left edge of the icon half, colored per variant. For a\n// single-target variant (decorative trailing icon), use `<Button splitIcon>`.\n\nconst splitHalfBase = [\n 'relative inline-flex items-center justify-center gap-[var(--spacing-system-xsf)]',\n 'whitespace-nowrap transition-colors duration-200',\n 'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ods-focus focus-visible:z-10',\n 'disabled:pointer-events-none',\n '[&_svg]:pointer-events-none [&_svg]:shrink-0',\n];\n\nconst splitHalfVariants = cva(splitHalfBase, {\n variants: {\n variant: {\n accent: buttonSurfaceClasses.accent,\n outline: buttonSurfaceClasses.outline, // Outline border lives in compoundVariants so we can omit the seam edge.\n transparent: buttonSurfaceClasses.transparent,\n destructive: buttonSurfaceClasses.destructive,\n warning: buttonSurfaceClasses.warning,\n },\n size: {\n default: `h-10 px-[var(--spacing-system-m)] py-[var(--spacing-system-sf)] text-h3 md:h-12 ${splitGlyphSizeClasses}`,\n small: 'h-6 px-[var(--spacing-system-xs)] text-h5 md:h-8 [&_svg]:h-3 [&_svg]:w-3 md:[&_svg]:h-4 md:[&_svg]:w-4',\n },\n side: { main: '', icon: '' },\n soloOnMobile: { true: '', false: '' },\n },\n compoundVariants: [\n // Rounded corners + per-variant seam. The icon-side's left border is the divider.\n { variant: 'accent', side: 'main', class: 'rounded-l-md' },\n {\n variant: 'accent',\n side: 'icon',\n class: cn(\n 'rounded-r-md border-l',\n splitDividerColorClasses.accent,\n 'disabled:border-ods-disabled aria-disabled:border-ods-disabled',\n ),\n },\n { variant: 'destructive', side: 'main', class: 'rounded-l-md' },\n {\n variant: 'destructive',\n side: 'icon',\n class: cn(\n 'rounded-r-md border-l',\n splitDividerColorClasses.destructive,\n 'disabled:border-ods-disabled aria-disabled:border-ods-disabled',\n ),\n },\n { variant: 'warning', side: 'main', class: 'rounded-l-md' },\n {\n variant: 'warning',\n side: 'icon',\n class: cn(\n 'rounded-r-md border-l',\n splitDividerColorClasses.warning,\n 'disabled:border-ods-disabled aria-disabled:border-ods-disabled',\n ),\n },\n { variant: 'outline', side: 'main', class: 'rounded-l-md border-y border-l border-ods-border' },\n { variant: 'outline', side: 'icon', class: 'rounded-r-md border border-ods-border' },\n { variant: 'transparent', side: 'main', class: 'rounded-md' },\n { variant: 'transparent', side: 'icon', class: cn('rounded-md', splitDividerColorClasses.transparent) },\n\n // Icon half: per Figma, narrower than main height (default: 40×48; small: 32×32).\n { side: 'icon', size: 'default', class: 'w-10 px-0' },\n { side: 'icon', size: 'small', class: 'w-6 px-0 md:w-8' },\n\n { side: 'icon', soloOnMobile: true, class: 'max-md:hidden' },\n { side: 'main', soloOnMobile: true, class: 'max-md:rounded-r-md' },\n { variant: 'outline', side: 'main', soloOnMobile: true, class: 'max-md:border-r' },\n ],\n defaultVariants: { variant: 'accent', size: 'default', side: 'main', soloOnMobile: false },\n});\n\ntype SplitButtonVariant = NonNullable<VariantProps<typeof splitHalfVariants>['variant']>;\ntype SplitButtonSize = NonNullable<VariantProps<typeof splitHalfVariants>['size']>;\n\ninterface SplitButtonIconAction {\n icon: React.ReactNode;\n /** The icon half is interactive but has no visible text — needs an accessible name. */\n 'aria-label': string;\n onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;\n href?: string;\n /**\n * Opens `href` with `target=\"_blank\"`. Also marks the half as a new-tab\n * affordance, which hides it below `md` (set it for `onClick` handlers that\n * open a new tab/window themselves).\n */\n openInNewTab?: boolean;\n prefetch?: boolean;\n disabled?: boolean;\n}\n\ninterface SplitButtonProps {\n variant?: SplitButtonVariant;\n size?: SplitButtonSize;\n fullWidth?: boolean;\n className?: string;\n\n children: React.ReactNode;\n onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;\n href?: string;\n openInNewTab?: boolean;\n prefetch?: boolean;\n leftIcon?: React.ReactNode;\n rightIcon?: React.ReactNode;\n /** Disables both halves. Equivalent to `mainDisabled && iconAction.disabled`. */\n disabled?: boolean;\n /** Disables only the main half. Combine with `iconAction.disabled` for finer control. */\n mainDisabled?: boolean;\n type?: 'button' | 'submit' | 'reset';\n 'aria-label'?: string;\n groupAriaLabel?: string;\n\n iconAction: SplitButtonIconAction;\n}\n\ninterface HalfOptions {\n variant: SplitButtonVariant;\n size: SplitButtonSize;\n side: 'main' | 'icon';\n soloOnMobile?: boolean;\n href?: string;\n openInNewTab?: boolean;\n prefetch?: boolean;\n onClick?: React.MouseEventHandler<HTMLButtonElement | HTMLAnchorElement>;\n disabled?: boolean;\n /** Stretch this half to fill the group's free space (the icon half stays fixed-width). */\n grow?: boolean;\n type?: 'button' | 'submit' | 'reset';\n ariaLabel?: string;\n children: React.ReactNode;\n}\n\nfunction Half({\n variant,\n size,\n side,\n soloOnMobile,\n href,\n openInNewTab,\n prefetch,\n onClick,\n disabled,\n grow,\n type = 'button',\n ariaLabel,\n children,\n}: HalfOptions) {\n const classes = cn(splitHalfVariants({ variant, size, side, soloOnMobile }), grow && 'flex-1');\n\n if (href) {\n return (\n <Link\n href={href}\n prefetch={prefetch}\n target={openInNewTab ? '_blank' : undefined}\n rel={openInNewTab ? 'noopener noreferrer' : undefined}\n aria-disabled={disabled || undefined}\n tabIndex={disabled ? -1 : undefined}\n aria-label={ariaLabel}\n className={cn(classes, disabled && 'pointer-events-none')}\n onClick={onClick}\n >\n {children}\n </Link>\n );\n }\n\n return (\n <button type={type} className={classes} disabled={disabled} aria-label={ariaLabel} onClick={onClick}>\n {children}\n </button>\n );\n}\n\nconst SplitButton = React.forwardRef<HTMLDivElement, SplitButtonProps>(function SplitButtonImpl(\n {\n variant = 'accent',\n size = 'default',\n fullWidth = false,\n className,\n children,\n onClick,\n href,\n openInNewTab,\n prefetch,\n leftIcon,\n rightIcon,\n disabled,\n mainDisabled,\n type,\n iconAction,\n 'aria-label': ariaLabel,\n groupAriaLabel,\n },\n ref,\n) {\n const soloOnMobile = !!iconAction.openInNewTab;\n\n return (\n <div\n ref={ref}\n role=\"group\"\n aria-label={groupAriaLabel}\n className={cn('inline-flex items-stretch', fullWidth && 'w-full', className)}\n >\n <Half\n variant={variant}\n size={size}\n side=\"main\"\n soloOnMobile={soloOnMobile}\n href={href}\n openInNewTab={openInNewTab}\n prefetch={prefetch}\n onClick={onClick}\n disabled={disabled || mainDisabled}\n grow={fullWidth}\n type={type}\n ariaLabel={ariaLabel}\n >\n {leftIcon && <span className=\"inline-flex items-center\">{leftIcon}</span>}\n <span>{children}</span>\n {rightIcon && <span className=\"inline-flex items-center\">{rightIcon}</span>}\n </Half>\n <Half\n variant={variant}\n size={size}\n side=\"icon\"\n soloOnMobile={soloOnMobile}\n href={iconAction.href}\n openInNewTab={iconAction.openInNewTab}\n prefetch={iconAction.prefetch}\n onClick={iconAction.onClick}\n disabled={disabled || iconAction.disabled}\n ariaLabel={iconAction['aria-label']}\n >\n <span className=\"inline-flex items-center\">{iconAction.icon}</span>\n </Half>\n </div>\n );\n});\nSplitButton.displayName = 'SplitButton';\n\nexport { SplitButton, type SplitButtonProps, type SplitButtonIconAction };\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
useOptionalTicketLive
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-LDR3QNOT.js";
|
|
5
5
|
import {
|
|
6
6
|
AppLayoutDrawerContainerContext,
|
|
7
7
|
AppLayoutDrawerCoordinationContext,
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
UnreadDot,
|
|
14
14
|
buildTicketOpenHref,
|
|
15
15
|
useOptionalNotifications
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-KEHI5NAD.js";
|
|
17
17
|
import {
|
|
18
18
|
useFocusTrap,
|
|
19
19
|
useLocalStorage
|
|
@@ -21,7 +21,7 @@ import {
|
|
|
21
21
|
import {
|
|
22
22
|
OVERLAY_BACKDROP_CLASS,
|
|
23
23
|
useIsHydrated
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-RFUYCKBZ.js";
|
|
25
25
|
import {
|
|
26
26
|
useHeaderHeight,
|
|
27
27
|
useIsomorphicLayoutEffect,
|
|
@@ -47,7 +47,7 @@ import {
|
|
|
47
47
|
} from "./chunk-IMDG23LW.js";
|
|
48
48
|
import {
|
|
49
49
|
SquareAvatar
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-EW6PYGB3.js";
|
|
51
51
|
import {
|
|
52
52
|
OpenFrameLogo
|
|
53
53
|
} from "./chunk-OTX6XNSA.js";
|
|
@@ -62,7 +62,7 @@ import {
|
|
|
62
62
|
} from "./chunk-6U3IUD57.js";
|
|
63
63
|
import {
|
|
64
64
|
Button
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-BXKM4GFD.js";
|
|
66
66
|
import {
|
|
67
67
|
next_link_default
|
|
68
68
|
} from "./chunk-BTROSBHF.js";
|
|
@@ -1890,4 +1890,4 @@ export {
|
|
|
1890
1890
|
MobileBurgerMenu,
|
|
1891
1891
|
AppLayout
|
|
1892
1892
|
};
|
|
1893
|
-
//# sourceMappingURL=chunk-
|
|
1893
|
+
//# sourceMappingURL=chunk-WSEDVYDY.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Pagination
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-X7LJRNMJ.js";
|
|
5
5
|
import {
|
|
6
6
|
withQuery
|
|
7
7
|
} from "./chunk-BVQEU5JB.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
} from "./chunk-XXMHLZ3Y.js";
|
|
13
13
|
import {
|
|
14
14
|
Button
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-BXKM4GFD.js";
|
|
16
16
|
|
|
17
17
|
// src/components/empty-state.tsx
|
|
18
18
|
import { Search, FileText, Package } from "lucide-react";
|
|
@@ -185,4 +185,4 @@ export {
|
|
|
185
185
|
EmptyState,
|
|
186
186
|
UnifiedPagination
|
|
187
187
|
};
|
|
188
|
-
//# sourceMappingURL=chunk-
|
|
188
|
+
//# sourceMappingURL=chunk-X3LC6R37.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
Button
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-BXKM4GFD.js";
|
|
5
5
|
import {
|
|
6
6
|
cn
|
|
7
7
|
} from "./chunk-O4MCCKKN.js";
|
|
@@ -213,4 +213,4 @@ export {
|
|
|
213
213
|
PaginationPrevious,
|
|
214
214
|
PaginationNext
|
|
215
215
|
};
|
|
216
|
-
//# sourceMappingURL=chunk-
|
|
216
|
+
//# sourceMappingURL=chunk-X7LJRNMJ.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkWRJVEB2Jcjs = require('./chunk-WRJVEB2J.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
var _chunk23V5BSHDcjs = require('./chunk-23V5BSHD.cjs');
|
|
@@ -89,7 +89,7 @@ var Pagination = ({ currentPage, totalPages, onPageChange, className }) => {
|
|
|
89
89
|
const pageNumbers = getPageNumbers();
|
|
90
90
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "nav", { role: "navigation", "aria-label": "pagination", className: _chunk23V5BSHDcjs.cn.call(void 0, "mx-auto flex w-full justify-center", className), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "ul", { className: "flex flex-row items-center gap-1", children: [
|
|
91
91
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
92
|
-
|
|
92
|
+
_chunkWRJVEB2Jcjs.Button,
|
|
93
93
|
{
|
|
94
94
|
variant: "outline",
|
|
95
95
|
size: "icon",
|
|
@@ -108,7 +108,7 @@ var Pagination = ({ currentPage, totalPages, onPageChange, className }) => {
|
|
|
108
108
|
] }) }, `ellipsis-${index}`);
|
|
109
109
|
}
|
|
110
110
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
111
|
-
|
|
111
|
+
_chunkWRJVEB2Jcjs.Button,
|
|
112
112
|
{
|
|
113
113
|
variant: currentPage === page ? "accent" : "outline",
|
|
114
114
|
size: "icon",
|
|
@@ -121,7 +121,7 @@ var Pagination = ({ currentPage, totalPages, onPageChange, className }) => {
|
|
|
121
121
|
) }, page);
|
|
122
122
|
}),
|
|
123
123
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "li", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
124
|
-
|
|
124
|
+
_chunkWRJVEB2Jcjs.Button,
|
|
125
125
|
{
|
|
126
126
|
variant: "outline",
|
|
127
127
|
size: "icon",
|
|
@@ -182,7 +182,7 @@ var PaginationEllipsis = _react.forwardRef.call(void 0,
|
|
|
182
182
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
183
183
|
var PaginationPrevious = _react.forwardRef.call(void 0,
|
|
184
184
|
({ className, ...props }, ref) => {
|
|
185
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
185
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWRJVEB2Jcjs.Button, { ref, variant: "outline", size: "icon", className: _chunk23V5BSHDcjs.cn.call(void 0, "h-10 w-10", className), ...props, children: [
|
|
186
186
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronLeft, { className: "h-4 w-4" }),
|
|
187
187
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", children: "Previous page" })
|
|
188
188
|
] });
|
|
@@ -191,7 +191,7 @@ var PaginationPrevious = _react.forwardRef.call(void 0,
|
|
|
191
191
|
PaginationPrevious.displayName = "PaginationPrevious";
|
|
192
192
|
var PaginationNext = _react.forwardRef.call(void 0,
|
|
193
193
|
({ className, ...props }, ref) => {
|
|
194
|
-
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
|
|
194
|
+
return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkWRJVEB2Jcjs.Button, { ref, variant: "outline", size: "icon", className: _chunk23V5BSHDcjs.cn.call(void 0, "h-10 w-10", className), ...props, children: [
|
|
195
195
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ChevronRight, { className: "h-4 w-4" }),
|
|
196
196
|
/* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "sr-only", children: "Next page" })
|
|
197
197
|
] });
|
|
@@ -213,4 +213,4 @@ PaginationNext.displayName = "PaginationNext";
|
|
|
213
213
|
|
|
214
214
|
|
|
215
215
|
exports.CONTENT_REF_GROUPS = CONTENT_REF_GROUPS; exports.getContentRefLabel = getContentRefLabel; exports.getContentRefLabelOrTitleCase = getContentRefLabelOrTitleCase; exports.orderContentRefTypes = orderContentRefTypes; exports.buildSuggestionUrl = buildSuggestionUrl; exports.Pagination = Pagination; exports.PaginationContent = PaginationContent; exports.PaginationItem = PaginationItem; exports.PaginationLink = PaginationLink; exports.PaginationEllipsis = PaginationEllipsis; exports.PaginationPrevious = PaginationPrevious; exports.PaginationNext = PaginationNext;
|
|
216
|
-
//# sourceMappingURL=chunk-
|
|
216
|
+
//# sourceMappingURL=chunk-YB6RCW77.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-EG4IKWY4.cjs","../src/utils/content-ref-groups.ts","../src/utils/suggestion-url.ts","../src/components/pagination.tsx"],"names":[],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACqCO,IAAM,mBAAA,EAA4D;AAAA,EACvE,eAAA,EAAiB,EAAE,KAAA,EAAO,kBAAA,EAAoB,KAAA,EAAO,CAAA,EAAG,MAAA,EAAQ,MAAA,EAAQ,QAAA,EAAU,UAAU,CAAA;AAAA,EAC5F,eAAA,EAAiB,EAAE,KAAA,EAAO,kBAAA,EAAoB,KAAA,EAAO,CAAA,EAAG,MAAA,EAAQ,MAAA,EAAQ,QAAA,EAAU,KAAK,CAAA;AAAA,EACvF,OAAA,EAAS,EAAE,KAAA,EAAO,UAAA,EAAY,KAAA,EAAO,CAAA,EAAG,MAAA,EAAQ,MAAA,EAAQ,QAAA,EAAU,UAAU,CAAA;AAAA,EAC5E,OAAA,EAAS,EAAE,KAAA,EAAO,UAAA,EAAY,KAAA,EAAO,CAAA,EAAG,MAAA,EAAQ,MAAA,EAAQ,QAAA,EAAU,UAAU,CAAA;AAAA,EAC5E,UAAA,EAAY,EAAE,KAAA,EAAO,cAAA,EAAgB,KAAA,EAAO,CAAA,EAAG,MAAA,EAAQ,MAAA,EAAQ,QAAA,EAAU,UAAU,CAAA;AAAA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C,UAAA;AAAA,QAAA;AACH,MAAA;AAGL,IAAA;AAED,oBAAA;AACG,MAAA;AAAA,MAAA;AACC,QAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AACA,QAAA;AAEA,QAAA;AAAA,0BAAA;AACA,0BAAA;AAAmC,QAAA;AAAA,MAAA;AAEvC,IAAA;AAEJ,EAAA;AAEJ;AAEM;AACD,EAAA;AACD,IAAA;AACF,EAAA;AACF;AACA;AAEM;AACG,EAAA;AACR;AACD;AAEM;AACD,EAAA;AACD,IAAA;AACG,MAAA;AAAA,MAAA;AACC,QAAA;AACA,QAAA;AACE,UAAA;AACA,UAAA;AACF,QAAA;AACC,QAAA;AAAG,MAAA;AACN,IAAA;AAEJ,EAAA;AACF;AACA;AAEM;AACD,EAAA;AACD,IAAA;AACG,MAAA;AAAA,MAAA;AACC,QAAA;AACA,QAAA;AACC,QAAA;AAED,QAAA;AAAA,0BAAA;AACA,0BAAA;AAAoC,QAAA;AAAA,MAAA;AACtC,IAAA;AAEJ,EAAA;AACF;AACA;AAEM;AACD,EAAA;AACD,IAAA;AAEI,sBAAA;AACA,sBAAA;AACF,IAAA;AAEJ,EAAA;AACF;AACA;AAEM;AACD,EAAA;AACD,IAAA;AAEI,sBAAA;AACA,sBAAA;AACF,IAAA;AAEJ,EAAA;AACF;AACA;AHKU;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-EG4IKWY4.cjs","sourcesContent":[null,"/**\n * Content Ref Group Configuration\n *\n * Single source of truth for grouping content_refs by type. Used by both:\n * - components/related-content (detail page rail — lives in this lib)\n * - the hub's lib/utils/investor-email-utils.ts (email builder, via the\n * hub's re-export shim at lib/config/content-ref-groups.ts)\n *\n * Lives in utils/ (server-safe tsup block) so hub server-side code can\n * import it.\n *\n * Each entry carries the metadata RelatedContentSection needs to render the\n * group WITHOUT re-implementing per-type logic locally:\n * - `label`: section heading.\n * - `order`: source-stable ordering (lowest first).\n * - `layout`: 'list' (one-per-row, full-width cards) or 'grid' (responsive\n * column grid).\n * - `gridSize`: card-size variant passed to the per-type card dispatch.\n * `'lg'` matches the canonical large-card variant openframe + flamingo\n * apps already use; `'default'` is the legacy denser variant. New types\n * should pick `'lg'` whenever the card has a large variant.\n *\n * Adding a new content type = one entry here. RelatedContentSection picks up\n * the new group automatically (no hardcoded set to update). NOTE: the hub's\n * related-content SUGGESTION candidate list is DERIVED from these keys (minus\n * an explicit exclusion knob) — a new entry here becomes a suggestion\n * candidate iff it also resolves through the hub's TYPE_TO_ENTITY → RAG\n * config chain (unresolvable entries are dropped loudly at module load).\n */\n\nexport type ContentRefLayout = 'list' | 'grid';\n\n/** Subset of `EntityCardSize` (entity-card dispatch) appropriate for\n * grid/list rendering in RelatedContentSection. Duplicated as a literal\n * union here to avoid a config→component import cycle. Kept in lockstep\n * with `EntityCardSize`; widen here when a new size is added there. */\nexport type ContentRefGridSize = 'lg' | 'default' | 'sm';\n\nexport interface ContentRefGroupConfig {\n label: string;\n order: number;\n layout: ContentRefLayout;\n gridSize: ContentRefGridSize;\n}\n\nexport const CONTENT_REF_GROUPS: Record<string, ContentRefGroupConfig> = {\n investor_update: { label: 'Investor Updates', order: 1, layout: 'grid', gridSize: 'default' },\n product_release: { label: 'Product Releases', order: 2, layout: 'list', gridSize: 'lg' },\n podcast: { label: 'Podcasts', order: 3, layout: 'list', gridSize: 'default' },\n webinar: { label: 'Webinars', order: 4, layout: 'list', gridSize: 'default' },\n case_study: { label: 'Case Studies', order: 5, layout: 'grid', gridSize: 'default' },\n event: { label: 'Events', order: 6, layout: 'list', gridSize: 'default' },\n blog_post_existing: { label: 'Blog Posts', order: 7, layout: 'grid', gridSize: 'default' },\n customer_interview: { label: 'Customer Interviews', order: 8, layout: 'grid', gridSize: 'default' },\n onboarding_guide: { label: 'Onboarding Guides', order: 9, layout: 'list', gridSize: 'default' },\n what_i_shipped: { label: 'What I Shipped', order: 10, layout: 'grid', gridSize: 'default' },\n how_i_work: { label: 'How I Work', order: 11, layout: 'grid', gridSize: 'default' },\n ai_prompt: { label: 'Squawkbox', order: 12, layout: 'grid', gridSize: 'default' },\n};\n\n/** Human-readable label for a content_ref `type`. Returns null when the type\n * isn't registered — caller decides the fallback. Use `getContentRefLabelOrTitleCase`\n * to get a consistent title-cased fallback across all surfaces. */\nexport function getContentRefLabel(type: string): string | null {\n return CONTENT_REF_GROUPS[type]?.label ?? null;\n}\n\n/** Resolved label with a single shared fallback shape — title-cased version\n * of the raw type string for any unregistered type. Both RelatedContentSection\n * AND the investor-email builder consume this so cross-surface label rendering\n * for unregistered types is identical (no drift between \"podcast guest\" and\n * \"Podcast Guest\"). */\nexport function getContentRefLabelOrTitleCase(type: string): string {\n return CONTENT_REF_GROUPS[type]?.label ?? type.replace(/_/g, ' ').replace(/\\b\\w/g, ch => ch.toUpperCase());\n}\n\n/** Sort a set of present content_ref types into the canonical group order\n * (registered types first in CONTENT_REF_GROUPS `order`, then unregistered\n * types appended in insertion order). Used by RelatedContentSection AND the\n * investor-email builder so cross-surface ordering stays identical. */\nexport function orderContentRefTypes(present: Iterable<string>): string[] {\n const presentSet = new Set(present);\n const registeredInOrder = Object.entries(CONTENT_REF_GROUPS)\n .sort(([, a], [, b]) => a.order - b.order)\n .map(([type]) => type)\n .filter(type => presentSet.has(type));\n const unregistered = [...presentSet].filter(type => !CONTENT_REF_GROUPS[type]);\n return [...registeredInOrder, ...unregistered];\n}\n","/**\n * Shared fetch-URL composer for the two suggestion sections (FaqSection +\n * RelatedContentSection) — ONE owner of the entityType/entityId/count query\n * shape so the sections can never drift. Pure + server-safe.\n *\n * Byte-parity contract with the original `buildFaqsUrl`: when only\n * entityType/entityId are set, the param order is `entityType`, `entityId`;\n * with nothing set, the bare `path` is returned (no `?`).\n */\nexport interface SuggestionUrlOptions {\n /** Fetch-URL prefix for third-party embeds / reverse proxies\n * ('' = same-origin relative). */\n apiBaseUrl?: string;\n /** Both required together for entity scope; partial → bare path. */\n entityType?: string;\n entityId?: number | string;\n /** Maps to the server's `count` param. Undefined → param not sent\n * (server default applies). */\n count?: number;\n /** Extra query params appended after the shared trio (e.g. the\n * related-content `excludeTypes` deny-list). Empty/undefined values\n * are skipped. */\n extraParams?: Record<string, string | undefined>;\n}\n\nexport function buildSuggestionUrl(path: string, opts: SuggestionUrlOptions = {}): string {\n const qs = new URLSearchParams();\n const { entityType, entityId } = opts;\n if (entityType && entityId !== undefined && entityId !== null && entityId !== '') {\n qs.set('entityType', entityType);\n qs.set('entityId', String(entityId));\n }\n if (opts.count !== undefined) qs.set('count', String(opts.count));\n for (const [key, value] of Object.entries(opts.extraParams ?? {})) {\n if (value !== undefined && value !== '') qs.set(key, value);\n }\n const query = qs.toString();\n return `${opts.apiBaseUrl ?? ''}${path}${query ? `?${query}` : ''}`;\n}\n","'use client';\n\nimport { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';\nimport { type ButtonHTMLAttributes, type HTMLAttributes, forwardRef } from 'react';\nimport { cn } from '../utils/cn';\nimport { Button } from './ui/button';\n\ninterface PaginationProps {\n currentPage: number;\n totalPages: number;\n onPageChange: (page: number) => void;\n className?: string;\n}\n\nconst Pagination = ({ currentPage, totalPages, onPageChange, className }: PaginationProps) => {\n // Generate page numbers to display\n const getPageNumbers = () => {\n const pages = [];\n const maxPagesToShow = 5;\n\n if (totalPages <= maxPagesToShow) {\n // Show all pages if there are fewer than maxPagesToShow\n for (let i = 1; i <= totalPages; i++) {\n pages.push(i);\n }\n } else {\n // Always show first page\n pages.push(1);\n\n // Calculate start and end of page range\n let start = Math.max(2, currentPage - 1);\n let end = Math.min(totalPages - 1, currentPage + 1);\n\n // Adjust if at the beginning or end\n if (currentPage <= 2) {\n end = Math.min(totalPages - 1, 4);\n } else if (currentPage >= totalPages - 1) {\n start = Math.max(2, totalPages - 3);\n }\n\n // Add ellipsis if needed\n if (start > 2) {\n pages.push(-1); // -1 represents ellipsis\n }\n\n // Add middle pages\n for (let i = start; i <= end; i++) {\n pages.push(i);\n }\n\n // Add ellipsis if needed\n if (end < totalPages - 1) {\n pages.push(-2); // -2 represents ellipsis\n }\n\n // Always show last page\n if (totalPages > 1) {\n pages.push(totalPages);\n }\n }\n\n return pages;\n };\n\n const pageNumbers = getPageNumbers();\n\n return (\n <nav role=\"navigation\" aria-label=\"pagination\" className={cn('mx-auto flex w-full justify-center', className)}>\n <ul className=\"flex flex-row items-center gap-1\">\n <li>\n <Button\n variant=\"outline\"\n size=\"icon\"\n onClick={() => onPageChange(currentPage - 1)}\n disabled={currentPage === 1}\n aria-label=\"Go to previous page\"\n className=\"!h-10 !w-10 md:!h-10 md:!w-10\"\n >\n <ChevronLeft className=\"h-4 w-4\" />\n </Button>\n </li>\n\n {pageNumbers.map((page, index) => {\n if (page < 0) {\n // Render ellipsis\n return (\n <li key={`ellipsis-${index}`}>\n <span className=\"flex h-9 w-9 items-center justify-center text-muted-foreground text-h6\">\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n </li>\n );\n }\n\n return (\n <li key={page}>\n <Button\n variant={currentPage === page ? 'accent' : 'outline'}\n size=\"icon\"\n onClick={() => onPageChange(page)}\n className=\"!h-9 !w-9 md:!h-9 md:!w-9\"\n aria-label={`Page ${page}`}\n aria-current={currentPage === page ? 'page' : undefined}\n >\n {page}\n </Button>\n </li>\n );\n })}\n\n <li>\n <Button\n variant=\"outline\"\n size=\"icon\"\n onClick={() => onPageChange(currentPage + 1)}\n disabled={currentPage === totalPages}\n aria-label=\"Go to next page\"\n className=\"!h-10 !w-10 md:!h-10 md:!w-10\"\n >\n <ChevronRight className=\"h-4 w-4\" />\n <span className=\"sr-only\">Next page</span>\n </Button>\n </li>\n </ul>\n </nav>\n );\n};\n\nconst PaginationContent = forwardRef<HTMLUListElement, HTMLAttributes<HTMLUListElement>>(\n ({ className, ...props }, ref) => {\n return <ul ref={ref} className={cn('flex items-center justify-center', className)} {...props} />;\n },\n);\nPaginationContent.displayName = 'PaginationContent';\n\nconst PaginationItem = forwardRef<HTMLLIElement, HTMLAttributes<HTMLLIElement>>(({ className, ...props }, ref) => {\n return <li ref={ref} className={cn('', className)} {...props} />;\n});\nPaginationItem.displayName = 'PaginationItem';\n\nconst PaginationLink = forwardRef<HTMLButtonElement, ButtonHTMLAttributes<HTMLButtonElement>>(\n ({ className, ...props }, ref) => {\n return (\n <button\n ref={ref}\n className={cn(\n 'inline-flex h-10 w-10 items-center justify-center rounded-md border border-input bg-background transition-colors text-h6 hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n className,\n )}\n {...props}\n />\n );\n },\n);\nPaginationLink.displayName = 'PaginationLink';\n\nconst PaginationEllipsis = forwardRef<HTMLSpanElement, HTMLAttributes<HTMLSpanElement>>(\n ({ className, ...props }, ref) => {\n return (\n <span\n ref={ref}\n className={cn('flex h-10 w-10 items-center justify-center text-muted-foreground', className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n },\n);\nPaginationEllipsis.displayName = 'PaginationEllipsis';\n\nconst PaginationPrevious = forwardRef<HTMLButtonElement, ButtonHTMLAttributes<HTMLButtonElement>>(\n ({ className, ...props }, ref) => {\n return (\n <Button ref={ref} variant=\"outline\" size=\"icon\" className={cn('h-10 w-10', className)} {...props}>\n <ChevronLeft className=\"h-4 w-4\" />\n <span className=\"sr-only\">Previous page</span>\n </Button>\n );\n },\n);\nPaginationPrevious.displayName = 'PaginationPrevious';\n\nconst PaginationNext = forwardRef<HTMLButtonElement, ButtonHTMLAttributes<HTMLButtonElement>>(\n ({ className, ...props }, ref) => {\n return (\n <Button ref={ref} variant=\"outline\" size=\"icon\" className={cn('h-10 w-10', className)} {...props}>\n <ChevronRight className=\"h-4 w-4\" />\n <span className=\"sr-only\">Next page</span>\n </Button>\n );\n },\n);\nPaginationNext.displayName = 'PaginationNext';\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n};\n"]}
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-YB6RCW77.cjs","../src/utils/content-ref-groups.ts","../src/utils/suggestion-url.ts","../src/components/pagination.tsx"],"names":[],"mappings":"AAAA,6rBAAY;AACZ;AACE;AACF,wDAA6B;AAC7B;AACE;AACF,wDAA6B;AAC7B;AACA;ACqCO,IAAM,mBAAA,EAA4D;AAAA,EACvE,eAAA,EAAiB,EAAE,KAAA,EAAO,kBAAA,EAAoB,KAAA,EAAO,CAAA,EAAG,MAAA,EAAQ,MAAA,EAAQ,QAAA,EAAU,UAAU,CAAA;AAAA,EAC5F,eAAA,EAAiB,EAAE,KAAA,EAAO,kBAAA,EAAoB,KAAA,EAAO,CAAA,EAAG,MAAA,EAAQ,MAAA,EAAQ,QAAA,EAAU,KAAK,CAAA;AAAA,EACvF,OAAA,EAAS,EAAE,KAAA,EAAO,UAAA,EAAY,KAAA,EAAO,CAAA,EAAG,MAAA,EAAQ,MAAA,EAAQ,QAAA,EAAU,UAAU,CAAA;AAAA,EAC5E,OAAA,EAAS,EAAE,KAAA,EAAO,UAAA,EAAY,KAAA,EAAO,CAAA,EAAG,MAAA,EAAQ,MAAA,EAAQ,QAAA,EAAU,UAAU,CAAA;AAAA,EAC5E,UAAA,EAAY,EAAE,KAAA,EAAO,cAAA,EAAgB,KAAA,EAAO,CAAA,EAAG,MAAA,EAAQ,MAAA,EAAQ,QAAA,EAAU,UAAU,CAAA;AAAA,EACnF,KAAA,EAAO,EAAE,KAAA,EAAO,QAAA,EAAU,KAAA,EAAO,CAAA,EAAG,MAAA,EAAQ,MAAA,EAAQ,QAAA,EAAU,UAAU,CAAA;AAAA,EACxE,kBAAA,EAAoB,EAAE,KAAA,EAAO,YAAA,EAAc,KAAA,EAAO,CAAA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A,MAAA;AAEvC,IAAA;AAEJ,EAAA;AAEJ;AAEM;AACD,EAAA;AACD,IAAA;AACF,EAAA;AACF;AACA;AAEM;AACG,EAAA;AACR;AACD;AAEM;AACD,EAAA;AACD,IAAA;AACG,MAAA;AAAA,MAAA;AACC,QAAA;AACA,QAAA;AACE,UAAA;AACA,UAAA;AACF,QAAA;AACC,QAAA;AAAG,MAAA;AACN,IAAA;AAEJ,EAAA;AACF;AACA;AAEM;AACD,EAAA;AACD,IAAA;AACG,MAAA;AAAA,MAAA;AACC,QAAA;AACA,QAAA;AACC,QAAA;AAED,QAAA;AAAA,0BAAA;AACA,0BAAA;AAAoC,QAAA;AAAA,MAAA;AACtC,IAAA;AAEJ,EAAA;AACF;AACA;AAEM;AACD,EAAA;AACD,IAAA;AAEI,sBAAA;AACA,sBAAA;AACF,IAAA;AAEJ,EAAA;AACF;AACA;AAEM;AACD,EAAA;AACD,IAAA;AAEI,sBAAA;AACA,sBAAA;AACF,IAAA;AAEJ,EAAA;AACF;AACA;AHKU;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"/home/runner/work/openframe-oss-lib/openframe-oss-lib/openframe-frontend-core/dist/chunk-YB6RCW77.cjs","sourcesContent":[null,"/**\n * Content Ref Group Configuration\n *\n * Single source of truth for grouping content_refs by type. Used by both:\n * - components/related-content (detail page rail — lives in this lib)\n * - the hub's lib/utils/investor-email-utils.ts (email builder, via the\n * hub's re-export shim at lib/config/content-ref-groups.ts)\n *\n * Lives in utils/ (server-safe tsup block) so hub server-side code can\n * import it.\n *\n * Each entry carries the metadata RelatedContentSection needs to render the\n * group WITHOUT re-implementing per-type logic locally:\n * - `label`: section heading.\n * - `order`: source-stable ordering (lowest first).\n * - `layout`: 'list' (one-per-row, full-width cards) or 'grid' (responsive\n * column grid).\n * - `gridSize`: card-size variant passed to the per-type card dispatch.\n * `'lg'` matches the canonical large-card variant openframe + flamingo\n * apps already use; `'default'` is the legacy denser variant. New types\n * should pick `'lg'` whenever the card has a large variant.\n *\n * Adding a new content type = one entry here. RelatedContentSection picks up\n * the new group automatically (no hardcoded set to update). NOTE: the hub's\n * related-content SUGGESTION candidate list is DERIVED from these keys (minus\n * an explicit exclusion knob) — a new entry here becomes a suggestion\n * candidate iff it also resolves through the hub's TYPE_TO_ENTITY → RAG\n * config chain (unresolvable entries are dropped loudly at module load).\n */\n\nexport type ContentRefLayout = 'list' | 'grid';\n\n/** Subset of `EntityCardSize` (entity-card dispatch) appropriate for\n * grid/list rendering in RelatedContentSection. Duplicated as a literal\n * union here to avoid a config→component import cycle. Kept in lockstep\n * with `EntityCardSize`; widen here when a new size is added there. */\nexport type ContentRefGridSize = 'lg' | 'default' | 'sm';\n\nexport interface ContentRefGroupConfig {\n label: string;\n order: number;\n layout: ContentRefLayout;\n gridSize: ContentRefGridSize;\n}\n\nexport const CONTENT_REF_GROUPS: Record<string, ContentRefGroupConfig> = {\n investor_update: { label: 'Investor Updates', order: 1, layout: 'grid', gridSize: 'default' },\n product_release: { label: 'Product Releases', order: 2, layout: 'list', gridSize: 'lg' },\n podcast: { label: 'Podcasts', order: 3, layout: 'list', gridSize: 'default' },\n webinar: { label: 'Webinars', order: 4, layout: 'list', gridSize: 'default' },\n case_study: { label: 'Case Studies', order: 5, layout: 'grid', gridSize: 'default' },\n event: { label: 'Events', order: 6, layout: 'list', gridSize: 'default' },\n blog_post_existing: { label: 'Blog Posts', order: 7, layout: 'grid', gridSize: 'default' },\n customer_interview: { label: 'Customer Interviews', order: 8, layout: 'grid', gridSize: 'default' },\n onboarding_guide: { label: 'Onboarding Guides', order: 9, layout: 'list', gridSize: 'default' },\n what_i_shipped: { label: 'What I Shipped', order: 10, layout: 'grid', gridSize: 'default' },\n how_i_work: { label: 'How I Work', order: 11, layout: 'grid', gridSize: 'default' },\n ai_prompt: { label: 'Squawkbox', order: 12, layout: 'grid', gridSize: 'default' },\n};\n\n/** Human-readable label for a content_ref `type`. Returns null when the type\n * isn't registered — caller decides the fallback. Use `getContentRefLabelOrTitleCase`\n * to get a consistent title-cased fallback across all surfaces. */\nexport function getContentRefLabel(type: string): string | null {\n return CONTENT_REF_GROUPS[type]?.label ?? null;\n}\n\n/** Resolved label with a single shared fallback shape — title-cased version\n * of the raw type string for any unregistered type. Both RelatedContentSection\n * AND the investor-email builder consume this so cross-surface label rendering\n * for unregistered types is identical (no drift between \"podcast guest\" and\n * \"Podcast Guest\"). */\nexport function getContentRefLabelOrTitleCase(type: string): string {\n return CONTENT_REF_GROUPS[type]?.label ?? type.replace(/_/g, ' ').replace(/\\b\\w/g, ch => ch.toUpperCase());\n}\n\n/** Sort a set of present content_ref types into the canonical group order\n * (registered types first in CONTENT_REF_GROUPS `order`, then unregistered\n * types appended in insertion order). Used by RelatedContentSection AND the\n * investor-email builder so cross-surface ordering stays identical. */\nexport function orderContentRefTypes(present: Iterable<string>): string[] {\n const presentSet = new Set(present);\n const registeredInOrder = Object.entries(CONTENT_REF_GROUPS)\n .sort(([, a], [, b]) => a.order - b.order)\n .map(([type]) => type)\n .filter(type => presentSet.has(type));\n const unregistered = [...presentSet].filter(type => !CONTENT_REF_GROUPS[type]);\n return [...registeredInOrder, ...unregistered];\n}\n","/**\n * Shared fetch-URL composer for the two suggestion sections (FaqSection +\n * RelatedContentSection) — ONE owner of the entityType/entityId/count query\n * shape so the sections can never drift. Pure + server-safe.\n *\n * Byte-parity contract with the original `buildFaqsUrl`: when only\n * entityType/entityId are set, the param order is `entityType`, `entityId`;\n * with nothing set, the bare `path` is returned (no `?`).\n */\nexport interface SuggestionUrlOptions {\n /** Fetch-URL prefix for third-party embeds / reverse proxies\n * ('' = same-origin relative). */\n apiBaseUrl?: string;\n /** Both required together for entity scope; partial → bare path. */\n entityType?: string;\n entityId?: number | string;\n /** Maps to the server's `count` param. Undefined → param not sent\n * (server default applies). */\n count?: number;\n /** Extra query params appended after the shared trio (e.g. the\n * related-content `excludeTypes` deny-list). Empty/undefined values\n * are skipped. */\n extraParams?: Record<string, string | undefined>;\n}\n\nexport function buildSuggestionUrl(path: string, opts: SuggestionUrlOptions = {}): string {\n const qs = new URLSearchParams();\n const { entityType, entityId } = opts;\n if (entityType && entityId !== undefined && entityId !== null && entityId !== '') {\n qs.set('entityType', entityType);\n qs.set('entityId', String(entityId));\n }\n if (opts.count !== undefined) qs.set('count', String(opts.count));\n for (const [key, value] of Object.entries(opts.extraParams ?? {})) {\n if (value !== undefined && value !== '') qs.set(key, value);\n }\n const query = qs.toString();\n return `${opts.apiBaseUrl ?? ''}${path}${query ? `?${query}` : ''}`;\n}\n","'use client';\n\nimport { ChevronLeft, ChevronRight, MoreHorizontal } from 'lucide-react';\nimport { type ButtonHTMLAttributes, type HTMLAttributes, forwardRef } from 'react';\nimport { cn } from '../utils/cn';\nimport { Button } from './ui/button';\n\ninterface PaginationProps {\n currentPage: number;\n totalPages: number;\n onPageChange: (page: number) => void;\n className?: string;\n}\n\nconst Pagination = ({ currentPage, totalPages, onPageChange, className }: PaginationProps) => {\n // Generate page numbers to display\n const getPageNumbers = () => {\n const pages = [];\n const maxPagesToShow = 5;\n\n if (totalPages <= maxPagesToShow) {\n // Show all pages if there are fewer than maxPagesToShow\n for (let i = 1; i <= totalPages; i++) {\n pages.push(i);\n }\n } else {\n // Always show first page\n pages.push(1);\n\n // Calculate start and end of page range\n let start = Math.max(2, currentPage - 1);\n let end = Math.min(totalPages - 1, currentPage + 1);\n\n // Adjust if at the beginning or end\n if (currentPage <= 2) {\n end = Math.min(totalPages - 1, 4);\n } else if (currentPage >= totalPages - 1) {\n start = Math.max(2, totalPages - 3);\n }\n\n // Add ellipsis if needed\n if (start > 2) {\n pages.push(-1); // -1 represents ellipsis\n }\n\n // Add middle pages\n for (let i = start; i <= end; i++) {\n pages.push(i);\n }\n\n // Add ellipsis if needed\n if (end < totalPages - 1) {\n pages.push(-2); // -2 represents ellipsis\n }\n\n // Always show last page\n if (totalPages > 1) {\n pages.push(totalPages);\n }\n }\n\n return pages;\n };\n\n const pageNumbers = getPageNumbers();\n\n return (\n <nav role=\"navigation\" aria-label=\"pagination\" className={cn('mx-auto flex w-full justify-center', className)}>\n <ul className=\"flex flex-row items-center gap-1\">\n <li>\n <Button\n variant=\"outline\"\n size=\"icon\"\n onClick={() => onPageChange(currentPage - 1)}\n disabled={currentPage === 1}\n aria-label=\"Go to previous page\"\n className=\"!h-10 !w-10 md:!h-10 md:!w-10\"\n >\n <ChevronLeft className=\"h-4 w-4\" />\n </Button>\n </li>\n\n {pageNumbers.map((page, index) => {\n if (page < 0) {\n // Render ellipsis\n return (\n <li key={`ellipsis-${index}`}>\n <span className=\"flex h-9 w-9 items-center justify-center text-muted-foreground text-h6\">\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n </li>\n );\n }\n\n return (\n <li key={page}>\n <Button\n variant={currentPage === page ? 'accent' : 'outline'}\n size=\"icon\"\n onClick={() => onPageChange(page)}\n className=\"!h-9 !w-9 md:!h-9 md:!w-9\"\n aria-label={`Page ${page}`}\n aria-current={currentPage === page ? 'page' : undefined}\n >\n {page}\n </Button>\n </li>\n );\n })}\n\n <li>\n <Button\n variant=\"outline\"\n size=\"icon\"\n onClick={() => onPageChange(currentPage + 1)}\n disabled={currentPage === totalPages}\n aria-label=\"Go to next page\"\n className=\"!h-10 !w-10 md:!h-10 md:!w-10\"\n >\n <ChevronRight className=\"h-4 w-4\" />\n <span className=\"sr-only\">Next page</span>\n </Button>\n </li>\n </ul>\n </nav>\n );\n};\n\nconst PaginationContent = forwardRef<HTMLUListElement, HTMLAttributes<HTMLUListElement>>(\n ({ className, ...props }, ref) => {\n return <ul ref={ref} className={cn('flex items-center justify-center', className)} {...props} />;\n },\n);\nPaginationContent.displayName = 'PaginationContent';\n\nconst PaginationItem = forwardRef<HTMLLIElement, HTMLAttributes<HTMLLIElement>>(({ className, ...props }, ref) => {\n return <li ref={ref} className={cn('', className)} {...props} />;\n});\nPaginationItem.displayName = 'PaginationItem';\n\nconst PaginationLink = forwardRef<HTMLButtonElement, ButtonHTMLAttributes<HTMLButtonElement>>(\n ({ className, ...props }, ref) => {\n return (\n <button\n ref={ref}\n className={cn(\n 'inline-flex h-10 w-10 items-center justify-center rounded-md border border-input bg-background transition-colors text-h6 hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring',\n className,\n )}\n {...props}\n />\n );\n },\n);\nPaginationLink.displayName = 'PaginationLink';\n\nconst PaginationEllipsis = forwardRef<HTMLSpanElement, HTMLAttributes<HTMLSpanElement>>(\n ({ className, ...props }, ref) => {\n return (\n <span\n ref={ref}\n className={cn('flex h-10 w-10 items-center justify-center text-muted-foreground', className)}\n {...props}\n >\n <MoreHorizontal className=\"h-4 w-4\" />\n <span className=\"sr-only\">More pages</span>\n </span>\n );\n },\n);\nPaginationEllipsis.displayName = 'PaginationEllipsis';\n\nconst PaginationPrevious = forwardRef<HTMLButtonElement, ButtonHTMLAttributes<HTMLButtonElement>>(\n ({ className, ...props }, ref) => {\n return (\n <Button ref={ref} variant=\"outline\" size=\"icon\" className={cn('h-10 w-10', className)} {...props}>\n <ChevronLeft className=\"h-4 w-4\" />\n <span className=\"sr-only\">Previous page</span>\n </Button>\n );\n },\n);\nPaginationPrevious.displayName = 'PaginationPrevious';\n\nconst PaginationNext = forwardRef<HTMLButtonElement, ButtonHTMLAttributes<HTMLButtonElement>>(\n ({ className, ...props }, ref) => {\n return (\n <Button ref={ref} variant=\"outline\" size=\"icon\" className={cn('h-10 w-10', className)} {...props}>\n <ChevronRight className=\"h-4 w-4\" />\n <span className=\"sr-only\">Next page</span>\n </Button>\n );\n },\n);\nPaginationNext.displayName = 'PaginationNext';\n\nexport {\n Pagination,\n PaginationContent,\n PaginationEllipsis,\n PaginationItem,\n PaginationLink,\n PaginationNext,\n PaginationPrevious,\n};\n"]}
|
|
@@ -3,16 +3,16 @@ import {
|
|
|
3
3
|
FileDownloadCard,
|
|
4
4
|
GoogleSheetsViewer,
|
|
5
5
|
PdfViewer
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HAYYFOUU.js";
|
|
7
7
|
import {
|
|
8
8
|
MobileNavigationDropdown,
|
|
9
9
|
MultiLevelNavigation,
|
|
10
10
|
StickySectionNav
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-GRZHXAX6.js";
|
|
12
12
|
import {
|
|
13
13
|
DocSearchBar,
|
|
14
14
|
useDocSearch
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NULR47FR.js";
|
|
16
16
|
import {
|
|
17
17
|
CategorySidebarSkeleton,
|
|
18
18
|
DEFAULT_FOLDER_INDEX_FILE,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
findDocNodeByPath,
|
|
23
23
|
getDocAncestorNodeIds,
|
|
24
24
|
stripFolderIndexFromPath
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-KEHI5NAD.js";
|
|
26
26
|
import {
|
|
27
27
|
contentFetch
|
|
28
28
|
} from "./chunk-BVQEU5JB.js";
|
|
@@ -1050,4 +1050,4 @@ export {
|
|
|
1050
1050
|
EmbedSkeleton,
|
|
1051
1051
|
DocsHubPage
|
|
1052
1052
|
};
|
|
1053
|
-
//# sourceMappingURL=chunk-
|
|
1053
|
+
//# sourceMappingURL=chunk-YBEAX6QC.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
3
|
UnifiedPagination
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-X3LC6R37.js";
|
|
5
5
|
import {
|
|
6
6
|
cn
|
|
7
7
|
} from "./chunk-O4MCCKKN.js";
|
|
@@ -136,4 +136,4 @@ export {
|
|
|
136
136
|
usePaginationLoading,
|
|
137
137
|
PersistentPaginationWrapper
|
|
138
138
|
};
|
|
139
|
-
//# sourceMappingURL=chunk-
|
|
139
|
+
//# sourceMappingURL=chunk-YQCA4ZEJ.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
buildSuggestionUrl,
|
|
9
9
|
getContentRefLabelOrTitleCase,
|
|
10
10
|
orderContentRefTypes
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-X7LJRNMJ.js";
|
|
12
12
|
import {
|
|
13
13
|
pageCount
|
|
14
14
|
} from "./chunk-BVQEU5JB.js";
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
decideNewTab,
|
|
42
42
|
extractItemId,
|
|
43
43
|
extractItems
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-EW6PYGB3.js";
|
|
45
45
|
|
|
46
46
|
// src/components/related-content/related-content-section.tsx
|
|
47
47
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
@@ -878,4 +878,4 @@ export {
|
|
|
878
878
|
GROUP_PAGE_SIZE,
|
|
879
879
|
RelatedContentSection
|
|
880
880
|
};
|
|
881
|
-
//# sourceMappingURL=chunk-
|
|
881
|
+
//# sourceMappingURL=chunk-YWFMYZ4G.js.map
|
|
@@ -5,19 +5,19 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
PageLayout,
|
|
7
7
|
PageShell
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-KEHI5NAD.js";
|
|
9
9
|
import {
|
|
10
10
|
useScrollToHash
|
|
11
11
|
} from "./chunk-S6WBBSII.js";
|
|
12
12
|
import {
|
|
13
13
|
buildSuggestionUrl
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-X7LJRNMJ.js";
|
|
15
15
|
import {
|
|
16
16
|
SECTION_HEADING_CLASS,
|
|
17
17
|
faqItemAnchor,
|
|
18
18
|
faqSectionSlug,
|
|
19
19
|
parseFaqHash
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-RFUYCKBZ.js";
|
|
21
21
|
import {
|
|
22
22
|
STICKY_HEADER_OFFSET_PX,
|
|
23
23
|
navigateSamePageHash,
|
|
@@ -355,4 +355,4 @@ export {
|
|
|
355
355
|
FaqSection,
|
|
356
356
|
FaqDocumentPage
|
|
357
357
|
};
|
|
358
|
-
//# sourceMappingURL=chunk-
|
|
358
|
+
//# sourceMappingURL=chunk-ZYPB57IM.js.map
|