fumadocs-ui 15.4.2 → 15.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/css/preset.css +12 -0
  2. package/dist/components/accordion.d.ts +4 -2
  3. package/dist/components/accordion.d.ts.map +1 -1
  4. package/dist/components/accordion.js +18 -10
  5. package/dist/components/layout/sidebar.d.ts.map +1 -1
  6. package/dist/components/layout/sidebar.js +7 -5
  7. package/dist/components/layout/toc-clerk.d.ts +2 -4
  8. package/dist/components/layout/toc-clerk.d.ts.map +1 -1
  9. package/dist/components/layout/toc-clerk.js +8 -4
  10. package/dist/components/layout/toc.d.ts +6 -18
  11. package/dist/components/layout/toc.d.ts.map +1 -1
  12. package/dist/components/layout/toc.js +14 -16
  13. package/dist/components/ui/button.d.ts +1 -1
  14. package/dist/components/ui/button.d.ts.map +1 -1
  15. package/dist/components/ui/button.js +2 -1
  16. package/dist/layouts/docs/page-client.d.ts +30 -0
  17. package/dist/layouts/docs/page-client.d.ts.map +1 -0
  18. package/dist/{page-client.js → layouts/docs/page-client.js} +56 -40
  19. package/dist/layouts/docs/page.d.ts +16 -0
  20. package/dist/layouts/docs/page.d.ts.map +1 -0
  21. package/dist/layouts/docs/page.js +26 -0
  22. package/dist/layouts/docs/shared.d.ts +0 -3
  23. package/dist/layouts/docs/shared.d.ts.map +1 -1
  24. package/dist/layouts/docs/shared.js +0 -3
  25. package/dist/layouts/docs-client.d.ts +1 -0
  26. package/dist/layouts/docs-client.d.ts.map +1 -1
  27. package/dist/layouts/docs-client.js +10 -2
  28. package/dist/layouts/docs.d.ts.map +1 -1
  29. package/dist/layouts/docs.js +6 -13
  30. package/dist/layouts/home/navbar.d.ts.map +1 -1
  31. package/dist/layouts/home/navbar.js +1 -5
  32. package/dist/layouts/notebook-client.d.ts +5 -4
  33. package/dist/layouts/notebook-client.d.ts.map +1 -1
  34. package/dist/layouts/notebook-client.js +12 -6
  35. package/dist/layouts/notebook.d.ts.map +1 -1
  36. package/dist/layouts/notebook.js +6 -14
  37. package/dist/layouts/shared.d.ts +1 -1
  38. package/dist/layouts/shared.d.ts.map +1 -1
  39. package/dist/layouts/shared.js +4 -5
  40. package/dist/page.d.ts +25 -18
  41. package/dist/page.d.ts.map +1 -1
  42. package/dist/page.js +9 -18
  43. package/dist/style.css +47 -90
  44. package/dist/utils/merge-refs.d.ts +3 -0
  45. package/dist/utils/merge-refs.d.ts.map +1 -0
  46. package/dist/utils/merge-refs.js +12 -0
  47. package/package.json +8 -8
  48. package/dist/page-client.d.ts +0 -28
  49. package/dist/page-client.d.ts.map +0 -1
package/dist/style.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! tailwindcss v4.1.7 | MIT License | https://tailwindcss.com */
1
+ /*! tailwindcss v4.1.8 | MIT License | https://tailwindcss.com */
2
2
  @layer properties;
3
3
  @layer theme, base, components, utilities;
4
4
  @layer theme {
@@ -56,6 +56,7 @@
56
56
  --color-fd-accent: hsl(0, 0%, 90.1%);
57
57
  --color-fd-accent-foreground: hsl(0, 0%, 9%);
58
58
  --spacing-fd-container: 1400px;
59
+ --fd-page-width: 1200px;
59
60
  --fd-sidebar-width: 0px;
60
61
  --fd-toc-width: 0px;
61
62
  --fd-layout-width: 100vw;
@@ -353,12 +354,12 @@
353
354
  .top-\[10vh\] {
354
355
  top: 10vh;
355
356
  }
356
- .top-\[calc\(var\(--fd-banner-height\)\+var\(--fd-nav-height\)\)\] {
357
- top: calc(var(--fd-banner-height) + var(--fd-nav-height));
358
- }
359
357
  .right-2 {
360
358
  right: calc(var(--spacing) * 2);
361
359
  }
360
+ .bottom-\(--fd-sidebar-margin\) {
361
+ bottom: var(--fd-sidebar-margin);
362
+ }
362
363
  .bottom-1\.5 {
363
364
  bottom: calc(var(--spacing) * 1.5);
364
365
  }
@@ -417,6 +418,9 @@
417
418
  .mx-0\.5 {
418
419
  margin-inline: calc(var(--spacing) * 0.5);
419
420
  }
421
+ .mx-auto {
422
+ margin-inline: auto;
423
+ }
420
424
  .\!my-0 {
421
425
  margin-block: calc(var(--spacing) * 0) !important;
422
426
  }
@@ -831,9 +835,6 @@
831
835
  margin-bottom: 0;
832
836
  }
