@fumadocs/base-ui 16.11.5 → 16.12.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.
Files changed (75) hide show
  1. package/css/generated/docs.css +1 -1
  2. package/css/generated/flux.css +1 -1
  3. package/css/generated/glass.css +1 -0
  4. package/css/generated/home.css +1 -1
  5. package/css/generated/notebook.css +1 -1
  6. package/css/generated/shared.css +1 -1
  7. package/css/lib/base.css +2 -1
  8. package/css/preset.css +0 -1
  9. package/dist/.translations/index.d.ts +6 -0
  10. package/dist/.translations/keys.js +6 -0
  11. package/dist/components/image-zoom.d.ts +2 -2
  12. package/dist/components/image-zoom.js +1 -1
  13. package/dist/components/sidebar/tabs/dropdown.d.ts +2 -3
  14. package/dist/components/sidebar/tabs/dropdown.js +9 -4
  15. package/dist/components/tabs.js +0 -1
  16. package/dist/components/toc/index.js +1 -1
  17. package/dist/components/ui/popover.js +1 -1
  18. package/dist/components/ui/tabs.d.ts +1 -1
  19. package/dist/components/ui/tabs.js +36 -11
  20. package/dist/layouts/docs/client.js +10 -5
  21. package/dist/layouts/docs/page/slots/toc.js +17 -11
  22. package/dist/layouts/docs/slots/sidebar.js +8 -2
  23. package/dist/layouts/flux/index.d.ts +1 -1
  24. package/dist/layouts/flux/index.js +34 -34
  25. package/dist/layouts/flux/page/slots/toc.js +7 -4
  26. package/dist/layouts/flux/slots/sidebar.js +4 -4
  27. package/dist/layouts/flux/slots/tab-dropdown.js +8 -2
  28. package/dist/layouts/glass/index.d.ts +41 -0
  29. package/dist/layouts/glass/index.js +70 -0
  30. package/dist/layouts/glass/layout-tabs.js +53 -0
  31. package/dist/layouts/glass/page/index.d.ts +31 -0
  32. package/dist/layouts/glass/page/index.js +92 -0
  33. package/dist/layouts/glass/page/slots/breadcrumb.d.ts +7 -0
  34. package/dist/layouts/glass/page/slots/breadcrumb.js +44 -0
  35. package/dist/layouts/glass/page/slots/footer.d.ts +16 -0
  36. package/dist/layouts/glass/page/slots/footer.js +56 -0
  37. package/dist/layouts/glass/page/slots/toc.d.ts +19 -0
  38. package/dist/layouts/glass/page/slots/toc.js +108 -0
  39. package/dist/layouts/glass/slots/header.d.ts +6 -0
  40. package/dist/layouts/glass/slots/header.js +73 -0
  41. package/dist/layouts/glass/slots/sidebar.d.ts +23 -0
  42. package/dist/layouts/glass/slots/sidebar.js +294 -0
  43. package/dist/layouts/home/index.js +2 -2
  44. package/dist/layouts/home/slots/header.d.ts +1 -1
  45. package/dist/layouts/home/slots/header.js +1 -0
  46. package/dist/layouts/notebook/client.js +2 -2
  47. package/dist/layouts/notebook/page/slots/toc.js +17 -11
  48. package/dist/layouts/notebook/slots/header.js +8 -2
  49. package/dist/layouts/notebook/slots/sidebar.js +8 -2
  50. package/dist/layouts/shared/client.d.ts +1 -1
  51. package/dist/layouts/shared/client.js +1 -1
  52. package/dist/layouts/shared/index.d.ts +7 -6
  53. package/dist/layouts/shared/index.js +5 -3
  54. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/controlled.d.ts +1 -1
  55. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/controlled.js +1 -1
  56. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/uncontrolled.d.ts +1 -1
  57. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/uncontrolled.js +1 -1
  58. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/utils/adjust-svg-ids.js +1 -1
  59. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/utils/compute-positioned-style.js +1 -1
  60. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/utils/element-tests.js +1 -1
  61. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/utils/get-div-img-style.js +1 -1
  62. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/utils/get-img-alt.js +1 -1
  63. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/utils/get-img-object-fit-style.js +1 -1
  64. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/utils/get-img-regular-style.js +1 -1
  65. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/utils/get-img-src.js +1 -1
  66. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/utils/get-modal-img-transform.js +1 -1
  67. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/utils/get-scale.js +1 -1
  68. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/utils/get-style-ghost.js +1 -1
  69. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/utils/get-style-modal-img.js +1 -1
  70. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/utils/get-target-dimension.js +1 -1
  71. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/utils/parse-position.js +1 -1
  72. package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/utils/test-has-scalable-src.js +1 -1
  73. package/dist/style.css +985 -885
  74. package/package.json +16 -9
  75. /package/dist/node_modules/.pnpm/{react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7 → react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8}/node_modules/react-medium-image-zoom/dist/index.d.ts +0 -0
