@umami/shiso 1.1.10 → 1.1.12

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/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
3
3
  All notable changes to `@umami/shiso` are documented here. This project follows
4
4
  [Semantic Versioning](https://semver.org/).
5
5
 
6
+ ## 1.1.11 - 2026-08-19
7
+
8
+ ### Changed
9
+
10
+ - Remove rounded corners from full-screen images and anchor the close button to
11
+ the viewport's top-right corner.
12
+ - Render the active sidebar page label in bold.
13
+
6
14
  ## 1.1.10 - 2026-08-19
7
15
 
8
16
  ### Added
@@ -20514,40 +20514,40 @@ function ZoomableImage({ noZoom = false, className, alt, src, ...props }) {
20514
20514
  });
20515
20515
  if (noZoom || !src) return image;
20516
20516
  const label = alt ? `View “${alt}” full size` : "View image full size";
20517
- return /* @__PURE__ */ jsxs(Dialog$1, { children: [/* @__PURE__ */ jsx(DialogTrigger, {
20518
- render: /* @__PURE__ */ jsx("button", {
20519
- type: "button",
20520
- "data-slot": "zoomable-image",
20521
- className: "my-6 block w-fit max-w-full cursor-zoom-in rounded-lg text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",
20522
- "aria-label": label
20517
+ return /* @__PURE__ */ jsxs(Dialog$1, { children: [
20518
+ /* @__PURE__ */ jsx(DialogTrigger, {
20519
+ render: /* @__PURE__ */ jsx("button", {
20520
+ type: "button",
20521
+ "data-slot": "zoomable-image",
20522
+ className: "my-6 block w-fit max-w-full cursor-zoom-in rounded-lg text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",
20523
+ "aria-label": label
20524
+ }),
20525
+ children: image
20523
20526
  }),
20524
- children: image
20525
- }), /* @__PURE__ */ jsxs(DialogContent$1, {
20526
- showCloseButton: false,
20527
- overlayClassName: "bg-black/80 supports-backdrop-filter:backdrop-blur-sm",
20528
- className: "flex max-h-[calc(100vh-2rem)] w-auto max-w-[calc(100vw-2rem)] items-center justify-center bg-transparent p-0 ring-0 shadow-none sm:max-w-[calc(100vw-2rem)]",
20529
- children: [
20530
- /* @__PURE__ */ jsx(DialogTitle, {
20527
+ /* @__PURE__ */ jsxs(DialogContent$1, {
20528
+ showCloseButton: false,
20529
+ overlayClassName: "bg-black/80 supports-backdrop-filter:backdrop-blur-sm",
20530
+ className: "flex max-h-[calc(100vh-2rem)] w-auto max-w-[calc(100vw-2rem)] items-center justify-center bg-transparent p-0 ring-0 shadow-none sm:max-w-[calc(100vw-2rem)]",
20531
+ children: [/* @__PURE__ */ jsx(DialogTitle, {
20531
20532
  className: "sr-only",
20532
20533
  children: alt || "Full-size image"
20533
- }),
20534
- /* @__PURE__ */ jsx("img", {
20534
+ }), /* @__PURE__ */ jsx("img", {
20535
20535
  src,
20536
20536
  srcSet: props.srcSet,
20537
20537
  sizes: props.sizes,
20538
20538
  alt: alt || "",
20539
- className: "max-h-[calc(100vh-2rem)] max-w-[calc(100vw-2rem)] rounded-lg object-contain"
20539
+ className: "max-h-[calc(100vh-2rem)] max-w-[calc(100vw-2rem)] object-contain"
20540
+ })]
20541
+ }),
20542
+ /* @__PURE__ */ jsx(DialogPortal$1, { children: /* @__PURE__ */ jsx(DialogClose, {
20543
+ render: /* @__PURE__ */ jsx("button", {
20544
+ type: "button",
20545
+ className: "fixed top-4 right-4 z-[60] inline-flex size-9 items-center justify-center rounded-full bg-black/60 text-white outline-none backdrop-blur-sm hover:bg-black/80 focus-visible:ring-3 focus-visible:ring-white/60",
20546
+ "aria-label": "Close full-size image"
20540
20547
  }),
20541
- /* @__PURE__ */ jsx(DialogClose, {
20542
- render: /* @__PURE__ */ jsx("button", {
20543
- type: "button",
20544
- className: "fixed top-4 right-4 inline-flex size-9 items-center justify-center rounded-full bg-black/60 text-white outline-none backdrop-blur-sm hover:bg-black/80 focus-visible:ring-3 focus-visible:ring-white/60",
20545
- "aria-label": "Close full-size image"
20546
- }),
20547
- children: /* @__PURE__ */ jsx(X$1, { className: "size-5" })
20548
- })
20549
- ]
20550
- })] });
20548
+ children: /* @__PURE__ */ jsx(X$1, { className: "size-5" })
20549
+ }) })
20550
+ ] });
20551
20551
  }
20552
20552
 
20553
20553
  //#endregion
@@ -26793,9 +26793,9 @@ function PageLinks({ items = [], title, navigationLabel }) {
26793
26793
 
26794
26794
  //#endregion
26795
26795
  //#region src/components/SideNav.tsx
26796
- const sectionLabelClass = "flex min-w-0 flex-1 items-center gap-[0.4rem] pb-2 pr-1 font-bold text-inherit";
26797
- const groupLabelClass = "flex min-w-0 flex-1 items-center gap-[0.4rem] px-3 py-2 font-medium text-inherit";
26798
- const selectedClass = "border-l-sidebar-primary font-medium text-sidebar-primary hover:text-sidebar-primary";
26796
+ const sectionLabelClass = "flex min-w-0 items-center gap-[0.4rem] pb-2 pr-1 font-bold text-inherit";
26797
+ const groupLabelClass = "flex min-w-0 items-center gap-[0.4rem] py-2 pl-3 pr-1 font-medium text-inherit";
26798
+ const selectedClass = "border-l-sidebar-primary font-bold text-sidebar-primary hover:text-sidebar-primary";
26799
26799
  /** True when the group's root or any descendant page is the current page. */
26800
26800
  function containsPage(node, pathname) {
26801
26801
  if (node.root?.page.url === pathname) return true;
@@ -26828,7 +26828,7 @@ function CollapsibleGroup({ node, pathname, depth, drilldown, expandLabel, colla
26828
26828
  const chevron = /* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5 shrink-0 origin-center text-muted-foreground transition-[color,transform] duration-150 group-hover/section:text-sidebar-accent-foreground group-aria-expanded/collapsible-trigger:rotate-90" });
26829
26829
  const isTopLevel = depth === 0;
26830
26830
  const rootSelected = node.root?.page.url === pathname;
26831
- const headerClass = isTopLevel ? "flex min-w-0 items-center text-sidebar-foreground" : clsx("flex items-center border-sidebar-border border-l text-muted-foreground hover:text-sidebar-accent-foreground", { "pl-6": depth > 1 });
26831
+ const headerClass = isTopLevel ? "flex min-w-0 items-center text-sidebar-foreground" : clsx("flex items-center border-l border-l-sidebar-border text-muted-foreground hover:text-sidebar-accent-foreground", { "pl-6": depth > 1 });
26832
26832
  const fixedHeader = /* @__PURE__ */ jsx("div", {
26833
26833
  className: clsx(headerClass, {
26834
26834
  [selectedClass]: rootSelected && !isTopLevel,
@@ -26836,10 +26836,10 @@ function CollapsibleGroup({ node, pathname, depth, drilldown, expandLabel, colla
26836
26836
  }),
26837
26837
  children: node.root ? /* @__PURE__ */ jsxs(Link, {
26838
26838
  to: node.root.page.url,
26839
- className: isTopLevel ? sectionLabelClass : groupLabelClass,
26839
+ className: clsx(isTopLevel ? sectionLabelClass : groupLabelClass, "flex-1"),
26840
26840
  children: [resolveIcon(node.icon), node.label]
26841
26841
  }) : /* @__PURE__ */ jsxs("span", {
26842
- className: isTopLevel ? sectionLabelClass : groupLabelClass,
26842
+ className: clsx(isTopLevel ? sectionLabelClass : groupLabelClass, "flex-1"),
26843
26843
  children: [resolveIcon(node.icon), node.label]
26844
26844
  })
26845
26845
  });
@@ -26857,7 +26857,7 @@ function CollapsibleGroup({ node, pathname, depth, drilldown, expandLabel, colla
26857
26857
  type: "button",
26858
26858
  variant: "ghost",
26859
26859
  size: "icon-xs",
26860
- className: clsx("group/collapsible-trigger inline-flex size-6 items-center justify-center rounded-sm text-muted-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground", { "mr-[0.35rem]": !isTopLevel }),
26860
+ className: "group/collapsible-trigger inline-flex size-6 items-center justify-center rounded-sm text-muted-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",
26861
26861
  "aria-label": `${isExpanded ? collapseLabel : expandLabel} ${node.label}`
26862
26862
  }),
26863
26863
  children: chevron
@@ -26866,9 +26866,9 @@ function CollapsibleGroup({ node, pathname, depth, drilldown, expandLabel, colla
26866
26866
  render: /* @__PURE__ */ jsx(Button, {
26867
26867
  type: "button",
26868
26868
  variant: "ghost",
26869
- className: clsx(headerClass, "group/section group/collapsible-trigger flex h-auto w-full items-center justify-start gap-[0.4rem] whitespace-normal rounded-none px-0 py-0 text-left hover:bg-transparent aria-expanded:bg-transparent dark:hover:bg-transparent [&>svg:last-child]:ml-auto", {
26869
+ className: clsx(headerClass, "group/section group/collapsible-trigger flex h-auto w-full items-center justify-start gap-[0.4rem] whitespace-normal rounded-none px-0 py-0 text-left hover:bg-transparent aria-expanded:bg-transparent dark:hover:bg-transparent", {
26870
26870
  "pb-2 font-bold text-sidebar-foreground": isTopLevel,
26871
- "border-sidebar-border border-l px-3 py-2 font-medium text-muted-foreground hover:text-sidebar-accent-foreground": !isTopLevel
26871
+ "border-l border-l-sidebar-border px-3 py-2 font-medium text-muted-foreground hover:text-sidebar-accent-foreground": !isTopLevel
26872
26872
  })
26873
26873
  }),
26874
26874
  children: [
@@ -26917,7 +26917,7 @@ function NavNodes({ nodes, pathname, depth, drilldown, expandLabel, collapseLabe
26917
26917
  href: node.href,
26918
26918
  target: node.target,
26919
26919
  rel: node.target === "_blank" ? "noreferrer" : void 0,
26920
- className: clsx("flex min-w-0 items-center gap-[0.4rem] border-sidebar-border border-l px-3 py-[0.55rem] text-muted-foreground hover:text-sidebar-accent-foreground [overflow-wrap:anywhere]", { "pl-6": depth > 1 }),
26920
+ className: clsx("flex min-w-0 items-center gap-[0.4rem] border-l border-l-sidebar-border px-3 py-[0.55rem] text-muted-foreground hover:text-sidebar-accent-foreground [overflow-wrap:anywhere]", { "pl-6": depth > 1 }),
26921
26921
  children: [
26922
26922
  resolveIcon(node.icon),
26923
26923
  node.label,
@@ -26934,7 +26934,7 @@ function NavNodes({ nodes, pathname, depth, drilldown, expandLabel, collapseLabe
26934
26934
  const isSelected = url === pathname;
26935
26935
  rendered.push(/* @__PURE__ */ jsxs(Link, {
26936
26936
  to: url,
26937
- className: clsx("flex min-w-0 items-center gap-[0.4rem] border-sidebar-border border-l px-3 py-[0.55rem] [overflow-wrap:anywhere]", {
26937
+ className: clsx("flex min-w-0 items-center gap-[0.4rem] border-l border-l-sidebar-border px-3 py-[0.55rem] [overflow-wrap:anywhere]", {
26938
26938
  "pl-6": depth > 1,
26939
26939
  [selectedClass]: isSelected,
26940
26940
  "text-muted-foreground hover:text-sidebar-accent-foreground": !isSelected
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umami/shiso",
3
- "version": "1.1.10",
3
+ "version": "1.1.12",
4
4
  "description": "Open-source documentation framework for Markdown and MDX sites.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -11,11 +11,11 @@ import { flattenNav, isNodeHidden } from '@/lib/docs-config';
11
11
  import type { DocsTab, NavGroupNode, NavNode } from '@/lib/types';
12
12
 
13
13
  const sectionLabelClass =
14
- 'flex min-w-0 flex-1 items-center gap-[0.4rem] pb-2 pr-1 font-bold text-inherit';
14
+ 'flex min-w-0 items-center gap-[0.4rem] pb-2 pr-1 font-bold text-inherit';
15
15
  const groupLabelClass =
16
- 'flex min-w-0 flex-1 items-center gap-[0.4rem] px-3 py-2 font-medium text-inherit';
16
+ 'flex min-w-0 items-center gap-[0.4rem] py-2 pl-3 pr-1 font-medium text-inherit';
17
17
  const selectedClass =
18
- 'border-l-sidebar-primary font-medium text-sidebar-primary hover:text-sidebar-primary';
18
+ 'border-l-sidebar-primary font-bold text-sidebar-primary hover:text-sidebar-primary';
19
19
 
20
20
  export interface SideNavProps {
21
21
  tabs: DocsTab[];
@@ -97,7 +97,7 @@ function CollapsibleGroup({
97
97
  const headerClass = isTopLevel
98
98
  ? 'flex min-w-0 items-center text-sidebar-foreground'
99
99
  : classNames(
100
- 'flex items-center border-sidebar-border border-l text-muted-foreground hover:text-sidebar-accent-foreground',
100
+ 'flex items-center border-l border-l-sidebar-border text-muted-foreground hover:text-sidebar-accent-foreground',
101
101
  { 'pl-6': depth > 1 },
102
102
  );
103
103
 
@@ -109,12 +109,15 @@ function CollapsibleGroup({
109
109
  })}
110
110
  >
111
111
  {node.root ? (
112
- <Link to={node.root.page.url} className={isTopLevel ? sectionLabelClass : groupLabelClass}>
112
+ <Link
113
+ to={node.root.page.url}
114
+ className={classNames(isTopLevel ? sectionLabelClass : groupLabelClass, 'flex-1')}
115
+ >
113
116
  {resolveIcon(node.icon)}
114
117
  {node.label}
115
118
  </Link>
116
119
  ) : (
117
- <span className={isTopLevel ? sectionLabelClass : groupLabelClass}>
120
+ <span className={classNames(isTopLevel ? sectionLabelClass : groupLabelClass, 'flex-1')}>
118
121
  {resolveIcon(node.icon)}
119
122
  {node.label}
120
123
  </span>
@@ -142,10 +145,7 @@ function CollapsibleGroup({
142
145
  type="button"
143
146
  variant="ghost"
144
147
  size="icon-xs"
145
- className={classNames(
146
- 'group/collapsible-trigger inline-flex size-6 items-center justify-center rounded-sm text-muted-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground',
147
- { 'mr-[0.35rem]': !isTopLevel },
148
- )}
148
+ className="group/collapsible-trigger inline-flex size-6 items-center justify-center rounded-sm text-muted-foreground hover:bg-sidebar-accent hover:text-sidebar-accent-foreground"
149
149
  aria-label={`${isExpanded ? collapseLabel : expandLabel} ${node.label}`}
150
150
  />
151
151
  }
@@ -161,10 +161,10 @@ function CollapsibleGroup({
161
161
  variant="ghost"
162
162
  className={classNames(
163
163
  headerClass,
164
- 'group/section group/collapsible-trigger flex h-auto w-full items-center justify-start gap-[0.4rem] whitespace-normal rounded-none px-0 py-0 text-left hover:bg-transparent aria-expanded:bg-transparent dark:hover:bg-transparent [&>svg:last-child]:ml-auto',
164
+ 'group/section group/collapsible-trigger flex h-auto w-full items-center justify-start gap-[0.4rem] whitespace-normal rounded-none px-0 py-0 text-left hover:bg-transparent aria-expanded:bg-transparent dark:hover:bg-transparent',
165
165
  {
166
166
  'pb-2 font-bold text-sidebar-foreground': isTopLevel,
167
- 'border-sidebar-border border-l px-3 py-2 font-medium text-muted-foreground hover:text-sidebar-accent-foreground':
167
+ 'border-l border-l-sidebar-border px-3 py-2 font-medium text-muted-foreground hover:text-sidebar-accent-foreground':
168
168
  !isTopLevel,
169
169
  },
170
170
  )}
@@ -244,7 +244,7 @@ function NavNodes({
244
244
  target={node.target}
245
245
  rel={node.target === '_blank' ? 'noreferrer' : undefined}
246
246
  className={classNames(
247
- 'flex min-w-0 items-center gap-[0.4rem] border-sidebar-border border-l px-3 py-[0.55rem] text-muted-foreground hover:text-sidebar-accent-foreground [overflow-wrap:anywhere]',
247
+ 'flex min-w-0 items-center gap-[0.4rem] border-l border-l-sidebar-border px-3 py-[0.55rem] text-muted-foreground hover:text-sidebar-accent-foreground [overflow-wrap:anywhere]',
248
248
  { 'pl-6': depth > 1 },
249
249
  )}
250
250
  >
@@ -265,7 +265,7 @@ function NavNodes({
265
265
  key={url}
266
266
  to={url}
267
267
  className={classNames(
268
- 'flex min-w-0 items-center gap-[0.4rem] border-sidebar-border border-l px-3 py-[0.55rem] [overflow-wrap:anywhere]',
268
+ 'flex min-w-0 items-center gap-[0.4rem] border-l border-l-sidebar-border px-3 py-[0.55rem] [overflow-wrap:anywhere]',
269
269
  {
270
270
  'pl-6': depth > 1,
271
271
  [selectedClass]: isSelected,
@@ -4,6 +4,7 @@ import {
4
4
  Dialog,
5
5
  DialogClose,
6
6
  DialogContent,
7
+ DialogPortal,
7
8
  DialogTitle,
8
9
  DialogTrigger,
9
10
  } from '@/components/ui/dialog';
@@ -60,20 +61,22 @@ export function ZoomableImage({
60
61
  srcSet={props.srcSet}
61
62
  sizes={props.sizes}
62
63
  alt={alt || ''}
63
- className="max-h-[calc(100vh-2rem)] max-w-[calc(100vw-2rem)] rounded-lg object-contain"
64
+ className="max-h-[calc(100vh-2rem)] max-w-[calc(100vw-2rem)] object-contain"
64
65
  />
66
+ </DialogContent>
67
+ <DialogPortal>
65
68
  <DialogClose
66
69
  render={
67
70
  <button
68
71
  type="button"
69
- className="fixed top-4 right-4 inline-flex size-9 items-center justify-center rounded-full bg-black/60 text-white outline-none backdrop-blur-sm hover:bg-black/80 focus-visible:ring-3 focus-visible:ring-white/60"
72
+ className="fixed top-4 right-4 z-[60] inline-flex size-9 items-center justify-center rounded-full bg-black/60 text-white outline-none backdrop-blur-sm hover:bg-black/80 focus-visible:ring-3 focus-visible:ring-white/60"
70
73
  aria-label="Close full-size image"
71
74
  />
72
75
  }
73
76
  >
74
77
  <XIcon className="size-5" />
75
78
  </DialogClose>
76
- </DialogContent>
79
+ </DialogPortal>
77
80
  </Dialog>
78
81
  );
79
82
  }