833
837
  }
834
- .mt-\(--fd-nav-height\) {
835
- margin-top: var(--fd-nav-height);
836
- }
837
838
  .mt-\(--fd-top\) {
838
839
  margin-top: var(--fd-top);
839
840
  }
@@ -867,9 +868,6 @@
867
868
  .mb-auto {
868
869
  margin-bottom: auto;
869
870
  }
870
- .box-content {
871
- box-sizing: content-box;
872
- }
873
871
  .fd-scroll-container {
874
872
  &::-webkit-scrollbar {
875
873
  width: 5px;
@@ -945,11 +943,8 @@
945
943
  .h-\(--fd-nav-height\) {
946
944
  height: var(--fd-nav-height);
947
945
  }
948
- .h-\(--fd-sidebar-height\) {
949
- height: var(--fd-sidebar-height);
950
- }
951
- .h-\(--fd-toc-height\) {
952
- height: var(--fd-toc-height);
946
+ .h-\(--fd-tocnav-height\) {
947
+ height: var(--fd-tocnav-height);
953
948
  }
954
949
  .h-\(--radix-navigation-menu-viewport-height\) {
955
950
  height: var(--radix-navigation-menu-viewport-height);
@@ -963,6 +958,9 @@
963
958
  .h-14 {
964
959
  height: calc(var(--spacing) * 14);
965
960
  }
961
+ .h-\[400px\] {
962
+ height: 400px;
963
+ }
966
964
  .h-\[calc\(100dvh-var\(--fd-nav-height\)\)\] {
967
965
  height: calc(100dvh - var(--fd-nav-height));
968
966
  }
@@ -990,9 +988,6 @@
990
988
  .min-h-10 {
991
989
  min-height: calc(var(--spacing) * 10);
992
990
  }
993
- .w-\(--fd-sidebar-width\) {
994
- width: var(--fd-sidebar-width);
995
- }
996
991
  .w-\(--fd-toc-width\) {
997
992
  width: var(--fd-toc-width);
998
993
  }
@@ -1050,12 +1045,6 @@
1050
1045
  .max-w-\[860px\] {
1051
1046
  max-width: 860px;
1052
1047
  }
1053
- .max-w-\[1120px\] {
1054
- max-width: 1120px;
1055
- }
1056
- .max-w-fd-container {
1057
- max-width: var(--spacing-fd-container);
1058
- }
1059
1048
  .max-w-full {
1060
1049
  max-width: 100%;
1061
1050
  }
@@ -1131,8 +1120,8 @@
1131
1120
  .animate-spin {
1132
1121
  animation: var(--animate-spin);
1133
1122
  }
1134
- .scroll-m-20 {
1135
- scroll-margin: calc(var(--spacing) * 20);
1123
+ .scroll-m-24 {
1124
+ scroll-margin: calc(var(--spacing) * 24);
1136
1125
  }
1137
1126
  .scroll-m-28 {
1138
1127
  scroll-margin: calc(var(--spacing) * 28);
@@ -1225,9 +1214,6 @@
1225
1214
  .overflow-hidden {
1226
1215
  overflow: hidden;
1227
1216
  }
1228
- .overflow-visible {
1229
- overflow: visible;
1230
- }
1231
1217
  .overflow-x-auto {
1232
1218
  overflow-x: auto;
1233
1219
  }
@@ -1488,9 +1474,6 @@
1488
1474
  .ps-\[calc\(var\(--fd-layout-offset\)\+var\(--fd-sidebar-width\)\)\] {
1489
1475
  padding-inline-start: calc(var(--fd-layout-offset) + var(--fd-sidebar-width));
1490
1476
  }
1491
- .pe-\(--fd-layout-offset\) {
1492
- padding-inline-end: var(--fd-layout-offset);
1493
- }
1494
1477
  .pe-2 {
1495
1478
  padding-inline-end: calc(var(--spacing) * 2);
1496
1479
  }
@@ -1666,6 +1649,11 @@
1666
1649
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
1667
1650
  transition-duration: var(--tw-duration, var(--default-transition-duration));
1668
1651
  }
1652
+ .transition-\[margin\] {
1653
+ transition-property: margin;
1654
+ transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
1655
+ transition-duration: var(--tw-duration, var(--default-transition-duration));
1656
+ }
1669
1657
  .transition-\[width\,height\] {
1670
1658
  transition-property: width,height;
1671
1659
  transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
@@ -1714,9 +1702,6 @@
1714
1702
  .\[--fd-nav-height\:56px\] {
1715
1703
  --fd-nav-height: 56px;
1716
1704
  }
1717
- .\[--fd-tocnav-height\:36px\] {
1718
- --fd-tocnav-height: 36px;
1719
- }
1720
1705
  .\[scrollbar-width\:none\] {
1721
1706
  scrollbar-width: none;
1722
1707
  }
@@ -1730,6 +1715,11 @@
1730
1715
  grid-row-start: 1;
1731
1716
  }
1732
1717
  }
1718
+ .\*\:mx-auto {
1719
+ :is(& > *) {
1720
+ margin-inline: auto;
1721
+ }
1722
+ }
1733
1723
  .\*\:my-auto {
1734
1724
  :is(& > *) {
1735
1725
  margin-block: auto;
@@ -1745,6 +1735,11 @@
1745
1735
  width: var(--fd-sidebar-width);
1746
1736
  }
1747
1737
  }
1738
+ .\*\:max-w-fd-container {
1739
+ :is(& > *) {
1740
+ max-width: var(--spacing-fd-container);
1741
+ }
1742
+ }
1748
1743
  .\*\:flex-col {
1749
1744
  :is(& > *) {
1750
1745
  flex-direction: column;
@@ -1757,14 +1752,14 @@
1757
1752
  }
1758
1753
  }
1759
1754
  }
1760
- .group-data-\[state\=open\]\:rotate-180 {
1755
+ .group-data-\[state\=open\]\:rotate-90 {
1761
1756
  &:is(:where(.group)[data-state="open"] *) {
1762
- rotate: 180deg;
1757
+ rotate: 90deg;
1763
1758
  }
1764
1759
  }
1765
- .group-data-\[state\=open\]\/accordion\:rotate-90 {
1766
- &:is(:where(.group\/accordion)[data-state="open"] *) {
1767
- rotate: 90deg;
1760
+ .group-data-\[state\=open\]\:rotate-180 {
1761
+ &:is(:where(.group)[data-state="open"] *) {
1762
+ rotate: 180deg;
1768
1763
  }
1769
1764
  }
1770
1765
  .peer-hover\:opacity-100 {
@@ -1919,16 +1914,6 @@
1919
1914
  display: none;
1920
1915
  }
1921
1916
  }
1922
- .data-\[collapsed\=false\]\:w-\[calc\(var\(--fd-sidebar-width\)\+var\(--fd-layout-offset\)\)\] {
1923
- &[data-collapsed="false"] {
1924
- width: calc(var(--fd-sidebar-width) + var(--fd-layout-offset));
1925
- }
1926
- }
1927
- .data-\[collapsed\=true\]\:me-\[calc\(var\(--fd-layout-offset\)-var\(--fd-sidebar-width\)\)\] {
1928
- &[data-collapsed="true"] {
1929
- margin-inline-end: calc(var(--fd-layout-offset) - var(--fd-sidebar-width));
1930
- }
1931
- }
1932
1917
  .data-\[empty\=true\]\:hidden {
1933
1918
  &[data-empty="true"] {
1934
1919
  display: none;
@@ -2172,11 +2157,6 @@
2172
2157
  padding-block: calc(var(--spacing) * 1.5);
2173
2158
  }
2174
2159
  }
2175
- .md\:pt-12 {
2176
- @media (width >= 48rem) {
2177
- padding-top: calc(var(--spacing) * 12);
2178
- }
2179
- }
2180
2160
  .md\:text-sm {
2181
2161
  @media (width >= 48rem) {
2182
2162
  font-size: var(--text-sm);
@@ -2209,21 +2189,11 @@
2209
2189
  --fd-sidebar-width: 286px;
2210
2190
  }
2211
2191
  }
2212
- .lg\:mt-2 {
2213
- @media (width >= 64rem) {
2214
- margin-top: calc(var(--spacing) * 2);
2215
- }
2216
- }
2217
2192
  .lg\:hidden {
2218
2193
  @media (width >= 64rem) {
2219
2194
  display: none;
2220
2195
  }
2221
2196
  }
2222
- .lg\:h-12 {
2223
- @media (width >= 64rem) {
2224
- height: calc(var(--spacing) * 12);
2225
- }
2226
- }
2227
2197
  .lg\:grid-cols-3 {
2228
2198
  @media (width >= 64rem) {
2229
2199
  grid-template-columns: repeat(3, minmax(0, 1fr));
@@ -2239,27 +2209,11 @@
2239
2209
  align-items: center;
2240
2210
  }
2241
2211
  }
2242
- .lg\:rounded-2xl {
2243
- @media (width >= 64rem) {
2244
- border-radius: var(--radius-2xl);
2245
- }
2246
- }
2247
- .lg\:border {
2248
- @media (width >= 64rem) {
2249
- border-style: var(--tw-border-style);
2250
- border-width: 1px;
2251
- }
2252
- }
2253
2212
  .lg\:\[--fd-nav-height\:104px\] {
2254
2213
  @media (width >= 64rem) {
2255
2214
  --fd-nav-height: 104px;
2256
2215
  }
2257
2216
  }
2258
- .lg\:\[--fd-padding\:1rem\] {
2259
- @media (width >= 64rem) {
2260
- --fd-padding: 1rem;
2261
- }
2262
- }
2263
2217
  .lg\:\[--fd-sidebar-width\:286px\] {
2264
2218
  @media (width >= 64rem) {
2265
2219
  --fd-sidebar-width: 286px;
@@ -2270,11 +2224,6 @@
2270
2224
  inset-inline-start: calc(var(--spacing) * 4);
2271
2225
  }
2272
2226
  }
2273
- .xl\:mx-auto {
2274
- @media (width >= 80rem) {
2275
- margin-inline: auto;
2276
- }
2277
- }
2278
2227
  .xl\:hidden {
2279
2228
  @media (width >= 80rem) {
2280
2229
  display: none;
@@ -2285,14 +2234,14 @@
2285
2234
  padding-inline: calc(var(--spacing) * 12);
2286
2235
  }
2287
2236
  }
2288
- .xl\:\[--fd-toc-width\:286px\] {
2237
+ .xl\:pt-12 {
2289
2238
  @media (width >= 80rem) {
2290
- --fd-toc-width: 286px;
2239
+ padding-top: calc(var(--spacing) * 12);
2291
2240
  }
2292
2241
  }
2293
- .xl\:\[--fd-tocnav-height\:0px\] {
2242
+ .xl\:\[--fd-toc-width\:286px\] {
2294
2243
  @media (width >= 80rem) {
2295
- --fd-tocnav-height: 0px;
2244
+ --fd-toc-width: 286px;
2296
2245
  }
2297
2246
  }
2298
2247
  .\@max-lg\:col-span-full {
@@ -2502,6 +2451,14 @@
2502
2451
  [data-rmiz-modal-overlay='visible'] {
2503
2452
  background-color: var(--color-fd-background);
2504
2453
  }
2454
+ :root, #nd-docs-layout {
2455
+ --fd-layout-offset: max(calc(50vw - var(--fd-layout-width) / 2), 0px);
2456
+ }
2457
+ }
2458
+ @media (width < 80rem) {
2459
+ #nd-docs-layout:has([data-toc-popover]) {
2460
+ --fd-tocnav-height: calc(var(--spacing) * 10);
2461
+ }
2505
2462
  }
2506
2463
  @property --radix-collapsible-content-height {
2507
2464
  syntax: '<length>';
@@ -0,0 +1,3 @@
1
+ import type * as React from 'react';
2
+ export declare function mergeRefs<T>(...refs: (React.Ref<T> | undefined)[]): React.RefCallback<T>;
3
+ //# sourceMappingURL=merge-refs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"merge-refs.d.ts","sourceRoot":"","sources":["../../src/utils/merge-refs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,wBAAgB,SAAS,CAAC,CAAC,EACzB,GAAG,IAAI,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,GACpC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,CAUtB"}
@@ -0,0 +1,12 @@
1
+ export function mergeRefs(...refs) {
2
+ return (value) => {
3
+ refs.forEach((ref) => {
4
+ if (typeof ref === 'function') {
5
+ ref(value);
6
+ }
7
+ else if (ref) {
8
+ ref.current = value;
9
+ }
10
+ });
11
+ };
12
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fumadocs-ui",
3
- "version": "15.4.2",
3
+ "version": "15.5.0",
4
4
  "description": "The framework for building a documentation website in Next.js",
5
5
  "keywords": [
6
6
  "NextJs",
@@ -89,20 +89,20 @@
89
89
  "react-medium-image-zoom": "^5.2.14",
90
90
  "react-remove-scroll": "^2.6.3",
91
91
  "tailwind-merge": "^3.3.0",
92
- "fumadocs-core": "15.4.2"
92
+ "fumadocs-core": "15.5.0"
93
93
  },
94
94
  "devDependencies": {
95
- "@next/eslint-plugin-next": "^15.3.2",
96
- "@tailwindcss/cli": "^4.1.7",
95
+ "@next/eslint-plugin-next": "^15.3.3",
96
+ "@tailwindcss/cli": "^4.1.8",
97
97
  "@types/lodash.merge": "^4.6.9",
98
- "@types/react": "^19.1.5",
98
+ "@types/react": "^19.1.6",
99
99
  "@types/react-dom": "^19.1.5",
100
- "next": "15.3.2",
101
- "tailwindcss": "^4.1.7",
100
+ "next": "15.3.3",
101
+ "tailwindcss": "^4.1.8",
102
102
  "tsc-alias": "^1.8.16",
103
103
  "@fumadocs/cli": "0.2.0",
104
104
  "eslint-config-custom": "0.0.0",
105
- "fumadocs-core": "15.4.2",
105
+ "fumadocs-core": "15.5.0",
106
106
  "tsconfig": "0.0.0"
107
107
  },
108
108
  "peerDependencies": {
@@ -1,28 +0,0 @@
1
- import { type ComponentProps } from 'react';
2
- import type { PageTree, TOCItemType } from 'fumadocs-core/server';
3
- import { type BreadcrumbOptions } from 'fumadocs-core/breadcrumb';
4
- export declare function TocPopoverTrigger({ items, ...props }: ComponentProps<'button'> & {
5
- items: TOCItemType[];
6
- }): import("react/jsx-runtime").JSX.Element;
7
- export declare function TocPopoverContent(props: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
8
- export declare function TocPopover(props: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
9
- export declare function PageBody(props: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
10
- export declare function PageArticle(props: ComponentProps<'article'>): import("react/jsx-runtime").JSX.Element;
11
- export declare function LastUpdate(props: {
12
- date: Date;
13
- }): import("react/jsx-runtime").JSX.Element;
14
- type Item = Pick<PageTree.Item, 'name' | 'description' | 'url'>;
15
- export interface FooterProps {
16
- /**
17
- * Items including information for the next and previous page
18
- */
19
- items?: {
20
- previous?: Item;
21
- next?: Item;
22
- };
23
- }
24
- export declare function Footer({ items }: FooterProps): import("react/jsx-runtime").JSX.Element;
25
- export type BreadcrumbProps = BreadcrumbOptions;
26
- export declare function Breadcrumb(options: BreadcrumbProps): import("react/jsx-runtime").JSX.Element | null;
27
- export {};
28
- //# sourceMappingURL=page-client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"page-client.d.ts","sourceRoot":"","sources":["../src/page-client.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EAMpB,MAAM,OAAO,CAAC;AAMf,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAElE,OAAO,EACL,KAAK,iBAAiB,EAEvB,MAAM,0BAA0B,CAAC;AAgBlC,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,GAAG,KAAK,EACT,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG;IAAE,KAAK,EAAE,WAAW,EAAE,CAAA;CAAE,2CAgDrD;AA4DD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,2CAU7D;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,2CAwDtD;AAED,wBAAgB,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC,KAAK,CAAC,2CAYpD;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,cAAc,CAAC,SAAS,CAAC,2CAe3D;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,2CAc/C;AAED,KAAK,IAAI,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,GAAG,KAAK,CAAC,CAAC;AAChE,MAAM,WAAW,WAAW;IAC1B;;OAEG;IACH,KAAK,CAAC,EAAE;QACN,QAAQ,CAAC,EAAE,IAAI,CAAC;QAChB,IAAI,CAAC,EAAE,IAAI,CAAC;KACb,CAAC;CACH;AAyBD,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,WAAW,2CA+B5C;AA8BD,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAAC;AAEhD,wBAAgB,UAAU,CAAC,OAAO,EAAE,eAAe,kDAsClD"}