@@ -28,7 +28,7 @@ interface BaseSlotsProps<P extends BaseLayoutProps = BaseLayoutProps> extends Pi
28
28
  declare function baseSlots({ useProps }: {
29
29
  useProps: () => BaseSlotsProps;
30
30
  }): {
31
- useProvider(options: BaseLayoutProps): {
31
+ useBaseSlots(options: BaseLayoutProps): {
32
32
  baseSlots: BaseSlots;
33
33
  baseProps: BaseSlotsProps;
34
34
  };
@@ -56,7 +56,7 @@ function baseSlots({ useProps }) {
56
56
  children: title
57
57
  });
58
58
  }
59
- return { useProvider(options) {
59
+ return { useBaseSlots(options) {
60
60
  const { locales = [] } = useI18n();
61
61
  const { nav, slots = {}, i18n = locales.length > 1, searchToggle: { enabled: searchToggleEnabled = true, ...searchToggle } = {}, themeSwitch: { enabled: themeSwitchEnabled = true, ...themeSwitch } = {} } = options;
62
62
  return {
@@ -2,8 +2,8 @@ import { FullSearchTriggerProps, SearchTriggerProps } from "./slots/search-trigg
2
2
  import { ThemeSwitchProps } from "./slots/theme-switch.js";
3
3
  import { BaseSlots, BaseSlotsProps, LinkItem, baseSlots } from "./client.js";
4
4
  import { ComponentProps, FC, ReactNode } from "react";
5
- import * as PageTree from "fumadocs-core/page-tree";
6
5
  import { I18nConfig } from "fumadocs-core/i18n";
6
+ import * as PageTree from "fumadocs-core/page-tree";
7
7
  //#region src/layouts/shared/index.d.ts
8
8
  interface NavOptions {
9
9
  enabled?: boolean;
@@ -82,7 +82,7 @@ interface GetLayoutTabsOptions {
82
82
  transform?: (option: LayoutTab, node: PageTree.Folder) => LayoutTab | null;
83
83
  }
84
84
  declare function getLayoutTabs(tree: PageTree.Root, { transform }?: GetLayoutTabsOptions): LayoutTab[];
85
- declare function isLayoutTabActive(tab: LayoutTab, pathname: string): boolean;
85
+ declare function isLayoutTabActive(tab: LayoutTab, path: PageTree.Node[], pathname: string): boolean;
86
86
  interface Filterable {
87
87
  /**
88
88
  * Restrict where the item is displayed
@@ -159,11 +159,12 @@ type LinkItemType = MainItemType | IconItemType | ButtonItemType | MenuItemType
159
159
  * Get link items with shortcuts
160
160
  */
161
161
  declare function resolveLinkItems({ links, githubUrl }: Pick<BaseLayoutProps, 'links' | 'githubUrl'>): LinkItemType[];
162
- declare function useLinkItems({ githubUrl, links }: Pick<BaseLayoutProps, 'links' | 'githubUrl'>): {
162
+ interface GroupedLinkItems {
163
+ all: LinkItemType[];
163
164
  navItems: LinkItemType[];
164
165
  menuItems: LinkItemType[];
165
- all: LinkItemType[];
166
- };
166
+ }
167
+ declare function useLinkItems({ githubUrl, links }: Pick<BaseLayoutProps, 'links' | 'githubUrl'>): GroupedLinkItems;
167
168
  declare function isLinkItemActive(link: LinkItemType, pathname: string): boolean;
168
169
  //#endregion
169
- export { BaseLayoutProps, type BaseSlots, type BaseSlotsProps, ButtonItemType, CustomItemType, GetLayoutTabsOptions, IconItemType, LayoutTab, LinkItem, LinkItemType, MainItemType, MenuItemType, NavOptions, baseSlots, getLayoutTabs, isLayoutTabActive, isLinkItemActive, resolveLinkItems, useLinkItems };
170
+ export { BaseLayoutProps, type BaseSlots, type BaseSlotsProps, ButtonItemType, CustomItemType, GetLayoutTabsOptions, GroupedLinkItems, IconItemType, LayoutTab, LinkItem, LinkItemType, MainItemType, MenuItemType, NavOptions, baseSlots, getLayoutTabs, isLayoutTabActive, isLinkItemActive, resolveLinkItems, useLinkItems };
@@ -2,7 +2,6 @@ import { isActive, normalize } from "../../utils/urls.js";
2
2
  import { LinkItem, baseSlots } from "./client.js";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { useMemo } from "react";
5
- import * as PageTree from "fumadocs-core/page-tree";
6
5
  //#region src/layouts/shared/index.tsx
7
6
  const defaultTransform = (option, node) => {
8
7
  if (!node.icon) return option;
@@ -38,8 +37,11 @@ function getLayoutTabs(tree, { transform = defaultTransform } = {}) {
38
37
  if (tree.fallback) next(tree.fallback, true);
39
38
  return results;
40
39
  }
41
- function isLayoutTabActive(tab, pathname) {
42
- if (tab.$folder) return PageTree.findPath(tab.$folder.children, (node) => node.type === "page" && isActive(node.url, pathname)) !== null;
40
+ function isLayoutTabActive(tab, path, pathname) {
41
+ if (tab.$folder) {
42
+ const folder = tab.$folder;
43
+ return path.some((node) => node.type === "folder" && (node.$id === folder.$id || node === folder));
44
+ }
43
45
  if (tab.urls) return tab.urls.has(normalize(pathname));
44
46
  return isActive(tab.url, pathname, true);
45
47
  }
@@ -1,5 +1,5 @@
1
1
  import React from "react";
2
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/controlled.d.ts
2
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/controlled.d.ts
3
3
  type ModalState = 'LOADED' | 'LOADING' | 'UNLOADED' | 'UNLOADING';
4
4
  interface ControlledProps {
5
5
  a11yNameButtonUnzoom?: string;
@@ -6,7 +6,7 @@ import { getStyleGhost } from "./utils/get-style-ghost.js";
6
6
  import { getStyleModalImg } from "./utils/get-style-modal-img.js";
7
7
  import React from "react";
8
8
  import ReactDOM from "react-dom";
9
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/controlled.js
9
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/controlled.js
10
10
  const IMAGE_QUERY = [
11
11
  "img",
12
12
  "svg",
@@ -1,6 +1,6 @@
1
1
  import { ControlledProps } from "./controlled.js";
2
2
  import React from "react";
3
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/uncontrolled.d.ts
3
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/uncontrolled.d.ts
4
4
  type UncontrolledProps = Omit<ControlledProps, 'isZoomed'>;
5
5
  //#endregion
6
6
  export { UncontrolledProps };
@@ -1,6 +1,6 @@
1
1
  import { Controlled } from "./controlled.js";
2
2
  import React from "react";
3
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/uncontrolled.js
3
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/uncontrolled.js
4
4
  function Uncontrolled({ onZoomChange, ...props }) {
5
5
  const [isZoomed, setIsZoomed] = React.useState(false);
6
6
  const handleZoomChange = React.useCallback((value, { event }) => {
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/utils/adjust-svg-ids.js
1
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/adjust-svg-ids.js
2
2
  const adjustSvgIDs = (svgEl) => {
3
3
  const newIdSuffix = "-zoom";
4
4
  const attrs = [
@@ -1,6 +1,6 @@
1
1
  import { getScale } from "./get-scale.js";
2
2
  import { parsePosition } from "./parse-position.js";
3
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/utils/compute-positioned-style.js
3
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/compute-positioned-style.js
4
4
  const computePositionedStyle = ({ containerHeight, containerLeft, containerTop, containerWidth, hasScalableSrc, offset, position, targetHeight, targetWidth, visibleHeight, visibleWidth }) => {
5
5
  const [posLeft = "50%", posTop = "50%"] = position.split(" ");
6
6
  const posX = parsePosition(posLeft, containerWidth - visibleWidth);
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/utils/element-tests.js
1
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/element-tests.js
2
2
  function isElement(el) {
3
3
  if (typeof Element === "undefined") return false;
4
4
  return el instanceof Element;
@@ -1,6 +1,6 @@
1
1
  import { parsePosition } from "./parse-position.js";
2
2
  import { computePositionedStyle } from "./compute-positioned-style.js";
3
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/utils/get-div-img-style.js
3
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-div-img-style.js
4
4
  const getDivImgStyle = ({ backgroundPosition, backgroundSize, containerHeight, containerLeft, containerTop, containerWidth, hasScalableSrc, offset, targetHeight, targetWidth }) => {
5
5
  const base = {
6
6
  containerHeight,
@@ -1,5 +1,5 @@
1
1
  import { testImg } from "./element-tests.js";
2
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/utils/get-img-alt.js
2
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-img-alt.js
3
3
  const getImgAlt = (imgEl) => {
4
4
  if (imgEl !== null) if (testImg(imgEl)) return imgEl.alt;
5
5
  else return imgEl.getAttribute("aria-label") ?? void 0;
@@ -1,6 +1,6 @@
1
1
  import { getScale } from "./get-scale.js";
2
2
  import { computePositionedStyle } from "./compute-positioned-style.js";
3
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/utils/get-img-object-fit-style.js
3
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-img-object-fit-style.js
4
4
  const getImgObjectFitStyle = ({ containerHeight, containerLeft, containerTop, containerWidth, hasScalableSrc, objectFit: objectFitParam, objectPosition, offset, targetHeight, targetWidth }) => {
5
5
  let resolvedObjectFit = objectFitParam;
6
6
  if (resolvedObjectFit === "scale-down") if (targetWidth <= containerWidth && targetHeight <= containerHeight) resolvedObjectFit = "none";
@@ -1,5 +1,5 @@
1
1
  import { getScale } from "./get-scale.js";
2
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/utils/get-img-regular-style.js
2
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-img-regular-style.js
3
3
  const getImgRegularStyle = ({ containerHeight, containerLeft, containerTop, containerWidth, hasScalableSrc, offset, targetHeight, targetWidth }) => {
4
4
  const scale = getScale({
5
5
  containerHeight,
@@ -1,5 +1,5 @@
1
1
  import { testDiv, testImg } from "./element-tests.js";
2
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/utils/get-img-src.js
2
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-img-src.js
3
3
  const URL_REGEX = /url(?:\(['"]?)(?<url>.*?)(?:['"]?\))/;
4
4
  const getImgSrc = (imgEl) => {
5
5
  if (imgEl !== null) {
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/utils/get-modal-img-transform.js
1
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-modal-img-transform.js
2
2
  const getModalImgTransform = ({ height, initialTransform, isZoomed, left, top, userTransform, width }) => {
3
3
  let centeredUserTransform = "";
4
4
  if (userTransform !== "none" && userTransform !== "") {
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/utils/get-scale.js
1
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-scale.js
2
2
  const getScaleToWindow = ({ height, offset, width }) => Math.min((window.innerWidth - offset * 2) / width, (window.innerHeight - offset * 2) / height);
3
3
  const getScaleToWindowMax = ({ containerHeight, containerWidth, offset, targetHeight, targetWidth }) => {
4
4
  const scale = getScaleToWindow({
@@ -1,5 +1,5 @@
1
1
  import { testSvg } from "./element-tests.js";
2
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/utils/get-style-ghost.js
2
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-style-ghost.js
3
3
  const getStyleGhost = (imgEl) => {
4
4
  if (imgEl == null) return {};
5
5
  if (testSvg(imgEl)) {
@@ -5,7 +5,7 @@ import { getDivImgStyle } from "./get-div-img-style.js";
5
5
  import { getModalImgTransform } from "./get-modal-img-transform.js";
6
6
  import { getTargetDimension } from "./get-target-dimension.js";
7
7
  import { testHasScalableSrc } from "./test-has-scalable-src.js";
8
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/utils/get-style-modal-img.js
8
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-style-modal-img.js
9
9
  const getStyleModalImg = ({ hasZoomImg, imgSrc, isSvg, isZoomed, loadedImgEl, offset, shouldRefresh, targetEl }) => {
10
10
  const hasScalableSrc = testHasScalableSrc({
11
11
  hasZoomImg,
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/utils/get-target-dimension.js
1
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/get-target-dimension.js
2
2
  const getTargetDimension = ({ fallback, natural }) => natural !== void 0 && natural !== 0 ? natural : fallback;
3
3
  //#endregion
4
4
  export { getTargetDimension };
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/utils/parse-position.js
1
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/parse-position.js
2
2
  const parsePosition = (position, relativeNum) => {
3
3
  const positionNum = parseFloat(position);
4
4
  return position.endsWith("%") ? relativeNum * positionNum / 100 : positionNum;
@@ -1,4 +1,4 @@
1
- //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.7_react@19.2.7__react@19.2.7/node_modules/react-medium-image-zoom/dist/utils/test-has-scalable-src.js
1
+ //#region ../../node_modules/.pnpm/react-medium-image-zoom@5.4.8_react-dom@19.2.8_react@19.2.8__react@19.2.8/node_modules/react-medium-image-zoom/dist/utils/test-has-scalable-src.js
2
2
  const SRC_SVG_REGEX = /\.svg$/i;
3
3
  const testHasScalableSrc = ({ hasZoomImg, imgSrc, isSvg }) => isSvg || imgSrc?.slice(0, 18) === "data:image/svg+xml" || hasZoomImg || imgSrc !== void 0 && SRC_SVG_REGEX.test(imgSrc);
4
4
  //#endregion